@twin.org/api-models 0.0.3-next.5 → 0.0.3-next.51
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 +141 -0
- package/dist/es/helpers/httpUrlHelper.js.map +1 -0
- package/dist/es/index.js +12 -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 +33 -0
- package/dist/es/models/httpContextIdKeys.js.map +1 -0
- 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/server/IWebServerOptions.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/IInformationComponent.js.map +1 -1
- package/dist/es/models/services/IPlatformComponent.js +2 -0
- package/dist/es/models/services/IPlatformComponent.js.map +1 -0
- 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/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 +70 -0
- package/dist/types/index.d.ts +12 -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 +33 -0
- 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 +10 -4
- package/dist/types/models/server/IRestRouteProcessor.d.ts +5 -2
- package/dist/types/models/server/IWebServer.d.ts +10 -4
- package/dist/types/models/server/IWebServerOptions.d.ts +5 -0
- package/dist/types/models/services/IHealthComponent.d.ts +14 -0
- package/dist/types/models/services/IInformationComponent.d.ts +10 -17
- package/dist/types/models/services/IPlatformComponent.d.ts +24 -0
- package/dist/types/models/services/ITenant.d.ts +37 -0
- package/dist/types/models/services/ITenantAdminComponent.d.ts +70 -0
- package/docs/changelog.md +415 -74
- 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 +259 -0
- package/docs/reference/classes/TooManyRequestsError.md +67 -0
- package/docs/reference/index.md +13 -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 +21 -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/IHttpRequest.md +8 -8
- package/docs/reference/interfaces/IHttpRequestContext.md +4 -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/IPlatformComponent.md +65 -0
- package/docs/reference/interfaces/IRestRoute.md +47 -23
- package/docs/reference/interfaces/IRestRouteExample.md +3 -3
- package/docs/reference/interfaces/IRestRouteProcessor.md +31 -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 +5 -5
- package/docs/reference/interfaces/ISocketRoute.md +38 -14
- package/docs/reference/interfaces/ISocketRouteProcessor.md +30 -22
- package/docs/reference/interfaces/ISocketServerRequest.md +17 -17
- package/docs/reference/interfaces/ITag.md +2 -2
- package/docs/reference/interfaces/ITenant.md +67 -0
- package/docs/reference/interfaces/ITenantAdminComponent.md +227 -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/IWebServer.md +37 -7
- package/docs/reference/interfaces/IWebServerOptions.md +21 -12
- package/docs/reference/type-aliases/HttpContextIdKeys.md +5 -0
- package/docs/reference/variables/HttpContextIdKeys.md +43 -0
- package/package.json +5 -4
- 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.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Interface: IPlatformComponent
|
|
2
|
+
|
|
3
|
+
Interface for the platform component.
|
|
4
|
+
|
|
5
|
+
## Extends
|
|
6
|
+
|
|
7
|
+
- `IComponent`
|
|
8
|
+
|
|
9
|
+
## Methods
|
|
10
|
+
|
|
11
|
+
### isMultiTenant() {#ismultitenant}
|
|
12
|
+
|
|
13
|
+
> **isMultiTenant**(): `boolean`
|
|
14
|
+
|
|
15
|
+
Indicates whether the component is running in a multi-tenant environment.
|
|
16
|
+
|
|
17
|
+
#### Returns
|
|
18
|
+
|
|
19
|
+
`boolean`
|
|
20
|
+
|
|
21
|
+
True if the component is running in a multi-tenant environment, false otherwise.
|
|
22
|
+
|
|
23
|
+
***
|
|
24
|
+
|
|
25
|
+
### execute() {#execute}
|
|
26
|
+
|
|
27
|
+
> **execute**(`method`): `Promise`\<`void`\>
|
|
28
|
+
|
|
29
|
+
Execute a method, if single tenant will run once, if multi-tenant will run for each tenant.
|
|
30
|
+
|
|
31
|
+
#### Parameters
|
|
32
|
+
|
|
33
|
+
##### method
|
|
34
|
+
|
|
35
|
+
() => `Promise`\<`void`\>
|
|
36
|
+
|
|
37
|
+
The method to run for each tenant.
|
|
38
|
+
|
|
39
|
+
#### Returns
|
|
40
|
+
|
|
41
|
+
`Promise`\<`void`\>
|
|
42
|
+
|
|
43
|
+
A promise that resolves when the method has been executed for all applicable tenants.
|
|
44
|
+
|
|
45
|
+
***
|
|
46
|
+
|
|
47
|
+
### getLocalOriginContext() {#getlocalorigincontext}
|
|
48
|
+
|
|
49
|
+
> **getLocalOriginContext**(`url`): `Promise`\<`IContextIds` \| `undefined`\>
|
|
50
|
+
|
|
51
|
+
Get the local origin context IDs for the given URL.
|
|
52
|
+
|
|
53
|
+
#### Parameters
|
|
54
|
+
|
|
55
|
+
##### url
|
|
56
|
+
|
|
57
|
+
`string`
|
|
58
|
+
|
|
59
|
+
The URL to check.
|
|
60
|
+
|
|
61
|
+
#### Returns
|
|
62
|
+
|
|
63
|
+
`Promise`\<`IContextIds` \| `undefined`\>
|
|
64
|
+
|
|
65
|
+
A promise that resolves to the context IDs if the URL is a local origin, undefined otherwise.
|
|
@@ -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,15 @@ 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?
|
|
68
72
|
|
|
69
73
|
`string`
|
|
70
74
|
|
|
71
|
-
The logging component type
|
|
75
|
+
The logging component type.
|
|
72
76
|
|
|
73
77
|
#### Returns
|
|
74
78
|
|
|
@@ -82,9 +86,9 @@ Promise that resolves when the request is processed.
|
|
|
82
86
|
|
|
83
87
|
***
|
|
84
88
|
|
|
85
|
-
### post()?
|
|
89
|
+
### post()? {#post}
|
|
86
90
|
|
|
87
|
-
> `optional` **post**(`request`, `response`, `route`, `contextIds`, `processorState`, `
|
|
91
|
+
> `optional` **post**(`request`, `response`, `route`, `contextIds`, `processorState`, `componentTypes?`): `Promise`\<`void`\>
|
|
88
92
|
|
|
89
93
|
Post process the REST request for the specified route.
|
|
90
94
|
|
|
@@ -104,9 +108,9 @@ The response data to send if any.
|
|
|
104
108
|
|
|
105
109
|
##### route
|
|
106
110
|
|
|
107
|
-
|
|
111
|
+
[`IRestRoute`](IRestRoute.md)\<`any`, `any`\> \| `undefined`
|
|
108
112
|
|
|
109
|
-
|
|
113
|
+
The route being requested, if a matching one was found.
|
|
110
114
|
|
|
111
115
|
##### contextIds
|
|
112
116
|
|
|
@@ -118,11 +122,15 @@ The context IDs of the request.
|
|
|
118
122
|
|
|
119
123
|
The state handed through the processors.
|
|
120
124
|
|
|
121
|
-
#####
|
|
125
|
+
##### componentTypes?
|
|
126
|
+
|
|
127
|
+
The component types for the request.
|
|
128
|
+
|
|
129
|
+
###### loggingComponentType?
|
|
122
130
|
|
|
123
131
|
`string`
|
|
124
132
|
|
|
125
|
-
The logging component type
|
|
133
|
+
The logging component type.
|
|
126
134
|
|
|
127
135
|
#### Returns
|
|
128
136
|
|
|
@@ -136,9 +144,9 @@ Promise that resolves when the request is processed.
|
|
|
136
144
|
|
|
137
145
|
***
|
|
138
146
|
|
|
139
|
-
### process()?
|
|
147
|
+
### process()? {#process}
|
|
140
148
|
|
|
141
|
-
> `optional` **process**(`request`, `response`, `route`, `processorState`, `
|
|
149
|
+
> `optional` **process**(`request`, `response`, `route`, `processorState`, `componentTypes?`): `Promise`\<`void`\>
|
|
142
150
|
|
|
143
151
|
Process the REST request for the specified route.
|
|
144
152
|
|
|
@@ -158,19 +166,23 @@ The response data to send if any.
|
|
|
158
166
|
|
|
159
167
|
##### route
|
|
160
168
|
|
|
161
|
-
|
|
169
|
+
[`IRestRoute`](IRestRoute.md)\<`any`, `any`\> \| `undefined`
|
|
162
170
|
|
|
163
|
-
|
|
171
|
+
The route being requested, if a matching one was found.
|
|
164
172
|
|
|
165
173
|
##### processorState
|
|
166
174
|
|
|
167
175
|
The state handed through the processors.
|
|
168
176
|
|
|
169
|
-
#####
|
|
177
|
+
##### componentTypes?
|
|
178
|
+
|
|
179
|
+
The component types for the request.
|
|
180
|
+
|
|
181
|
+
###### loggingComponentType?
|
|
170
182
|
|
|
171
183
|
`string`
|
|
172
184
|
|
|
173
|
-
The logging component type
|
|
185
|
+
The logging component type.
|
|
174
186
|
|
|
175
187
|
#### Returns
|
|
176
188
|
|
|
@@ -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
|
|