@twin.org/api-rest-client 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.
@@ -20,6 +20,14 @@ class InformationClient extends apiCore.BaseRestClient {
20
20
  constructor(config) {
21
21
  super("InformationClient", config, "");
22
22
  }
23
+ /**
24
+ * Get the server root.
25
+ * @returns The root root.
26
+ */
27
+ async root() {
28
+ const response = await this.fetch("/", "GET");
29
+ return response.body;
30
+ }
23
31
  /**
24
32
  * Get the server information.
25
33
  * @returns The service information.
@@ -28,6 +36,14 @@ class InformationClient extends apiCore.BaseRestClient {
28
36
  const response = await this.fetch("/info", "GET");
29
37
  return response.body;
30
38
  }
39
+ /**
40
+ * Get the favicon.
41
+ * @returns The favicon.
42
+ */
43
+ async favicon() {
44
+ const response = await this.fetch("/favicon.ico", "GET");
45
+ return response.body;
46
+ }
31
47
  /**
32
48
  * Get the OpenAPI spec.
33
49
  * @returns The OpenAPI spec.
@@ -18,6 +18,14 @@ class InformationClient extends BaseRestClient {
18
18
  constructor(config) {
19
19
  super("InformationClient", config, "");
20
20
  }
21
+ /**
22
+ * Get the server root.
23
+ * @returns The root root.
24
+ */
25
+ async root() {
26
+ const response = await this.fetch("/", "GET");
27
+ return response.body;
28
+ }
21
29
  /**
22
30
  * Get the server information.
23
31
  * @returns The service information.
@@ -26,6 +34,14 @@ class InformationClient extends BaseRestClient {
26
34
  const response = await this.fetch("/info", "GET");
27
35
  return response.body;
28
36
  }
37
+ /**
38
+ * Get the favicon.
39
+ * @returns The favicon.
40
+ */
41
+ async favicon() {
42
+ const response = await this.fetch("/favicon.ico", "GET");
43
+ return response.body;
44
+ }
29
45
  /**
30
46
  * Get the OpenAPI spec.
31
47
  * @returns The OpenAPI spec.
@@ -13,11 +13,21 @@ export declare class InformationClient extends BaseRestClient implements IInform
13
13
  * @param config The configuration for the client.
14
14
  */
15
15
  constructor(config: IBaseRestClientConfig);
16
+ /**
17
+ * Get the server root.
18
+ * @returns The root root.
19
+ */
20
+ root(): Promise<string>;
16
21
  /**
17
22
  * Get the server information.
18
23
  * @returns The service information.
19
24
  */
20
25
  info(): Promise<IServerInfo>;
26
+ /**
27
+ * Get the favicon.
28
+ * @returns The favicon.
29
+ */
30
+ favicon(): Promise<Uint8Array | undefined>;
21
31
  /**
22
32
  * Get the OpenAPI spec.
23
33
  * @returns The OpenAPI spec.
package/docs/changelog.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @twin.org/api-rest-client - Changelog
2
2
 
3
+ ## [0.0.2-next.8](https://github.com/twinfoundation/api/compare/api-rest-client-v0.0.2-next.7...api-rest-client-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
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @twin.org/api-core bumped from 0.0.2-next.7 to 0.0.2-next.8
16
+ * @twin.org/api-models bumped from 0.0.2-next.7 to 0.0.2-next.8
17
+
3
18
  ## [0.0.2-next.7](https://github.com/twinfoundation/api/compare/api-rest-client-v0.0.2-next.6...api-rest-client-v0.0.2-next.7) (2025-08-20)
4
19
 
5
20
 
@@ -48,6 +48,24 @@ Runtime name for the class.
48
48
 
49
49
  ## Methods
50
50
 
51
+ ### root()
52
+
53
+ > **root**(): `Promise`\<`string`\>
54
+
55
+ Get the server root.
56
+
57
+ #### Returns
58
+
59
+ `Promise`\<`string`\>
60
+
61
+ The root root.
62
+
63
+ #### Implementation of
64
+
65
+ `IInformationComponent.root`
66
+
67
+ ***
68
+
51
69
  ### info()
52
70
 
53
71
  > **info**(): `Promise`\<`IServerInfo`\>
@@ -66,6 +84,24 @@ The service information.
66
84
 
67
85
  ***
68
86
 
87
+ ### favicon()
88
+
89
+ > **favicon**(): `Promise`\<`undefined` \| `Uint8Array`\<`ArrayBufferLike`\>\>
90
+
91
+ Get the favicon.
92
+
93
+ #### Returns
94
+
95
+ `Promise`\<`undefined` \| `Uint8Array`\<`ArrayBufferLike`\>\>
96
+
97
+ The favicon.
98
+
99
+ #### Implementation of
100
+
101
+ `IInformationComponent.favicon`
102
+
103
+ ***
104
+
69
105
  ### spec()
70
106
 
71
107
  > **spec**(): `Promise`\<`unknown`\>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/api-rest-client",
3
- "version": "0.0.2-next.7",
3
+ "version": "0.0.2-next.8",
4
4
  "description": "Information contract implementation which can connect to REST endpoints",
5
5
  "repository": {
6
6
  "type": "git",
@@ -14,8 +14,8 @@
14
14
  "node": ">=20.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@twin.org/api-core": "0.0.2-next.7",
18
- "@twin.org/api-models": "0.0.2-next.7",
17
+ "@twin.org/api-core": "0.0.2-next.8",
18
+ "@twin.org/api-models": "0.0.2-next.8",
19
19
  "@twin.org/core": "next",
20
20
  "@twin.org/nameof": "next",
21
21
  "@twin.org/web": "next"