@twin.org/api-models 0.0.3-next.16 → 0.0.3-next.17

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":"IHttpServerRequest.js","sourceRoot":"","sources":["../../../../src/models/protocol/IHttpServerRequest.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { HttpMethod } from \"@twin.org/web\";\nimport type { IHttpRequest } from \"./IHttpRequest.js\";\n\n/**\n * Model for the standard parameters for an http request.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport interface IHttpServerRequest<T = any> extends IHttpRequest<T> {\n\t/**\n\t * The request method.\n\t */\n\tmethod?: HttpMethod;\n\n\t/**\n\t * The request url.\n\t */\n\turl?: string;\n}\n"]}
1
+ {"version":3,"file":"IHttpServerRequest.js","sourceRoot":"","sources":["../../../../src/models/protocol/IHttpServerRequest.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { HttpMethod } from \"@twin.org/web\";\nimport type { IHttpRequest } from \"./IHttpRequest.js\";\n\n/**\n * Model for the standard parameters for an http request.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport interface IHttpServerRequest<T = any> extends IHttpRequest<T> {\n\t/**\n\t * The request url.\n\t */\n\turl: string;\n\n\t/**\n\t * The request method.\n\t */\n\tmethod?: HttpMethod;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IHostingComponent.js","sourceRoot":"","sources":["../../../../src/models/services/IHostingComponent.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 * The information about the hosting of the API.\n */\nexport interface IHostingComponent extends IComponent {\n\t/**\n\t * Get the public origin for the hosting.\n\t * @param serverRequestUrl The url of the current server request if there is one.\n\t * @returns The public origin.\n\t */\n\tgetPublicOrigin(serverRequestUrl?: string): Promise<string>;\n\n\t/**\n\t * Get the public origin for the tenant if one exists.\n\t * @param tenantId The tenant identifier.\n\t * @returns The public origin for the tenant.\n\t */\n\tgetTenantOrigin(tenantId: string): Promise<string | undefined>;\n\n\t/**\n\t * Build a public url based on the public origin and the url provided.\n\t * @param url The url to build upon the public origin.\n\t * @param serverRequestUrl The url of the current server request if there is one.\n\t * @returns The full url based on the public origin.\n\t */\n\tbuildPublicUrl(url: string, serverRequestUrl?: string): Promise<string>;\n}\n"]}
1
+ {"version":3,"file":"IHostingComponent.js","sourceRoot":"","sources":["../../../../src/models/services/IHostingComponent.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 * The information about the hosting of the API.\n */\nexport interface IHostingComponent extends IComponent {\n\t/**\n\t * Get the public origin for the hosting.\n\t * @param serverRequestUrl The url of the current server request if there is one.\n\t * @returns The public origin.\n\t */\n\tgetPublicOrigin(serverRequestUrl?: string): Promise<string>;\n\n\t/**\n\t * Get the public origin for the tenant if one exists.\n\t * @param tenantId The tenant identifier.\n\t * @returns The public origin for the tenant.\n\t */\n\tgetTenantOrigin(tenantId: string): Promise<string | undefined>;\n\n\t/**\n\t * Build a public url based on the public origin and the url provided.\n\t * @param url The url to build upon the public origin.\n\t * @returns The full url based on the public origin.\n\t */\n\tbuildPublicUrl(url: string): Promise<string>;\n}\n"]}
@@ -5,11 +5,11 @@ import type { IHttpRequest } from "./IHttpRequest.js";
5
5
  */
6
6
  export interface IHttpServerRequest<T = any> extends IHttpRequest<T> {
7
7
  /**
8
- * The request method.
8
+ * The request url.
9
9
  */
10
- method?: HttpMethod;
10
+ url: string;
11
11
  /**
12
- * The request url.
12
+ * The request method.
13
13
  */
14
- url?: string;
14
+ method?: HttpMethod;
15
15
  }
@@ -18,8 +18,7 @@ export interface IHostingComponent extends IComponent {
18
18
  /**
19
19
  * Build a public url based on the public origin and the url provided.
20
20
  * @param url The url to build upon the public origin.
21
- * @param serverRequestUrl The url of the current server request if there is one.
22
21
  * @returns The full url based on the public origin.
23
22
  */
24
- buildPublicUrl(url: string, serverRequestUrl?: string): Promise<string>;
23
+ buildPublicUrl(url: string): Promise<string>;
25
24
  }
package/docs/changelog.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @twin.org/api-models - Changelog
2
2
 
3
+ ## [0.0.3-next.17](https://github.com/twinfoundation/api/compare/api-models-v0.0.3-next.16...api-models-v0.0.3-next.17) (2026-01-26)
4
+
5
+
6
+ ### Features
7
+
8
+ * update public origin building ([6c8e042](https://github.com/twinfoundation/api/commit/6c8e0422d9ddbed42a843e1c23498c99977b2fc7))
9
+
3
10
  ## [0.0.3-next.16](https://github.com/twinfoundation/api/compare/api-models-v0.0.3-next.15...api-models-v0.0.3-next.16) (2026-01-26)
4
11
 
5
12
 
@@ -54,7 +54,7 @@ The public origin for the tenant.
54
54
 
55
55
  ### buildPublicUrl()
56
56
 
57
- > **buildPublicUrl**(`url`, `serverRequestUrl?`): `Promise`\<`string`\>
57
+ > **buildPublicUrl**(`url`): `Promise`\<`string`\>
58
58
 
59
59
  Build a public url based on the public origin and the url provided.
60
60
 
@@ -66,12 +66,6 @@ Build a public url based on the public origin and the url provided.
66
66
 
67
67
  The url to build upon the public origin.
68
68
 
69
- ##### serverRequestUrl?
70
-
71
- `string`
72
-
73
- The url of the current server request if there is one.
74
-
75
69
  #### Returns
76
70
 
77
71
  `Promise`\<`string`\>
@@ -66,16 +66,16 @@ Data to return send as the body.
66
66
 
67
67
  ***
68
68
 
69
- ### method?
69
+ ### url
70
70
 
71
- > `optional` **method**: `HttpMethod`
71
+ > **url**: `string`
72
72
 
73
- The request method.
73
+ The request url.
74
74
 
75
75
  ***
76
76
 
77
- ### url?
77
+ ### method?
78
78
 
79
- > `optional` **url**: `string`
79
+ > `optional` **method**: `HttpMethod`
80
80
 
81
- The request url.
81
+ The request method.
@@ -62,27 +62,27 @@ Data to return send as the body.
62
62
 
63
63
  ***
64
64
 
65
- ### method?
65
+ ### url
66
66
 
67
- > `optional` **method**: `HttpMethod`
67
+ > **url**: `string`
68
68
 
69
- The request method.
69
+ The request url.
70
70
 
71
71
  #### Inherited from
72
72
 
73
- [`IHttpServerRequest`](IHttpServerRequest.md).[`method`](IHttpServerRequest.md#method)
73
+ [`IHttpServerRequest`](IHttpServerRequest.md).[`url`](IHttpServerRequest.md#url)
74
74
 
75
75
  ***
76
76
 
77
- ### url?
77
+ ### method?
78
78
 
79
- > `optional` **url**: `string`
79
+ > `optional` **method**: `HttpMethod`
80
80
 
81
- The request url.
81
+ The request method.
82
82
 
83
83
  #### Inherited from
84
84
 
85
- [`IHttpServerRequest`](IHttpServerRequest.md).[`url`](IHttpServerRequest.md#url)
85
+ [`IHttpServerRequest`](IHttpServerRequest.md).[`method`](IHttpServerRequest.md#method)
86
86
 
87
87
  ***
88
88
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/api-models",
3
- "version": "0.0.3-next.16",
3
+ "version": "0.0.3-next.17",
4
4
  "description": "Contains models and classes for use with APIs",
5
5
  "repository": {
6
6
  "type": "git",