@twin.org/api-rest-client 0.0.3-next.44 → 0.0.3-next.46

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.
@@ -25,7 +25,7 @@ export class InformationRestClient extends BaseRestClient {
25
25
  }
26
26
  /**
27
27
  * Get the server root.
28
- * @returns The root root.
28
+ * @returns The root text page content.
29
29
  */
30
30
  async root() {
31
31
  const response = await this.fetch("/", "GET");
@@ -57,7 +57,7 @@ export class InformationRestClient extends BaseRestClient {
57
57
  }
58
58
  /**
59
59
  * Is the server live.
60
- * @returns True if the server is live.
60
+ * @returns The liveness status of the server.
61
61
  */
62
62
  async livez() {
63
63
  const response = await this.fetch("/livez", "GET");
@@ -65,7 +65,7 @@ export class InformationRestClient extends BaseRestClient {
65
65
  }
66
66
  /**
67
67
  * Is the server ready.
68
- * @returns True if the server is ready.
68
+ * @returns The readiness status of the server.
69
69
  */
70
70
  async readyz() {
71
71
  const response = await this.fetch("/readyz", "GET");
@@ -1 +1 @@
1
- {"version":3,"file":"informationRestClient.js","sourceRoot":"","sources":["../../src/informationRestClient.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAepD;;GAEG;AACH,MAAM,OAAO,qBAAsB,SAAQ,cAAc;IACxD;;OAEG;IACI,MAAM,CAAU,UAAU,2BAA2C;IAE5E;;;OAGG;IACH,YAAY,MAA6B;QACxC,KAAK,0BAAkC,MAAM,EAAE,EAAE,CAAC,CAAC;IACpD,CAAC;IAED;;;OAGG;IACI,SAAS;QACf,OAAO,qBAAqB,CAAC,UAAU,CAAC;IACzC,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,IAAI;QAChB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,KAAK,CAAyC,GAAG,EAAE,KAAK,CAAC,CAAC;QACtF,OAAO,QAAQ,CAAC,IAAI,CAAC;IACtB,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,IAAI;QAChB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,KAAK,CAAyC,OAAO,EAAE,KAAK,CAAC,CAAC;QAC1F,OAAO,QAAQ,CAAC,IAAI,CAAC;IACtB,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,OAAO;QACnB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,KAAK,CAChC,cAAc,EACd,KAAK,CACL,CAAC;QACF,OAAO,QAAQ,CAAC,IAAI,CAAC;IACtB,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,IAAI;QAChB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,KAAK,CAAyC,OAAO,EAAE,KAAK,CAAC,CAAC;QAC1F,OAAO,QAAQ,CAAC,IAAI,CAAC;IACtB,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,KAAK;QACjB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,KAAK,CAA0C,QAAQ,EAAE,KAAK,CAAC,CAAC;QAC5F,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC;IAClC,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,MAAM;QAClB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,KAAK,CAA2C,SAAS,EAAE,KAAK,CAAC,CAAC;QAC9F,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC;IAClC,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { BaseRestClient } from \"@twin.org/api-core\";\nimport type {\n\tIBaseRestClientConfig,\n\tIInformationComponent,\n\tINoContentRequest,\n\tIServerFavIconResponse,\n\tIServerInfo,\n\tIServerInfoResponse,\n\tIServerLivezResponse,\n\tIServerReadyzResponse,\n\tIServerRootResponse,\n\tIServerSpecResponse\n} from \"@twin.org/api-models\";\nimport { nameof } from \"@twin.org/nameof\";\n\n/**\n * The client to connect to the information service.\n */\nexport class InformationRestClient extends BaseRestClient implements IInformationComponent {\n\t/**\n\t * Runtime name for the class.\n\t */\n\tpublic static readonly CLASS_NAME: string = nameof<InformationRestClient>();\n\n\t/**\n\t * Create a new instance of InformationRestClient.\n\t * @param config The configuration for the client.\n\t */\n\tconstructor(config: IBaseRestClientConfig) {\n\t\tsuper(nameof<InformationRestClient>(), config, \"\");\n\t}\n\n\t/**\n\t * Returns the class name of the component.\n\t * @returns The class name of the component.\n\t */\n\tpublic className(): string {\n\t\treturn InformationRestClient.CLASS_NAME;\n\t}\n\n\t/**\n\t * Get the server root.\n\t * @returns The root root.\n\t */\n\tpublic async root(): Promise<string> {\n\t\tconst response = await this.fetch<INoContentRequest, IServerRootResponse>(\"/\", \"GET\");\n\t\treturn response.body;\n\t}\n\n\t/**\n\t * Get the server information.\n\t * @returns The service information.\n\t */\n\tpublic async info(): Promise<IServerInfo> {\n\t\tconst response = await this.fetch<INoContentRequest, IServerInfoResponse>(\"/info\", \"GET\");\n\t\treturn response.body;\n\t}\n\n\t/**\n\t * Get the favicon.\n\t * @returns The favicon.\n\t */\n\tpublic async favicon(): Promise<Uint8Array | undefined> {\n\t\tconst response = await this.fetch<INoContentRequest, IServerFavIconResponse>(\n\t\t\t\"/favicon.ico\",\n\t\t\t\"GET\"\n\t\t);\n\t\treturn response.body;\n\t}\n\n\t/**\n\t * Get the OpenAPI spec.\n\t * @returns The OpenAPI spec.\n\t */\n\tpublic async spec(): Promise<unknown> {\n\t\tconst response = await this.fetch<INoContentRequest, IServerSpecResponse>(\"/spec\", \"GET\");\n\t\treturn response.body;\n\t}\n\n\t/**\n\t * Is the server live.\n\t * @returns True if the server is live.\n\t */\n\tpublic async livez(): Promise<{ status: \"alive\" | \"dead\" }> {\n\t\tconst response = await this.fetch<INoContentRequest, IServerLivezResponse>(\"/livez\", \"GET\");\n\t\treturn { status: response.body };\n\t}\n\n\t/**\n\t * Is the server ready.\n\t * @returns True if the server is ready.\n\t */\n\tpublic async readyz(): Promise<{ status: \"ready\" | \"not ready\" }> {\n\t\tconst response = await this.fetch<INoContentRequest, IServerReadyzResponse>(\"/readyz\", \"GET\");\n\t\treturn { status: response.body };\n\t}\n}\n"]}
1
+ {"version":3,"file":"informationRestClient.js","sourceRoot":"","sources":["../../src/informationRestClient.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAepD;;GAEG;AACH,MAAM,OAAO,qBAAsB,SAAQ,cAAc;IACxD;;OAEG;IACI,MAAM,CAAU,UAAU,2BAA2C;IAE5E;;;OAGG;IACH,YAAY,MAA6B;QACxC,KAAK,0BAAkC,MAAM,EAAE,EAAE,CAAC,CAAC;IACpD,CAAC;IAED;;;OAGG;IACI,SAAS;QACf,OAAO,qBAAqB,CAAC,UAAU,CAAC;IACzC,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,IAAI;QAChB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,KAAK,CAAyC,GAAG,EAAE,KAAK,CAAC,CAAC;QACtF,OAAO,QAAQ,CAAC,IAAI,CAAC;IACtB,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,IAAI;QAChB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,KAAK,CAAyC,OAAO,EAAE,KAAK,CAAC,CAAC;QAC1F,OAAO,QAAQ,CAAC,IAAI,CAAC;IACtB,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,OAAO;QACnB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,KAAK,CAChC,cAAc,EACd,KAAK,CACL,CAAC;QACF,OAAO,QAAQ,CAAC,IAAI,CAAC;IACtB,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,IAAI;QAChB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,KAAK,CAAyC,OAAO,EAAE,KAAK,CAAC,CAAC;QAC1F,OAAO,QAAQ,CAAC,IAAI,CAAC;IACtB,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,KAAK;QACjB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,KAAK,CAA0C,QAAQ,EAAE,KAAK,CAAC,CAAC;QAC5F,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC;IAClC,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,MAAM;QAClB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,KAAK,CAA2C,SAAS,EAAE,KAAK,CAAC,CAAC;QAC9F,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC;IAClC,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { BaseRestClient } from \"@twin.org/api-core\";\nimport type {\n\tIBaseRestClientConfig,\n\tIInformationComponent,\n\tINoContentRequest,\n\tIServerFavIconResponse,\n\tIServerInfo,\n\tIServerInfoResponse,\n\tIServerLivezResponse,\n\tIServerReadyzResponse,\n\tIServerRootResponse,\n\tIServerSpecResponse\n} from \"@twin.org/api-models\";\nimport { nameof } from \"@twin.org/nameof\";\n\n/**\n * The client to connect to the information service.\n */\nexport class InformationRestClient extends BaseRestClient implements IInformationComponent {\n\t/**\n\t * Runtime name for the class.\n\t */\n\tpublic static readonly CLASS_NAME: string = nameof<InformationRestClient>();\n\n\t/**\n\t * Create a new instance of InformationRestClient.\n\t * @param config The configuration for the client.\n\t */\n\tconstructor(config: IBaseRestClientConfig) {\n\t\tsuper(nameof<InformationRestClient>(), config, \"\");\n\t}\n\n\t/**\n\t * Returns the class name of the component.\n\t * @returns The class name of the component.\n\t */\n\tpublic className(): string {\n\t\treturn InformationRestClient.CLASS_NAME;\n\t}\n\n\t/**\n\t * Get the server root.\n\t * @returns The root text page content.\n\t */\n\tpublic async root(): Promise<string> {\n\t\tconst response = await this.fetch<INoContentRequest, IServerRootResponse>(\"/\", \"GET\");\n\t\treturn response.body;\n\t}\n\n\t/**\n\t * Get the server information.\n\t * @returns The service information.\n\t */\n\tpublic async info(): Promise<IServerInfo> {\n\t\tconst response = await this.fetch<INoContentRequest, IServerInfoResponse>(\"/info\", \"GET\");\n\t\treturn response.body;\n\t}\n\n\t/**\n\t * Get the favicon.\n\t * @returns The favicon.\n\t */\n\tpublic async favicon(): Promise<Uint8Array | undefined> {\n\t\tconst response = await this.fetch<INoContentRequest, IServerFavIconResponse>(\n\t\t\t\"/favicon.ico\",\n\t\t\t\"GET\"\n\t\t);\n\t\treturn response.body;\n\t}\n\n\t/**\n\t * Get the OpenAPI spec.\n\t * @returns The OpenAPI spec.\n\t */\n\tpublic async spec(): Promise<unknown> {\n\t\tconst response = await this.fetch<INoContentRequest, IServerSpecResponse>(\"/spec\", \"GET\");\n\t\treturn response.body;\n\t}\n\n\t/**\n\t * Is the server live.\n\t * @returns The liveness status of the server.\n\t */\n\tpublic async livez(): Promise<{ status: \"alive\" | \"dead\" }> {\n\t\tconst response = await this.fetch<INoContentRequest, IServerLivezResponse>(\"/livez\", \"GET\");\n\t\treturn { status: response.body };\n\t}\n\n\t/**\n\t * Is the server ready.\n\t * @returns The readiness status of the server.\n\t */\n\tpublic async readyz(): Promise<{ status: \"ready\" | \"not ready\" }> {\n\t\tconst response = await this.fetch<INoContentRequest, IServerReadyzResponse>(\"/readyz\", \"GET\");\n\t\treturn { status: response.body };\n\t}\n}\n"]}
@@ -20,7 +20,7 @@ export declare class InformationRestClient extends BaseRestClient implements IIn
20
20
  className(): string;
21
21
  /**
22
22
  * Get the server root.
23
- * @returns The root root.
23
+ * @returns The root text page content.
24
24
  */
25
25
  root(): Promise<string>;
26
26
  /**
@@ -40,14 +40,14 @@ export declare class InformationRestClient extends BaseRestClient implements IIn
40
40
  spec(): Promise<unknown>;
41
41
  /**
42
42
  * Is the server live.
43
- * @returns True if the server is live.
43
+ * @returns The liveness status of the server.
44
44
  */
45
45
  livez(): Promise<{
46
46
  status: "alive" | "dead";
47
47
  }>;
48
48
  /**
49
49
  * Is the server ready.
50
- * @returns True if the server is ready.
50
+ * @returns The readiness status of the server.
51
51
  */
52
52
  readyz(): Promise<{
53
53
  status: "ready" | "not ready";
package/docs/changelog.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.0.3-next.46](https://github.com/iotaledger/twin-api/compare/api-rest-client-v0.0.3-next.45...api-rest-client-v0.0.3-next.46) (2026-06-17)
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.3-next.45 to 0.0.3-next.46
16
+ * @twin.org/api-models bumped from 0.0.3-next.45 to 0.0.3-next.46
17
+
18
+ ## [0.0.3-next.45](https://github.com/iotaledger/twin-api/compare/api-rest-client-v0.0.3-next.44...api-rest-client-v0.0.3-next.45) (2026-06-15)
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.3-next.44 to 0.0.3-next.45
31
+ * @twin.org/api-models bumped from 0.0.3-next.44 to 0.0.3-next.45
32
+
3
33
  ## [0.0.3-next.44](https://github.com/iotaledger/twin-api/compare/api-rest-client-v0.0.3-next.43...api-rest-client-v0.0.3-next.44) (2026-06-11)
4
34
 
5
35
 
@@ -138,7 +138,7 @@ Get the server root.
138
138
 
139
139
  `Promise`\<`string`\>
140
140
 
141
- The root root.
141
+ The root text page content.
142
142
 
143
143
  #### Implementation of
144
144
 
@@ -210,7 +210,7 @@ Is the server live.
210
210
 
211
211
  `Promise`\<\{ `status`: `"alive"` \| `"dead"`; \}\>
212
212
 
213
- True if the server is live.
213
+ The liveness status of the server.
214
214
 
215
215
  #### Implementation of
216
216
 
@@ -228,7 +228,7 @@ Is the server ready.
228
228
 
229
229
  `Promise`\<\{ `status`: `"ready"` \| `"not ready"`; \}\>
230
230
 
231
- True if the server is ready.
231
+ The readiness status of the server.
232
232
 
233
233
  #### Implementation of
234
234
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/api-rest-client",
3
- "version": "0.0.3-next.44",
3
+ "version": "0.0.3-next.46",
4
4
  "description": "REST client implementation for consuming information and hosting 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.3-next.44",
18
- "@twin.org/api-models": "0.0.3-next.44",
17
+ "@twin.org/api-core": "0.0.3-next.46",
18
+ "@twin.org/api-models": "0.0.3-next.46",
19
19
  "@twin.org/core": "next",
20
20
  "@twin.org/nameof": "next",
21
21
  "@twin.org/web": "next"