@3sixty/api-auth-entity-storage-models 0.0.0-stage → 0.20.0-next.0

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.
Files changed (127) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +24 -2
  3. package/dist/es/index.js +32 -0
  4. package/dist/es/index.js.map +1 -0
  5. package/dist/es/models/IAuthenticationAdminComponent.js +2 -0
  6. package/dist/es/models/IAuthenticationAdminComponent.js.map +1 -0
  7. package/dist/es/models/IAuthenticationAuditComponent.js +2 -0
  8. package/dist/es/models/IAuthenticationAuditComponent.js.map +1 -0
  9. package/dist/es/models/IAuthenticationAuditEntry.js +2 -0
  10. package/dist/es/models/IAuthenticationAuditEntry.js.map +1 -0
  11. package/dist/es/models/IAuthenticationComponent.js +2 -0
  12. package/dist/es/models/IAuthenticationComponent.js.map +1 -0
  13. package/dist/es/models/IAuthenticationRateActionConfig.js +4 -0
  14. package/dist/es/models/IAuthenticationRateActionConfig.js.map +1 -0
  15. package/dist/es/models/IAuthenticationRateComponent.js +2 -0
  16. package/dist/es/models/IAuthenticationRateComponent.js.map +1 -0
  17. package/dist/es/models/IAuthenticationUser.js +4 -0
  18. package/dist/es/models/IAuthenticationUser.js.map +1 -0
  19. package/dist/es/models/IAuthenticationUserSecure.js +2 -0
  20. package/dist/es/models/IAuthenticationUserSecure.js.map +1 -0
  21. package/dist/es/models/api/IAdminUserCreateRequest.js +2 -0
  22. package/dist/es/models/api/IAdminUserCreateRequest.js.map +1 -0
  23. package/dist/es/models/api/IAdminUserGetByIdentityRequest.js +4 -0
  24. package/dist/es/models/api/IAdminUserGetByIdentityRequest.js.map +1 -0
  25. package/dist/es/models/api/IAdminUserGetRequest.js +4 -0
  26. package/dist/es/models/api/IAdminUserGetRequest.js.map +1 -0
  27. package/dist/es/models/api/IAdminUserGetResponse.js +2 -0
  28. package/dist/es/models/api/IAdminUserGetResponse.js.map +1 -0
  29. package/dist/es/models/api/IAdminUserRemoveRequest.js +4 -0
  30. package/dist/es/models/api/IAdminUserRemoveRequest.js.map +1 -0
  31. package/dist/es/models/api/IAdminUserUpdatePasswordRequest.js +4 -0
  32. package/dist/es/models/api/IAdminUserUpdatePasswordRequest.js.map +1 -0
  33. package/dist/es/models/api/IAdminUserUpdateRequest.js +2 -0
  34. package/dist/es/models/api/IAdminUserUpdateRequest.js.map +1 -0
  35. package/dist/es/models/api/IAuditCreateRequest.js +2 -0
  36. package/dist/es/models/api/IAuditCreateRequest.js.map +1 -0
  37. package/dist/es/models/api/IAuditGetRequest.js +4 -0
  38. package/dist/es/models/api/IAuditGetRequest.js.map +1 -0
  39. package/dist/es/models/api/IAuditGetResponse.js +2 -0
  40. package/dist/es/models/api/IAuditGetResponse.js.map +1 -0
  41. package/dist/es/models/api/IAuditQueryRequest.js +2 -0
  42. package/dist/es/models/api/IAuditQueryRequest.js.map +1 -0
  43. package/dist/es/models/api/IAuditQueryResponse.js +2 -0
  44. package/dist/es/models/api/IAuditQueryResponse.js.map +1 -0
  45. package/dist/es/models/api/IAuditRemoveRequest.js +4 -0
  46. package/dist/es/models/api/IAuditRemoveRequest.js.map +1 -0
  47. package/dist/es/models/api/IAuditUpdateRequest.js +2 -0
  48. package/dist/es/models/api/IAuditUpdateRequest.js.map +1 -0
  49. package/dist/es/models/api/ILoginRequest.js +4 -0
  50. package/dist/es/models/api/ILoginRequest.js.map +1 -0
  51. package/dist/es/models/api/ILoginResponse.js +2 -0
  52. package/dist/es/models/api/ILoginResponse.js.map +1 -0
  53. package/dist/es/models/api/ILogoutRequest.js +4 -0
  54. package/dist/es/models/api/ILogoutRequest.js.map +1 -0
  55. package/dist/es/models/api/IRefreshTokenRequest.js +4 -0
  56. package/dist/es/models/api/IRefreshTokenRequest.js.map +1 -0
  57. package/dist/es/models/api/IRefreshTokenResponse.js +2 -0
  58. package/dist/es/models/api/IRefreshTokenResponse.js.map +1 -0
  59. package/dist/es/models/api/IUpdatePasswordRequest.js +4 -0
  60. package/dist/es/models/api/IUpdatePasswordRequest.js.map +1 -0
  61. package/dist/es/models/authAuditEvent.js +49 -0
  62. package/dist/es/models/authAuditEvent.js.map +1 -0
  63. package/dist/types/index.d.ts +29 -0
  64. package/dist/types/models/IAuthenticationAdminComponent.d.ts +47 -0
  65. package/dist/types/models/IAuthenticationAuditComponent.d.ts +59 -0
  66. package/dist/types/models/IAuthenticationAuditEntry.d.ts +50 -0
  67. package/dist/types/models/IAuthenticationComponent.d.ts +38 -0
  68. package/dist/types/models/IAuthenticationRateActionConfig.d.ts +13 -0
  69. package/dist/types/models/IAuthenticationRateComponent.d.ts +46 -0
  70. package/dist/types/models/IAuthenticationUser.d.ts +21 -0
  71. package/dist/types/models/IAuthenticationUserSecure.d.ts +18 -0
  72. package/dist/types/models/api/IAdminUserCreateRequest.d.ts +12 -0
  73. package/dist/types/models/api/IAdminUserGetByIdentityRequest.d.ts +14 -0
  74. package/dist/types/models/api/IAdminUserGetRequest.d.ts +14 -0
  75. package/dist/types/models/api/IAdminUserGetResponse.d.ts +10 -0
  76. package/dist/types/models/api/IAdminUserRemoveRequest.d.ts +14 -0
  77. package/dist/types/models/api/IAdminUserUpdatePasswordRequest.d.ts +27 -0
  78. package/dist/types/models/api/IAdminUserUpdateRequest.d.ts +19 -0
  79. package/dist/types/models/api/IAuditCreateRequest.d.ts +10 -0
  80. package/dist/types/models/api/IAuditGetRequest.d.ts +14 -0
  81. package/dist/types/models/api/IAuditGetResponse.d.ts +10 -0
  82. package/dist/types/models/api/IAuditQueryRequest.d.ts +47 -0
  83. package/dist/types/models/api/IAuditQueryResponse.d.ts +19 -0
  84. package/dist/types/models/api/IAuditRemoveRequest.d.ts +14 -0
  85. package/dist/types/models/api/IAuditUpdateRequest.d.ts +19 -0
  86. package/dist/types/models/api/ILoginRequest.d.ts +18 -0
  87. package/dist/types/models/api/ILoginResponse.d.ts +24 -0
  88. package/dist/types/models/api/ILogoutRequest.d.ts +14 -0
  89. package/dist/types/models/api/IRefreshTokenRequest.d.ts +14 -0
  90. package/dist/types/models/api/IRefreshTokenResponse.d.ts +24 -0
  91. package/dist/types/models/api/IUpdatePasswordRequest.d.ts +18 -0
  92. package/dist/types/models/authAuditEvent.d.ts +49 -0
  93. package/docs/changelog.md +0 -0
  94. package/docs/examples.md +80 -0
  95. package/docs/reference/index.md +40 -0
  96. package/docs/reference/interfaces/IAdminUserCreateRequest.md +17 -0
  97. package/docs/reference/interfaces/IAdminUserGetByIdentityRequest.md +17 -0
  98. package/docs/reference/interfaces/IAdminUserGetRequest.md +17 -0
  99. package/docs/reference/interfaces/IAdminUserGetResponse.md +11 -0
  100. package/docs/reference/interfaces/IAdminUserRemoveRequest.md +17 -0
  101. package/docs/reference/interfaces/IAdminUserUpdatePasswordRequest.md +37 -0
  102. package/docs/reference/interfaces/IAdminUserUpdateRequest.md +25 -0
  103. package/docs/reference/interfaces/IAuditCreateRequest.md +11 -0
  104. package/docs/reference/interfaces/IAuditGetRequest.md +17 -0
  105. package/docs/reference/interfaces/IAuditGetResponse.md +11 -0
  106. package/docs/reference/interfaces/IAuditQueryRequest.md +65 -0
  107. package/docs/reference/interfaces/IAuditQueryResponse.md +23 -0
  108. package/docs/reference/interfaces/IAuditRemoveRequest.md +17 -0
  109. package/docs/reference/interfaces/IAuditUpdateRequest.md +25 -0
  110. package/docs/reference/interfaces/IAuthenticationAdminComponent.md +151 -0
  111. package/docs/reference/interfaces/IAuthenticationAuditComponent.md +175 -0
  112. package/docs/reference/interfaces/IAuthenticationAuditEntry.md +91 -0
  113. package/docs/reference/interfaces/IAuthenticationComponent.md +107 -0
  114. package/docs/reference/interfaces/IAuthenticationRateActionConfig.md +19 -0
  115. package/docs/reference/interfaces/IAuthenticationRateComponent.md +165 -0
  116. package/docs/reference/interfaces/IAuthenticationUser.md +39 -0
  117. package/docs/reference/interfaces/IAuthenticationUserSecure.md +79 -0
  118. package/docs/reference/interfaces/ILoginRequest.md +23 -0
  119. package/docs/reference/interfaces/ILoginResponse.md +31 -0
  120. package/docs/reference/interfaces/ILogoutRequest.md +17 -0
  121. package/docs/reference/interfaces/IRefreshTokenRequest.md +17 -0
  122. package/docs/reference/interfaces/IRefreshTokenResponse.md +31 -0
  123. package/docs/reference/interfaces/IUpdatePasswordRequest.md +23 -0
  124. package/docs/reference/type-aliases/AuthAuditEvent.md +5 -0
  125. package/docs/reference/variables/AuthAuditEvent.md +67 -0
  126. package/locales/en.json +1 -0
  127. package/package.json +54 -5
@@ -0,0 +1,39 @@
1
+ # Interface: IAuthenticationUser
2
+
3
+ Contract definition for authentication user.
4
+
5
+ ## Extended by
6
+
7
+ - [`IAuthenticationUserSecure`](IAuthenticationUserSecure.md)
8
+
9
+ ## Properties
10
+
11
+ ### email {#email}
12
+
13
+ > **email**: `string`
14
+
15
+ The user e-mail address.
16
+
17
+ ***
18
+
19
+ ### userIdentity {#useridentity}
20
+
21
+ > **userIdentity**: `string`
22
+
23
+ The user identity.
24
+
25
+ ***
26
+
27
+ ### organizationIdentity {#organizationidentity}
28
+
29
+ > **organizationIdentity**: `string`
30
+
31
+ The users organization.
32
+
33
+ ***
34
+
35
+ ### scope {#scope}
36
+
37
+ > **scope**: `string`[]
38
+
39
+ The scope assigned to the user, comma separated.
@@ -0,0 +1,79 @@
1
+ # Interface: IAuthenticationUserSecure
2
+
3
+ Contract definition for authentication user.
4
+
5
+ ## Extends
6
+
7
+ - [`IAuthenticationUser`](IAuthenticationUser.md)
8
+
9
+ ## Properties
10
+
11
+ ### email {#email}
12
+
13
+ > **email**: `string`
14
+
15
+ The user e-mail address.
16
+
17
+ #### Inherited from
18
+
19
+ [`IAuthenticationUser`](IAuthenticationUser.md).[`email`](IAuthenticationUser.md#email)
20
+
21
+ ***
22
+
23
+ ### userIdentity {#useridentity}
24
+
25
+ > **userIdentity**: `string`
26
+
27
+ The user identity.
28
+
29
+ #### Inherited from
30
+
31
+ [`IAuthenticationUser`](IAuthenticationUser.md).[`userIdentity`](IAuthenticationUser.md#useridentity)
32
+
33
+ ***
34
+
35
+ ### organizationIdentity {#organizationidentity}
36
+
37
+ > **organizationIdentity**: `string`
38
+
39
+ The users organization.
40
+
41
+ #### Inherited from
42
+
43
+ [`IAuthenticationUser`](IAuthenticationUser.md).[`organizationIdentity`](IAuthenticationUser.md#organizationidentity)
44
+
45
+ ***
46
+
47
+ ### scope {#scope}
48
+
49
+ > **scope**: `string`[]
50
+
51
+ The scope assigned to the user, comma separated.
52
+
53
+ #### Inherited from
54
+
55
+ [`IAuthenticationUser`](IAuthenticationUser.md).[`scope`](IAuthenticationUser.md#scope)
56
+
57
+ ***
58
+
59
+ ### password {#password}
60
+
61
+ > **password**: `string`
62
+
63
+ The encrypted password for the user.
64
+
65
+ ***
66
+
67
+ ### salt {#salt}
68
+
69
+ > **salt**: `string`
70
+
71
+ The salt for the password.
72
+
73
+ ***
74
+
75
+ ### tenantId {#tenantid}
76
+
77
+ > **tenantId**: `string`
78
+
79
+ The tenant ID associated with the user, optional in single tenant contexts.
@@ -0,0 +1,23 @@
1
+ # Interface: ILoginRequest
2
+
3
+ Perform a login on the server.
4
+
5
+ ## Properties
6
+
7
+ ### body {#body}
8
+
9
+ > **body**: `object`
10
+
11
+ The login details.
12
+
13
+ #### email
14
+
15
+ > **email**: `string`
16
+
17
+ The email address for the user.
18
+
19
+ #### password
20
+
21
+ > **password**: `string`
22
+
23
+ The password for the user.
@@ -0,0 +1,31 @@
1
+ # Interface: ILoginResponse
2
+
3
+ Response from a login on the server.
4
+
5
+ ## Properties
6
+
7
+ ### headers? {#headers}
8
+
9
+ > `optional` **headers?**: `object`
10
+
11
+ Response headers.
12
+
13
+ #### set-cookie?
14
+
15
+ > `optional` **set-cookie?**: `string`
16
+
17
+ The cookie containing the auth token.
18
+
19
+ ***
20
+
21
+ ### body {#body}
22
+
23
+ > **body**: `object`
24
+
25
+ The login response details.
26
+
27
+ #### expiry
28
+
29
+ > **expiry**: `number`
30
+
31
+ The expiry time of the token.
@@ -0,0 +1,17 @@
1
+ # Interface: ILogoutRequest
2
+
3
+ Perform a logout on the auth token.
4
+
5
+ ## Properties
6
+
7
+ ### body? {#body}
8
+
9
+ > `optional` **body?**: `object`
10
+
11
+ The logout token details.
12
+
13
+ #### token?
14
+
15
+ > `optional` **token?**: `string`
16
+
17
+ The token to logout, if it uses a mechanism with public access.
@@ -0,0 +1,17 @@
1
+ # Interface: IRefreshTokenRequest
2
+
3
+ Perform a refresh of the auth token.
4
+
5
+ ## Properties
6
+
7
+ ### body? {#body}
8
+
9
+ > `optional` **body?**: `object`
10
+
11
+ The refresh token details.
12
+
13
+ #### token?
14
+
15
+ > `optional` **token?**: `string`
16
+
17
+ The token to refresh, if it uses a mechanism with public access.
@@ -0,0 +1,31 @@
1
+ # Interface: IRefreshTokenResponse
2
+
3
+ Response from a refresh on the auth token.
4
+
5
+ ## Properties
6
+
7
+ ### headers? {#headers}
8
+
9
+ > `optional` **headers?**: `object`
10
+
11
+ Response headers.
12
+
13
+ #### set-cookie?
14
+
15
+ > `optional` **set-cookie?**: `string`
16
+
17
+ The cookie containing the auth token.
18
+
19
+ ***
20
+
21
+ ### body {#body}
22
+
23
+ > **body**: `object`
24
+
25
+ The refresh token details.
26
+
27
+ #### expiry
28
+
29
+ > **expiry**: `number`
30
+
31
+ The expiry time of the token.
@@ -0,0 +1,23 @@
1
+ # Interface: IUpdatePasswordRequest
2
+
3
+ Update the current user's password.
4
+
5
+ ## Properties
6
+
7
+ ### body {#body}
8
+
9
+ > **body**: `object`
10
+
11
+ The body of the request.
12
+
13
+ #### currentPassword
14
+
15
+ > **currentPassword**: `string`
16
+
17
+ The current password for the user.
18
+
19
+ #### newPassword
20
+
21
+ > **newPassword**: `string`
22
+
23
+ The new password for the user.
@@ -0,0 +1,5 @@
1
+ # Type Alias: AuthAuditEvent
2
+
3
+ > **AuthAuditEvent** = *typeof* [`AuthAuditEvent`](../variables/AuthAuditEvent.md)\[keyof *typeof* [`AuthAuditEvent`](../variables/AuthAuditEvent.md)\]
4
+
5
+ Supported authentication audit event values.
@@ -0,0 +1,67 @@
1
+ # Variable: AuthAuditEvent
2
+
3
+ > `const` **AuthAuditEvent**: `object`
4
+
5
+ Supported authentication audit events.
6
+
7
+ ## Type Declaration
8
+
9
+ ### LoginSuccess {#loginsuccess}
10
+
11
+ > `readonly` **LoginSuccess**: `"login-success"` = `"login-success"`
12
+
13
+ Login success.
14
+
15
+ ### LoginFailure {#loginfailure}
16
+
17
+ > `readonly` **LoginFailure**: `"login-failure"` = `"login-failure"`
18
+
19
+ Login failure.
20
+
21
+ ### Logout {#logout}
22
+
23
+ > `readonly` **Logout**: `"logout"` = `"logout"`
24
+
25
+ Logout.
26
+
27
+ ### TokenRefreshed {#tokenrefreshed}
28
+
29
+ > `readonly` **TokenRefreshed**: `"token-refreshed"` = `"token-refreshed"`
30
+
31
+ Token refreshed.
32
+
33
+ ### AccountCreated {#accountcreated}
34
+
35
+ > `readonly` **AccountCreated**: `"account-created"` = `"account-created"`
36
+
37
+ Account created.
38
+
39
+ ### AccountDeleted {#accountdeleted}
40
+
41
+ > `readonly` **AccountDeleted**: `"account-deleted"` = `"account-deleted"`
42
+
43
+ Account deleted.
44
+
45
+ ### AccountUpdated {#accountupdated}
46
+
47
+ > `readonly` **AccountUpdated**: `"account-updated"` = `"account-updated"`
48
+
49
+ Account updated.
50
+
51
+ ### AccountLocked {#accountlocked}
52
+
53
+ > `readonly` **AccountLocked**: `"account-locked"` = `"account-locked"`
54
+
55
+ Account locked.
56
+
57
+ ### AccountUnlocked {#accountunlocked}
58
+
59
+ > `readonly` **AccountUnlocked**: `"account-unlocked"` = `"account-unlocked"`
60
+
61
+ Account unlocked.
62
+
63
+ ### PasswordChanged {#passwordchanged}
64
+
65
+ > `readonly` **PasswordChanged**: `"password-changed"` = `"password-changed"`
66
+
67
+ Password changed.
@@ -0,0 +1 @@
1
+ {}
package/package.json CHANGED
@@ -1,6 +1,55 @@
1
1
  {
2
- "name": "@3sixty/api-auth-entity-storage-models",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
2
+ "name": "@3sixty/api-auth-entity-storage-models",
3
+ "version": "0.20.0-next.0",
4
+ "description": "Contracts for authentication flows and admin user management with entity storage.",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/3sixtyglobal/api.git",
8
+ "directory": "packages/api-auth-entity-storage-models"
9
+ },
10
+ "author": "martyn.janes@iota.org",
11
+ "license": "Apache-2.0",
12
+ "type": "module",
13
+ "engines": {
14
+ "node": ">=24.0.0"
15
+ },
16
+ "dependencies": {
17
+ "@3sixty/core": "next",
18
+ "@3sixty/nameof": "next",
19
+ "@3sixty/web": "next"
20
+ },
21
+ "main": "./dist/es/index.js",
22
+ "types": "./dist/types/index.d.ts",
23
+ "exports": {
24
+ ".": {
25
+ "types": "./dist/types/index.d.ts",
26
+ "import": "./dist/es/index.js",
27
+ "default": "./dist/es/index.js"
28
+ }
29
+ },
30
+ "files": [
31
+ "dist/es",
32
+ "dist/types",
33
+ "locales",
34
+ "docs"
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/3sixtyglobal/api/issues"
53
+ },
54
+ "homepage": "https://3sixty.global"
55
+ }