@twin.org/api-auth-entity-storage-service 0.9.1-next.2 → 0.9.1-next.4

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.
@@ -80,6 +80,90 @@ The unique identifier of the created audit entry.
80
80
 
81
81
  ***
82
82
 
83
+ ### get() {#get}
84
+
85
+ > **get**(`id`): `Promise`\<`IAuthenticationAuditEntry`\>
86
+
87
+ Get an audit entry by id.
88
+
89
+ #### Parameters
90
+
91
+ ##### id
92
+
93
+ `string`
94
+
95
+ The unique identifier of the audit entry.
96
+
97
+ #### Returns
98
+
99
+ `Promise`\<`IAuthenticationAuditEntry`\>
100
+
101
+ The audit entry.
102
+
103
+ #### Implementation of
104
+
105
+ `IAuthenticationAuditComponent.get`
106
+
107
+ ***
108
+
109
+ ### update() {#update}
110
+
111
+ > **update**(`id`, `entry`): `Promise`\<`void`\>
112
+
113
+ Update an audit entry.
114
+
115
+ #### Parameters
116
+
117
+ ##### id
118
+
119
+ `string`
120
+
121
+ The unique identifier of the audit entry to update.
122
+
123
+ ##### entry
124
+
125
+ `Partial`\<`Omit`\<`IAuthenticationAuditEntry`, `"id"` \| `"dateCreated"`\>\>
126
+
127
+ The fields to update on the audit entry.
128
+
129
+ #### Returns
130
+
131
+ `Promise`\<`void`\>
132
+
133
+ A promise that resolves when the audit entry has been updated.
134
+
135
+ #### Implementation of
136
+
137
+ `IAuthenticationAuditComponent.update`
138
+
139
+ ***
140
+
141
+ ### remove() {#remove}
142
+
143
+ > **remove**(`id`): `Promise`\<`void`\>
144
+
145
+ Remove an audit entry.
146
+
147
+ #### Parameters
148
+
149
+ ##### id
150
+
151
+ `string`
152
+
153
+ The unique identifier of the audit entry to remove.
154
+
155
+ #### Returns
156
+
157
+ `Promise`\<`void`\>
158
+
159
+ A promise that resolves when the audit entry has been removed.
160
+
161
+ #### Implementation of
162
+
163
+ `IAuthenticationAuditComponent.remove`
164
+
165
+ ***
166
+
83
167
  ### query() {#query}
84
168
 
85
169
  > **query**(`options?`, `cursor?`, `limit?`): `Promise`\<\{ `entries`: `IAuthenticationAuditEntry`[]; `cursor?`: `string`; \}\>
@@ -1,6 +1,6 @@
1
1
  # Function: authenticationAdminCreateUser()
2
2
 
3
- > **authenticationAdminCreateUser**(`httpRequestContext`, `componentName`, `request`): `Promise`\<`ICreatedResponse`\>
3
+ > **authenticationAdminCreateUser**(`httpRequestContext`, `componentName`, `request`, `baseRouteName`): `Promise`\<`ICreatedResponse`\>
4
4
 
5
5
  Create a new user.
6
6
 
@@ -24,6 +24,12 @@ The name of the component to use in the routes.
24
24
 
25
25
  The request.
26
26
 
27
+ ### baseRouteName
28
+
29
+ `string`
30
+
31
+ The base route name to use for the location header.
32
+
27
33
  ## Returns
28
34
 
29
35
  `Promise`\<`ICreatedResponse`\>
@@ -1,6 +1,6 @@
1
1
  # Function: authenticationAuditCreate()
2
2
 
3
- > **authenticationAuditCreate**(`httpRequestContext`, `componentName`, `request`): `Promise`\<`ICreatedResponse`\>
3
+ > **authenticationAuditCreate**(`httpRequestContext`, `componentName`, `request`, `baseRouteName`): `Promise`\<`ICreatedResponse`\>
4
4
 
5
5
  Create an authentication audit entry.
6
6
 
@@ -24,6 +24,12 @@ The name of the component to use in the routes.
24
24
 
25
25
  The request.
26
26
 
27
+ ### baseRouteName
28
+
29
+ `string`
30
+
31
+ The base route name to use for the location header.
32
+
27
33
  ## Returns
28
34
 
29
35
  `Promise`\<`ICreatedResponse`\>
@@ -0,0 +1,31 @@
1
+ # Function: authenticationAuditGet()
2
+
3
+ > **authenticationAuditGet**(`httpRequestContext`, `componentName`, `request`): `Promise`\<`IAuditGetResponse`\>
4
+
5
+ Get an authentication audit entry.
6
+
7
+ ## Parameters
8
+
9
+ ### httpRequestContext
10
+
11
+ `IHttpRequestContext`
12
+
13
+ The request context for the API.
14
+
15
+ ### componentName
16
+
17
+ `string`
18
+
19
+ The name of the component to use in the routes.
20
+
21
+ ### request
22
+
23
+ `IAuditGetRequest`
24
+
25
+ The request.
26
+
27
+ ## Returns
28
+
29
+ `Promise`\<`IAuditGetResponse`\>
30
+
31
+ The response object with additional http response properties.
@@ -0,0 +1,31 @@
1
+ # Function: authenticationAuditRemove()
2
+
3
+ > **authenticationAuditRemove**(`httpRequestContext`, `componentName`, `request`): `Promise`\<`INoContentResponse`\>
4
+
5
+ Remove an authentication audit entry.
6
+
7
+ ## Parameters
8
+
9
+ ### httpRequestContext
10
+
11
+ `IHttpRequestContext`
12
+
13
+ The request context for the API.
14
+
15
+ ### componentName
16
+
17
+ `string`
18
+
19
+ The name of the component to use in the routes.
20
+
21
+ ### request
22
+
23
+ `IAuditRemoveRequest`
24
+
25
+ The request.
26
+
27
+ ## Returns
28
+
29
+ `Promise`\<`INoContentResponse`\>
30
+
31
+ The response object with additional http response properties.
@@ -0,0 +1,31 @@
1
+ # Function: authenticationAuditUpdate()
2
+
3
+ > **authenticationAuditUpdate**(`httpRequestContext`, `componentName`, `request`): `Promise`\<`INoContentResponse`\>
4
+
5
+ Update an authentication audit entry.
6
+
7
+ ## Parameters
8
+
9
+ ### httpRequestContext
10
+
11
+ `IHttpRequestContext`
12
+
13
+ The request context for the API.
14
+
15
+ ### componentName
16
+
17
+ `string`
18
+
19
+ The name of the component to use in the routes.
20
+
21
+ ### request
22
+
23
+ `IAuditUpdateRequest`
24
+
25
+ The request.
26
+
27
+ ## Returns
28
+
29
+ `Promise`\<`INoContentResponse`\>
30
+
31
+ The response object with additional http response properties.
@@ -44,6 +44,9 @@
44
44
  - [authenticationAdminRemoveUser](functions/authenticationAdminRemoveUser.md)
45
45
  - [generateRestRoutesAuthenticationAudit](functions/generateRestRoutesAuthenticationAudit.md)
46
46
  - [authenticationAuditCreate](functions/authenticationAuditCreate.md)
47
+ - [authenticationAuditGet](functions/authenticationAuditGet.md)
48
+ - [authenticationAuditUpdate](functions/authenticationAuditUpdate.md)
49
+ - [authenticationAuditRemove](functions/authenticationAuditRemove.md)
47
50
  - [authenticationAuditQuery](functions/authenticationAuditQuery.md)
48
51
  - [generateRestRoutesAuthentication](functions/generateRestRoutesAuthentication.md)
49
52
  - [authenticationLogin](functions/authenticationLogin.md)
package/locales/en.json CHANGED
@@ -21,6 +21,12 @@
21
21
  "passwordHelper": {
22
22
  "currentPasswordMismatch": "The current password is incorrect"
23
23
  },
24
+ "entityStorageAuthenticationAuditService": {
25
+ "auditEntryNotFound": "The audit entry with the specified identifier could not be found \"{notFoundId}\"",
26
+ "getAuditEntryFailed": "Getting the audit entry failed",
27
+ "updateAuditEntryFailed": "Updating the audit entry failed",
28
+ "removeAuditEntryFailed": "Removing the audit entry failed"
29
+ },
24
30
  "entityStorageAuthenticationRateService": {
25
31
  "actionConfigMissing": "No rate-limit configuration exists for action \"{action}\".",
26
32
  "rateLimitExceeded": "The rate limit for action \"{action}\" has been exceeded. Retry after {retryAfterSeconds} seconds."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/api-auth-entity-storage-service",
3
- "version": "0.9.1-next.2",
3
+ "version": "0.9.1-next.4",
4
4
  "description": "Authentication service implementation and REST routes backed by entity storage.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -14,9 +14,9 @@
14
14
  "node": ">=20.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@twin.org/api-auth-entity-storage-models": "0.9.1-next.2",
18
- "@twin.org/api-core": "0.9.1-next.2",
19
- "@twin.org/api-models": "0.9.1-next.2",
17
+ "@twin.org/api-auth-entity-storage-models": "0.9.1-next.4",
18
+ "@twin.org/api-core": "0.9.1-next.4",
19
+ "@twin.org/api-models": "0.9.1-next.4",
20
20
  "@twin.org/background-task-models": "next",
21
21
  "@twin.org/context": "next",
22
22
  "@twin.org/core": "next",