@twin.org/api-models 0.0.3-next.3 → 0.0.3-next.30
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 +278 -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
|
@@ -4,8 +4,8 @@ Interface which defines a REST route response.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
### attachment?
|
|
7
|
+
### attachment? {#attachment}
|
|
8
8
|
|
|
9
|
-
> `optional` **attachment
|
|
9
|
+
> `optional` **attachment?**: [`IRestRouteResponseAttachmentOptions`](IRestRouteResponseAttachmentOptions.md)
|
|
10
10
|
|
|
11
11
|
Additional options that can be used to control the response.
|
|
@@ -4,30 +4,30 @@ The favicon for the server.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
### headers?
|
|
7
|
+
### headers? {#headers}
|
|
8
8
|
|
|
9
|
-
> `optional` **headers
|
|
9
|
+
> `optional` **headers?**: `object`
|
|
10
10
|
|
|
11
11
|
Additional response headers.
|
|
12
12
|
|
|
13
13
|
#### content-type?
|
|
14
14
|
|
|
15
|
-
> `optional` **content-type
|
|
15
|
+
> `optional` **content-type?**: `string`
|
|
16
16
|
|
|
17
17
|
The content type for the response.
|
|
18
18
|
|
|
19
19
|
***
|
|
20
20
|
|
|
21
|
-
### statusCode?
|
|
21
|
+
### statusCode? {#statuscode}
|
|
22
22
|
|
|
23
|
-
> `optional` **statusCode
|
|
23
|
+
> `optional` **statusCode?**: `HttpStatusCode`
|
|
24
24
|
|
|
25
25
|
Response status code.
|
|
26
26
|
|
|
27
27
|
***
|
|
28
28
|
|
|
29
|
-
### body?
|
|
29
|
+
### body? {#body}
|
|
30
30
|
|
|
31
|
-
> `optional` **body
|
|
31
|
+
> `optional` **body?**: `Uint8Array`\<`ArrayBufferLike`\>
|
|
32
32
|
|
|
33
33
|
The favicon for the server.
|
|
@@ -4,8 +4,16 @@ The health of the server.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
### body
|
|
7
|
+
### body {#body}
|
|
8
8
|
|
|
9
|
-
> **body**:
|
|
9
|
+
> **body**: `object`
|
|
10
10
|
|
|
11
|
-
The
|
|
11
|
+
The health for the server.
|
|
12
|
+
|
|
13
|
+
#### status
|
|
14
|
+
|
|
15
|
+
> **status**: `HealthStatus`
|
|
16
|
+
|
|
17
|
+
#### components
|
|
18
|
+
|
|
19
|
+
> **components**: `IHealth`[]
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Interface: IServerLivezResponse
|
|
2
|
+
|
|
3
|
+
The livez of the server.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### headers {#headers}
|
|
8
|
+
|
|
9
|
+
> **headers**: `object`
|
|
10
|
+
|
|
11
|
+
The headers for the response.
|
|
12
|
+
|
|
13
|
+
#### content-type
|
|
14
|
+
|
|
15
|
+
> **content-type**: `"text/plain"`
|
|
16
|
+
|
|
17
|
+
***
|
|
18
|
+
|
|
19
|
+
### body {#body}
|
|
20
|
+
|
|
21
|
+
> **body**: `"alive"` \| `"dead"`
|
|
22
|
+
|
|
23
|
+
The livez information for the server.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Interface: IServerReadyzResponse
|
|
2
|
+
|
|
3
|
+
The readyz of the server.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### headers {#headers}
|
|
8
|
+
|
|
9
|
+
> **headers**: `object`
|
|
10
|
+
|
|
11
|
+
The headers for the response.
|
|
12
|
+
|
|
13
|
+
#### content-type
|
|
14
|
+
|
|
15
|
+
> **content-type**: `"text/plain"`
|
|
16
|
+
|
|
17
|
+
***
|
|
18
|
+
|
|
19
|
+
### body {#body}
|
|
20
|
+
|
|
21
|
+
> **body**: `"ready"` \| `"not ready"`
|
|
22
|
+
|
|
23
|
+
The readyz information for the server.
|
|
@@ -4,7 +4,19 @@ The root text for the server.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### headers {#headers}
|
|
8
|
+
|
|
9
|
+
> **headers**: `object`
|
|
10
|
+
|
|
11
|
+
The headers for the response.
|
|
12
|
+
|
|
13
|
+
#### content-type
|
|
14
|
+
|
|
15
|
+
> **content-type**: `"text/plain"`
|
|
16
|
+
|
|
17
|
+
***
|
|
18
|
+
|
|
19
|
+
### body {#body}
|
|
8
20
|
|
|
9
21
|
> **body**: `string`
|
|
10
22
|
|
|
@@ -4,16 +4,16 @@ The OpenAPI spec for the endpoints.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
### statusCode?
|
|
7
|
+
### statusCode? {#statuscode}
|
|
8
8
|
|
|
9
|
-
> `optional` **statusCode
|
|
9
|
+
> `optional` **statusCode?**: `HttpStatusCode`
|
|
10
10
|
|
|
11
11
|
Response status code.
|
|
12
12
|
|
|
13
13
|
***
|
|
14
14
|
|
|
15
|
-
### body?
|
|
15
|
+
### body? {#body}
|
|
16
16
|
|
|
17
|
-
> `optional` **body
|
|
17
|
+
> `optional` **body?**: `unknown`
|
|
18
18
|
|
|
19
19
|
The spec for the server.
|
|
@@ -8,7 +8,7 @@ Context data from the socket request.
|
|
|
8
8
|
|
|
9
9
|
## Properties
|
|
10
10
|
|
|
11
|
-
### serverRequest
|
|
11
|
+
### serverRequest {#serverrequest}
|
|
12
12
|
|
|
13
13
|
> **serverRequest**: [`IHttpServerRequest`](IHttpServerRequest.md)
|
|
14
14
|
|
|
@@ -20,7 +20,7 @@ The raw HTTP request.
|
|
|
20
20
|
|
|
21
21
|
***
|
|
22
22
|
|
|
23
|
-
### processorState
|
|
23
|
+
### processorState {#processorstate}
|
|
24
24
|
|
|
25
25
|
> **processorState**: `object`
|
|
26
26
|
|
|
@@ -36,9 +36,9 @@ The state handed through the processors.
|
|
|
36
36
|
|
|
37
37
|
***
|
|
38
38
|
|
|
39
|
-
### loggingComponentType?
|
|
39
|
+
### loggingComponentType? {#loggingcomponenttype}
|
|
40
40
|
|
|
41
|
-
> `optional` **loggingComponentType
|
|
41
|
+
> `optional` **loggingComponentType?**: `string`
|
|
42
42
|
|
|
43
43
|
Logging component type for the request.
|
|
44
44
|
|
|
@@ -48,7 +48,19 @@ Logging component type for the request.
|
|
|
48
48
|
|
|
49
49
|
***
|
|
50
50
|
|
|
51
|
-
###
|
|
51
|
+
### hostingComponentType? {#hostingcomponenttype}
|
|
52
|
+
|
|
53
|
+
> `optional` **hostingComponentType?**: `string`
|
|
54
|
+
|
|
55
|
+
Hosting component type for the request.
|
|
56
|
+
|
|
57
|
+
#### Inherited from
|
|
58
|
+
|
|
59
|
+
[`IHttpRequestContext`](IHttpRequestContext.md).[`hostingComponentType`](IHttpRequestContext.md#hostingcomponenttype)
|
|
60
|
+
|
|
61
|
+
***
|
|
62
|
+
|
|
63
|
+
### socketId {#socketid}
|
|
52
64
|
|
|
53
65
|
> **socketId**: `string`
|
|
54
66
|
|
|
@@ -18,7 +18,7 @@ Interface which defines a socket 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
|
-
### handler
|
|
109
|
+
### handler {#handler}
|
|
86
110
|
|
|
87
111
|
> **handler**: (`socketRequestContext`, `request`, `emit`) => `void`
|
|
88
112
|
|
|
@@ -114,9 +138,9 @@ The function to emit an event.
|
|
|
114
138
|
|
|
115
139
|
***
|
|
116
140
|
|
|
117
|
-
### connected
|
|
141
|
+
### connected? {#connected}
|
|
118
142
|
|
|
119
|
-
> `optional` **connected
|
|
143
|
+
> `optional` **connected?**: (`socketRequestContext`) => `void`
|
|
120
144
|
|
|
121
145
|
The connected handler.
|
|
122
146
|
|
|
@@ -134,9 +158,9 @@ The request context.
|
|
|
134
158
|
|
|
135
159
|
***
|
|
136
160
|
|
|
137
|
-
### disconnected
|
|
161
|
+
### disconnected? {#disconnected}
|
|
138
162
|
|
|
139
|
-
> `optional` **disconnected
|
|
163
|
+
> `optional` **disconnected?**: (`socketRequestContext`) => `void`
|
|
140
164
|
|
|
141
165
|
The disconnected handler.
|
|
142
166
|
|
|
@@ -8,7 +8,7 @@ The definition for a processor for handling socket 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
|
+
[`ISocketRoute`](ISocketRoute.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?
|
|
68
72
|
|
|
69
73
|
`string`
|
|
70
74
|
|
|
71
|
-
The logging component type
|
|
75
|
+
The logging component type.
|
|
76
|
+
|
|
77
|
+
###### hostingComponentType?
|
|
78
|
+
|
|
79
|
+
`string`
|
|
80
|
+
|
|
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
|
+
[`ISocketRoute`](ISocketRoute.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,7 +156,7 @@ Promise that resolves when the request is processed.
|
|
|
136
156
|
|
|
137
157
|
***
|
|
138
158
|
|
|
139
|
-
### connected()?
|
|
159
|
+
### connected()? {#connected}
|
|
140
160
|
|
|
141
161
|
> `optional` **connected**(`request`, `route`, `loggingComponentType?`): `Promise`\<`void`\>
|
|
142
162
|
|
|
@@ -152,9 +172,9 @@ The server request object containing the socket id and other parameters.
|
|
|
152
172
|
|
|
153
173
|
##### route
|
|
154
174
|
|
|
155
|
-
|
|
175
|
+
[`ISocketRoute`](ISocketRoute.md)\<`any`, `any`\> \| `undefined`
|
|
156
176
|
|
|
157
|
-
|
|
177
|
+
The route being requested, if a matching one was found.
|
|
158
178
|
|
|
159
179
|
##### loggingComponentType?
|
|
160
180
|
|
|
@@ -170,7 +190,7 @@ Promise that resolves when the request is processed.
|
|
|
170
190
|
|
|
171
191
|
***
|
|
172
192
|
|
|
173
|
-
### disconnected()?
|
|
193
|
+
### disconnected()? {#disconnected}
|
|
174
194
|
|
|
175
195
|
> `optional` **disconnected**(`request`, `route`, `loggingComponentType?`): `Promise`\<`void`\>
|
|
176
196
|
|
|
@@ -186,9 +206,9 @@ The server request object containing the socket id and other parameters.
|
|
|
186
206
|
|
|
187
207
|
##### route
|
|
188
208
|
|
|
189
|
-
|
|
209
|
+
[`ISocketRoute`](ISocketRoute.md)\<`any`, `any`\> \| `undefined`
|
|
190
210
|
|
|
191
|
-
|
|
211
|
+
The route being requested, if a matching one was found.
|
|
192
212
|
|
|
193
213
|
##### loggingComponentType?
|
|
194
214
|
|
|
@@ -204,7 +224,7 @@ Promise that resolves when the request is processed.
|
|
|
204
224
|
|
|
205
225
|
***
|
|
206
226
|
|
|
207
|
-
### process()?
|
|
227
|
+
### process()? {#process}
|
|
208
228
|
|
|
209
229
|
> `optional` **process**(`request`, `response`, `route`, `processorState`, `responseEmitter`, `loggingComponentType?`): `Promise`\<`void`\>
|
|
210
230
|
|
|
@@ -226,9 +246,9 @@ The response data to send if any.
|
|
|
226
246
|
|
|
227
247
|
##### route
|
|
228
248
|
|
|
229
|
-
|
|
249
|
+
[`ISocketRoute`](ISocketRoute.md)\<`any`, `any`\> \| `undefined`
|
|
230
250
|
|
|
231
|
-
|
|
251
|
+
The route being requested, if a matching one was found.
|
|
232
252
|
|
|
233
253
|
##### processorState
|
|
234
254
|
|
|
@@ -14,9 +14,9 @@ Model for the standard parameters for an http request.
|
|
|
14
14
|
|
|
15
15
|
## Properties
|
|
16
16
|
|
|
17
|
-
### headers?
|
|
17
|
+
### headers? {#headers}
|
|
18
18
|
|
|
19
|
-
> `optional` **headers
|
|
19
|
+
> `optional` **headers?**: `IHttpHeaders`
|
|
20
20
|
|
|
21
21
|
Incoming Http Headers.
|
|
22
22
|
|
|
@@ -26,9 +26,9 @@ Incoming Http Headers.
|
|
|
26
26
|
|
|
27
27
|
***
|
|
28
28
|
|
|
29
|
-
### pathParams?
|
|
29
|
+
### pathParams? {#pathparams}
|
|
30
30
|
|
|
31
|
-
> `optional` **pathParams
|
|
31
|
+
> `optional` **pathParams?**: [`IHttpRequestPathParams`](IHttpRequestPathParams.md)
|
|
32
32
|
|
|
33
33
|
The path parameters.
|
|
34
34
|
|
|
@@ -38,9 +38,9 @@ The path parameters.
|
|
|
38
38
|
|
|
39
39
|
***
|
|
40
40
|
|
|
41
|
-
### query?
|
|
41
|
+
### query? {#query}
|
|
42
42
|
|
|
43
|
-
> `optional` **query
|
|
43
|
+
> `optional` **query?**: [`IHttpRequestQuery`](IHttpRequestQuery.md)
|
|
44
44
|
|
|
45
45
|
The query parameters.
|
|
46
46
|
|
|
@@ -50,9 +50,9 @@ The query parameters.
|
|
|
50
50
|
|
|
51
51
|
***
|
|
52
52
|
|
|
53
|
-
### body?
|
|
53
|
+
### body? {#body}
|
|
54
54
|
|
|
55
|
-
> `optional` **body
|
|
55
|
+
> `optional` **body?**: `T`
|
|
56
56
|
|
|
57
57
|
Data to return send as the body.
|
|
58
58
|
|
|
@@ -62,31 +62,31 @@ Data to return send as the body.
|
|
|
62
62
|
|
|
63
63
|
***
|
|
64
64
|
|
|
65
|
-
###
|
|
65
|
+
### url {#url}
|
|
66
66
|
|
|
67
|
-
>
|
|
67
|
+
> **url**: `string`
|
|
68
68
|
|
|
69
|
-
The request
|
|
69
|
+
The request url.
|
|
70
70
|
|
|
71
71
|
#### Inherited from
|
|
72
72
|
|
|
73
|
-
[`IHttpServerRequest`](IHttpServerRequest.md).[`
|
|
73
|
+
[`IHttpServerRequest`](IHttpServerRequest.md).[`url`](IHttpServerRequest.md#url)
|
|
74
74
|
|
|
75
75
|
***
|
|
76
76
|
|
|
77
|
-
###
|
|
77
|
+
### method? {#method}
|
|
78
78
|
|
|
79
|
-
> `optional` **
|
|
79
|
+
> `optional` **method?**: `HttpMethod`
|
|
80
80
|
|
|
81
|
-
The request
|
|
81
|
+
The request method.
|
|
82
82
|
|
|
83
83
|
#### Inherited from
|
|
84
84
|
|
|
85
|
-
[`IHttpServerRequest`](IHttpServerRequest.md).[`
|
|
85
|
+
[`IHttpServerRequest`](IHttpServerRequest.md).[`method`](IHttpServerRequest.md#method)
|
|
86
86
|
|
|
87
87
|
***
|
|
88
88
|
|
|
89
|
-
### socketId
|
|
89
|
+
### socketId {#socketid}
|
|
90
90
|
|
|
91
91
|
> **socketId**: `string`
|
|
92
92
|
|
|
@@ -4,7 +4,7 @@ Tag for routes used to generate OpenAPI information.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
### name
|
|
7
|
+
### name {#name}
|
|
8
8
|
|
|
9
9
|
> **name**: `string`
|
|
10
10
|
|
|
@@ -12,7 +12,7 @@ The name of the tag.
|
|
|
12
12
|
|
|
13
13
|
***
|
|
14
14
|
|
|
15
|
-
### description
|
|
15
|
+
### description {#description}
|
|
16
16
|
|
|
17
17
|
> **description**: `string`
|
|
18
18
|
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Interface: ITenant
|
|
2
|
+
|
|
3
|
+
Model defining the tenant.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### id {#id}
|
|
8
|
+
|
|
9
|
+
> **id**: `string`
|
|
10
|
+
|
|
11
|
+
The unique identifier for the tenant.
|
|
12
|
+
|
|
13
|
+
***
|
|
14
|
+
|
|
15
|
+
### apiKey {#apikey}
|
|
16
|
+
|
|
17
|
+
> **apiKey**: `string`
|
|
18
|
+
|
|
19
|
+
The api key for the tenant.
|
|
20
|
+
|
|
21
|
+
***
|
|
22
|
+
|
|
23
|
+
### label {#label}
|
|
24
|
+
|
|
25
|
+
> **label**: `string`
|
|
26
|
+
|
|
27
|
+
The label of the tenant.
|
|
28
|
+
|
|
29
|
+
***
|
|
30
|
+
|
|
31
|
+
### dateCreated {#datecreated}
|
|
32
|
+
|
|
33
|
+
> **dateCreated**: `string`
|
|
34
|
+
|
|
35
|
+
The date the tenant was created.
|
|
36
|
+
|
|
37
|
+
***
|
|
38
|
+
|
|
39
|
+
### dateModified {#datemodified}
|
|
40
|
+
|
|
41
|
+
> **dateModified**: `string`
|
|
42
|
+
|
|
43
|
+
The date the tenant was modified.
|
|
44
|
+
|
|
45
|
+
***
|
|
46
|
+
|
|
47
|
+
### publicOrigin? {#publicorigin}
|
|
48
|
+
|
|
49
|
+
> `optional` **publicOrigin?**: `string`
|
|
50
|
+
|
|
51
|
+
The public origin available to the public for accessing the API.
|
|
52
|
+
|
|
53
|
+
***
|
|
54
|
+
|
|
55
|
+
### isNodeTenant {#isnodetenant}
|
|
56
|
+
|
|
57
|
+
> **isNodeTenant**: `boolean`
|
|
58
|
+
|
|
59
|
+
Indicates whether the tenant is the node tenant.
|