@3sixty/api-rest-client 0.20.0-next.0 → 0.20.0-next.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"healthRestClient.js","sourceRoot":"","sources":["../../src/healthRestClient.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAWlD;;GAEG;AACH,MAAM,OAAO,gBAAiB,SAAQ,cAAc;IACnD;;OAEG;IACI,MAAM,CAAU,UAAU,sBAAsC;IAEvE;;;OAGG;IACH,YAAY,MAA6B;QACxC,KAAK,qBAA6B,MAAM,EAAE,EAAE,CAAC,CAAC;IAC/C,CAAC;IAED;;;OAGG;IACI,SAAS;QACf,OAAO,gBAAgB,CAAC,UAAU,CAAC;IACpC,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,YAAY;QAIxB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,KAAK,CAA2C,SAAS,EAAE,KAAK,CAAC,CAAC;QAC9F,OAAO,QAAQ,CAAC,IAAI,CAAC;IACtB,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { BaseRestClient } from \"@3sixty/api-core\";\nimport type {\n\tHealthStatus,\n\tIBaseRestClientConfig,\n\tIHealth,\n\tIHealthComponent,\n\tINoContentRequest,\n\tIServerHealthResponse\n} from \"@3sixty/api-models\";\nimport { nameof } from \"@3sixty/nameof\";\n\n/**\n * The client to connect to the health service.\n */\nexport class HealthRestClient extends BaseRestClient implements IHealthComponent {\n\t/**\n\t * Runtime name for the class.\n\t */\n\tpublic static readonly CLASS_NAME: string = nameof<HealthRestClient>();\n\n\t/**\n\t * Create a new instance of HealthRestClient.\n\t * @param config The configuration for the client.\n\t */\n\tconstructor(config: IBaseRestClientConfig) {\n\t\tsuper(nameof<HealthRestClient>(), 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 HealthRestClient.CLASS_NAME;\n\t}\n\n\t/**\n\t * Get the server health.\n\t * @returns The service health.\n\t */\n\tpublic async healthStatus(): Promise<{\n\t\tstatus: HealthStatus;\n\t\tcomponents: IHealth[];\n\t}> {\n\t\tconst response = await this.fetch<INoContentRequest, IServerHealthResponse>(\"/health\", \"GET\");\n\t\treturn response.body;\n\t}\n}\n"]}
1
+ {"version":3,"file":"healthRestClient.js","sources":["../../src/healthRestClient.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAWlD;;GAEG;AACH,MAAM,OAAO,gBAAiB,SAAQ,cAAc;IACnD;;OAEG;IACI,MAAM,CAAU,UAAU,GAAW,kBAAkB,CAAC;IAE/D;;;OAGG;IACH,YAAY,MAA6B;QACxC,KAAK,CAAC,kBAAkB,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;IACvC,CAAC;IAED;;;OAGG;IACI,SAAS;QACf,OAAO,gBAAgB,CAAC,UAAU,CAAC;IACpC,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,YAAY;QAIxB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,KAAK,CAA2C,SAAS,EAAE,KAAK,CAAC,CAAC;QAC9F,OAAO,QAAQ,CAAC,IAAI,CAAC;IACtB,CAAC;CACD","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { BaseRestClient } from \"@3sixty/api-core\";\nimport type {\n\tHealthStatus,\n\tIBaseRestClientConfig,\n\tIHealth,\n\tIHealthComponent,\n\tINoContentRequest,\n\tIServerHealthResponse\n} from \"@3sixty/api-models\";\n\n\n/**\n * The client to connect to the health service.\n */\nexport class HealthRestClient extends BaseRestClient implements IHealthComponent {\n\t/**\n\t * Runtime name for the class.\n\t */\n\tpublic static readonly CLASS_NAME: string = \"HealthRestClient\";\n\n\t/**\n\t * Create a new instance of HealthRestClient.\n\t * @param config The configuration for the client.\n\t */\n\tconstructor(config: IBaseRestClientConfig) {\n\t\tsuper(\"HealthRestClient\", 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 HealthRestClient.CLASS_NAME;\n\t}\n\n\t/**\n\t * Get the server health.\n\t * @returns The service health.\n\t */\n\tpublic async healthStatus(): Promise<{\n\t\tstatus: HealthStatus;\n\t\tcomponents: IHealth[];\n\t}> {\n\t\tconst response = await this.fetch<INoContentRequest, IServerHealthResponse>(\"/health\", \"GET\");\n\t\treturn response.body;\n\t}\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./healthRestClient.js\";\nexport * from \"./informationRestClient.js\";\n"]}
1
+ {"version":3,"file":"index.js","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./healthRestClient.js\";\nexport * from \"./informationRestClient.js\";\n"]}
@@ -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,kBAAkB,CAAC;AAelD;;GAEG;AACH,MAAM,OAAO,qBAAsB,SAAQ,cAAc;IACxD;;OAEG;IACI,MAAM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AQ,CAAC,IAAI,EAAE,CAAC;IAClC,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { BaseRestClient } from \"@3sixty/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 \"@3sixty/api-models\";\nimport { nameof } from \"@3sixty/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"]}
1
+ {"version":3,"file":"informationRestClient.js","sources":["../../src/informationRestClient.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAelD;;GAEG;AACH,MAAM,OAAO,qBAAsB,SAAQ,cAAc;IACxD;;OAEG;IACI,MAAM,CAAU,UAAU,GAAW,uBAAuB,CAAC;IAEpE;;;OAGG;IACH,YAAY,MAA6B;QACxC,KAAK,CAAC,uBAAuB,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;IAC5C,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;CACD","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { BaseRestClient } from \"@3sixty/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 \"@3sixty/api-models\";\n\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 = \"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(\"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"]}
package/docs/changelog.md CHANGED
@@ -0,0 +1,17 @@
1
+ # Changelog
2
+
3
+ ## [0.20.0-next.1](https://github.com/3sixtyglobal/api/compare/api-rest-client-v0.20.0-next.0...api-rest-client-v0.20.0-next.1) (2026-10-23)
4
+
5
+
6
+ ### Features
7
+
8
+ * publish packages under the [@3sixty](https://github.com/3sixty) namespace ([91b1822](https://github.com/3sixtyglobal/api/commit/91b1822dba38f70692087ad4643572531d6634dc))
9
+ * updated ts compile ([d9a5c86](https://github.com/3sixtyglobal/api/commit/d9a5c86ec7dd1faf3045b5cd1e0d38a4b331313d))
10
+
11
+
12
+ ### Dependencies
13
+
14
+ * The following workspace dependencies were updated
15
+ * dependencies
16
+ * @3sixty/api-core bumped from 0.20.0-next.0 to 0.20.0-next.1
17
+ * @3sixty/api-models bumped from 0.20.0-next.0 to 0.20.0-next.1
@@ -88,11 +88,11 @@ Perform a request in json format.
88
88
 
89
89
  #### Type Parameters
90
90
 
91
- ##### T
91
+ ##### T {#t}
92
92
 
93
93
  `T` *extends* `IHttpRequest`\<`any`\>
94
94
 
95
- ##### U
95
+ ##### U {#u}
96
96
 
97
97
  `U` *extends* `IHttpResponse`\<`any`\>
98
98
 
@@ -88,11 +88,11 @@ Perform a request in json format.
88
88
 
89
89
  #### Type Parameters
90
90
 
91
- ##### T
91
+ ##### T {#t}
92
92
 
93
93
  `T` *extends* `IHttpRequest`\<`any`\>
94
94
 
95
- ##### U
95
+ ##### U {#u}
96
96
 
97
97
  `U` *extends* `IHttpResponse`\<`any`\>
98
98
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@3sixty/api-rest-client",
3
- "version": "0.20.0-next.0",
3
+ "version": "0.20.0-next.1",
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": ">=24.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@3sixty/api-core": "0.20.0-next.0",
18
- "@3sixty/api-models": "0.20.0-next.0",
17
+ "@3sixty/api-core": "0.20.0-next.1",
18
+ "@3sixty/api-models": "0.20.0-next.1",
19
19
  "@3sixty/core": "next",
20
20
  "@3sixty/nameof": "next"
21
21
  },