@twin.org/api-auth-entity-storage-models 0.0.3-next.44 → 0.0.3-next.45
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/dist/es/models/IAuthenticationAdminComponent.js.map +1 -1
- package/dist/es/models/IAuthenticationComponent.js.map +1 -1
- package/dist/es/models/IAuthenticationRateComponent.js.map +1 -1
- package/dist/types/models/IAuthenticationAdminComponent.d.ts +4 -4
- package/dist/types/models/IAuthenticationComponent.d.ts +2 -2
- package/dist/types/models/IAuthenticationRateComponent.d.ts +5 -5
- package/docs/changelog.md +7 -0
- package/docs/reference/interfaces/IAuthenticationAdminComponent.md +4 -4
- package/docs/reference/interfaces/IAuthenticationComponent.md +2 -2
- package/docs/reference/interfaces/IAuthenticationRateComponent.md +5 -5
- package/package.json +1 -1
|
@@ -1 +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\";\nimport type { IAuthenticationUser } from \"./IAuthenticationUser.js\";\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 user The user to create.\n\t * @returns
|
|
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\";\nimport type { IAuthenticationUser } from \"./IAuthenticationUser.js\";\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 user The user to create.\n\t * @returns A promise that resolves when the user account has been created.\n\t */\n\tcreate(user: IAuthenticationUser & { password: string }): Promise<void>;\n\n\t/**\n\t * Update a login for the user.\n\t * @param user The user to update.\n\t * @returns A promise that resolves when the user account has been updated.\n\t */\n\tupdate(user: Partial<IAuthenticationUser>): Promise<void>;\n\n\t/**\n\t * Get a user by email.\n\t * @param email The email address of the user to get.\n\t * @returns The user details.\n\t */\n\tget(email: string): Promise<IAuthenticationUser>;\n\n\t/**\n\t * Get a user by identity.\n\t * @param identity The identity of the user to get.\n\t * @returns The user details.\n\t */\n\tgetByIdentity(identity: string): Promise<IAuthenticationUser>;\n\n\t/**\n\t * Remove a user.\n\t * @param email The email address of the user to remove.\n\t * @returns A promise that resolves when the user account has been removed.\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 A promise that resolves when the password has been updated.\n\t */\n\tupdatePassword(email: string, newPassword: string, currentPassword?: string): Promise<void>;\n}\n"]}
|
|
@@ -1 +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
|
|
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 A promise that resolves when the logout has been completed.\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 currentPassword The current password for the user.\n\t * @param newPassword The new password for the user.\n\t * @returns A promise that resolves when the password has been updated.\n\t */\n\tupdatePassword(currentPassword: string, newPassword: string): Promise<void>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IAuthenticationRateComponent.js","sourceRoot":"","sources":["../../../src/models/IAuthenticationRateComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type { IAuthenticationRateActionConfig } from \"./IAuthenticationRateActionConfig.js\";\n\n/**\n * Contract definition for authentication rate component.\n */\nexport interface IAuthenticationRateComponent extends IComponent {\n\t/**\n\t * The service needs to be started when the application is initialized.\n\t * @param nodeLoggingComponentType The node logging component type.\n\t * @returns
|
|
1
|
+
{"version":3,"file":"IAuthenticationRateComponent.js","sourceRoot":"","sources":["../../../src/models/IAuthenticationRateComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type { IAuthenticationRateActionConfig } from \"./IAuthenticationRateActionConfig.js\";\n\n/**\n * Contract definition for authentication rate component.\n */\nexport interface IAuthenticationRateComponent extends IComponent {\n\t/**\n\t * The service needs to be started when the application is initialized.\n\t * @param nodeLoggingComponentType The node logging component type.\n\t * @returns A promise that resolves when the service has been started.\n\t */\n\tstart(nodeLoggingComponentType?: string): Promise<void>;\n\n\t/**\n\t * The component needs to be stopped when the node is closed.\n\t * @param nodeLoggingComponentType The node logging component type.\n\t * @returns A promise that resolves when the service has been stopped.\n\t */\n\tstop(nodeLoggingComponentType?: string): Promise<void>;\n\n\t/**\n\t * Register or update rate-limit configuration for an action.\n\t * @param action The action name.\n\t * @param config The action configuration.\n\t * @returns A promise that resolves when the action configuration has been stored.\n\t */\n\tregisterAction(action: string, config: IAuthenticationRateActionConfig): Promise<void>;\n\n\t/**\n\t * Unregister rate-limit configuration for an action.\n\t * @param action The action name.\n\t * @returns A promise that resolves when the action configuration has been removed.\n\t */\n\tunregisterAction(action: string): Promise<void>;\n\n\t/**\n\t * Check the authentication rate for a given action and identifier.\n\t * @param action The action to be checked.\n\t * @param identifier The identifier to be checked.\n\t * @returns The result of the rate check.\n\t */\n\tcheck(action: string, identifier: string): Promise<string>;\n\n\t/**\n\t * Clear the authentication rate entry for the given action and identifier.\n\t * @param action The action to clear.\n\t * @param identifier The identifier to clear.\n\t * @returns A promise that resolves when the rate entry has been removed.\n\t */\n\tclear(action: string, identifier: string): Promise<void>;\n}\n"]}
|
|
@@ -7,7 +7,7 @@ export interface IAuthenticationAdminComponent extends IComponent {
|
|
|
7
7
|
/**
|
|
8
8
|
* Create a login for the user.
|
|
9
9
|
* @param user The user to create.
|
|
10
|
-
* @returns
|
|
10
|
+
* @returns A promise that resolves when the user account has been created.
|
|
11
11
|
*/
|
|
12
12
|
create(user: IAuthenticationUser & {
|
|
13
13
|
password: string;
|
|
@@ -15,7 +15,7 @@ export interface IAuthenticationAdminComponent extends IComponent {
|
|
|
15
15
|
/**
|
|
16
16
|
* Update a login for the user.
|
|
17
17
|
* @param user The user to update.
|
|
18
|
-
* @returns
|
|
18
|
+
* @returns A promise that resolves when the user account has been updated.
|
|
19
19
|
*/
|
|
20
20
|
update(user: Partial<IAuthenticationUser>): Promise<void>;
|
|
21
21
|
/**
|
|
@@ -33,7 +33,7 @@ export interface IAuthenticationAdminComponent extends IComponent {
|
|
|
33
33
|
/**
|
|
34
34
|
* Remove a user.
|
|
35
35
|
* @param email The email address of the user to remove.
|
|
36
|
-
* @returns
|
|
36
|
+
* @returns A promise that resolves when the user account has been removed.
|
|
37
37
|
*/
|
|
38
38
|
remove(email: string): Promise<void>;
|
|
39
39
|
/**
|
|
@@ -41,7 +41,7 @@ export interface IAuthenticationAdminComponent extends IComponent {
|
|
|
41
41
|
* @param email The email address of the user to update.
|
|
42
42
|
* @param newPassword The new password for the user.
|
|
43
43
|
* @param currentPassword The current password, optional, if supplied will check against existing.
|
|
44
|
-
* @returns
|
|
44
|
+
* @returns A promise that resolves when the password has been updated.
|
|
45
45
|
*/
|
|
46
46
|
updatePassword(email: string, newPassword: string, currentPassword?: string): Promise<void>;
|
|
47
47
|
}
|
|
@@ -16,7 +16,7 @@ export interface IAuthenticationComponent extends IComponent {
|
|
|
16
16
|
/**
|
|
17
17
|
* Logout the current user.
|
|
18
18
|
* @param token The token to logout, if it uses a mechanism with public access.
|
|
19
|
-
* @returns
|
|
19
|
+
* @returns A promise that resolves when the logout has been completed.
|
|
20
20
|
*/
|
|
21
21
|
logout(token?: string): Promise<void>;
|
|
22
22
|
/**
|
|
@@ -32,7 +32,7 @@ export interface IAuthenticationComponent extends IComponent {
|
|
|
32
32
|
* Update the user's password.
|
|
33
33
|
* @param currentPassword The current password for the user.
|
|
34
34
|
* @param newPassword The new password for the user.
|
|
35
|
-
* @returns
|
|
35
|
+
* @returns A promise that resolves when the password has been updated.
|
|
36
36
|
*/
|
|
37
37
|
updatePassword(currentPassword: string, newPassword: string): Promise<void>;
|
|
38
38
|
}
|
|
@@ -7,26 +7,26 @@ export interface IAuthenticationRateComponent extends IComponent {
|
|
|
7
7
|
/**
|
|
8
8
|
* The service needs to be started when the application is initialized.
|
|
9
9
|
* @param nodeLoggingComponentType The node logging component type.
|
|
10
|
-
* @returns
|
|
10
|
+
* @returns A promise that resolves when the service has been started.
|
|
11
11
|
*/
|
|
12
12
|
start(nodeLoggingComponentType?: string): Promise<void>;
|
|
13
13
|
/**
|
|
14
14
|
* The component needs to be stopped when the node is closed.
|
|
15
15
|
* @param nodeLoggingComponentType The node logging component type.
|
|
16
|
-
* @returns
|
|
16
|
+
* @returns A promise that resolves when the service has been stopped.
|
|
17
17
|
*/
|
|
18
18
|
stop(nodeLoggingComponentType?: string): Promise<void>;
|
|
19
19
|
/**
|
|
20
20
|
* Register or update rate-limit configuration for an action.
|
|
21
21
|
* @param action The action name.
|
|
22
22
|
* @param config The action configuration.
|
|
23
|
-
* @returns
|
|
23
|
+
* @returns A promise that resolves when the action configuration has been stored.
|
|
24
24
|
*/
|
|
25
25
|
registerAction(action: string, config: IAuthenticationRateActionConfig): Promise<void>;
|
|
26
26
|
/**
|
|
27
27
|
* Unregister rate-limit configuration for an action.
|
|
28
28
|
* @param action The action name.
|
|
29
|
-
* @returns
|
|
29
|
+
* @returns A promise that resolves when the action configuration has been removed.
|
|
30
30
|
*/
|
|
31
31
|
unregisterAction(action: string): Promise<void>;
|
|
32
32
|
/**
|
|
@@ -40,7 +40,7 @@ export interface IAuthenticationRateComponent extends IComponent {
|
|
|
40
40
|
* Clear the authentication rate entry for the given action and identifier.
|
|
41
41
|
* @param action The action to clear.
|
|
42
42
|
* @param identifier The identifier to clear.
|
|
43
|
-
* @returns
|
|
43
|
+
* @returns A promise that resolves when the rate entry has been removed.
|
|
44
44
|
*/
|
|
45
45
|
clear(action: string, identifier: string): Promise<void>;
|
|
46
46
|
}
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.3-next.45](https://github.com/iotaledger/twin-api/compare/api-auth-entity-storage-models-v0.0.3-next.44...api-auth-entity-storage-models-v0.0.3-next.45) (2026-06-15)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Miscellaneous Chores
|
|
7
|
+
|
|
8
|
+
* **api-auth-entity-storage-models:** Synchronize repo versions
|
|
9
|
+
|
|
3
10
|
## [0.0.3-next.44](https://github.com/iotaledger/twin-api/compare/api-auth-entity-storage-models-v0.0.3-next.43...api-auth-entity-storage-models-v0.0.3-next.44) (2026-06-11)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -26,7 +26,7 @@ The user to create.
|
|
|
26
26
|
|
|
27
27
|
`Promise`\<`void`\>
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
A promise that resolves when the user account has been created.
|
|
30
30
|
|
|
31
31
|
***
|
|
32
32
|
|
|
@@ -48,7 +48,7 @@ The user to update.
|
|
|
48
48
|
|
|
49
49
|
`Promise`\<`void`\>
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
A promise that resolves when the user account has been updated.
|
|
52
52
|
|
|
53
53
|
***
|
|
54
54
|
|
|
@@ -114,7 +114,7 @@ The email address of the user to remove.
|
|
|
114
114
|
|
|
115
115
|
`Promise`\<`void`\>
|
|
116
116
|
|
|
117
|
-
|
|
117
|
+
A promise that resolves when the user account has been removed.
|
|
118
118
|
|
|
119
119
|
***
|
|
120
120
|
|
|
@@ -148,4 +148,4 @@ The current password, optional, if supplied will check against existing.
|
|
|
148
148
|
|
|
149
149
|
`Promise`\<`void`\>
|
|
150
150
|
|
|
151
|
-
|
|
151
|
+
A promise that resolves when the password has been updated.
|
|
@@ -54,7 +54,7 @@ The token to logout, if it uses a mechanism with public access.
|
|
|
54
54
|
|
|
55
55
|
`Promise`\<`void`\>
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
A promise that resolves when the logout has been completed.
|
|
58
58
|
|
|
59
59
|
***
|
|
60
60
|
|
|
@@ -104,4 +104,4 @@ The new password for the user.
|
|
|
104
104
|
|
|
105
105
|
`Promise`\<`void`\>
|
|
106
106
|
|
|
107
|
-
|
|
107
|
+
A promise that resolves when the password has been updated.
|
|
@@ -26,7 +26,7 @@ The node logging component type.
|
|
|
26
26
|
|
|
27
27
|
`Promise`\<`void`\>
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
A promise that resolves when the service has been started.
|
|
30
30
|
|
|
31
31
|
#### Overrides
|
|
32
32
|
|
|
@@ -52,7 +52,7 @@ The node logging component type.
|
|
|
52
52
|
|
|
53
53
|
`Promise`\<`void`\>
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
A promise that resolves when the service has been stopped.
|
|
56
56
|
|
|
57
57
|
#### Overrides
|
|
58
58
|
|
|
@@ -84,7 +84,7 @@ The action configuration.
|
|
|
84
84
|
|
|
85
85
|
`Promise`\<`void`\>
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
A promise that resolves when the action configuration has been stored.
|
|
88
88
|
|
|
89
89
|
***
|
|
90
90
|
|
|
@@ -106,7 +106,7 @@ The action name.
|
|
|
106
106
|
|
|
107
107
|
`Promise`\<`void`\>
|
|
108
108
|
|
|
109
|
-
|
|
109
|
+
A promise that resolves when the action configuration has been removed.
|
|
110
110
|
|
|
111
111
|
***
|
|
112
112
|
|
|
@@ -162,4 +162,4 @@ The identifier to clear.
|
|
|
162
162
|
|
|
163
163
|
`Promise`\<`void`\>
|
|
164
164
|
|
|
165
|
-
|
|
165
|
+
A promise that resolves when the rate entry has been removed.
|
package/package.json
CHANGED