@twin.org/federated-catalogue-service 0.0.1-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.
Files changed (45) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +21 -0
  3. package/dist/cjs/index.cjs +2122 -0
  4. package/dist/esm/index.mjs +2104 -0
  5. package/dist/types/entities/dataResourceEntry.d.ts +59 -0
  6. package/dist/types/entities/dataSpaceConnectorEntry.d.ts +66 -0
  7. package/dist/types/entities/participantEntry.d.ts +42 -0
  8. package/dist/types/entities/serviceOfferingEntry.d.ts +55 -0
  9. package/dist/types/federatedCatalogueRoutes.d.ts +113 -0
  10. package/dist/types/federatedCatalogueService.d.ts +142 -0
  11. package/dist/types/index.d.ts +10 -0
  12. package/dist/types/models/IFederatedCatalogueServiceConfig.d.ts +15 -0
  13. package/dist/types/models/IFederatedCatalogueServiceConstructorOptions.d.ts +38 -0
  14. package/dist/types/restEntryPoints.d.ts +2 -0
  15. package/dist/types/schema.d.ts +4 -0
  16. package/dist/types/verification/complianceCredentialVerificationService.d.ts +32 -0
  17. package/docs/changelog.md +143 -0
  18. package/docs/examples.md +1 -0
  19. package/docs/open-api/spec.json +3434 -0
  20. package/docs/reference/classes/DataResourceEntry.md +118 -0
  21. package/docs/reference/classes/DataSpaceConnectorEntry.md +133 -0
  22. package/docs/reference/classes/FederatedCatalogueService.md +389 -0
  23. package/docs/reference/classes/ParticipantEntry.md +85 -0
  24. package/docs/reference/classes/ServiceOfferingEntry.md +109 -0
  25. package/docs/reference/functions/complianceCredentialPresentation.md +37 -0
  26. package/docs/reference/functions/dataResourceCredentialPresentation.md +37 -0
  27. package/docs/reference/functions/dataResourceGet.md +31 -0
  28. package/docs/reference/functions/dataResourceList.md +31 -0
  29. package/docs/reference/functions/dataSpaceConnectorCredentialPresentation.md +37 -0
  30. package/docs/reference/functions/dataSpaceConnectorGet.md +31 -0
  31. package/docs/reference/functions/dataSpaceConnectorList.md +31 -0
  32. package/docs/reference/functions/generateRestRoutesFederatedCatalogue.md +25 -0
  33. package/docs/reference/functions/initSchema.md +9 -0
  34. package/docs/reference/functions/participantGet.md +31 -0
  35. package/docs/reference/functions/participantList.md +31 -0
  36. package/docs/reference/functions/serviceOfferingCredentialPresentation.md +37 -0
  37. package/docs/reference/functions/serviceOfferingGet.md +31 -0
  38. package/docs/reference/functions/serviceOfferingList.md +31 -0
  39. package/docs/reference/index.md +36 -0
  40. package/docs/reference/interfaces/IFederatedCatalogueServiceConfig.md +21 -0
  41. package/docs/reference/interfaces/IFederatedCatalogueServiceConstructorOptions.md +83 -0
  42. package/docs/reference/variables/restEntryPoints.md +3 -0
  43. package/docs/reference/variables/tagsFederatedCatalogue.md +5 -0
  44. package/locales/en.json +21 -0
  45. package/package.json +52 -0
@@ -0,0 +1,118 @@
1
+ # Class: DataResourceEntry
2
+
3
+ Data Resource Entry.
4
+
5
+ ## Constructors
6
+
7
+ ### Constructor
8
+
9
+ > **new DataResourceEntry**(): `DataResourceEntry`
10
+
11
+ #### Returns
12
+
13
+ `DataResourceEntry`
14
+
15
+ ## Properties
16
+
17
+ ### id
18
+
19
+ > **id**: `string`
20
+
21
+ The Id.
22
+
23
+ ***
24
+
25
+ ### issuer
26
+
27
+ > **issuer**: `string`
28
+
29
+ The trusted issuer of the compliance credential
30
+
31
+ ***
32
+
33
+ ### name
34
+
35
+ > **name**: `string`
36
+
37
+ The name.
38
+
39
+ ***
40
+
41
+ ### description?
42
+
43
+ > `optional` **description**: `string`
44
+
45
+ The description.
46
+
47
+ ***
48
+
49
+ ### producedBy
50
+
51
+ > **producedBy**: `string`
52
+
53
+ The Id of the producer of the data described by this Data Resource.
54
+
55
+ ***
56
+
57
+ ### copyrightOwnedBy
58
+
59
+ > **copyrightOwnedBy**: `string`
60
+
61
+ The copyright owner
62
+
63
+ ***
64
+
65
+ ### license
66
+
67
+ > **license**: `string`
68
+
69
+ The license
70
+
71
+ ***
72
+
73
+ ### exposedThrough
74
+
75
+ > **exposedThrough**: `string`
76
+
77
+ The data exchange component used to expose the Data Resource.
78
+ Only a URL pointing to the resource is stored
79
+
80
+ ***
81
+
82
+ ### resourcePolicy
83
+
84
+ > **resourcePolicy**: `IOdrlPolicy`[]
85
+
86
+ The Data Resource policy
87
+
88
+ ***
89
+
90
+ ### validFrom
91
+
92
+ > **validFrom**: `string`
93
+
94
+ Valid from
95
+
96
+ ***
97
+
98
+ ### validUntil
99
+
100
+ > **validUntil**: `string`
101
+
102
+ Valid to
103
+
104
+ ***
105
+
106
+ ### dateCreated
107
+
108
+ > **dateCreated**: `string`
109
+
110
+ Date created
111
+
112
+ ***
113
+
114
+ ### evidence
115
+
116
+ > **evidence**: `string`[]
117
+
118
+ Evidences
@@ -0,0 +1,133 @@
1
+ # Class: DataSpaceConnectorEntry
2
+
3
+ Data Space Connector Entry.
4
+
5
+ ## Constructors
6
+
7
+ ### Constructor
8
+
9
+ > **new DataSpaceConnectorEntry**(): `DataSpaceConnectorEntry`
10
+
11
+ #### Returns
12
+
13
+ `DataSpaceConnectorEntry`
14
+
15
+ ## Properties
16
+
17
+ ### id
18
+
19
+ > **id**: `string`
20
+
21
+ The Id.
22
+
23
+ ***
24
+
25
+ ### issuer
26
+
27
+ > **issuer**: `string`
28
+
29
+ The trusted issuer of the compliance credential.
30
+
31
+ ***
32
+
33
+ ### name?
34
+
35
+ > `optional` **name**: `string`
36
+
37
+ The name.
38
+
39
+ ***
40
+
41
+ ### description?
42
+
43
+ > `optional` **description**: `string`
44
+
45
+ The description.
46
+
47
+ ***
48
+
49
+ ### identity
50
+
51
+ > **identity**: `string`
52
+
53
+ The identity of the Data Space Connector
54
+
55
+ ***
56
+
57
+ ### maintainer
58
+
59
+ > **maintainer**: `string`
60
+
61
+ Who maintains the Data Space Connector
62
+
63
+ ***
64
+
65
+ ### defaultEndpoint
66
+
67
+ > **defaultEndpoint**: `IEndpoint`
68
+
69
+ The default endpoint
70
+
71
+ ***
72
+
73
+ ### pushActivityEndpoint
74
+
75
+ > **pushActivityEndpoint**: `IEndpoint`
76
+
77
+ The activity push endpoint
78
+
79
+ ***
80
+
81
+ ### subscriptionActivityEndpoint?
82
+
83
+ > `optional` **subscriptionActivityEndpoint**: `IEndpoint`
84
+
85
+ The activity subscribe endpoint
86
+
87
+ ***
88
+
89
+ ### pullDataEndpoint
90
+
91
+ > **pullDataEndpoint**: `IEndpoint`
92
+
93
+ The pull data endpoint
94
+
95
+ ***
96
+
97
+ ### offeredResource
98
+
99
+ > **offeredResource**: `string`[]
100
+
101
+ The pull data endpoint
102
+
103
+ ***
104
+
105
+ ### validFrom
106
+
107
+ > **validFrom**: `string`
108
+
109
+ Valid from
110
+
111
+ ***
112
+
113
+ ### validUntil
114
+
115
+ > **validUntil**: `string`
116
+
117
+ Valid to
118
+
119
+ ***
120
+
121
+ ### dateCreated
122
+
123
+ > **dateCreated**: `string`
124
+
125
+ Date created
126
+
127
+ ***
128
+
129
+ ### evidence
130
+
131
+ > **evidence**: `string`[]
132
+
133
+ Evidences
@@ -0,0 +1,389 @@
1
+ # Class: FederatedCatalogueService
2
+
3
+ Service for performing logging operations to a connector.
4
+
5
+ ## Implements
6
+
7
+ - `IFederatedCatalogueComponent`
8
+
9
+ ## Constructors
10
+
11
+ ### Constructor
12
+
13
+ > **new FederatedCatalogueService**(`options`): `FederatedCatalogueService`
14
+
15
+ Create a new instance of FederatedCatalogue service.
16
+
17
+ #### Parameters
18
+
19
+ ##### options
20
+
21
+ [`IFederatedCatalogueServiceConstructorOptions`](../interfaces/IFederatedCatalogueServiceConstructorOptions.md)
22
+
23
+ The options for the connector.
24
+
25
+ #### Returns
26
+
27
+ `FederatedCatalogueService`
28
+
29
+ ## Properties
30
+
31
+ ### NAMESPACE
32
+
33
+ > `readonly` `static` **NAMESPACE**: `string` = `"fedcat"`
34
+
35
+ The namespace for the 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
+ `IFederatedCatalogueComponent.CLASS_NAME`
48
+
49
+ ## Methods
50
+
51
+ ### registerComplianceCredential()
52
+
53
+ > **registerComplianceCredential**(`credentialJwt`): `Promise`\<`string`\>
54
+
55
+ Registers a Participant's compliance Credential.
56
+
57
+ #### Parameters
58
+
59
+ ##### credentialJwt
60
+
61
+ `string`
62
+
63
+ The credential (wrapped into a presentation) as JWT.
64
+
65
+ #### Returns
66
+
67
+ `Promise`\<`string`\>
68
+
69
+ The Id of the Participant (DID usually).
70
+
71
+ #### Implementation of
72
+
73
+ `IFederatedCatalogueComponent.registerComplianceCredential`
74
+
75
+ ***
76
+
77
+ ### queryParticipants()
78
+
79
+ > **queryParticipants**(`id?`, `legalRegistrationNumber?`, `lrnType?`, `cursor?`, `pageSize?`): `Promise`\<`IParticipantList`\>
80
+
81
+ Query the federated catalogue.
82
+
83
+ #### Parameters
84
+
85
+ ##### id?
86
+
87
+ `string`
88
+
89
+ The identity of the participant.
90
+
91
+ ##### legalRegistrationNumber?
92
+
93
+ `string`
94
+
95
+ The legal registration number.
96
+
97
+ ##### lrnType?
98
+
99
+ `string`
100
+
101
+ The legal registration number type (EORI, VATID, GLEIF, KENYA_PIN, etc.)
102
+
103
+ ##### cursor?
104
+
105
+ `string`
106
+
107
+ The cursor to request the next page of entities.
108
+
109
+ ##### pageSize?
110
+
111
+ `number`
112
+
113
+ The maximum number of entities in a page.
114
+
115
+ #### Returns
116
+
117
+ `Promise`\<`IParticipantList`\>
118
+
119
+ All the entities for the storage matching the conditions,
120
+ and a cursor which can be used to request more entities.
121
+
122
+ #### Throws
123
+
124
+ NotImplementedError if the implementation does not support retrieval.
125
+
126
+ #### Implementation of
127
+
128
+ `IFederatedCatalogueComponent.queryParticipants`
129
+
130
+ ***
131
+
132
+ ### getEntry()
133
+
134
+ > **getEntry**(`entryType`, `entryId`): `Promise`\<`ICatalogueEntry`\>
135
+
136
+ Returns a Federated Catalogue entry.
137
+
138
+ #### Parameters
139
+
140
+ ##### entryType
141
+
142
+ `FederatedCatalogueEntryType`
143
+
144
+ The type of entry.
145
+
146
+ ##### entryId
147
+
148
+ `string`
149
+
150
+ The entry's id.
151
+
152
+ #### Returns
153
+
154
+ `Promise`\<`ICatalogueEntry`\>
155
+
156
+ Catalogue Entry
157
+
158
+ #### Throws
159
+
160
+ NotFoundError if not found.
161
+
162
+ #### Implementation of
163
+
164
+ `IFederatedCatalogueComponent.getEntry`
165
+
166
+ ***
167
+
168
+ ### registerDataSpaceConnectorCredential()
169
+
170
+ > **registerDataSpaceConnectorCredential**(`credentialJwt`): `Promise`\<`string`\>
171
+
172
+ Registers a compliance Credential concerning a Data Space Connector.
173
+
174
+ #### Parameters
175
+
176
+ ##### credentialJwt
177
+
178
+ `string`
179
+
180
+ The credential (wrapped into a presentation) as JWT.
181
+
182
+ #### Returns
183
+
184
+ `Promise`\<`string`\>
185
+
186
+ The identifier of the Data Space Connector registered.
187
+
188
+ #### Implementation of
189
+
190
+ `IFederatedCatalogueComponent.registerDataSpaceConnectorCredential`
191
+
192
+ ***
193
+
194
+ ### registerDataResourceCredential()
195
+
196
+ > **registerDataResourceCredential**(`credentialJwt`): `Promise`\<`string`[]\>
197
+
198
+ Registers a data resource Credential concerning a Data Space Connector.
199
+
200
+ #### Parameters
201
+
202
+ ##### credentialJwt
203
+
204
+ `string`
205
+
206
+ The credential (wrapped into a presentation) as JWT.
207
+
208
+ #### Returns
209
+
210
+ `Promise`\<`string`[]\>
211
+
212
+ The list of Data Resources created.
213
+
214
+ #### Implementation of
215
+
216
+ `IFederatedCatalogueComponent.registerDataResourceCredential`
217
+
218
+ ***
219
+
220
+ ### queryDataSpaceConnectors()
221
+
222
+ > **queryDataSpaceConnectors**(`id?`, `maintainer?`, `cursor?`, `pageSize?`): `Promise`\<`IDataSpaceConnectorList`\>
223
+
224
+ Query the federated catalogue.
225
+
226
+ #### Parameters
227
+
228
+ ##### id?
229
+
230
+ `string`
231
+
232
+ The identity of the participant.
233
+
234
+ ##### maintainer?
235
+
236
+ `string`
237
+
238
+ The DS Connector maintainer.
239
+
240
+ ##### cursor?
241
+
242
+ `string`
243
+
244
+ The cursor to request the next page of entities.
245
+
246
+ ##### pageSize?
247
+
248
+ `number`
249
+
250
+ The maximum number of entities in a page.
251
+
252
+ #### Returns
253
+
254
+ `Promise`\<`IDataSpaceConnectorList`\>
255
+
256
+ All the entities for the storage matching the conditions,
257
+ and a cursor which can be used to request more entities.
258
+
259
+ #### Throws
260
+
261
+ NotImplementedError if the implementation does not support retrieval.
262
+
263
+ #### Implementation of
264
+
265
+ `IFederatedCatalogueComponent.queryDataSpaceConnectors`
266
+
267
+ ***
268
+
269
+ ### registerServiceOfferingCredential()
270
+
271
+ > **registerServiceOfferingCredential**(`credentialJwt`): `Promise`\<`string`[]\>
272
+
273
+ Registers a Service Offering Credential.
274
+
275
+ #### Parameters
276
+
277
+ ##### credentialJwt
278
+
279
+ `string`
280
+
281
+ The credential (wrapped into a presentation) as JWT.
282
+
283
+ #### Returns
284
+
285
+ `Promise`\<`string`[]\>
286
+
287
+ Nothing.
288
+
289
+ #### Implementation of
290
+
291
+ `IFederatedCatalogueComponent.registerServiceOfferingCredential`
292
+
293
+ ***
294
+
295
+ ### queryServiceOfferings()
296
+
297
+ > **queryServiceOfferings**(`id?`, `providedBy?`, `cursor?`, `pageSize?`): `Promise`\<`IServiceOfferingList`\>
298
+
299
+ Query the federated catalogue.
300
+
301
+ #### Parameters
302
+
303
+ ##### id?
304
+
305
+ `string`
306
+
307
+ Service Id.
308
+
309
+ ##### providedBy?
310
+
311
+ `string`
312
+
313
+ The identity of the participant.
314
+
315
+ ##### cursor?
316
+
317
+ `string`
318
+
319
+ The cursor to request the next page of entities.
320
+
321
+ ##### pageSize?
322
+
323
+ `number`
324
+
325
+ The maximum number of entities in a page.
326
+
327
+ #### Returns
328
+
329
+ `Promise`\<`IServiceOfferingList`\>
330
+
331
+ All the entities for the storage matching the conditions,
332
+ and a cursor which can be used to request more entities.
333
+
334
+ #### Throws
335
+
336
+ NotImplementedError if the implementation does not support retrieval.
337
+
338
+ #### Implementation of
339
+
340
+ `IFederatedCatalogueComponent.queryServiceOfferings`
341
+
342
+ ***
343
+
344
+ ### queryDataResources()
345
+
346
+ > **queryDataResources**(`id?`, `producedBy?`, `cursor?`, `pageSize?`): `Promise`\<`IDataResourceList`\>
347
+
348
+ Query the federated catalogue.
349
+
350
+ #### Parameters
351
+
352
+ ##### id?
353
+
354
+ `string`
355
+
356
+ The identity of the DataResource.
357
+
358
+ ##### producedBy?
359
+
360
+ `string`
361
+
362
+ The identity of the participant.
363
+
364
+ ##### cursor?
365
+
366
+ `string`
367
+
368
+ The cursor to request the next page of entities.
369
+
370
+ ##### pageSize?
371
+
372
+ `number`
373
+
374
+ The maximum number of entities in a page.
375
+
376
+ #### Returns
377
+
378
+ `Promise`\<`IDataResourceList`\>
379
+
380
+ All the entities for the storage matching the conditions,
381
+ and a cursor which can be used to request more entities.
382
+
383
+ #### Throws
384
+
385
+ NotImplementedError if the implementation does not support retrieval.
386
+
387
+ #### Implementation of
388
+
389
+ `IFederatedCatalogueComponent.queryDataResources`
@@ -0,0 +1,85 @@
1
+ # Class: ParticipantEntry
2
+
3
+ Participant entry.
4
+
5
+ ## Constructors
6
+
7
+ ### Constructor
8
+
9
+ > **new ParticipantEntry**(): `ParticipantEntry`
10
+
11
+ #### Returns
12
+
13
+ `ParticipantEntry`
14
+
15
+ ## Properties
16
+
17
+ ### id
18
+
19
+ > **id**: `string`
20
+
21
+ The participant Id.
22
+
23
+ ***
24
+
25
+ ### issuer
26
+
27
+ > **issuer**: `string`
28
+
29
+ The trusted issuer of the compliance credential
30
+
31
+ ***
32
+
33
+ ### registrationNumber
34
+
35
+ > **registrationNumber**: `IRegistrationNumber`
36
+
37
+ The legal registration number.
38
+
39
+ ***
40
+
41
+ ### legalName
42
+
43
+ > **legalName**: `string`
44
+
45
+ The legal name.
46
+
47
+ ***
48
+
49
+ ### legalAddress
50
+
51
+ > **legalAddress**: `IAddress`
52
+
53
+ Address
54
+
55
+ ***
56
+
57
+ ### validFrom
58
+
59
+ > **validFrom**: `string`
60
+
61
+ Valid from
62
+
63
+ ***
64
+
65
+ ### validUntil
66
+
67
+ > **validUntil**: `string`
68
+
69
+ Valid to
70
+
71
+ ***
72
+
73
+ ### dateCreated
74
+
75
+ > **dateCreated**: `string`
76
+
77
+ Date created
78
+
79
+ ***
80
+
81
+ ### evidence
82
+
83
+ > **evidence**: `string`[]
84
+
85
+ Evidences