@twin.org/api-auth-entity-storage-models 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-models - Changelog
2
2
 
3
- ## v0.0.1-next.3
3
+ ## v0.0.1-next.31
4
4
 
5
5
  - Initial Release
@@ -10,34 +10,30 @@ Contract definition for authentication component.
10
10
 
11
11
  ### login()
12
12
 
13
- > **login**(`email`, `password`): `Promise`\<`object`\>
13
+ > **login**(`email`, `password`): `Promise`\<\{ `token`: `string`; `expiry`: `number`; \}\>
14
14
 
15
15
  Perform a login for the user.
16
16
 
17
17
  #### Parameters
18
18
 
19
- **email**: `string`
19
+ ##### email
20
+
21
+ `string`
20
22
 
21
23
  The email address for the user.
22
24
 
23
- **password**: `string`
25
+ ##### password
26
+
27
+ `string`
24
28
 
25
29
  The password for the user.
26
30
 
27
31
  #### Returns
28
32
 
29
- `Promise`\<`object`\>
33
+ `Promise`\<\{ `token`: `string`; `expiry`: `number`; \}\>
30
34
 
31
35
  The authentication token for the user, if it uses a mechanism with public access.
32
36
 
33
- ##### token?
34
-
35
- > `optional` **token**: `string`
36
-
37
- ##### expiry
38
-
39
- > **expiry**: `number`
40
-
41
37
  ***
42
38
 
43
39
  ### logout()
@@ -48,7 +44,9 @@ Logout the current user.
48
44
 
49
45
  #### Parameters
50
46
 
51
- **token?**: `string`
47
+ ##### token?
48
+
49
+ `string`
52
50
 
53
51
  The token to logout, if it uses a mechanism with public access.
54
52
 
@@ -62,26 +60,20 @@ Nothing.
62
60
 
63
61
  ### refresh()
64
62
 
65
- > **refresh**(`token`?): `Promise`\<`object`\>
63
+ > **refresh**(`token`?): `Promise`\<\{ `token`: `string`; `expiry`: `number`; \}\>
66
64
 
67
65
  Refresh the token.
68
66
 
69
67
  #### Parameters
70
68
 
71
- **token?**: `string`
69
+ ##### token?
70
+
71
+ `string`
72
72
 
73
73
  The token to refresh, if it uses a mechanism with public access.
74
74
 
75
75
  #### Returns
76
76
 
77
- `Promise`\<`object`\>
77
+ `Promise`\<\{ `token`: `string`; `expiry`: `number`; \}\>
78
78
 
79
79
  The refreshed token, if it uses a mechanism with public access.
80
-
81
- ##### token?
82
-
83
- > `optional` **token**: `string`
84
-
85
- ##### expiry
86
-
87
- > **expiry**: `number`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/api-auth-entity-storage-models",
3
- "version": "0.0.1-next.3",
3
+ "version": "0.0.1-next.31",
4
4
  "description": "Models which define the structure of the Auth Entity Storage contracts.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -13,46 +13,19 @@
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
17
  "@twin.org/core": "next",
31
18
  "@twin.org/nameof": "next",
32
19
  "@twin.org/web": "next"
33
20
  },
34
- "devDependencies": {
35
- "@twin.org/nameof-transformer": "next",
36
- "@vitest/coverage-v8": "2.1.1",
37
- "@types/node": "22.5.5",
38
- "copyfiles": "2.4.1",
39
- "rimraf": "6.0.1",
40
- "rollup": "4.21.3",
41
- "rollup-plugin-typescript2": "0.36.0",
42
- "ts-patch": "3.2.1",
43
- "typedoc": "0.26.7",
44
- "typedoc-plugin-markdown": "4.2.7",
45
- "typescript": "5.6.2",
46
- "vitest": "2.1.1"
47
- },
48
21
  "main": "./dist/cjs/index.cjs",
49
22
  "module": "./dist/esm/index.mjs",
50
23
  "types": "./dist/types/index.d.ts",
51
24
  "exports": {
52
25
  ".": {
26
+ "types": "./dist/types/index.d.ts",
53
27
  "require": "./dist/cjs/index.cjs",
54
- "import": "./dist/esm/index.mjs",
55
- "types": "./dist/types/index.d.ts"
28
+ "import": "./dist/esm/index.mjs"
56
29
  }
57
30
  },
58
31
  "files": [