@twin.org/api-rest-client 0.0.1-next.3 → 0.0.1-next.30

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.
package/docs/changelog.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # @twin.org/api-rest-client - Changelog
2
2
 
3
- ## v0.0.1-next.3
3
+ ## v0.0.1-next.30
4
4
 
5
5
  - Initial Release
@@ -20,7 +20,9 @@ Create a new instance of InformationClient.
20
20
 
21
21
  #### Parameters
22
22
 
23
- **config**: `IBaseRestClientConfig`
23
+ ##### config
24
+
25
+ `IBaseRestClientConfig`
24
26
 
25
27
  The configuration for the client.
26
28
 
@@ -46,62 +48,6 @@ Runtime name for the class.
46
48
 
47
49
  ## Methods
48
50
 
49
- ### getEndpointWithPrefix()
50
-
51
- > **getEndpointWithPrefix**(): `string`
52
-
53
- Get the endpoint with the prefix for the namespace.
54
-
55
- #### Returns
56
-
57
- `string`
58
-
59
- The endpoint with namespace prefix attached.
60
-
61
- #### Inherited from
62
-
63
- `BaseRestClient.getEndpointWithPrefix`
64
-
65
- ***
66
-
67
- ### fetch()
68
-
69
- > **fetch**\<`T`, `U`\>(`route`, `method`, `request`?): `Promise`\<`U`\>
70
-
71
- Perform a request in json format.
72
-
73
- #### Type Parameters
74
-
75
- • **T** *extends* `IHttpRequest`\<`any`\>
76
-
77
- • **U** *extends* `IHttpResponse`\<`any`\>
78
-
79
- #### Parameters
80
-
81
- • **route**: `string`
82
-
83
- The route of the request.
84
-
85
- • **method**: `HttpMethod`
86
-
87
- The http method.
88
-
89
- • **request?**: `T`
90
-
91
- Request to send to the endpoint.
92
-
93
- #### Returns
94
-
95
- `Promise`\<`U`\>
96
-
97
- The response.
98
-
99
- #### Inherited from
100
-
101
- `BaseRestClient.fetch`
102
-
103
- ***
104
-
105
51
  ### info()
106
52
 
107
53
  > **info**(): `Promise`\<`IServerInfo`\>
@@ -164,15 +110,21 @@ Set the status of a component.
164
110
 
165
111
  #### Parameters
166
112
 
167
- **name**: `string`
113
+ ##### name
114
+
115
+ `string`
168
116
 
169
117
  The component name.
170
118
 
171
- **status**: `HealthStatus`
119
+ ##### status
120
+
121
+ `HealthStatus`
172
122
 
173
123
  The status of the component.
174
124
 
175
- **details?**: `string`
125
+ ##### details?
126
+
127
+ `string`
176
128
 
177
129
  The details for the status.
178
130
 
@@ -196,7 +148,9 @@ Remove the status of a component.
196
148
 
197
149
  #### Parameters
198
150
 
199
- **name**: `string`
151
+ ##### name
152
+
153
+ `string`
200
154
 
201
155
  The component name.
202
156
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/api-rest-client",
3
- "version": "0.0.1-next.3",
3
+ "version": "0.0.1-next.30",
4
4
  "description": "Information contract implementation which can connect to REST endpoints",
5
5
  "repository": {
6
6
  "type": "git",
@@ -13,48 +13,21 @@
13
13
  "engines": {
14
14
  "node": ">=20.0.0"
15
15
  },
16
- "scripts": {
17
- "clean": "rimraf dist coverage",
18
- "build": "tspc",
19
- "test": "vitest --run --config ./vitest.config.ts --no-cache",
20
- "coverage": "vitest --run --coverage --config ./vitest.config.ts --no-cache",
21
- "bundle:esm": "rollup --config rollup.config.mjs --environment MODULE:esm",
22
- "bundle:cjs": "rollup --config rollup.config.mjs --environment MODULE:cjs",
23
- "bundle": "npm run bundle:esm && npm run bundle:cjs",
24
- "docs:clean": "rimraf docs/reference",
25
- "docs:generate": "typedoc",
26
- "docs": "npm run docs:clean && npm run docs:generate",
27
- "dist": "npm run clean && npm run build && npm run test && npm run bundle && npm run docs"
28
- },
29
16
  "dependencies": {
30
- "@twin.org/api-core": "0.0.1-next.3",
31
- "@twin.org/api-models": "0.0.1-next.3",
17
+ "@twin.org/api-core": "0.0.1-next.30",
18
+ "@twin.org/api-models": "0.0.1-next.30",
32
19
  "@twin.org/core": "next",
33
20
  "@twin.org/nameof": "next",
34
21
  "@twin.org/web": "next"
35
22
  },
36
- "devDependencies": {
37
- "@twin.org/nameof-transformer": "next",
38
- "@vitest/coverage-v8": "2.1.1",
39
- "@types/node": "22.5.5",
40
- "copyfiles": "2.4.1",
41
- "rimraf": "6.0.1",
42
- "rollup": "4.21.3",
43
- "rollup-plugin-typescript2": "0.36.0",
44
- "ts-patch": "3.2.1",
45
- "typedoc": "0.26.7",
46
- "typedoc-plugin-markdown": "4.2.7",
47
- "typescript": "5.6.2",
48
- "vitest": "2.1.1"
49
- },
50
23
  "main": "./dist/cjs/index.cjs",
51
24
  "module": "./dist/esm/index.mjs",
52
25
  "types": "./dist/types/index.d.ts",
53
26
  "exports": {
54
27
  ".": {
28
+ "types": "./dist/types/index.d.ts",
55
29
  "require": "./dist/cjs/index.cjs",
56
- "import": "./dist/esm/index.mjs",
57
- "types": "./dist/types/index.d.ts"
30
+ "import": "./dist/esm/index.mjs"
58
31
  }
59
32
  },
60
33
  "files": [