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