@twin.org/api-auth-entity-storage-models 0.0.2-next.9 → 0.0.3-next.2

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.
@@ -0,0 +1,11 @@
1
+ // Copyright 2024 IOTA Stiftung.
2
+ // SPDX-License-Identifier: Apache-2.0.
3
+ export * from "./models/api/ILoginRequest.js";
4
+ export * from "./models/api/ILoginResponse.js";
5
+ export * from "./models/api/ILogoutRequest.js";
6
+ export * from "./models/api/IRefreshTokenRequest.js";
7
+ export * from "./models/api/IRefreshTokenResponse.js";
8
+ export * from "./models/api/IUpdatePasswordRequest.js";
9
+ export * from "./models/IAuthenticationAdminComponent.js";
10
+ export * from "./models/IAuthenticationComponent.js";
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sCAAsC,CAAC;AACrD,cAAc,uCAAuC,CAAC;AACtD,cAAc,wCAAwC,CAAC;AACvD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,sCAAsC,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./models/api/ILoginRequest.js\";\nexport * from \"./models/api/ILoginResponse.js\";\nexport * from \"./models/api/ILogoutRequest.js\";\nexport * from \"./models/api/IRefreshTokenRequest.js\";\nexport * from \"./models/api/IRefreshTokenResponse.js\";\nexport * from \"./models/api/IUpdatePasswordRequest.js\";\nexport * from \"./models/IAuthenticationAdminComponent.js\";\nexport * from \"./models/IAuthenticationComponent.js\";\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=IAuthenticationAdminComponent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IAuthenticationAdminComponent.js","sourceRoot":"","sources":["../../../src/models/IAuthenticationAdminComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\n\n/**\n * Contract definition for authentication admin component.\n */\nexport interface IAuthenticationAdminComponent extends IComponent {\n\t/**\n\t * Create a login for the user.\n\t * @param email The email address for the user.\n\t * @param password The password for the user.\n\t * @param userIdentity The DID to associate with the account.\n\t * @param organizationIdentity The organization of the user.\n\t * @returns Nothing.\n\t */\n\tcreate(\n\t\temail: string,\n\t\tpassword: string,\n\t\tuserIdentity: string,\n\t\torganizationIdentity: string\n\t): Promise<void>;\n\n\t/**\n\t * Remove the current user.\n\t * @param email The email address of the user to remove.\n\t * @returns Nothing.\n\t */\n\tremove(email: string): Promise<void>;\n\n\t/**\n\t * Update the user's password.\n\t * @param email The email address of the user to update.\n\t * @param newPassword The new password for the user.\n\t * @param currentPassword The current password, optional, if supplied will check against existing.\n\t * @returns Nothing.\n\t */\n\tupdatePassword(email: string, newPassword: string, currentPassword?: string): Promise<void>;\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=IAuthenticationComponent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IAuthenticationComponent.js","sourceRoot":"","sources":["../../../src/models/IAuthenticationComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\n\n/**\n * Contract definition for authentication component.\n */\nexport interface IAuthenticationComponent extends IComponent {\n\t/**\n\t * Perform a login for the user.\n\t * @param email The email address for the user.\n\t * @param password The password for the user.\n\t * @returns The authentication token for the user, if it uses a mechanism with public access.\n\t */\n\tlogin(\n\t\temail: string,\n\t\tpassword: string\n\t): Promise<{\n\t\ttoken?: string;\n\t\texpiry: number;\n\t}>;\n\n\t/**\n\t * Logout the current user.\n\t * @param token The token to logout, if it uses a mechanism with public access.\n\t * @returns Nothing.\n\t */\n\tlogout(token?: string): Promise<void>;\n\n\t/**\n\t * Refresh the token.\n\t * @param token The token to refresh, if it uses a mechanism with public access.\n\t * @returns The refreshed token, if it uses a mechanism with public access.\n\t */\n\trefresh(token?: string): Promise<{\n\t\ttoken?: string;\n\t\texpiry: number;\n\t}>;\n\n\t/**\n\t * Update the user's password.\n\t * @param email The email address of the user to update.\n\t * @param currentPassword The current password for the user.\n\t * @param newPassword The new password for the user.\n\t * @returns Nothing.\n\t */\n\tupdatePassword(email: string, currentPassword: string, newPassword: string): Promise<void>;\n}\n"]}
@@ -0,0 +1,4 @@
1
+ // Copyright 2024 IOTA Stiftung.
2
+ // SPDX-License-Identifier: Apache-2.0.
3
+ export {};
4
+ //# sourceMappingURL=ILoginRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ILoginRequest.js","sourceRoot":"","sources":["../../../../src/models/api/ILoginRequest.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Perform a login on the server.\n */\nexport interface ILoginRequest {\n\t/**\n\t * The login details.\n\t */\n\tbody: {\n\t\t/**\n\t\t * The email address for the user.\n\t\t */\n\t\temail: string;\n\n\t\t/**\n\t\t * The password for the user.\n\t\t */\n\t\tpassword: string;\n\t};\n}\n"]}
@@ -0,0 +1,4 @@
1
+ // Copyright 2024 IOTA Stiftung.
2
+ // SPDX-License-Identifier: Apache-2.0.
3
+ export {};
4
+ //# sourceMappingURL=ILoginResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ILoginResponse.js","sourceRoot":"","sources":["../../../../src/models/api/ILoginResponse.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Response from a login on the server.\n */\nexport interface ILoginResponse {\n\t/**\n\t * The login response details.\n\t */\n\tbody: {\n\t\t/**\n\t\t * The access token, if it uses a mechanism with public access.\n\t\t */\n\t\ttoken?: string;\n\n\t\t/**\n\t\t * The expiry time of the token.\n\t\t */\n\t\texpiry: number;\n\t};\n}\n"]}
@@ -0,0 +1,4 @@
1
+ // Copyright 2024 IOTA Stiftung.
2
+ // SPDX-License-Identifier: Apache-2.0.
3
+ export {};
4
+ //# sourceMappingURL=ILogoutRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ILogoutRequest.js","sourceRoot":"","sources":["../../../../src/models/api/ILogoutRequest.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Perform a logout on the auth token.\n */\nexport interface ILogoutRequest {\n\t/**\n\t * The logout token details.\n\t */\n\tquery?: {\n\t\t/**\n\t\t * The token to logout, if it uses a mechanism with public access.\n\t\t */\n\t\ttoken?: string;\n\t};\n}\n"]}
@@ -0,0 +1,4 @@
1
+ // Copyright 2024 IOTA Stiftung.
2
+ // SPDX-License-Identifier: Apache-2.0.
3
+ export {};
4
+ //# sourceMappingURL=IRefreshTokenRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IRefreshTokenRequest.js","sourceRoot":"","sources":["../../../../src/models/api/IRefreshTokenRequest.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Perform a refresh of the auth token.\n */\nexport interface IRefreshTokenRequest {\n\t/**\n\t * The refresh token details.\n\t */\n\tquery?: {\n\t\t/**\n\t\t * The token to refresh, if it uses a mechanism with public access.\n\t\t */\n\t\ttoken?: string;\n\t};\n}\n"]}
@@ -0,0 +1,4 @@
1
+ // Copyright 2024 IOTA Stiftung.
2
+ // SPDX-License-Identifier: Apache-2.0.
3
+ export {};
4
+ //# sourceMappingURL=IRefreshTokenResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IRefreshTokenResponse.js","sourceRoot":"","sources":["../../../../src/models/api/IRefreshTokenResponse.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Response from a refresh on the auth token.\n */\nexport interface IRefreshTokenResponse {\n\t/**\n\t * The refresh token details.\n\t */\n\tbody: {\n\t\t/**\n\t\t * The refreshed token, if it uses a mechanism with public access.\n\t\t */\n\t\ttoken?: string;\n\n\t\t/**\n\t\t * The expiry time of the token.\n\t\t */\n\t\texpiry: number;\n\t};\n}\n"]}
@@ -0,0 +1,4 @@
1
+ // Copyright 2024 IOTA Stiftung.
2
+ // SPDX-License-Identifier: Apache-2.0.
3
+ export {};
4
+ //# sourceMappingURL=IUpdatePasswordRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IUpdatePasswordRequest.js","sourceRoot":"","sources":["../../../../src/models/api/IUpdatePasswordRequest.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Update a users password.\n */\nexport interface IUpdatePasswordRequest {\n\t/**\n\t * The path parameters for the request.\n\t */\n\tpathParams: {\n\t\t/**\n\t\t * The user email.\n\t\t */\n\t\temail: string;\n\t};\n\n\t/**\n\t * The body of the request.\n\t */\n\tbody: {\n\t\t/**\n\t\t * The current password for the user.\n\t\t */\n\t\tcurrentPassword: string;\n\n\t\t/**\n\t\t * The new password for the user.\n\t\t */\n\t\tnewPassword: string;\n\t};\n}\n"]}
@@ -1,8 +1,8 @@
1
- export * from "./models/api/ILoginRequest";
2
- export * from "./models/api/ILoginResponse";
3
- export * from "./models/api/ILogoutRequest";
4
- export * from "./models/api/IRefreshTokenRequest";
5
- export * from "./models/api/IRefreshTokenResponse";
6
- export * from "./models/api/IUpdatePasswordRequest";
7
- export * from "./models/IAuthenticationAdminComponent";
8
- export * from "./models/IAuthenticationComponent";
1
+ export * from "./models/api/ILoginRequest.js";
2
+ export * from "./models/api/ILoginResponse.js";
3
+ export * from "./models/api/ILogoutRequest.js";
4
+ export * from "./models/api/IRefreshTokenRequest.js";
5
+ export * from "./models/api/IRefreshTokenResponse.js";
6
+ export * from "./models/api/IUpdatePasswordRequest.js";
7
+ export * from "./models/IAuthenticationAdminComponent.js";
8
+ export * from "./models/IAuthenticationComponent.js";
@@ -7,10 +7,11 @@ export interface IAuthenticationAdminComponent extends IComponent {
7
7
  * Create a login for the user.
8
8
  * @param email The email address for the user.
9
9
  * @param password The password for the user.
10
- * @param identity The DID to associate with the account.
10
+ * @param userIdentity The DID to associate with the account.
11
+ * @param organizationIdentity The organization of the user.
11
12
  * @returns Nothing.
12
13
  */
13
- create(email: string, password: string, identity: string): Promise<void>;
14
+ create(email: string, password: string, userIdentity: string, organizationIdentity: string): Promise<void>;
14
15
  /**
15
16
  * Remove the current user.
16
17
  * @param email The email address of the user to remove.
package/docs/changelog.md CHANGED
@@ -1,5 +1,57 @@
1
1
  # @twin.org/api-auth-entity-storage-models - Changelog
2
2
 
3
+ ## [0.0.3-next.2](https://github.com/twinfoundation/api/compare/api-auth-entity-storage-models-v0.0.3-next.1...api-auth-entity-storage-models-v0.0.3-next.2) (2025-11-12)
4
+
5
+
6
+ ### Miscellaneous Chores
7
+
8
+ * **api-auth-entity-storage-models:** Synchronize repo versions
9
+
10
+ ## [0.0.3-next.1](https://github.com/twinfoundation/api/compare/api-auth-entity-storage-models-v0.0.3-next.0...api-auth-entity-storage-models-v0.0.3-next.1) (2025-11-10)
11
+
12
+
13
+ ### Features
14
+
15
+ * add context id features ([#42](https://github.com/twinfoundation/api/issues/42)) ([0186055](https://github.com/twinfoundation/api/commit/0186055c48afde842a4254b4df9ac9249c40fe40))
16
+ * add json-ld mime type processor and auth admin component ([8861791](https://github.com/twinfoundation/api/commit/88617916e23bfbca023dbae1976fe421983a02ff))
17
+ * add validate-locales ([cdba610](https://github.com/twinfoundation/api/commit/cdba610a0acb5022d2e3ce729732e6646a297e5e))
18
+ * eslint migration to flat config ([0dd5820](https://github.com/twinfoundation/api/commit/0dd5820e3af97350fd08b8d226f4a6c1a9246805))
19
+ * improve description ([d28185c](https://github.com/twinfoundation/api/commit/d28185c799a97455fee72fb23c744c8e71325f0b))
20
+ * improve socket route logging ([b8d9519](https://github.com/twinfoundation/api/commit/b8d95199f838ac6ba9f45c30ef7c4e613201ff53))
21
+ * remove unused namespace ([08478f2](https://github.com/twinfoundation/api/commit/08478f27efda9beb0271fdb22f6972e918361965))
22
+ * update dependencies ([1171dc4](https://github.com/twinfoundation/api/commit/1171dc416a9481737f6a640e3cf30145768f37e9))
23
+ * update framework core ([d8eebf2](https://github.com/twinfoundation/api/commit/d8eebf267fa2a0abaa84e58590496e9d20490cfa))
24
+ * update IComponent signatures ([915ce37](https://github.com/twinfoundation/api/commit/915ce37712326ab4aa6869c350eabaa4622e8430))
25
+ * use shared store mechanism ([#19](https://github.com/twinfoundation/api/issues/19)) ([32116df](https://github.com/twinfoundation/api/commit/32116df3b4380a30137f5056f242a5c99afa2df9))
26
+
27
+ ## [0.0.2-next.13](https://github.com/twinfoundation/api/compare/api-auth-entity-storage-models-v0.0.2-next.12...api-auth-entity-storage-models-v0.0.2-next.13) (2025-10-09)
28
+
29
+
30
+ ### Miscellaneous Chores
31
+
32
+ * **api-auth-entity-storage-models:** Synchronize repo versions
33
+
34
+ ## [0.0.2-next.12](https://github.com/twinfoundation/api/compare/api-auth-entity-storage-models-v0.0.2-next.11...api-auth-entity-storage-models-v0.0.2-next.12) (2025-10-09)
35
+
36
+
37
+ ### Features
38
+
39
+ * add validate-locales ([cdba610](https://github.com/twinfoundation/api/commit/cdba610a0acb5022d2e3ce729732e6646a297e5e))
40
+
41
+ ## [0.0.2-next.11](https://github.com/twinfoundation/api/compare/api-auth-entity-storage-models-v0.0.2-next.10...api-auth-entity-storage-models-v0.0.2-next.11) (2025-09-29)
42
+
43
+
44
+ ### Features
45
+
46
+ * update IComponent signatures ([915ce37](https://github.com/twinfoundation/api/commit/915ce37712326ab4aa6869c350eabaa4622e8430))
47
+
48
+ ## [0.0.2-next.10](https://github.com/twinfoundation/api/compare/api-auth-entity-storage-models-v0.0.2-next.9...api-auth-entity-storage-models-v0.0.2-next.10) (2025-09-23)
49
+
50
+
51
+ ### Miscellaneous Chores
52
+
53
+ * **api-auth-entity-storage-models:** Synchronize repo versions
54
+
3
55
  ## [0.0.2-next.9](https://github.com/twinfoundation/api/compare/api-auth-entity-storage-models-v0.0.2-next.8...api-auth-entity-storage-models-v0.0.2-next.9) (2025-08-29)
4
56
 
5
57
 
@@ -10,7 +10,7 @@ Contract definition for authentication admin component.
10
10
 
11
11
  ### create()
12
12
 
13
- > **create**(`email`, `password`, `identity`): `Promise`\<`void`\>
13
+ > **create**(`email`, `password`, `userIdentity`, `organizationIdentity`): `Promise`\<`void`\>
14
14
 
15
15
  Create a login for the user.
16
16
 
@@ -28,12 +28,18 @@ The email address for the user.
28
28
 
29
29
  The password for the user.
30
30
 
31
- ##### identity
31
+ ##### userIdentity
32
32
 
33
33
  `string`
34
34
 
35
35
  The DID to associate with the account.
36
36
 
37
+ ##### organizationIdentity
38
+
39
+ `string`
40
+
41
+ The organization of the user.
42
+
37
43
  #### Returns
38
44
 
39
45
  `Promise`\<`void`\>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/api-auth-entity-storage-models",
3
- "version": "0.0.2-next.9",
3
+ "version": "0.0.3-next.2",
4
4
  "description": "Models which define the structure of the Auth Entity Storage contracts.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,21 +18,38 @@
18
18
  "@twin.org/nameof": "next",
19
19
  "@twin.org/web": "next"
20
20
  },
21
- "main": "./dist/cjs/index.cjs",
22
- "module": "./dist/esm/index.mjs",
21
+ "main": "./dist/es/index.js",
23
22
  "types": "./dist/types/index.d.ts",
24
23
  "exports": {
25
24
  ".": {
26
25
  "types": "./dist/types/index.d.ts",
27
- "require": "./dist/cjs/index.cjs",
28
- "import": "./dist/esm/index.mjs"
26
+ "import": "./dist/es/index.js",
27
+ "default": "./dist/es/index.js"
29
28
  }
30
29
  },
31
30
  "files": [
32
- "dist/cjs",
33
- "dist/esm",
31
+ "dist/es",
34
32
  "dist/types",
35
33
  "locales",
36
34
  "docs"
37
- ]
35
+ ],
36
+ "keywords": [
37
+ "twin",
38
+ "trade",
39
+ "iota",
40
+ "framework",
41
+ "blockchain",
42
+ "api",
43
+ "entity",
44
+ "storage",
45
+ "persistence",
46
+ "database",
47
+ "models",
48
+ "types",
49
+ "schemas"
50
+ ],
51
+ "bugs": {
52
+ "url": "git+https://github.com/twinfoundation/api/issues"
53
+ },
54
+ "homepage": "https://twindev.org"
38
55
  }
@@ -1,2 +0,0 @@
1
- 'use strict';
2
-
@@ -1 +0,0 @@
1
-