@twin.org/federated-catalogue-models 0.0.3-next.12 → 0.0.3-next.14
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/docs/changelog.md +15 -1
- package/docs/examples.md +55 -1
- package/docs/reference/interfaces/ICatalogRequestRequest.md +5 -5
- package/docs/reference/interfaces/ICatalogRequestResponse.md +6 -6
- package/docs/reference/interfaces/IFederatedCatalogueComponent.md +4 -4
- package/docs/reference/interfaces/IFederatedCatalogueFilter.md +2 -2
- package/docs/reference/interfaces/IGetDatasetRequest.md +1 -1
- package/docs/reference/interfaces/IGetDatasetResponse.md +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Federated Catalogue Models
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This package defines shared data contracts for catalogue interactions, including request and response models used by service and client components. It provides a stable schema layer so integrations can exchange catalogue data in a consistent format.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
package/docs/changelog.md
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.0.3-next.14](https://github.com/twinfoundation/federated-catalogue/compare/federated-catalogue-models-v0.0.3-next.13...federated-catalogue-models-v0.0.3-next.14) (2026-03-20)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Miscellaneous Chores
|
|
7
|
+
|
|
8
|
+
* **federated-catalogue-models:** Synchronize repo versions
|
|
9
|
+
|
|
10
|
+
## [0.0.3-next.13](https://github.com/twinfoundation/federated-catalogue/compare/federated-catalogue-models-v0.0.3-next.12...federated-catalogue-models-v0.0.3-next.13) (2026-03-12)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Miscellaneous Chores
|
|
14
|
+
|
|
15
|
+
* **federated-catalogue-models:** Synchronize repo versions
|
|
2
16
|
|
|
3
17
|
## [0.0.3-next.12](https://github.com/twinfoundation/federated-catalogue/compare/federated-catalogue-models-v0.0.3-next.11...federated-catalogue-models-v0.0.3-next.12) (2026-03-06)
|
|
4
18
|
|
package/docs/examples.md
CHANGED
|
@@ -1 +1,55 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Federated Catalogue Models Examples
|
|
2
|
+
|
|
3
|
+
These examples show how to register, discover and resolve filter components so catalogue services can select filtering logic at runtime.
|
|
4
|
+
|
|
5
|
+
## FederatedCatalogueFilterFactory
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import { FederatedCatalogueFilterFactory } from '@twin.org/federated-catalogue-models';
|
|
9
|
+
|
|
10
|
+
FederatedCatalogueFilterFactory.clear();
|
|
11
|
+
|
|
12
|
+
FederatedCatalogueFilterFactory.register('PublisherFilter', () => ({
|
|
13
|
+
className() {
|
|
14
|
+
return 'PublisherFilter';
|
|
15
|
+
},
|
|
16
|
+
async query() {
|
|
17
|
+
return { datasets: [] };
|
|
18
|
+
},
|
|
19
|
+
async createIndex() {
|
|
20
|
+
return {};
|
|
21
|
+
}
|
|
22
|
+
}));
|
|
23
|
+
|
|
24
|
+
FederatedCatalogueFilterFactory.clear();
|
|
25
|
+
|
|
26
|
+
FederatedCatalogueFilterFactory.register('PublisherFilter', () => ({
|
|
27
|
+
className() {
|
|
28
|
+
return 'PublisherFilter';
|
|
29
|
+
},
|
|
30
|
+
async query() {
|
|
31
|
+
return { datasets: [] };
|
|
32
|
+
},
|
|
33
|
+
async createIndex() {
|
|
34
|
+
return {};
|
|
35
|
+
}
|
|
36
|
+
}));
|
|
37
|
+
|
|
38
|
+
const filterNames = FederatedCatalogueFilterFactory.names();
|
|
39
|
+
|
|
40
|
+
console.log(filterNames.includes('PublisherFilter')); // true
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
```typescript
|
|
44
|
+
import { FederatedCatalogueFilterFactory } from '@twin.org/federated-catalogue-models';
|
|
45
|
+
|
|
46
|
+
const filter = FederatedCatalogueFilterFactory.get('PublisherFilter');
|
|
47
|
+
const queryResult = await filter.query([
|
|
48
|
+
{
|
|
49
|
+
'@type': 'PublisherFilter'
|
|
50
|
+
}
|
|
51
|
+
]);
|
|
52
|
+
|
|
53
|
+
console.log(filter.className()); // PublisherFilter
|
|
54
|
+
console.log(queryResult.datasets.length); // 0
|
|
55
|
+
```
|
|
@@ -4,7 +4,7 @@ The request parameters for the catalog request method.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
### body
|
|
7
|
+
### body {#body}
|
|
8
8
|
|
|
9
9
|
> **body**: `IDataspaceProtocolCatalogRequestMessage`
|
|
10
10
|
|
|
@@ -12,21 +12,21 @@ The request body containing the catalog query.
|
|
|
12
12
|
|
|
13
13
|
***
|
|
14
14
|
|
|
15
|
-
### query?
|
|
15
|
+
### query? {#query}
|
|
16
16
|
|
|
17
|
-
> `optional` **query
|
|
17
|
+
> `optional` **query?**: `object`
|
|
18
18
|
|
|
19
19
|
Optional query parameters for pagination.
|
|
20
20
|
Used when following Link header URLs per DS Protocol spec.
|
|
21
21
|
|
|
22
22
|
#### cursor?
|
|
23
23
|
|
|
24
|
-
> `optional` **cursor
|
|
24
|
+
> `optional` **cursor?**: `string`
|
|
25
25
|
|
|
26
26
|
Opaque cursor token for pagination.
|
|
27
27
|
|
|
28
28
|
#### limit?
|
|
29
29
|
|
|
30
|
-
> `optional` **limit
|
|
30
|
+
> `optional` **limit?**: `string`
|
|
31
31
|
|
|
32
32
|
Limit for pagination.
|
|
@@ -5,28 +5,28 @@ Returns a DS Protocol compliant Catalog with participantId, or CatalogError if n
|
|
|
5
5
|
|
|
6
6
|
## Properties
|
|
7
7
|
|
|
8
|
-
### headers?
|
|
8
|
+
### headers? {#headers}
|
|
9
9
|
|
|
10
|
-
> `optional` **headers
|
|
10
|
+
> `optional` **headers?**: `object`
|
|
11
11
|
|
|
12
12
|
Optional headers including RFC 8288 Link header for pagination.
|
|
13
13
|
|
|
14
14
|
#### link?
|
|
15
15
|
|
|
16
|
-
> `optional` **link
|
|
16
|
+
> `optional` **link?**: `string` \| `string`[]
|
|
17
17
|
|
|
18
18
|
***
|
|
19
19
|
|
|
20
|
-
### statusCode?
|
|
20
|
+
### statusCode? {#statuscode}
|
|
21
21
|
|
|
22
|
-
> `optional` **statusCode
|
|
22
|
+
> `optional` **statusCode?**: `HttpStatusCode`
|
|
23
23
|
|
|
24
24
|
Response status code.
|
|
25
25
|
Per DS Protocol: Returns appropriate HTTP code (e.g., 404) when returning CatalogError.
|
|
26
26
|
|
|
27
27
|
***
|
|
28
28
|
|
|
29
|
-
### body
|
|
29
|
+
### body {#body}
|
|
30
30
|
|
|
31
31
|
> **body**: `IDataspaceProtocolCatalog` \| `IDataspaceProtocolCatalogError`
|
|
32
32
|
|
|
@@ -9,7 +9,7 @@ Provides Dataspace Protocol-compliant catalog endpoints for dataset registry and
|
|
|
9
9
|
|
|
10
10
|
## Methods
|
|
11
11
|
|
|
12
|
-
### get()
|
|
12
|
+
### get() {#get}
|
|
13
13
|
|
|
14
14
|
> **get**(`dataSetId`): `Promise`\<`IDcatDataset` \| `IDataspaceProtocolCatalogError`\>
|
|
15
15
|
|
|
@@ -31,7 +31,7 @@ The dataset if found, or a CatalogError if not found or an error occurs.
|
|
|
31
31
|
|
|
32
32
|
***
|
|
33
33
|
|
|
34
|
-
### set()
|
|
34
|
+
### set() {#set}
|
|
35
35
|
|
|
36
36
|
> **set**(`dataSet`): `Promise`\<`void`\>
|
|
37
37
|
|
|
@@ -54,7 +54,7 @@ Nothing.
|
|
|
54
54
|
|
|
55
55
|
***
|
|
56
56
|
|
|
57
|
-
### query()
|
|
57
|
+
### query() {#query}
|
|
58
58
|
|
|
59
59
|
> **query**(`filter?`, `cursor?`, `limit?`): `Promise`\<\{ `result`: `IDataspaceProtocolCatalog` \| `IDataspaceProtocolCatalogError`; `cursor?`: `string`; \}\>
|
|
60
60
|
|
|
@@ -97,7 +97,7 @@ or IDataspaceProtocolCatalogError if no datasets found.
|
|
|
97
97
|
|
|
98
98
|
***
|
|
99
99
|
|
|
100
|
-
### remove()
|
|
100
|
+
### remove() {#remove}
|
|
101
101
|
|
|
102
102
|
> **remove**(`dataSetId`): `Promise`\<`void`\>
|
|
103
103
|
|
|
@@ -10,7 +10,7 @@ Filters are registered by name in the FilterFactory and do not need to self-iden
|
|
|
10
10
|
|
|
11
11
|
## Methods
|
|
12
12
|
|
|
13
|
-
### query()
|
|
13
|
+
### query() {#query}
|
|
14
14
|
|
|
15
15
|
> **query**(`filter`, `cursor?`, `limit?`): `Promise`\<\{ `datasets`: `IDcatDataset`[]; `cursor?`: `string`; \}\>
|
|
16
16
|
|
|
@@ -45,7 +45,7 @@ Object containing datasets matching the filter criteria and optional cursor for
|
|
|
45
45
|
|
|
46
46
|
***
|
|
47
47
|
|
|
48
|
-
### createIndex()
|
|
48
|
+
### createIndex() {#createindex}
|
|
49
49
|
|
|
50
50
|
> **createIndex**(`dataSet`): `Promise`\<\{\[`key`: `string`\]: `unknown`; \}\>
|
|
51
51
|
|
|
@@ -4,15 +4,15 @@ The response payload for the get dataset method.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
### statusCode?
|
|
7
|
+
### statusCode? {#statuscode}
|
|
8
8
|
|
|
9
|
-
> `optional` **statusCode
|
|
9
|
+
> `optional` **statusCode?**: `HttpStatusCode`
|
|
10
10
|
|
|
11
11
|
Response status code.
|
|
12
12
|
|
|
13
13
|
***
|
|
14
14
|
|
|
15
|
-
### body
|
|
15
|
+
### body {#body}
|
|
16
16
|
|
|
17
17
|
> **body**: `IDcatDataset` \| `IDataspaceProtocolCatalogError`
|
|
18
18
|
|