@twin.org/identity-service 0.9.1 → 0.9.2-next.10
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/identityProfileRoutes.js +278 -1
- package/dist/es/identityProfileRoutes.js.map +1 -1
- package/dist/es/identityProfileService.js +25 -1
- package/dist/es/identityProfileService.js.map +1 -1
- package/dist/es/identityRoutes.js +2 -2
- package/dist/es/identityRoutes.js.map +1 -1
- package/dist/es/identityService.js +333 -171
- package/dist/es/identityService.js.map +1 -1
- package/dist/es/models/IIdentityServiceConstructorOptions.js.map +1 -1
- package/dist/types/identityProfileRoutes.d.ts +33 -1
- package/dist/types/identityProfileService.d.ts +29 -0
- package/dist/types/identityService.d.ts +29 -3
- package/dist/types/models/IIdentityServiceConstructorOptions.d.ts +9 -0
- package/docs/changelog.md +283 -0
- package/docs/open-api/spec.json +831 -132
- package/docs/reference/classes/IdentityProfileService.md +56 -0
- package/docs/reference/classes/IdentityService.md +90 -2
- package/docs/reference/functions/identitiesAdminList.md +31 -0
- package/docs/reference/functions/identityProfileAdminGet.md +31 -0
- package/docs/reference/functions/identityProfileAdminRemove.md +31 -0
- package/docs/reference/functions/identityProfileAdminUpdate.md +31 -0
- package/docs/reference/index.md +4 -0
- package/docs/reference/interfaces/IIdentityServiceConstructorOptions.md +22 -0
- package/locales/en.json +9 -1
- package/package.json +16 -14
|
@@ -277,3 +277,59 @@ The list of items and cursor for paging.
|
|
|
277
277
|
#### Implementation of
|
|
278
278
|
|
|
279
279
|
`IIdentityProfileComponent.list`
|
|
280
|
+
|
|
281
|
+
***
|
|
282
|
+
|
|
283
|
+
### listAdmin() {#listadmin}
|
|
284
|
+
|
|
285
|
+
> **listAdmin**(`publicFilters?`, `privateFilters?`, `publicPropertyNames?`, `privatePropertyNames?`, `cursor?`, `limit?`): `Promise`\<\{ `items`: `object`[]; `cursor?`: `string`; \}\>
|
|
286
|
+
|
|
287
|
+
Get a list of identities including private profile data.
|
|
288
|
+
|
|
289
|
+
#### Parameters
|
|
290
|
+
|
|
291
|
+
##### publicFilters?
|
|
292
|
+
|
|
293
|
+
`object`[]
|
|
294
|
+
|
|
295
|
+
The filters to apply to the identities public profiles.
|
|
296
|
+
|
|
297
|
+
##### privateFilters?
|
|
298
|
+
|
|
299
|
+
`object`[]
|
|
300
|
+
|
|
301
|
+
The filters to apply to the identities private profiles.
|
|
302
|
+
|
|
303
|
+
##### publicPropertyNames?
|
|
304
|
+
|
|
305
|
+
keyof `T`[]
|
|
306
|
+
|
|
307
|
+
The public properties to get for the profile, defaults to all.
|
|
308
|
+
|
|
309
|
+
##### privatePropertyNames?
|
|
310
|
+
|
|
311
|
+
keyof `U`[]
|
|
312
|
+
|
|
313
|
+
The private properties to get for the profile, defaults to none.
|
|
314
|
+
|
|
315
|
+
##### cursor?
|
|
316
|
+
|
|
317
|
+
`string`
|
|
318
|
+
|
|
319
|
+
The cursor for paged requests.
|
|
320
|
+
|
|
321
|
+
##### limit?
|
|
322
|
+
|
|
323
|
+
`number`
|
|
324
|
+
|
|
325
|
+
The maximum number of items in a page.
|
|
326
|
+
|
|
327
|
+
#### Returns
|
|
328
|
+
|
|
329
|
+
`Promise`\<\{ `items`: `object`[]; `cursor?`: `string`; \}\>
|
|
330
|
+
|
|
331
|
+
The list of items and cursor for paging.
|
|
332
|
+
|
|
333
|
+
#### Implementation of
|
|
334
|
+
|
|
335
|
+
`IIdentityProfileComponent.listAdmin`
|
|
@@ -5,6 +5,7 @@ Class which implements the identity contract.
|
|
|
5
5
|
## Implements
|
|
6
6
|
|
|
7
7
|
- `IIdentityComponent`
|
|
8
|
+
- `IHealthProviderComponent`
|
|
8
9
|
|
|
9
10
|
## Constructors
|
|
10
11
|
|
|
@@ -76,6 +77,73 @@ A promise that resolves when all metrics have been registered.
|
|
|
76
77
|
|
|
77
78
|
***
|
|
78
79
|
|
|
80
|
+
### healthApplicationInit() {#healthapplicationinit}
|
|
81
|
+
|
|
82
|
+
> **healthApplicationInit**(`contextIds`): `Promise`\<`void`\>
|
|
83
|
+
|
|
84
|
+
Creates a temporary DID document for the application health check.
|
|
85
|
+
|
|
86
|
+
#### Parameters
|
|
87
|
+
|
|
88
|
+
##### contextIds
|
|
89
|
+
|
|
90
|
+
`IContextIds`
|
|
91
|
+
|
|
92
|
+
The context IDs accumulated by prior init steps.
|
|
93
|
+
|
|
94
|
+
#### Returns
|
|
95
|
+
|
|
96
|
+
`Promise`\<`void`\>
|
|
97
|
+
|
|
98
|
+
#### Implementation of
|
|
99
|
+
|
|
100
|
+
`IHealthProviderComponent.healthApplicationInit`
|
|
101
|
+
|
|
102
|
+
***
|
|
103
|
+
|
|
104
|
+
### healthApplication() {#healthapplication}
|
|
105
|
+
|
|
106
|
+
> **healthApplication**(`callback`): `Promise`\<`IHealth`[] \| `undefined`\>
|
|
107
|
+
|
|
108
|
+
Returns the application health status of the identity service by resolving the DID created
|
|
109
|
+
in healthApplicationInit.
|
|
110
|
+
|
|
111
|
+
#### Parameters
|
|
112
|
+
|
|
113
|
+
##### callback
|
|
114
|
+
|
|
115
|
+
`HealthApplicationCallback`
|
|
116
|
+
|
|
117
|
+
Callback for deferred results.
|
|
118
|
+
|
|
119
|
+
#### Returns
|
|
120
|
+
|
|
121
|
+
`Promise`\<`IHealth`[] \| `undefined`\>
|
|
122
|
+
|
|
123
|
+
The health status of the service.
|
|
124
|
+
|
|
125
|
+
#### Implementation of
|
|
126
|
+
|
|
127
|
+
`IHealthProviderComponent.healthApplication`
|
|
128
|
+
|
|
129
|
+
***
|
|
130
|
+
|
|
131
|
+
### healthApplicationTeardown() {#healthapplicationteardown}
|
|
132
|
+
|
|
133
|
+
> **healthApplicationTeardown**(): `Promise`\<`void`\>
|
|
134
|
+
|
|
135
|
+
Removes the DID document created in healthApplicationInit.
|
|
136
|
+
|
|
137
|
+
#### Returns
|
|
138
|
+
|
|
139
|
+
`Promise`\<`void`\>
|
|
140
|
+
|
|
141
|
+
#### Implementation of
|
|
142
|
+
|
|
143
|
+
`IHealthProviderComponent.healthApplicationTeardown`
|
|
144
|
+
|
|
145
|
+
***
|
|
146
|
+
|
|
79
147
|
### identityCreate() {#identitycreate}
|
|
80
148
|
|
|
81
149
|
> **identityCreate**(`namespace?`, `controller?`): `Promise`\<`IDidDocument`\>
|
|
@@ -110,7 +178,7 @@ The created identity document.
|
|
|
110
178
|
|
|
111
179
|
### identityRemove() {#identityremove}
|
|
112
180
|
|
|
113
|
-
> **identityRemove**(`identity`, `controller?`): `Promise`\<`void`\>
|
|
181
|
+
> **identityRemove**(`identity`, `options?`, `controller?`): `Promise`\<`void`\>
|
|
114
182
|
|
|
115
183
|
Remove an identity.
|
|
116
184
|
|
|
@@ -122,6 +190,16 @@ Remove an identity.
|
|
|
122
190
|
|
|
123
191
|
The id of the document to remove.
|
|
124
192
|
|
|
193
|
+
##### options?
|
|
194
|
+
|
|
195
|
+
Optional settings.
|
|
196
|
+
|
|
197
|
+
###### removeKeys?
|
|
198
|
+
|
|
199
|
+
`boolean`
|
|
200
|
+
|
|
201
|
+
Also remove any associated private keys from the vault.
|
|
202
|
+
|
|
125
203
|
##### controller?
|
|
126
204
|
|
|
127
205
|
`string`
|
|
@@ -194,7 +272,7 @@ NotSupportedError if the platform does not support multiple keys.
|
|
|
194
272
|
|
|
195
273
|
### verificationMethodRemove() {#verificationmethodremove}
|
|
196
274
|
|
|
197
|
-
> **verificationMethodRemove**(`verificationMethodId`, `controller?`): `Promise`\<`void`\>
|
|
275
|
+
> **verificationMethodRemove**(`verificationMethodId`, `options?`, `controller?`): `Promise`\<`void`\>
|
|
198
276
|
|
|
199
277
|
Remove a verification method from the document.
|
|
200
278
|
|
|
@@ -206,6 +284,16 @@ Remove a verification method from the document.
|
|
|
206
284
|
|
|
207
285
|
The id of the verification method.
|
|
208
286
|
|
|
287
|
+
##### options?
|
|
288
|
+
|
|
289
|
+
Optional settings.
|
|
290
|
+
|
|
291
|
+
###### removeKeys?
|
|
292
|
+
|
|
293
|
+
`boolean`
|
|
294
|
+
|
|
295
|
+
Also remove any associated private key from the vault.
|
|
296
|
+
|
|
209
297
|
##### controller?
|
|
210
298
|
|
|
211
299
|
`string`
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Function: identitiesAdminList()
|
|
2
|
+
|
|
3
|
+
> **identitiesAdminList**(`httpRequestContext`, `componentName`, `request`): `Promise`\<`IIdentityProfileAdminListResponse`\>
|
|
4
|
+
|
|
5
|
+
Get the list of identity profiles including private properties as an admin.
|
|
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 stored in the ComponentFactory.
|
|
20
|
+
|
|
21
|
+
### request
|
|
22
|
+
|
|
23
|
+
`IIdentityProfileAdminListRequest`
|
|
24
|
+
|
|
25
|
+
The request.
|
|
26
|
+
|
|
27
|
+
## Returns
|
|
28
|
+
|
|
29
|
+
`Promise`\<`IIdentityProfileAdminListResponse`\>
|
|
30
|
+
|
|
31
|
+
The response object with additional http response properties.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Function: identityProfileAdminGet()
|
|
2
|
+
|
|
3
|
+
> **identityProfileAdminGet**(`httpRequestContext`, `componentName`, `request`): `Promise`\<`IIdentityProfileGetResponse`\>
|
|
4
|
+
|
|
5
|
+
Get the identity profile of another user as an admin.
|
|
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 stored in the ComponentFactory.
|
|
20
|
+
|
|
21
|
+
### request
|
|
22
|
+
|
|
23
|
+
`IIdentityProfileAdminGetRequest`
|
|
24
|
+
|
|
25
|
+
The request.
|
|
26
|
+
|
|
27
|
+
## Returns
|
|
28
|
+
|
|
29
|
+
`Promise`\<`IIdentityProfileGetResponse`\>
|
|
30
|
+
|
|
31
|
+
The response object with additional http response properties.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Function: identityProfileAdminRemove()
|
|
2
|
+
|
|
3
|
+
> **identityProfileAdminRemove**(`httpRequestContext`, `componentName`, `request`): `Promise`\<`INoContentResponse`\>
|
|
4
|
+
|
|
5
|
+
Remove the identity profile of another user as an admin.
|
|
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 stored in the ComponentFactory.
|
|
20
|
+
|
|
21
|
+
### request
|
|
22
|
+
|
|
23
|
+
`IIdentityProfileAdminRemoveRequest`
|
|
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: identityProfileAdminUpdate()
|
|
2
|
+
|
|
3
|
+
> **identityProfileAdminUpdate**(`httpRequestContext`, `componentName`, `request`): `Promise`\<`INoContentResponse`\>
|
|
4
|
+
|
|
5
|
+
Update the identity profile of another user as an admin.
|
|
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 stored in the ComponentFactory.
|
|
20
|
+
|
|
21
|
+
### request
|
|
22
|
+
|
|
23
|
+
`IIdentityProfileAdminUpdateRequest`
|
|
24
|
+
|
|
25
|
+
The request.
|
|
26
|
+
|
|
27
|
+
## Returns
|
|
28
|
+
|
|
29
|
+
`Promise`\<`INoContentResponse`\>
|
|
30
|
+
|
|
31
|
+
The response object with additional http response properties.
|
package/docs/reference/index.md
CHANGED
|
@@ -26,10 +26,14 @@
|
|
|
26
26
|
- [generateRestRoutesIdentityProfile](functions/generateRestRoutesIdentityProfile.md)
|
|
27
27
|
- [identityProfileCreate](functions/identityProfileCreate.md)
|
|
28
28
|
- [identityGet](functions/identityGet.md)
|
|
29
|
+
- [identityProfileAdminGet](functions/identityProfileAdminGet.md)
|
|
29
30
|
- [identityGetPublic](functions/identityGetPublic.md)
|
|
30
31
|
- [identityProfileUpdate](functions/identityProfileUpdate.md)
|
|
32
|
+
- [identityProfileAdminUpdate](functions/identityProfileAdminUpdate.md)
|
|
31
33
|
- [identityProfileRemove](functions/identityProfileRemove.md)
|
|
34
|
+
- [identityProfileAdminRemove](functions/identityProfileAdminRemove.md)
|
|
32
35
|
- [identitiesList](functions/identitiesList.md)
|
|
36
|
+
- [identitiesAdminList](functions/identitiesAdminList.md)
|
|
33
37
|
- [generateRestRoutesIdentityResolver](functions/generateRestRoutesIdentityResolver.md)
|
|
34
38
|
- [identityResolve](functions/identityResolve.md)
|
|
35
39
|
- [generateRestRoutesIdentity](functions/generateRestRoutesIdentity.md)
|
|
@@ -17,3 +17,25 @@ The configuration for the identity service.
|
|
|
17
17
|
> `optional` **telemetryComponentType?**: `string`
|
|
18
18
|
|
|
19
19
|
The component type for the optional telemetry component used for event metrics.
|
|
20
|
+
|
|
21
|
+
***
|
|
22
|
+
|
|
23
|
+
### tracingComponentType? {#tracingcomponenttype}
|
|
24
|
+
|
|
25
|
+
> `optional` **tracingComponentType?**: `string`
|
|
26
|
+
|
|
27
|
+
The component type for the optional tracing component used for spans.
|
|
28
|
+
|
|
29
|
+
***
|
|
30
|
+
|
|
31
|
+
### vaultConnectorType? {#vaultconnectortype}
|
|
32
|
+
|
|
33
|
+
> `optional` **vaultConnectorType?**: `string`
|
|
34
|
+
|
|
35
|
+
The vault connector type to use for migrating the mnemonic during health check initialisation.
|
|
36
|
+
|
|
37
|
+
#### Default
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
vault
|
|
41
|
+
```
|
package/locales/en.json
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
+
"health": {
|
|
3
|
+
"identityService": {
|
|
4
|
+
"healthDescription": "DID document lifecycle (create, resolve, remove) using the \"{namespace}\" namespace",
|
|
5
|
+
"createDocumentFailed": "Failed to create the health check identity document",
|
|
6
|
+
"resolveDocumentFailed": "Failed to resolve the health check identity document"
|
|
7
|
+
}
|
|
8
|
+
},
|
|
2
9
|
"error": {
|
|
3
10
|
"identityService": {
|
|
4
11
|
"noConnectors": "There are no connectors registered with the identity factory",
|
|
@@ -35,7 +42,8 @@
|
|
|
35
42
|
"updateFailed": "Updating the identity profile failed \"{identity}\"",
|
|
36
43
|
"notFound": "The identity profile could not be found \"{notFoundId}\"",
|
|
37
44
|
"removeFailed": "Removing the identity profile failed \"{identity}\"",
|
|
38
|
-
"listFailed": "Failed listing identities"
|
|
45
|
+
"listFailed": "Failed listing identities",
|
|
46
|
+
"listAdminFailed": "Failed listing identities with private data"
|
|
39
47
|
}
|
|
40
48
|
}
|
|
41
49
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/identity-service",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.2-next.10",
|
|
4
4
|
"description": "Service contracts and REST endpoint definitions for exposing identity workflows through stable interfaces.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,19 +14,21 @@
|
|
|
14
14
|
"node": ">=24.0.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@twin.org/api-models": "
|
|
18
|
-
"@twin.org/context": "
|
|
19
|
-
"@twin.org/core": "
|
|
20
|
-
"@twin.org/
|
|
21
|
-
"@twin.org/data-
|
|
22
|
-
"@twin.org/
|
|
23
|
-
"@twin.org/entity": "
|
|
24
|
-
"@twin.org/
|
|
25
|
-
"@twin.org/
|
|
26
|
-
"@twin.org/standards-w3c-did": "
|
|
27
|
-
"@twin.org/telemetry-models": "
|
|
28
|
-
"@twin.org/
|
|
29
|
-
"@twin.org/
|
|
17
|
+
"@twin.org/api-models": "next",
|
|
18
|
+
"@twin.org/context": "next",
|
|
19
|
+
"@twin.org/core": "next",
|
|
20
|
+
"@twin.org/data-core": "next",
|
|
21
|
+
"@twin.org/data-json-ld": "next",
|
|
22
|
+
"@twin.org/dlt-account": "next",
|
|
23
|
+
"@twin.org/entity": "next",
|
|
24
|
+
"@twin.org/identity-models": "0.9.2-next.10",
|
|
25
|
+
"@twin.org/nameof": "next",
|
|
26
|
+
"@twin.org/standards-w3c-did": "next",
|
|
27
|
+
"@twin.org/telemetry-models": "next",
|
|
28
|
+
"@twin.org/tracing-models": "next",
|
|
29
|
+
"@twin.org/vault-models": "next",
|
|
30
|
+
"@twin.org/wallet-models": "next",
|
|
31
|
+
"@twin.org/web": "next"
|
|
30
32
|
},
|
|
31
33
|
"main": "./dist/es/index.js",
|
|
32
34
|
"types": "./dist/types/index.d.ts",
|