@twin.org/identity-models 0.0.1-next.19 → 0.0.1-next.21
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/cjs/index.cjs +43 -16
- package/dist/esm/index.mjs +43 -17
- package/dist/types/factories/identityResolverConnectorFactory.d.ts +6 -0
- package/dist/types/index.d.ts +14 -11
- package/dist/types/models/IIdentityComponent.d.ts +126 -5
- package/dist/types/models/IIdentityConnector.d.ts +0 -7
- package/dist/types/models/IIdentityResolverComponent.d.ts +13 -0
- package/dist/types/models/IIdentityResolverConnector.d.ts +14 -0
- package/dist/types/models/api/{IIdentityResolveRequest.d.ts → resolver/IIdentityResolveRequest.d.ts} +1 -1
- package/dist/types/utils/jwtHelper.d.ts +22 -0
- package/docs/changelog.md +1 -1
- package/docs/reference/classes/DocumentHelper.md +3 -1
- package/docs/reference/classes/JwtHelper.md +59 -0
- package/docs/reference/index.md +4 -5
- package/docs/reference/interfaces/IIdentityComponent.md +466 -6
- package/docs/reference/interfaces/IIdentityConnector.md +125 -107
- package/docs/reference/interfaces/IIdentityProfileComponent.md +52 -44
- package/docs/reference/interfaces/IIdentityProfileConnector.md +52 -40
- package/docs/reference/interfaces/IIdentityResolveRequest.md +1 -1
- package/docs/reference/interfaces/IIdentityResolverComponent.md +29 -0
- package/docs/reference/interfaces/IIdentityResolverConnector.md +33 -0
- package/docs/reference/variables/IdentityProfileConnectorFactory.md +1 -1
- package/docs/reference/variables/IdentityResolverConnectorFactory.md +5 -0
- package/locales/en.json +5 -4
- package/package.json +3 -3
- package/dist/types/models/identityRole.d.ts +0 -21
- package/docs/reference/type-aliases/IdentityRole.md +0 -5
- package/docs/reference/variables/IdentityRole.md +0 -25
- /package/dist/types/models/api/{IIdentityProfileCreateRequest.d.ts → profile/IIdentityProfileCreateRequest.d.ts} +0 -0
- /package/dist/types/models/api/{IIdentityProfileGetPublicRequest.d.ts → profile/IIdentityProfileGetPublicRequest.d.ts} +0 -0
- /package/dist/types/models/api/{IIdentityProfileGetPublicResponse.d.ts → profile/IIdentityProfileGetPublicResponse.d.ts} +0 -0
- /package/dist/types/models/api/{IIdentityProfileGetRequest.d.ts → profile/IIdentityProfileGetRequest.d.ts} +0 -0
- /package/dist/types/models/api/{IIdentityProfileGetResponse.d.ts → profile/IIdentityProfileGetResponse.d.ts} +0 -0
- /package/dist/types/models/api/{IIdentityProfileListRequest.d.ts → profile/IIdentityProfileListRequest.d.ts} +0 -0
- /package/dist/types/models/api/{IIdentityProfileListResponse.d.ts → profile/IIdentityProfileListResponse.d.ts} +0 -0
- /package/dist/types/models/api/{IIdentityProfileUpdateRequest.d.ts → profile/IIdentityProfileUpdateRequest.d.ts} +0 -0
- /package/dist/types/models/api/{IIdentityResolveResponse.d.ts → resolver/IIdentityResolveResponse.d.ts} +0 -0
|
@@ -16,7 +16,9 @@ Create a new document.
|
|
|
16
16
|
|
|
17
17
|
#### Parameters
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
##### controller
|
|
20
|
+
|
|
21
|
+
`string`
|
|
20
22
|
|
|
21
23
|
The controller of the identity who can make changes.
|
|
22
24
|
|
|
@@ -28,30 +30,6 @@ The created document.
|
|
|
28
30
|
|
|
29
31
|
***
|
|
30
32
|
|
|
31
|
-
### resolveDocument()
|
|
32
|
-
|
|
33
|
-
> **resolveDocument**(`documentId`): `Promise`\<`IDidDocument`\>
|
|
34
|
-
|
|
35
|
-
Resolve a document from its id.
|
|
36
|
-
|
|
37
|
-
#### Parameters
|
|
38
|
-
|
|
39
|
-
• **documentId**: `string`
|
|
40
|
-
|
|
41
|
-
The id of the document to resolve.
|
|
42
|
-
|
|
43
|
-
#### Returns
|
|
44
|
-
|
|
45
|
-
`Promise`\<`IDidDocument`\>
|
|
46
|
-
|
|
47
|
-
The resolved document.
|
|
48
|
-
|
|
49
|
-
#### Throws
|
|
50
|
-
|
|
51
|
-
NotFoundError if the id can not be resolved.
|
|
52
|
-
|
|
53
|
-
***
|
|
54
|
-
|
|
55
33
|
### addVerificationMethod()
|
|
56
34
|
|
|
57
35
|
> **addVerificationMethod**(`controller`, `documentId`, `verificationMethodType`, `verificationMethodId`?): `Promise`\<`IDidDocumentVerificationMethod`\>
|
|
@@ -60,19 +38,27 @@ Add a verification method to the document in JSON Web key Format.
|
|
|
60
38
|
|
|
61
39
|
#### Parameters
|
|
62
40
|
|
|
63
|
-
|
|
41
|
+
##### controller
|
|
42
|
+
|
|
43
|
+
`string`
|
|
64
44
|
|
|
65
45
|
The controller of the identity who can make changes.
|
|
66
46
|
|
|
67
|
-
|
|
47
|
+
##### documentId
|
|
48
|
+
|
|
49
|
+
`string`
|
|
68
50
|
|
|
69
51
|
The id of the document to add the verification method to.
|
|
70
52
|
|
|
71
|
-
|
|
53
|
+
##### verificationMethodType
|
|
54
|
+
|
|
55
|
+
`DidVerificationMethodType`
|
|
72
56
|
|
|
73
57
|
The type of the verification method to add.
|
|
74
58
|
|
|
75
|
-
|
|
59
|
+
##### verificationMethodId?
|
|
60
|
+
|
|
61
|
+
`string`
|
|
76
62
|
|
|
77
63
|
The id of the verification method, if undefined uses the kid of the generated JWK.
|
|
78
64
|
|
|
@@ -100,11 +86,15 @@ Remove a verification method from the document.
|
|
|
100
86
|
|
|
101
87
|
#### Parameters
|
|
102
88
|
|
|
103
|
-
|
|
89
|
+
##### controller
|
|
90
|
+
|
|
91
|
+
`string`
|
|
104
92
|
|
|
105
93
|
The controller of the identity who can make changes.
|
|
106
94
|
|
|
107
|
-
|
|
95
|
+
##### verificationMethodId
|
|
96
|
+
|
|
97
|
+
`string`
|
|
108
98
|
|
|
109
99
|
The id of the verification method.
|
|
110
100
|
|
|
@@ -132,23 +122,33 @@ Add a service to the document.
|
|
|
132
122
|
|
|
133
123
|
#### Parameters
|
|
134
124
|
|
|
135
|
-
|
|
125
|
+
##### controller
|
|
126
|
+
|
|
127
|
+
`string`
|
|
136
128
|
|
|
137
129
|
The controller of the identity who can make changes.
|
|
138
130
|
|
|
139
|
-
|
|
131
|
+
##### documentId
|
|
132
|
+
|
|
133
|
+
`string`
|
|
140
134
|
|
|
141
135
|
The id of the document to add the service to.
|
|
142
136
|
|
|
143
|
-
|
|
137
|
+
##### serviceId
|
|
138
|
+
|
|
139
|
+
`string`
|
|
144
140
|
|
|
145
141
|
The id of the service.
|
|
146
142
|
|
|
147
|
-
|
|
143
|
+
##### serviceType
|
|
144
|
+
|
|
145
|
+
`string`
|
|
148
146
|
|
|
149
147
|
The type of the service.
|
|
150
148
|
|
|
151
|
-
|
|
149
|
+
##### serviceEndpoint
|
|
150
|
+
|
|
151
|
+
`string`
|
|
152
152
|
|
|
153
153
|
The endpoint for the service.
|
|
154
154
|
|
|
@@ -172,11 +172,15 @@ Remove a service from the document.
|
|
|
172
172
|
|
|
173
173
|
#### Parameters
|
|
174
174
|
|
|
175
|
-
|
|
175
|
+
##### controller
|
|
176
|
+
|
|
177
|
+
`string`
|
|
176
178
|
|
|
177
179
|
The controller of the identity who can make changes.
|
|
178
180
|
|
|
179
|
-
|
|
181
|
+
##### serviceId
|
|
182
|
+
|
|
183
|
+
`string`
|
|
180
184
|
|
|
181
185
|
The id of the service.
|
|
182
186
|
|
|
@@ -194,46 +198,48 @@ NotFoundError if the id can not be resolved.
|
|
|
194
198
|
|
|
195
199
|
### createVerifiableCredential()
|
|
196
200
|
|
|
197
|
-
> **createVerifiableCredential**(`controller`, `verificationMethodId`, `id`, `credential`, `revocationIndex`?): `Promise
|
|
201
|
+
> **createVerifiableCredential**(`controller`, `verificationMethodId`, `id`, `credential`, `revocationIndex`?): `Promise`\<\{ `verifiableCredential`: `IDidVerifiableCredential`; `jwt`: `string`; \}\>
|
|
198
202
|
|
|
199
203
|
Create a verifiable credential for a verification method.
|
|
200
204
|
|
|
201
205
|
#### Parameters
|
|
202
206
|
|
|
203
|
-
|
|
207
|
+
##### controller
|
|
208
|
+
|
|
209
|
+
`string`
|
|
204
210
|
|
|
205
211
|
The controller of the identity who can make changes.
|
|
206
212
|
|
|
207
|
-
|
|
213
|
+
##### verificationMethodId
|
|
214
|
+
|
|
215
|
+
`string`
|
|
208
216
|
|
|
209
217
|
The verification method id to use.
|
|
210
218
|
|
|
211
|
-
|
|
219
|
+
##### id
|
|
212
220
|
|
|
213
221
|
The id of the credential.
|
|
214
222
|
|
|
215
|
-
|
|
223
|
+
`undefined` | `string`
|
|
224
|
+
|
|
225
|
+
##### credential
|
|
226
|
+
|
|
227
|
+
`IJsonLdNodeObject`
|
|
216
228
|
|
|
217
229
|
The credential to store in the verifiable credential.
|
|
218
230
|
|
|
219
|
-
|
|
231
|
+
##### revocationIndex?
|
|
232
|
+
|
|
233
|
+
`number`
|
|
220
234
|
|
|
221
235
|
The bitmap revocation index of the credential, if undefined will not have revocation status.
|
|
222
236
|
|
|
223
237
|
#### Returns
|
|
224
238
|
|
|
225
|
-
`Promise
|
|
239
|
+
`Promise`\<\{ `verifiableCredential`: `IDidVerifiableCredential`; `jwt`: `string`; \}\>
|
|
226
240
|
|
|
227
241
|
The created verifiable credential and its token.
|
|
228
242
|
|
|
229
|
-
##### verifiableCredential
|
|
230
|
-
|
|
231
|
-
> **verifiableCredential**: `IDidVerifiableCredential`
|
|
232
|
-
|
|
233
|
-
##### jwt
|
|
234
|
-
|
|
235
|
-
> **jwt**: `string`
|
|
236
|
-
|
|
237
243
|
#### Throws
|
|
238
244
|
|
|
239
245
|
NotFoundError if the id can not be resolved.
|
|
@@ -242,30 +248,24 @@ NotFoundError if the id can not be resolved.
|
|
|
242
248
|
|
|
243
249
|
### checkVerifiableCredential()
|
|
244
250
|
|
|
245
|
-
> **checkVerifiableCredential**(`credentialJwt`): `Promise
|
|
251
|
+
> **checkVerifiableCredential**(`credentialJwt`): `Promise`\<\{ `revoked`: `boolean`; `verifiableCredential`: `IDidVerifiableCredential`; \}\>
|
|
246
252
|
|
|
247
253
|
Check a verifiable credential is valid.
|
|
248
254
|
|
|
249
255
|
#### Parameters
|
|
250
256
|
|
|
251
|
-
|
|
257
|
+
##### credentialJwt
|
|
258
|
+
|
|
259
|
+
`string`
|
|
252
260
|
|
|
253
261
|
The credential to verify.
|
|
254
262
|
|
|
255
263
|
#### Returns
|
|
256
264
|
|
|
257
|
-
`Promise
|
|
265
|
+
`Promise`\<\{ `revoked`: `boolean`; `verifiableCredential`: `IDidVerifiableCredential`; \}\>
|
|
258
266
|
|
|
259
267
|
The credential stored in the jwt and the revocation status.
|
|
260
268
|
|
|
261
|
-
##### revoked
|
|
262
|
-
|
|
263
|
-
> **revoked**: `boolean`
|
|
264
|
-
|
|
265
|
-
##### verifiableCredential?
|
|
266
|
-
|
|
267
|
-
> `optional` **verifiableCredential**: `IDidVerifiableCredential`
|
|
268
|
-
|
|
269
269
|
***
|
|
270
270
|
|
|
271
271
|
### revokeVerifiableCredentials()
|
|
@@ -276,15 +276,21 @@ Revoke verifiable credential(s).
|
|
|
276
276
|
|
|
277
277
|
#### Parameters
|
|
278
278
|
|
|
279
|
-
|
|
279
|
+
##### controller
|
|
280
|
+
|
|
281
|
+
`string`
|
|
280
282
|
|
|
281
283
|
The controller of the identity who can make changes.
|
|
282
284
|
|
|
283
|
-
|
|
285
|
+
##### issuerDocumentId
|
|
286
|
+
|
|
287
|
+
`string`
|
|
284
288
|
|
|
285
289
|
The id of the document to update the revocation list for.
|
|
286
290
|
|
|
287
|
-
|
|
291
|
+
##### credentialIndices
|
|
292
|
+
|
|
293
|
+
`number`[]
|
|
288
294
|
|
|
289
295
|
The revocation bitmap index or indices to revoke.
|
|
290
296
|
|
|
@@ -304,15 +310,21 @@ Unrevoke verifiable credential(s).
|
|
|
304
310
|
|
|
305
311
|
#### Parameters
|
|
306
312
|
|
|
307
|
-
|
|
313
|
+
##### controller
|
|
314
|
+
|
|
315
|
+
`string`
|
|
308
316
|
|
|
309
317
|
The controller of the identity who can make changes.
|
|
310
318
|
|
|
311
|
-
|
|
319
|
+
##### issuerDocumentId
|
|
320
|
+
|
|
321
|
+
`string`
|
|
312
322
|
|
|
313
323
|
The id of the document to update the revocation list for.
|
|
314
324
|
|
|
315
|
-
|
|
325
|
+
##### credentialIndices
|
|
326
|
+
|
|
327
|
+
`number`[]
|
|
316
328
|
|
|
317
329
|
The revocation bitmap index or indices to un revoke.
|
|
318
330
|
|
|
@@ -326,54 +338,60 @@ Nothing.
|
|
|
326
338
|
|
|
327
339
|
### createVerifiablePresentation()
|
|
328
340
|
|
|
329
|
-
> **createVerifiablePresentation**(`controller`, `presentationMethodId`, `presentationId`, `contexts`, `types`, `verifiableCredentials`, `expiresInMinutes`?): `Promise
|
|
341
|
+
> **createVerifiablePresentation**(`controller`, `presentationMethodId`, `presentationId`, `contexts`, `types`, `verifiableCredentials`, `expiresInMinutes`?): `Promise`\<\{ `verifiablePresentation`: `IDidVerifiablePresentation`; `jwt`: `string`; \}\>
|
|
330
342
|
|
|
331
343
|
Create a verifiable presentation from the supplied verifiable credentials.
|
|
332
344
|
|
|
333
345
|
#### Parameters
|
|
334
346
|
|
|
335
|
-
|
|
347
|
+
##### controller
|
|
348
|
+
|
|
349
|
+
`string`
|
|
336
350
|
|
|
337
351
|
The controller of the identity who can make changes.
|
|
338
352
|
|
|
339
|
-
|
|
353
|
+
##### presentationMethodId
|
|
354
|
+
|
|
355
|
+
`string`
|
|
340
356
|
|
|
341
357
|
The method to associate with the presentation.
|
|
342
358
|
|
|
343
|
-
|
|
359
|
+
##### presentationId
|
|
344
360
|
|
|
345
361
|
The id of the presentation.
|
|
346
362
|
|
|
347
|
-
|
|
363
|
+
`undefined` | `string`
|
|
364
|
+
|
|
365
|
+
##### contexts
|
|
348
366
|
|
|
349
367
|
The contexts for the data stored in the verifiable credential.
|
|
350
368
|
|
|
351
|
-
|
|
369
|
+
`undefined` | `IJsonLdContextDefinitionRoot`
|
|
370
|
+
|
|
371
|
+
##### types
|
|
352
372
|
|
|
353
373
|
The types for the data stored in the verifiable credential.
|
|
354
374
|
|
|
355
|
-
|
|
375
|
+
`undefined` | `string` | `string`[]
|
|
376
|
+
|
|
377
|
+
##### verifiableCredentials
|
|
378
|
+
|
|
379
|
+
(`string` \| `IDidVerifiableCredential`)[]
|
|
356
380
|
|
|
357
381
|
The credentials to use for creating the presentation in jwt format.
|
|
358
382
|
|
|
359
|
-
|
|
383
|
+
##### expiresInMinutes?
|
|
384
|
+
|
|
385
|
+
`number`
|
|
360
386
|
|
|
361
387
|
The time in minutes for the presentation to expire.
|
|
362
388
|
|
|
363
389
|
#### Returns
|
|
364
390
|
|
|
365
|
-
`Promise
|
|
391
|
+
`Promise`\<\{ `verifiablePresentation`: `IDidVerifiablePresentation`; `jwt`: `string`; \}\>
|
|
366
392
|
|
|
367
393
|
The created verifiable presentation and its token.
|
|
368
394
|
|
|
369
|
-
##### verifiablePresentation
|
|
370
|
-
|
|
371
|
-
> **verifiablePresentation**: `IDidVerifiablePresentation`
|
|
372
|
-
|
|
373
|
-
##### jwt
|
|
374
|
-
|
|
375
|
-
> **jwt**: `string`
|
|
376
|
-
|
|
377
395
|
#### Throws
|
|
378
396
|
|
|
379
397
|
NotFoundError if the id can not be resolved.
|
|
@@ -382,34 +400,24 @@ NotFoundError if the id can not be resolved.
|
|
|
382
400
|
|
|
383
401
|
### checkVerifiablePresentation()
|
|
384
402
|
|
|
385
|
-
> **checkVerifiablePresentation**(`presentationJwt`): `Promise
|
|
403
|
+
> **checkVerifiablePresentation**(`presentationJwt`): `Promise`\<\{ `revoked`: `boolean`; `verifiablePresentation`: `IDidVerifiablePresentation`; `issuers`: `IDidDocument`[]; \}\>
|
|
386
404
|
|
|
387
405
|
Check a verifiable presentation is valid.
|
|
388
406
|
|
|
389
407
|
#### Parameters
|
|
390
408
|
|
|
391
|
-
|
|
409
|
+
##### presentationJwt
|
|
410
|
+
|
|
411
|
+
`string`
|
|
392
412
|
|
|
393
413
|
The presentation to verify.
|
|
394
414
|
|
|
395
415
|
#### Returns
|
|
396
416
|
|
|
397
|
-
`Promise
|
|
417
|
+
`Promise`\<\{ `revoked`: `boolean`; `verifiablePresentation`: `IDidVerifiablePresentation`; `issuers`: `IDidDocument`[]; \}\>
|
|
398
418
|
|
|
399
419
|
The presentation stored in the jwt and the revocation status.
|
|
400
420
|
|
|
401
|
-
##### revoked
|
|
402
|
-
|
|
403
|
-
> **revoked**: `boolean`
|
|
404
|
-
|
|
405
|
-
##### verifiablePresentation?
|
|
406
|
-
|
|
407
|
-
> `optional` **verifiablePresentation**: `IDidVerifiablePresentation`
|
|
408
|
-
|
|
409
|
-
##### issuers?
|
|
410
|
-
|
|
411
|
-
> `optional` **issuers**: `IDidDocument`[]
|
|
412
|
-
|
|
413
421
|
***
|
|
414
422
|
|
|
415
423
|
### createProof()
|
|
@@ -420,15 +428,21 @@ Create a proof for arbitrary data with the specified verification method.
|
|
|
420
428
|
|
|
421
429
|
#### Parameters
|
|
422
430
|
|
|
423
|
-
|
|
431
|
+
##### controller
|
|
432
|
+
|
|
433
|
+
`string`
|
|
424
434
|
|
|
425
435
|
The controller of the identity who can make changes.
|
|
426
436
|
|
|
427
|
-
|
|
437
|
+
##### verificationMethodId
|
|
438
|
+
|
|
439
|
+
`string`
|
|
428
440
|
|
|
429
441
|
The verification method id to use.
|
|
430
442
|
|
|
431
|
-
|
|
443
|
+
##### bytes
|
|
444
|
+
|
|
445
|
+
`Uint8Array`
|
|
432
446
|
|
|
433
447
|
The data bytes to sign.
|
|
434
448
|
|
|
@@ -448,11 +462,15 @@ Verify proof for arbitrary data with the specified verification method.
|
|
|
448
462
|
|
|
449
463
|
#### Parameters
|
|
450
464
|
|
|
451
|
-
|
|
465
|
+
##### bytes
|
|
466
|
+
|
|
467
|
+
`Uint8Array`
|
|
452
468
|
|
|
453
469
|
The data bytes to verify.
|
|
454
470
|
|
|
455
|
-
|
|
471
|
+
##### proof
|
|
472
|
+
|
|
473
|
+
`IDidProof`
|
|
456
474
|
|
|
457
475
|
The proof to verify.
|
|
458
476
|
|
|
@@ -22,15 +22,21 @@ Create the profile properties for an identity.
|
|
|
22
22
|
|
|
23
23
|
#### Parameters
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
##### publicProfile?
|
|
26
|
+
|
|
27
|
+
`T`
|
|
26
28
|
|
|
27
29
|
The public profile data as JSON-LD.
|
|
28
30
|
|
|
29
|
-
|
|
31
|
+
##### privateProfile?
|
|
32
|
+
|
|
33
|
+
`U`
|
|
30
34
|
|
|
31
35
|
The private profile data as JSON-LD.
|
|
32
36
|
|
|
33
|
-
|
|
37
|
+
##### identity?
|
|
38
|
+
|
|
39
|
+
`string`
|
|
34
40
|
|
|
35
41
|
The identity to perform the profile operation on.
|
|
36
42
|
|
|
@@ -44,42 +50,36 @@ Nothing.
|
|
|
44
50
|
|
|
45
51
|
### get()
|
|
46
52
|
|
|
47
|
-
> **get**(`publicPropertyNames`?, `privatePropertyNames`?, `identity`?): `Promise`\<`
|
|
53
|
+
> **get**(`publicPropertyNames`?, `privatePropertyNames`?, `identity`?): `Promise`\<\{ `identity`: `string`; `publicProfile`: `Partial`\<`T`\>; `privateProfile`: `Partial`\<`U`\>; \}\>
|
|
48
54
|
|
|
49
55
|
Get the profile properties for an identity.
|
|
50
56
|
|
|
51
57
|
#### Parameters
|
|
52
58
|
|
|
53
|
-
|
|
59
|
+
##### publicPropertyNames?
|
|
60
|
+
|
|
61
|
+
keyof `T`[]
|
|
54
62
|
|
|
55
63
|
The public properties to get for the profile, defaults to all.
|
|
56
64
|
|
|
57
|
-
|
|
65
|
+
##### privatePropertyNames?
|
|
66
|
+
|
|
67
|
+
keyof `U`[]
|
|
58
68
|
|
|
59
69
|
The private properties to get for the profile, defaults to all.
|
|
60
70
|
|
|
61
|
-
|
|
71
|
+
##### identity?
|
|
72
|
+
|
|
73
|
+
`string`
|
|
62
74
|
|
|
63
75
|
The identity to perform the profile operation on.
|
|
64
76
|
|
|
65
77
|
#### Returns
|
|
66
78
|
|
|
67
|
-
`Promise`\<`
|
|
79
|
+
`Promise`\<\{ `identity`: `string`; `publicProfile`: `Partial`\<`T`\>; `privateProfile`: `Partial`\<`U`\>; \}\>
|
|
68
80
|
|
|
69
81
|
The items identity and the properties.
|
|
70
82
|
|
|
71
|
-
##### identity
|
|
72
|
-
|
|
73
|
-
> **identity**: `string`
|
|
74
|
-
|
|
75
|
-
##### publicProfile?
|
|
76
|
-
|
|
77
|
-
> `optional` **publicProfile**: `Partial`\<`T`\>
|
|
78
|
-
|
|
79
|
-
##### privateProfile?
|
|
80
|
-
|
|
81
|
-
> `optional` **privateProfile**: `Partial`\<`U`\>
|
|
82
|
-
|
|
83
83
|
***
|
|
84
84
|
|
|
85
85
|
### getPublic()
|
|
@@ -90,11 +90,15 @@ Get the public profile properties for an identity.
|
|
|
90
90
|
|
|
91
91
|
#### Parameters
|
|
92
92
|
|
|
93
|
-
|
|
93
|
+
##### identity
|
|
94
|
+
|
|
95
|
+
`string`
|
|
94
96
|
|
|
95
97
|
The identity to perform the profile operation on.
|
|
96
98
|
|
|
97
|
-
|
|
99
|
+
##### propertyNames?
|
|
100
|
+
|
|
101
|
+
keyof `T`[]
|
|
98
102
|
|
|
99
103
|
The public properties to get for the profile, defaults to all.
|
|
100
104
|
|
|
@@ -114,15 +118,21 @@ Update the profile properties of an identity.
|
|
|
114
118
|
|
|
115
119
|
#### Parameters
|
|
116
120
|
|
|
117
|
-
|
|
121
|
+
##### publicProfile?
|
|
122
|
+
|
|
123
|
+
`T`
|
|
118
124
|
|
|
119
125
|
The public profile data as JSON-LD.
|
|
120
126
|
|
|
121
|
-
|
|
127
|
+
##### privateProfile?
|
|
128
|
+
|
|
129
|
+
`U`
|
|
122
130
|
|
|
123
131
|
The private profile data as JSON-LD.
|
|
124
132
|
|
|
125
|
-
|
|
133
|
+
##### identity?
|
|
134
|
+
|
|
135
|
+
`string`
|
|
126
136
|
|
|
127
137
|
The identity to perform the profile operation on.
|
|
128
138
|
|
|
@@ -142,7 +152,9 @@ Delete the profile for an identity.
|
|
|
142
152
|
|
|
143
153
|
#### Parameters
|
|
144
154
|
|
|
145
|
-
|
|
155
|
+
##### identity?
|
|
156
|
+
|
|
157
|
+
`string`
|
|
146
158
|
|
|
147
159
|
The identity to perform the profile operation on.
|
|
148
160
|
|
|
@@ -156,42 +168,38 @@ Nothing.
|
|
|
156
168
|
|
|
157
169
|
### list()
|
|
158
170
|
|
|
159
|
-
> **list**(`publicFilters`?, `publicPropertyNames`?, `cursor`?, `pageSize`?): `Promise
|
|
171
|
+
> **list**(`publicFilters`?, `publicPropertyNames`?, `cursor`?, `pageSize`?): `Promise`\<\{ `items`: `object`[]; `cursor`: `string`; \}\>
|
|
160
172
|
|
|
161
173
|
Get a list of the requested identities.
|
|
162
174
|
|
|
163
175
|
#### Parameters
|
|
164
176
|
|
|
165
|
-
|
|
177
|
+
##### publicFilters?
|
|
178
|
+
|
|
179
|
+
`object`[]
|
|
166
180
|
|
|
167
181
|
The filters to apply to the identities public profiles.
|
|
168
182
|
|
|
169
|
-
|
|
183
|
+
##### publicPropertyNames?
|
|
184
|
+
|
|
185
|
+
keyof `T`[]
|
|
170
186
|
|
|
171
187
|
The public properties to get for the profile, defaults to all.
|
|
172
188
|
|
|
173
|
-
|
|
189
|
+
##### cursor?
|
|
190
|
+
|
|
191
|
+
`string`
|
|
174
192
|
|
|
175
193
|
The cursor for paged requests.
|
|
176
194
|
|
|
177
|
-
|
|
195
|
+
##### pageSize?
|
|
196
|
+
|
|
197
|
+
`number`
|
|
178
198
|
|
|
179
199
|
The maximum number of items in a page.
|
|
180
200
|
|
|
181
201
|
#### Returns
|
|
182
202
|
|
|
183
|
-
`Promise
|
|
203
|
+
`Promise`\<\{ `items`: `object`[]; `cursor`: `string`; \}\>
|
|
184
204
|
|
|
185
205
|
The list of items and cursor for paging.
|
|
186
|
-
|
|
187
|
-
##### items
|
|
188
|
-
|
|
189
|
-
> **items**: `object`[]
|
|
190
|
-
|
|
191
|
-
The identities.
|
|
192
|
-
|
|
193
|
-
##### cursor?
|
|
194
|
-
|
|
195
|
-
> `optional` **cursor**: `string`
|
|
196
|
-
|
|
197
|
-
An optional cursor, when defined can be used to call find to get more entities.
|