@twin.org/api-models 0.0.3-next.47 → 0.0.3-next.48

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"]}
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 * Determines if the given URL is a local origin.\n\t * @param url The URL to check.\n\t * @returns A promise that resolves to true if the URL is a local origin, false otherwise.\n\t */\n\tisLocalOrigin(url: string): Promise<boolean>;\n}\n"]}
@@ -14,4 +14,10 @@ export interface IPlatformComponent extends IComponent {
14
14
  * @returns A promise that resolves when the method has been executed for all applicable tenants.
15
15
  */
16
16
  execute(method: () => Promise<void>): Promise<void>;
17
+ /**
18
+ * Determines if the given URL is a local origin.
19
+ * @param url The URL to check.
20
+ * @returns A promise that resolves to true if the URL is a local origin, false otherwise.
21
+ */
22
+ isLocalOrigin(url: string): Promise<boolean>;
17
23
  }
package/docs/changelog.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [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
+
5
+
6
+ ### Features
7
+
8
+ * add platform isLocalOrigin ([#173](https://github.com/iotaledger/twin-api/issues/173)) ([5e024d5](https://github.com/iotaledger/twin-api/commit/5e024d55c0201a5109ad9c688c0e755fe50cb554))
9
+
3
10
  ## [0.0.3-next.47](https://github.com/iotaledger/twin-api/compare/api-models-v0.0.3-next.46...api-models-v0.0.3-next.47) (2026-06-18)
4
11
 
5
12
 
@@ -41,3 +41,25 @@ The method to run for each tenant.
41
41
  `Promise`\<`void`\>
42
42
 
43
43
  A promise that resolves when the method has been executed for all applicable tenants.
44
+
45
+ ***
46
+
47
+ ### isLocalOrigin() {#islocalorigin}
48
+
49
+ > **isLocalOrigin**(`url`): `Promise`\<`boolean`\>
50
+
51
+ Determines if the given URL is a local origin.
52
+
53
+ #### Parameters
54
+
55
+ ##### url
56
+
57
+ `string`
58
+
59
+ The URL to check.
60
+
61
+ #### Returns
62
+
63
+ `Promise`\<`boolean`\>
64
+
65
+ A promise that resolves to true if the URL is a local origin, false otherwise.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/api-models",
3
- "version": "0.0.3-next.47",
3
+ "version": "0.0.3-next.48",
4
4
  "description": "Shared API contracts, route types, and response models used across services and clients.",
5
5
  "repository": {
6
6
  "type": "git",