@twin.org/api-models 0.0.2-next.7 → 0.0.2-next.8

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.
@@ -3,8 +3,10 @@ export * from "./factories/restRouteProcessorFactory";
3
3
  export * from "./factories/socketRouteProcessorFactory";
4
4
  export * from "./helpers/httpErrorHelper";
5
5
  export * from "./helpers/httpParameterHelper";
6
+ export * from "./models/api/IServerFavIconResponse";
6
7
  export * from "./models/api/IServerHealthResponse";
7
8
  export * from "./models/api/IServerInfoResponse";
9
+ export * from "./models/api/IServerRootResponse";
8
10
  export * from "./models/api/IServerSpecResponse";
9
11
  export * from "./models/config/IBaseRestClientConfig";
10
12
  export * from "./models/config/IBaseSocketClientConfig";
@@ -0,0 +1,23 @@
1
+ import type { HeaderTypes, HttpStatusCode } from "@twin.org/web";
2
+ /**
3
+ * The favicon for the server.
4
+ */
5
+ export interface IServerFavIconResponse {
6
+ /**
7
+ * Additional response headers.
8
+ */
9
+ headers?: {
10
+ /**
11
+ * The content type for the response.
12
+ */
13
+ [HeaderTypes.ContentType]?: string;
14
+ };
15
+ /**
16
+ * Response status code.
17
+ */
18
+ statusCode?: HttpStatusCode;
19
+ /**
20
+ * The favicon for the server.
21
+ */
22
+ body?: Uint8Array;
23
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * The root text for the server.
3
+ */
4
+ export interface IServerRootResponse {
5
+ /**
6
+ * The root text for the server.
7
+ */
8
+ body: string;
9
+ }
@@ -6,11 +6,21 @@ import type { IServerInfo } from "./IServerInfo";
6
6
  * The information component for the server.
7
7
  */
8
8
  export interface IInformationComponent extends IComponent {
9
+ /**
10
+ * Get the root information.
11
+ * @returns The root information.
12
+ */
13
+ root(): Promise<string>;
9
14
  /**
10
15
  * Get the server information.
11
16
  * @returns The service information.
12
17
  */
13
18
  info(): Promise<IServerInfo>;
19
+ /**
20
+ * Get the favicon.
21
+ * @returns The favicon.
22
+ */
23
+ favicon(): Promise<Uint8Array | undefined>;
14
24
  /**
15
25
  * Get the OpenAPI spec.
16
26
  * @returns The OpenAPI spec.
package/docs/changelog.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @twin.org/api-models - Changelog
2
2
 
3
+ ## [0.0.2-next.8](https://github.com/twinfoundation/api/compare/api-models-v0.0.2-next.7...api-models-v0.0.2-next.8) (2025-08-21)
4
+
5
+
6
+ ### Features
7
+
8
+ * add root, favicon routes ([71da1c3](https://github.com/twinfoundation/api/commit/71da1c3a93c349588aff7084d1d8d6a29a277da8))
9
+
3
10
  ## [0.0.2-next.7](https://github.com/twinfoundation/api/compare/api-models-v0.0.2-next.6...api-models-v0.0.2-next.7) (2025-08-20)
4
11
 
5
12
 
@@ -7,8 +7,10 @@
7
7
 
8
8
  ## Interfaces
9
9
 
10
+ - [IServerFavIconResponse](interfaces/IServerFavIconResponse.md)
10
11
  - [IServerHealthResponse](interfaces/IServerHealthResponse.md)
11
12
  - [IServerInfoResponse](interfaces/IServerInfoResponse.md)
13
+ - [IServerRootResponse](interfaces/IServerRootResponse.md)
12
14
  - [IServerSpecResponse](interfaces/IServerSpecResponse.md)
13
15
  - [IBaseRestClientConfig](interfaces/IBaseRestClientConfig.md)
14
16
  - [IBaseSocketClientConfig](interfaces/IBaseSocketClientConfig.md)
@@ -8,6 +8,20 @@ The information component for the server.
8
8
 
9
9
  ## Methods
10
10
 
11
+ ### root()
12
+
13
+ > **root**(): `Promise`\<`string`\>
14
+
15
+ Get the root information.
16
+
17
+ #### Returns
18
+
19
+ `Promise`\<`string`\>
20
+
21
+ The root information.
22
+
23
+ ***
24
+
11
25
  ### info()
12
26
 
13
27
  > **info**(): `Promise`\<[`IServerInfo`](IServerInfo.md)\>
@@ -22,6 +36,20 @@ The service information.
22
36
 
23
37
  ***
24
38
 
39
+ ### favicon()
40
+
41
+ > **favicon**(): `Promise`\<`undefined` \| `Uint8Array`\<`ArrayBufferLike`\>\>
42
+
43
+ Get the favicon.
44
+
45
+ #### Returns
46
+
47
+ `Promise`\<`undefined` \| `Uint8Array`\<`ArrayBufferLike`\>\>
48
+
49
+ The favicon.
50
+
51
+ ***
52
+
25
53
  ### spec()
26
54
 
27
55
  > **spec**(): `Promise`\<`unknown`\>
@@ -0,0 +1,33 @@
1
+ # Interface: IServerFavIconResponse
2
+
3
+ The favicon for the server.
4
+
5
+ ## Properties
6
+
7
+ ### headers?
8
+
9
+ > `optional` **headers**: `object`
10
+
11
+ Additional response headers.
12
+
13
+ #### content-type?
14
+
15
+ > `optional` **content-type**: `string`
16
+
17
+ The content type for the response.
18
+
19
+ ***
20
+
21
+ ### statusCode?
22
+
23
+ > `optional` **statusCode**: `HttpStatusCode`
24
+
25
+ Response status code.
26
+
27
+ ***
28
+
29
+ ### body?
30
+
31
+ > `optional` **body**: `Uint8Array`\<`ArrayBufferLike`\>
32
+
33
+ The favicon for the server.
@@ -0,0 +1,11 @@
1
+ # Interface: IServerRootResponse
2
+
3
+ The root text for the server.
4
+
5
+ ## Properties
6
+
7
+ ### body
8
+
9
+ > **body**: `string`
10
+
11
+ The root text for the server.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/api-models",
3
- "version": "0.0.2-next.7",
3
+ "version": "0.0.2-next.8",
4
4
  "description": "Contains models and classes for use with APIs",
5
5
  "repository": {
6
6
  "type": "git",