@twin.org/api-auth-entity-storage-models 0.0.3-next.4 → 0.0.3-next.41
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/README.md +2 -2
- package/dist/es/index.js +17 -0
- package/dist/es/index.js.map +1 -1
- package/dist/es/models/IAuthenticationAdminComponent.js.map +1 -1
- package/dist/es/models/IAuthenticationAuditComponent.js +2 -0
- package/dist/es/models/IAuthenticationAuditComponent.js.map +1 -0
- package/dist/es/models/IAuthenticationAuditEntry.js +2 -0
- package/dist/es/models/IAuthenticationAuditEntry.js.map +1 -0
- package/dist/es/models/IAuthenticationComponent.js.map +1 -1
- package/dist/es/models/IAuthenticationRateActionConfig.js +4 -0
- package/dist/es/models/IAuthenticationRateActionConfig.js.map +1 -0
- package/dist/es/models/IAuthenticationRateComponent.js +2 -0
- package/dist/es/models/IAuthenticationRateComponent.js.map +1 -0
- package/dist/es/models/IAuthenticationUser.js +4 -0
- package/dist/es/models/IAuthenticationUser.js.map +1 -0
- package/dist/es/models/IAuthenticationUserSecure.js +2 -0
- package/dist/es/models/IAuthenticationUserSecure.js.map +1 -0
- package/dist/es/models/api/IAdminUserCreateRequest.js +2 -0
- package/dist/es/models/api/IAdminUserCreateRequest.js.map +1 -0
- package/dist/es/models/api/IAdminUserGetByIdentityRequest.js +4 -0
- package/dist/es/models/api/IAdminUserGetByIdentityRequest.js.map +1 -0
- package/dist/es/models/api/IAdminUserGetRequest.js +4 -0
- package/dist/es/models/api/IAdminUserGetRequest.js.map +1 -0
- package/dist/es/models/api/IAdminUserGetResponse.js +2 -0
- package/dist/es/models/api/IAdminUserGetResponse.js.map +1 -0
- package/dist/es/models/api/IAdminUserRemoveRequest.js +4 -0
- package/dist/es/models/api/IAdminUserRemoveRequest.js.map +1 -0
- package/dist/es/models/api/IAdminUserUpdatePasswordRequest.js +4 -0
- package/dist/es/models/api/IAdminUserUpdatePasswordRequest.js.map +1 -0
- package/dist/es/models/api/IAdminUserUpdateRequest.js +2 -0
- package/dist/es/models/api/IAdminUserUpdateRequest.js.map +1 -0
- package/dist/es/models/api/IAuditCreateRequest.js +2 -0
- package/dist/es/models/api/IAuditCreateRequest.js.map +1 -0
- package/dist/es/models/api/IAuditQueryRequest.js +2 -0
- package/dist/es/models/api/IAuditQueryRequest.js.map +1 -0
- package/dist/es/models/api/IAuditQueryResponse.js +2 -0
- package/dist/es/models/api/IAuditQueryResponse.js.map +1 -0
- package/dist/es/models/api/ILoginResponse.js +0 -2
- package/dist/es/models/api/ILoginResponse.js.map +1 -1
- package/dist/es/models/api/ILogoutRequest.js.map +1 -1
- package/dist/es/models/api/IRefreshTokenRequest.js.map +1 -1
- package/dist/es/models/api/IRefreshTokenResponse.js +0 -2
- package/dist/es/models/api/IRefreshTokenResponse.js.map +1 -1
- package/dist/es/models/api/IUpdatePasswordRequest.js.map +1 -1
- package/dist/es/models/authAuditEvent.js +49 -0
- package/dist/es/models/authAuditEvent.js.map +1 -0
- package/dist/types/index.d.ts +17 -0
- package/dist/types/models/IAuthenticationAdminComponent.d.ts +24 -6
- package/dist/types/models/IAuthenticationAuditComponent.d.ts +40 -0
- package/dist/types/models/IAuthenticationAuditEntry.d.ts +50 -0
- package/dist/types/models/IAuthenticationComponent.d.ts +1 -2
- package/dist/types/models/IAuthenticationRateActionConfig.d.ts +13 -0
- package/dist/types/models/IAuthenticationRateComponent.d.ts +46 -0
- package/dist/types/models/IAuthenticationUser.d.ts +21 -0
- package/dist/types/models/IAuthenticationUserSecure.d.ts +18 -0
- package/dist/types/models/api/IAdminUserCreateRequest.d.ts +12 -0
- package/dist/types/models/api/IAdminUserGetByIdentityRequest.d.ts +14 -0
- package/dist/types/models/api/IAdminUserGetRequest.d.ts +14 -0
- package/dist/types/models/api/IAdminUserGetResponse.d.ts +10 -0
- package/dist/types/models/api/IAdminUserRemoveRequest.d.ts +14 -0
- package/dist/types/models/api/IAdminUserUpdatePasswordRequest.d.ts +27 -0
- package/dist/types/models/api/IAdminUserUpdateRequest.d.ts +19 -0
- package/dist/types/models/api/IAuditCreateRequest.d.ts +10 -0
- package/dist/types/models/api/IAuditQueryRequest.d.ts +47 -0
- package/dist/types/models/api/IAuditQueryResponse.d.ts +19 -0
- package/dist/types/models/api/ILoginResponse.d.ts +10 -4
- package/dist/types/models/api/ILogoutRequest.d.ts +1 -1
- package/dist/types/models/api/IRefreshTokenRequest.d.ts +1 -1
- package/dist/types/models/api/IRefreshTokenResponse.d.ts +10 -4
- package/dist/types/models/api/IUpdatePasswordRequest.d.ts +1 -10
- package/dist/types/models/authAuditEvent.d.ts +49 -0
- package/docs/changelog.md +335 -65
- package/docs/examples.md +80 -1
- package/docs/reference/index.md +24 -0
- package/docs/reference/interfaces/IAdminUserCreateRequest.md +17 -0
- package/docs/reference/interfaces/IAdminUserGetByIdentityRequest.md +17 -0
- package/docs/reference/interfaces/IAdminUserGetRequest.md +17 -0
- package/docs/reference/interfaces/IAdminUserGetResponse.md +11 -0
- package/docs/reference/interfaces/IAdminUserRemoveRequest.md +17 -0
- package/docs/reference/interfaces/IAdminUserUpdatePasswordRequest.md +37 -0
- package/docs/reference/interfaces/IAdminUserUpdateRequest.md +25 -0
- package/docs/reference/interfaces/IAuditCreateRequest.md +11 -0
- package/docs/reference/interfaces/IAuditQueryRequest.md +65 -0
- package/docs/reference/interfaces/IAuditQueryResponse.md +23 -0
- package/docs/reference/interfaces/IAuthenticationAdminComponent.md +64 -16
- package/docs/reference/interfaces/IAuthenticationAuditComponent.md +103 -0
- package/docs/reference/interfaces/IAuthenticationAuditEntry.md +91 -0
- package/docs/reference/interfaces/IAuthenticationComponent.md +5 -11
- package/docs/reference/interfaces/IAuthenticationRateActionConfig.md +19 -0
- package/docs/reference/interfaces/IAuthenticationRateComponent.md +165 -0
- package/docs/reference/interfaces/IAuthenticationUser.md +39 -0
- package/docs/reference/interfaces/IAuthenticationUserSecure.md +79 -0
- package/docs/reference/interfaces/ILoginRequest.md +1 -1
- package/docs/reference/interfaces/ILoginResponse.md +14 -6
- package/docs/reference/interfaces/ILogoutRequest.md +3 -3
- package/docs/reference/interfaces/IRefreshTokenRequest.md +3 -3
- package/docs/reference/interfaces/IRefreshTokenResponse.md +14 -6
- package/docs/reference/interfaces/IUpdatePasswordRequest.md +2 -16
- package/docs/reference/type-aliases/AuthAuditEvent.md +5 -0
- package/docs/reference/variables/AuthAuditEvent.md +67 -0
- package/package.json +4 -4
package/docs/reference/index.md
CHANGED
|
@@ -3,10 +3,34 @@
|
|
|
3
3
|
## Interfaces
|
|
4
4
|
|
|
5
5
|
- [IAuthenticationAdminComponent](interfaces/IAuthenticationAdminComponent.md)
|
|
6
|
+
- [IAuthenticationAuditComponent](interfaces/IAuthenticationAuditComponent.md)
|
|
7
|
+
- [IAuthenticationAuditEntry](interfaces/IAuthenticationAuditEntry.md)
|
|
6
8
|
- [IAuthenticationComponent](interfaces/IAuthenticationComponent.md)
|
|
9
|
+
- [IAuthenticationRateActionConfig](interfaces/IAuthenticationRateActionConfig.md)
|
|
10
|
+
- [IAuthenticationRateComponent](interfaces/IAuthenticationRateComponent.md)
|
|
11
|
+
- [IAuthenticationUser](interfaces/IAuthenticationUser.md)
|
|
12
|
+
- [IAuthenticationUserSecure](interfaces/IAuthenticationUserSecure.md)
|
|
13
|
+
- [IAdminUserCreateRequest](interfaces/IAdminUserCreateRequest.md)
|
|
14
|
+
- [IAdminUserGetByIdentityRequest](interfaces/IAdminUserGetByIdentityRequest.md)
|
|
15
|
+
- [IAdminUserGetRequest](interfaces/IAdminUserGetRequest.md)
|
|
16
|
+
- [IAdminUserGetResponse](interfaces/IAdminUserGetResponse.md)
|
|
17
|
+
- [IAdminUserRemoveRequest](interfaces/IAdminUserRemoveRequest.md)
|
|
18
|
+
- [IAdminUserUpdatePasswordRequest](interfaces/IAdminUserUpdatePasswordRequest.md)
|
|
19
|
+
- [IAdminUserUpdateRequest](interfaces/IAdminUserUpdateRequest.md)
|
|
20
|
+
- [IAuditCreateRequest](interfaces/IAuditCreateRequest.md)
|
|
21
|
+
- [IAuditQueryRequest](interfaces/IAuditQueryRequest.md)
|
|
22
|
+
- [IAuditQueryResponse](interfaces/IAuditQueryResponse.md)
|
|
7
23
|
- [ILoginRequest](interfaces/ILoginRequest.md)
|
|
8
24
|
- [ILoginResponse](interfaces/ILoginResponse.md)
|
|
9
25
|
- [ILogoutRequest](interfaces/ILogoutRequest.md)
|
|
10
26
|
- [IRefreshTokenRequest](interfaces/IRefreshTokenRequest.md)
|
|
11
27
|
- [IRefreshTokenResponse](interfaces/IRefreshTokenResponse.md)
|
|
12
28
|
- [IUpdatePasswordRequest](interfaces/IUpdatePasswordRequest.md)
|
|
29
|
+
|
|
30
|
+
## Type Aliases
|
|
31
|
+
|
|
32
|
+
- [AuthAuditEvent](type-aliases/AuthAuditEvent.md)
|
|
33
|
+
|
|
34
|
+
## Variables
|
|
35
|
+
|
|
36
|
+
- [AuthAuditEvent](variables/AuthAuditEvent.md)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Interface: IAdminUserCreateRequest
|
|
2
|
+
|
|
3
|
+
Create a new user as an admin.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### body {#body}
|
|
8
|
+
|
|
9
|
+
> **body**: [`IAuthenticationUser`](IAuthenticationUser.md) & `object`
|
|
10
|
+
|
|
11
|
+
The body of the request.
|
|
12
|
+
|
|
13
|
+
#### Type Declaration
|
|
14
|
+
|
|
15
|
+
##### password
|
|
16
|
+
|
|
17
|
+
> **password**: `string`
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Interface: IAdminUserGetByIdentityRequest
|
|
2
|
+
|
|
3
|
+
Get a user as an admin.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### pathParams {#pathparams}
|
|
8
|
+
|
|
9
|
+
> **pathParams**: `object`
|
|
10
|
+
|
|
11
|
+
The path parameters for the request.
|
|
12
|
+
|
|
13
|
+
#### identity
|
|
14
|
+
|
|
15
|
+
> **identity**: `string`
|
|
16
|
+
|
|
17
|
+
The user identity.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Interface: IAdminUserGetRequest
|
|
2
|
+
|
|
3
|
+
Get a user as an admin.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### pathParams {#pathparams}
|
|
8
|
+
|
|
9
|
+
> **pathParams**: `object`
|
|
10
|
+
|
|
11
|
+
The path parameters for the request.
|
|
12
|
+
|
|
13
|
+
#### email
|
|
14
|
+
|
|
15
|
+
> **email**: `string`
|
|
16
|
+
|
|
17
|
+
The user email.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Interface: IAdminUserRemoveRequest
|
|
2
|
+
|
|
3
|
+
Remove a user as an admin.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### pathParams {#pathparams}
|
|
8
|
+
|
|
9
|
+
> **pathParams**: `object`
|
|
10
|
+
|
|
11
|
+
The path parameters for the request.
|
|
12
|
+
|
|
13
|
+
#### email
|
|
14
|
+
|
|
15
|
+
> **email**: `string`
|
|
16
|
+
|
|
17
|
+
The user email.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Interface: IAdminUserUpdatePasswordRequest
|
|
2
|
+
|
|
3
|
+
Update a users password as an admin.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### pathParams {#pathparams}
|
|
8
|
+
|
|
9
|
+
> **pathParams**: `object`
|
|
10
|
+
|
|
11
|
+
The path parameters for the request.
|
|
12
|
+
|
|
13
|
+
#### email
|
|
14
|
+
|
|
15
|
+
> **email**: `string`
|
|
16
|
+
|
|
17
|
+
The user email.
|
|
18
|
+
|
|
19
|
+
***
|
|
20
|
+
|
|
21
|
+
### body {#body}
|
|
22
|
+
|
|
23
|
+
> **body**: `object`
|
|
24
|
+
|
|
25
|
+
The body of the request.
|
|
26
|
+
|
|
27
|
+
#### newPassword
|
|
28
|
+
|
|
29
|
+
> **newPassword**: `string`
|
|
30
|
+
|
|
31
|
+
The new password for the user.
|
|
32
|
+
|
|
33
|
+
#### currentPassword?
|
|
34
|
+
|
|
35
|
+
> `optional` **currentPassword?**: `string`
|
|
36
|
+
|
|
37
|
+
The current password for the user.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Interface: IAdminUserUpdateRequest
|
|
2
|
+
|
|
3
|
+
Update a user as an admin.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### pathParams {#pathparams}
|
|
8
|
+
|
|
9
|
+
> **pathParams**: `object`
|
|
10
|
+
|
|
11
|
+
The path parameters for the request.
|
|
12
|
+
|
|
13
|
+
#### email
|
|
14
|
+
|
|
15
|
+
> **email**: `string`
|
|
16
|
+
|
|
17
|
+
The user email.
|
|
18
|
+
|
|
19
|
+
***
|
|
20
|
+
|
|
21
|
+
### body {#body}
|
|
22
|
+
|
|
23
|
+
> **body**: `Partial`\<`Omit`\<[`IAuthenticationUser`](IAuthenticationUser.md), `"email"`\>\>
|
|
24
|
+
|
|
25
|
+
The body of the request.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Interface: IAuditQueryRequest
|
|
2
|
+
|
|
3
|
+
Query authentication audit entries.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### query? {#query}
|
|
8
|
+
|
|
9
|
+
> `optional` **query?**: `object`
|
|
10
|
+
|
|
11
|
+
The query parameters for the request.
|
|
12
|
+
|
|
13
|
+
#### actorId?
|
|
14
|
+
|
|
15
|
+
> `optional` **actorId?**: `string`
|
|
16
|
+
|
|
17
|
+
The actor identifier to filter by.
|
|
18
|
+
|
|
19
|
+
#### organizationId?
|
|
20
|
+
|
|
21
|
+
> `optional` **organizationId?**: `string`
|
|
22
|
+
|
|
23
|
+
The organization identifier to filter by.
|
|
24
|
+
|
|
25
|
+
#### tenantId?
|
|
26
|
+
|
|
27
|
+
> `optional` **tenantId?**: `string`
|
|
28
|
+
|
|
29
|
+
The tenant identifier to filter by.
|
|
30
|
+
|
|
31
|
+
#### nodeId?
|
|
32
|
+
|
|
33
|
+
> `optional` **nodeId?**: `string`
|
|
34
|
+
|
|
35
|
+
The node identifier to filter by.
|
|
36
|
+
|
|
37
|
+
#### event?
|
|
38
|
+
|
|
39
|
+
> `optional` **event?**: `string`
|
|
40
|
+
|
|
41
|
+
The event to filter by.
|
|
42
|
+
|
|
43
|
+
#### startDate?
|
|
44
|
+
|
|
45
|
+
> `optional` **startDate?**: `string`
|
|
46
|
+
|
|
47
|
+
The inclusive start date for filtering, in ISO 8601 format.
|
|
48
|
+
|
|
49
|
+
#### endDate?
|
|
50
|
+
|
|
51
|
+
> `optional` **endDate?**: `string`
|
|
52
|
+
|
|
53
|
+
The inclusive end date for filtering, in ISO 8601 format.
|
|
54
|
+
|
|
55
|
+
#### cursor?
|
|
56
|
+
|
|
57
|
+
> `optional` **cursor?**: `string`
|
|
58
|
+
|
|
59
|
+
The pagination cursor.
|
|
60
|
+
|
|
61
|
+
#### limit?
|
|
62
|
+
|
|
63
|
+
> `optional` **limit?**: `string`
|
|
64
|
+
|
|
65
|
+
The maximum number of results to return.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Interface: IAuditQueryResponse
|
|
2
|
+
|
|
3
|
+
Response from querying authentication audit entries.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### body {#body}
|
|
8
|
+
|
|
9
|
+
> **body**: `object`
|
|
10
|
+
|
|
11
|
+
The response body.
|
|
12
|
+
|
|
13
|
+
#### entries
|
|
14
|
+
|
|
15
|
+
> **entries**: [`IAuthenticationAuditEntry`](IAuthenticationAuditEntry.md)[]
|
|
16
|
+
|
|
17
|
+
The returned audit entries.
|
|
18
|
+
|
|
19
|
+
#### cursor?
|
|
20
|
+
|
|
21
|
+
> `optional` **cursor?**: `string`
|
|
22
|
+
|
|
23
|
+
The cursor to retrieve the next page, if any.
|
|
@@ -8,51 +8,99 @@ Contract definition for authentication admin component.
|
|
|
8
8
|
|
|
9
9
|
## Methods
|
|
10
10
|
|
|
11
|
-
### create()
|
|
11
|
+
### create() {#create}
|
|
12
12
|
|
|
13
|
-
> **create**(`
|
|
13
|
+
> **create**(`user`): `Promise`\<`void`\>
|
|
14
14
|
|
|
15
15
|
Create a login for the user.
|
|
16
16
|
|
|
17
17
|
#### Parameters
|
|
18
18
|
|
|
19
|
+
##### user
|
|
20
|
+
|
|
21
|
+
[`IAuthenticationUser`](IAuthenticationUser.md) & `object`
|
|
22
|
+
|
|
23
|
+
The user to create.
|
|
24
|
+
|
|
25
|
+
#### Returns
|
|
26
|
+
|
|
27
|
+
`Promise`\<`void`\>
|
|
28
|
+
|
|
29
|
+
Nothing.
|
|
30
|
+
|
|
31
|
+
***
|
|
32
|
+
|
|
33
|
+
### update() {#update}
|
|
34
|
+
|
|
35
|
+
> **update**(`user`): `Promise`\<`void`\>
|
|
36
|
+
|
|
37
|
+
Update a login for the user.
|
|
38
|
+
|
|
39
|
+
#### Parameters
|
|
40
|
+
|
|
41
|
+
##### user
|
|
42
|
+
|
|
43
|
+
`Partial`\<[`IAuthenticationUser`](IAuthenticationUser.md)\>
|
|
44
|
+
|
|
45
|
+
The user to update.
|
|
46
|
+
|
|
47
|
+
#### Returns
|
|
48
|
+
|
|
49
|
+
`Promise`\<`void`\>
|
|
50
|
+
|
|
51
|
+
Nothing.
|
|
52
|
+
|
|
53
|
+
***
|
|
54
|
+
|
|
55
|
+
### get() {#get}
|
|
56
|
+
|
|
57
|
+
> **get**(`email`): `Promise`\<[`IAuthenticationUser`](IAuthenticationUser.md)\>
|
|
58
|
+
|
|
59
|
+
Get a user by email.
|
|
60
|
+
|
|
61
|
+
#### Parameters
|
|
62
|
+
|
|
19
63
|
##### email
|
|
20
64
|
|
|
21
65
|
`string`
|
|
22
66
|
|
|
23
|
-
The email address
|
|
67
|
+
The email address of the user to get.
|
|
24
68
|
|
|
25
|
-
|
|
69
|
+
#### Returns
|
|
26
70
|
|
|
27
|
-
`
|
|
71
|
+
`Promise`\<[`IAuthenticationUser`](IAuthenticationUser.md)\>
|
|
28
72
|
|
|
29
|
-
The
|
|
73
|
+
The user details.
|
|
30
74
|
|
|
31
|
-
|
|
75
|
+
***
|
|
32
76
|
|
|
33
|
-
|
|
77
|
+
### getByIdentity() {#getbyidentity}
|
|
34
78
|
|
|
35
|
-
|
|
79
|
+
> **getByIdentity**(`identity`): `Promise`\<[`IAuthenticationUser`](IAuthenticationUser.md)\>
|
|
36
80
|
|
|
37
|
-
|
|
81
|
+
Get a user by identity.
|
|
82
|
+
|
|
83
|
+
#### Parameters
|
|
84
|
+
|
|
85
|
+
##### identity
|
|
38
86
|
|
|
39
87
|
`string`
|
|
40
88
|
|
|
41
|
-
The
|
|
89
|
+
The identity of the user to get.
|
|
42
90
|
|
|
43
91
|
#### Returns
|
|
44
92
|
|
|
45
|
-
`Promise
|
|
93
|
+
`Promise`\<[`IAuthenticationUser`](IAuthenticationUser.md)\>
|
|
46
94
|
|
|
47
|
-
|
|
95
|
+
The user details.
|
|
48
96
|
|
|
49
97
|
***
|
|
50
98
|
|
|
51
|
-
### remove()
|
|
99
|
+
### remove() {#remove}
|
|
52
100
|
|
|
53
101
|
> **remove**(`email`): `Promise`\<`void`\>
|
|
54
102
|
|
|
55
|
-
Remove
|
|
103
|
+
Remove a user.
|
|
56
104
|
|
|
57
105
|
#### Parameters
|
|
58
106
|
|
|
@@ -70,7 +118,7 @@ Nothing.
|
|
|
70
118
|
|
|
71
119
|
***
|
|
72
120
|
|
|
73
|
-
### updatePassword()
|
|
121
|
+
### updatePassword() {#updatepassword}
|
|
74
122
|
|
|
75
123
|
> **updatePassword**(`email`, `newPassword`, `currentPassword?`): `Promise`\<`void`\>
|
|
76
124
|
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Interface: IAuthenticationAuditComponent
|
|
2
|
+
|
|
3
|
+
Contract definition for authentication audit component.
|
|
4
|
+
|
|
5
|
+
## Extends
|
|
6
|
+
|
|
7
|
+
- `IComponent`
|
|
8
|
+
|
|
9
|
+
## Methods
|
|
10
|
+
|
|
11
|
+
### create() {#create}
|
|
12
|
+
|
|
13
|
+
> **create**(`entry`): `Promise`\<`string`\>
|
|
14
|
+
|
|
15
|
+
Create a new audit entry.
|
|
16
|
+
|
|
17
|
+
#### Parameters
|
|
18
|
+
|
|
19
|
+
##### entry
|
|
20
|
+
|
|
21
|
+
`Omit`\<[`IAuthenticationAuditEntry`](IAuthenticationAuditEntry.md), `"id"` \| `"dateCreated"`\>
|
|
22
|
+
|
|
23
|
+
The audit entry to be logged.
|
|
24
|
+
|
|
25
|
+
#### Returns
|
|
26
|
+
|
|
27
|
+
`Promise`\<`string`\>
|
|
28
|
+
|
|
29
|
+
The unique identifier of the created audit entry.
|
|
30
|
+
|
|
31
|
+
***
|
|
32
|
+
|
|
33
|
+
### query() {#query}
|
|
34
|
+
|
|
35
|
+
> **query**(`options?`, `cursor?`, `limit?`): `Promise`\<\{ `entries`: [`IAuthenticationAuditEntry`](IAuthenticationAuditEntry.md)[]; `cursor?`: `string`; \}\>
|
|
36
|
+
|
|
37
|
+
Query the audit entries.
|
|
38
|
+
|
|
39
|
+
#### Parameters
|
|
40
|
+
|
|
41
|
+
##### options?
|
|
42
|
+
|
|
43
|
+
The query options.
|
|
44
|
+
|
|
45
|
+
###### actorId?
|
|
46
|
+
|
|
47
|
+
`string`
|
|
48
|
+
|
|
49
|
+
The actor identifier to filter the audit entries, optional.
|
|
50
|
+
|
|
51
|
+
###### organizationId?
|
|
52
|
+
|
|
53
|
+
`string`
|
|
54
|
+
|
|
55
|
+
The organization identifier to filter the audit entries, optional.
|
|
56
|
+
|
|
57
|
+
###### tenantId?
|
|
58
|
+
|
|
59
|
+
`string`
|
|
60
|
+
|
|
61
|
+
The tenant identifier to filter the audit entries, optional.
|
|
62
|
+
|
|
63
|
+
###### nodeId?
|
|
64
|
+
|
|
65
|
+
`string`
|
|
66
|
+
|
|
67
|
+
The node identifier to filter the audit entries, optional.
|
|
68
|
+
|
|
69
|
+
###### event?
|
|
70
|
+
|
|
71
|
+
`string`
|
|
72
|
+
|
|
73
|
+
The audit event to filter the audit entries, optional.
|
|
74
|
+
|
|
75
|
+
###### startDate?
|
|
76
|
+
|
|
77
|
+
`string`
|
|
78
|
+
|
|
79
|
+
The start date to filter the audit entries, optional.
|
|
80
|
+
|
|
81
|
+
###### endDate?
|
|
82
|
+
|
|
83
|
+
`string`
|
|
84
|
+
|
|
85
|
+
The end date to filter the audit entries, optional.
|
|
86
|
+
|
|
87
|
+
##### cursor?
|
|
88
|
+
|
|
89
|
+
`string`
|
|
90
|
+
|
|
91
|
+
The cursor for pagination.
|
|
92
|
+
|
|
93
|
+
##### limit?
|
|
94
|
+
|
|
95
|
+
`number`
|
|
96
|
+
|
|
97
|
+
The maximum number of entries to return.
|
|
98
|
+
|
|
99
|
+
#### Returns
|
|
100
|
+
|
|
101
|
+
`Promise`\<\{ `entries`: [`IAuthenticationAuditEntry`](IAuthenticationAuditEntry.md)[]; `cursor?`: `string`; \}\>
|
|
102
|
+
|
|
103
|
+
The audit entries.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Interface: IAuthenticationAuditEntry
|
|
2
|
+
|
|
3
|
+
Contract definition for authentication audit entry.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### id {#id}
|
|
8
|
+
|
|
9
|
+
> **id**: `string`
|
|
10
|
+
|
|
11
|
+
The unique identifier for the audit entry.
|
|
12
|
+
|
|
13
|
+
***
|
|
14
|
+
|
|
15
|
+
### event {#event}
|
|
16
|
+
|
|
17
|
+
> **event**: `string`
|
|
18
|
+
|
|
19
|
+
The audit event that occurred.
|
|
20
|
+
|
|
21
|
+
***
|
|
22
|
+
|
|
23
|
+
### dateCreated {#datecreated}
|
|
24
|
+
|
|
25
|
+
> **dateCreated**: `string`
|
|
26
|
+
|
|
27
|
+
The timestamp of the audit entry in ISO 8601 format.
|
|
28
|
+
|
|
29
|
+
***
|
|
30
|
+
|
|
31
|
+
### actorId? {#actorid}
|
|
32
|
+
|
|
33
|
+
> `optional` **actorId?**: `string`
|
|
34
|
+
|
|
35
|
+
The actor identifier, could be e-mail, username, or other unique identifier.
|
|
36
|
+
|
|
37
|
+
***
|
|
38
|
+
|
|
39
|
+
### nodeId? {#nodeid}
|
|
40
|
+
|
|
41
|
+
> `optional` **nodeId?**: `string`
|
|
42
|
+
|
|
43
|
+
The node identifier associated with the audit entry, if applicable.
|
|
44
|
+
|
|
45
|
+
***
|
|
46
|
+
|
|
47
|
+
### organizationId? {#organizationid}
|
|
48
|
+
|
|
49
|
+
> `optional` **organizationId?**: `string`
|
|
50
|
+
|
|
51
|
+
The organization identifier associated with the audit entry, if applicable.
|
|
52
|
+
|
|
53
|
+
***
|
|
54
|
+
|
|
55
|
+
### tenantId? {#tenantid}
|
|
56
|
+
|
|
57
|
+
> `optional` **tenantId?**: `string`
|
|
58
|
+
|
|
59
|
+
The tenant identifier associated with the audit entry, if applicable.
|
|
60
|
+
|
|
61
|
+
***
|
|
62
|
+
|
|
63
|
+
### ipAddressHashes? {#ipaddresshashes}
|
|
64
|
+
|
|
65
|
+
> `optional` **ipAddressHashes?**: `string`[]
|
|
66
|
+
|
|
67
|
+
The hashed IP addresses of the client.
|
|
68
|
+
|
|
69
|
+
***
|
|
70
|
+
|
|
71
|
+
### userAgent? {#useragent}
|
|
72
|
+
|
|
73
|
+
> `optional` **userAgent?**: `string`
|
|
74
|
+
|
|
75
|
+
The user agent string of the client.
|
|
76
|
+
|
|
77
|
+
***
|
|
78
|
+
|
|
79
|
+
### correlationId? {#correlationid}
|
|
80
|
+
|
|
81
|
+
> `optional` **correlationId?**: `string`
|
|
82
|
+
|
|
83
|
+
The correlation ID for request tracing.
|
|
84
|
+
|
|
85
|
+
***
|
|
86
|
+
|
|
87
|
+
### data? {#data}
|
|
88
|
+
|
|
89
|
+
> `optional` **data?**: `unknown`
|
|
90
|
+
|
|
91
|
+
Additional data related to the audit entry, such as IP address, user agent, etc.
|
|
@@ -8,7 +8,7 @@ Contract definition for authentication component.
|
|
|
8
8
|
|
|
9
9
|
## Methods
|
|
10
10
|
|
|
11
|
-
### login()
|
|
11
|
+
### login() {#login}
|
|
12
12
|
|
|
13
13
|
> **login**(`email`, `password`): `Promise`\<\{ `token?`: `string`; `expiry`: `number`; \}\>
|
|
14
14
|
|
|
@@ -36,7 +36,7 @@ The authentication token for the user, if it uses a mechanism with public access
|
|
|
36
36
|
|
|
37
37
|
***
|
|
38
38
|
|
|
39
|
-
### logout()
|
|
39
|
+
### logout() {#logout}
|
|
40
40
|
|
|
41
41
|
> **logout**(`token?`): `Promise`\<`void`\>
|
|
42
42
|
|
|
@@ -58,7 +58,7 @@ Nothing.
|
|
|
58
58
|
|
|
59
59
|
***
|
|
60
60
|
|
|
61
|
-
### refresh()
|
|
61
|
+
### refresh() {#refresh}
|
|
62
62
|
|
|
63
63
|
> **refresh**(`token?`): `Promise`\<\{ `token?`: `string`; `expiry`: `number`; \}\>
|
|
64
64
|
|
|
@@ -80,20 +80,14 @@ The refreshed token, if it uses a mechanism with public access.
|
|
|
80
80
|
|
|
81
81
|
***
|
|
82
82
|
|
|
83
|
-
### updatePassword()
|
|
83
|
+
### updatePassword() {#updatepassword}
|
|
84
84
|
|
|
85
|
-
> **updatePassword**(`
|
|
85
|
+
> **updatePassword**(`currentPassword`, `newPassword`): `Promise`\<`void`\>
|
|
86
86
|
|
|
87
87
|
Update the user's password.
|
|
88
88
|
|
|
89
89
|
#### Parameters
|
|
90
90
|
|
|
91
|
-
##### email
|
|
92
|
-
|
|
93
|
-
`string`
|
|
94
|
-
|
|
95
|
-
The email address of the user to update.
|
|
96
|
-
|
|
97
91
|
##### currentPassword
|
|
98
92
|
|
|
99
93
|
`string`
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Interface: IAuthenticationRateActionConfig
|
|
2
|
+
|
|
3
|
+
Configuration for an authentication rate limited action.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### maxAttempts {#maxattempts}
|
|
8
|
+
|
|
9
|
+
> **maxAttempts**: `number`
|
|
10
|
+
|
|
11
|
+
Maximum number of failed attempts allowed per window.
|
|
12
|
+
|
|
13
|
+
***
|
|
14
|
+
|
|
15
|
+
### windowMinutes {#windowminutes}
|
|
16
|
+
|
|
17
|
+
> **windowMinutes**: `number`
|
|
18
|
+
|
|
19
|
+
Rate limit window duration in minutes.
|