@twin.org/api-service 0.0.3-next.42 → 0.0.3-next.44

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 (31) hide show
  1. package/dist/es/index.js +3 -3
  2. package/dist/es/index.js.map +1 -1
  3. package/dist/es/models/IPlatformServiceConfig.js +4 -0
  4. package/dist/es/models/IPlatformServiceConfig.js.map +1 -0
  5. package/dist/es/models/IPlatformServiceConstructorOptions.js +2 -0
  6. package/dist/es/models/IPlatformServiceConstructorOptions.js.map +1 -0
  7. package/dist/es/platformService.js +76 -0
  8. package/dist/es/platformService.js.map +1 -0
  9. package/dist/types/index.d.ts +3 -3
  10. package/dist/types/models/IPlatformServiceConfig.d.ts +10 -0
  11. package/dist/types/models/IPlatformServiceConstructorOptions.d.ts +15 -0
  12. package/dist/types/platformService.d.ts +32 -0
  13. package/docs/changelog.md +28 -0
  14. package/docs/reference/classes/PlatformService.md +97 -0
  15. package/docs/reference/index.md +3 -3
  16. package/docs/reference/interfaces/IPlatformServiceConfig.md +17 -0
  17. package/docs/reference/interfaces/IPlatformServiceConstructorOptions.md +25 -0
  18. package/locales/en.json +0 -6
  19. package/package.json +3 -2
  20. package/dist/es/models/IUrlTransformerServiceConfig.js +0 -4
  21. package/dist/es/models/IUrlTransformerServiceConfig.js.map +0 -1
  22. package/dist/es/models/IUrlTransformerServiceConstructorOptions.js +0 -2
  23. package/dist/es/models/IUrlTransformerServiceConstructorOptions.js.map +0 -1
  24. package/dist/es/urlTransformerService.js +0 -256
  25. package/dist/es/urlTransformerService.js.map +0 -1
  26. package/dist/types/models/IUrlTransformerServiceConfig.d.ts +0 -19
  27. package/dist/types/models/IUrlTransformerServiceConstructorOptions.d.ts +0 -15
  28. package/dist/types/urlTransformerService.d.ts +0 -94
  29. package/docs/reference/classes/UrlTransformerService.md +0 -379
  30. package/docs/reference/interfaces/IUrlTransformerServiceConfig.md +0 -32
  31. package/docs/reference/interfaces/IUrlTransformerServiceConstructorOptions.md +0 -25
@@ -1,379 +0,0 @@
1
- # Class: UrlTransformerService
2
-
3
- The URL transformer service for encrypting and decrypting URL parameters.
4
-
5
- ## Implements
6
-
7
- - `IUrlTransformerComponent`
8
-
9
- ## Constructors
10
-
11
- ### Constructor
12
-
13
- > **new UrlTransformerService**(`options?`): `UrlTransformerService`
14
-
15
- Create a new instance of UrlTransformerService.
16
-
17
- #### Parameters
18
-
19
- ##### options?
20
-
21
- [`IUrlTransformerServiceConstructorOptions`](../interfaces/IUrlTransformerServiceConstructorOptions.md)
22
-
23
- The options to create the service.
24
-
25
- #### Returns
26
-
27
- `UrlTransformerService`
28
-
29
- ## Properties
30
-
31
- ### CLASS\_NAME {#class_name}
32
-
33
- > `readonly` `static` **CLASS\_NAME**: `string`
34
-
35
- Runtime name for the class.
36
-
37
- ## Methods
38
-
39
- ### className() {#classname}
40
-
41
- > **className**(): `string`
42
-
43
- Returns the class name of the component.
44
-
45
- #### Returns
46
-
47
- `string`
48
-
49
- The class name of the component.
50
-
51
- #### Implementation of
52
-
53
- `IUrlTransformerComponent.className`
54
-
55
- ***
56
-
57
- ### start() {#start}
58
-
59
- > **start**(): `Promise`\<`void`\>
60
-
61
- The component needs to be started when the node is initialized.
62
-
63
- #### Returns
64
-
65
- `Promise`\<`void`\>
66
-
67
- Nothing.
68
-
69
- #### Implementation of
70
-
71
- `IUrlTransformerComponent.start`
72
-
73
- ***
74
-
75
- ### addEncryptedQueryParamToUrl() {#addencryptedqueryparamtourl}
76
-
77
- > **addEncryptedQueryParamToUrl**(`url`, `id`, `value`): `Promise`\<`string`\>
78
-
79
- Encrypt a named token value and append it as a query parameter to the given URL.
80
-
81
- #### Parameters
82
-
83
- ##### url
84
-
85
- `string`
86
-
87
- The URL to append the encrypted token to.
88
-
89
- ##### id
90
-
91
- `string`
92
-
93
- The logical token identifier (e.g. "tenant").
94
-
95
- ##### value
96
-
97
- `string`
98
-
99
- The value to encrypt and add.
100
-
101
- #### Returns
102
-
103
- `Promise`\<`string`\>
104
-
105
- The URL with the encrypted token added as a query parameter.
106
-
107
- #### Implementation of
108
-
109
- `IUrlTransformerComponent.addEncryptedQueryParamToUrl`
110
-
111
- ***
112
-
113
- ### getEncryptedQueryParam() {#getencryptedqueryparam}
114
-
115
- > **getEncryptedQueryParam**(`queryParams`, `id`): `Promise`\<`string` \| `undefined`\>
116
-
117
- Get a named token value from the query parameters.
118
-
119
- #### Parameters
120
-
121
- ##### queryParams
122
-
123
- `IHttpRequestQuery` \| `undefined`
124
-
125
- The HTTP request query containing the parameters.
126
-
127
- ##### id
128
-
129
- `string`
130
-
131
- The logical token identifier (e.g. "tenant").
132
-
133
- #### Returns
134
-
135
- `Promise`\<`string` \| `undefined`\>
136
-
137
- The decrypted token value if it exists.
138
-
139
- #### Implementation of
140
-
141
- `IUrlTransformerComponent.getEncryptedQueryParam`
142
-
143
- ***
144
-
145
- ### addEncryptedToUrl() {#addencryptedtourl}
146
-
147
- > **addEncryptedToUrl**(`url`, `params`): `Promise`\<`string`\>
148
-
149
- Add encrypted key/value pairs to a URL's query string.
150
-
151
- #### Parameters
152
-
153
- ##### url
154
-
155
- `string`
156
-
157
- The base URL to add parameters to.
158
-
159
- ##### params
160
-
161
- `IHttpRequestQuery`
162
-
163
- The key/value pairs to encrypt and append.
164
-
165
- #### Returns
166
-
167
- `Promise`\<`string`\>
168
-
169
- The URL with the encrypted parameters added.
170
-
171
- #### Implementation of
172
-
173
- `IUrlTransformerComponent.addEncryptedToUrl`
174
-
175
- ***
176
-
177
- ### getEncryptedFromUrl() {#getencryptedfromurl}
178
-
179
- > **getEncryptedFromUrl**(`url`, `id`): `Promise`\<`string` \| `undefined`\>
180
-
181
- Get an encrypted value from a URL's query string.
182
-
183
- #### Parameters
184
-
185
- ##### url
186
-
187
- `string`
188
-
189
- The URL to extract the encrypted value from.
190
-
191
- ##### id
192
-
193
- `string`
194
-
195
- The logical identifier for the value to retrieve (e.g. "tenant").
196
-
197
- #### Returns
198
-
199
- `Promise`\<`string` \| `undefined`\>
200
-
201
- The decrypted value if it exists.
202
-
203
- #### Implementation of
204
-
205
- `IUrlTransformerComponent.getEncryptedFromUrl`
206
-
207
- ***
208
-
209
- ### getDecryptedFromQueryParams() {#getdecryptedfromqueryparams}
210
-
211
- > **getDecryptedFromQueryParams**(`queryParams`, `keys`): `Promise`\<`IHttpRequestQuery`\>
212
-
213
- Decrypt specified keys from a query parameter object and return their plain-text values.
214
-
215
- #### Parameters
216
-
217
- ##### queryParams
218
-
219
- `IHttpRequestQuery` \| `undefined`
220
-
221
- The HTTP request query containing the encrypted parameters.
222
-
223
- ##### keys
224
-
225
- `string`[]
226
-
227
- The keys to decrypt.
228
-
229
- #### Returns
230
-
231
- `Promise`\<`IHttpRequestQuery`\>
232
-
233
- A map of the decrypted key/value pairs that were present.
234
-
235
- #### Implementation of
236
-
237
- `IUrlTransformerComponent.getDecryptedFromQueryParams`
238
-
239
- ***
240
-
241
- ### encryptQueryParams() {#encryptqueryparams}
242
-
243
- > **encryptQueryParams**(`httpRequestQuery`, `keys`): `Promise`\<`void`\>
244
-
245
- Encrypt query parameters.
246
-
247
- #### Parameters
248
-
249
- ##### httpRequestQuery
250
-
251
- `IHttpRequestQuery` \| `undefined`
252
-
253
- The HTTP request query containing the parameters to encrypt.
254
-
255
- ##### keys
256
-
257
- `string`[]
258
-
259
- The keys of the parameters to encrypt.
260
-
261
- #### Returns
262
-
263
- `Promise`\<`void`\>
264
-
265
- A promise that resolves when the query parameters have been encrypted.
266
-
267
- #### Implementation of
268
-
269
- `IUrlTransformerComponent.encryptQueryParams`
270
-
271
- ***
272
-
273
- ### decryptQueryParams() {#decryptqueryparams}
274
-
275
- > **decryptQueryParams**(`httpRequestQuery`, `keys`): `Promise`\<`void`\>
276
-
277
- Decrypt query parameters.
278
-
279
- #### Parameters
280
-
281
- ##### httpRequestQuery
282
-
283
- `IHttpRequestQuery` \| `undefined`
284
-
285
- The HTTP request query containing the encrypted values.
286
-
287
- ##### keys
288
-
289
- `string`[]
290
-
291
- The keys of the parameters to decrypt.
292
-
293
- #### Returns
294
-
295
- `Promise`\<`void`\>
296
-
297
- A promise that resolves when the query parameters have been decrypted.
298
-
299
- #### Implementation of
300
-
301
- `IUrlTransformerComponent.decryptQueryParams`
302
-
303
- ***
304
-
305
- ### encryptParam() {#encryptparam}
306
-
307
- > **encryptParam**(`paramValue`): `Promise`\<`string`\>
308
-
309
- Encrypt a parameter value.
310
-
311
- #### Parameters
312
-
313
- ##### paramValue
314
-
315
- `string`
316
-
317
- The value of the parameter to encrypt.
318
-
319
- #### Returns
320
-
321
- `Promise`\<`string`\>
322
-
323
- A promise that resolves to the encrypted value of the parameter.
324
-
325
- #### Implementation of
326
-
327
- `IUrlTransformerComponent.encryptParam`
328
-
329
- ***
330
-
331
- ### decryptParam() {#decryptparam}
332
-
333
- > **decryptParam**(`encryptedValue`): `Promise`\<`string`\>
334
-
335
- Decrypt a parameter value.
336
-
337
- #### Parameters
338
-
339
- ##### encryptedValue
340
-
341
- `string`
342
-
343
- The encrypted value of the parameter.
344
-
345
- #### Returns
346
-
347
- `Promise`\<`string`\>
348
-
349
- A promise that resolves to the decrypted value of the parameter.
350
-
351
- #### Implementation of
352
-
353
- `IUrlTransformerComponent.decryptParam`
354
-
355
- ***
356
-
357
- ### getParamName() {#getparamname}
358
-
359
- > **getParamName**(`key`): `string` \| `undefined`
360
-
361
- Get the parameter name for a given key.
362
-
363
- #### Parameters
364
-
365
- ##### key
366
-
367
- `string`
368
-
369
- The key of the parameter.
370
-
371
- #### Returns
372
-
373
- `string` \| `undefined`
374
-
375
- The parameter name.
376
-
377
- #### Implementation of
378
-
379
- `IUrlTransformerComponent.getParamName`
@@ -1,32 +0,0 @@
1
- # Interface: IUrlTransformerServiceConfig
2
-
3
- Configuration for the URL transformer service.
4
-
5
- ## Properties
6
-
7
- ### paramEncryptionKeyName? {#paramencryptionkeyname}
8
-
9
- > `optional` **paramEncryptionKeyName?**: `string`
10
-
11
- The name of the key to retrieve from the vault for encryption/decryption of parameters.
12
-
13
- #### Default
14
-
15
- ```ts
16
- param-encryption
17
- ```
18
-
19
- ***
20
-
21
- ### queryParamNames? {#queryparamnames}
22
-
23
- > `optional` **queryParamNames?**: `object`
24
-
25
- A dictionary mapping logical token identifiers to their URL query parameter names.
26
- For example: tenant => tenant-token maps the logical id "tenant" to the
27
- query param "tenant-token". When an id is not present the id itself is used as
28
- the param name.
29
-
30
- #### Index Signature
31
-
32
- \[`id`: `string`\]: `string`
@@ -1,25 +0,0 @@
1
- # Interface: IUrlTransformerServiceConstructorOptions
2
-
3
- Options for the UrlTransformerService constructor.
4
-
5
- ## Properties
6
-
7
- ### vaultConnectorType? {#vaultconnectortype}
8
-
9
- > `optional` **vaultConnectorType?**: `string`
10
-
11
- The vault connector type.
12
-
13
- #### Default
14
-
15
- ```ts
16
- vault
17
- ```
18
-
19
- ***
20
-
21
- ### config? {#config}
22
-
23
- > `optional` **config?**: [`IUrlTransformerServiceConfig`](IUrlTransformerServiceConfig.md)
24
-
25
- The configuration for the service.