@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.
Files changed (156) hide show
  1. package/README.md +1 -1
  2. package/dist/es/errors/forbiddenError.js +23 -0
  3. package/dist/es/errors/forbiddenError.js.map +1 -0
  4. package/dist/es/errors/tooManyRequestsError.js +25 -0
  5. package/dist/es/errors/tooManyRequestsError.js.map +1 -0
  6. package/dist/es/helpers/httpErrorHelper.js +34 -20
  7. package/dist/es/helpers/httpErrorHelper.js.map +1 -1
  8. package/dist/es/helpers/httpUrlHelper.js +105 -0
  9. package/dist/es/helpers/httpUrlHelper.js.map +1 -0
  10. package/dist/es/index.js +13 -4
  11. package/dist/es/index.js.map +1 -1
  12. package/dist/es/models/api/IServerHealthResponse.js.map +1 -1
  13. package/dist/es/models/api/IServerLivezResponse.js +2 -0
  14. package/dist/es/models/api/IServerLivezResponse.js.map +1 -0
  15. package/dist/es/models/api/IServerReadyzResponse.js +2 -0
  16. package/dist/es/models/api/IServerReadyzResponse.js.map +1 -0
  17. package/dist/es/models/api/IServerRootResponse.js +0 -2
  18. package/dist/es/models/api/IServerRootResponse.js.map +1 -1
  19. package/dist/es/models/config/IBaseRestClientConfig.js.map +1 -1
  20. package/dist/es/models/httpContextIdKeys.js +21 -0
  21. package/dist/es/models/httpContextIdKeys.js.map +1 -0
  22. package/dist/es/models/protocol/IHttpRequestContext.js.map +1 -1
  23. package/dist/es/models/protocol/IHttpRequestPathParams.js.map +1 -1
  24. package/dist/es/models/protocol/IHttpRequestQuery.js.map +1 -1
  25. package/dist/es/models/protocol/IHttpServerRequest.js.map +1 -1
  26. package/dist/es/models/responses/errors/IConflictResponse.js.map +1 -1
  27. package/dist/es/models/responses/errors/INotImplementedResponse.js +2 -0
  28. package/dist/es/models/responses/errors/INotImplementedResponse.js.map +1 -0
  29. package/dist/es/models/responses/errors/ITooManyRequestsResponse.js +2 -0
  30. package/dist/es/models/responses/errors/ITooManyRequestsResponse.js.map +1 -0
  31. package/dist/es/models/routes/IBaseRoute.js.map +1 -1
  32. package/dist/es/models/server/IBaseRouteProcessor.js.map +1 -1
  33. package/dist/es/models/server/IRestRouteProcessor.js.map +1 -1
  34. package/dist/es/models/server/ISocketRouteProcessor.js.map +1 -1
  35. package/dist/es/models/server/IWebServer.js.map +1 -1
  36. package/dist/es/models/services/IHealthComponent.js +2 -0
  37. package/dist/es/models/services/IHealthComponent.js.map +1 -0
  38. package/dist/es/models/services/IHostingComponent.js +2 -0
  39. package/dist/es/models/services/IHostingComponent.js.map +1 -0
  40. package/dist/es/models/services/IInformationComponent.js.map +1 -1
  41. package/dist/es/models/services/ITenant.js +4 -0
  42. package/dist/es/models/services/ITenant.js.map +1 -0
  43. package/dist/es/models/services/ITenantAdminComponent.js +2 -0
  44. package/dist/es/models/services/ITenantAdminComponent.js.map +1 -0
  45. package/dist/es/models/services/IUrlTransformerComponent.js +2 -0
  46. package/dist/es/models/services/IUrlTransformerComponent.js.map +1 -0
  47. package/dist/types/errors/forbiddenError.d.ts +20 -0
  48. package/dist/types/errors/tooManyRequestsError.d.ts +22 -0
  49. package/dist/types/helpers/httpErrorHelper.d.ts +6 -0
  50. package/dist/types/helpers/httpUrlHelper.d.ts +55 -0
  51. package/dist/types/index.d.ts +13 -4
  52. package/dist/types/models/api/IServerHealthResponse.d.ts +6 -3
  53. package/dist/types/models/api/IServerLivezResponse.d.ts +16 -0
  54. package/dist/types/models/api/IServerReadyzResponse.d.ts +16 -0
  55. package/dist/types/models/api/IServerRootResponse.d.ts +7 -0
  56. package/dist/types/models/config/IBaseRestClientConfig.d.ts +16 -0
  57. package/dist/types/models/httpContextIdKeys.d.ts +21 -0
  58. package/dist/types/models/protocol/IHttpRequestContext.d.ts +4 -0
  59. package/dist/types/models/protocol/IHttpRequestPathParams.d.ts +1 -1
  60. package/dist/types/models/protocol/IHttpRequestQuery.d.ts +1 -1
  61. package/dist/types/models/protocol/IHttpServerRequest.d.ts +4 -4
  62. package/dist/types/models/responses/errors/IConflictResponse.d.ts +1 -6
  63. package/dist/types/models/responses/errors/INotImplementedResponse.d.ts +15 -0
  64. package/dist/types/models/responses/errors/ITooManyRequestsResponse.d.ts +15 -0
  65. package/dist/types/models/routes/IBaseRoute.d.ts +9 -1
  66. package/dist/types/models/server/IBaseRouteProcessor.d.ts +14 -4
  67. package/dist/types/models/server/IRestRouteProcessor.d.ts +7 -2
  68. package/dist/types/models/server/IWebServer.d.ts +7 -1
  69. package/dist/types/models/services/IHealthComponent.d.ts +14 -0
  70. package/dist/types/models/services/IHostingComponent.d.ts +24 -0
  71. package/dist/types/models/services/IInformationComponent.d.ts +10 -17
  72. package/dist/types/models/services/ITenant.d.ts +33 -0
  73. package/dist/types/models/services/ITenantAdminComponent.d.ts +63 -0
  74. package/dist/types/models/services/IUrlTransformerComponent.d.ts +66 -0
  75. package/docs/changelog.md +278 -58
  76. package/docs/examples.md +200 -1
  77. package/docs/reference/classes/ForbiddenError.md +55 -0
  78. package/docs/reference/classes/HttpErrorHelper.md +14 -2
  79. package/docs/reference/classes/HttpParameterHelper.md +4 -4
  80. package/docs/reference/classes/HttpUrlHelper.md +197 -0
  81. package/docs/reference/classes/TooManyRequestsError.md +67 -0
  82. package/docs/reference/index.md +14 -5
  83. package/docs/reference/interfaces/IAcceptedResponse.md +2 -2
  84. package/docs/reference/interfaces/IBadRequestResponse.md +2 -2
  85. package/docs/reference/interfaces/IBaseRestClientConfig.md +57 -9
  86. package/docs/reference/interfaces/IBaseRoute.md +25 -9
  87. package/docs/reference/interfaces/IBaseRouteEntryPoint.md +4 -4
  88. package/docs/reference/interfaces/IBaseRouteProcessor.md +33 -13
  89. package/docs/reference/interfaces/IBaseSocketClientConfig.md +7 -7
  90. package/docs/reference/interfaces/IConflictResponse.md +3 -11
  91. package/docs/reference/interfaces/ICreatedResponse.md +2 -2
  92. package/docs/reference/interfaces/IForbiddenResponse.md +2 -2
  93. package/docs/reference/interfaces/IHealthComponent.md +21 -0
  94. package/docs/reference/interfaces/IHostingComponent.md +73 -0
  95. package/docs/reference/interfaces/IHttpRequest.md +8 -8
  96. package/docs/reference/interfaces/IHttpRequestContext.md +12 -4
  97. package/docs/reference/interfaces/IHttpRequestPathParams.md +1 -1
  98. package/docs/reference/interfaces/IHttpRequestQuery.md +1 -1
  99. package/docs/reference/interfaces/IHttpResponse.md +6 -6
  100. package/docs/reference/interfaces/IHttpServerRequest.md +14 -14
  101. package/docs/reference/interfaces/IInformationComponent.md +14 -56
  102. package/docs/reference/interfaces/IInternalServerErrorResponse.md +2 -2
  103. package/docs/reference/interfaces/IMimeTypeProcessor.md +2 -2
  104. package/docs/reference/interfaces/INoContentRequest.md +8 -8
  105. package/docs/reference/interfaces/INoContentResponse.md +1 -1
  106. package/docs/reference/interfaces/INotFoundResponse.md +3 -3
  107. package/docs/reference/interfaces/INotImplementedResponse.md +19 -0
  108. package/docs/reference/interfaces/IOkResponse.md +1 -1
  109. package/docs/reference/interfaces/IRestRoute.md +47 -23
  110. package/docs/reference/interfaces/IRestRouteExample.md +3 -3
  111. package/docs/reference/interfaces/IRestRouteProcessor.md +49 -19
  112. package/docs/reference/interfaces/IRestRouteRequestExample.md +4 -4
  113. package/docs/reference/interfaces/IRestRouteResponseAttachmentOptions.md +6 -6
  114. package/docs/reference/interfaces/IRestRouteResponseExample.md +4 -4
  115. package/docs/reference/interfaces/IRestRouteResponseOptions.md +2 -2
  116. package/docs/reference/interfaces/IServerFavIconResponse.md +7 -7
  117. package/docs/reference/interfaces/IServerHealthResponse.md +11 -3
  118. package/docs/reference/interfaces/IServerInfo.md +2 -2
  119. package/docs/reference/interfaces/IServerInfoResponse.md +1 -1
  120. package/docs/reference/interfaces/IServerLivezResponse.md +23 -0
  121. package/docs/reference/interfaces/IServerReadyzResponse.md +23 -0
  122. package/docs/reference/interfaces/IServerRootResponse.md +13 -1
  123. package/docs/reference/interfaces/IServerSpecResponse.md +4 -4
  124. package/docs/reference/interfaces/ISocketRequestContext.md +17 -5
  125. package/docs/reference/interfaces/ISocketRoute.md +38 -14
  126. package/docs/reference/interfaces/ISocketRouteProcessor.md +42 -22
  127. package/docs/reference/interfaces/ISocketServerRequest.md +17 -17
  128. package/docs/reference/interfaces/ITag.md +2 -2
  129. package/docs/reference/interfaces/ITenant.md +59 -0
  130. package/docs/reference/interfaces/ITenantAdminComponent.md +193 -0
  131. package/docs/reference/interfaces/ITooManyRequestsResponse.md +19 -0
  132. package/docs/reference/interfaces/IUnauthorizedResponse.md +2 -2
  133. package/docs/reference/interfaces/IUnprocessableEntityResponse.md +2 -2
  134. package/docs/reference/interfaces/IUrlTransformerComponent.md +229 -0
  135. package/docs/reference/interfaces/IWebServer.md +34 -4
  136. package/docs/reference/interfaces/IWebServerOptions.md +12 -12
  137. package/docs/reference/type-aliases/HttpContextIdKeys.md +5 -0
  138. package/docs/reference/variables/HttpContextIdKeys.md +25 -0
  139. package/package.json +2 -2
  140. package/dist/es/factories/authenticationGeneratorFactory.js +0 -9
  141. package/dist/es/factories/authenticationGeneratorFactory.js.map +0 -1
  142. package/dist/es/models/client/IAuthenticationGenerator.js +0 -2
  143. package/dist/es/models/client/IAuthenticationGenerator.js.map +0 -1
  144. package/dist/es/models/services/IHealthInfo.js +0 -2
  145. package/dist/es/models/services/IHealthInfo.js.map +0 -1
  146. package/dist/es/models/services/healthStatus.js +0 -21
  147. package/dist/es/models/services/healthStatus.js.map +0 -1
  148. package/dist/types/factories/authenticationGeneratorFactory.d.ts +0 -6
  149. package/dist/types/models/client/IAuthenticationGenerator.d.ts +0 -14
  150. package/dist/types/models/services/IHealthInfo.d.ts +0 -27
  151. package/dist/types/models/services/healthStatus.d.ts +0 -21
  152. package/docs/reference/interfaces/IAuthenticationGenerator.md +0 -35
  153. package/docs/reference/interfaces/IHealthInfo.md +0 -37
  154. package/docs/reference/type-aliases/HealthStatus.md +0 -5
  155. package/docs/reference/variables/AuthenticationGeneratorFactory.md +0 -5
  156. package/docs/reference/variables/HealthStatus.md +0 -25
@@ -4,7 +4,7 @@ Definition for the configuration of a rest client.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### endpoint
7
+ ### endpoint {#endpoint}
8
8
 
9
9
  > **endpoint**: `string`
10
10
 
@@ -12,32 +12,80 @@ The endpoint where the api is hosted.
12
12
 
13
13
  ***
14
14
 
15
- ### pathPrefix?
15
+ ### pathPrefix? {#pathprefix}
16
16
 
17
- > `optional` **pathPrefix**: `string`
17
+ > `optional` **pathPrefix?**: `string`
18
18
 
19
19
  The prefix to the routes.
20
20
 
21
21
  ***
22
22
 
23
- ### headers?
23
+ ### headers? {#headers}
24
24
 
25
- > `optional` **headers**: `IHttpHeaders`
25
+ > `optional` **headers?**: `IHttpHeaders`
26
26
 
27
27
  The headers to include in requests.
28
28
 
29
29
  ***
30
30
 
31
- ### timeout?
31
+ ### timeout? {#timeout}
32
32
 
33
- > `optional` **timeout**: `number`
33
+ > `optional` **timeout?**: `number`
34
34
 
35
35
  Timeout for requests in ms.
36
36
 
37
37
  ***
38
38
 
39
- ### includeCredentials?
39
+ ### includeCredentials? {#includecredentials}
40
40
 
41
- > `optional` **includeCredentials**: `boolean`
41
+ > `optional` **includeCredentials?**: `boolean`
42
42
 
43
43
  Include credentials in the request, defaults to true.
44
+
45
+ ***
46
+
47
+ ### customHeaders? {#customheaders}
48
+
49
+ > `optional` **customHeaders?**: () => `Promise`\<`IHttpHeaders`\>
50
+
51
+ Hook to provide headers asynchronously.
52
+
53
+ #### Returns
54
+
55
+ `Promise`\<`IHttpHeaders`\>
56
+
57
+ A promise that resolves to the headers.
58
+
59
+ ***
60
+
61
+ ### customAuthHeader? {#customauthheader}
62
+
63
+ > `optional` **customAuthHeader?**: () => `Promise`\<`string`\>
64
+
65
+ Hook to provide an authorization header value asynchronously.
66
+
67
+ #### Returns
68
+
69
+ `Promise`\<`string`\>
70
+
71
+ A promise that resolves to the authorization header value.
72
+
73
+ ***
74
+
75
+ ### onAuthFailure? {#onauthfailure}
76
+
77
+ > `optional` **onAuthFailure?**: (`err`) => `Promise`\<`void`\>
78
+
79
+ Hook to handle authorization failures asynchronously.
80
+
81
+ #### Parameters
82
+
83
+ ##### err
84
+
85
+ `IError`
86
+
87
+ #### Returns
88
+
89
+ `Promise`\<`void`\>
90
+
91
+ A promise that resolves when the auth failure handling is complete.
@@ -9,7 +9,7 @@ Interface which defines a route.
9
9
 
10
10
  ## Properties
11
11
 
12
- ### operationId
12
+ ### operationId {#operationid}
13
13
 
14
14
  > **operationId**: `string`
15
15
 
@@ -17,7 +17,7 @@ The id of the operation.
17
17
 
18
18
  ***
19
19
 
20
- ### path
20
+ ### path {#path}
21
21
 
22
22
  > **path**: `string`
23
23
 
@@ -25,25 +25,41 @@ The path to use for routing.
25
25
 
26
26
  ***
27
27
 
28
- ### skipAuth?
28
+ ### skipAuth? {#skipauth}
29
29
 
30
- > `optional` **skipAuth**: `boolean`
30
+ > `optional` **skipAuth?**: `boolean`
31
31
 
32
- Skips the authentication for this route.
32
+ Skips the authentication requirement for this route.
33
33
 
34
34
  ***
35
35
 
36
- ### processorFeatures?
36
+ ### skipTenant? {#skiptenant}
37
37
 
38
- > `optional` **processorFeatures**: `string`[]
38
+ > `optional` **skipTenant?**: `boolean`
39
+
40
+ Skips the tenant requirement for this route.
41
+
42
+ ***
43
+
44
+ ### requiredScope? {#requiredscope}
45
+
46
+ > `optional` **requiredScope?**: `string`[]
47
+
48
+ The user must have one of the specified scopes to access the route.
49
+
50
+ ***
51
+
52
+ ### processorFeatures? {#processorfeatures}
53
+
54
+ > `optional` **processorFeatures?**: `string`[]
39
55
 
40
56
  The features supported by additional processors to run for this route.
41
57
 
42
58
  ***
43
59
 
44
- ### processorData?
60
+ ### processorData? {#processordata}
45
61
 
46
- > `optional` **processorData**: `object`
62
+ > `optional` **processorData?**: `object`
47
63
 
48
64
  The data for additional processors to run for this route.
49
65
 
@@ -10,7 +10,7 @@ Route entry points are used for exposing the routes from a package.
10
10
 
11
11
  ## Properties
12
12
 
13
- ### name
13
+ ### name {#name}
14
14
 
15
15
  > **name**: `string`
16
16
 
@@ -18,7 +18,7 @@ The name of the routes.
18
18
 
19
19
  ***
20
20
 
21
- ### defaultBaseRoute
21
+ ### defaultBaseRoute {#defaultbaseroute}
22
22
 
23
23
  > **defaultBaseRoute**: `string`
24
24
 
@@ -26,7 +26,7 @@ The default base route name for the routes.
26
26
 
27
27
  ***
28
28
 
29
- ### tags
29
+ ### tags {#tags}
30
30
 
31
31
  > **tags**: [`ITag`](ITag.md)[]
32
32
 
@@ -34,7 +34,7 @@ The tags for the routes.
34
34
 
35
35
  ***
36
36
 
37
- ### generateRoutes()
37
+ ### generateRoutes {#generateroutes}
38
38
 
39
39
  > **generateRoutes**: (`baseRouteName`, `componentName`) => `T`[]
40
40
 
@@ -23,7 +23,7 @@ The definition for a base processor for handling REST routes.
23
23
 
24
24
  ## Methods
25
25
 
26
- ### features()?
26
+ ### features()? {#features}
27
27
 
28
28
  > `optional` **features**(): `string`[]
29
29
 
@@ -39,9 +39,9 @@ The features supported by this processor.
39
39
 
40
40
  ***
41
41
 
42
- ### pre()?
42
+ ### pre()? {#pre}
43
43
 
44
- > `optional` **pre**(`request`, `response`, `route`, `contextIds`, `processorState`, `loggingComponentType?`): `Promise`\<`void`\>
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
 
@@ -61,9 +61,9 @@ The response data to send if any.
61
61
 
62
62
  ##### route
63
63
 
64
- The route being requested, if a matching one was found.
64
+ `T` \| `undefined`
65
65
 
66
- `T` | `undefined`
66
+ The route being requested, if a matching one was found.
67
67
 
68
68
  ##### contextIds
69
69
 
@@ -75,11 +75,21 @@ The context IDs of the request.
75
75
 
76
76
  The state handed through the processors.
77
77
 
78
- ##### loggingComponentType?
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 logging component type for the request.
92
+ The hosting component type.
83
93
 
84
94
  #### Returns
85
95
 
@@ -89,9 +99,9 @@ Promise that resolves when the request is processed.
89
99
 
90
100
  ***
91
101
 
92
- ### post()?
102
+ ### post()? {#post}
93
103
 
94
- > `optional` **post**(`request`, `response`, `route`, `contextIds`, `processorState`, `loggingComponentType?`): `Promise`\<`void`\>
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
 
@@ -111,9 +121,9 @@ The response data to send if any.
111
121
 
112
122
  ##### route
113
123
 
114
- The route being requested, if a matching one was found.
124
+ `T` \| `undefined`
115
125
 
116
- `T` | `undefined`
126
+ The route being requested, if a matching one was found.
117
127
 
118
128
  ##### contextIds
119
129
 
@@ -125,11 +135,21 @@ The context IDs of the request.
125
135
 
126
136
  The state handed through the processors.
127
137
 
128
- ##### loggingComponentType?
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 logging component type for the request.
152
+ The hosting component type.
133
153
 
134
154
  #### Returns
135
155
 
@@ -4,15 +4,15 @@ Definition for the configuration of a socket service.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### basePath?
7
+ ### basePath? {#basepath}
8
8
 
9
- > `optional` **basePath**: `string`
9
+ > `optional` **basePath?**: `string`
10
10
 
11
11
  Base path for the socket service, defaults to /socket.
12
12
 
13
13
  ***
14
14
 
15
- ### endpoint
15
+ ### endpoint {#endpoint}
16
16
 
17
17
  > **endpoint**: `string`
18
18
 
@@ -20,16 +20,16 @@ The endpoint where the api is hosted.
20
20
 
21
21
  ***
22
22
 
23
- ### pathPrefix?
23
+ ### pathPrefix? {#pathprefix}
24
24
 
25
- > `optional` **pathPrefix**: `string`
25
+ > `optional` **pathPrefix?**: `string`
26
26
 
27
27
  The prefix to the routes.
28
28
 
29
29
  ***
30
30
 
31
- ### headers?
31
+ ### headers? {#headers}
32
32
 
33
- > `optional` **headers**: `IHttpHeaders`
33
+ > `optional` **headers?**: `IHttpHeaders`
34
34
 
35
35
  The headers to include in requests.
@@ -4,7 +4,7 @@ The request resulted in a conflicting operation, see the content for more detail
4
4
 
5
5
  ## Properties
6
6
 
7
- ### statusCode
7
+ ### statusCode {#statuscode}
8
8
 
9
9
  > **statusCode**: `409`
10
10
 
@@ -12,16 +12,8 @@ Response status code.
12
12
 
13
13
  ***
14
14
 
15
- ### body
15
+ ### body {#body}
16
16
 
17
- > **body**: `IError` & `object`
17
+ > **body**: `IError`
18
18
 
19
19
  The body which contains the error.
20
-
21
- #### Type Declaration
22
-
23
- ##### conflicts
24
-
25
- > **conflicts**: `string`[]
26
-
27
- The conflicting items.
@@ -4,7 +4,7 @@ The rest request ended in created response.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### statusCode
7
+ ### statusCode {#statuscode}
8
8
 
9
9
  > **statusCode**: `201`
10
10
 
@@ -12,7 +12,7 @@ Response status code.
12
12
 
13
13
  ***
14
14
 
15
- ### headers
15
+ ### headers {#headers}
16
16
 
17
17
  > **headers**: `object`
18
18
 
@@ -4,7 +4,7 @@ The operation that you tried to perform is not possible, see the content for mor
4
4
 
5
5
  ## Properties
6
6
 
7
- ### statusCode
7
+ ### statusCode {#statuscode}
8
8
 
9
9
  > **statusCode**: `403`
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
 
@@ -0,0 +1,21 @@
1
+ # Interface: IHealthComponent
2
+
3
+ The health component for the server.
4
+
5
+ ## Extends
6
+
7
+ - `IComponent`
8
+
9
+ ## Methods
10
+
11
+ ### healthStatus() {#healthstatus}
12
+
13
+ > **healthStatus**(): `Promise`\<\{ `status`: `HealthStatus`; `components`: `IHealth`[]; \}\>
14
+
15
+ Get the server health.
16
+
17
+ #### Returns
18
+
19
+ `Promise`\<\{ `status`: `HealthStatus`; `components`: `IHealth`[]; \}\>
20
+
21
+ The service health.
@@ -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() {#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() {#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() {#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.
@@ -15,32 +15,32 @@ Model for the standard parameters for an http request.
15
15
 
16
16
  ## Properties
17
17
 
18
- ### headers?
18
+ ### headers? {#headers}
19
19
 
20
- > `optional` **headers**: `IHttpHeaders`
20
+ > `optional` **headers?**: `IHttpHeaders`
21
21
 
22
22
  Incoming Http Headers.
23
23
 
24
24
  ***
25
25
 
26
- ### pathParams?
26
+ ### pathParams? {#pathparams}
27
27
 
28
- > `optional` **pathParams**: [`IHttpRequestPathParams`](IHttpRequestPathParams.md)
28
+ > `optional` **pathParams?**: [`IHttpRequestPathParams`](IHttpRequestPathParams.md)
29
29
 
30
30
  The path parameters.
31
31
 
32
32
  ***
33
33
 
34
- ### query?
34
+ ### query? {#query}
35
35
 
36
- > `optional` **query**: [`IHttpRequestQuery`](IHttpRequestQuery.md)
36
+ > `optional` **query?**: [`IHttpRequestQuery`](IHttpRequestQuery.md)
37
37
 
38
38
  The query parameters.
39
39
 
40
40
  ***
41
41
 
42
- ### body?
42
+ ### body? {#body}
43
43
 
44
- > `optional` **body**: `T`
44
+ > `optional` **body?**: `T`
45
45
 
46
46
  Data to return send as the body.
@@ -8,7 +8,7 @@ Context data from the HTTP request.
8
8
 
9
9
  ## Properties
10
10
 
11
- ### serverRequest
11
+ ### serverRequest {#serverrequest}
12
12
 
13
13
  > **serverRequest**: [`IHttpServerRequest`](IHttpServerRequest.md)
14
14
 
@@ -16,7 +16,7 @@ The raw HTTP request.
16
16
 
17
17
  ***
18
18
 
19
- ### processorState
19
+ ### processorState {#processorstate}
20
20
 
21
21
  > **processorState**: `object`
22
22
 
@@ -28,8 +28,16 @@ The state handed through the processors.
28
28
 
29
29
  ***
30
30
 
31
- ### loggingComponentType?
31
+ ### loggingComponentType? {#loggingcomponenttype}
32
32
 
33
- > `optional` **loggingComponentType**: `string`
33
+ > `optional` **loggingComponentType?**: `string`
34
34
 
35
35
  Logging component type for the request.
36
+
37
+ ***
38
+
39
+ ### hostingComponentType? {#hostingcomponenttype}
40
+
41
+ > `optional` **hostingComponentType?**: `string`
42
+
43
+ Hosting component type for the request.
@@ -4,4 +4,4 @@ Model for the standard parameters for an http request.
4
4
 
5
5
  ## Indexable
6
6
 
7
- \[`id`: `string`\]: `string` \| `number` \| `boolean`
7
+ > \[`id`: `string`\]: `string`
@@ -4,4 +4,4 @@ Model used for Http request query parameters.
4
4
 
5
5
  ## Indexable
6
6
 
7
- \[`id`: `string`\]: `string` \| `number` \| `boolean`
7
+ > \[`id`: `string`\]: `string`
@@ -10,24 +10,24 @@ Model for the standard parameters for an http response.
10
10
 
11
11
  ## Properties
12
12
 
13
- ### statusCode?
13
+ ### statusCode? {#statuscode}
14
14
 
15
- > `optional` **statusCode**: `HttpStatusCode`
15
+ > `optional` **statusCode?**: `HttpStatusCode`
16
16
 
17
17
  Response status code.
18
18
 
19
19
  ***
20
20
 
21
- ### headers?
21
+ ### headers? {#headers}
22
22
 
23
- > `optional` **headers**: `IHttpHeaders`
23
+ > `optional` **headers?**: `IHttpHeaders`
24
24
 
25
25
  Response headers.
26
26
 
27
27
  ***
28
28
 
29
- ### body?
29
+ ### body? {#body}
30
30
 
31
- > `optional` **body**: `T`
31
+ > `optional` **body?**: `T`
32
32
 
33
33
  Data to return as the main payload.
@@ -18,9 +18,9 @@ Model for the standard parameters for an http request.
18
18
 
19
19
  ## Properties
20
20
 
21
- ### headers?
21
+ ### headers? {#headers}
22
22
 
23
- > `optional` **headers**: `IHttpHeaders`
23
+ > `optional` **headers?**: `IHttpHeaders`
24
24
 
25
25
  Incoming Http Headers.
26
26
 
@@ -30,9 +30,9 @@ Incoming Http Headers.
30
30
 
31
31
  ***
32
32
 
33
- ### pathParams?
33
+ ### pathParams? {#pathparams}
34
34
 
35
- > `optional` **pathParams**: [`IHttpRequestPathParams`](IHttpRequestPathParams.md)
35
+ > `optional` **pathParams?**: [`IHttpRequestPathParams`](IHttpRequestPathParams.md)
36
36
 
37
37
  The path parameters.
38
38
 
@@ -42,9 +42,9 @@ The path parameters.
42
42
 
43
43
  ***
44
44
 
45
- ### query?
45
+ ### query? {#query}
46
46
 
47
- > `optional` **query**: [`IHttpRequestQuery`](IHttpRequestQuery.md)
47
+ > `optional` **query?**: [`IHttpRequestQuery`](IHttpRequestQuery.md)
48
48
 
49
49
  The query parameters.
50
50
 
@@ -54,9 +54,9 @@ The query parameters.
54
54
 
55
55
  ***
56
56
 
57
- ### body?
57
+ ### body? {#body}
58
58
 
59
- > `optional` **body**: `T`
59
+ > `optional` **body?**: `T`
60
60
 
61
61
  Data to return send as the body.
62
62
 
@@ -66,16 +66,16 @@ Data to return send as the body.
66
66
 
67
67
  ***
68
68
 
69
- ### method?
69
+ ### url {#url}
70
70
 
71
- > `optional` **method**: `HttpMethod`
71
+ > **url**: `string`
72
72
 
73
- The request method.
73
+ The request url.
74
74
 
75
75
  ***
76
76
 
77
- ### url?
77
+ ### method? {#method}
78
78
 
79
- > `optional` **url**: `string`
79
+ > `optional` **method?**: `HttpMethod`
80
80
 
81
- The request url.
81
+ The request method.