The type of individual elements in the collection.
Creates a new collection endpoint.
The endpoint used to navigate to this one.
The URI of this endpoint relative to the referrer
's. Add a ./
prefix here to imply a trailing slash in the referrer
's URI.
Readonly
errorHandles errors in responses.
Readonly
httpThe HTTP client used to communicate with the remote resource.
Readonly
linkExtracts links from responses.
Optional
responseA cached copy of the last response.
Readonly
serializerControls the serialization of entities sent to and received from the server.
Readonly
uriThe HTTP URI of the remote resource.
Shows whether the server has indicated that createAll is currently allowed. Uses cached data from last response.
true
if the method is allowed, false
if the method is not allowed, undefined
if no request has been sent yet or the server did not specify allowed methods.
Shows whether the server has indicated that create is currently allowed. Uses cached data from last response.
true
if the method is allowed, false
if the method is not allowed, undefined
if no request has been sent yet or the server did not specify allowed methods.
Shows whether the server has indicated that readAll is currently allowed. Uses cached data from last response.
true
if the method is allowed, false
if the method is not allowed, undefined
if no request has been sent yet or the server did not specify allowed methods.
Shows whether the server has indicated that setAll is currently allowed. Uses cached data from last response.
true
if the method is allowed, false
if the method is not allowed, undefined
if no request has been sent yet or the server did not specify allowed methods.
Determines whether the collection contains a specific element.
AuthenticationError: Unauthorized
HttpError: Other non-success status code
The ID identifying the entity or an entity to extract the ID from.
Adds a TEntity
as a new element to the collection.
An endpoint for the newly created entity; undefined
if the server returned neither a "Location" header nor an entity with an ID in the response body.
AuthenticationError: Unauthorized
HttpError: Other non-success status code
The new TEntity
.
Optional
signal: AbortSignalUsed to cancel the request.
Adds (or updates) multiple TEntity
s as elements in the collection.
AuthenticationError: Unauthorized
HttpError: Other non-success status code
The TEntity
s to create or modify.
Optional
signal: AbortSignalUsed to cancel the request.
Deletes an existing element from the collection.
AuthenticationError: Unauthorized
NotFoundError: NotFound or Gone
HttpError: Other non-success status code
The ID identifying the entity or an entity to extract the ID from.
Protected
deletePerforms an Delete request on the uri. Sets IfMatch if there is a cached ETag to detect lost updates.
ConcurrencyError: The entity has changed since it was last retrieved with getContent. Your changes were rejected to prevent a lost update.
AuthenticationError: Unauthorized
NotFoundError: NotFound or Gone
HttpError: Other non-success status code
Optional
signal: AbortSignalUsed to cancel the request.
Returns an TElementEndpoint
for a specific child element.
The ID identifying the entity or an entity to extract the ID from.
Protected
getPerforms an Put request on the uri and caches the response if the server sends an ETag.
AuthenticationError: Unauthorized
NotFoundError: NotFound or Gone
HttpError: Other non-success status code
Optional
signal: AbortSignalUsed to cancel the request.
Retrieves a link template with a specific relation type. Uses cached data from last response. Prefer linkTemplate when possible.
NotFoundError: No link template with the specified rel
could be found.
The relation type of the link template to look for.
Protected
handleProtected
handleProtected
isShows whether the server has indicated that a specific HTTP method is currently allowed. Uses cached data from last response.
true
if the method is allowed, false
if the method is not allowed, undefined
if no request has been sent yet or the server did not specify allowed methods.
The HTTP methods (e.g. GET, POST, ...) to check.
Protected
joinResolves a single link with a specific relation type. Uses cached data from last response.
NotFoundError: No link with the specified rel
could be found.
The relation type of the link to look for.
Resolves a link template with a specific relation type. Uses cached data from last response.
NotFoundError: No link template with the specified rel
could be found.
The relation type of the link template to look for.
Variables for resolving the template.
Modifies an existing element in the collection by merging changes on the server-side.
The TEntity
as returned by the server, possibly with additional fields set. undefined if the server does not respond with a result entity.
AuthenticationError: Unauthorized
NotFoundError: NotFound or Gone
HttpError: Other non-success status code
The TEntity
data to merge with the existing element.
Protected
putPerforms an Put request on the uri. Sets IfMatch if there is a cached ETag to detect lost updates.
ConcurrencyError: The entity has changed since it was last retrieved with getContent. Your changes were rejected to prevent a lost update.
AuthenticationError: Unauthorized
NotFoundError: NotFound or Gone
HttpError: Other non-success status code
Optional
signal: AbortSignalUsed to cancel the request.
Returns all TEntity
s in the collection.
AuthenticationError: Unauthorized
HttpError: Other non-success status code
Optional
signal: AbortSignalUsed to cancel the request.
Protected
sendSends an HTTP request to this endpoint's URI. Handles various cross-cutting concerns regarding a response message such as discovering links and handling errors.
The HTTP method to use.
Optional
signal: AbortSignalUsed to cancel the request.
Optional
headers: HeadersInitThe HTTP headers to set.
Optional
body: BodyInitThe body to send.
Sets/replaces an existing element in the collection.
The TEntity
as returned by the server, possibly with additional fields set. undefined if the server does not respond with a result entity.
AuthenticationError: Unauthorized
NotFoundError: NotFound or Gone
HttpError: Other non-success status code
The new state of the element.
Replaces the entire content of the collection with new TEntity
s.
AuthenticationError: Unauthorized
HttpError: Other non-success status code
The TEntity
s to create or modify.
Registers one or more default links for a specific relation type. These links are used when no links with this relation type are provided by the server. This should only be called during initial setup of the endpoint.
The relation type of the link to add.
Optional
href: stringThe href of the link relative to this endpoint's URI. Leave unspecified to remove any previous entries for the relation type.
Registers a default link template for a specific relation type. This template is used when no template with this relation type is provided by the server. This should only be called during initial setup of the endpoint.
The relation type of the link to add.
Optional
href: stringThe templates href relative to this endpoint's URI. Leave unspecified to remove any previous entries for the relation type.
Static
Protected
ensureGenerated using TypeDoc
Endpoint for a collection of
TEntity
s addressable asElementEndpoint<TEntity>
s.Use GenericCollectionEndpoint instead if you wish to customize the element endpoint type.