@twin.org/identity-service 0.0.1-next.8 → 0.0.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/dist/cjs/index.cjs +1417 -48
- package/dist/esm/index.mjs +1403 -51
- package/dist/types/identityProfileRoutes.d.ts +1 -1
- package/dist/types/identityProfileService.d.ts +6 -4
- package/dist/types/identityResolverRoutes.d.ts +21 -0
- package/dist/types/identityResolverService.d.ts +27 -0
- package/dist/types/identityRoutes.d.ts +108 -4
- package/dist/types/identityService.d.ts +136 -10
- package/dist/types/index.d.ts +6 -0
- package/dist/types/models/IIdentityProfileServiceConstructorOptions.d.ts +10 -0
- package/dist/types/models/IIdentityResolverServiceConfig.d.ts +9 -0
- package/dist/types/models/IIdentityResolverServiceConstructorOptions.d.ts +15 -0
- package/dist/types/models/IIdentityServiceConstructorOptions.d.ts +10 -0
- package/docs/changelog.md +302 -1
- package/docs/open-api/spec.json +2948 -1360
- package/docs/reference/classes/IdentityProfileService.md +76 -58
- package/docs/reference/classes/IdentityResolverService.md +73 -0
- package/docs/reference/classes/IdentityService.md +560 -16
- package/docs/reference/functions/generateRestRoutesIdentity.md +8 -4
- package/docs/reference/functions/generateRestRoutesIdentityProfile.md +8 -4
- package/docs/reference/functions/generateRestRoutesIdentityResolver.md +25 -0
- package/docs/reference/functions/identitiesList.md +9 -3
- package/docs/reference/functions/identityCreate.md +31 -0
- package/docs/reference/functions/identityGet.md +9 -3
- package/docs/reference/functions/identityGetPublic.md +9 -3
- package/docs/reference/functions/identityProfileCreate.md +9 -3
- package/docs/reference/functions/identityProfileRemove.md +9 -3
- package/docs/reference/functions/identityProfileUpdate.md +9 -3
- package/docs/reference/functions/identityProofCreate.md +31 -0
- package/docs/reference/functions/identityProofVerify.md +31 -0
- package/docs/reference/functions/identityRemove.md +31 -0
- package/docs/reference/functions/identityResolve.md +9 -3
- package/docs/reference/functions/identityServiceCreate.md +31 -0
- package/docs/reference/functions/identityServiceRemove.md +31 -0
- package/docs/reference/functions/identityVerifiableCredentialCreate.md +31 -0
- package/docs/reference/functions/identityVerifiableCredentialRevoke.md +31 -0
- package/docs/reference/functions/identityVerifiableCredentialUnrevoke.md +31 -0
- package/docs/reference/functions/identityVerifiableCredentialVerify.md +31 -0
- package/docs/reference/functions/identityVerifiablePresentationCreate.md +31 -0
- package/docs/reference/functions/identityVerifiablePresentationVerify.md +31 -0
- package/docs/reference/functions/identityVerificationMethodCreate.md +31 -0
- package/docs/reference/functions/identityVerificationMethodRemove.md +31 -0
- package/docs/reference/index.md +22 -1
- package/docs/reference/interfaces/IIdentityProfileServiceConstructorOptions.md +17 -0
- package/docs/reference/interfaces/IIdentityResolverServiceConfig.md +11 -0
- package/docs/reference/interfaces/IIdentityResolverServiceConstructorOptions.md +25 -0
- package/docs/reference/interfaces/IIdentityServiceConstructorOptions.md +11 -0
- package/docs/reference/variables/tagsIdentityResolver.md +5 -0
- package/locales/en.json +23 -4
- package/package.json +18 -18
|
@@ -4,9 +4,13 @@ Class which implements the identity profile contract.
|
|
|
4
4
|
|
|
5
5
|
## Type Parameters
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
### T
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
`T` *extends* `IJsonLdDocument` = `IJsonLdDocument`
|
|
10
|
+
|
|
11
|
+
### U
|
|
12
|
+
|
|
13
|
+
`U` *extends* `IJsonLdDocument` = `IJsonLdDocument`
|
|
10
14
|
|
|
11
15
|
## Implements
|
|
12
16
|
|
|
@@ -14,28 +18,34 @@ Class which implements the identity profile contract.
|
|
|
14
18
|
|
|
15
19
|
## Constructors
|
|
16
20
|
|
|
17
|
-
###
|
|
21
|
+
### Constructor
|
|
18
22
|
|
|
19
|
-
> **new IdentityProfileService**\<`T`, `U`\>(`options
|
|
23
|
+
> **new IdentityProfileService**\<`T`, `U`\>(`options?`): `IdentityProfileService`\<`T`, `U`\>
|
|
20
24
|
|
|
21
25
|
Create a new instance of IdentityProfileService.
|
|
22
26
|
|
|
23
27
|
#### Parameters
|
|
24
28
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
The dependencies for the identity profile service.
|
|
29
|
+
##### options?
|
|
28
30
|
|
|
29
|
-
|
|
31
|
+
[`IIdentityProfileServiceConstructorOptions`](../interfaces/IIdentityProfileServiceConstructorOptions.md)
|
|
30
32
|
|
|
31
|
-
The
|
|
33
|
+
The dependencies for the identity profile service.
|
|
32
34
|
|
|
33
35
|
#### Returns
|
|
34
36
|
|
|
35
|
-
|
|
37
|
+
`IdentityProfileService`\<`T`, `U`\>
|
|
36
38
|
|
|
37
39
|
## Properties
|
|
38
40
|
|
|
41
|
+
### NAMESPACE
|
|
42
|
+
|
|
43
|
+
> `readonly` `static` **NAMESPACE**: `string` = `"identity-profile"`
|
|
44
|
+
|
|
45
|
+
The namespace supported by the identity profile service.
|
|
46
|
+
|
|
47
|
+
***
|
|
48
|
+
|
|
39
49
|
### CLASS\_NAME
|
|
40
50
|
|
|
41
51
|
> `readonly` **CLASS\_NAME**: `string`
|
|
@@ -50,21 +60,27 @@ Runtime name for the class.
|
|
|
50
60
|
|
|
51
61
|
### create()
|
|
52
62
|
|
|
53
|
-
> **create**(`publicProfile
|
|
63
|
+
> **create**(`publicProfile?`, `privateProfile?`, `identity?`): `Promise`\<`void`\>
|
|
54
64
|
|
|
55
65
|
Create the profile properties for an identity.
|
|
56
66
|
|
|
57
67
|
#### Parameters
|
|
58
68
|
|
|
59
|
-
|
|
69
|
+
##### publicProfile?
|
|
70
|
+
|
|
71
|
+
`T`
|
|
60
72
|
|
|
61
73
|
The public profile data as JSON-LD.
|
|
62
74
|
|
|
63
|
-
|
|
75
|
+
##### privateProfile?
|
|
76
|
+
|
|
77
|
+
`U`
|
|
64
78
|
|
|
65
79
|
The private profile data as JSON-LD.
|
|
66
80
|
|
|
67
|
-
|
|
81
|
+
##### identity?
|
|
82
|
+
|
|
83
|
+
`string`
|
|
68
84
|
|
|
69
85
|
The identity to perform the profile operation on.
|
|
70
86
|
|
|
@@ -82,42 +98,36 @@ Nothing.
|
|
|
82
98
|
|
|
83
99
|
### get()
|
|
84
100
|
|
|
85
|
-
> **get**(`publicPropertyNames
|
|
101
|
+
> **get**(`publicPropertyNames?`, `privatePropertyNames?`, `identity?`): `Promise`\<\{ `identity`: `string`; `publicProfile?`: `Partial`\<`T`\>; `privateProfile?`: `Partial`\<`U`\>; \}\>
|
|
86
102
|
|
|
87
103
|
Get the profile properties for an identity.
|
|
88
104
|
|
|
89
105
|
#### Parameters
|
|
90
106
|
|
|
91
|
-
|
|
107
|
+
##### publicPropertyNames?
|
|
108
|
+
|
|
109
|
+
keyof `T`[]
|
|
92
110
|
|
|
93
111
|
The public properties to get for the profile, defaults to all.
|
|
94
112
|
|
|
95
|
-
|
|
113
|
+
##### privatePropertyNames?
|
|
114
|
+
|
|
115
|
+
keyof `U`[]
|
|
96
116
|
|
|
97
117
|
The private properties to get for the profile, defaults to all.
|
|
98
118
|
|
|
99
|
-
|
|
119
|
+
##### identity?
|
|
120
|
+
|
|
121
|
+
`string`
|
|
100
122
|
|
|
101
123
|
The identity to perform the profile operation on.
|
|
102
124
|
|
|
103
125
|
#### Returns
|
|
104
126
|
|
|
105
|
-
`Promise`\<`
|
|
127
|
+
`Promise`\<\{ `identity`: `string`; `publicProfile?`: `Partial`\<`T`\>; `privateProfile?`: `Partial`\<`U`\>; \}\>
|
|
106
128
|
|
|
107
129
|
The items identity and the properties.
|
|
108
130
|
|
|
109
|
-
##### identity
|
|
110
|
-
|
|
111
|
-
> **identity**: `string`
|
|
112
|
-
|
|
113
|
-
##### publicProfile?
|
|
114
|
-
|
|
115
|
-
> `optional` **publicProfile**: `Partial`\<`T`\>
|
|
116
|
-
|
|
117
|
-
##### privateProfile?
|
|
118
|
-
|
|
119
|
-
> `optional` **privateProfile**: `Partial`\<`U`\>
|
|
120
|
-
|
|
121
131
|
#### Implementation of
|
|
122
132
|
|
|
123
133
|
`IIdentityProfileComponent.get`
|
|
@@ -126,17 +136,21 @@ The items identity and the properties.
|
|
|
126
136
|
|
|
127
137
|
### getPublic()
|
|
128
138
|
|
|
129
|
-
> **getPublic**(`identity`, `propertyNames
|
|
139
|
+
> **getPublic**(`identity`, `propertyNames?`): `Promise`\<`Partial`\<`T`\>\>
|
|
130
140
|
|
|
131
141
|
Get the public profile properties for an identity.
|
|
132
142
|
|
|
133
143
|
#### Parameters
|
|
134
144
|
|
|
135
|
-
|
|
145
|
+
##### identity
|
|
146
|
+
|
|
147
|
+
`string`
|
|
136
148
|
|
|
137
149
|
The identity to perform the profile operation on.
|
|
138
150
|
|
|
139
|
-
|
|
151
|
+
##### propertyNames?
|
|
152
|
+
|
|
153
|
+
keyof `T`[]
|
|
140
154
|
|
|
141
155
|
The properties to get for the item, defaults to all.
|
|
142
156
|
|
|
@@ -154,21 +168,27 @@ The items properties.
|
|
|
154
168
|
|
|
155
169
|
### update()
|
|
156
170
|
|
|
157
|
-
> **update**(`publicProfile
|
|
171
|
+
> **update**(`publicProfile?`, `privateProfile?`, `identity?`): `Promise`\<`void`\>
|
|
158
172
|
|
|
159
173
|
Update the profile properties of an identity.
|
|
160
174
|
|
|
161
175
|
#### Parameters
|
|
162
176
|
|
|
163
|
-
|
|
177
|
+
##### publicProfile?
|
|
178
|
+
|
|
179
|
+
`T`
|
|
164
180
|
|
|
165
181
|
The public profile data as JSON-LD.
|
|
166
182
|
|
|
167
|
-
|
|
183
|
+
##### privateProfile?
|
|
184
|
+
|
|
185
|
+
`U`
|
|
168
186
|
|
|
169
187
|
The private profile data as JSON-LD.
|
|
170
188
|
|
|
171
|
-
|
|
189
|
+
##### identity?
|
|
190
|
+
|
|
191
|
+
`string`
|
|
172
192
|
|
|
173
193
|
The identity to perform the profile operation on.
|
|
174
194
|
|
|
@@ -186,13 +206,15 @@ Nothing.
|
|
|
186
206
|
|
|
187
207
|
### remove()
|
|
188
208
|
|
|
189
|
-
> **remove**(`identity
|
|
209
|
+
> **remove**(`identity?`): `Promise`\<`void`\>
|
|
190
210
|
|
|
191
211
|
Delete the profile for an identity.
|
|
192
212
|
|
|
193
213
|
#### Parameters
|
|
194
214
|
|
|
195
|
-
|
|
215
|
+
##### identity?
|
|
216
|
+
|
|
217
|
+
`string`
|
|
196
218
|
|
|
197
219
|
The identity to perform the profile operation on.
|
|
198
220
|
|
|
@@ -210,46 +232,42 @@ Nothing.
|
|
|
210
232
|
|
|
211
233
|
### list()
|
|
212
234
|
|
|
213
|
-
> **list**(`publicFilters
|
|
235
|
+
> **list**(`publicFilters?`, `publicPropertyNames?`, `cursor?`, `pageSize?`): `Promise`\<\{ `items`: `object`[]; `cursor?`: `string`; \}\>
|
|
214
236
|
|
|
215
237
|
Get a list of the requested types.
|
|
216
238
|
|
|
217
239
|
#### Parameters
|
|
218
240
|
|
|
219
|
-
|
|
241
|
+
##### publicFilters?
|
|
242
|
+
|
|
243
|
+
`object`[]
|
|
220
244
|
|
|
221
245
|
The filters to apply to the identities public profiles.
|
|
222
246
|
|
|
223
|
-
|
|
247
|
+
##### publicPropertyNames?
|
|
248
|
+
|
|
249
|
+
keyof `T`[]
|
|
224
250
|
|
|
225
251
|
The public properties to get for the profile, defaults to all.
|
|
226
252
|
|
|
227
|
-
|
|
253
|
+
##### cursor?
|
|
254
|
+
|
|
255
|
+
`string`
|
|
228
256
|
|
|
229
257
|
The cursor for paged requests.
|
|
230
258
|
|
|
231
|
-
|
|
259
|
+
##### pageSize?
|
|
260
|
+
|
|
261
|
+
`number`
|
|
232
262
|
|
|
233
263
|
The maximum number of items in a page.
|
|
234
264
|
|
|
235
265
|
#### Returns
|
|
236
266
|
|
|
237
|
-
`Promise
|
|
267
|
+
`Promise`\<\{ `items`: `object`[]; `cursor?`: `string`; \}\>
|
|
238
268
|
|
|
239
269
|
The list of items and cursor for paging.
|
|
240
270
|
|
|
241
|
-
##### items
|
|
242
|
-
|
|
243
|
-
> **items**: `object`[]
|
|
244
|
-
|
|
245
|
-
The identities.
|
|
246
|
-
|
|
247
|
-
##### cursor?
|
|
248
|
-
|
|
249
|
-
> `optional` **cursor**: `string`
|
|
250
|
-
|
|
251
|
-
An optional cursor, when defined can be used to call find to get more entities.
|
|
252
|
-
|
|
253
271
|
#### Implementation of
|
|
254
272
|
|
|
255
273
|
`IIdentityProfileComponent.list`
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Class: IdentityResolverService
|
|
2
|
+
|
|
3
|
+
Class which implements the identity resolver contract.
|
|
4
|
+
|
|
5
|
+
## Implements
|
|
6
|
+
|
|
7
|
+
- `IIdentityResolverComponent`
|
|
8
|
+
|
|
9
|
+
## Constructors
|
|
10
|
+
|
|
11
|
+
### Constructor
|
|
12
|
+
|
|
13
|
+
> **new IdentityResolverService**(`options?`): `IdentityResolverService`
|
|
14
|
+
|
|
15
|
+
Create a new instance of IdentityResolverService.
|
|
16
|
+
|
|
17
|
+
#### Parameters
|
|
18
|
+
|
|
19
|
+
##### options?
|
|
20
|
+
|
|
21
|
+
[`IIdentityResolverServiceConstructorOptions`](../interfaces/IIdentityResolverServiceConstructorOptions.md)
|
|
22
|
+
|
|
23
|
+
The options for the service.
|
|
24
|
+
|
|
25
|
+
#### Returns
|
|
26
|
+
|
|
27
|
+
`IdentityResolverService`
|
|
28
|
+
|
|
29
|
+
## Properties
|
|
30
|
+
|
|
31
|
+
### NAMESPACE
|
|
32
|
+
|
|
33
|
+
> `readonly` `static` **NAMESPACE**: `string` = `"identity-resolver"`
|
|
34
|
+
|
|
35
|
+
The namespace supported by the identity service.
|
|
36
|
+
|
|
37
|
+
***
|
|
38
|
+
|
|
39
|
+
### CLASS\_NAME
|
|
40
|
+
|
|
41
|
+
> `readonly` **CLASS\_NAME**: `string`
|
|
42
|
+
|
|
43
|
+
Runtime name for the class.
|
|
44
|
+
|
|
45
|
+
#### Implementation of
|
|
46
|
+
|
|
47
|
+
`IIdentityResolverComponent.CLASS_NAME`
|
|
48
|
+
|
|
49
|
+
## Methods
|
|
50
|
+
|
|
51
|
+
### identityResolve()
|
|
52
|
+
|
|
53
|
+
> **identityResolve**(`identity`): `Promise`\<`IDidDocument`\>
|
|
54
|
+
|
|
55
|
+
Resolve an identity.
|
|
56
|
+
|
|
57
|
+
#### Parameters
|
|
58
|
+
|
|
59
|
+
##### identity
|
|
60
|
+
|
|
61
|
+
`string`
|
|
62
|
+
|
|
63
|
+
The id of the document to resolve.
|
|
64
|
+
|
|
65
|
+
#### Returns
|
|
66
|
+
|
|
67
|
+
`Promise`\<`IDidDocument`\>
|
|
68
|
+
|
|
69
|
+
The resolved document.
|
|
70
|
+
|
|
71
|
+
#### Implementation of
|
|
72
|
+
|
|
73
|
+
`IIdentityResolverComponent.identityResolve`
|