@twin.org/standards-dataspace-protocol 0.0.3-next.50 → 0.0.3-next.52
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 +34 -0
- package/docs/examples.md +46 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# TWIN Standards Dataspace Protocol
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This package provides data models for the [Dataspace Protocol specification](https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1/), helping participants exchange catalogue and agreement information consistently.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.3-next.52](https://github.com/twinfoundation/standards/compare/standards-dataspace-protocol-v0.0.3-next.51...standards-dataspace-protocol-v0.0.3-next.52) (2026-03-10)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Miscellaneous Chores
|
|
7
|
+
|
|
8
|
+
* **standards-dataspace-protocol:** Synchronize repo versions
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* @twin.org/standards-w3c-dcat bumped from 0.0.3-next.51 to 0.0.3-next.52
|
|
16
|
+
* @twin.org/standards-w3c-odrl bumped from 0.0.3-next.51 to 0.0.3-next.52
|
|
17
|
+
* devDependencies
|
|
18
|
+
* @twin.org/standards-ld-contexts bumped from 0.0.3-next.51 to 0.0.3-next.52
|
|
19
|
+
|
|
20
|
+
## [0.0.3-next.51](https://github.com/twinfoundation/standards/compare/standards-dataspace-protocol-v0.0.3-next.50...standards-dataspace-protocol-v0.0.3-next.51) (2026-03-10)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Miscellaneous Chores
|
|
24
|
+
|
|
25
|
+
* **standards-dataspace-protocol:** Synchronize repo versions
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Dependencies
|
|
29
|
+
|
|
30
|
+
* The following workspace dependencies were updated
|
|
31
|
+
* dependencies
|
|
32
|
+
* @twin.org/standards-w3c-dcat bumped from 0.0.3-next.50 to 0.0.3-next.51
|
|
33
|
+
* @twin.org/standards-w3c-odrl bumped from 0.0.3-next.50 to 0.0.3-next.51
|
|
34
|
+
* devDependencies
|
|
35
|
+
* @twin.org/standards-ld-contexts bumped from 0.0.3-next.50 to 0.0.3-next.51
|
|
36
|
+
|
|
3
37
|
## [0.0.3-next.50](https://github.com/twinfoundation/standards/compare/standards-dataspace-protocol-v0.0.3-next.49...standards-dataspace-protocol-v0.0.3-next.50) (2026-03-09)
|
|
4
38
|
|
|
5
39
|
|
package/docs/examples.md
CHANGED
|
@@ -1 +1,46 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Standards Dataspace Protocol Examples
|
|
2
|
+
|
|
3
|
+
These snippets show how to prepare payloads for conformance checks and register protocol data types for processing flows.
|
|
4
|
+
|
|
5
|
+
## DataspaceProtocolHelper
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import type { IValidationFailure } from '@twin.org/core';
|
|
9
|
+
import type { IJsonLdNodeObject } from '@twin.org/data-json-ld';
|
|
10
|
+
import {
|
|
11
|
+
DataspaceProtocolHelper,
|
|
12
|
+
DataspaceProtocolTransferProcessTypes
|
|
13
|
+
} from '@twin.org/standards-dataspace-protocol';
|
|
14
|
+
|
|
15
|
+
const payload: IJsonLdNodeObject = {
|
|
16
|
+
'@context': 'https://w3id.org/dspace/2025/1/context.json',
|
|
17
|
+
'@type': DataspaceProtocolTransferProcessTypes.TransferProcess,
|
|
18
|
+
state: 'STARTED'
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const failures: IValidationFailure[] = [];
|
|
22
|
+
const normalised = await DataspaceProtocolHelper.normalize(payload);
|
|
23
|
+
const isConformant = await DataspaceProtocolHelper.checkConformance(normalised, failures);
|
|
24
|
+
|
|
25
|
+
console.log(isConformant); // true
|
|
26
|
+
console.log(failures.length); // 0
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Data Types
|
|
30
|
+
|
|
31
|
+
```typescript
|
|
32
|
+
import {
|
|
33
|
+
CatalogDataTypes,
|
|
34
|
+
ContractNegotiationDataTypes,
|
|
35
|
+
DataspaceProtocolDataTypes,
|
|
36
|
+
TransferProcessDataTypes
|
|
37
|
+
} from '@twin.org/standards-dataspace-protocol';
|
|
38
|
+
|
|
39
|
+
DataspaceProtocolDataTypes.registerRedirects();
|
|
40
|
+
DataspaceProtocolDataTypes.registerTypes();
|
|
41
|
+
CatalogDataTypes.registerTypes();
|
|
42
|
+
ContractNegotiationDataTypes.registerTypes();
|
|
43
|
+
TransferProcessDataTypes.registerTypes();
|
|
44
|
+
|
|
45
|
+
console.log(typeof DataspaceProtocolDataTypes.registerTypes === 'function'); // true
|
|
46
|
+
```
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/standards-dataspace-protocol",
|
|
3
|
-
"version": "0.0.3-next.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.0.3-next.52",
|
|
4
|
+
"description": "Data models for the Dataspace Protocol specification.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/twinfoundation/standards.git",
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"@twin.org/core": "next",
|
|
18
18
|
"@twin.org/data-core": "next",
|
|
19
19
|
"@twin.org/data-json-ld": "next",
|
|
20
|
-
"@twin.org/standards-w3c-dcat": "0.0.3-next.
|
|
21
|
-
"@twin.org/standards-w3c-odrl": "0.0.3-next.
|
|
20
|
+
"@twin.org/standards-w3c-dcat": "0.0.3-next.52",
|
|
21
|
+
"@twin.org/standards-w3c-odrl": "0.0.3-next.52",
|
|
22
22
|
"@twin.org/web": "next"
|
|
23
23
|
},
|
|
24
24
|
"main": "./dist/es/index.js",
|