@twin.org/api-models 0.0.3-next.48 → 0.0.3-next.49
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":"IPlatformComponent.js","sourceRoot":"","sources":["../../../../src/models/services/IPlatformComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\n\n/**\n * Interface for the platform component.\n */\nexport interface IPlatformComponent extends IComponent {\n\t/**\n\t * Indicates whether the component is running in a multi-tenant environment.\n\t * @returns True if the component is running in a multi-tenant environment, false otherwise.\n\t */\n\tisMultiTenant(): boolean;\n\n\t/**\n\t * Execute a method, if single tenant will run once, if multi-tenant will run for each tenant.\n\t * @param method The method to run for each tenant.\n\t * @returns A promise that resolves when the method has been executed for all applicable tenants.\n\t */\n\texecute(method: () => Promise<void>): Promise<void>;\n\n\t/**\n\t *
|
|
1
|
+
{"version":3,"file":"IPlatformComponent.js","sourceRoot":"","sources":["../../../../src/models/services/IPlatformComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IContextIds } from \"@twin.org/context\";\nimport type { IComponent } from \"@twin.org/core\";\n\n/**\n * Interface for the platform component.\n */\nexport interface IPlatformComponent extends IComponent {\n\t/**\n\t * Indicates whether the component is running in a multi-tenant environment.\n\t * @returns True if the component is running in a multi-tenant environment, false otherwise.\n\t */\n\tisMultiTenant(): boolean;\n\n\t/**\n\t * Execute a method, if single tenant will run once, if multi-tenant will run for each tenant.\n\t * @param method The method to run for each tenant.\n\t * @returns A promise that resolves when the method has been executed for all applicable tenants.\n\t */\n\texecute(method: () => Promise<void>): Promise<void>;\n\n\t/**\n\t * Get the local origin context IDs for the given URL.\n\t * @param url The URL to check.\n\t * @returns A promise that resolves to the context IDs if the URL is a local origin, undefined otherwise.\n\t */\n\tgetLocalOriginContext(url: string): Promise<IContextIds | undefined>;\n}\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { IContextIds } from "@twin.org/context";
|
|
1
2
|
import type { IComponent } from "@twin.org/core";
|
|
2
3
|
/**
|
|
3
4
|
* Interface for the platform component.
|
|
@@ -15,9 +16,9 @@ export interface IPlatformComponent extends IComponent {
|
|
|
15
16
|
*/
|
|
16
17
|
execute(method: () => Promise<void>): Promise<void>;
|
|
17
18
|
/**
|
|
18
|
-
*
|
|
19
|
+
* Get the local origin context IDs for the given URL.
|
|
19
20
|
* @param url The URL to check.
|
|
20
|
-
* @returns A promise that resolves to
|
|
21
|
+
* @returns A promise that resolves to the context IDs if the URL is a local origin, undefined otherwise.
|
|
21
22
|
*/
|
|
22
|
-
|
|
23
|
+
getLocalOriginContext(url: string): Promise<IContextIds | undefined>;
|
|
23
24
|
}
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.3-next.49](https://github.com/iotaledger/twin-api/compare/api-models-v0.0.3-next.48...api-models-v0.0.3-next.49) (2026-06-19)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add getLocalOriginContext ([bd3162f](https://github.com/iotaledger/twin-api/commit/bd3162f5b06e22bfb09a95bb9aca40471efe6a64))
|
|
9
|
+
|
|
3
10
|
## [0.0.3-next.48](https://github.com/iotaledger/twin-api/compare/api-models-v0.0.3-next.47...api-models-v0.0.3-next.48) (2026-06-19)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -44,11 +44,11 @@ A promise that resolves when the method has been executed for all applicable ten
|
|
|
44
44
|
|
|
45
45
|
***
|
|
46
46
|
|
|
47
|
-
###
|
|
47
|
+
### getLocalOriginContext() {#getlocalorigincontext}
|
|
48
48
|
|
|
49
|
-
> **
|
|
49
|
+
> **getLocalOriginContext**(`url`): `Promise`\<`IContextIds` \| `undefined`\>
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
Get the local origin context IDs for the given URL.
|
|
52
52
|
|
|
53
53
|
#### Parameters
|
|
54
54
|
|
|
@@ -60,6 +60,6 @@ The URL to check.
|
|
|
60
60
|
|
|
61
61
|
#### Returns
|
|
62
62
|
|
|
63
|
-
`Promise`\<`
|
|
63
|
+
`Promise`\<`IContextIds` \| `undefined`\>
|
|
64
64
|
|
|
65
|
-
A promise that resolves to
|
|
65
|
+
A promise that resolves to the context IDs if the URL is a local origin, undefined otherwise.
|
package/package.json
CHANGED