@3sixty/api-auth-models 0.0.0-stage → 0.20.0-next.1
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/LICENSE +201 -0
- package/README.md +24 -2
- package/dist/es/index.js +15 -0
- package/dist/es/index.js.map +1 -0
- 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/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/api/IAuditCreateRequest.js +2 -0
- package/dist/es/models/api/IAuditCreateRequest.js.map +1 -0
- package/dist/es/models/api/IAuditGetRequest.js +4 -0
- package/dist/es/models/api/IAuditGetRequest.js.map +1 -0
- package/dist/es/models/api/IAuditGetResponse.js +2 -0
- package/dist/es/models/api/IAuditGetResponse.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/IAuditRemoveRequest.js +4 -0
- package/dist/es/models/api/IAuditRemoveRequest.js.map +1 -0
- package/dist/es/models/api/IAuditUpdateRequest.js +2 -0
- package/dist/es/models/api/IAuditUpdateRequest.js.map +1 -0
- package/dist/es/models/authAuditEvent.js +49 -0
- package/dist/es/models/authAuditEvent.js.map +1 -0
- package/dist/types/index.d.ts +12 -0
- package/dist/types/models/IAuthenticationAuditComponent.d.ts +59 -0
- package/dist/types/models/IAuthenticationAuditEntry.d.ts +50 -0
- package/dist/types/models/IAuthenticationRateActionConfig.d.ts +13 -0
- package/dist/types/models/IAuthenticationRateComponent.d.ts +46 -0
- package/dist/types/models/api/IAuditCreateRequest.d.ts +10 -0
- package/dist/types/models/api/IAuditGetRequest.d.ts +14 -0
- package/dist/types/models/api/IAuditGetResponse.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/IAuditRemoveRequest.d.ts +14 -0
- package/dist/types/models/api/IAuditUpdateRequest.d.ts +19 -0
- package/dist/types/models/authAuditEvent.d.ts +49 -0
- package/docs/changelog.md +10 -0
- package/docs/examples.md +60 -0
- package/docs/reference/index.md +23 -0
- package/docs/reference/interfaces/IAuditCreateRequest.md +11 -0
- package/docs/reference/interfaces/IAuditGetRequest.md +17 -0
- package/docs/reference/interfaces/IAuditGetResponse.md +11 -0
- package/docs/reference/interfaces/IAuditQueryRequest.md +65 -0
- package/docs/reference/interfaces/IAuditQueryResponse.md +23 -0
- package/docs/reference/interfaces/IAuditRemoveRequest.md +17 -0
- package/docs/reference/interfaces/IAuditUpdateRequest.md +25 -0
- package/docs/reference/interfaces/IAuthenticationAuditComponent.md +175 -0
- package/docs/reference/interfaces/IAuthenticationAuditEntry.md +91 -0
- package/docs/reference/interfaces/IAuthenticationRateActionConfig.md +19 -0
- package/docs/reference/interfaces/IAuthenticationRateComponent.md +165 -0
- package/docs/reference/type-aliases/AuthAuditEvent.md +5 -0
- package/docs/reference/variables/AuthAuditEvent.md +67 -0
- package/locales/en.json +1 -0
- package/package.json +52 -5
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IAuthenticationAuditEntry } from "../IAuthenticationAuditEntry.js";
|
|
2
|
+
/**
|
|
3
|
+
* Response from getting an authentication audit entry.
|
|
4
|
+
*/
|
|
5
|
+
export interface IAuditGetResponse {
|
|
6
|
+
/**
|
|
7
|
+
* The response body.
|
|
8
|
+
*/
|
|
9
|
+
body: IAuthenticationAuditEntry;
|
|
10
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { AuthAuditEvent } from "../authAuditEvent.js";
|
|
2
|
+
/**
|
|
3
|
+
* Query authentication audit entries.
|
|
4
|
+
*/
|
|
5
|
+
export interface IAuditQueryRequest {
|
|
6
|
+
/**
|
|
7
|
+
* The query parameters for the request.
|
|
8
|
+
*/
|
|
9
|
+
query?: {
|
|
10
|
+
/**
|
|
11
|
+
* The actor identifier to filter by.
|
|
12
|
+
*/
|
|
13
|
+
actorId?: string;
|
|
14
|
+
/**
|
|
15
|
+
* The organisation identifier to filter by.
|
|
16
|
+
*/
|
|
17
|
+
organizationId?: string;
|
|
18
|
+
/**
|
|
19
|
+
* The tenant identifier to filter by.
|
|
20
|
+
*/
|
|
21
|
+
tenantId?: string;
|
|
22
|
+
/**
|
|
23
|
+
* The node identifier to filter by.
|
|
24
|
+
*/
|
|
25
|
+
nodeId?: string;
|
|
26
|
+
/**
|
|
27
|
+
* The event to filter by.
|
|
28
|
+
*/
|
|
29
|
+
event?: AuthAuditEvent | string;
|
|
30
|
+
/**
|
|
31
|
+
* The inclusive start date for filtering, in ISO 8601 format.
|
|
32
|
+
*/
|
|
33
|
+
startDate?: string;
|
|
34
|
+
/**
|
|
35
|
+
* The inclusive end date for filtering, in ISO 8601 format.
|
|
36
|
+
*/
|
|
37
|
+
endDate?: string;
|
|
38
|
+
/**
|
|
39
|
+
* The pagination cursor.
|
|
40
|
+
*/
|
|
41
|
+
cursor?: string;
|
|
42
|
+
/**
|
|
43
|
+
* The maximum number of results to return.
|
|
44
|
+
*/
|
|
45
|
+
limit?: string;
|
|
46
|
+
};
|
|
47
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { IAuthenticationAuditEntry } from "../IAuthenticationAuditEntry.js";
|
|
2
|
+
/**
|
|
3
|
+
* Response from querying authentication audit entries.
|
|
4
|
+
*/
|
|
5
|
+
export interface IAuditQueryResponse {
|
|
6
|
+
/**
|
|
7
|
+
* The response body.
|
|
8
|
+
*/
|
|
9
|
+
body: {
|
|
10
|
+
/**
|
|
11
|
+
* The returned audit entries.
|
|
12
|
+
*/
|
|
13
|
+
entries: IAuthenticationAuditEntry[];
|
|
14
|
+
/**
|
|
15
|
+
* The cursor to retrieve the next page, if any.
|
|
16
|
+
*/
|
|
17
|
+
cursor?: string;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { IAuthenticationAuditEntry } from "../IAuthenticationAuditEntry.js";
|
|
2
|
+
/**
|
|
3
|
+
* Update an authentication audit entry.
|
|
4
|
+
*/
|
|
5
|
+
export interface IAuditUpdateRequest {
|
|
6
|
+
/**
|
|
7
|
+
* The path parameters for the request.
|
|
8
|
+
*/
|
|
9
|
+
pathParams: {
|
|
10
|
+
/**
|
|
11
|
+
* The audit entry id.
|
|
12
|
+
*/
|
|
13
|
+
id: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* The body of the request.
|
|
17
|
+
*/
|
|
18
|
+
body: Partial<Omit<IAuthenticationAuditEntry, "id" | "dateCreated">>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Supported authentication audit events.
|
|
3
|
+
*/
|
|
4
|
+
export declare const AuthAuditEvent: {
|
|
5
|
+
/**
|
|
6
|
+
* Login success.
|
|
7
|
+
*/
|
|
8
|
+
readonly LoginSuccess: "login-success";
|
|
9
|
+
/**
|
|
10
|
+
* Login failure.
|
|
11
|
+
*/
|
|
12
|
+
readonly LoginFailure: "login-failure";
|
|
13
|
+
/**
|
|
14
|
+
* Logout.
|
|
15
|
+
*/
|
|
16
|
+
readonly Logout: "logout";
|
|
17
|
+
/**
|
|
18
|
+
* Token refreshed.
|
|
19
|
+
*/
|
|
20
|
+
readonly TokenRefreshed: "token-refreshed";
|
|
21
|
+
/**
|
|
22
|
+
* Account created.
|
|
23
|
+
*/
|
|
24
|
+
readonly AccountCreated: "account-created";
|
|
25
|
+
/**
|
|
26
|
+
* Account deleted.
|
|
27
|
+
*/
|
|
28
|
+
readonly AccountDeleted: "account-deleted";
|
|
29
|
+
/**
|
|
30
|
+
* Account updated.
|
|
31
|
+
*/
|
|
32
|
+
readonly AccountUpdated: "account-updated";
|
|
33
|
+
/**
|
|
34
|
+
* Account locked.
|
|
35
|
+
*/
|
|
36
|
+
readonly AccountLocked: "account-locked";
|
|
37
|
+
/**
|
|
38
|
+
* Account unlocked.
|
|
39
|
+
*/
|
|
40
|
+
readonly AccountUnlocked: "account-unlocked";
|
|
41
|
+
/**
|
|
42
|
+
* Password changed.
|
|
43
|
+
*/
|
|
44
|
+
readonly PasswordChanged: "password-changed";
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Supported authentication audit event values.
|
|
48
|
+
*/
|
|
49
|
+
export type AuthAuditEvent = (typeof AuthAuditEvent)[keyof typeof AuthAuditEvent];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.20.0-next.1](https://github.com/3sixtyglobal/api-auth/compare/api-auth-models-v0.20.0-next.0...api-auth-models-v0.20.0-next.1) (2026-10-23)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* authorization ([#3](https://github.com/3sixtyglobal/api-auth/issues/3)) ([5688693](https://github.com/3sixtyglobal/api-auth/commit/568869364065b9d2c82c5c17c81f07cbdc64ec8b))
|
|
9
|
+
|
|
10
|
+
## Changelog
|
package/docs/examples.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Auth Models Examples
|
|
2
|
+
|
|
3
|
+
Use these snippets to shape authentication audit entries, audit queries and rate limit configuration consistently across services and clients.
|
|
4
|
+
|
|
5
|
+
## Audit Entries
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import { AuthAuditEvent, type IAuthenticationAuditEntry } from '@3sixty/api-auth-models';
|
|
9
|
+
|
|
10
|
+
const entry: IAuthenticationAuditEntry = {
|
|
11
|
+
id: '018f2f67bb9d4a0caad8386f56df85ce',
|
|
12
|
+
event: AuthAuditEvent.LoginFailure,
|
|
13
|
+
dateCreated: '2026-04-13T10:00:00.000Z',
|
|
14
|
+
actorId: 'did:example:user:alice',
|
|
15
|
+
tenantId: 'did:example:tenant:alpha',
|
|
16
|
+
data: {
|
|
17
|
+
reason: 'invalid-password'
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
console.log(entry.event); // login-failure
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Audit Requests
|
|
25
|
+
|
|
26
|
+
```typescript
|
|
27
|
+
import type { IAuditCreateRequest, IAuditQueryRequest } from '@3sixty/api-auth-models';
|
|
28
|
+
|
|
29
|
+
const createRequest: IAuditCreateRequest = {
|
|
30
|
+
body: {
|
|
31
|
+
event: 'account-locked',
|
|
32
|
+
actorId: 'did:example:user:alice'
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const queryRequest: IAuditQueryRequest = {
|
|
37
|
+
query: {
|
|
38
|
+
actorId: 'did:example:user:alice',
|
|
39
|
+
startDate: '2026-04-01T00:00:00.000Z',
|
|
40
|
+
endDate: '2026-04-30T23:59:59.999Z',
|
|
41
|
+
limit: '25'
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
console.log(createRequest.body.event); // account-locked
|
|
46
|
+
console.log(queryRequest.query?.limit); // 25
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Rate Limit Configuration
|
|
50
|
+
|
|
51
|
+
```typescript
|
|
52
|
+
import type { IAuthenticationRateActionConfig } from '@3sixty/api-auth-models';
|
|
53
|
+
|
|
54
|
+
const loginLimit: IAuthenticationRateActionConfig = {
|
|
55
|
+
maxAttempts: 5,
|
|
56
|
+
windowMinutes: 15
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
console.log(loginLimit.maxAttempts); // 5
|
|
60
|
+
```
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# @3sixty/api-auth-models
|
|
2
|
+
|
|
3
|
+
## Interfaces
|
|
4
|
+
|
|
5
|
+
- [IAuthenticationAuditComponent](interfaces/IAuthenticationAuditComponent.md)
|
|
6
|
+
- [IAuthenticationAuditEntry](interfaces/IAuthenticationAuditEntry.md)
|
|
7
|
+
- [IAuthenticationRateActionConfig](interfaces/IAuthenticationRateActionConfig.md)
|
|
8
|
+
- [IAuthenticationRateComponent](interfaces/IAuthenticationRateComponent.md)
|
|
9
|
+
- [IAuditCreateRequest](interfaces/IAuditCreateRequest.md)
|
|
10
|
+
- [IAuditGetRequest](interfaces/IAuditGetRequest.md)
|
|
11
|
+
- [IAuditGetResponse](interfaces/IAuditGetResponse.md)
|
|
12
|
+
- [IAuditQueryRequest](interfaces/IAuditQueryRequest.md)
|
|
13
|
+
- [IAuditQueryResponse](interfaces/IAuditQueryResponse.md)
|
|
14
|
+
- [IAuditRemoveRequest](interfaces/IAuditRemoveRequest.md)
|
|
15
|
+
- [IAuditUpdateRequest](interfaces/IAuditUpdateRequest.md)
|
|
16
|
+
|
|
17
|
+
## Type Aliases
|
|
18
|
+
|
|
19
|
+
- [AuthAuditEvent](type-aliases/AuthAuditEvent.md)
|
|
20
|
+
|
|
21
|
+
## Variables
|
|
22
|
+
|
|
23
|
+
- [AuthAuditEvent](variables/AuthAuditEvent.md)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Interface: IAuditGetRequest
|
|
2
|
+
|
|
3
|
+
Get an authentication audit entry by id.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### pathParams {#pathparams}
|
|
8
|
+
|
|
9
|
+
> **pathParams**: `object`
|
|
10
|
+
|
|
11
|
+
The path parameters for the request.
|
|
12
|
+
|
|
13
|
+
#### id
|
|
14
|
+
|
|
15
|
+
> **id**: `string`
|
|
16
|
+
|
|
17
|
+
The audit entry id.
|
|
@@ -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 organisation 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.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Interface: IAuditRemoveRequest
|
|
2
|
+
|
|
3
|
+
Remove an authentication audit entry.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### pathParams {#pathparams}
|
|
8
|
+
|
|
9
|
+
> **pathParams**: `object`
|
|
10
|
+
|
|
11
|
+
The path parameters for the request.
|
|
12
|
+
|
|
13
|
+
#### id
|
|
14
|
+
|
|
15
|
+
> **id**: `string`
|
|
16
|
+
|
|
17
|
+
The audit entry id.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Interface: IAuditUpdateRequest
|
|
2
|
+
|
|
3
|
+
Update an authentication audit entry.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### pathParams {#pathparams}
|
|
8
|
+
|
|
9
|
+
> **pathParams**: `object`
|
|
10
|
+
|
|
11
|
+
The path parameters for the request.
|
|
12
|
+
|
|
13
|
+
#### id
|
|
14
|
+
|
|
15
|
+
> **id**: `string`
|
|
16
|
+
|
|
17
|
+
The audit entry id.
|
|
18
|
+
|
|
19
|
+
***
|
|
20
|
+
|
|
21
|
+
### body {#body}
|
|
22
|
+
|
|
23
|
+
> **body**: `Partial`\<`Omit`\<[`IAuthenticationAuditEntry`](IAuthenticationAuditEntry.md), `"id"` \| `"dateCreated"`\>\>
|
|
24
|
+
|
|
25
|
+
The body of the request.
|
|
@@ -0,0 +1,175 @@
|
|
|
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
|
+
### get() {#get}
|
|
34
|
+
|
|
35
|
+
> **get**(`id`): `Promise`\<[`IAuthenticationAuditEntry`](IAuthenticationAuditEntry.md)\>
|
|
36
|
+
|
|
37
|
+
Get an audit entry by id.
|
|
38
|
+
|
|
39
|
+
#### Parameters
|
|
40
|
+
|
|
41
|
+
##### id
|
|
42
|
+
|
|
43
|
+
`string`
|
|
44
|
+
|
|
45
|
+
The unique identifier of the audit entry.
|
|
46
|
+
|
|
47
|
+
#### Returns
|
|
48
|
+
|
|
49
|
+
`Promise`\<[`IAuthenticationAuditEntry`](IAuthenticationAuditEntry.md)\>
|
|
50
|
+
|
|
51
|
+
The audit entry.
|
|
52
|
+
|
|
53
|
+
***
|
|
54
|
+
|
|
55
|
+
### update() {#update}
|
|
56
|
+
|
|
57
|
+
> **update**(`id`, `entry`): `Promise`\<`void`\>
|
|
58
|
+
|
|
59
|
+
Update an audit entry.
|
|
60
|
+
|
|
61
|
+
#### Parameters
|
|
62
|
+
|
|
63
|
+
##### id
|
|
64
|
+
|
|
65
|
+
`string`
|
|
66
|
+
|
|
67
|
+
The unique identifier of the audit entry to update.
|
|
68
|
+
|
|
69
|
+
##### entry
|
|
70
|
+
|
|
71
|
+
`Partial`\<`Omit`\<[`IAuthenticationAuditEntry`](IAuthenticationAuditEntry.md), `"id"` \| `"dateCreated"`\>\>
|
|
72
|
+
|
|
73
|
+
The fields to update on the audit entry.
|
|
74
|
+
|
|
75
|
+
#### Returns
|
|
76
|
+
|
|
77
|
+
`Promise`\<`void`\>
|
|
78
|
+
|
|
79
|
+
A promise that resolves when the audit entry has been updated.
|
|
80
|
+
|
|
81
|
+
***
|
|
82
|
+
|
|
83
|
+
### remove() {#remove}
|
|
84
|
+
|
|
85
|
+
> **remove**(`id`): `Promise`\<`void`\>
|
|
86
|
+
|
|
87
|
+
Remove an audit entry.
|
|
88
|
+
|
|
89
|
+
#### Parameters
|
|
90
|
+
|
|
91
|
+
##### id
|
|
92
|
+
|
|
93
|
+
`string`
|
|
94
|
+
|
|
95
|
+
The unique identifier of the audit entry to remove.
|
|
96
|
+
|
|
97
|
+
#### Returns
|
|
98
|
+
|
|
99
|
+
`Promise`\<`void`\>
|
|
100
|
+
|
|
101
|
+
A promise that resolves when the audit entry has been removed.
|
|
102
|
+
|
|
103
|
+
***
|
|
104
|
+
|
|
105
|
+
### query() {#query}
|
|
106
|
+
|
|
107
|
+
> **query**(`options?`, `cursor?`, `limit?`): `Promise`\<\{ `entries`: [`IAuthenticationAuditEntry`](IAuthenticationAuditEntry.md)[]; `cursor?`: `string`; \}\>
|
|
108
|
+
|
|
109
|
+
Query the audit entries.
|
|
110
|
+
|
|
111
|
+
#### Parameters
|
|
112
|
+
|
|
113
|
+
##### options?
|
|
114
|
+
|
|
115
|
+
The query options.
|
|
116
|
+
|
|
117
|
+
###### actorId?
|
|
118
|
+
|
|
119
|
+
`string`
|
|
120
|
+
|
|
121
|
+
The actor identifier to filter the audit entries, optional.
|
|
122
|
+
|
|
123
|
+
###### organizationId?
|
|
124
|
+
|
|
125
|
+
`string`
|
|
126
|
+
|
|
127
|
+
The organisation identifier to filter the audit entries, optional.
|
|
128
|
+
|
|
129
|
+
###### tenantId?
|
|
130
|
+
|
|
131
|
+
`string`
|
|
132
|
+
|
|
133
|
+
The tenant identifier to filter the audit entries, optional.
|
|
134
|
+
|
|
135
|
+
###### nodeId?
|
|
136
|
+
|
|
137
|
+
`string`
|
|
138
|
+
|
|
139
|
+
The node identifier to filter the audit entries, optional.
|
|
140
|
+
|
|
141
|
+
###### event?
|
|
142
|
+
|
|
143
|
+
`string`
|
|
144
|
+
|
|
145
|
+
The audit event to filter the audit entries, optional.
|
|
146
|
+
|
|
147
|
+
###### startDate?
|
|
148
|
+
|
|
149
|
+
`string`
|
|
150
|
+
|
|
151
|
+
The start date to filter the audit entries, optional.
|
|
152
|
+
|
|
153
|
+
###### endDate?
|
|
154
|
+
|
|
155
|
+
`string`
|
|
156
|
+
|
|
157
|
+
The end date to filter the audit entries, optional.
|
|
158
|
+
|
|
159
|
+
##### cursor?
|
|
160
|
+
|
|
161
|
+
`string`
|
|
162
|
+
|
|
163
|
+
The cursor for pagination.
|
|
164
|
+
|
|
165
|
+
##### limit?
|
|
166
|
+
|
|
167
|
+
`number`
|
|
168
|
+
|
|
169
|
+
The maximum number of entries to return.
|
|
170
|
+
|
|
171
|
+
#### Returns
|
|
172
|
+
|
|
173
|
+
`Promise`\<\{ `entries`: [`IAuthenticationAuditEntry`](IAuthenticationAuditEntry.md)[]; `cursor?`: `string`; \}\>
|
|
174
|
+
|
|
175
|
+
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.
|