@twin.org/api-rest-client 0.0.1-next.2 → 0.0.1-next.4

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.2
3
+ ## v0.0.1-next.4
4
4
 
5
5
  - Initial Release
@@ -46,62 +46,6 @@ Runtime name for the class.
46
46
 
47
47
  ## Methods
48
48
 
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
49
  ### info()
106
50
 
107
51
  > **info**(): `Promise`\<`IServerInfo`\>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/api-rest-client",
3
- "version": "0.0.1-next.2",
3
+ "version": "0.0.1-next.4",
4
4
  "description": "Information contract implementation which can connect to REST endpoints",
5
5
  "repository": {
6
6
  "type": "git",
@@ -13,40 +13,13 @@
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.2",
31
- "@twin.org/api-models": "0.0.1-next.2",
17
+ "@twin.org/api-core": "0.0.1-next.4",
18
+ "@twin.org/api-models": "0.0.1-next.4",
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",