@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
|
@@ -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
|
|
|
@@ -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,7 @@ Logging component type for the request.
|
|
|
48
48
|
|
|
49
49
|
***
|
|
50
50
|
|
|
51
|
-
### socketId
|
|
51
|
+
### socketId {#socketid}
|
|
52
52
|
|
|
53
53
|
> **socketId**: `string`
|
|
54
54
|
|
|
@@ -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,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
|
+
[`ISocketRoute`](ISocketRoute.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,7 +144,7 @@ Promise that resolves when the request is processed.
|
|
|
136
144
|
|
|
137
145
|
***
|
|
138
146
|
|
|
139
|
-
### connected()?
|
|
147
|
+
### connected()? {#connected}
|
|
140
148
|
|
|
141
149
|
> `optional` **connected**(`request`, `route`, `loggingComponentType?`): `Promise`\<`void`\>
|
|
142
150
|
|
|
@@ -152,9 +160,9 @@ The server request object containing the socket id and other parameters.
|
|
|
152
160
|
|
|
153
161
|
##### route
|
|
154
162
|
|
|
155
|
-
|
|
163
|
+
[`ISocketRoute`](ISocketRoute.md)\<`any`, `any`\> \| `undefined`
|
|
156
164
|
|
|
157
|
-
|
|
165
|
+
The route being requested, if a matching one was found.
|
|
158
166
|
|
|
159
167
|
##### loggingComponentType?
|
|
160
168
|
|
|
@@ -170,7 +178,7 @@ Promise that resolves when the request is processed.
|
|
|
170
178
|
|
|
171
179
|
***
|
|
172
180
|
|
|
173
|
-
### disconnected()?
|
|
181
|
+
### disconnected()? {#disconnected}
|
|
174
182
|
|
|
175
183
|
> `optional` **disconnected**(`request`, `route`, `loggingComponentType?`): `Promise`\<`void`\>
|
|
176
184
|
|
|
@@ -186,9 +194,9 @@ The server request object containing the socket id and other parameters.
|
|
|
186
194
|
|
|
187
195
|
##### route
|
|
188
196
|
|
|
189
|
-
|
|
197
|
+
[`ISocketRoute`](ISocketRoute.md)\<`any`, `any`\> \| `undefined`
|
|
190
198
|
|
|
191
|
-
|
|
199
|
+
The route being requested, if a matching one was found.
|
|
192
200
|
|
|
193
201
|
##### loggingComponentType?
|
|
194
202
|
|
|
@@ -204,7 +212,7 @@ Promise that resolves when the request is processed.
|
|
|
204
212
|
|
|
205
213
|
***
|
|
206
214
|
|
|
207
|
-
### process()?
|
|
215
|
+
### process()? {#process}
|
|
208
216
|
|
|
209
217
|
> `optional` **process**(`request`, `response`, `route`, `processorState`, `responseEmitter`, `loggingComponentType?`): `Promise`\<`void`\>
|
|
210
218
|
|
|
@@ -226,9 +234,9 @@ The response data to send if any.
|
|
|
226
234
|
|
|
227
235
|
##### route
|
|
228
236
|
|
|
229
|
-
|
|
237
|
+
[`ISocketRoute`](ISocketRoute.md)\<`any`, `any`\> \| `undefined`
|
|
230
238
|
|
|
231
|
-
|
|
239
|
+
The route being requested, if a matching one was found.
|
|
232
240
|
|
|
233
241
|
##### processorState
|
|
234
242
|
|
|
@@ -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
|
|