Skip to content

Commit 726e518

Browse files
committed
Fixed TypeDoc errors
1 parent 3feb153 commit 726e518

21 files changed

Lines changed: 168 additions & 168 deletions

endpoints/Endpoint.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export class Endpoint {
105105
* @param signal Used to cancel the request.
106106
* @param headers The HTTP headers to set.
107107
* @param body The body to send.
108-
* @throws {@link HttpError}
108+
* @throws {@link errors!HttpError}
109109
*/
110110
protected async send(method: HttpMethod, signal?: AbortSignal, headers?: HeadersInit, body?: BodyInit): Promise<Response> {
111111
const response = await this.httpClient.send(this.uri, method, signal, headers, body);
@@ -116,7 +116,7 @@ export class Endpoint {
116116
/**
117117
* Handles various cross-cutting concerns regarding a response message such as discovering links and handling errors.
118118
* @param response The response to process.
119-
* @throws {@link HttpError}
119+
* @throws {@link errors!HttpError}
120120
*/
121121
protected async handle(response: Response) {
122122
this.links = await this.linkExtractor.getLinks(response);
@@ -183,7 +183,7 @@ export class Endpoint {
183183
/**
184184
* Resolves a single link with a specific relation type. Uses cached data from last response.
185185
* @param rel The relation type of the link to look for.
186-
* @throws {@link NotFoundError}: No link with the specified `rel` could be found.
186+
* @throws {@link errors!NotFoundError}: No link with the specified `rel` could be found.
187187
*/
188188
link(rel: string): URL {
189189
const links = this.getLinks(rel);
@@ -198,7 +198,7 @@ export class Endpoint {
198198
* Resolves a link template with a specific relation type. Uses cached data from last response.
199199
* @param rel The relation type of the link template to look for.
200200
* @param variables Variables for resolving the template.
201-
* @throws {@link NotFoundError}: No link template with the specified `rel` could be found.
201+
* @throws {@link errors!NotFoundError}: No link template with the specified `rel` could be found.
202202
*/
203203
linkTemplate(rel: string, variables: { [key: string]: any; }): URL {
204204
return this.join(URI.expand!(this.getLinkTemplate(rel), variables).toString());
@@ -207,7 +207,7 @@ export class Endpoint {
207207
/**
208208
* Retrieves a link template with a specific relation type. Uses cached data from last response. Prefer {@link linkTemplate} when possible.
209209
* @param rel The relation type of the link template to look for.
210-
* @throws {@link NotFoundError}: No link template with the specified `rel` could be found.
210+
* @throws {@link errors!NotFoundError}: No link template with the specified `rel` could be found.
211211
*/
212212
getLinkTemplate(rel: string) {
213213
const template = this.links.find(x => x.templated && x.rel === rel)?.href

endpoints/EntryEndpoint.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ export class EntryEndpoint extends Endpoint {
1111
/**
1212
* Creates a new entry endpoint.
1313
* @param uri The base URI of the REST API.<br>Missing trailing slash will be appended automatically.
14-
* @param serializer Controls the serialization of entities sent to and received from the server.<br>Defaults to {@link JsonSerializer} if undefined.
15-
* @param errorHandler Handles errors in HTTP responses.<br>Defaults to {@link DefaultErrorHandler} if undefined.
16-
* @param linkExtractor Detects links in HTTP responses.<br>Defaults to {@link HeaderLinkExtractor} and {@link HalLinkExtractor} combined via {@link AggregateLinkExtractor} if undefined.
17-
* @param httpClient The HTTP client used to communicate with the REST API.<br>Defaults to {@link FetchHttpClient} if undefined.
14+
* @param serializer Controls the serialization of entities sent to and received from the server.<br>Defaults to {@link serializers!JsonSerializer} if undefined.
15+
* @param errorHandler Handles errors in HTTP responses.<br>Defaults to {@link errors!DefaultErrorHandler} if undefined.
16+
* @param linkExtractor Detects links in HTTP responses.<br>Defaults to {@link links!HeaderLinkExtractor} and {@link links!HalLinkExtractor} combined via {@link links!AggregateLinkExtractor} if undefined.
17+
* @param httpClient The HTTP client used to communicate with the REST API.<br>Defaults to {@link http!FetchHttpClient} if undefined.
1818
*/
1919
constructor(
2020
uri: URL | string,
@@ -37,10 +37,10 @@ export class EntryEndpoint extends Endpoint {
3737
/**
3838
* Fetches meta data such as links from the server.
3939
* @param signal Used to cancel the request.
40-
* @throws {@link AuthenticationError}: {@link HttpStatusCode.Unauthorized}
41-
* @throws {@link AuthorizationError}: {@link HttpStatusCode.Forbidden}
42-
* @throws {@link NotFoundError}: {@link HttpStatusCode.NotFound} or {@link HttpStatusCode.Gone}
43-
* @throws {@link HttpError}: Other non-success status code
40+
* @throws {@link errors!AuthenticationError}: {@link http!HttpStatusCode.Unauthorized}
41+
* @throws {@link errors!AuthorizationError}: {@link http!HttpStatusCode.Forbidden}
42+
* @throws {@link errors!NotFoundError}: {@link http!HttpStatusCode.NotFound} or {@link http!HttpStatusCode.Gone}
43+
* @throws {@link errors!HttpError}: Other non-success status code
4444
*/
4545
async readMeta(signal?: AbortSignal) {
4646
await this.send(HttpMethod.Get, signal);

endpoints/generic/ETagEndpointBase.ts

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ export class ETagEndpointBase extends Endpoint implements CachingEndpoint {
1616
}
1717

1818
/**
19-
* @inheritdoc
19+
* @inheritDoc
2020
*/
2121
public responseCache?: ResponseCache;
2222

2323
/**
24-
* Performs an {@link HttpMethod.Put} request on the {@link uri} and caches the response if the server sends an {@link HttpHeader.ETag}.
24+
* Performs an {@link http!HttpMethod.Put} request on the {@link uri} and caches the response if the server sends an {@link http!HttpHeader.ETag}.
2525
* @param signal Used to cancel the request.
26-
* @throws {@link BadRequestError}: {@link HttpStatusCode.BadRequest}
27-
* @throws {@link AuthenticationError}: {@link HttpStatusCode.Unauthorized}
28-
* @throws {@link AuthorizationError}: {@link HttpStatusCode.Forbidden}
29-
* @throws {@link NotFoundError}: {@link HttpStatusCode.NotFound} or {@link HttpStatusCode.Gone}
30-
* @throws {@link HttpError}: Other non-success status code
26+
* @throws {@link errors!BadRequestError}: {@link http!HttpStatusCode.BadRequest}
27+
* @throws {@link errors!AuthenticationError}: {@link http!HttpStatusCode.Unauthorized}
28+
* @throws {@link errors!AuthorizationError}: {@link http!HttpStatusCode.Forbidden}
29+
* @throws {@link errors!NotFoundError}: {@link http!HttpStatusCode.NotFound} or {@link http!HttpStatusCode.Gone}
30+
* @throws {@link errors!HttpError}: Other non-success status code
3131
*/
3232
protected async getContent(signal?: AbortSignal): Promise<string> {
3333
const headers = new Headers();
@@ -43,14 +43,14 @@ export class ETagEndpointBase extends Endpoint implements CachingEndpoint {
4343
}
4444

4545
/**
46-
* Performs an {@link HttpMethod.Put} request on the {@link uri}. Sets {@link HttpHeader.IfMatch} if there is a cached {@link HttpHeader.ETag} to detect lost updates.
46+
* Performs an {@link http!HttpMethod.Put} request on the {@link uri}. Sets {@link http!HttpHeader.IfMatch} if there is a cached {@link http!HttpHeader.ETag} to detect lost updates.
4747
* @param signal Used to cancel the request.
48-
* @throws {@link ConcurrencyError}: The entity has changed since it was last retrieved with {@link getContent}. Your changes were rejected to prevent a lost update.
49-
* @throws {@link BadRequestError}: {@link HttpStatusCode.BadRequest}
50-
* @throws {@link AuthenticationError}: {@link HttpStatusCode.Unauthorized}
51-
* @throws {@link AuthorizationError}: {@link HttpStatusCode.Forbidden}
52-
* @throws {@link NotFoundError}: {@link HttpStatusCode.NotFound} or {@link HttpStatusCode.Gone}
53-
* @throws {@link HttpError}: Other non-success status code
48+
* @throws {@link errors!ConcurrencyError}: The entity has changed since it was last retrieved with {@link getContent}. Your changes were rejected to prevent a lost update.
49+
* @throws {@link errors!BadRequestError}: {@link http!HttpStatusCode.BadRequest}
50+
* @throws {@link errors!AuthenticationError}: {@link http!HttpStatusCode.Unauthorized}
51+
* @throws {@link errors!AuthorizationError}: {@link http!HttpStatusCode.Forbidden}
52+
* @throws {@link errors!NotFoundError}: {@link http!HttpStatusCode.NotFound} or {@link http!HttpStatusCode.Gone}
53+
* @throws {@link errors!HttpError}: Other non-success status code
5454
*/
5555
protected async putContent(content: any, signal?: AbortSignal): Promise<Response> {
5656
const headers = new Headers();
@@ -62,14 +62,14 @@ export class ETagEndpointBase extends Endpoint implements CachingEndpoint {
6262
}
6363

6464
/**
65-
* Performs an {@link HttpMethod.Delete} request on the {@link uri}. Sets {@link HttpHeader.IfMatch} if there is a cached {@link HttpHeader.ETag} to detect lost updates.
65+
* Performs an {@link http!HttpMethod.Delete} request on the {@link uri}. Sets {@link http!HttpHeader.IfMatch} if there is a cached {@link http!HttpHeader.ETag} to detect lost updates.
6666
* @param signal Used to cancel the request.
67-
* @throws {@link ConcurrencyError}: The entity has changed since it was last retrieved with {@link getContent}. Your changes were rejected to prevent a lost update.
68-
* @throws {@link BadRequestError}: {@link HttpStatusCode.BadRequest}
69-
* @throws {@link AuthenticationError}: {@link HttpStatusCode.Unauthorized}
70-
* @throws {@link AuthorizationError}: {@link HttpStatusCode.Forbidden}
71-
* @throws {@link NotFoundError}: {@link HttpStatusCode.NotFound} or {@link HttpStatusCode.Gone}
72-
* @throws {@link HttpError}: Other non-success status code
67+
* @throws {@link errors!ConcurrencyError}: The entity has changed since it was last retrieved with {@link getContent}. Your changes were rejected to prevent a lost update.
68+
* @throws {@link errors!BadRequestError}: {@link http!HttpStatusCode.BadRequest}
69+
* @throws {@link errors!AuthenticationError}: {@link http!HttpStatusCode.Unauthorized}
70+
* @throws {@link errors!AuthorizationError}: {@link http!HttpStatusCode.Forbidden}
71+
* @throws {@link errors!NotFoundError}: {@link http!HttpStatusCode.NotFound} or {@link http!HttpStatusCode.Gone}
72+
* @throws {@link errors!HttpError}: Other non-success status code
7373
*/
7474
protected async deleteContent(signal?: AbortSignal): Promise<Response> {
7575
const headers = new Headers();

endpoints/generic/ElementEndpoint.ts

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ export class ElementEndpoint<TEntity> extends ETagEndpointBase {
2929
/**
3030
* Returns the `TEntity`.
3131
* @param signal Used to cancel the request.
32-
* @throws {@link AuthenticationError}: {@link HttpStatusCode.Unauthorized}
33-
* @throws {@link AuthorizationError}: {@link HttpStatusCode.Forbidden}
34-
* @throws {@link NotFoundError}: {@link HttpStatusCode.NotFound} or {@link HttpStatusCode.Gone}
35-
* @throws {@link HttpError}: Other non-success status code
32+
* @throws {@link errors!AuthenticationError}: {@link http!HttpStatusCode.Unauthorized}
33+
* @throws {@link errors!AuthorizationError}: {@link http!HttpStatusCode.Forbidden}
34+
* @throws {@link errors!NotFoundError}: {@link http!HttpStatusCode.NotFound} or {@link http!HttpStatusCode.Gone}
35+
* @throws {@link errors!HttpError}: Other non-success status code
3636
*/
3737
async read(signal?: AbortSignal) {
3838
return this.serializer.deserialize<TEntity>(await this.getContent(signal));
@@ -41,9 +41,9 @@ export class ElementEndpoint<TEntity> extends ETagEndpointBase {
4141
/**
4242
* Determines whether the element currently exists.
4343
* @param signal Used to cancel the request.
44-
* @throws {@link AuthenticationError}: {@link HttpStatusCode.Unauthorized}
45-
* @throws {@link AuthorizationError}: {@link HttpStatusCode.Forbidden}
46-
* @throws {@link HttpError}: Other non-success status code
44+
* @throws {@link errors!AuthenticationError}: {@link http!HttpStatusCode.Unauthorized}
45+
* @throws {@link errors!AuthorizationError}: {@link http!HttpStatusCode.Forbidden}
46+
* @throws {@link errors!HttpError}: Other non-success status code
4747
*/
4848
async exists(signal?: AbortSignal) {
4949
const response = await this.httpClient.send(this.uri, HttpMethod.Head, signal);
@@ -66,12 +66,12 @@ export class ElementEndpoint<TEntity> extends ETagEndpointBase {
6666
* @param entity The new `TEntity`.
6767
* @param signal Used to cancel the request.
6868
* @returns The `TEntity` as returned by the server, possibly with additional fields set. undefined if the server does not respond with a result entity.
69-
* @throws {@link ConcurrencyError}: The entity has changed since it was last retrieved with {@link read}. Your changes were rejected to prevent a lost update.
70-
* @throws {@link BadRequestError}: {@link HttpStatusCode.BadRequest}
71-
* @throws {@link AuthenticationError}: {@link HttpStatusCode.Unauthorized}
72-
* @throws {@link AuthorizationError}: {@link HttpStatusCode.Forbidden}
73-
* @throws {@link NotFoundError}: {@link HttpStatusCode.NotFound} or {@link HttpStatusCode.Gone}
74-
* @throws {@link HttpError}: Other non-success status code
69+
* @throws {@link errors!ConcurrencyError}: The entity has changed since it was last retrieved with {@link read}. Your changes were rejected to prevent a lost update.
70+
* @throws {@link errors!BadRequestError}: {@link http!HttpStatusCode.BadRequest}
71+
* @throws {@link errors!AuthenticationError}: {@link http!HttpStatusCode.Unauthorized}
72+
* @throws {@link errors!AuthorizationError}: {@link http!HttpStatusCode.Forbidden}
73+
* @throws {@link errors!NotFoundError}: {@link http!HttpStatusCode.NotFound} or {@link http!HttpStatusCode.Gone}
74+
* @throws {@link errors!HttpError}: Other non-success status code
7575
*/
7676
async set(entity: TEntity, signal?: AbortSignal): Promise<(TEntity | undefined)> {
7777
const response = await this.putContent(entity, signal);
@@ -93,12 +93,12 @@ export class ElementEndpoint<TEntity> extends ETagEndpointBase {
9393
* @param entity The `TEntity` data to merge with the existing element.
9494
* @param signal Used to cancel the request.
9595
* @returns The `TEntity` as returned by the server, possibly with additional fields set. undefined if the server does not respond with a result entity.
96-
* @throws {@link ConcurrencyError}: The entity has changed since it was last retrieved with {@link read}. Your changes were rejected to prevent a lost update.
97-
* @throws {@link BadRequestError}: {@link HttpStatusCode.BadRequest}
98-
* @throws {@link AuthenticationError}: {@link HttpStatusCode.Unauthorized}
99-
* @throws {@link AuthorizationError}: {@link HttpStatusCode.Forbidden}
100-
* @throws {@link NotFoundError}: {@link HttpStatusCode.NotFound} or {@link HttpStatusCode.Gone}
101-
* @throws {@link HttpError}: Other non-success status code
96+
* @throws {@link errors!ConcurrencyError}: The entity has changed since it was last retrieved with {@link read}. Your changes were rejected to prevent a lost update.
97+
* @throws {@link errors!BadRequestError}: {@link http!HttpStatusCode.BadRequest}
98+
* @throws {@link errors!AuthenticationError}: {@link http!HttpStatusCode.Unauthorized}
99+
* @throws {@link errors!AuthorizationError}: {@link http!HttpStatusCode.Forbidden}
100+
* @throws {@link errors!NotFoundError}: {@link http!HttpStatusCode.NotFound} or {@link http!HttpStatusCode.Gone}
101+
* @throws {@link errors!HttpError}: Other non-success status code
102102
*/
103103
async merge(entity: TEntity, signal?: AbortSignal): Promise<(TEntity | undefined)> {
104104
this.responseCache = undefined;
@@ -118,12 +118,12 @@ export class ElementEndpoint<TEntity> extends ETagEndpointBase {
118118
* @param maxRetries The maximum number of retries to perform for optimistic concurrency before giving up.
119119
* @param signal Used to cancel the request.
120120
* @returns The `TEntity` as returned by the server, possibly with additional fields set. undefined if the server does not respond with a result entity.
121-
* @throws {@link ConcurrencyError}: The maximum number of retries to perform for optimistic concurrency before giving up.
122-
* @throws {@link BadRequestError}: {@link HttpStatusCode.BadRequest}
123-
* @throws {@link AuthenticationError}: {@link HttpStatusCode.Unauthorized}
124-
* @throws {@link AuthorizationError}: {@link HttpStatusCode.Forbidden}
125-
* @throws {@link NotFoundError}: {@link HttpStatusCode.NotFound} or {@link HttpStatusCode.Gone}
126-
* @throws {@link HttpError}: Other non-success status code
121+
* @throws {@link errors!ConcurrencyError}: The maximum number of retries to perform for optimistic concurrency before giving up.
122+
* @throws {@link errors!BadRequestError}: {@link http!HttpStatusCode.BadRequest}
123+
* @throws {@link errors!AuthenticationError}: {@link http!HttpStatusCode.Unauthorized}
124+
* @throws {@link errors!AuthorizationError}: {@link http!HttpStatusCode.Forbidden}
125+
* @throws {@link errors!NotFoundError}: {@link http!HttpStatusCode.NotFound} or {@link http!HttpStatusCode.Gone}
126+
* @throws {@link errors!HttpError}: Other non-success status code
127127
*/
128128
async update(updateAction: (entity: TEntity) => void, maxRetries: number = 3, signal?: AbortSignal): Promise<(TEntity | undefined)> {
129129
let retryCounter = 0;
@@ -149,11 +149,11 @@ export class ElementEndpoint<TEntity> extends ETagEndpointBase {
149149
/**
150150
* Deletes the element.
151151
* @param signal Used to cancel the request.
152-
* @throws {@link ConcurrencyError}: The entity has changed since it was last retrieved with {@link read}. Your changes were rejected to prevent a lost update.
153-
* @throws {@link AuthenticationError}: {@link HttpStatusCode.Unauthorized}
154-
* @throws {@link AuthorizationError}: {@link HttpStatusCode.Forbidden}
155-
* @throws {@link NotFoundError}: {@link HttpStatusCode.NotFound} or {@link HttpStatusCode.Gone}
156-
* @throws {@link HttpError}: Other non-success status code
152+
* @throws {@link errors!ConcurrencyError}: The entity has changed since it was last retrieved with {@link read}. Your changes were rejected to prevent a lost update.
153+
* @throws {@link errors!AuthenticationError}: {@link http!HttpStatusCode.Unauthorized}
154+
* @throws {@link errors!AuthorizationError}: {@link http!HttpStatusCode.Forbidden}
155+
* @throws {@link errors!NotFoundError}: {@link http!HttpStatusCode.NotFound} or {@link http!HttpStatusCode.Gone}
156+
* @throws {@link errors!HttpError}: Other non-success status code
157157
*/
158158
async delete(signal?: AbortSignal) {
159159
await this.deleteContent(signal);

0 commit comments

Comments
 (0)