@twin.org/api-models 0.0.3-next.9 → 0.9.0
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 +23 -15
- 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 +11 -5
- 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.map +1 -1
- package/dist/es/models/api/IServerReadyzResponse.js +2 -0
- package/dist/es/models/api/IServerReadyzResponse.js.map +1 -0
- 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 +11 -5
- package/dist/types/models/api/IServerHealthResponse.d.ts +6 -3
- package/dist/types/models/api/IServerLivezResponse.d.ts +1 -1
- package/dist/types/models/api/IServerReadyzResponse.d.ts +16 -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 +4 -0
- 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 +9 -23
- 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 +462 -95
- 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 +12 -6
- 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 +18 -10
- 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 +13 -81
- 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 +36 -24
- 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 +3 -3
- package/docs/reference/interfaces/IServerReadyzResponse.md +23 -0
- package/docs/reference/interfaces/IServerRootResponse.md +2 -2
- package/docs/reference/interfaces/IServerSpecResponse.md +4 -4
- package/docs/reference/interfaces/ISocketRequestContext.md +5 -5
- package/docs/reference/interfaces/ISocketRoute.md +27 -15
- 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 +9 -8
- 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/IHealthComponentInfo.js +0 -2
- package/dist/es/models/services/IHealthComponentInfo.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/IHealthComponentInfo.d.ts +0 -18
- package/dist/types/models/services/IHealthInfo.d.ts +0 -15
- package/dist/types/models/services/healthStatus.d.ts +0 -21
- package/docs/reference/interfaces/IAuthenticationGenerator.md +0 -35
- package/docs/reference/interfaces/IHealthComponentInfo.md +0 -27
- package/docs/reference/interfaces/IHealthInfo.md +0 -19
- 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,96 +64,28 @@ The OpenAPI spec.
|
|
|
64
64
|
|
|
65
65
|
***
|
|
66
66
|
|
|
67
|
-
### livez()
|
|
67
|
+
### livez() {#livez}
|
|
68
68
|
|
|
69
|
-
> **livez**(): `Promise
|
|
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
|
-
|
|
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
|
-
|
|
85
|
+
Is the server ready.
|
|
86
86
|
|
|
87
87
|
#### Returns
|
|
88
88
|
|
|
89
|
-
`Promise
|
|
89
|
+
`Promise`\<\{ `status`: `"ready"` \| `"not ready"`; \}\>
|
|
90
90
|
|
|
91
|
-
The
|
|
92
|
-
|
|
93
|
-
***
|
|
94
|
-
|
|
95
|
-
### setComponentHealth()
|
|
96
|
-
|
|
97
|
-
> **setComponentHealth**(`name`, `status`, `details?`, `tenantId?`): `Promise`\<`void`\>
|
|
98
|
-
|
|
99
|
-
Set the status of a component.
|
|
100
|
-
|
|
101
|
-
#### Parameters
|
|
102
|
-
|
|
103
|
-
##### name
|
|
104
|
-
|
|
105
|
-
`string`
|
|
106
|
-
|
|
107
|
-
The component name.
|
|
108
|
-
|
|
109
|
-
##### status
|
|
110
|
-
|
|
111
|
-
[`HealthStatus`](../type-aliases/HealthStatus.md)
|
|
112
|
-
|
|
113
|
-
The status of the component.
|
|
114
|
-
|
|
115
|
-
##### details?
|
|
116
|
-
|
|
117
|
-
`string`
|
|
118
|
-
|
|
119
|
-
The details for the status.
|
|
120
|
-
|
|
121
|
-
##### tenantId?
|
|
122
|
-
|
|
123
|
-
`string`
|
|
124
|
-
|
|
125
|
-
The tenant id, optional if the health status is not tenant specific.
|
|
126
|
-
|
|
127
|
-
#### Returns
|
|
128
|
-
|
|
129
|
-
`Promise`\<`void`\>
|
|
130
|
-
|
|
131
|
-
Nothing.
|
|
132
|
-
|
|
133
|
-
***
|
|
134
|
-
|
|
135
|
-
### removeComponentHealth()
|
|
136
|
-
|
|
137
|
-
> **removeComponentHealth**(`name`, `tenantId?`): `Promise`\<`void`\>
|
|
138
|
-
|
|
139
|
-
Remove the status of a component.
|
|
140
|
-
|
|
141
|
-
#### Parameters
|
|
142
|
-
|
|
143
|
-
##### name
|
|
144
|
-
|
|
145
|
-
`string`
|
|
146
|
-
|
|
147
|
-
The component name.
|
|
148
|
-
|
|
149
|
-
##### tenantId?
|
|
150
|
-
|
|
151
|
-
`string`
|
|
152
|
-
|
|
153
|
-
The tenant id, optional if the health status is not tenant specific.
|
|
154
|
-
|
|
155
|
-
#### Returns
|
|
156
|
-
|
|
157
|
-
`Promise`\<`void`\>
|
|
158
|
-
|
|
159
|
-
Nothing.
|
|
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,9 +42,9 @@ 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
49
|
Skips the authentication requirement for this route.
|
|
50
50
|
|
|
@@ -54,9 +54,9 @@ Skips the authentication requirement for this route.
|
|
|
54
54
|
|
|
55
55
|
***
|
|
56
56
|
|
|
57
|
-
### skipTenant?
|
|
57
|
+
### skipTenant? {#skiptenant}
|
|
58
58
|
|
|
59
|
-
> `optional` **skipTenant
|
|
59
|
+
> `optional` **skipTenant?**: `boolean`
|
|
60
60
|
|
|
61
61
|
Skips the tenant requirement for this route.
|
|
62
62
|
|
|
@@ -66,9 +66,21 @@ Skips the tenant requirement for this route.
|
|
|
66
66
|
|
|
67
67
|
***
|
|
68
68
|
|
|
69
|
-
###
|
|
69
|
+
### requiredScope? {#requiredscope}
|
|
70
70
|
|
|
71
|
-
> `optional` **
|
|
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`[]
|
|
72
84
|
|
|
73
85
|
The features supported by additional processors to run for this route.
|
|
74
86
|
|
|
@@ -78,9 +90,9 @@ The features supported by additional processors to run for this route.
|
|
|
78
90
|
|
|
79
91
|
***
|
|
80
92
|
|
|
81
|
-
### processorData?
|
|
93
|
+
### processorData? {#processordata}
|
|
82
94
|
|
|
83
|
-
> `optional` **processorData
|
|
95
|
+
> `optional` **processorData?**: `object`
|
|
84
96
|
|
|
85
97
|
The data for additional processors to run for this route.
|
|
86
98
|
|
|
@@ -94,7 +106,7 @@ The data for additional processors to run for this route.
|
|
|
94
106
|
|
|
95
107
|
***
|
|
96
108
|
|
|
97
|
-
### summary
|
|
109
|
+
### summary {#summary}
|
|
98
110
|
|
|
99
111
|
> **summary**: `string`
|
|
100
112
|
|
|
@@ -102,7 +114,7 @@ Summary of what task the operation performs.
|
|
|
102
114
|
|
|
103
115
|
***
|
|
104
116
|
|
|
105
|
-
### tag
|
|
117
|
+
### tag {#tag}
|
|
106
118
|
|
|
107
119
|
> **tag**: `string`
|
|
108
120
|
|
|
@@ -110,7 +122,7 @@ Tag for the operation.
|
|
|
110
122
|
|
|
111
123
|
***
|
|
112
124
|
|
|
113
|
-
### method
|
|
125
|
+
### method {#method}
|
|
114
126
|
|
|
115
127
|
> **method**: `HttpMethod`
|
|
116
128
|
|
|
@@ -118,7 +130,7 @@ The http method.
|
|
|
118
130
|
|
|
119
131
|
***
|
|
120
132
|
|
|
121
|
-
### handler
|
|
133
|
+
### handler {#handler}
|
|
122
134
|
|
|
123
135
|
> **handler**: (`httpRequestContext`, `request`) => `Promise`\<`U`\>
|
|
124
136
|
|
|
@@ -144,9 +156,9 @@ The request object, combined query param, path params and body.
|
|
|
144
156
|
|
|
145
157
|
***
|
|
146
158
|
|
|
147
|
-
### requestType?
|
|
159
|
+
### requestType? {#requesttype}
|
|
148
160
|
|
|
149
|
-
> `optional` **requestType
|
|
161
|
+
> `optional` **requestType?**: `object`
|
|
150
162
|
|
|
151
163
|
The type of the request object.
|
|
152
164
|
|
|
@@ -158,21 +170,21 @@ The object type for the request.
|
|
|
158
170
|
|
|
159
171
|
#### mimeType?
|
|
160
172
|
|
|
161
|
-
> `optional` **mimeType
|
|
173
|
+
> `optional` **mimeType?**: `string`
|
|
162
174
|
|
|
163
175
|
The mime type of the request, defaults to "application/json" if there is a body.
|
|
164
176
|
|
|
165
177
|
#### examples?
|
|
166
178
|
|
|
167
|
-
> `optional` **examples
|
|
179
|
+
> `optional` **examples?**: [`IRestRouteRequestExample`](IRestRouteRequestExample.md)\<`T`\>[]
|
|
168
180
|
|
|
169
181
|
Example objects for the request.
|
|
170
182
|
|
|
171
183
|
***
|
|
172
184
|
|
|
173
|
-
### responseType?
|
|
185
|
+
### responseType? {#responsetype}
|
|
174
186
|
|
|
175
|
-
> `optional` **responseType
|
|
187
|
+
> `optional` **responseType?**: `object`[]
|
|
176
188
|
|
|
177
189
|
The type of the response object.
|
|
178
190
|
|
|
@@ -184,20 +196,20 @@ The object type of the response.
|
|
|
184
196
|
|
|
185
197
|
#### mimeType?
|
|
186
198
|
|
|
187
|
-
> `optional` **mimeType
|
|
199
|
+
> `optional` **mimeType?**: `string`
|
|
188
200
|
|
|
189
201
|
The mime type of the response, defaults to "application/json" if there is a body.
|
|
190
202
|
|
|
191
203
|
#### examples?
|
|
192
204
|
|
|
193
|
-
> `optional` **examples
|
|
205
|
+
> `optional` **examples?**: [`IRestRouteResponseExample`](IRestRouteResponseExample.md)\<`U`\>[]
|
|
194
206
|
|
|
195
207
|
Example objects of the response.
|
|
196
208
|
|
|
197
209
|
***
|
|
198
210
|
|
|
199
|
-
### excludeFromSpec?
|
|
211
|
+
### excludeFromSpec? {#excludefromspec}
|
|
200
212
|
|
|
201
|
-
> `optional` **excludeFromSpec
|
|
213
|
+
> `optional` **excludeFromSpec?**: `boolean`
|
|
202
214
|
|
|
203
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
|
|