@twin.org/federated-catalogue-service 0.0.3-next.2 → 0.0.3-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/README.md +1 -1
- package/dist/es/entities/dataset.js +12 -4
- package/dist/es/entities/dataset.js.map +1 -1
- package/dist/es/federatedCatalogueRoutes.js +241 -53
- package/dist/es/federatedCatalogueRoutes.js.map +1 -1
- package/dist/es/index.js +2 -0
- package/dist/es/index.js.map +1 -1
- package/dist/es/models/IFederatedCatalogueServiceConfig.js +4 -0
- package/dist/es/models/IFederatedCatalogueServiceConfig.js.map +1 -0
- package/dist/es/models/IFederatedCatalogueServiceConstructorOptions.js.map +1 -1
- package/dist/es/services/federatedCatalogueService.js +344 -131
- package/dist/es/services/federatedCatalogueService.js.map +1 -1
- package/dist/es/utils/catalogErrorUtils.js +49 -0
- package/dist/es/utils/catalogErrorUtils.js.map +1 -0
- package/dist/es/utils/datasetConverters.js +23 -10
- package/dist/es/utils/datasetConverters.js.map +1 -1
- package/dist/types/entities/dataset.d.ts +37 -33
- package/dist/types/index.d.ts +2 -0
- package/dist/types/models/IFederatedCatalogueServiceConfig.d.ts +5 -0
- package/dist/types/models/IFederatedCatalogueServiceConstructorOptions.d.ts +14 -4
- package/dist/types/services/federatedCatalogueService.d.ts +37 -21
- package/dist/types/utils/catalogErrorUtils.d.ts +15 -0
- package/dist/types/utils/datasetConverters.d.ts +10 -10
- package/docs/changelog.md +271 -3
- package/docs/examples.md +126 -1
- package/docs/open-api/spec.json +256 -2513
- package/docs/reference/classes/Dataset.md +70 -62
- package/docs/reference/classes/FederatedCatalogueService.md +77 -40
- package/docs/reference/functions/datasetEntityToModel.md +7 -7
- package/docs/reference/functions/datasetModelToEntity.md +11 -6
- package/docs/reference/functions/transformErrorToStatusCode.md +19 -0
- package/docs/reference/functions/transformToCatalogError.md +20 -0
- package/docs/reference/index.md +3 -0
- package/docs/reference/interfaces/IFederatedCatalogueServiceConfig.md +3 -0
- package/docs/reference/interfaces/IFederatedCatalogueServiceConstructorOptions.md +33 -5
- package/locales/en.json +12 -6
- package/package.json +10 -5
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Class describing a DCAT dataset for entity storage.
|
|
4
4
|
This wrapper enables efficient database indexing and querying while preserving
|
|
5
|
-
the full
|
|
5
|
+
the full IDcatDataset JSON-LD structure.
|
|
6
6
|
|
|
7
7
|
## Constructors
|
|
8
8
|
|
|
@@ -16,240 +16,248 @@ the full IDataset JSON-LD structure.
|
|
|
16
16
|
|
|
17
17
|
## Properties
|
|
18
18
|
|
|
19
|
-
###
|
|
19
|
+
### id {#id}
|
|
20
20
|
|
|
21
|
-
>
|
|
21
|
+
> **id**: `string`
|
|
22
22
|
|
|
23
|
-
The unique identifier for the dataset (
|
|
23
|
+
The unique identifier for the dataset (mapped from JSON-LD identifier).
|
|
24
24
|
|
|
25
25
|
***
|
|
26
26
|
|
|
27
|
-
###
|
|
27
|
+
### ownerId {#ownerid}
|
|
28
28
|
|
|
29
|
-
>
|
|
29
|
+
> **ownerId**: `string`
|
|
30
|
+
|
|
31
|
+
The owner of the dataset.
|
|
32
|
+
|
|
33
|
+
***
|
|
34
|
+
|
|
35
|
+
### @context {#context}
|
|
36
|
+
|
|
37
|
+
> **@context**: `DcatContextType`
|
|
30
38
|
|
|
31
39
|
The JSON-LD context for the dataset.
|
|
32
40
|
|
|
33
41
|
***
|
|
34
42
|
|
|
35
|
-
### @type
|
|
43
|
+
### @type {#type}
|
|
36
44
|
|
|
37
|
-
> **@type**: `"
|
|
45
|
+
> **@type**: `"dcat:Dataset"` \| `"dcat:Catalog"` \| `"dcat:DatasetSeries"`
|
|
38
46
|
|
|
39
47
|
The type of the resource (typically "Dataset").
|
|
40
48
|
|
|
41
49
|
***
|
|
42
50
|
|
|
43
|
-
### dcterms:title?
|
|
51
|
+
### dcterms:title? {#dctermstitle}
|
|
44
52
|
|
|
45
|
-
> `optional` **dcterms:title
|
|
53
|
+
> `optional` **dcterms:title?**: `ObjectOrArray`\<`string`\>
|
|
46
54
|
|
|
47
55
|
A name given to the resource.
|
|
48
56
|
|
|
49
57
|
***
|
|
50
58
|
|
|
51
|
-
### dcterms:description?
|
|
59
|
+
### dcterms:description? {#dctermsdescription}
|
|
52
60
|
|
|
53
|
-
> `optional` **dcterms:description
|
|
61
|
+
> `optional` **dcterms:description?**: `ObjectOrArray`\<`string`\>
|
|
54
62
|
|
|
55
63
|
A free-text account of the resource.
|
|
56
64
|
|
|
57
65
|
***
|
|
58
66
|
|
|
59
|
-
### dcterms:identifier?
|
|
67
|
+
### dcterms:identifier? {#dctermsidentifier}
|
|
60
68
|
|
|
61
|
-
> `optional` **dcterms:identifier
|
|
69
|
+
> `optional` **dcterms:identifier?**: `ObjectOrArray`\<`string`\>
|
|
62
70
|
|
|
63
71
|
A unique identifier of the resource.
|
|
64
72
|
|
|
65
73
|
***
|
|
66
74
|
|
|
67
|
-
### dcterms:issued?
|
|
75
|
+
### dcterms:issued? {#dctermsissued}
|
|
68
76
|
|
|
69
|
-
> `optional` **dcterms:issued
|
|
77
|
+
> `optional` **dcterms:issued?**: `string`
|
|
70
78
|
|
|
71
79
|
Date of formal issuance (publication) of the resource.
|
|
72
80
|
|
|
73
81
|
***
|
|
74
82
|
|
|
75
|
-
### dcterms:modified?
|
|
83
|
+
### dcterms:modified? {#dctermsmodified}
|
|
76
84
|
|
|
77
|
-
> `optional` **dcterms:modified
|
|
85
|
+
> `optional` **dcterms:modified?**: `string`
|
|
78
86
|
|
|
79
87
|
Most recent date on which the resource was changed, updated or modified.
|
|
80
88
|
|
|
81
89
|
***
|
|
82
90
|
|
|
83
|
-
### dcterms:language?
|
|
91
|
+
### dcterms:language? {#dctermslanguage}
|
|
84
92
|
|
|
85
|
-
> `optional` **dcterms:language
|
|
93
|
+
> `optional` **dcterms:language?**: `ObjectOrArray`\<`string`\>
|
|
86
94
|
|
|
87
95
|
A language of the resource.
|
|
88
96
|
|
|
89
97
|
***
|
|
90
98
|
|
|
91
|
-
### dcterms:publisher?
|
|
99
|
+
### dcterms:publisher? {#dctermspublisher}
|
|
92
100
|
|
|
93
|
-
> `optional` **dcterms:publisher
|
|
101
|
+
> `optional` **dcterms:publisher?**: `string` \| `JsonLdObjectWithAliases`\<`IFoafAgent`, `"foaf"`\>
|
|
94
102
|
|
|
95
103
|
An entity responsible for making the resource available.
|
|
96
104
|
|
|
97
105
|
***
|
|
98
106
|
|
|
99
|
-
### dcterms:creator?
|
|
107
|
+
### dcterms:creator? {#dctermscreator}
|
|
100
108
|
|
|
101
|
-
> `optional` **dcterms:creator
|
|
109
|
+
> `optional` **dcterms:creator?**: `string` \| `JsonLdObjectWithAliases`\<`IFoafAgent`, `"foaf"`\>
|
|
102
110
|
|
|
103
111
|
An entity responsible for producing the resource.
|
|
104
112
|
|
|
105
113
|
***
|
|
106
114
|
|
|
107
|
-
### dcterms:accessRights?
|
|
115
|
+
### dcterms:accessRights? {#dctermsaccessrights}
|
|
108
116
|
|
|
109
|
-
> `optional` **dcterms:accessRights
|
|
117
|
+
> `optional` **dcterms:accessRights?**: `string` \| `IJsonLdNodeObject`
|
|
110
118
|
|
|
111
119
|
Information about who can access the resource or an indication of its security status.
|
|
112
120
|
|
|
113
121
|
***
|
|
114
122
|
|
|
115
|
-
### dcterms:license?
|
|
123
|
+
### dcterms:license? {#dctermslicense}
|
|
116
124
|
|
|
117
|
-
> `optional` **dcterms:license
|
|
125
|
+
> `optional` **dcterms:license?**: `string` \| `IJsonLdNodeObject`
|
|
118
126
|
|
|
119
127
|
A legal document under which the resource is made available.
|
|
120
128
|
|
|
121
129
|
***
|
|
122
130
|
|
|
123
|
-
### dcterms:rights?
|
|
131
|
+
### dcterms:rights? {#dctermsrights}
|
|
124
132
|
|
|
125
|
-
> `optional` **dcterms:rights
|
|
133
|
+
> `optional` **dcterms:rights?**: `string` \| `IJsonLdNodeObject`
|
|
126
134
|
|
|
127
135
|
Information about rights held in and over the resource.
|
|
128
136
|
|
|
129
137
|
***
|
|
130
138
|
|
|
131
|
-
### dcterms:conformsTo?
|
|
139
|
+
### dcterms:conformsTo? {#dctermsconformsto}
|
|
132
140
|
|
|
133
|
-
> `optional` **dcterms:conformsTo
|
|
141
|
+
> `optional` **dcterms:conformsTo?**: `ObjectOrArray`\<`string`\>
|
|
134
142
|
|
|
135
143
|
An established standard to which the resource conforms.
|
|
136
144
|
|
|
137
145
|
***
|
|
138
146
|
|
|
139
|
-
### dcterms:type?
|
|
147
|
+
### dcterms:type? {#dctermstype}
|
|
140
148
|
|
|
141
|
-
> `optional` **dcterms:type
|
|
149
|
+
> `optional` **dcterms:type?**: `string`
|
|
142
150
|
|
|
143
151
|
The nature or genre of the resource.
|
|
144
152
|
|
|
145
153
|
***
|
|
146
154
|
|
|
147
|
-
### dcat:contactPoint?
|
|
155
|
+
### dcat:contactPoint? {#dcatcontactpoint}
|
|
148
156
|
|
|
149
|
-
> `optional` **dcat:contactPoint
|
|
157
|
+
> `optional` **dcat:contactPoint?**: `string` \| `IJsonLdNodeObject`
|
|
150
158
|
|
|
151
159
|
Relevant contact information for the catalogued resource.
|
|
152
160
|
|
|
153
161
|
***
|
|
154
162
|
|
|
155
|
-
### dcat:keyword?
|
|
163
|
+
### dcat:keyword? {#dcatkeyword}
|
|
156
164
|
|
|
157
|
-
> `optional` **dcat:keyword
|
|
165
|
+
> `optional` **dcat:keyword?**: `ObjectOrArray`\<`string`\>
|
|
158
166
|
|
|
159
167
|
A keyword or tag describing the resource.
|
|
160
168
|
|
|
161
169
|
***
|
|
162
170
|
|
|
163
|
-
### dcat:theme?
|
|
171
|
+
### dcat:theme? {#dcattheme}
|
|
164
172
|
|
|
165
|
-
> `optional` **dcat:theme
|
|
173
|
+
> `optional` **dcat:theme?**: `ObjectOrArray`\<`string`\>
|
|
166
174
|
|
|
167
175
|
A main category of the resource. A resource can have multiple themes.
|
|
168
176
|
|
|
169
177
|
***
|
|
170
178
|
|
|
171
|
-
### dcat:landingPage?
|
|
179
|
+
### dcat:landingPage? {#dcatlandingpage}
|
|
172
180
|
|
|
173
|
-
> `optional` **dcat:landingPage
|
|
181
|
+
> `optional` **dcat:landingPage?**: `ObjectOrArray`\<`string`\>
|
|
174
182
|
|
|
175
183
|
A Web page that can be navigated to gain access to the resource.
|
|
176
184
|
|
|
177
185
|
***
|
|
178
186
|
|
|
179
|
-
### dcat:qualifiedRelation?
|
|
187
|
+
### dcat:qualifiedRelation? {#dcatqualifiedrelation}
|
|
180
188
|
|
|
181
|
-
> `optional` **dcat:qualifiedRelation
|
|
189
|
+
> `optional` **dcat:qualifiedRelation?**: `string` \| `IDcatRelationship`
|
|
182
190
|
|
|
183
191
|
Link to a description of a relationship with another resource.
|
|
184
192
|
|
|
185
193
|
***
|
|
186
194
|
|
|
187
|
-
### odrl:hasPolicy?
|
|
195
|
+
### odrl:hasPolicy? {#odrlhaspolicy}
|
|
188
196
|
|
|
189
|
-
> `optional` **odrl:hasPolicy
|
|
197
|
+
> `optional` **odrl:hasPolicy?**: `JsonLdObjectWithOptionalContext`\<`IOdrlPolicy`\>
|
|
190
198
|
|
|
191
199
|
An ODRL conformant policy expressing the rights associated with the resource.
|
|
192
200
|
|
|
193
201
|
***
|
|
194
202
|
|
|
195
|
-
### dcat:distribution?
|
|
203
|
+
### dcat:distribution? {#dcatdistribution}
|
|
196
204
|
|
|
197
|
-
> `optional` **dcat:distribution
|
|
205
|
+
> `optional` **dcat:distribution?**: `ObjectOrArray`\<`IDcatDistributionBase`\>
|
|
198
206
|
|
|
199
207
|
An available distribution of the dataset.
|
|
200
208
|
|
|
201
209
|
***
|
|
202
210
|
|
|
203
|
-
### dcterms:accrualPeriodicity?
|
|
211
|
+
### dcterms:accrualPeriodicity? {#dctermsaccrualperiodicity}
|
|
204
212
|
|
|
205
|
-
> `optional` **dcterms:accrualPeriodicity
|
|
213
|
+
> `optional` **dcterms:accrualPeriodicity?**: `string`
|
|
206
214
|
|
|
207
215
|
The frequency at which the dataset is published.
|
|
208
216
|
|
|
209
217
|
***
|
|
210
218
|
|
|
211
|
-
### dcat:inSeries?
|
|
219
|
+
### dcat:inSeries? {#dcatinseries}
|
|
212
220
|
|
|
213
|
-
> `optional` **dcat:inSeries
|
|
221
|
+
> `optional` **dcat:inSeries?**: `string`
|
|
214
222
|
|
|
215
223
|
A dataset series of which the dataset is part.
|
|
216
224
|
|
|
217
225
|
***
|
|
218
226
|
|
|
219
|
-
### dcterms:spatial?
|
|
227
|
+
### dcterms:spatial? {#dctermsspatial}
|
|
220
228
|
|
|
221
|
-
> `optional` **dcterms:spatial
|
|
229
|
+
> `optional` **dcterms:spatial?**: `string` \| `string`[] \| `IJsonLdNodeObject`
|
|
222
230
|
|
|
223
231
|
The geographical area covered by the dataset.
|
|
224
232
|
|
|
225
233
|
***
|
|
226
234
|
|
|
227
|
-
### dcat:spatialResolutionInMeters?
|
|
235
|
+
### dcat:spatialResolutionInMeters? {#dcatspatialresolutioninmeters}
|
|
228
236
|
|
|
229
|
-
> `optional` **dcat:spatialResolutionInMeters
|
|
237
|
+
> `optional` **dcat:spatialResolutionInMeters?**: `number`
|
|
230
238
|
|
|
231
239
|
Minimum spatial separation resolvable in a dataset, measured in meters.
|
|
232
240
|
|
|
233
241
|
***
|
|
234
242
|
|
|
235
|
-
### dcterms:temporal?
|
|
243
|
+
### dcterms:temporal? {#dctermstemporal}
|
|
236
244
|
|
|
237
|
-
> `optional` **dcterms:temporal
|
|
245
|
+
> `optional` **dcterms:temporal?**: `IDublinCorePeriodOfTime`
|
|
238
246
|
|
|
239
247
|
The temporal period that the dataset covers.
|
|
240
248
|
|
|
241
249
|
***
|
|
242
250
|
|
|
243
|
-
### dcat:temporalResolution?
|
|
251
|
+
### dcat:temporalResolution? {#dcattemporalresolution}
|
|
244
252
|
|
|
245
|
-
> `optional` **dcat:temporalResolution
|
|
253
|
+
> `optional` **dcat:temporalResolution?**: `string`
|
|
246
254
|
|
|
247
255
|
Minimum time period resolvable in the dataset.
|
|
248
256
|
|
|
249
257
|
***
|
|
250
258
|
|
|
251
|
-
### prov:wasGeneratedBy?
|
|
259
|
+
### prov:wasGeneratedBy? {#provwasgeneratedby}
|
|
252
260
|
|
|
253
|
-
> `optional` **prov:wasGeneratedBy
|
|
261
|
+
> `optional` **prov:wasGeneratedBy?**: `string` \| `IJsonLdNodeObject`
|
|
254
262
|
|
|
255
263
|
An activity that generated, or provides the business context for, the creation of the dataset.
|
|
@@ -29,7 +29,7 @@ The options for the service.
|
|
|
29
29
|
|
|
30
30
|
## Properties
|
|
31
31
|
|
|
32
|
-
### CLASS\_NAME
|
|
32
|
+
### CLASS\_NAME {#class_name}
|
|
33
33
|
|
|
34
34
|
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
35
35
|
|
|
@@ -37,7 +37,7 @@ Runtime name for the class.
|
|
|
37
37
|
|
|
38
38
|
## Methods
|
|
39
39
|
|
|
40
|
-
### className()
|
|
40
|
+
### className() {#classname}
|
|
41
41
|
|
|
42
42
|
> **className**(): `string`
|
|
43
43
|
|
|
@@ -55,29 +55,31 @@ The class name of the component.
|
|
|
55
55
|
|
|
56
56
|
***
|
|
57
57
|
|
|
58
|
-
### get()
|
|
58
|
+
### get() {#get}
|
|
59
59
|
|
|
60
|
-
> **get**(`
|
|
60
|
+
> **get**(`datasetId`, `trustPayload`): `Promise`\<`IDataspaceProtocolCatalogError` \| `IDcatDataset`\>
|
|
61
61
|
|
|
62
62
|
Retrieve a dataset by its unique identifier.
|
|
63
63
|
|
|
64
64
|
#### Parameters
|
|
65
65
|
|
|
66
|
-
#####
|
|
66
|
+
##### datasetId
|
|
67
67
|
|
|
68
68
|
`string`
|
|
69
69
|
|
|
70
70
|
The unique identifier of the dataset.
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
##### trustPayload
|
|
73
|
+
|
|
74
|
+
`unknown`
|
|
73
75
|
|
|
74
|
-
|
|
76
|
+
Optional payload for trust evaluation, if applicable.
|
|
75
77
|
|
|
76
|
-
|
|
78
|
+
#### Returns
|
|
77
79
|
|
|
78
|
-
|
|
80
|
+
`Promise`\<`IDataspaceProtocolCatalogError` \| `IDcatDataset`\>
|
|
79
81
|
|
|
80
|
-
|
|
82
|
+
The dataset if found, or a CatalogError if not found or an error occurs.
|
|
81
83
|
|
|
82
84
|
#### Implementation of
|
|
83
85
|
|
|
@@ -85,24 +87,31 @@ NotFoundError if the dataset does not exist.
|
|
|
85
87
|
|
|
86
88
|
***
|
|
87
89
|
|
|
88
|
-
### set()
|
|
90
|
+
### set() {#set}
|
|
89
91
|
|
|
90
|
-
> **set**(`
|
|
92
|
+
> **set**(`dataset`, `trustPayload`): `Promise`\<`string` \| `IDataspaceProtocolCatalogError`\>
|
|
91
93
|
|
|
92
94
|
Insert or update a dataset in the catalogue.
|
|
93
|
-
This method is internal and should not be exposed via REST endpoints.
|
|
94
95
|
|
|
95
96
|
#### Parameters
|
|
96
97
|
|
|
97
|
-
#####
|
|
98
|
+
##### dataset
|
|
98
99
|
|
|
99
|
-
`
|
|
100
|
+
`IDcatDataset`
|
|
100
101
|
|
|
101
102
|
The dataset to store.
|
|
102
103
|
|
|
104
|
+
##### trustPayload
|
|
105
|
+
|
|
106
|
+
`unknown`
|
|
107
|
+
|
|
108
|
+
Optional payload for trust evaluation, if applicable.
|
|
109
|
+
|
|
103
110
|
#### Returns
|
|
104
111
|
|
|
105
|
-
`Promise`\<`
|
|
112
|
+
`Promise`\<`string` \| `IDataspaceProtocolCatalogError`\>
|
|
113
|
+
|
|
114
|
+
The unique identifier of the stored dataset, or a CatalogError if an error occurs.
|
|
106
115
|
|
|
107
116
|
#### Implementation of
|
|
108
117
|
|
|
@@ -110,58 +119,86 @@ The dataset to store.
|
|
|
110
119
|
|
|
111
120
|
***
|
|
112
121
|
|
|
113
|
-
###
|
|
122
|
+
### remove() {#remove}
|
|
114
123
|
|
|
115
|
-
> **
|
|
124
|
+
> **remove**(`datasetId`, `trustPayload`): `Promise`\<`IDataspaceProtocolCatalogError` \| `undefined`\>
|
|
116
125
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
The filter payload is evaluated by the appropriate filter plugin based on its structure.
|
|
120
|
-
Pagination properties (cursor, limit) and filter type (@type) are extracted from the filter object.
|
|
126
|
+
Remove a dataset from the catalogue by its unique identifier.
|
|
127
|
+
Indexes are automatically removed as they are stored with the dataset.
|
|
121
128
|
|
|
122
129
|
#### Parameters
|
|
123
130
|
|
|
124
|
-
#####
|
|
131
|
+
##### datasetId
|
|
125
132
|
|
|
126
|
-
`
|
|
133
|
+
`string`
|
|
127
134
|
|
|
128
|
-
The
|
|
135
|
+
The unique identifier of the dataset to remove.
|
|
129
136
|
|
|
130
|
-
|
|
137
|
+
##### trustPayload
|
|
131
138
|
|
|
132
|
-
`
|
|
139
|
+
`unknown`
|
|
133
140
|
|
|
134
|
-
|
|
141
|
+
Optional payload for trust evaluation, if applicable.
|
|
135
142
|
|
|
136
|
-
####
|
|
143
|
+
#### Returns
|
|
137
144
|
|
|
138
|
-
|
|
145
|
+
`Promise`\<`IDataspaceProtocolCatalogError` \| `undefined`\>
|
|
146
|
+
|
|
147
|
+
Nothing, or a CatalogError if an error occurs.
|
|
139
148
|
|
|
140
149
|
#### Implementation of
|
|
141
150
|
|
|
142
|
-
`IFederatedCatalogueComponent.
|
|
151
|
+
`IFederatedCatalogueComponent.remove`
|
|
143
152
|
|
|
144
153
|
***
|
|
145
154
|
|
|
146
|
-
###
|
|
155
|
+
### query() {#query}
|
|
147
156
|
|
|
148
|
-
> **
|
|
157
|
+
> **query**(`filter`, `cursor`, `limit`, `trustPayload`): `Promise`\<\{ `result`: `IDataspaceProtocolCatalogError` \| `IDataspaceProtocolCatalog`; `cursor?`: `string`; \}\>
|
|
149
158
|
|
|
150
|
-
|
|
151
|
-
|
|
159
|
+
Execute a query against the catalogue using registered filter plugins.
|
|
160
|
+
Returns a DS Protocol compliant Catalog object with participantId.
|
|
161
|
+
|
|
162
|
+
The root catalog's participantId is the requesting participant (from context).
|
|
163
|
+
Own datasets (matching requestingParticipantId) go directly in root dataset[].
|
|
164
|
+
Other participants' datasets are grouped in nested catalog[] entries.
|
|
165
|
+
|
|
166
|
+
For anonymous requests (no context), uses the first publisher found as fallback.
|
|
167
|
+
Returns CatalogError 404 when no datasets exist, CatalogError 400 for invalid requests.
|
|
152
168
|
|
|
153
169
|
#### Parameters
|
|
154
170
|
|
|
155
|
-
#####
|
|
171
|
+
##### filter
|
|
156
172
|
|
|
157
|
-
`
|
|
173
|
+
`unknown`[] \| `undefined`
|
|
158
174
|
|
|
159
|
-
The
|
|
175
|
+
The filter criteria containing @type, optional cursor and limit properties.
|
|
176
|
+
|
|
177
|
+
##### cursor
|
|
178
|
+
|
|
179
|
+
`string` \| `undefined`
|
|
180
|
+
|
|
181
|
+
Optional cursor for pagination.
|
|
182
|
+
|
|
183
|
+
##### limit
|
|
184
|
+
|
|
185
|
+
`number` \| `undefined`
|
|
186
|
+
|
|
187
|
+
Optional limit for pagination.
|
|
188
|
+
|
|
189
|
+
##### trustPayload
|
|
190
|
+
|
|
191
|
+
`unknown`
|
|
192
|
+
|
|
193
|
+
Optional payload for trust evaluation, if applicable.
|
|
160
194
|
|
|
161
195
|
#### Returns
|
|
162
196
|
|
|
163
|
-
`Promise
|
|
197
|
+
`Promise`\<\{ `result`: `IDataspaceProtocolCatalogError` \| `IDataspaceProtocolCatalog`; `cursor?`: `string`; \}\>
|
|
198
|
+
|
|
199
|
+
Complete IDataspaceProtocolCatalog with @context, @id, @type, participantId, dataset/catalog,
|
|
200
|
+
or CatalogError if validation fails or an error occurs.
|
|
164
201
|
|
|
165
202
|
#### Implementation of
|
|
166
203
|
|
|
167
|
-
`IFederatedCatalogueComponent.
|
|
204
|
+
`IFederatedCatalogueComponent.query`
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
# Function: datasetEntityToModel()
|
|
2
2
|
|
|
3
|
-
> **datasetEntityToModel**(`entity`): `
|
|
3
|
+
> **datasetEntityToModel**(`entity`): `IDcatDataset`
|
|
4
4
|
|
|
5
|
-
Convert a Dataset entity to an
|
|
6
|
-
|
|
5
|
+
Convert a Dataset entity to an IDcatDataset model.
|
|
6
|
+
Maps entity.id back to model["@id"] and strips the storage-only id field.
|
|
7
7
|
|
|
8
8
|
## Parameters
|
|
9
9
|
|
|
10
10
|
### entity
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
[`Dataset`](../classes/Dataset.md) \| `Partial`\<[`Dataset`](../classes/Dataset.md)\>
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
The dataset entity from storage (may be partial from query results).
|
|
15
15
|
|
|
16
16
|
## Returns
|
|
17
17
|
|
|
18
|
-
`
|
|
18
|
+
`IDcatDataset`
|
|
19
19
|
|
|
20
|
-
The
|
|
20
|
+
The IDcatDataset model for API responses.
|
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
# Function: datasetModelToEntity()
|
|
2
2
|
|
|
3
|
-
> **datasetModelToEntity**(`model`): [`Dataset`](../classes/Dataset.md)
|
|
3
|
+
> **datasetModelToEntity**(`model`, `ownerId`): [`Dataset`](../classes/Dataset.md)
|
|
4
4
|
|
|
5
|
-
Convert an
|
|
6
|
-
|
|
7
|
-
Creates a shallow copy to avoid mutating the input model.
|
|
5
|
+
Convert an IDcatDataset model to a Dataset entity.
|
|
6
|
+
Maps model["@id"] to entity.id.
|
|
8
7
|
|
|
9
8
|
## Parameters
|
|
10
9
|
|
|
11
10
|
### model
|
|
12
11
|
|
|
13
|
-
`
|
|
12
|
+
`IDcatDataset`
|
|
14
13
|
|
|
15
|
-
The
|
|
14
|
+
The IDcatDataset model from API requests.
|
|
15
|
+
|
|
16
|
+
### ownerId
|
|
17
|
+
|
|
18
|
+
`string`
|
|
19
|
+
|
|
20
|
+
The owner ID to associate with the dataset entity.
|
|
16
21
|
|
|
17
22
|
## Returns
|
|
18
23
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Function: transformErrorToStatusCode()
|
|
2
|
+
|
|
3
|
+
> **transformErrorToStatusCode**(`result`): `HttpStatusCode` \| `undefined`
|
|
4
|
+
|
|
5
|
+
Transform the DS Protocol result to an HTTP status code.
|
|
6
|
+
|
|
7
|
+
## Parameters
|
|
8
|
+
|
|
9
|
+
### result
|
|
10
|
+
|
|
11
|
+
`unknown`
|
|
12
|
+
|
|
13
|
+
The result to transform.
|
|
14
|
+
|
|
15
|
+
## Returns
|
|
16
|
+
|
|
17
|
+
`HttpStatusCode` \| `undefined`
|
|
18
|
+
|
|
19
|
+
The transformed status code or undefined if no transformation was found or not an error.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Function: transformToCatalogError()
|
|
2
|
+
|
|
3
|
+
> **transformToCatalogError**(`error`): `IDataspaceProtocolCatalogError`
|
|
4
|
+
|
|
5
|
+
Transform an error to DS Protocol CatalogError format.
|
|
6
|
+
Used by both service and route layers to ensure consistent error responses.
|
|
7
|
+
|
|
8
|
+
## Parameters
|
|
9
|
+
|
|
10
|
+
### error
|
|
11
|
+
|
|
12
|
+
`unknown`
|
|
13
|
+
|
|
14
|
+
The error to transform.
|
|
15
|
+
|
|
16
|
+
## Returns
|
|
17
|
+
|
|
18
|
+
`IDataspaceProtocolCatalogError`
|
|
19
|
+
|
|
20
|
+
The CatalogError.
|
package/docs/reference/index.md
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
## Interfaces
|
|
9
9
|
|
|
10
|
+
- [IFederatedCatalogueServiceConfig](interfaces/IFederatedCatalogueServiceConfig.md)
|
|
10
11
|
- [IFederatedCatalogueServiceConstructorOptions](interfaces/IFederatedCatalogueServiceConstructorOptions.md)
|
|
11
12
|
|
|
12
13
|
## Variables
|
|
@@ -18,5 +19,7 @@
|
|
|
18
19
|
|
|
19
20
|
- [generateRestRoutesFederatedCatalogue](functions/generateRestRoutesFederatedCatalogue.md)
|
|
20
21
|
- [initSchema](functions/initSchema.md)
|
|
22
|
+
- [transformToCatalogError](functions/transformToCatalogError.md)
|
|
23
|
+
- [transformErrorToStatusCode](functions/transformErrorToStatusCode.md)
|
|
21
24
|
- [datasetEntityToModel](functions/datasetEntityToModel.md)
|
|
22
25
|
- [datasetModelToEntity](functions/datasetModelToEntity.md)
|