@twin.org/federated-catalogue-models 0.0.3-next.3 → 0.0.3-next.4
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/es/models/IFederatedCatalogueComponent.js.map +1 -1
- package/dist/es/models/IFederatedCatalogueFilter.js.map +1 -1
- package/dist/es/models/api/ICatalogRequestRequest.js.map +1 -1
- package/dist/es/models/api/ICatalogRequestResponse.js.map +1 -1
- package/dist/es/models/api/IGetDatasetResponse.js.map +1 -1
- package/dist/types/models/IFederatedCatalogueComponent.d.ts +4 -4
- package/dist/types/models/IFederatedCatalogueFilter.d.ts +3 -3
- package/dist/types/models/api/ICatalogRequestRequest.d.ts +2 -2
- package/dist/types/models/api/ICatalogRequestResponse.d.ts +2 -2
- package/dist/types/models/api/IGetDatasetResponse.d.ts +2 -2
- package/docs/changelog.md +7 -0
- package/docs/reference/interfaces/ICatalogRequestRequest.md +1 -1
- package/docs/reference/interfaces/ICatalogRequestResponse.md +1 -1
- package/docs/reference/interfaces/IFederatedCatalogueComponent.md +5 -5
- package/docs/reference/interfaces/IFederatedCatalogueFilter.md +3 -3
- package/docs/reference/interfaces/IGetDatasetResponse.md +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IFederatedCatalogueComponent.js","sourceRoot":"","sources":["../../../src/models/IFederatedCatalogueComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type {
|
|
1
|
+
{"version":3,"file":"IFederatedCatalogueComponent.js","sourceRoot":"","sources":["../../../src/models/IFederatedCatalogueComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type { IDcatCatalog, IDcatDataset } from \"@twin.org/standards-w3c-dcat\";\n\n/**\n * Interface describing a federated catalogue component.\n * Provides Dataspace Protocol-compliant catalog endpoints for dataset registry and query.\n */\nexport interface IFederatedCatalogueComponent extends IComponent {\n\t/**\n\t * Retrieve a dataset by its unique identifier.\n\t * @param dataSetId The unique identifier of the dataset.\n\t * @returns The dataset if found.\n\t * @throws NotFoundError if the dataset does not exist.\n\t */\n\tget(dataSetId: string): Promise<IDcatDataset>;\n\n\t/**\n\t * Insert or update a dataset in the catalogue.\n\t * This method is internal and should not be exposed via REST endpoints.\n\t * @param dataSet The dataset to store.\n\t * @returns Nothing.\n\t */\n\tset(dataSet: IDcatDataset): Promise<void>;\n\n\t/**\n\t * Execute a query against the catalogue using registered filter plugins.\n\t * Returns a complete DCAT Catalog object with proper JSON-LD context, metadata, and datasets.\n\t * Filter plugins must be registered in FilterFactory before service initialization.\n\t * The filter payload is evaluated by the appropriate filter plugin based on its structure.\n\t * Pagination properties (cursor, limit) and filter type (@type) should be included\n\t * within the filter object per Eclipse Dataspace Protocol JSON-LD extension patterns.\n\t * @param filter The filter criteria containing @type, optional cursor and limit properties.\n\t * @returns Complete ICatalog object with @context, @id, @type, dcat:dataset, and optional cursor.\n\t * @throws NotFoundError if the @type field is missing or if the filter type is not registered.\n\t */\n\tquery(filter?: unknown[]): Promise<IDcatCatalog>;\n\n\t/**\n\t * Remove a dataset from the catalogue by its unique identifier.\n\t * @param dataSetId The unique identifier of the dataset to remove.\n\t * @returns Nothing.\n\t */\n\tremove(dataSetId: string): Promise<void>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IFederatedCatalogueFilter.js","sourceRoot":"","sources":["../../../src/models/IFederatedCatalogueFilter.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type {
|
|
1
|
+
{"version":3,"file":"IFederatedCatalogueFilter.js","sourceRoot":"","sources":["../../../src/models/IFederatedCatalogueFilter.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type { IDcatDataset } from \"@twin.org/standards-w3c-dcat\";\n\n/**\n * Interface describing a filter plugin for the federated catalogue.\n * Filter plugins provide extensible query semantics and indexing strategies.\n * Filters are registered by name in the FilterFactory and do not need to self-identify.\n */\nexport interface IFederatedCatalogueFilter extends IComponent {\n\t/**\n\t * Execute a filter-specific query over the catalogue.\n\t * Each filter interprets the payload according to its own semantics.\n\t * Pagination properties (cursor, limit) are extracted from the filter object by the service layer.\n\t * @param filter The filter criteria (structure depends on the filter implementation).\n\t * @returns Object containing datasets matching the filter criteria and optional cursor for next page.\n\t */\n\tquery(filter: unknown): Promise<{ datasets: IDcatDataset[]; cursor?: string }>;\n\n\t/**\n\t * Generate filter indexes for a dataset to optimize future queries.\n\t * Indexes are stored as properties on the dataset entity itself.\n\t * @param dataSet The dataset to index.\n\t * @returns Record mapping filter-specific index keys to values.\n\t */\n\tcreateIndex(dataSet: IDcatDataset): Promise<{ [key: string]: unknown }>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ICatalogRequestRequest.js","sourceRoot":"","sources":["../../../../src/models/api/ICatalogRequestRequest.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type {
|
|
1
|
+
{"version":3,"file":"ICatalogRequestRequest.js","sourceRoot":"","sources":["../../../../src/models/api/ICatalogRequestRequest.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IDataspaceProtocolCatalogRequestMessage } from \"@twin.org/standards-dataspace-protocol\";\n\n/**\n * The request parameters for the catalog request method.\n */\nexport interface ICatalogRequestRequest {\n\t/**\n\t * The request body containing the catalog query.\n\t */\n\tbody: IDataspaceProtocolCatalogRequestMessage;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ICatalogRequestResponse.js","sourceRoot":"","sources":["../../../../src/models/api/ICatalogRequestResponse.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type {
|
|
1
|
+
{"version":3,"file":"ICatalogRequestResponse.js","sourceRoot":"","sources":["../../../../src/models/api/ICatalogRequestResponse.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IDcatCatalog } from \"@twin.org/standards-w3c-dcat\";\n\n/**\n * The response payload for the catalog request method.\n */\nexport interface ICatalogRequestResponse {\n\t/**\n\t * The response payload containing the catalog with matching datasets.\n\t */\n\tbody: IDcatCatalog;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IGetDatasetResponse.js","sourceRoot":"","sources":["../../../../src/models/api/IGetDatasetResponse.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type {
|
|
1
|
+
{"version":3,"file":"IGetDatasetResponse.js","sourceRoot":"","sources":["../../../../src/models/api/IGetDatasetResponse.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IDcatDataset } from \"@twin.org/standards-w3c-dcat\";\n\n/**\n * The response payload for the get dataset method.\n */\nexport interface IGetDatasetResponse {\n\t/**\n\t * The response payload containing the dataset.\n\t */\n\tbody: IDcatDataset;\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IComponent } from "@twin.org/core";
|
|
2
|
-
import type {
|
|
2
|
+
import type { IDcatCatalog, IDcatDataset } from "@twin.org/standards-w3c-dcat";
|
|
3
3
|
/**
|
|
4
4
|
* Interface describing a federated catalogue component.
|
|
5
5
|
* Provides Dataspace Protocol-compliant catalog endpoints for dataset registry and query.
|
|
@@ -11,14 +11,14 @@ export interface IFederatedCatalogueComponent extends IComponent {
|
|
|
11
11
|
* @returns The dataset if found.
|
|
12
12
|
* @throws NotFoundError if the dataset does not exist.
|
|
13
13
|
*/
|
|
14
|
-
get(dataSetId: string): Promise<
|
|
14
|
+
get(dataSetId: string): Promise<IDcatDataset>;
|
|
15
15
|
/**
|
|
16
16
|
* Insert or update a dataset in the catalogue.
|
|
17
17
|
* This method is internal and should not be exposed via REST endpoints.
|
|
18
18
|
* @param dataSet The dataset to store.
|
|
19
19
|
* @returns Nothing.
|
|
20
20
|
*/
|
|
21
|
-
set(dataSet:
|
|
21
|
+
set(dataSet: IDcatDataset): Promise<void>;
|
|
22
22
|
/**
|
|
23
23
|
* Execute a query against the catalogue using registered filter plugins.
|
|
24
24
|
* Returns a complete DCAT Catalog object with proper JSON-LD context, metadata, and datasets.
|
|
@@ -30,7 +30,7 @@ export interface IFederatedCatalogueComponent extends IComponent {
|
|
|
30
30
|
* @returns Complete ICatalog object with @context, @id, @type, dcat:dataset, and optional cursor.
|
|
31
31
|
* @throws NotFoundError if the @type field is missing or if the filter type is not registered.
|
|
32
32
|
*/
|
|
33
|
-
query(filter?: unknown[]): Promise<
|
|
33
|
+
query(filter?: unknown[]): Promise<IDcatCatalog>;
|
|
34
34
|
/**
|
|
35
35
|
* Remove a dataset from the catalogue by its unique identifier.
|
|
36
36
|
* @param dataSetId The unique identifier of the dataset to remove.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IComponent } from "@twin.org/core";
|
|
2
|
-
import type {
|
|
2
|
+
import type { IDcatDataset } from "@twin.org/standards-w3c-dcat";
|
|
3
3
|
/**
|
|
4
4
|
* Interface describing a filter plugin for the federated catalogue.
|
|
5
5
|
* Filter plugins provide extensible query semantics and indexing strategies.
|
|
@@ -14,7 +14,7 @@ export interface IFederatedCatalogueFilter extends IComponent {
|
|
|
14
14
|
* @returns Object containing datasets matching the filter criteria and optional cursor for next page.
|
|
15
15
|
*/
|
|
16
16
|
query(filter: unknown): Promise<{
|
|
17
|
-
datasets:
|
|
17
|
+
datasets: IDcatDataset[];
|
|
18
18
|
cursor?: string;
|
|
19
19
|
}>;
|
|
20
20
|
/**
|
|
@@ -23,7 +23,7 @@ export interface IFederatedCatalogueFilter extends IComponent {
|
|
|
23
23
|
* @param dataSet The dataset to index.
|
|
24
24
|
* @returns Record mapping filter-specific index keys to values.
|
|
25
25
|
*/
|
|
26
|
-
createIndex(dataSet:
|
|
26
|
+
createIndex(dataSet: IDcatDataset): Promise<{
|
|
27
27
|
[key: string]: unknown;
|
|
28
28
|
}>;
|
|
29
29
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IDataspaceProtocolCatalogRequestMessage } from "@twin.org/standards-dataspace-protocol";
|
|
2
2
|
/**
|
|
3
3
|
* The request parameters for the catalog request method.
|
|
4
4
|
*/
|
|
@@ -6,5 +6,5 @@ export interface ICatalogRequestRequest {
|
|
|
6
6
|
/**
|
|
7
7
|
* The request body containing the catalog query.
|
|
8
8
|
*/
|
|
9
|
-
body:
|
|
9
|
+
body: IDataspaceProtocolCatalogRequestMessage;
|
|
10
10
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IDcatCatalog } from "@twin.org/standards-w3c-dcat";
|
|
2
2
|
/**
|
|
3
3
|
* The response payload for the catalog request method.
|
|
4
4
|
*/
|
|
@@ -6,5 +6,5 @@ export interface ICatalogRequestResponse {
|
|
|
6
6
|
/**
|
|
7
7
|
* The response payload containing the catalog with matching datasets.
|
|
8
8
|
*/
|
|
9
|
-
body:
|
|
9
|
+
body: IDcatCatalog;
|
|
10
10
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IDcatDataset } from "@twin.org/standards-w3c-dcat";
|
|
2
2
|
/**
|
|
3
3
|
* The response payload for the get dataset method.
|
|
4
4
|
*/
|
|
@@ -6,5 +6,5 @@ export interface IGetDatasetResponse {
|
|
|
6
6
|
/**
|
|
7
7
|
* The response payload containing the dataset.
|
|
8
8
|
*/
|
|
9
|
-
body:
|
|
9
|
+
body: IDcatDataset;
|
|
10
10
|
}
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @twin.org/federated-catalogue-models - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.3-next.4](https://github.com/twinfoundation/federated-catalogue/compare/federated-catalogue-models-v0.0.3-next.3...federated-catalogue-models-v0.0.3-next.4) (2026-01-06)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* updates standards dependencies ([62f5d9c](https://github.com/twinfoundation/federated-catalogue/commit/62f5d9c6180bc27497ac43624ffd714e7ce65ce6))
|
|
9
|
+
|
|
3
10
|
## [0.0.3-next.3](https://github.com/twinfoundation/federated-catalogue/compare/federated-catalogue-models-v0.0.3-next.2...federated-catalogue-models-v0.0.3-next.3) (2025-11-28)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -11,7 +11,7 @@ Provides Dataspace Protocol-compliant catalog endpoints for dataset registry and
|
|
|
11
11
|
|
|
12
12
|
### get()
|
|
13
13
|
|
|
14
|
-
> **get**(`dataSetId`): `Promise`\<`
|
|
14
|
+
> **get**(`dataSetId`): `Promise`\<`IDcatDataset`\>
|
|
15
15
|
|
|
16
16
|
Retrieve a dataset by its unique identifier.
|
|
17
17
|
|
|
@@ -25,7 +25,7 @@ The unique identifier of the dataset.
|
|
|
25
25
|
|
|
26
26
|
#### Returns
|
|
27
27
|
|
|
28
|
-
`Promise`\<`
|
|
28
|
+
`Promise`\<`IDcatDataset`\>
|
|
29
29
|
|
|
30
30
|
The dataset if found.
|
|
31
31
|
|
|
@@ -46,7 +46,7 @@ This method is internal and should not be exposed via REST endpoints.
|
|
|
46
46
|
|
|
47
47
|
##### dataSet
|
|
48
48
|
|
|
49
|
-
`
|
|
49
|
+
`IDcatDataset`
|
|
50
50
|
|
|
51
51
|
The dataset to store.
|
|
52
52
|
|
|
@@ -60,7 +60,7 @@ Nothing.
|
|
|
60
60
|
|
|
61
61
|
### query()
|
|
62
62
|
|
|
63
|
-
> **query**(`filter?`): `Promise`\<`
|
|
63
|
+
> **query**(`filter?`): `Promise`\<`IDcatCatalog`\>
|
|
64
64
|
|
|
65
65
|
Execute a query against the catalogue using registered filter plugins.
|
|
66
66
|
Returns a complete DCAT Catalog object with proper JSON-LD context, metadata, and datasets.
|
|
@@ -79,7 +79,7 @@ The filter criteria containing @type, optional cursor and limit properties.
|
|
|
79
79
|
|
|
80
80
|
#### Returns
|
|
81
81
|
|
|
82
|
-
`Promise`\<`
|
|
82
|
+
`Promise`\<`IDcatCatalog`\>
|
|
83
83
|
|
|
84
84
|
Complete ICatalog object with @context, @id, @type, dcat:dataset, and optional cursor.
|
|
85
85
|
|
|
@@ -12,7 +12,7 @@ Filters are registered by name in the FilterFactory and do not need to self-iden
|
|
|
12
12
|
|
|
13
13
|
### query()
|
|
14
14
|
|
|
15
|
-
> **query**(`filter`): `Promise`\<\{ `datasets`: `
|
|
15
|
+
> **query**(`filter`): `Promise`\<\{ `datasets`: `IDcatDataset`[]; `cursor?`: `string`; \}\>
|
|
16
16
|
|
|
17
17
|
Execute a filter-specific query over the catalogue.
|
|
18
18
|
Each filter interprets the payload according to its own semantics.
|
|
@@ -28,7 +28,7 @@ The filter criteria (structure depends on the filter implementation).
|
|
|
28
28
|
|
|
29
29
|
#### Returns
|
|
30
30
|
|
|
31
|
-
`Promise`\<\{ `datasets`: `
|
|
31
|
+
`Promise`\<\{ `datasets`: `IDcatDataset`[]; `cursor?`: `string`; \}\>
|
|
32
32
|
|
|
33
33
|
Object containing datasets matching the filter criteria and optional cursor for next page.
|
|
34
34
|
|
|
@@ -45,7 +45,7 @@ Indexes are stored as properties on the dataset entity itself.
|
|
|
45
45
|
|
|
46
46
|
##### dataSet
|
|
47
47
|
|
|
48
|
-
`
|
|
48
|
+
`IDcatDataset`
|
|
49
49
|
|
|
50
50
|
The dataset to index.
|
|
51
51
|
|