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