@twin.org/api-rest-client 0.0.1 → 0.0.2-next.10

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,157 @@
1
1
  # @twin.org/api-rest-client - Changelog
2
2
 
3
+ ## [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)
4
+
5
+
6
+ ### Miscellaneous Chores
7
+
8
+ * **api-rest-client:** Synchronize repo versions
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.9 to 0.0.2-next.10
16
+ * @twin.org/api-models bumped from 0.0.2-next.9 to 0.0.2-next.10
17
+
18
+ ## [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)
19
+
20
+
21
+ ### Features
22
+
23
+ * eslint migration to flat config ([0dd5820](https://github.com/twinfoundation/api/commit/0dd5820e3af97350fd08b8d226f4a6c1a9246805))
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.8 to 0.0.2-next.9
31
+ * @twin.org/api-models bumped from 0.0.2-next.8 to 0.0.2-next.9
32
+
33
+ ## [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)
34
+
35
+
36
+ ### Features
37
+
38
+ * add root, favicon routes ([71da1c3](https://github.com/twinfoundation/api/commit/71da1c3a93c349588aff7084d1d8d6a29a277da8))
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.7 to 0.0.2-next.8
46
+ * @twin.org/api-models bumped from 0.0.2-next.7 to 0.0.2-next.8
47
+
48
+ ## [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)
49
+
50
+
51
+ ### Miscellaneous Chores
52
+
53
+ * **api-rest-client:** Synchronize repo versions
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.6 to 0.0.2-next.7
61
+ * @twin.org/api-models bumped from 0.0.2-next.6 to 0.0.2-next.7
62
+
63
+ ## [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)
64
+
65
+
66
+ ### Features
67
+
68
+ * update framework core ([d8eebf2](https://github.com/twinfoundation/api/commit/d8eebf267fa2a0abaa84e58590496e9d20490cfa))
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.5 to 0.0.2-next.6
76
+ * @twin.org/api-models bumped from 0.0.2-next.5 to 0.0.2-next.6
77
+
78
+ ## [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)
79
+
80
+
81
+ ### Features
82
+
83
+ * update dependencies ([1171dc4](https://github.com/twinfoundation/api/commit/1171dc416a9481737f6a640e3cf30145768f37e9))
84
+ * use shared store mechanism ([#19](https://github.com/twinfoundation/api/issues/19)) ([32116df](https://github.com/twinfoundation/api/commit/32116df3b4380a30137f5056f242a5c99afa2df9))
85
+
86
+
87
+ ### Dependencies
88
+
89
+ * The following workspace dependencies were updated
90
+ * dependencies
91
+ * @twin.org/api-core bumped from 0.0.2-next.4 to 0.0.2-next.5
92
+ * @twin.org/api-models bumped from 0.0.2-next.4 to 0.0.2-next.5
93
+
94
+ ## [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)
95
+
96
+
97
+ ### Miscellaneous Chores
98
+
99
+ * **api-rest-client:** Synchronize repo versions
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.3 to 0.0.2-next.4
107
+ * @twin.org/api-models bumped from 0.0.2-next.3 to 0.0.2-next.4
108
+
109
+ ## [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)
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.2 to 0.0.2-next.3
122
+ * @twin.org/api-models bumped from 0.0.2-next.2 to 0.0.2-next.3
123
+
124
+ ## [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)
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.1 to 0.0.2-next.2
137
+ * @twin.org/api-models bumped from 0.0.2-next.1 to 0.0.2-next.2
138
+
139
+ ## [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)
140
+
141
+
142
+ ### Features
143
+
144
+ * update dependencies ([1171dc4](https://github.com/twinfoundation/api/commit/1171dc416a9481737f6a640e3cf30145768f37e9))
145
+ * use shared store mechanism ([#19](https://github.com/twinfoundation/api/issues/19)) ([32116df](https://github.com/twinfoundation/api/commit/32116df3b4380a30137f5056f242a5c99afa2df9))
146
+
147
+
148
+ ### Dependencies
149
+
150
+ * The following workspace dependencies were updated
151
+ * dependencies
152
+ * @twin.org/api-core bumped from 0.0.2-next.0 to 0.0.2-next.1
153
+ * @twin.org/api-models bumped from 0.0.2-next.0 to 0.0.2-next.1
154
+
3
155
  ## 0.0.1 (2025-07-03)
4
156
 
5
157
 
@@ -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.1",
3
+ "version": "0.0.2-next.10",
4
4
  "description": "Information contract implementation which can connect to REST endpoints",
5
5
  "repository": {
6
6
  "type": "git",
@@ -14,11 +14,11 @@
14
14
  "node": ">=20.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@twin.org/api-core": "^0.0.1",
18
- "@twin.org/api-models": "^0.0.1",
19
- "@twin.org/core": "^0.0.1",
20
- "@twin.org/nameof": "^0.0.1",
21
- "@twin.org/web": "^0.0.1"
17
+ "@twin.org/api-core": "0.0.2-next.10",
18
+ "@twin.org/api-models": "0.0.2-next.10",
19
+ "@twin.org/core": "next",
20
+ "@twin.org/nameof": "next",
21
+ "@twin.org/web": "next"
22
22
  },
23
23
  "main": "./dist/cjs/index.cjs",
24
24
  "module": "./dist/esm/index.mjs",