@twin.org/api-auth-entity-storage-rest-client 0.0.1-next.3 → 0.0.1-next.31

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-auth-entity-storage-rest-client - Changelog
2
2
 
3
- ## v0.0.1-next.3
3
+ ## v0.0.1-next.31
4
4
 
5
5
  - Initial Release
@@ -20,7 +20,9 @@ Create a new instance of EntityStorageAuthenticationClient.
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
 
@@ -48,34 +50,30 @@ Runtime name for the class.
48
50
 
49
51
  ### login()
50
52
 
51
- > **login**(`email`, `password`): `Promise`\<`object`\>
53
+ > **login**(`email`, `password`): `Promise`\<\{ `token`: `string`; `expiry`: `number`; \}\>
52
54
 
53
55
  Perform a login for the user.
54
56
 
55
57
  #### Parameters
56
58
 
57
- **email**: `string`
59
+ ##### email
60
+
61
+ `string`
58
62
 
59
63
  The email address for the user.
60
64
 
61
- **password**: `string`
65
+ ##### password
66
+
67
+ `string`
62
68
 
63
69
  The password for the user.
64
70
 
65
71
  #### Returns
66
72
 
67
- `Promise`\<`object`\>
73
+ `Promise`\<\{ `token`: `string`; `expiry`: `number`; \}\>
68
74
 
69
75
  The authentication token for the user, if it uses a mechanism with public access.
70
76
 
71
- ##### token?
72
-
73
- > `optional` **token**: `string`
74
-
75
- ##### expiry
76
-
77
- > **expiry**: `number`
78
-
79
77
  #### Implementation of
80
78
 
81
79
  `IAuthenticationComponent.login`
@@ -90,7 +88,9 @@ Logout the current user.
90
88
 
91
89
  #### Parameters
92
90
 
93
- **token?**: `string`
91
+ ##### token?
92
+
93
+ `string`
94
94
 
95
95
  The token to logout, if it uses a mechanism with public access.
96
96
 
@@ -108,86 +108,24 @@ Nothing.
108
108
 
109
109
  ### refresh()
110
110
 
111
- > **refresh**(`token`?): `Promise`\<`object`\>
111
+ > **refresh**(`token`?): `Promise`\<\{ `token`: `string`; `expiry`: `number`; \}\>
112
112
 
113
113
  Refresh the token.
114
114
 
115
115
  #### Parameters
116
116
 
117
- **token?**: `string`
117
+ ##### token?
118
+
119
+ `string`
118
120
 
119
121
  The token to refresh, if it uses a mechanism with public access.
120
122
 
121
123
  #### Returns
122
124
 
123
- `Promise`\<`object`\>
125
+ `Promise`\<\{ `token`: `string`; `expiry`: `number`; \}\>
124
126
 
125
127
  The refreshed token, if it uses a mechanism with public access.
126
128
 
127
- ##### token?
128
-
129
- > `optional` **token**: `string`
130
-
131
- ##### expiry
132
-
133
- > **expiry**: `number`
134
-
135
129
  #### Implementation of
136
130
 
137
131
  `IAuthenticationComponent.refresh`
138
-
139
- ***
140
-
141
- ### getEndpointWithPrefix()
142
-
143
- > **getEndpointWithPrefix**(): `string`
144
-
145
- Get the endpoint with the prefix for the namespace.
146
-
147
- #### Returns
148
-
149
- `string`
150
-
151
- The endpoint with namespace prefix attached.
152
-
153
- #### Inherited from
154
-
155
- `BaseRestClient.getEndpointWithPrefix`
156
-
157
- ***
158
-
159
- ### fetch()
160
-
161
- > **fetch**\<`T`, `U`\>(`route`, `method`, `request`?): `Promise`\<`U`\>
162
-
163
- Perform a request in json format.
164
-
165
- #### Type Parameters
166
-
167
- • **T** *extends* `IHttpRequest`\<`any`\>
168
-
169
- • **U** *extends* `IHttpResponse`\<`any`\>
170
-
171
- #### Parameters
172
-
173
- • **route**: `string`
174
-
175
- The route of the request.
176
-
177
- • **method**: `HttpMethod`
178
-
179
- The http method.
180
-
181
- • **request?**: `T`
182
-
183
- Request to send to the endpoint.
184
-
185
- #### Returns
186
-
187
- `Promise`\<`U`\>
188
-
189
- The response.
190
-
191
- #### Inherited from
192
-
193
- `BaseRestClient.fetch`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/api-auth-entity-storage-rest-client",
3
- "version": "0.0.1-next.3",
3
+ "version": "0.0.1-next.31",
4
4
  "description": "Perform REST authentication using entity storage.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -13,49 +13,22 @@
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-auth-entity-storage-models": "0.0.1-next.3",
31
- "@twin.org/api-core": "0.0.1-next.3",
32
- "@twin.org/api-models": "0.0.1-next.3",
17
+ "@twin.org/api-auth-entity-storage-models": "0.0.1-next.31",
18
+ "@twin.org/api-core": "0.0.1-next.31",
19
+ "@twin.org/api-models": "0.0.1-next.31",
33
20
  "@twin.org/core": "next",
34
21
  "@twin.org/nameof": "next",
35
22
  "@twin.org/web": "next"
36
23
  },
37
- "devDependencies": {
38
- "@twin.org/nameof-transformer": "next",
39
- "@vitest/coverage-v8": "2.1.1",
40
- "@types/node": "22.5.5",
41
- "copyfiles": "2.4.1",
42
- "rimraf": "6.0.1",
43
- "rollup": "4.21.3",
44
- "rollup-plugin-typescript2": "0.36.0",
45
- "ts-patch": "3.2.1",
46
- "typedoc": "0.26.7",
47
- "typedoc-plugin-markdown": "4.2.7",
48
- "typescript": "5.6.2",
49
- "vitest": "2.1.1"
50
- },
51
24
  "main": "./dist/cjs/index.cjs",
52
25
  "module": "./dist/esm/index.mjs",
53
26
  "types": "./dist/types/index.d.ts",
54
27
  "exports": {
55
28
  ".": {
29
+ "types": "./dist/types/index.d.ts",
56
30
  "require": "./dist/cjs/index.cjs",
57
- "import": "./dist/esm/index.mjs",
58
- "types": "./dist/types/index.d.ts"
31
+ "import": "./dist/esm/index.mjs"
59
32
  }
60
33
  },
61
34
  "files": [