@twin.org/api-models 0.0.3-next.3 → 0.0.3-next.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/es/errors/forbiddenError.js +23 -0
- package/dist/es/errors/forbiddenError.js.map +1 -0
- package/dist/es/errors/tooManyRequestsError.js +25 -0
- package/dist/es/errors/tooManyRequestsError.js.map +1 -0
- package/dist/es/helpers/httpErrorHelper.js +34 -20
- package/dist/es/helpers/httpErrorHelper.js.map +1 -1
- package/dist/es/helpers/httpUrlHelper.js +105 -0
- package/dist/es/helpers/httpUrlHelper.js.map +1 -0
- package/dist/es/index.js +13 -4
- package/dist/es/index.js.map +1 -1
- package/dist/es/models/api/IServerHealthResponse.js.map +1 -1
- package/dist/es/models/api/IServerLivezResponse.js +2 -0
- package/dist/es/models/api/IServerLivezResponse.js.map +1 -0
- package/dist/es/models/api/IServerReadyzResponse.js +2 -0
- package/dist/es/models/api/IServerReadyzResponse.js.map +1 -0
- package/dist/es/models/api/IServerRootResponse.js +0 -2
- package/dist/es/models/api/IServerRootResponse.js.map +1 -1
- package/dist/es/models/config/IBaseRestClientConfig.js.map +1 -1
- package/dist/es/models/httpContextIdKeys.js +21 -0
- package/dist/es/models/httpContextIdKeys.js.map +1 -0
- package/dist/es/models/protocol/IHttpRequestContext.js.map +1 -1
- package/dist/es/models/protocol/IHttpRequestPathParams.js.map +1 -1
- package/dist/es/models/protocol/IHttpRequestQuery.js.map +1 -1
- package/dist/es/models/protocol/IHttpServerRequest.js.map +1 -1
- package/dist/es/models/responses/errors/IConflictResponse.js.map +1 -1
- package/dist/es/models/responses/errors/INotImplementedResponse.js +2 -0
- package/dist/es/models/responses/errors/INotImplementedResponse.js.map +1 -0
- package/dist/es/models/responses/errors/ITooManyRequestsResponse.js +2 -0
- package/dist/es/models/responses/errors/ITooManyRequestsResponse.js.map +1 -0
- package/dist/es/models/routes/IBaseRoute.js.map +1 -1
- package/dist/es/models/server/IBaseRouteProcessor.js.map +1 -1
- package/dist/es/models/server/IRestRouteProcessor.js.map +1 -1
- package/dist/es/models/server/ISocketRouteProcessor.js.map +1 -1
- package/dist/es/models/server/IWebServer.js.map +1 -1
- package/dist/es/models/services/IHealthComponent.js +2 -0
- package/dist/es/models/services/IHealthComponent.js.map +1 -0
- package/dist/es/models/services/IHostingComponent.js +2 -0
- package/dist/es/models/services/IHostingComponent.js.map +1 -0
- package/dist/es/models/services/IInformationComponent.js.map +1 -1
- package/dist/es/models/services/ITenant.js +4 -0
- package/dist/es/models/services/ITenant.js.map +1 -0
- package/dist/es/models/services/ITenantAdminComponent.js +2 -0
- package/dist/es/models/services/ITenantAdminComponent.js.map +1 -0
- package/dist/es/models/services/IUrlTransformerComponent.js +2 -0
- package/dist/es/models/services/IUrlTransformerComponent.js.map +1 -0
- package/dist/types/errors/forbiddenError.d.ts +20 -0
- package/dist/types/errors/tooManyRequestsError.d.ts +22 -0
- package/dist/types/helpers/httpErrorHelper.d.ts +6 -0
- package/dist/types/helpers/httpUrlHelper.d.ts +55 -0
- package/dist/types/index.d.ts +13 -4
- package/dist/types/models/api/IServerHealthResponse.d.ts +6 -3
- package/dist/types/models/api/IServerLivezResponse.d.ts +16 -0
- package/dist/types/models/api/IServerReadyzResponse.d.ts +16 -0
- package/dist/types/models/api/IServerRootResponse.d.ts +7 -0
- package/dist/types/models/config/IBaseRestClientConfig.d.ts +16 -0
- package/dist/types/models/httpContextIdKeys.d.ts +21 -0
- package/dist/types/models/protocol/IHttpRequestContext.d.ts +4 -0
- package/dist/types/models/protocol/IHttpRequestPathParams.d.ts +1 -1
- package/dist/types/models/protocol/IHttpRequestQuery.d.ts +1 -1
- package/dist/types/models/protocol/IHttpServerRequest.d.ts +4 -4
- package/dist/types/models/responses/errors/IConflictResponse.d.ts +1 -6
- package/dist/types/models/responses/errors/INotImplementedResponse.d.ts +15 -0
- package/dist/types/models/responses/errors/ITooManyRequestsResponse.d.ts +15 -0
- package/dist/types/models/routes/IBaseRoute.d.ts +9 -1
- package/dist/types/models/server/IBaseRouteProcessor.d.ts +14 -4
- package/dist/types/models/server/IRestRouteProcessor.d.ts +7 -2
- package/dist/types/models/server/IWebServer.d.ts +7 -1
- package/dist/types/models/services/IHealthComponent.d.ts +14 -0
- package/dist/types/models/services/IHostingComponent.d.ts +24 -0
- package/dist/types/models/services/IInformationComponent.d.ts +10 -17
- package/dist/types/models/services/ITenant.d.ts +33 -0
- package/dist/types/models/services/ITenantAdminComponent.d.ts +63 -0
- package/dist/types/models/services/IUrlTransformerComponent.d.ts +66 -0
- package/docs/changelog.md +285 -58
- package/docs/examples.md +200 -1
- package/docs/reference/classes/ForbiddenError.md +55 -0
- package/docs/reference/classes/HttpErrorHelper.md +14 -2
- package/docs/reference/classes/HttpParameterHelper.md +4 -4
- package/docs/reference/classes/HttpUrlHelper.md +197 -0
- package/docs/reference/classes/TooManyRequestsError.md +67 -0
- package/docs/reference/index.md +14 -5
- package/docs/reference/interfaces/IAcceptedResponse.md +2 -2
- package/docs/reference/interfaces/IBadRequestResponse.md +2 -2
- package/docs/reference/interfaces/IBaseRestClientConfig.md +57 -9
- package/docs/reference/interfaces/IBaseRoute.md +25 -9
- package/docs/reference/interfaces/IBaseRouteEntryPoint.md +4 -4
- package/docs/reference/interfaces/IBaseRouteProcessor.md +33 -13
- package/docs/reference/interfaces/IBaseSocketClientConfig.md +7 -7
- package/docs/reference/interfaces/IConflictResponse.md +3 -11
- package/docs/reference/interfaces/ICreatedResponse.md +2 -2
- package/docs/reference/interfaces/IForbiddenResponse.md +2 -2
- package/docs/reference/interfaces/IHealthComponent.md +21 -0
- package/docs/reference/interfaces/IHostingComponent.md +73 -0
- package/docs/reference/interfaces/IHttpRequest.md +8 -8
- package/docs/reference/interfaces/IHttpRequestContext.md +12 -4
- package/docs/reference/interfaces/IHttpRequestPathParams.md +1 -1
- package/docs/reference/interfaces/IHttpRequestQuery.md +1 -1
- package/docs/reference/interfaces/IHttpResponse.md +6 -6
- package/docs/reference/interfaces/IHttpServerRequest.md +14 -14
- package/docs/reference/interfaces/IInformationComponent.md +14 -56
- package/docs/reference/interfaces/IInternalServerErrorResponse.md +2 -2
- package/docs/reference/interfaces/IMimeTypeProcessor.md +2 -2
- package/docs/reference/interfaces/INoContentRequest.md +8 -8
- package/docs/reference/interfaces/INoContentResponse.md +1 -1
- package/docs/reference/interfaces/INotFoundResponse.md +3 -3
- package/docs/reference/interfaces/INotImplementedResponse.md +19 -0
- package/docs/reference/interfaces/IOkResponse.md +1 -1
- package/docs/reference/interfaces/IRestRoute.md +47 -23
- package/docs/reference/interfaces/IRestRouteExample.md +3 -3
- package/docs/reference/interfaces/IRestRouteProcessor.md +49 -19
- package/docs/reference/interfaces/IRestRouteRequestExample.md +4 -4
- package/docs/reference/interfaces/IRestRouteResponseAttachmentOptions.md +6 -6
- package/docs/reference/interfaces/IRestRouteResponseExample.md +4 -4
- package/docs/reference/interfaces/IRestRouteResponseOptions.md +2 -2
- package/docs/reference/interfaces/IServerFavIconResponse.md +7 -7
- package/docs/reference/interfaces/IServerHealthResponse.md +11 -3
- package/docs/reference/interfaces/IServerInfo.md +2 -2
- package/docs/reference/interfaces/IServerInfoResponse.md +1 -1
- package/docs/reference/interfaces/IServerLivezResponse.md +23 -0
- package/docs/reference/interfaces/IServerReadyzResponse.md +23 -0
- package/docs/reference/interfaces/IServerRootResponse.md +13 -1
- package/docs/reference/interfaces/IServerSpecResponse.md +4 -4
- package/docs/reference/interfaces/ISocketRequestContext.md +17 -5
- package/docs/reference/interfaces/ISocketRoute.md +38 -14
- package/docs/reference/interfaces/ISocketRouteProcessor.md +42 -22
- package/docs/reference/interfaces/ISocketServerRequest.md +17 -17
- package/docs/reference/interfaces/ITag.md +2 -2
- package/docs/reference/interfaces/ITenant.md +59 -0
- package/docs/reference/interfaces/ITenantAdminComponent.md +193 -0
- package/docs/reference/interfaces/ITooManyRequestsResponse.md +19 -0
- package/docs/reference/interfaces/IUnauthorizedResponse.md +2 -2
- package/docs/reference/interfaces/IUnprocessableEntityResponse.md +2 -2
- package/docs/reference/interfaces/IUrlTransformerComponent.md +229 -0
- package/docs/reference/interfaces/IWebServer.md +34 -4
- package/docs/reference/interfaces/IWebServerOptions.md +12 -12
- package/docs/reference/type-aliases/HttpContextIdKeys.md +5 -0
- package/docs/reference/variables/HttpContextIdKeys.md +25 -0
- package/package.json +2 -2
- package/dist/es/factories/authenticationGeneratorFactory.js +0 -9
- package/dist/es/factories/authenticationGeneratorFactory.js.map +0 -1
- package/dist/es/models/client/IAuthenticationGenerator.js +0 -2
- package/dist/es/models/client/IAuthenticationGenerator.js.map +0 -1
- package/dist/es/models/services/IHealthInfo.js +0 -2
- package/dist/es/models/services/IHealthInfo.js.map +0 -1
- package/dist/es/models/services/healthStatus.js +0 -21
- package/dist/es/models/services/healthStatus.js.map +0 -1
- package/dist/types/factories/authenticationGeneratorFactory.d.ts +0 -6
- package/dist/types/models/client/IAuthenticationGenerator.d.ts +0 -14
- package/dist/types/models/services/IHealthInfo.d.ts +0 -27
- package/dist/types/models/services/healthStatus.d.ts +0 -21
- package/docs/reference/interfaces/IAuthenticationGenerator.md +0 -35
- package/docs/reference/interfaces/IHealthInfo.md +0 -37
- package/docs/reference/type-aliases/HealthStatus.md +0 -5
- package/docs/reference/variables/AuthenticationGeneratorFactory.md +0 -5
- package/docs/reference/variables/HealthStatus.md +0 -25
|
@@ -8,7 +8,7 @@ The information component for the server.
|
|
|
8
8
|
|
|
9
9
|
## Methods
|
|
10
10
|
|
|
11
|
-
### root()
|
|
11
|
+
### root() {#root}
|
|
12
12
|
|
|
13
13
|
> **root**(): `Promise`\<`string`\>
|
|
14
14
|
|
|
@@ -22,7 +22,7 @@ The root information.
|
|
|
22
22
|
|
|
23
23
|
***
|
|
24
24
|
|
|
25
|
-
### info()
|
|
25
|
+
### info() {#info}
|
|
26
26
|
|
|
27
27
|
> **info**(): `Promise`\<[`IServerInfo`](IServerInfo.md)\>
|
|
28
28
|
|
|
@@ -36,7 +36,7 @@ The service information.
|
|
|
36
36
|
|
|
37
37
|
***
|
|
38
38
|
|
|
39
|
-
### favicon()
|
|
39
|
+
### favicon() {#favicon}
|
|
40
40
|
|
|
41
41
|
> **favicon**(): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\> \| `undefined`\>
|
|
42
42
|
|
|
@@ -50,7 +50,7 @@ The favicon.
|
|
|
50
50
|
|
|
51
51
|
***
|
|
52
52
|
|
|
53
|
-
### spec()
|
|
53
|
+
### spec() {#spec}
|
|
54
54
|
|
|
55
55
|
> **spec**(): `Promise`\<`unknown`\>
|
|
56
56
|
|
|
@@ -64,70 +64,28 @@ The OpenAPI spec.
|
|
|
64
64
|
|
|
65
65
|
***
|
|
66
66
|
|
|
67
|
-
###
|
|
67
|
+
### livez() {#livez}
|
|
68
68
|
|
|
69
|
-
> **
|
|
69
|
+
> **livez**(): `Promise`\<\{ `status`: `"alive"` \| `"dead"`; \}\>
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
Is the server live.
|
|
72
72
|
|
|
73
73
|
#### Returns
|
|
74
74
|
|
|
75
|
-
`Promise
|
|
75
|
+
`Promise`\<\{ `status`: `"alive"` \| `"dead"`; \}\>
|
|
76
76
|
|
|
77
|
-
The
|
|
77
|
+
The livez status of the server.
|
|
78
78
|
|
|
79
79
|
***
|
|
80
80
|
|
|
81
|
-
###
|
|
81
|
+
### readyz() {#readyz}
|
|
82
82
|
|
|
83
|
-
> **
|
|
83
|
+
> **readyz**(): `Promise`\<\{ `status`: `"ready"` \| `"not ready"`; \}\>
|
|
84
84
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
#### Parameters
|
|
88
|
-
|
|
89
|
-
##### name
|
|
90
|
-
|
|
91
|
-
`string`
|
|
92
|
-
|
|
93
|
-
The component name.
|
|
94
|
-
|
|
95
|
-
##### status
|
|
96
|
-
|
|
97
|
-
[`HealthStatus`](../type-aliases/HealthStatus.md)
|
|
98
|
-
|
|
99
|
-
The status of the component.
|
|
100
|
-
|
|
101
|
-
##### details?
|
|
102
|
-
|
|
103
|
-
`string`
|
|
104
|
-
|
|
105
|
-
The details for the status.
|
|
106
|
-
|
|
107
|
-
#### Returns
|
|
108
|
-
|
|
109
|
-
`Promise`\<`void`\>
|
|
110
|
-
|
|
111
|
-
Nothing.
|
|
112
|
-
|
|
113
|
-
***
|
|
114
|
-
|
|
115
|
-
### removeComponentHealth()
|
|
116
|
-
|
|
117
|
-
> **removeComponentHealth**(`name`): `Promise`\<`void`\>
|
|
118
|
-
|
|
119
|
-
Remove the status of a component.
|
|
120
|
-
|
|
121
|
-
#### Parameters
|
|
122
|
-
|
|
123
|
-
##### name
|
|
124
|
-
|
|
125
|
-
`string`
|
|
126
|
-
|
|
127
|
-
The component name.
|
|
85
|
+
Is the server ready.
|
|
128
86
|
|
|
129
87
|
#### Returns
|
|
130
88
|
|
|
131
|
-
`Promise
|
|
89
|
+
`Promise`\<\{ `status`: `"ready"` \| `"not ready"`; \}\>
|
|
132
90
|
|
|
133
|
-
|
|
91
|
+
The readyz status of the server.
|
|
@@ -4,7 +4,7 @@ The server has encountered a situation it does not know how to handle, see the c
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
### statusCode
|
|
7
|
+
### statusCode {#statuscode}
|
|
8
8
|
|
|
9
9
|
> **statusCode**: `500`
|
|
10
10
|
|
|
@@ -12,7 +12,7 @@ Response status code.
|
|
|
12
12
|
|
|
13
13
|
***
|
|
14
14
|
|
|
15
|
-
### body
|
|
15
|
+
### body {#body}
|
|
16
16
|
|
|
17
17
|
> **body**: `IError`
|
|
18
18
|
|
|
@@ -8,7 +8,7 @@ The definition for a handler for a specific MIME type.
|
|
|
8
8
|
|
|
9
9
|
## Methods
|
|
10
10
|
|
|
11
|
-
### getTypes()
|
|
11
|
+
### getTypes() {#gettypes}
|
|
12
12
|
|
|
13
13
|
> **getTypes**(): `string`[]
|
|
14
14
|
|
|
@@ -22,7 +22,7 @@ The MIME types that this handler can handle.
|
|
|
22
22
|
|
|
23
23
|
***
|
|
24
24
|
|
|
25
|
-
### handle()
|
|
25
|
+
### handle() {#handle}
|
|
26
26
|
|
|
27
27
|
> **handle**(`body`): `Promise`\<`unknown`\>
|
|
28
28
|
|
|
@@ -8,9 +8,9 @@ A REST request with no input parameters.
|
|
|
8
8
|
|
|
9
9
|
## Properties
|
|
10
10
|
|
|
11
|
-
### headers?
|
|
11
|
+
### headers? {#headers}
|
|
12
12
|
|
|
13
|
-
> `optional` **headers
|
|
13
|
+
> `optional` **headers?**: `undefined`
|
|
14
14
|
|
|
15
15
|
Incoming Http Headers.
|
|
16
16
|
|
|
@@ -20,9 +20,9 @@ Incoming Http Headers.
|
|
|
20
20
|
|
|
21
21
|
***
|
|
22
22
|
|
|
23
|
-
### pathParams?
|
|
23
|
+
### pathParams? {#pathparams}
|
|
24
24
|
|
|
25
|
-
> `optional` **pathParams
|
|
25
|
+
> `optional` **pathParams?**: `undefined`
|
|
26
26
|
|
|
27
27
|
The path parameters.
|
|
28
28
|
|
|
@@ -32,9 +32,9 @@ The path parameters.
|
|
|
32
32
|
|
|
33
33
|
***
|
|
34
34
|
|
|
35
|
-
### query?
|
|
35
|
+
### query? {#query}
|
|
36
36
|
|
|
37
|
-
> `optional` **query
|
|
37
|
+
> `optional` **query?**: `undefined`
|
|
38
38
|
|
|
39
39
|
The query parameters.
|
|
40
40
|
|
|
@@ -44,9 +44,9 @@ The query parameters.
|
|
|
44
44
|
|
|
45
45
|
***
|
|
46
46
|
|
|
47
|
-
### body?
|
|
47
|
+
### body? {#body}
|
|
48
48
|
|
|
49
|
-
> `optional` **body
|
|
49
|
+
> `optional` **body?**: `undefined`
|
|
50
50
|
|
|
51
51
|
Data to return send as the body.
|
|
52
52
|
|
|
@@ -4,7 +4,7 @@ The resource you tried to access does not exist, see the content for more detail
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
### statusCode
|
|
7
|
+
### statusCode {#statuscode}
|
|
8
8
|
|
|
9
9
|
> **statusCode**: `404`
|
|
10
10
|
|
|
@@ -12,7 +12,7 @@ Response status code.
|
|
|
12
12
|
|
|
13
13
|
***
|
|
14
14
|
|
|
15
|
-
### body
|
|
15
|
+
### body {#body}
|
|
16
16
|
|
|
17
17
|
> **body**: `IError` & `object`
|
|
18
18
|
|
|
@@ -22,6 +22,6 @@ The body which contains the error.
|
|
|
22
22
|
|
|
23
23
|
##### notFoundId?
|
|
24
24
|
|
|
25
|
-
> `optional` **notFoundId
|
|
25
|
+
> `optional` **notFoundId?**: `string`
|
|
26
26
|
|
|
27
27
|
The id if the item that was not found.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Interface: INotImplementedResponse
|
|
2
|
+
|
|
3
|
+
The operation that you tried to perform is not implemented, see the content for more details.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### statusCode {#statuscode}
|
|
8
|
+
|
|
9
|
+
> **statusCode**: `501`
|
|
10
|
+
|
|
11
|
+
Response status code.
|
|
12
|
+
|
|
13
|
+
***
|
|
14
|
+
|
|
15
|
+
### body {#body}
|
|
16
|
+
|
|
17
|
+
> **body**: `IError`
|
|
18
|
+
|
|
19
|
+
The body which contains the error.
|
|
@@ -18,7 +18,7 @@ Interface which defines a REST route.
|
|
|
18
18
|
|
|
19
19
|
## Properties
|
|
20
20
|
|
|
21
|
-
### operationId
|
|
21
|
+
### operationId {#operationid}
|
|
22
22
|
|
|
23
23
|
> **operationId**: `string`
|
|
24
24
|
|
|
@@ -30,7 +30,7 @@ The id of the operation.
|
|
|
30
30
|
|
|
31
31
|
***
|
|
32
32
|
|
|
33
|
-
### path
|
|
33
|
+
### path {#path}
|
|
34
34
|
|
|
35
35
|
> **path**: `string`
|
|
36
36
|
|
|
@@ -42,11 +42,11 @@ The path to use for routing.
|
|
|
42
42
|
|
|
43
43
|
***
|
|
44
44
|
|
|
45
|
-
### skipAuth?
|
|
45
|
+
### skipAuth? {#skipauth}
|
|
46
46
|
|
|
47
|
-
> `optional` **skipAuth
|
|
47
|
+
> `optional` **skipAuth?**: `boolean`
|
|
48
48
|
|
|
49
|
-
Skips the authentication for this route.
|
|
49
|
+
Skips the authentication requirement for this route.
|
|
50
50
|
|
|
51
51
|
#### Inherited from
|
|
52
52
|
|
|
@@ -54,9 +54,33 @@ Skips the authentication for this route.
|
|
|
54
54
|
|
|
55
55
|
***
|
|
56
56
|
|
|
57
|
-
###
|
|
57
|
+
### skipTenant? {#skiptenant}
|
|
58
58
|
|
|
59
|
-
> `optional` **
|
|
59
|
+
> `optional` **skipTenant?**: `boolean`
|
|
60
|
+
|
|
61
|
+
Skips the tenant requirement for this route.
|
|
62
|
+
|
|
63
|
+
#### Inherited from
|
|
64
|
+
|
|
65
|
+
[`IBaseRoute`](IBaseRoute.md).[`skipTenant`](IBaseRoute.md#skiptenant)
|
|
66
|
+
|
|
67
|
+
***
|
|
68
|
+
|
|
69
|
+
### requiredScope? {#requiredscope}
|
|
70
|
+
|
|
71
|
+
> `optional` **requiredScope?**: `string`[]
|
|
72
|
+
|
|
73
|
+
The user must have one of the specified scopes to access the route.
|
|
74
|
+
|
|
75
|
+
#### Inherited from
|
|
76
|
+
|
|
77
|
+
[`IBaseRoute`](IBaseRoute.md).[`requiredScope`](IBaseRoute.md#requiredscope)
|
|
78
|
+
|
|
79
|
+
***
|
|
80
|
+
|
|
81
|
+
### processorFeatures? {#processorfeatures}
|
|
82
|
+
|
|
83
|
+
> `optional` **processorFeatures?**: `string`[]
|
|
60
84
|
|
|
61
85
|
The features supported by additional processors to run for this route.
|
|
62
86
|
|
|
@@ -66,9 +90,9 @@ The features supported by additional processors to run for this route.
|
|
|
66
90
|
|
|
67
91
|
***
|
|
68
92
|
|
|
69
|
-
### processorData?
|
|
93
|
+
### processorData? {#processordata}
|
|
70
94
|
|
|
71
|
-
> `optional` **processorData
|
|
95
|
+
> `optional` **processorData?**: `object`
|
|
72
96
|
|
|
73
97
|
The data for additional processors to run for this route.
|
|
74
98
|
|
|
@@ -82,7 +106,7 @@ The data for additional processors to run for this route.
|
|
|
82
106
|
|
|
83
107
|
***
|
|
84
108
|
|
|
85
|
-
### summary
|
|
109
|
+
### summary {#summary}
|
|
86
110
|
|
|
87
111
|
> **summary**: `string`
|
|
88
112
|
|
|
@@ -90,7 +114,7 @@ Summary of what task the operation performs.
|
|
|
90
114
|
|
|
91
115
|
***
|
|
92
116
|
|
|
93
|
-
### tag
|
|
117
|
+
### tag {#tag}
|
|
94
118
|
|
|
95
119
|
> **tag**: `string`
|
|
96
120
|
|
|
@@ -98,7 +122,7 @@ Tag for the operation.
|
|
|
98
122
|
|
|
99
123
|
***
|
|
100
124
|
|
|
101
|
-
### method
|
|
125
|
+
### method {#method}
|
|
102
126
|
|
|
103
127
|
> **method**: `HttpMethod`
|
|
104
128
|
|
|
@@ -106,7 +130,7 @@ The http method.
|
|
|
106
130
|
|
|
107
131
|
***
|
|
108
132
|
|
|
109
|
-
### handler
|
|
133
|
+
### handler {#handler}
|
|
110
134
|
|
|
111
135
|
> **handler**: (`httpRequestContext`, `request`) => `Promise`\<`U`\>
|
|
112
136
|
|
|
@@ -132,9 +156,9 @@ The request object, combined query param, path params and body.
|
|
|
132
156
|
|
|
133
157
|
***
|
|
134
158
|
|
|
135
|
-
### requestType?
|
|
159
|
+
### requestType? {#requesttype}
|
|
136
160
|
|
|
137
|
-
> `optional` **requestType
|
|
161
|
+
> `optional` **requestType?**: `object`
|
|
138
162
|
|
|
139
163
|
The type of the request object.
|
|
140
164
|
|
|
@@ -146,21 +170,21 @@ The object type for the request.
|
|
|
146
170
|
|
|
147
171
|
#### mimeType?
|
|
148
172
|
|
|
149
|
-
> `optional` **mimeType
|
|
173
|
+
> `optional` **mimeType?**: `string`
|
|
150
174
|
|
|
151
175
|
The mime type of the request, defaults to "application/json" if there is a body.
|
|
152
176
|
|
|
153
177
|
#### examples?
|
|
154
178
|
|
|
155
|
-
> `optional` **examples
|
|
179
|
+
> `optional` **examples?**: [`IRestRouteRequestExample`](IRestRouteRequestExample.md)\<`T`\>[]
|
|
156
180
|
|
|
157
181
|
Example objects for the request.
|
|
158
182
|
|
|
159
183
|
***
|
|
160
184
|
|
|
161
|
-
### responseType?
|
|
185
|
+
### responseType? {#responsetype}
|
|
162
186
|
|
|
163
|
-
> `optional` **responseType
|
|
187
|
+
> `optional` **responseType?**: `object`[]
|
|
164
188
|
|
|
165
189
|
The type of the response object.
|
|
166
190
|
|
|
@@ -172,20 +196,20 @@ The object type of the response.
|
|
|
172
196
|
|
|
173
197
|
#### mimeType?
|
|
174
198
|
|
|
175
|
-
> `optional` **mimeType
|
|
199
|
+
> `optional` **mimeType?**: `string`
|
|
176
200
|
|
|
177
201
|
The mime type of the response, defaults to "application/json" if there is a body.
|
|
178
202
|
|
|
179
203
|
#### examples?
|
|
180
204
|
|
|
181
|
-
> `optional` **examples
|
|
205
|
+
> `optional` **examples?**: [`IRestRouteResponseExample`](IRestRouteResponseExample.md)\<`U`\>[]
|
|
182
206
|
|
|
183
207
|
Example objects of the response.
|
|
184
208
|
|
|
185
209
|
***
|
|
186
210
|
|
|
187
|
-
### excludeFromSpec?
|
|
211
|
+
### excludeFromSpec? {#excludefromspec}
|
|
188
212
|
|
|
189
|
-
> `optional` **excludeFromSpec
|
|
213
|
+
> `optional` **excludeFromSpec?**: `boolean`
|
|
190
214
|
|
|
191
215
|
Exclude the route from being included in the spec file.
|
|
@@ -9,7 +9,7 @@ Interface which defines a REST route example.
|
|
|
9
9
|
|
|
10
10
|
## Properties
|
|
11
11
|
|
|
12
|
-
### id
|
|
12
|
+
### id {#id}
|
|
13
13
|
|
|
14
14
|
> **id**: `string`
|
|
15
15
|
|
|
@@ -17,8 +17,8 @@ Example objects for the request.
|
|
|
17
17
|
|
|
18
18
|
***
|
|
19
19
|
|
|
20
|
-
### description?
|
|
20
|
+
### description? {#description}
|
|
21
21
|
|
|
22
|
-
> `optional` **description
|
|
22
|
+
> `optional` **description?**: `string`
|
|
23
23
|
|
|
24
24
|
Description of the example.
|
|
@@ -8,7 +8,7 @@ The definition for a processor for handling REST routes.
|
|
|
8
8
|
|
|
9
9
|
## Methods
|
|
10
10
|
|
|
11
|
-
### features()?
|
|
11
|
+
### features()? {#features}
|
|
12
12
|
|
|
13
13
|
> `optional` **features**(): `string`[]
|
|
14
14
|
|
|
@@ -28,9 +28,9 @@ The features supported by this processor.
|
|
|
28
28
|
|
|
29
29
|
***
|
|
30
30
|
|
|
31
|
-
### pre()?
|
|
31
|
+
### pre()? {#pre}
|
|
32
32
|
|
|
33
|
-
> `optional` **pre**(`request`, `response`, `route`, `contextIds`, `processorState`, `
|
|
33
|
+
> `optional` **pre**(`request`, `response`, `route`, `contextIds`, `processorState`, `componentTypes?`): `Promise`\<`void`\>
|
|
34
34
|
|
|
35
35
|
Pre process the REST request for the specified route.
|
|
36
36
|
|
|
@@ -50,9 +50,9 @@ The response data to send if any.
|
|
|
50
50
|
|
|
51
51
|
##### route
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
[`IRestRoute`](IRestRoute.md)\<`any`, `any`\> \| `undefined`
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
The route being requested, if a matching one was found.
|
|
56
56
|
|
|
57
57
|
##### contextIds
|
|
58
58
|
|
|
@@ -64,11 +64,21 @@ The context IDs of the request.
|
|
|
64
64
|
|
|
65
65
|
The state handed through the processors.
|
|
66
66
|
|
|
67
|
-
#####
|
|
67
|
+
##### componentTypes?
|
|
68
|
+
|
|
69
|
+
The component types for the request.
|
|
70
|
+
|
|
71
|
+
###### loggingComponentType?
|
|
72
|
+
|
|
73
|
+
`string`
|
|
74
|
+
|
|
75
|
+
The logging component type.
|
|
76
|
+
|
|
77
|
+
###### hostingComponentType?
|
|
68
78
|
|
|
69
79
|
`string`
|
|
70
80
|
|
|
71
|
-
The
|
|
81
|
+
The hosting component type.
|
|
72
82
|
|
|
73
83
|
#### Returns
|
|
74
84
|
|
|
@@ -82,9 +92,9 @@ Promise that resolves when the request is processed.
|
|
|
82
92
|
|
|
83
93
|
***
|
|
84
94
|
|
|
85
|
-
### post()?
|
|
95
|
+
### post()? {#post}
|
|
86
96
|
|
|
87
|
-
> `optional` **post**(`request`, `response`, `route`, `contextIds`, `processorState`, `
|
|
97
|
+
> `optional` **post**(`request`, `response`, `route`, `contextIds`, `processorState`, `componentTypes?`): `Promise`\<`void`\>
|
|
88
98
|
|
|
89
99
|
Post process the REST request for the specified route.
|
|
90
100
|
|
|
@@ -104,9 +114,9 @@ The response data to send if any.
|
|
|
104
114
|
|
|
105
115
|
##### route
|
|
106
116
|
|
|
107
|
-
|
|
117
|
+
[`IRestRoute`](IRestRoute.md)\<`any`, `any`\> \| `undefined`
|
|
108
118
|
|
|
109
|
-
|
|
119
|
+
The route being requested, if a matching one was found.
|
|
110
120
|
|
|
111
121
|
##### contextIds
|
|
112
122
|
|
|
@@ -118,11 +128,21 @@ The context IDs of the request.
|
|
|
118
128
|
|
|
119
129
|
The state handed through the processors.
|
|
120
130
|
|
|
121
|
-
#####
|
|
131
|
+
##### componentTypes?
|
|
132
|
+
|
|
133
|
+
The component types for the request.
|
|
134
|
+
|
|
135
|
+
###### loggingComponentType?
|
|
122
136
|
|
|
123
137
|
`string`
|
|
124
138
|
|
|
125
|
-
The logging component type
|
|
139
|
+
The logging component type.
|
|
140
|
+
|
|
141
|
+
###### hostingComponentType?
|
|
142
|
+
|
|
143
|
+
`string`
|
|
144
|
+
|
|
145
|
+
The hosting component type.
|
|
126
146
|
|
|
127
147
|
#### Returns
|
|
128
148
|
|
|
@@ -136,9 +156,9 @@ Promise that resolves when the request is processed.
|
|
|
136
156
|
|
|
137
157
|
***
|
|
138
158
|
|
|
139
|
-
### process()?
|
|
159
|
+
### process()? {#process}
|
|
140
160
|
|
|
141
|
-
> `optional` **process**(`request`, `response`, `route`, `processorState`, `
|
|
161
|
+
> `optional` **process**(`request`, `response`, `route`, `processorState`, `componentTypes?`): `Promise`\<`void`\>
|
|
142
162
|
|
|
143
163
|
Process the REST request for the specified route.
|
|
144
164
|
|
|
@@ -158,19 +178,29 @@ The response data to send if any.
|
|
|
158
178
|
|
|
159
179
|
##### route
|
|
160
180
|
|
|
161
|
-
|
|
181
|
+
[`IRestRoute`](IRestRoute.md)\<`any`, `any`\> \| `undefined`
|
|
162
182
|
|
|
163
|
-
|
|
183
|
+
The route being requested, if a matching one was found.
|
|
164
184
|
|
|
165
185
|
##### processorState
|
|
166
186
|
|
|
167
187
|
The state handed through the processors.
|
|
168
188
|
|
|
169
|
-
#####
|
|
189
|
+
##### componentTypes?
|
|
190
|
+
|
|
191
|
+
The component types for the request.
|
|
192
|
+
|
|
193
|
+
###### loggingComponentType?
|
|
194
|
+
|
|
195
|
+
`string`
|
|
196
|
+
|
|
197
|
+
The logging component type.
|
|
198
|
+
|
|
199
|
+
###### hostingComponentType?
|
|
170
200
|
|
|
171
201
|
`string`
|
|
172
202
|
|
|
173
|
-
The
|
|
203
|
+
The hosting component type.
|
|
174
204
|
|
|
175
205
|
#### Returns
|
|
176
206
|
|
|
@@ -14,7 +14,7 @@ Interface which defines a REST route request example.
|
|
|
14
14
|
|
|
15
15
|
## Properties
|
|
16
16
|
|
|
17
|
-
### id
|
|
17
|
+
### id {#id}
|
|
18
18
|
|
|
19
19
|
> **id**: `string`
|
|
20
20
|
|
|
@@ -26,9 +26,9 @@ Example objects for the request.
|
|
|
26
26
|
|
|
27
27
|
***
|
|
28
28
|
|
|
29
|
-
### description?
|
|
29
|
+
### description? {#description}
|
|
30
30
|
|
|
31
|
-
> `optional` **description
|
|
31
|
+
> `optional` **description?**: `string`
|
|
32
32
|
|
|
33
33
|
Description of the example.
|
|
34
34
|
|
|
@@ -38,7 +38,7 @@ Description of the example.
|
|
|
38
38
|
|
|
39
39
|
***
|
|
40
40
|
|
|
41
|
-
### request
|
|
41
|
+
### request {#request}
|
|
42
42
|
|
|
43
43
|
> **request**: `T`
|
|
44
44
|
|
|
@@ -4,24 +4,24 @@ Interface which defines a REST route response for attachments.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
### mimeType?
|
|
7
|
+
### mimeType? {#mimetype}
|
|
8
8
|
|
|
9
|
-
> `optional` **mimeType
|
|
9
|
+
> `optional` **mimeType?**: `string`
|
|
10
10
|
|
|
11
11
|
The content type to use in the response.
|
|
12
12
|
|
|
13
13
|
***
|
|
14
14
|
|
|
15
|
-
### filename?
|
|
15
|
+
### filename? {#filename}
|
|
16
16
|
|
|
17
|
-
> `optional` **filename
|
|
17
|
+
> `optional` **filename?**: `string`
|
|
18
18
|
|
|
19
19
|
The filename to use in content disposition.
|
|
20
20
|
|
|
21
21
|
***
|
|
22
22
|
|
|
23
|
-
### inline?
|
|
23
|
+
### inline? {#inline}
|
|
24
24
|
|
|
25
|
-
> `optional` **inline
|
|
25
|
+
> `optional` **inline?**: `boolean`
|
|
26
26
|
|
|
27
27
|
Whether to inline the content.
|
|
@@ -14,7 +14,7 @@ Interface which defines a REST route response example.
|
|
|
14
14
|
|
|
15
15
|
## Properties
|
|
16
16
|
|
|
17
|
-
### id
|
|
17
|
+
### id {#id}
|
|
18
18
|
|
|
19
19
|
> **id**: `string`
|
|
20
20
|
|
|
@@ -26,9 +26,9 @@ Example objects for the request.
|
|
|
26
26
|
|
|
27
27
|
***
|
|
28
28
|
|
|
29
|
-
### description?
|
|
29
|
+
### description? {#description}
|
|
30
30
|
|
|
31
|
-
> `optional` **description
|
|
31
|
+
> `optional` **description?**: `string`
|
|
32
32
|
|
|
33
33
|
Description of the example.
|
|
34
34
|
|
|
@@ -38,7 +38,7 @@ Description of the example.
|
|
|
38
38
|
|
|
39
39
|
***
|
|
40
40
|
|
|
41
|
-
### response
|
|
41
|
+
### response {#response}
|
|
42
42
|
|
|
43
43
|
> **response**: `T`
|
|
44
44
|
|