@twin.org/api-rest-client 0.0.2-next.1 → 0.0.2-next.11

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,156 @@
1
1
  # @twin.org/api-rest-client - Changelog
2
2
 
3
+ ## [0.0.2-next.11](https://github.com/twinfoundation/api/compare/api-rest-client-v0.0.2-next.10...api-rest-client-v0.0.2-next.11) (2025-09-29)
4
+
5
+
6
+ ### Features
7
+
8
+ * update IComponent signatures ([915ce37](https://github.com/twinfoundation/api/commit/915ce37712326ab4aa6869c350eabaa4622e8430))
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.10 to 0.0.2-next.11
16
+ * @twin.org/api-models bumped from 0.0.2-next.10 to 0.0.2-next.11
17
+
18
+ ## [0.0.2-next.10](https://github.com/twinfoundation/api/compare/api-rest-client-v0.0.2-next.9...api-rest-client-v0.0.2-next.10) (2025-09-23)
19
+
20
+
21
+ ### Miscellaneous Chores
22
+
23
+ * **api-rest-client:** Synchronize repo versions
24
+
25
+
26
+ ### Dependencies
27
+
28
+ * The following workspace dependencies were updated
29
+ * dependencies
30
+ * @twin.org/api-core bumped from 0.0.2-next.9 to 0.0.2-next.10
31
+ * @twin.org/api-models bumped from 0.0.2-next.9 to 0.0.2-next.10
32
+
33
+ ## [0.0.2-next.9](https://github.com/twinfoundation/api/compare/api-rest-client-v0.0.2-next.8...api-rest-client-v0.0.2-next.9) (2025-08-29)
34
+
35
+
36
+ ### Features
37
+
38
+ * eslint migration to flat config ([0dd5820](https://github.com/twinfoundation/api/commit/0dd5820e3af97350fd08b8d226f4a6c1a9246805))
39
+
40
+
41
+ ### Dependencies
42
+
43
+ * The following workspace dependencies were updated
44
+ * dependencies
45
+ * @twin.org/api-core bumped from 0.0.2-next.8 to 0.0.2-next.9
46
+ * @twin.org/api-models bumped from 0.0.2-next.8 to 0.0.2-next.9
47
+
48
+ ## [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)
49
+
50
+
51
+ ### Features
52
+
53
+ * add root, favicon routes ([71da1c3](https://github.com/twinfoundation/api/commit/71da1c3a93c349588aff7084d1d8d6a29a277da8))
54
+
55
+
56
+ ### Dependencies
57
+
58
+ * The following workspace dependencies were updated
59
+ * dependencies
60
+ * @twin.org/api-core bumped from 0.0.2-next.7 to 0.0.2-next.8
61
+ * @twin.org/api-models bumped from 0.0.2-next.7 to 0.0.2-next.8
62
+
63
+ ## [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)
64
+
65
+
66
+ ### Miscellaneous Chores
67
+
68
+ * **api-rest-client:** Synchronize repo versions
69
+
70
+
71
+ ### Dependencies
72
+
73
+ * The following workspace dependencies were updated
74
+ * dependencies
75
+ * @twin.org/api-core bumped from 0.0.2-next.6 to 0.0.2-next.7
76
+ * @twin.org/api-models bumped from 0.0.2-next.6 to 0.0.2-next.7
77
+
78
+ ## [0.0.2-next.6](https://github.com/twinfoundation/api/compare/api-rest-client-v0.0.2-next.5...api-rest-client-v0.0.2-next.6) (2025-08-19)
79
+
80
+
81
+ ### Features
82
+
83
+ * update framework core ([d8eebf2](https://github.com/twinfoundation/api/commit/d8eebf267fa2a0abaa84e58590496e9d20490cfa))
84
+
85
+
86
+ ### Dependencies
87
+
88
+ * The following workspace dependencies were updated
89
+ * dependencies
90
+ * @twin.org/api-core bumped from 0.0.2-next.5 to 0.0.2-next.6
91
+ * @twin.org/api-models bumped from 0.0.2-next.5 to 0.0.2-next.6
92
+
93
+ ## [0.0.2-next.5](https://github.com/twinfoundation/api/compare/api-rest-client-v0.0.2-next.4...api-rest-client-v0.0.2-next.5) (2025-07-25)
94
+
95
+
96
+ ### Features
97
+
98
+ * update dependencies ([1171dc4](https://github.com/twinfoundation/api/commit/1171dc416a9481737f6a640e3cf30145768f37e9))
99
+ * use shared store mechanism ([#19](https://github.com/twinfoundation/api/issues/19)) ([32116df](https://github.com/twinfoundation/api/commit/32116df3b4380a30137f5056f242a5c99afa2df9))
100
+
101
+
102
+ ### Dependencies
103
+
104
+ * The following workspace dependencies were updated
105
+ * dependencies
106
+ * @twin.org/api-core bumped from 0.0.2-next.4 to 0.0.2-next.5
107
+ * @twin.org/api-models bumped from 0.0.2-next.4 to 0.0.2-next.5
108
+
109
+ ## [0.0.2-next.4](https://github.com/twinfoundation/api/compare/api-rest-client-v0.0.2-next.3...api-rest-client-v0.0.2-next.4) (2025-07-25)
110
+
111
+
112
+ ### Miscellaneous Chores
113
+
114
+ * **api-rest-client:** Synchronize repo versions
115
+
116
+
117
+ ### Dependencies
118
+
119
+ * The following workspace dependencies were updated
120
+ * dependencies
121
+ * @twin.org/api-core bumped from 0.0.2-next.3 to 0.0.2-next.4
122
+ * @twin.org/api-models bumped from 0.0.2-next.3 to 0.0.2-next.4
123
+
124
+ ## [0.0.2-next.3](https://github.com/twinfoundation/api/compare/api-rest-client-v0.0.2-next.2...api-rest-client-v0.0.2-next.3) (2025-07-24)
125
+
126
+
127
+ ### Miscellaneous Chores
128
+
129
+ * **api-rest-client:** Synchronize repo versions
130
+
131
+
132
+ ### Dependencies
133
+
134
+ * The following workspace dependencies were updated
135
+ * dependencies
136
+ * @twin.org/api-core bumped from 0.0.2-next.2 to 0.0.2-next.3
137
+ * @twin.org/api-models bumped from 0.0.2-next.2 to 0.0.2-next.3
138
+
139
+ ## [0.0.2-next.2](https://github.com/twinfoundation/api/compare/api-rest-client-v0.0.2-next.1...api-rest-client-v0.0.2-next.2) (2025-07-17)
140
+
141
+
142
+ ### Miscellaneous Chores
143
+
144
+ * **api-rest-client:** Synchronize repo versions
145
+
146
+
147
+ ### Dependencies
148
+
149
+ * The following workspace dependencies were updated
150
+ * dependencies
151
+ * @twin.org/api-core bumped from 0.0.2-next.1 to 0.0.2-next.2
152
+ * @twin.org/api-models bumped from 0.0.2-next.1 to 0.0.2-next.2
153
+
3
154
  ## [0.0.2-next.1](https://github.com/twinfoundation/api/compare/api-rest-client-v0.0.2-next.0...api-rest-client-v0.0.2-next.1) (2025-07-08)
4
155
 
5
156
 
@@ -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.1",
3
+ "version": "0.0.2-next.11",
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.1",
18
- "@twin.org/api-models": "0.0.2-next.1",
17
+ "@twin.org/api-core": "0.0.2-next.11",
18
+ "@twin.org/api-models": "0.0.2-next.11",
19
19
  "@twin.org/core": "next",
20
20
  "@twin.org/nameof": "next",
21
21
  "@twin.org/web": "next"