@twin.org/api-models 0.0.3-next.29 → 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/dist/es/index.js +3 -3
- package/dist/es/index.js.map +1 -1
- package/dist/es/models/api/IServerHealthResponse.js.map +1 -1
- package/dist/es/models/api/IServerLivezResponse.js.map +1 -1
- package/dist/es/models/api/IServerReadyzResponse.js +2 -0
- package/dist/es/models/api/IServerReadyzResponse.js.map +1 -0
- package/dist/es/models/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.map +1 -1
- package/dist/es/models/services/IInformationComponent.js.map +1 -1
- package/dist/es/models/services/IUrlTransformerComponent.js +2 -0
- package/dist/es/models/services/IUrlTransformerComponent.js.map +1 -0
- package/dist/types/index.d.ts +3 -3
- package/dist/types/models/api/IServerHealthResponse.d.ts +6 -3
- package/dist/types/models/api/IServerLivezResponse.d.ts +1 -1
- package/dist/types/models/api/IServerReadyzResponse.d.ts +16 -0
- package/dist/types/models/server/IWebServer.d.ts +7 -1
- package/dist/types/models/services/IHealthComponent.d.ts +14 -0
- package/dist/types/models/services/IHostingComponent.d.ts +0 -56
- package/dist/types/models/services/IInformationComponent.d.ts +9 -23
- package/dist/types/models/services/IUrlTransformerComponent.d.ts +66 -0
- package/docs/changelog.md +7 -0
- package/docs/reference/index.md +3 -4
- package/docs/reference/interfaces/IHealthComponent.md +21 -0
- package/docs/reference/interfaces/IHostingComponent.md +0 -208
- package/docs/reference/interfaces/IInformationComponent.md +8 -76
- package/docs/reference/interfaces/IServerHealthResponse.md +10 -2
- package/docs/reference/interfaces/IServerLivezResponse.md +1 -1
- package/docs/reference/interfaces/IServerReadyzResponse.md +23 -0
- package/docs/reference/interfaces/IUrlTransformerComponent.md +229 -0
- package/docs/reference/interfaces/IWebServer.md +30 -0
- package/package.json +1 -1
- package/dist/es/models/services/IHealthComponentInfo.js +0 -2
- package/dist/es/models/services/IHealthComponentInfo.js.map +0 -1
- package/dist/es/models/services/IHealthInfo.js +0 -2
- package/dist/es/models/services/IHealthInfo.js.map +0 -1
- package/dist/es/models/services/healthStatus.js +0 -21
- package/dist/es/models/services/healthStatus.js.map +0 -1
- package/dist/types/models/services/IHealthComponentInfo.d.ts +0 -18
- package/dist/types/models/services/IHealthInfo.d.ts +0 -15
- package/dist/types/models/services/healthStatus.d.ts +0 -21
- package/docs/reference/interfaces/IHealthComponentInfo.md +0 -27
- package/docs/reference/interfaces/IHealthInfo.md +0 -19
- package/docs/reference/type-aliases/HealthStatus.md +0 -5
- package/docs/reference/variables/HealthStatus.md +0 -25
|
@@ -71,211 +71,3 @@ The url to build upon the public origin.
|
|
|
71
71
|
`Promise`\<`string`\>
|
|
72
72
|
|
|
73
73
|
The full url based on the public origin.
|
|
74
|
-
|
|
75
|
-
***
|
|
76
|
-
|
|
77
|
-
### addEncryptedParamsToUrl() {#addencryptedparamstourl}
|
|
78
|
-
|
|
79
|
-
> **addEncryptedParamsToUrl**(`url`, `params`): `Promise`\<`string`\>
|
|
80
|
-
|
|
81
|
-
Add encrypted key/value pairs to a URL's query string.
|
|
82
|
-
Existing query parameters on the URL are preserved; the provided params are
|
|
83
|
-
merged in and then encrypted before being written back to the URL.
|
|
84
|
-
|
|
85
|
-
#### Parameters
|
|
86
|
-
|
|
87
|
-
##### url
|
|
88
|
-
|
|
89
|
-
`string`
|
|
90
|
-
|
|
91
|
-
The base URL to add parameters to.
|
|
92
|
-
|
|
93
|
-
##### params
|
|
94
|
-
|
|
95
|
-
[`IHttpRequestQuery`](IHttpRequestQuery.md)
|
|
96
|
-
|
|
97
|
-
The key/value pairs to encrypt and append.
|
|
98
|
-
|
|
99
|
-
#### Returns
|
|
100
|
-
|
|
101
|
-
`Promise`\<`string`\>
|
|
102
|
-
|
|
103
|
-
The URL with the encrypted parameters added.
|
|
104
|
-
|
|
105
|
-
***
|
|
106
|
-
|
|
107
|
-
### getDecryptedParamsFromQueryParams() {#getdecryptedparamsfromqueryparams}
|
|
108
|
-
|
|
109
|
-
> **getDecryptedParamsFromQueryParams**(`queryParams`, `keys`): `Promise`\<[`IHttpRequestQuery`](IHttpRequestQuery.md)\>
|
|
110
|
-
|
|
111
|
-
Decrypt specified keys from a query parameter object and return their plain-text values.
|
|
112
|
-
|
|
113
|
-
#### Parameters
|
|
114
|
-
|
|
115
|
-
##### queryParams
|
|
116
|
-
|
|
117
|
-
[`IHttpRequestQuery`](IHttpRequestQuery.md) \| `undefined`
|
|
118
|
-
|
|
119
|
-
The HTTP request query containing the encrypted parameters.
|
|
120
|
-
|
|
121
|
-
##### keys
|
|
122
|
-
|
|
123
|
-
`string`[]
|
|
124
|
-
|
|
125
|
-
The keys to decrypt.
|
|
126
|
-
|
|
127
|
-
#### Returns
|
|
128
|
-
|
|
129
|
-
`Promise`\<[`IHttpRequestQuery`](IHttpRequestQuery.md)\>
|
|
130
|
-
|
|
131
|
-
A map of the decrypted key/value pairs that were present.
|
|
132
|
-
|
|
133
|
-
***
|
|
134
|
-
|
|
135
|
-
### addTenantTokenToUrl() {#addtenanttokentourl}
|
|
136
|
-
|
|
137
|
-
> **addTenantTokenToUrl**(`url`, `tenantId`): `Promise`\<`string`\>
|
|
138
|
-
|
|
139
|
-
Encrypt the tenant id and append it as a query parameter to the given URL.
|
|
140
|
-
|
|
141
|
-
#### Parameters
|
|
142
|
-
|
|
143
|
-
##### url
|
|
144
|
-
|
|
145
|
-
`string`
|
|
146
|
-
|
|
147
|
-
The URL to append the encrypted tenant token to.
|
|
148
|
-
|
|
149
|
-
##### tenantId
|
|
150
|
-
|
|
151
|
-
`string`
|
|
152
|
-
|
|
153
|
-
The tenant identifier to encrypt and add.
|
|
154
|
-
|
|
155
|
-
#### Returns
|
|
156
|
-
|
|
157
|
-
`Promise`\<`string`\>
|
|
158
|
-
|
|
159
|
-
The URL with the encrypted tenant token added as a query parameter.
|
|
160
|
-
|
|
161
|
-
***
|
|
162
|
-
|
|
163
|
-
### getTenantTokenFromQueryParams() {#gettenanttokenfromqueryparams}
|
|
164
|
-
|
|
165
|
-
> **getTenantTokenFromQueryParams**(`queryParams`): `Promise`\<`string` \| `undefined`\>
|
|
166
|
-
|
|
167
|
-
Get the tenant token from the query parameters.
|
|
168
|
-
|
|
169
|
-
#### Parameters
|
|
170
|
-
|
|
171
|
-
##### queryParams
|
|
172
|
-
|
|
173
|
-
[`IHttpRequestQuery`](IHttpRequestQuery.md) \| `undefined`
|
|
174
|
-
|
|
175
|
-
The HTTP request query containing the parameters.
|
|
176
|
-
|
|
177
|
-
#### Returns
|
|
178
|
-
|
|
179
|
-
`Promise`\<`string` \| `undefined`\>
|
|
180
|
-
|
|
181
|
-
The tenant token if it exists.
|
|
182
|
-
|
|
183
|
-
***
|
|
184
|
-
|
|
185
|
-
### encryptQueryParams() {#encryptqueryparams}
|
|
186
|
-
|
|
187
|
-
> **encryptQueryParams**(`httpRequestQuery`, `keys`): `Promise`\<`void`\>
|
|
188
|
-
|
|
189
|
-
Encrypt query parameters using the hosting component's encryption mechanism.
|
|
190
|
-
|
|
191
|
-
#### Parameters
|
|
192
|
-
|
|
193
|
-
##### httpRequestQuery
|
|
194
|
-
|
|
195
|
-
[`IHttpRequestQuery`](IHttpRequestQuery.md) \| `undefined`
|
|
196
|
-
|
|
197
|
-
The HTTP request query containing the parameters to encrypt.
|
|
198
|
-
|
|
199
|
-
##### keys
|
|
200
|
-
|
|
201
|
-
`string`[]
|
|
202
|
-
|
|
203
|
-
The keys of the parameters to encrypt.
|
|
204
|
-
|
|
205
|
-
#### Returns
|
|
206
|
-
|
|
207
|
-
`Promise`\<`void`\>
|
|
208
|
-
|
|
209
|
-
A promise that resolves when the query parameters have been encrypted.
|
|
210
|
-
|
|
211
|
-
***
|
|
212
|
-
|
|
213
|
-
### decryptQueryParams() {#decryptqueryparams}
|
|
214
|
-
|
|
215
|
-
> **decryptQueryParams**(`httpRequestQuery`, `keys`): `Promise`\<`void`\>
|
|
216
|
-
|
|
217
|
-
Decrypt query parameters using the hosting component's encryption mechanism.
|
|
218
|
-
|
|
219
|
-
#### Parameters
|
|
220
|
-
|
|
221
|
-
##### httpRequestQuery
|
|
222
|
-
|
|
223
|
-
[`IHttpRequestQuery`](IHttpRequestQuery.md) \| `undefined`
|
|
224
|
-
|
|
225
|
-
The HTTP request query containing the encrypted values.
|
|
226
|
-
|
|
227
|
-
##### keys
|
|
228
|
-
|
|
229
|
-
`string`[]
|
|
230
|
-
|
|
231
|
-
The keys of the parameters to decrypt.
|
|
232
|
-
|
|
233
|
-
#### Returns
|
|
234
|
-
|
|
235
|
-
`Promise`\<`void`\>
|
|
236
|
-
|
|
237
|
-
A promise that resolves when the query parameters have been decrypted.
|
|
238
|
-
|
|
239
|
-
***
|
|
240
|
-
|
|
241
|
-
### encryptParam() {#encryptparam}
|
|
242
|
-
|
|
243
|
-
> **encryptParam**(`paramValue`): `Promise`\<`string`\>
|
|
244
|
-
|
|
245
|
-
Encrypt a parameter value using the hosting component's encryption mechanism.
|
|
246
|
-
|
|
247
|
-
#### Parameters
|
|
248
|
-
|
|
249
|
-
##### paramValue
|
|
250
|
-
|
|
251
|
-
`string`
|
|
252
|
-
|
|
253
|
-
The value of the parameter to encrypt.
|
|
254
|
-
|
|
255
|
-
#### Returns
|
|
256
|
-
|
|
257
|
-
`Promise`\<`string`\>
|
|
258
|
-
|
|
259
|
-
A promise that resolves to the encrypted value of the parameter.
|
|
260
|
-
|
|
261
|
-
***
|
|
262
|
-
|
|
263
|
-
### decryptParam() {#decryptparam}
|
|
264
|
-
|
|
265
|
-
> **decryptParam**(`encryptedValue`): `Promise`\<`string`\>
|
|
266
|
-
|
|
267
|
-
Decrypt a parameter value using the hosting component's encryption mechanism.
|
|
268
|
-
|
|
269
|
-
#### Parameters
|
|
270
|
-
|
|
271
|
-
##### encryptedValue
|
|
272
|
-
|
|
273
|
-
`string`
|
|
274
|
-
|
|
275
|
-
The encrypted value of the parameter.
|
|
276
|
-
|
|
277
|
-
#### Returns
|
|
278
|
-
|
|
279
|
-
`Promise`\<`string`\>
|
|
280
|
-
|
|
281
|
-
A promise that resolves to the decrypted value of the parameter.
|
|
@@ -66,94 +66,26 @@ The OpenAPI spec.
|
|
|
66
66
|
|
|
67
67
|
### livez() {#livez}
|
|
68
68
|
|
|
69
|
-
> **livez**(): `Promise
|
|
69
|
+
> **livez**(): `Promise`\<\{ `status`: `"alive"` \| `"dead"`; \}\>
|
|
70
70
|
|
|
71
71
|
Is the server live.
|
|
72
72
|
|
|
73
73
|
#### Returns
|
|
74
74
|
|
|
75
|
-
`Promise
|
|
75
|
+
`Promise`\<\{ `status`: `"alive"` \| `"dead"`; \}\>
|
|
76
76
|
|
|
77
|
-
|
|
77
|
+
The livez status of the server.
|
|
78
78
|
|
|
79
79
|
***
|
|
80
80
|
|
|
81
|
-
###
|
|
81
|
+
### readyz() {#readyz}
|
|
82
82
|
|
|
83
|
-
> **
|
|
83
|
+
> **readyz**(): `Promise`\<\{ `status`: `"ready"` \| `"not ready"`; \}\>
|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
Is the server ready.
|
|
86
86
|
|
|
87
87
|
#### Returns
|
|
88
88
|
|
|
89
|
-
`Promise
|
|
89
|
+
`Promise`\<\{ `status`: `"ready"` \| `"not ready"`; \}\>
|
|
90
90
|
|
|
91
|
-
The
|
|
92
|
-
|
|
93
|
-
***
|
|
94
|
-
|
|
95
|
-
### setComponentHealth() {#setcomponenthealth}
|
|
96
|
-
|
|
97
|
-
> **setComponentHealth**(`name`, `status`, `details?`, `tenantId?`): `Promise`\<`void`\>
|
|
98
|
-
|
|
99
|
-
Set the status of a component.
|
|
100
|
-
|
|
101
|
-
#### Parameters
|
|
102
|
-
|
|
103
|
-
##### name
|
|
104
|
-
|
|
105
|
-
`string`
|
|
106
|
-
|
|
107
|
-
The component name.
|
|
108
|
-
|
|
109
|
-
##### status
|
|
110
|
-
|
|
111
|
-
[`HealthStatus`](../type-aliases/HealthStatus.md)
|
|
112
|
-
|
|
113
|
-
The status of the component.
|
|
114
|
-
|
|
115
|
-
##### details?
|
|
116
|
-
|
|
117
|
-
`string`
|
|
118
|
-
|
|
119
|
-
The details for the status.
|
|
120
|
-
|
|
121
|
-
##### tenantId?
|
|
122
|
-
|
|
123
|
-
`string`
|
|
124
|
-
|
|
125
|
-
The tenant id, optional if the health status is not tenant specific.
|
|
126
|
-
|
|
127
|
-
#### Returns
|
|
128
|
-
|
|
129
|
-
`Promise`\<`void`\>
|
|
130
|
-
|
|
131
|
-
Nothing.
|
|
132
|
-
|
|
133
|
-
***
|
|
134
|
-
|
|
135
|
-
### removeComponentHealth() {#removecomponenthealth}
|
|
136
|
-
|
|
137
|
-
> **removeComponentHealth**(`name`, `tenantId?`): `Promise`\<`void`\>
|
|
138
|
-
|
|
139
|
-
Remove the status of a component.
|
|
140
|
-
|
|
141
|
-
#### Parameters
|
|
142
|
-
|
|
143
|
-
##### name
|
|
144
|
-
|
|
145
|
-
`string`
|
|
146
|
-
|
|
147
|
-
The component name.
|
|
148
|
-
|
|
149
|
-
##### tenantId?
|
|
150
|
-
|
|
151
|
-
`string`
|
|
152
|
-
|
|
153
|
-
The tenant id, optional if the health status is not tenant specific.
|
|
154
|
-
|
|
155
|
-
#### Returns
|
|
156
|
-
|
|
157
|
-
`Promise`\<`void`\>
|
|
158
|
-
|
|
159
|
-
Nothing.
|
|
91
|
+
The readyz status of the server.
|
|
@@ -6,6 +6,14 @@ The health of the server.
|
|
|
6
6
|
|
|
7
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: 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.
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
# Interface: IUrlTransformerComponent
|
|
2
|
+
|
|
3
|
+
The URL transformer component for encrypting and decrypting URL parameters.
|
|
4
|
+
|
|
5
|
+
## Extends
|
|
6
|
+
|
|
7
|
+
- `IComponent`
|
|
8
|
+
|
|
9
|
+
## Methods
|
|
10
|
+
|
|
11
|
+
### addEncryptedQueryParamToUrl() {#addencryptedqueryparamtourl}
|
|
12
|
+
|
|
13
|
+
> **addEncryptedQueryParamToUrl**(`url`, `id`, `value`): `Promise`\<`string`\>
|
|
14
|
+
|
|
15
|
+
Encrypt a named token value and append it as a query parameter to the given URL.
|
|
16
|
+
The URL param name is resolved from the configured token name dictionary using the id.
|
|
17
|
+
|
|
18
|
+
#### Parameters
|
|
19
|
+
|
|
20
|
+
##### url
|
|
21
|
+
|
|
22
|
+
`string`
|
|
23
|
+
|
|
24
|
+
The URL to append the encrypted token to.
|
|
25
|
+
|
|
26
|
+
##### id
|
|
27
|
+
|
|
28
|
+
`string`
|
|
29
|
+
|
|
30
|
+
The logical token identifier (e.g. "tenant").
|
|
31
|
+
|
|
32
|
+
##### value
|
|
33
|
+
|
|
34
|
+
`string`
|
|
35
|
+
|
|
36
|
+
The value to encrypt and add.
|
|
37
|
+
|
|
38
|
+
#### Returns
|
|
39
|
+
|
|
40
|
+
`Promise`\<`string`\>
|
|
41
|
+
|
|
42
|
+
The URL with the encrypted token added as a query parameter.
|
|
43
|
+
|
|
44
|
+
***
|
|
45
|
+
|
|
46
|
+
### getEncryptedQueryParam() {#getencryptedqueryparam}
|
|
47
|
+
|
|
48
|
+
> **getEncryptedQueryParam**(`queryParams`, `id`): `Promise`\<`string` \| `undefined`\>
|
|
49
|
+
|
|
50
|
+
Get a named token value from the query parameters.
|
|
51
|
+
The URL param name is resolved from the configured token name dictionary using the id.
|
|
52
|
+
|
|
53
|
+
#### Parameters
|
|
54
|
+
|
|
55
|
+
##### queryParams
|
|
56
|
+
|
|
57
|
+
[`IHttpRequestQuery`](IHttpRequestQuery.md) \| `undefined`
|
|
58
|
+
|
|
59
|
+
The HTTP request query containing the parameters.
|
|
60
|
+
|
|
61
|
+
##### id
|
|
62
|
+
|
|
63
|
+
`string`
|
|
64
|
+
|
|
65
|
+
The logical token identifier (e.g. "tenant").
|
|
66
|
+
|
|
67
|
+
#### Returns
|
|
68
|
+
|
|
69
|
+
`Promise`\<`string` \| `undefined`\>
|
|
70
|
+
|
|
71
|
+
The decrypted token value if it exists.
|
|
72
|
+
|
|
73
|
+
***
|
|
74
|
+
|
|
75
|
+
### addEncryptedParamsToUrl() {#addencryptedparamstourl}
|
|
76
|
+
|
|
77
|
+
> **addEncryptedParamsToUrl**(`url`, `params`): `Promise`\<`string`\>
|
|
78
|
+
|
|
79
|
+
Add encrypted key/value pairs to a URL's query string.
|
|
80
|
+
Existing query parameters on the URL are preserved; the provided params are
|
|
81
|
+
merged in and then encrypted before being written back to the URL.
|
|
82
|
+
|
|
83
|
+
#### Parameters
|
|
84
|
+
|
|
85
|
+
##### url
|
|
86
|
+
|
|
87
|
+
`string`
|
|
88
|
+
|
|
89
|
+
The base URL to add parameters to.
|
|
90
|
+
|
|
91
|
+
##### params
|
|
92
|
+
|
|
93
|
+
[`IHttpRequestQuery`](IHttpRequestQuery.md)
|
|
94
|
+
|
|
95
|
+
The key/value pairs to encrypt and append.
|
|
96
|
+
|
|
97
|
+
#### Returns
|
|
98
|
+
|
|
99
|
+
`Promise`\<`string`\>
|
|
100
|
+
|
|
101
|
+
The URL with the encrypted parameters added.
|
|
102
|
+
|
|
103
|
+
***
|
|
104
|
+
|
|
105
|
+
### getDecryptedParamsFromQueryParams() {#getdecryptedparamsfromqueryparams}
|
|
106
|
+
|
|
107
|
+
> **getDecryptedParamsFromQueryParams**(`queryParams`, `keys`): `Promise`\<[`IHttpRequestQuery`](IHttpRequestQuery.md)\>
|
|
108
|
+
|
|
109
|
+
Decrypt specified keys from a query parameter object and return their plain-text values.
|
|
110
|
+
|
|
111
|
+
#### Parameters
|
|
112
|
+
|
|
113
|
+
##### queryParams
|
|
114
|
+
|
|
115
|
+
[`IHttpRequestQuery`](IHttpRequestQuery.md) \| `undefined`
|
|
116
|
+
|
|
117
|
+
The HTTP request query containing the encrypted parameters.
|
|
118
|
+
|
|
119
|
+
##### keys
|
|
120
|
+
|
|
121
|
+
`string`[]
|
|
122
|
+
|
|
123
|
+
The keys to decrypt.
|
|
124
|
+
|
|
125
|
+
#### Returns
|
|
126
|
+
|
|
127
|
+
`Promise`\<[`IHttpRequestQuery`](IHttpRequestQuery.md)\>
|
|
128
|
+
|
|
129
|
+
A map of the decrypted key/value pairs that were present.
|
|
130
|
+
|
|
131
|
+
***
|
|
132
|
+
|
|
133
|
+
### encryptQueryParams() {#encryptqueryparams}
|
|
134
|
+
|
|
135
|
+
> **encryptQueryParams**(`httpRequestQuery`, `keys`): `Promise`\<`void`\>
|
|
136
|
+
|
|
137
|
+
Encrypt query parameters using the URL transformer's encryption mechanism.
|
|
138
|
+
|
|
139
|
+
#### Parameters
|
|
140
|
+
|
|
141
|
+
##### httpRequestQuery
|
|
142
|
+
|
|
143
|
+
[`IHttpRequestQuery`](IHttpRequestQuery.md) \| `undefined`
|
|
144
|
+
|
|
145
|
+
The HTTP request query containing the parameters to encrypt.
|
|
146
|
+
|
|
147
|
+
##### keys
|
|
148
|
+
|
|
149
|
+
`string`[]
|
|
150
|
+
|
|
151
|
+
The keys of the parameters to encrypt.
|
|
152
|
+
|
|
153
|
+
#### Returns
|
|
154
|
+
|
|
155
|
+
`Promise`\<`void`\>
|
|
156
|
+
|
|
157
|
+
A promise that resolves when the query parameters have been encrypted.
|
|
158
|
+
|
|
159
|
+
***
|
|
160
|
+
|
|
161
|
+
### decryptQueryParams() {#decryptqueryparams}
|
|
162
|
+
|
|
163
|
+
> **decryptQueryParams**(`httpRequestQuery`, `keys`): `Promise`\<`void`\>
|
|
164
|
+
|
|
165
|
+
Decrypt query parameters using the URL transformer's encryption mechanism.
|
|
166
|
+
|
|
167
|
+
#### Parameters
|
|
168
|
+
|
|
169
|
+
##### httpRequestQuery
|
|
170
|
+
|
|
171
|
+
[`IHttpRequestQuery`](IHttpRequestQuery.md) \| `undefined`
|
|
172
|
+
|
|
173
|
+
The HTTP request query containing the encrypted values.
|
|
174
|
+
|
|
175
|
+
##### keys
|
|
176
|
+
|
|
177
|
+
`string`[]
|
|
178
|
+
|
|
179
|
+
The keys of the parameters to decrypt.
|
|
180
|
+
|
|
181
|
+
#### Returns
|
|
182
|
+
|
|
183
|
+
`Promise`\<`void`\>
|
|
184
|
+
|
|
185
|
+
A promise that resolves when the query parameters have been decrypted.
|
|
186
|
+
|
|
187
|
+
***
|
|
188
|
+
|
|
189
|
+
### encryptParam() {#encryptparam}
|
|
190
|
+
|
|
191
|
+
> **encryptParam**(`paramValue`): `Promise`\<`string`\>
|
|
192
|
+
|
|
193
|
+
Encrypt a parameter value.
|
|
194
|
+
|
|
195
|
+
#### Parameters
|
|
196
|
+
|
|
197
|
+
##### paramValue
|
|
198
|
+
|
|
199
|
+
`string`
|
|
200
|
+
|
|
201
|
+
The value of the parameter to encrypt.
|
|
202
|
+
|
|
203
|
+
#### Returns
|
|
204
|
+
|
|
205
|
+
`Promise`\<`string`\>
|
|
206
|
+
|
|
207
|
+
A promise that resolves to the encrypted value of the parameter.
|
|
208
|
+
|
|
209
|
+
***
|
|
210
|
+
|
|
211
|
+
### decryptParam() {#decryptparam}
|
|
212
|
+
|
|
213
|
+
> **decryptParam**(`encryptedValue`): `Promise`\<`string`\>
|
|
214
|
+
|
|
215
|
+
Decrypt a parameter value.
|
|
216
|
+
|
|
217
|
+
#### Parameters
|
|
218
|
+
|
|
219
|
+
##### encryptedValue
|
|
220
|
+
|
|
221
|
+
`string`
|
|
222
|
+
|
|
223
|
+
The encrypted value of the parameter.
|
|
224
|
+
|
|
225
|
+
#### Returns
|
|
226
|
+
|
|
227
|
+
`Promise`\<`string`\>
|
|
228
|
+
|
|
229
|
+
A promise that resolves to the decrypted value of the parameter.
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Interface describing a web server.
|
|
4
4
|
|
|
5
|
+
## Extends
|
|
6
|
+
|
|
7
|
+
- `IComponent`
|
|
8
|
+
|
|
5
9
|
## Type Parameters
|
|
6
10
|
|
|
7
11
|
### T
|
|
@@ -82,6 +86,10 @@ Start the server.
|
|
|
82
86
|
|
|
83
87
|
Nothing.
|
|
84
88
|
|
|
89
|
+
#### Overrides
|
|
90
|
+
|
|
91
|
+
`IComponent.start`
|
|
92
|
+
|
|
85
93
|
***
|
|
86
94
|
|
|
87
95
|
### stop() {#stop}
|
|
@@ -95,3 +103,25 @@ Stop the server.
|
|
|
95
103
|
`Promise`\<`void`\>
|
|
96
104
|
|
|
97
105
|
Nothing.
|
|
106
|
+
|
|
107
|
+
#### Overrides
|
|
108
|
+
|
|
109
|
+
`IComponent.stop`
|
|
110
|
+
|
|
111
|
+
***
|
|
112
|
+
|
|
113
|
+
### health() {#health}
|
|
114
|
+
|
|
115
|
+
> **health**(): `Promise`\<`IHealth`[]\>
|
|
116
|
+
|
|
117
|
+
Returns the health status of the component.
|
|
118
|
+
|
|
119
|
+
#### Returns
|
|
120
|
+
|
|
121
|
+
`Promise`\<`IHealth`[]\>
|
|
122
|
+
|
|
123
|
+
The health status of the component, can return multiple entries for elements within the component.
|
|
124
|
+
|
|
125
|
+
#### Overrides
|
|
126
|
+
|
|
127
|
+
`IComponent.health`
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IHealthComponentInfo.js","sourceRoot":"","sources":["../../../../src/models/services/IHealthComponentInfo.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { HealthStatus } from \"./healthStatus.js\";\n\n/**\n * The health component information.\n */\nexport interface IHealthComponentInfo {\n\t/**\n\t * The name of the component.\n\t */\n\tname: string;\n\n\t/**\n\t * The status of the component.\n\t */\n\tstatus: HealthStatus;\n\n\t/**\n\t * The details for the status.\n\t */\n\tdetails?: string;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IHealthInfo.js","sourceRoot":"","sources":["../../../../src/models/services/IHealthInfo.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { HealthStatus } from \"./healthStatus.js\";\nimport type { IHealthComponentInfo } from \"./IHealthComponentInfo.js\";\n\n/**\n * The status of the server.\n */\nexport interface IHealthInfo {\n\t/**\n\t * The status.\n\t */\n\tstatus: HealthStatus;\n\n\t/**\n\t * The status of the components.\n\t */\n\tcomponents?: IHealthComponentInfo[];\n}\n"]}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// Copyright 2024 IOTA Stiftung.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
-
/**
|
|
4
|
-
* The health status of the component.
|
|
5
|
-
*/
|
|
6
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
|
-
export const HealthStatus = {
|
|
8
|
-
/**
|
|
9
|
-
* OK.
|
|
10
|
-
*/
|
|
11
|
-
Ok: "ok",
|
|
12
|
-
/**
|
|
13
|
-
* Warning.
|
|
14
|
-
*/
|
|
15
|
-
Warning: "warning",
|
|
16
|
-
/**
|
|
17
|
-
* Error.
|
|
18
|
-
*/
|
|
19
|
-
Error: "error"
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=healthStatus.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"healthStatus.js","sourceRoot":"","sources":["../../../../src/models/services/healthStatus.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,YAAY,GAAG;IAC3B;;OAEG;IACH,EAAE,EAAE,IAAI;IAER;;OAEG;IACH,OAAO,EAAE,SAAS;IAElB;;OAEG;IACH,KAAK,EAAE,OAAO;CACL,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The health status of the component.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const HealthStatus = {\n\t/**\n\t * OK.\n\t */\n\tOk: \"ok\",\n\n\t/**\n\t * Warning.\n\t */\n\tWarning: \"warning\",\n\n\t/**\n\t * Error.\n\t */\n\tError: \"error\"\n} as const;\n\n/**\n * The health status of the component.\n */\nexport type HealthStatus = (typeof HealthStatus)[keyof typeof HealthStatus];\n"]}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { HealthStatus } from "./healthStatus.js";
|
|
2
|
-
/**
|
|
3
|
-
* The health component information.
|
|
4
|
-
*/
|
|
5
|
-
export interface IHealthComponentInfo {
|
|
6
|
-
/**
|
|
7
|
-
* The name of the component.
|
|
8
|
-
*/
|
|
9
|
-
name: string;
|
|
10
|
-
/**
|
|
11
|
-
* The status of the component.
|
|
12
|
-
*/
|
|
13
|
-
status: HealthStatus;
|
|
14
|
-
/**
|
|
15
|
-
* The details for the status.
|
|
16
|
-
*/
|
|
17
|
-
details?: string;
|
|
18
|
-
}
|