@twin.org/api-models 0.0.3-next.2 → 0.0.3-next.21
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/helpers/httpErrorHelper.js +28 -19
- package/dist/es/helpers/httpErrorHelper.js.map +1 -1
- package/dist/es/helpers/httpUrlHelper.js +92 -0
- package/dist/es/helpers/httpUrlHelper.js.map +1 -0
- package/dist/es/index.js +6 -2
- package/dist/es/index.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/IServerRootResponse.js +0 -2
- package/dist/es/models/api/IServerRootResponse.js.map +1 -1
- 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/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/services/IHealthComponentInfo.js +2 -0
- package/dist/es/models/services/IHealthComponentInfo.js.map +1 -0
- package/dist/es/models/services/IHealthInfo.js.map +1 -1
- 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/types/helpers/httpErrorHelper.d.ts +6 -0
- package/dist/types/helpers/httpUrlHelper.d.ts +46 -0
- package/dist/types/index.d.ts +6 -2
- package/dist/types/models/api/IServerLivezResponse.d.ts +16 -0
- package/dist/types/models/api/IServerRootResponse.d.ts +7 -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/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/services/IHealthComponentInfo.d.ts +18 -0
- package/dist/types/models/services/IHealthInfo.d.ts +2 -14
- package/dist/types/models/services/IHostingComponent.d.ts +24 -0
- package/dist/types/models/services/IInformationComponent.d.ts +9 -2
- package/dist/types/models/services/ITenant.d.ts +33 -0
- package/dist/types/models/services/ITenantAdminComponent.d.ts +63 -0
- package/docs/changelog.md +165 -1
- package/docs/examples.md +63 -1
- package/docs/reference/classes/HttpErrorHelper.md +12 -0
- package/docs/reference/classes/HttpUrlHelper.md +169 -0
- package/docs/reference/index.md +6 -2
- package/docs/reference/interfaces/IBaseRoute.md +17 -1
- package/docs/reference/interfaces/IBaseRouteProcessor.md +26 -6
- package/docs/reference/interfaces/IHealthComponentInfo.md +27 -0
- package/docs/reference/interfaces/IHealthInfo.md +1 -19
- package/docs/reference/interfaces/IHostingComponent.md +73 -0
- package/docs/reference/interfaces/IHttpRequestContext.md +8 -0
- package/docs/reference/interfaces/IHttpRequestPathParams.md +1 -1
- package/docs/reference/interfaces/IHttpRequestQuery.md +1 -1
- package/docs/reference/interfaces/IHttpServerRequest.md +6 -6
- package/docs/reference/interfaces/IInformationComponent.md +28 -2
- package/docs/reference/interfaces/IRestRoute.md +25 -1
- package/docs/reference/interfaces/IRestRouteProcessor.md +39 -9
- package/docs/reference/interfaces/IServerLivezResponse.md +23 -0
- package/docs/reference/interfaces/IServerRootResponse.md +12 -0
- package/docs/reference/interfaces/ISocketRequestContext.md +12 -0
- package/docs/reference/interfaces/ISocketRoute.md +25 -1
- package/docs/reference/interfaces/ISocketRouteProcessor.md +26 -6
- package/docs/reference/interfaces/ISocketServerRequest.md +8 -8
- package/docs/reference/interfaces/ITenant.md +59 -0
- package/docs/reference/interfaces/ITenantAdminComponent.md +193 -0
- package/docs/reference/interfaces/IWebServerOptions.md +0 -24
- 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/types/factories/authenticationGeneratorFactory.d.ts +0 -6
- package/dist/types/models/client/IAuthenticationGenerator.d.ts +0 -14
- package/docs/reference/interfaces/IAuthenticationGenerator.md +0 -35
- package/docs/reference/variables/AuthenticationGeneratorFactory.md +0 -5
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
# Class: HttpUrlHelper
|
|
2
|
+
|
|
3
|
+
Class to help with handling http URLs.
|
|
4
|
+
|
|
5
|
+
## Constructors
|
|
6
|
+
|
|
7
|
+
### Constructor
|
|
8
|
+
|
|
9
|
+
> **new HttpUrlHelper**(): `HttpUrlHelper`
|
|
10
|
+
|
|
11
|
+
#### Returns
|
|
12
|
+
|
|
13
|
+
`HttpUrlHelper`
|
|
14
|
+
|
|
15
|
+
## Methods
|
|
16
|
+
|
|
17
|
+
### extractOrigin()
|
|
18
|
+
|
|
19
|
+
> `static` **extractOrigin**(`url`): `string` \| `undefined`
|
|
20
|
+
|
|
21
|
+
Extract the origin from the url which includes protocol,host,port.
|
|
22
|
+
|
|
23
|
+
#### Parameters
|
|
24
|
+
|
|
25
|
+
##### url
|
|
26
|
+
|
|
27
|
+
`string`
|
|
28
|
+
|
|
29
|
+
The url to extract the origin from.
|
|
30
|
+
|
|
31
|
+
#### Returns
|
|
32
|
+
|
|
33
|
+
`string` \| `undefined`
|
|
34
|
+
|
|
35
|
+
The extracted origin.
|
|
36
|
+
|
|
37
|
+
#### See
|
|
38
|
+
|
|
39
|
+
https://developer.mozilla.org/en-US/docs/Web/API/URL/origin
|
|
40
|
+
|
|
41
|
+
***
|
|
42
|
+
|
|
43
|
+
### extractPath()
|
|
44
|
+
|
|
45
|
+
> `static` **extractPath**(`url`): `string` \| `undefined`
|
|
46
|
+
|
|
47
|
+
Extract the path from the url.
|
|
48
|
+
|
|
49
|
+
#### Parameters
|
|
50
|
+
|
|
51
|
+
##### url
|
|
52
|
+
|
|
53
|
+
`string`
|
|
54
|
+
|
|
55
|
+
The url to extract the path from.
|
|
56
|
+
|
|
57
|
+
#### Returns
|
|
58
|
+
|
|
59
|
+
`string` \| `undefined`
|
|
60
|
+
|
|
61
|
+
The extracted path.
|
|
62
|
+
|
|
63
|
+
#### See
|
|
64
|
+
|
|
65
|
+
https://developer.mozilla.org/en-US/docs/Web/API/URL/pathname
|
|
66
|
+
|
|
67
|
+
***
|
|
68
|
+
|
|
69
|
+
### extractSearch()
|
|
70
|
+
|
|
71
|
+
> `static` **extractSearch**(`url`): `string` \| `undefined`
|
|
72
|
+
|
|
73
|
+
Extract the search from the url.
|
|
74
|
+
|
|
75
|
+
#### Parameters
|
|
76
|
+
|
|
77
|
+
##### url
|
|
78
|
+
|
|
79
|
+
`string`
|
|
80
|
+
|
|
81
|
+
The url to extract the search from.
|
|
82
|
+
|
|
83
|
+
#### Returns
|
|
84
|
+
|
|
85
|
+
`string` \| `undefined`
|
|
86
|
+
|
|
87
|
+
The extracted search.
|
|
88
|
+
|
|
89
|
+
#### See
|
|
90
|
+
|
|
91
|
+
https://developer.mozilla.org/en-US/docs/Web/API/URL/search
|
|
92
|
+
|
|
93
|
+
***
|
|
94
|
+
|
|
95
|
+
### extractPathAndSearch()
|
|
96
|
+
|
|
97
|
+
> `static` **extractPathAndSearch**(`url`): `string` \| `undefined`
|
|
98
|
+
|
|
99
|
+
Extract the path and search from the url.
|
|
100
|
+
|
|
101
|
+
#### Parameters
|
|
102
|
+
|
|
103
|
+
##### url
|
|
104
|
+
|
|
105
|
+
`string`
|
|
106
|
+
|
|
107
|
+
The url to extract the path and search from.
|
|
108
|
+
|
|
109
|
+
#### Returns
|
|
110
|
+
|
|
111
|
+
`string` \| `undefined`
|
|
112
|
+
|
|
113
|
+
The extracted path and search.
|
|
114
|
+
|
|
115
|
+
***
|
|
116
|
+
|
|
117
|
+
### combineParts()
|
|
118
|
+
|
|
119
|
+
> `static` **combineParts**(`origin`, `pathAndSearch`): `string` \| `undefined`
|
|
120
|
+
|
|
121
|
+
Combine the urls parts.
|
|
122
|
+
|
|
123
|
+
#### Parameters
|
|
124
|
+
|
|
125
|
+
##### origin
|
|
126
|
+
|
|
127
|
+
`string`
|
|
128
|
+
|
|
129
|
+
The origin to combine.
|
|
130
|
+
|
|
131
|
+
##### pathAndSearch
|
|
132
|
+
|
|
133
|
+
`string`
|
|
134
|
+
|
|
135
|
+
The path and search to combine.
|
|
136
|
+
|
|
137
|
+
#### Returns
|
|
138
|
+
|
|
139
|
+
`string` \| `undefined`
|
|
140
|
+
|
|
141
|
+
The combined parts.
|
|
142
|
+
|
|
143
|
+
***
|
|
144
|
+
|
|
145
|
+
### replaceOrigin()
|
|
146
|
+
|
|
147
|
+
> `static` **replaceOrigin**(`url`, `newOrigin?`): `string`
|
|
148
|
+
|
|
149
|
+
Replace the origin in the url.
|
|
150
|
+
|
|
151
|
+
#### Parameters
|
|
152
|
+
|
|
153
|
+
##### url
|
|
154
|
+
|
|
155
|
+
`string`
|
|
156
|
+
|
|
157
|
+
The url to replace the origin in.
|
|
158
|
+
|
|
159
|
+
##### newOrigin?
|
|
160
|
+
|
|
161
|
+
`string`
|
|
162
|
+
|
|
163
|
+
The new origin to use.
|
|
164
|
+
|
|
165
|
+
#### Returns
|
|
166
|
+
|
|
167
|
+
`string`
|
|
168
|
+
|
|
169
|
+
The url with the replaced origin.
|
package/docs/reference/index.md
CHANGED
|
@@ -4,15 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
- [HttpErrorHelper](classes/HttpErrorHelper.md)
|
|
6
6
|
- [HttpParameterHelper](classes/HttpParameterHelper.md)
|
|
7
|
+
- [HttpUrlHelper](classes/HttpUrlHelper.md)
|
|
7
8
|
|
|
8
9
|
## Interfaces
|
|
9
10
|
|
|
10
11
|
- [IServerFavIconResponse](interfaces/IServerFavIconResponse.md)
|
|
11
12
|
- [IServerHealthResponse](interfaces/IServerHealthResponse.md)
|
|
12
13
|
- [IServerInfoResponse](interfaces/IServerInfoResponse.md)
|
|
14
|
+
- [IServerLivezResponse](interfaces/IServerLivezResponse.md)
|
|
13
15
|
- [IServerRootResponse](interfaces/IServerRootResponse.md)
|
|
14
16
|
- [IServerSpecResponse](interfaces/IServerSpecResponse.md)
|
|
15
|
-
- [IAuthenticationGenerator](interfaces/IAuthenticationGenerator.md)
|
|
16
17
|
- [IBaseRestClientConfig](interfaces/IBaseRestClientConfig.md)
|
|
17
18
|
- [IBaseSocketClientConfig](interfaces/IBaseSocketClientConfig.md)
|
|
18
19
|
- [IHttpRequest](interfaces/IHttpRequest.md)
|
|
@@ -51,9 +52,13 @@
|
|
|
51
52
|
- [ISocketRouteProcessor](interfaces/ISocketRouteProcessor.md)
|
|
52
53
|
- [IWebServer](interfaces/IWebServer.md)
|
|
53
54
|
- [IWebServerOptions](interfaces/IWebServerOptions.md)
|
|
55
|
+
- [IHealthComponentInfo](interfaces/IHealthComponentInfo.md)
|
|
54
56
|
- [IHealthInfo](interfaces/IHealthInfo.md)
|
|
57
|
+
- [IHostingComponent](interfaces/IHostingComponent.md)
|
|
55
58
|
- [IInformationComponent](interfaces/IInformationComponent.md)
|
|
56
59
|
- [IServerInfo](interfaces/IServerInfo.md)
|
|
60
|
+
- [ITenant](interfaces/ITenant.md)
|
|
61
|
+
- [ITenantAdminComponent](interfaces/ITenantAdminComponent.md)
|
|
57
62
|
|
|
58
63
|
## Type Aliases
|
|
59
64
|
|
|
@@ -63,7 +68,6 @@
|
|
|
63
68
|
|
|
64
69
|
## Variables
|
|
65
70
|
|
|
66
|
-
- [AuthenticationGeneratorFactory](variables/AuthenticationGeneratorFactory.md)
|
|
67
71
|
- [MimeTypeProcessorFactory](variables/MimeTypeProcessorFactory.md)
|
|
68
72
|
- [RestRouteProcessorFactory](variables/RestRouteProcessorFactory.md)
|
|
69
73
|
- [SocketRouteProcessorFactory](variables/SocketRouteProcessorFactory.md)
|
|
@@ -29,7 +29,23 @@ The path to use for routing.
|
|
|
29
29
|
|
|
30
30
|
> `optional` **skipAuth**: `boolean`
|
|
31
31
|
|
|
32
|
-
Skips the authentication for this route.
|
|
32
|
+
Skips the authentication requirement for this route.
|
|
33
|
+
|
|
34
|
+
***
|
|
35
|
+
|
|
36
|
+
### skipTenant?
|
|
37
|
+
|
|
38
|
+
> `optional` **skipTenant**: `boolean`
|
|
39
|
+
|
|
40
|
+
Skips the tenant requirement for this route.
|
|
41
|
+
|
|
42
|
+
***
|
|
43
|
+
|
|
44
|
+
### requiredScope?
|
|
45
|
+
|
|
46
|
+
> `optional` **requiredScope**: `string`[]
|
|
47
|
+
|
|
48
|
+
The user must have one of the specified scopes to access the route.
|
|
33
49
|
|
|
34
50
|
***
|
|
35
51
|
|
|
@@ -41,7 +41,7 @@ The features supported by this processor.
|
|
|
41
41
|
|
|
42
42
|
### pre()?
|
|
43
43
|
|
|
44
|
-
> `optional` **pre**(`request`, `response`, `route`, `contextIds`, `processorState`, `
|
|
44
|
+
> `optional` **pre**(`request`, `response`, `route`, `contextIds`, `processorState`, `componentTypes?`): `Promise`\<`void`\>
|
|
45
45
|
|
|
46
46
|
Pre process the REST request for the specified route.
|
|
47
47
|
|
|
@@ -75,11 +75,21 @@ The context IDs of the request.
|
|
|
75
75
|
|
|
76
76
|
The state handed through the processors.
|
|
77
77
|
|
|
78
|
-
#####
|
|
78
|
+
##### componentTypes?
|
|
79
|
+
|
|
80
|
+
The component types for the request.
|
|
81
|
+
|
|
82
|
+
###### loggingComponentType?
|
|
83
|
+
|
|
84
|
+
`string`
|
|
85
|
+
|
|
86
|
+
The logging component type.
|
|
87
|
+
|
|
88
|
+
###### hostingComponentType?
|
|
79
89
|
|
|
80
90
|
`string`
|
|
81
91
|
|
|
82
|
-
The
|
|
92
|
+
The hosting component type.
|
|
83
93
|
|
|
84
94
|
#### Returns
|
|
85
95
|
|
|
@@ -91,7 +101,7 @@ Promise that resolves when the request is processed.
|
|
|
91
101
|
|
|
92
102
|
### post()?
|
|
93
103
|
|
|
94
|
-
> `optional` **post**(`request`, `response`, `route`, `contextIds`, `processorState`, `
|
|
104
|
+
> `optional` **post**(`request`, `response`, `route`, `contextIds`, `processorState`, `componentTypes?`): `Promise`\<`void`\>
|
|
95
105
|
|
|
96
106
|
Post process the REST request for the specified route.
|
|
97
107
|
|
|
@@ -125,11 +135,21 @@ The context IDs of the request.
|
|
|
125
135
|
|
|
126
136
|
The state handed through the processors.
|
|
127
137
|
|
|
128
|
-
#####
|
|
138
|
+
##### componentTypes?
|
|
139
|
+
|
|
140
|
+
The component types for the request.
|
|
141
|
+
|
|
142
|
+
###### loggingComponentType?
|
|
143
|
+
|
|
144
|
+
`string`
|
|
145
|
+
|
|
146
|
+
The logging component type.
|
|
147
|
+
|
|
148
|
+
###### hostingComponentType?
|
|
129
149
|
|
|
130
150
|
`string`
|
|
131
151
|
|
|
132
|
-
The
|
|
152
|
+
The hosting component type.
|
|
133
153
|
|
|
134
154
|
#### Returns
|
|
135
155
|
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Interface: IHealthComponentInfo
|
|
2
|
+
|
|
3
|
+
The health component information.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### name
|
|
8
|
+
|
|
9
|
+
> **name**: `string`
|
|
10
|
+
|
|
11
|
+
The name of the component.
|
|
12
|
+
|
|
13
|
+
***
|
|
14
|
+
|
|
15
|
+
### status
|
|
16
|
+
|
|
17
|
+
> **status**: [`HealthStatus`](../type-aliases/HealthStatus.md)
|
|
18
|
+
|
|
19
|
+
The status of the component.
|
|
20
|
+
|
|
21
|
+
***
|
|
22
|
+
|
|
23
|
+
### details?
|
|
24
|
+
|
|
25
|
+
> `optional` **details**: `string`
|
|
26
|
+
|
|
27
|
+
The details for the status.
|
|
@@ -14,24 +14,6 @@ The status.
|
|
|
14
14
|
|
|
15
15
|
### components?
|
|
16
16
|
|
|
17
|
-
> `optional` **components**: `
|
|
17
|
+
> `optional` **components**: [`IHealthComponentInfo`](IHealthComponentInfo.md)[]
|
|
18
18
|
|
|
19
19
|
The status of the components.
|
|
20
|
-
|
|
21
|
-
#### name
|
|
22
|
-
|
|
23
|
-
> **name**: `string`
|
|
24
|
-
|
|
25
|
-
The name of the component.
|
|
26
|
-
|
|
27
|
-
#### status
|
|
28
|
-
|
|
29
|
-
> **status**: [`HealthStatus`](../type-aliases/HealthStatus.md)
|
|
30
|
-
|
|
31
|
-
The status of the component.
|
|
32
|
-
|
|
33
|
-
#### details?
|
|
34
|
-
|
|
35
|
-
> `optional` **details**: `string`
|
|
36
|
-
|
|
37
|
-
The details for the status.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Interface: IHostingComponent
|
|
2
|
+
|
|
3
|
+
The information about the hosting of the API.
|
|
4
|
+
|
|
5
|
+
## Extends
|
|
6
|
+
|
|
7
|
+
- `IComponent`
|
|
8
|
+
|
|
9
|
+
## Methods
|
|
10
|
+
|
|
11
|
+
### getPublicOrigin()
|
|
12
|
+
|
|
13
|
+
> **getPublicOrigin**(`serverRequestUrl?`): `Promise`\<`string`\>
|
|
14
|
+
|
|
15
|
+
Get the public origin for the hosting.
|
|
16
|
+
|
|
17
|
+
#### Parameters
|
|
18
|
+
|
|
19
|
+
##### serverRequestUrl?
|
|
20
|
+
|
|
21
|
+
`string`
|
|
22
|
+
|
|
23
|
+
The url of the current server request if there is one.
|
|
24
|
+
|
|
25
|
+
#### Returns
|
|
26
|
+
|
|
27
|
+
`Promise`\<`string`\>
|
|
28
|
+
|
|
29
|
+
The public origin.
|
|
30
|
+
|
|
31
|
+
***
|
|
32
|
+
|
|
33
|
+
### getTenantOrigin()
|
|
34
|
+
|
|
35
|
+
> **getTenantOrigin**(`tenantId`): `Promise`\<`string` \| `undefined`\>
|
|
36
|
+
|
|
37
|
+
Get the public origin for the tenant if one exists.
|
|
38
|
+
|
|
39
|
+
#### Parameters
|
|
40
|
+
|
|
41
|
+
##### tenantId
|
|
42
|
+
|
|
43
|
+
`string`
|
|
44
|
+
|
|
45
|
+
The tenant identifier.
|
|
46
|
+
|
|
47
|
+
#### Returns
|
|
48
|
+
|
|
49
|
+
`Promise`\<`string` \| `undefined`\>
|
|
50
|
+
|
|
51
|
+
The public origin for the tenant.
|
|
52
|
+
|
|
53
|
+
***
|
|
54
|
+
|
|
55
|
+
### buildPublicUrl()
|
|
56
|
+
|
|
57
|
+
> **buildPublicUrl**(`url`): `Promise`\<`string`\>
|
|
58
|
+
|
|
59
|
+
Build a public url based on the public origin and the url provided.
|
|
60
|
+
|
|
61
|
+
#### Parameters
|
|
62
|
+
|
|
63
|
+
##### url
|
|
64
|
+
|
|
65
|
+
`string`
|
|
66
|
+
|
|
67
|
+
The url to build upon the public origin.
|
|
68
|
+
|
|
69
|
+
#### Returns
|
|
70
|
+
|
|
71
|
+
`Promise`\<`string`\>
|
|
72
|
+
|
|
73
|
+
The full url based on the public origin.
|
|
@@ -33,3 +33,11 @@ The state handed through the processors.
|
|
|
33
33
|
> `optional` **loggingComponentType**: `string`
|
|
34
34
|
|
|
35
35
|
Logging component type for the request.
|
|
36
|
+
|
|
37
|
+
***
|
|
38
|
+
|
|
39
|
+
### hostingComponentType?
|
|
40
|
+
|
|
41
|
+
> `optional` **hostingComponentType**: `string`
|
|
42
|
+
|
|
43
|
+
Hosting component type for the request.
|
|
@@ -66,16 +66,16 @@ Data to return send as the body.
|
|
|
66
66
|
|
|
67
67
|
***
|
|
68
68
|
|
|
69
|
-
###
|
|
69
|
+
### url
|
|
70
70
|
|
|
71
|
-
>
|
|
71
|
+
> **url**: `string`
|
|
72
72
|
|
|
73
|
-
The request
|
|
73
|
+
The request url.
|
|
74
74
|
|
|
75
75
|
***
|
|
76
76
|
|
|
77
|
-
###
|
|
77
|
+
### method?
|
|
78
78
|
|
|
79
|
-
> `optional` **
|
|
79
|
+
> `optional` **method**: `HttpMethod`
|
|
80
80
|
|
|
81
|
-
The request
|
|
81
|
+
The request method.
|
|
@@ -64,6 +64,20 @@ The OpenAPI spec.
|
|
|
64
64
|
|
|
65
65
|
***
|
|
66
66
|
|
|
67
|
+
### livez()
|
|
68
|
+
|
|
69
|
+
> **livez**(): `Promise`\<`boolean`\>
|
|
70
|
+
|
|
71
|
+
Is the server live.
|
|
72
|
+
|
|
73
|
+
#### Returns
|
|
74
|
+
|
|
75
|
+
`Promise`\<`boolean`\>
|
|
76
|
+
|
|
77
|
+
True if the server is live.
|
|
78
|
+
|
|
79
|
+
***
|
|
80
|
+
|
|
67
81
|
### health()
|
|
68
82
|
|
|
69
83
|
> **health**(): `Promise`\<[`IHealthInfo`](IHealthInfo.md)\>
|
|
@@ -80,7 +94,7 @@ The service health.
|
|
|
80
94
|
|
|
81
95
|
### setComponentHealth()
|
|
82
96
|
|
|
83
|
-
> **setComponentHealth**(`name`, `status`, `details?`): `Promise`\<`void`\>
|
|
97
|
+
> **setComponentHealth**(`name`, `status`, `details?`, `tenantId?`): `Promise`\<`void`\>
|
|
84
98
|
|
|
85
99
|
Set the status of a component.
|
|
86
100
|
|
|
@@ -104,6 +118,12 @@ The status of the component.
|
|
|
104
118
|
|
|
105
119
|
The details for the status.
|
|
106
120
|
|
|
121
|
+
##### tenantId?
|
|
122
|
+
|
|
123
|
+
`string`
|
|
124
|
+
|
|
125
|
+
The tenant id, optional if the health status is not tenant specific.
|
|
126
|
+
|
|
107
127
|
#### Returns
|
|
108
128
|
|
|
109
129
|
`Promise`\<`void`\>
|
|
@@ -114,7 +134,7 @@ Nothing.
|
|
|
114
134
|
|
|
115
135
|
### removeComponentHealth()
|
|
116
136
|
|
|
117
|
-
> **removeComponentHealth**(`name`): `Promise`\<`void`\>
|
|
137
|
+
> **removeComponentHealth**(`name`, `tenantId?`): `Promise`\<`void`\>
|
|
118
138
|
|
|
119
139
|
Remove the status of a component.
|
|
120
140
|
|
|
@@ -126,6 +146,12 @@ Remove the status of a component.
|
|
|
126
146
|
|
|
127
147
|
The component name.
|
|
128
148
|
|
|
149
|
+
##### tenantId?
|
|
150
|
+
|
|
151
|
+
`string`
|
|
152
|
+
|
|
153
|
+
The tenant id, optional if the health status is not tenant specific.
|
|
154
|
+
|
|
129
155
|
#### Returns
|
|
130
156
|
|
|
131
157
|
`Promise`\<`void`\>
|
|
@@ -46,7 +46,7 @@ The path to use for routing.
|
|
|
46
46
|
|
|
47
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,6 +54,30 @@ Skips the authentication for this route.
|
|
|
54
54
|
|
|
55
55
|
***
|
|
56
56
|
|
|
57
|
+
### skipTenant?
|
|
58
|
+
|
|
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?
|
|
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
|
+
|
|
57
81
|
### processorFeatures?
|
|
58
82
|
|
|
59
83
|
> `optional` **processorFeatures**: `string`[]
|
|
@@ -30,7 +30,7 @@ The features supported by this processor.
|
|
|
30
30
|
|
|
31
31
|
### 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
|
|
|
@@ -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
|
|
|
@@ -84,7 +94,7 @@ Promise that resolves when the request is processed.
|
|
|
84
94
|
|
|
85
95
|
### 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
|
|
|
@@ -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?
|
|
136
|
+
|
|
137
|
+
`string`
|
|
138
|
+
|
|
139
|
+
The logging component type.
|
|
140
|
+
|
|
141
|
+
###### hostingComponentType?
|
|
122
142
|
|
|
123
143
|
`string`
|
|
124
144
|
|
|
125
|
-
The
|
|
145
|
+
The hosting component type.
|
|
126
146
|
|
|
127
147
|
#### Returns
|
|
128
148
|
|
|
@@ -138,7 +158,7 @@ Promise that resolves when the request is processed.
|
|
|
138
158
|
|
|
139
159
|
### process()?
|
|
140
160
|
|
|
141
|
-
> `optional` **process**(`request`, `response`, `route`, `processorState`, `
|
|
161
|
+
> `optional` **process**(`request`, `response`, `route`, `processorState`, `componentTypes?`): `Promise`\<`void`\>
|
|
142
162
|
|
|
143
163
|
Process the REST request for the specified route.
|
|
144
164
|
|
|
@@ -166,11 +186,21 @@ The route being requested, if a matching one was found.
|
|
|
166
186
|
|
|
167
187
|
The state handed through the processors.
|
|
168
188
|
|
|
169
|
-
#####
|
|
189
|
+
##### componentTypes?
|
|
190
|
+
|
|
191
|
+
The component types for the request.
|
|
192
|
+
|
|
193
|
+
###### loggingComponentType?
|
|
194
|
+
|
|
195
|
+
`string`
|
|
196
|
+
|
|
197
|
+
The logging component type.
|
|
198
|
+
|
|
199
|
+
###### hostingComponentType?
|
|
170
200
|
|
|
171
201
|
`string`
|
|
172
202
|
|
|
173
|
-
The
|
|
203
|
+
The hosting component type.
|
|
174
204
|
|
|
175
205
|
#### Returns
|
|
176
206
|
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Interface: IServerLivezResponse
|
|
2
|
+
|
|
3
|
+
The livez of the server.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### 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
|
|
20
|
+
|
|
21
|
+
> **body**: `"ok"` \| `"failed"`
|
|
22
|
+
|
|
23
|
+
The livez information for the server.
|