@twin.org/api-models 0.0.3-next.30 → 0.0.3-next.31

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.
@@ -1 +1 @@
1
- {"version":3,"file":"IUrlTransformerComponent.js","sourceRoot":"","sources":["../../../../src/models/services/IUrlTransformerComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type { IHttpRequestQuery } from \"../protocol/IHttpRequestQuery.js\";\n\n/**\n * The URL transformer component for encrypting and decrypting URL parameters.\n */\nexport interface IUrlTransformerComponent extends IComponent {\n\t/**\n\t * Encrypt a named token value and append it as a query parameter to the given URL.\n\t * The URL param name is resolved from the configured token name dictionary using the id.\n\t * @param url The URL to append the encrypted token to.\n\t * @param id The logical token identifier (e.g. \"tenant\").\n\t * @param value The value to encrypt and add.\n\t * @returns The URL with the encrypted token added as a query parameter.\n\t */\n\taddEncryptedQueryParamToUrl(url: string, id: string, value: string): Promise<string>;\n\n\t/**\n\t * Get a named token value from the query parameters.\n\t * The URL param name is resolved from the configured token name dictionary using the id.\n\t * @param queryParams The HTTP request query containing the parameters.\n\t * @param id The logical token identifier (e.g. \"tenant\").\n\t * @returns The decrypted token value if it exists.\n\t */\n\tgetEncryptedQueryParam(\n\t\tqueryParams: IHttpRequestQuery | undefined,\n\t\tid: string\n\t): Promise<string | undefined>;\n\n\t/**\n\t * Add encrypted key/value pairs to a URL's query string.\n\t * Existing query parameters on the URL are preserved; the provided params are\n\t * merged in and then encrypted before being written back to the URL.\n\t * @param url The base URL to add parameters to.\n\t * @param params The key/value pairs to encrypt and append.\n\t * @returns The URL with the encrypted parameters added.\n\t */\n\taddEncryptedParamsToUrl(url: string, params: IHttpRequestQuery): Promise<string>;\n\n\t/**\n\t * Decrypt specified keys from a query parameter object and return their plain-text values.\n\t * @param queryParams The HTTP request query containing the encrypted parameters.\n\t * @param keys The keys to decrypt.\n\t * @returns A map of the decrypted key/value pairs that were present.\n\t */\n\tgetDecryptedParamsFromQueryParams(\n\t\tqueryParams: IHttpRequestQuery | undefined,\n\t\tkeys: string[]\n\t): Promise<IHttpRequestQuery>;\n\n\t/**\n\t * Encrypt query parameters using the URL transformer's encryption mechanism.\n\t * @param httpRequestQuery The HTTP request query containing the parameters to encrypt.\n\t * @param keys The keys of the parameters to encrypt.\n\t * @returns A promise that resolves when the query parameters have been encrypted.\n\t */\n\tencryptQueryParams(\n\t\thttpRequestQuery: IHttpRequestQuery | undefined,\n\t\tkeys: string[]\n\t): Promise<void>;\n\n\t/**\n\t * Decrypt query parameters using the URL transformer's encryption mechanism.\n\t * @param httpRequestQuery The HTTP request query containing the encrypted values.\n\t * @param keys The keys of the parameters to decrypt.\n\t * @returns A promise that resolves when the query parameters have been decrypted.\n\t */\n\tdecryptQueryParams(\n\t\thttpRequestQuery: IHttpRequestQuery | undefined,\n\t\tkeys: string[]\n\t): Promise<void>;\n\n\t/**\n\t * Encrypt a parameter value.\n\t * @param paramValue The value of the parameter to encrypt.\n\t * @returns A promise that resolves to the encrypted value of the parameter.\n\t */\n\tencryptParam(paramValue: string): Promise<string>;\n\n\t/**\n\t * Decrypt a parameter value.\n\t * @param encryptedValue The encrypted value of the parameter.\n\t * @returns A promise that resolves to the decrypted value of the parameter.\n\t */\n\tdecryptParam(encryptedValue: string): Promise<string>;\n}\n"]}
1
+ {"version":3,"file":"IUrlTransformerComponent.js","sourceRoot":"","sources":["../../../../src/models/services/IUrlTransformerComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type { IHttpRequestQuery } from \"../protocol/IHttpRequestQuery.js\";\n\n/**\n * The URL transformer component for encrypting and decrypting URL parameters.\n */\nexport interface IUrlTransformerComponent extends IComponent {\n\t/**\n\t * Encrypt a named token value and append it as a query parameter to the given URL.\n\t * The URL param name is resolved from the configured token name dictionary using the id.\n\t * @param url The URL to append the encrypted token to.\n\t * @param id The logical token identifier (e.g. \"tenant\").\n\t * @param value The value to encrypt and add.\n\t * @returns The URL with the encrypted token added as a query parameter.\n\t */\n\taddEncryptedQueryParamToUrl(url: string, id: string, value: string): Promise<string>;\n\n\t/**\n\t * Get a named token value from the query parameters.\n\t * The URL param name is resolved from the configured token name dictionary using the id.\n\t * @param queryParams The HTTP request query containing the parameters.\n\t * @param id The logical token identifier (e.g. \"tenant\").\n\t * @returns The decrypted token value if it exists.\n\t */\n\tgetEncryptedQueryParam(\n\t\tqueryParams: IHttpRequestQuery | undefined,\n\t\tid: string\n\t): Promise<string | undefined>;\n\n\t/**\n\t * Add encrypted key/value pairs to a URL's query string.\n\t * Existing query parameters on the URL are preserved; the provided params are\n\t * merged in and then encrypted before being written back to the URL.\n\t * @param url The base URL to add parameters to.\n\t * @param params The key/value pairs to encrypt and append.\n\t * @returns The URL with the encrypted parameters added.\n\t */\n\taddEncryptedToUrl(url: string, params: IHttpRequestQuery): Promise<string>;\n\n\t/**\n\t * Decrypt specified keys from a query parameter object and return their plain-text values.\n\t * @param queryParams The HTTP request query containing the encrypted parameters.\n\t * @param keys The keys to decrypt.\n\t * @returns A map of the decrypted key/value pairs that were present.\n\t */\n\tgetDecryptedFromQueryParams(\n\t\tqueryParams: IHttpRequestQuery | undefined,\n\t\tkeys: string[]\n\t): Promise<IHttpRequestQuery>;\n\n\t/**\n\t * Encrypt query parameters using the URL transformer's encryption mechanism.\n\t * @param httpRequestQuery The HTTP request query containing the parameters to encrypt.\n\t * @param keys The keys of the parameters to encrypt.\n\t * @returns A promise that resolves when the query parameters have been encrypted.\n\t */\n\tencryptQueryParams(\n\t\thttpRequestQuery: IHttpRequestQuery | undefined,\n\t\tkeys: string[]\n\t): Promise<void>;\n\n\t/**\n\t * Decrypt query parameters using the URL transformer's encryption mechanism.\n\t * @param httpRequestQuery The HTTP request query containing the encrypted values.\n\t * @param keys The keys of the parameters to decrypt.\n\t * @returns A promise that resolves when the query parameters have been decrypted.\n\t */\n\tdecryptQueryParams(\n\t\thttpRequestQuery: IHttpRequestQuery | undefined,\n\t\tkeys: string[]\n\t): Promise<void>;\n\n\t/**\n\t * Encrypt a parameter value.\n\t * @param paramValue The value of the parameter to encrypt.\n\t * @returns A promise that resolves to the encrypted value of the parameter.\n\t */\n\tencryptParam(paramValue: string): Promise<string>;\n\n\t/**\n\t * Decrypt a parameter value.\n\t * @param encryptedValue The encrypted value of the parameter.\n\t * @returns A promise that resolves to the decrypted value of the parameter.\n\t */\n\tdecryptParam(encryptedValue: string): Promise<string>;\n}\n"]}
@@ -29,14 +29,14 @@ export interface IUrlTransformerComponent extends IComponent {
29
29
  * @param params The key/value pairs to encrypt and append.
30
30
  * @returns The URL with the encrypted parameters added.
31
31
  */
32
- addEncryptedParamsToUrl(url: string, params: IHttpRequestQuery): Promise<string>;
32
+ addEncryptedToUrl(url: string, params: IHttpRequestQuery): Promise<string>;
33
33
  /**
34
34
  * Decrypt specified keys from a query parameter object and return their plain-text values.
35
35
  * @param queryParams The HTTP request query containing the encrypted parameters.
36
36
  * @param keys The keys to decrypt.
37
37
  * @returns A map of the decrypted key/value pairs that were present.
38
38
  */
39
- getDecryptedParamsFromQueryParams(queryParams: IHttpRequestQuery | undefined, keys: string[]): Promise<IHttpRequestQuery>;
39
+ getDecryptedFromQueryParams(queryParams: IHttpRequestQuery | undefined, keys: string[]): Promise<IHttpRequestQuery>;
40
40
  /**
41
41
  * Encrypt query parameters using the URL transformer's encryption mechanism.
42
42
  * @param httpRequestQuery The HTTP request query containing the parameters to encrypt.
package/docs/changelog.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.0.3-next.31](https://github.com/twinfoundation/twin-api/compare/api-models-v0.0.3-next.30...api-models-v0.0.3-next.31) (2026-05-06)
4
+
5
+
6
+ ### Features
7
+
8
+ * update health format ([cfbfbbb](https://github.com/twinfoundation/twin-api/commit/cfbfbbb2e9afbd2574ffd2446ad51e4217437951))
9
+
3
10
  ## [0.0.3-next.30](https://github.com/twinfoundation/twin-api/compare/api-models-v0.0.3-next.29...api-models-v0.0.3-next.30) (2026-05-05)
4
11
 
5
12
 
@@ -72,9 +72,9 @@ The decrypted token value if it exists.
72
72
 
73
73
  ***
74
74
 
75
- ### addEncryptedParamsToUrl() {#addencryptedparamstourl}
75
+ ### addEncryptedToUrl() {#addencryptedtourl}
76
76
 
77
- > **addEncryptedParamsToUrl**(`url`, `params`): `Promise`\<`string`\>
77
+ > **addEncryptedToUrl**(`url`, `params`): `Promise`\<`string`\>
78
78
 
79
79
  Add encrypted key/value pairs to a URL's query string.
80
80
  Existing query parameters on the URL are preserved; the provided params are
@@ -102,9 +102,9 @@ The URL with the encrypted parameters added.
102
102
 
103
103
  ***
104
104
 
105
- ### getDecryptedParamsFromQueryParams() {#getdecryptedparamsfromqueryparams}
105
+ ### getDecryptedFromQueryParams() {#getdecryptedfromqueryparams}
106
106
 
107
- > **getDecryptedParamsFromQueryParams**(`queryParams`, `keys`): `Promise`\<[`IHttpRequestQuery`](IHttpRequestQuery.md)\>
107
+ > **getDecryptedFromQueryParams**(`queryParams`, `keys`): `Promise`\<[`IHttpRequestQuery`](IHttpRequestQuery.md)\>
108
108
 
109
109
  Decrypt specified keys from a query parameter object and return their plain-text values.
110
110
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/api-models",
3
- "version": "0.0.3-next.30",
3
+ "version": "0.0.3-next.31",
4
4
  "description": "Shared API contracts, route types, and response models used across services and clients.",
5
5
  "repository": {
6
6
  "type": "git",