@twin.org/standards-dataspace-protocol 0.0.3-next.7 → 0.0.3-next.8
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/dataTypes/catalogDataTypes.js +29 -3
- package/dist/es/dataTypes/catalogDataTypes.js.map +1 -1
- package/dist/es/dataTypes/contractNegotiationDataTypes.js +20 -20
- package/dist/es/dataTypes/contractNegotiationDataTypes.js.map +1 -1
- package/dist/es/dataTypes/transferProcessDataTypes.js +18 -18
- package/dist/es/dataTypes/transferProcessDataTypes.js.map +1 -1
- package/dist/es/index.js +5 -0
- package/dist/es/index.js.map +1 -1
- package/dist/es/models/catalog/IDataspaceProtocolCatalog.js +2 -0
- package/dist/es/models/catalog/IDataspaceProtocolCatalog.js.map +1 -0
- package/dist/es/models/catalog/IDataspaceProtocolDataService.js +2 -0
- package/dist/es/models/catalog/IDataspaceProtocolDataService.js.map +1 -0
- package/dist/es/models/catalog/IDataspaceProtocolDataset.js +2 -0
- package/dist/es/models/catalog/IDataspaceProtocolDataset.js.map +1 -0
- package/dist/es/models/catalog/IDataspaceProtocolDistribution.js +2 -0
- package/dist/es/models/catalog/IDataspaceProtocolDistribution.js.map +1 -0
- package/dist/es/models/dataspaceProtocolContexts.js +4 -0
- package/dist/es/models/dataspaceProtocolContexts.js.map +1 -1
- package/dist/es/schemas/DataspaceProtocolCatalog.json +11 -0
- package/dist/es/schemas/DataspaceProtocolDataset.json +11 -0
- package/dist/es/schemas-src/DataspaceProtocolDataService.json +11 -0
- package/dist/es/schemas-src/DataspaceProtocolDistribution.json +11 -0
- package/dist/es/utils/dataspaceProtocolHelper.js +102 -0
- package/dist/es/utils/dataspaceProtocolHelper.js.map +1 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/models/catalog/IDataspaceProtocolCatalog.d.ts +62 -0
- package/dist/types/models/catalog/IDataspaceProtocolDataService.d.ts +48 -0
- package/dist/types/models/catalog/IDataspaceProtocolDataset.d.ts +65 -0
- package/dist/types/models/catalog/IDataspaceProtocolDistribution.d.ts +69 -0
- package/dist/types/models/dataspaceProtocolContexts.d.ts +4 -0
- package/dist/types/utils/dataspaceProtocolHelper.d.ts +20 -0
- package/docs/changelog.md +24 -0
- package/docs/reference/classes/DataspaceProtocolHelper.md +41 -0
- package/docs/reference/index.md +5 -0
- package/docs/reference/interfaces/IDataspaceProtocolCatalog.md +96 -0
- package/docs/reference/interfaces/IDataspaceProtocolDataService.md +72 -0
- package/docs/reference/interfaces/IDataspaceProtocolDataset.md +90 -0
- package/docs/reference/interfaces/IDataspaceProtocolDistribution.md +98 -0
- package/docs/reference/variables/DataspaceProtocolContexts.md +6 -0
- package/locales/en.json +7 -1
- package/package.json +3 -3
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Interface: IDataspaceProtocolDataService
|
|
2
|
+
|
|
3
|
+
Data Service interface compliant with Eclipse Data Space Protocol.
|
|
4
|
+
|
|
5
|
+
This interface extends IDataService and enforces DS Protocol-specific requirements
|
|
6
|
+
by overriding properties with more specific types and constraints.
|
|
7
|
+
|
|
8
|
+
**Requirements per DS Protocol:**
|
|
9
|
+
- `@id` MUST be present for dataset identification (REQUIRED)
|
|
10
|
+
- endpointURL MUST be present (REQUIRED)
|
|
11
|
+
|
|
12
|
+
**Type System Design:**
|
|
13
|
+
- Interface extension allows TypeScript to override inherited property types
|
|
14
|
+
- Standards packages (@twin.org/standards-w3c-*) follow W3C specs exactly
|
|
15
|
+
- DS Protocol-specific constraints are defined here
|
|
16
|
+
|
|
17
|
+
## See
|
|
18
|
+
|
|
19
|
+
- https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1-err1/#lower-level-types
|
|
20
|
+
- https://www.w3.org/TR/vocab-dcat-3/ - W3C DCAT v3 spec
|
|
21
|
+
|
|
22
|
+
## Extends
|
|
23
|
+
|
|
24
|
+
- `Omit`\<`IDcatDataService`, `"@type"` \| `"@context"` \| `"dcat:servesDataset"` \| `"dcat:endpointURL"`\>
|
|
25
|
+
|
|
26
|
+
## Indexable
|
|
27
|
+
|
|
28
|
+
\[`key`: `string`\]: `string` \| `number` \| `boolean` \| `IJsonLdContextDefinition` \| `string`[] \| `IJsonLdNodeObject` \| `IJsonLdGraphObject` \| `object` & `object` \| `object` & `object` \| `object` & `object` \| `IJsonLdListObject` \| `IJsonLdSetObject` \| `IJsonLdNodePrimitive`[] \| `IJsonLdLanguageMap` \| `IJsonLdIndexMap` \| `IJsonLdNodeObject`[] \| `IJsonLdIdMap` \| `IJsonLdTypeMap` \| `IJsonLdContextDefinitionElement`[] \| `IJsonLdJsonObject` \| `IJsonLdJsonObject`[] \| \{\[`key`: `string`\]: `string`; \} \| `null` \| `undefined`
|
|
29
|
+
|
|
30
|
+
\[`key`: `number`\]: `string` \| `number` \| `boolean` \| `IJsonLdContextDefinition` \| `string`[] \| `IJsonLdNodeObject` \| `IJsonLdGraphObject` \| `object` & `object` \| `object` & `object` \| `object` & `object` \| `IJsonLdListObject` \| `IJsonLdSetObject` \| `IJsonLdNodePrimitive`[] \| `IJsonLdLanguageMap` \| `IJsonLdIndexMap` \| `IJsonLdNodeObject`[] \| `IJsonLdIdMap` \| `IJsonLdTypeMap` \| `IJsonLdContextDefinitionElement`[] \| `IJsonLdJsonObject` \| `IJsonLdJsonObject`[] \| \{\[`key`: `string`\]: `string`; \} \| `null` \| `undefined`
|
|
31
|
+
|
|
32
|
+
## Properties
|
|
33
|
+
|
|
34
|
+
### @context
|
|
35
|
+
|
|
36
|
+
> **@context**: [`DataspaceProtocolContextType`](../type-aliases/DataspaceProtocolContextType.md)
|
|
37
|
+
|
|
38
|
+
LD Context. Required per Eclipse Data Space Protocol.
|
|
39
|
+
|
|
40
|
+
***
|
|
41
|
+
|
|
42
|
+
### @type
|
|
43
|
+
|
|
44
|
+
> **@type**: `"DataService"`
|
|
45
|
+
|
|
46
|
+
The type identifier for the Data Service.
|
|
47
|
+
REQUIRED per Eclipse Data Space Protocol.
|
|
48
|
+
|
|
49
|
+
***
|
|
50
|
+
|
|
51
|
+
### @id
|
|
52
|
+
|
|
53
|
+
> **@id**: `string`
|
|
54
|
+
|
|
55
|
+
Unique identifier for the dataset.
|
|
56
|
+
REQUIRED per Eclipse Data Space Protocol.
|
|
57
|
+
|
|
58
|
+
***
|
|
59
|
+
|
|
60
|
+
### endpointURL
|
|
61
|
+
|
|
62
|
+
> **endpointURL**: `string`
|
|
63
|
+
|
|
64
|
+
Endpoint URL
|
|
65
|
+
|
|
66
|
+
***
|
|
67
|
+
|
|
68
|
+
### servesDataset?
|
|
69
|
+
|
|
70
|
+
> `optional` **servesDataset**: `ObjectOrArray`\<[`IDataspaceProtocolDataset`](IDataspaceProtocolDataset.md)\>
|
|
71
|
+
|
|
72
|
+
Datasets served.
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Interface: IDataspaceProtocolDataset
|
|
2
|
+
|
|
3
|
+
Dataset interface compliant with Eclipse Data Space Protocol.
|
|
4
|
+
|
|
5
|
+
This interface extends IDataset and enforces DS Protocol-specific requirements
|
|
6
|
+
by overriding properties with more specific types and constraints.
|
|
7
|
+
|
|
8
|
+
**Requirements per DS Protocol:**
|
|
9
|
+
- `@id` MUST be present for dataset identification (REQUIRED)
|
|
10
|
+
- `odrl:hasPolicy` MUST be present as an array of ODRL Offers (REQUIRED)
|
|
11
|
+
- Array MUST contain at least one IOdrlOffer
|
|
12
|
+
- Each Offer MUST have `@type`: "Offer"
|
|
13
|
+
- Each Offer MUST have `@id` or `uid` for identification
|
|
14
|
+
- `dcat:distribution` MUST be present (REQUIRED)
|
|
15
|
+
|
|
16
|
+
**Type System Design:**
|
|
17
|
+
- W3C DCAT spec defines `odrl:hasPolicy` as optional singular `IOdrlPolicy`
|
|
18
|
+
- DS Protocol requires it as a REQUIRED array of `IOdrlOffer`
|
|
19
|
+
- Interface extension allows TypeScript to override inherited property types
|
|
20
|
+
- Standards packages (@twin.org/standards-w3c-*) follow W3C specs exactly
|
|
21
|
+
- DS Protocol-specific constraints are defined here
|
|
22
|
+
|
|
23
|
+
**Future Compatibility:**
|
|
24
|
+
- Currently only one Offer per dataset is supported
|
|
25
|
+
- Array structure allows future support for multiple offers
|
|
26
|
+
|
|
27
|
+
## See
|
|
28
|
+
|
|
29
|
+
- https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1-err1/#lower-level-types
|
|
30
|
+
- https://www.w3.org/TR/vocab-dcat-3/ - W3C DCAT v3 spec
|
|
31
|
+
- IOdrlOffer from @twin.org/standards-w3c-odrl
|
|
32
|
+
- IResource.odrl:hasPolicy from @twin.org/standards-w3c-dcat
|
|
33
|
+
|
|
34
|
+
## Extends
|
|
35
|
+
|
|
36
|
+
- `Omit`\<`IDcatDataset`, `"odrl:hasPolicy"` \| `"dcat:distribution"` \| `"@type"` \| `"@context"`\>
|
|
37
|
+
|
|
38
|
+
## Indexable
|
|
39
|
+
|
|
40
|
+
\[`key`: `string`\]: `string` \| `number` \| `boolean` \| `IJsonLdContextDefinition` \| `string`[] \| `IJsonLdNodeObject` \| `IJsonLdGraphObject` \| `object` & `object` \| `object` & `object` \| `object` & `object` \| `IJsonLdListObject` \| `IJsonLdSetObject` \| `IJsonLdNodePrimitive`[] \| `IJsonLdLanguageMap` \| `IJsonLdIndexMap` \| `IJsonLdNodeObject`[] \| `IJsonLdIdMap` \| `IJsonLdTypeMap` \| `IJsonLdContextDefinitionElement`[] \| `IJsonLdJsonObject` \| `IJsonLdJsonObject`[] \| \{\[`key`: `string`\]: `string`; \} \| `null` \| `undefined`
|
|
41
|
+
|
|
42
|
+
\[`key`: `number`\]: `string` \| `number` \| `boolean` \| `IJsonLdContextDefinition` \| `string`[] \| `IJsonLdNodeObject` \| `IJsonLdGraphObject` \| `object` & `object` \| `object` & `object` \| `object` & `object` \| `IJsonLdListObject` \| `IJsonLdSetObject` \| `IJsonLdNodePrimitive`[] \| `IJsonLdLanguageMap` \| `IJsonLdIndexMap` \| `IJsonLdNodeObject`[] \| `IJsonLdIdMap` \| `IJsonLdTypeMap` \| `IJsonLdContextDefinitionElement`[] \| `IJsonLdJsonObject` \| `IJsonLdJsonObject`[] \| \{\[`key`: `string`\]: `string`; \} \| `null` \| `undefined`
|
|
43
|
+
|
|
44
|
+
## Properties
|
|
45
|
+
|
|
46
|
+
### @context
|
|
47
|
+
|
|
48
|
+
> **@context**: [`DataspaceProtocolContextType`](../type-aliases/DataspaceProtocolContextType.md)
|
|
49
|
+
|
|
50
|
+
LD Context. Required per Eclipse Data Space Protocol.
|
|
51
|
+
|
|
52
|
+
***
|
|
53
|
+
|
|
54
|
+
### @type
|
|
55
|
+
|
|
56
|
+
> **@type**: `"Dataset"`
|
|
57
|
+
|
|
58
|
+
The type identifier for the dataset.
|
|
59
|
+
REQUIRED per Eclipse Data Space Protocol.
|
|
60
|
+
|
|
61
|
+
***
|
|
62
|
+
|
|
63
|
+
### @id
|
|
64
|
+
|
|
65
|
+
> **@id**: `string`
|
|
66
|
+
|
|
67
|
+
Unique identifier for the dataset.
|
|
68
|
+
REQUIRED per Eclipse Data Space Protocol.
|
|
69
|
+
|
|
70
|
+
***
|
|
71
|
+
|
|
72
|
+
### hasPolicy
|
|
73
|
+
|
|
74
|
+
> **hasPolicy**: `ObjectOrArray`\<`IOdrlOffer`\>
|
|
75
|
+
|
|
76
|
+
Array of ODRL policies (Offers) as required by DS Protocol.
|
|
77
|
+
|
|
78
|
+
REQUIRED per Eclipse Data Space Protocol spec.
|
|
79
|
+
Must contain at least one IOdrlOffer.
|
|
80
|
+
Currently only single offer is supported, but array structure
|
|
81
|
+
allows for future multi-offer support.
|
|
82
|
+
|
|
83
|
+
***
|
|
84
|
+
|
|
85
|
+
### distribution
|
|
86
|
+
|
|
87
|
+
> **distribution**: `ObjectOrArray`\<[`IDataspaceProtocolDistribution`](IDataspaceProtocolDistribution.md)\>
|
|
88
|
+
|
|
89
|
+
Distribution of the dataset.
|
|
90
|
+
REQUIRED per Eclipse Data Space Protocol.
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# Interface: IDataspaceProtocolDistribution
|
|
2
|
+
|
|
3
|
+
Distribution interface compliant with Eclipse Data Space Protocol.
|
|
4
|
+
|
|
5
|
+
This interface extends IDistribution and enforces DS Protocol-specific requirements
|
|
6
|
+
by overriding properties with more specific types and constraints.
|
|
7
|
+
|
|
8
|
+
**Requirements per DS Protocol:**
|
|
9
|
+
- `@id` MUST be present for dataset identification (REQUIRED)
|
|
10
|
+
- `odrl:hasPolicy` MIGHT be present as an array of ODRL Offers (OPTIONAL)
|
|
11
|
+
- Array MUST contain at least one IOdrlOffer
|
|
12
|
+
- Each Offer MUST have `@type`: "Offer"
|
|
13
|
+
- `format` is REQUIRED.
|
|
14
|
+
|
|
15
|
+
**Type System Design:**
|
|
16
|
+
- W3C DCAT spec defines `odrl:hasPolicy` as optional singular `IOdrlPolicy`
|
|
17
|
+
- DS Protocol requires it as a REQUIRED array of `IOdrlOffer`
|
|
18
|
+
- Interface extension allows TypeScript to override inherited property types
|
|
19
|
+
- Standards packages (@twin.org/standards-w3c-*) follow W3C specs exactly
|
|
20
|
+
- DS Protocol-specific constraints are defined here
|
|
21
|
+
|
|
22
|
+
**Future Compatibility:**
|
|
23
|
+
- Currently only one Offer per dataset is supported
|
|
24
|
+
- Array structure allows future support for multiple offers
|
|
25
|
+
|
|
26
|
+
## See
|
|
27
|
+
|
|
28
|
+
- https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1-err1/#lower-level-types
|
|
29
|
+
- https://www.w3.org/TR/vocab-dcat-3/ - W3C DCAT v3 spec
|
|
30
|
+
- IOdrlOffer from @twin.org/standards-w3c-odrl
|
|
31
|
+
- IResource.odrl:hasPolicy from @twin.org/standards-w3c-dcat
|
|
32
|
+
|
|
33
|
+
## Extends
|
|
34
|
+
|
|
35
|
+
- `Omit`\<`IDcatDistribution`, `"odrl:hasPolicy"` \| `"@type"` \| `"@context"` \| `"dcterms:format"`\>
|
|
36
|
+
|
|
37
|
+
## Indexable
|
|
38
|
+
|
|
39
|
+
\[`key`: `string`\]: `string` \| `number` \| `boolean` \| `IJsonLdContextDefinition` \| `string`[] \| `IJsonLdNodeObject` \| `IJsonLdGraphObject` \| `object` & `object` \| `object` & `object` \| `object` & `object` \| `IJsonLdListObject` \| `IJsonLdSetObject` \| `IJsonLdNodePrimitive`[] \| `IJsonLdLanguageMap` \| `IJsonLdIndexMap` \| `IJsonLdNodeObject`[] \| `IJsonLdIdMap` \| `IJsonLdTypeMap` \| `IJsonLdContextDefinitionElement`[] \| `IJsonLdJsonObject` \| `IJsonLdJsonObject`[] \| \{\[`key`: `string`\]: `string`; \} \| `null` \| `undefined`
|
|
40
|
+
|
|
41
|
+
\[`key`: `number`\]: `string` \| `number` \| `boolean` \| `IJsonLdContextDefinition` \| `string`[] \| `IJsonLdNodeObject` \| `IJsonLdGraphObject` \| `object` & `object` \| `object` & `object` \| `object` & `object` \| `IJsonLdListObject` \| `IJsonLdSetObject` \| `IJsonLdNodePrimitive`[] \| `IJsonLdLanguageMap` \| `IJsonLdIndexMap` \| `IJsonLdNodeObject`[] \| `IJsonLdIdMap` \| `IJsonLdTypeMap` \| `IJsonLdContextDefinitionElement`[] \| `IJsonLdJsonObject` \| `IJsonLdJsonObject`[] \| \{\[`key`: `string`\]: `string`; \} \| `null` \| `undefined`
|
|
42
|
+
|
|
43
|
+
## Properties
|
|
44
|
+
|
|
45
|
+
### @context
|
|
46
|
+
|
|
47
|
+
> **@context**: [`DataspaceProtocolContextType`](../type-aliases/DataspaceProtocolContextType.md)
|
|
48
|
+
|
|
49
|
+
LD Context. Required per Eclipse Data Space Protocol.
|
|
50
|
+
|
|
51
|
+
***
|
|
52
|
+
|
|
53
|
+
### @type
|
|
54
|
+
|
|
55
|
+
> **@type**: `"Distribution"`
|
|
56
|
+
|
|
57
|
+
The type identifier for the Distribution.
|
|
58
|
+
REQUIRED per Eclipse Data Space Protocol.
|
|
59
|
+
|
|
60
|
+
***
|
|
61
|
+
|
|
62
|
+
### @id
|
|
63
|
+
|
|
64
|
+
> **@id**: `string`
|
|
65
|
+
|
|
66
|
+
Unique identifier for the dataset.
|
|
67
|
+
REQUIRED per Eclipse Data Space Protocol.
|
|
68
|
+
|
|
69
|
+
***
|
|
70
|
+
|
|
71
|
+
### hasPolicy?
|
|
72
|
+
|
|
73
|
+
> `optional` **hasPolicy**: `ObjectOrArray`\<`IOdrlOffer`\>
|
|
74
|
+
|
|
75
|
+
Array of ODRL policies (Offers) as required by DS Protocol.
|
|
76
|
+
|
|
77
|
+
REQUIRED per Eclipse Data Space Protocol spec.
|
|
78
|
+
Must contain at least one IOdrlOffer.
|
|
79
|
+
Currently only single offer is supported, but array structure
|
|
80
|
+
allows for future multi-offer support.
|
|
81
|
+
|
|
82
|
+
***
|
|
83
|
+
|
|
84
|
+
### accessService
|
|
85
|
+
|
|
86
|
+
> **accessService**: `string` \| [`IDataspaceProtocolDataService`](IDataspaceProtocolDataService.md)
|
|
87
|
+
|
|
88
|
+
Access service.
|
|
89
|
+
It can be a URI pointing to an access service or inline the access service itself
|
|
90
|
+
|
|
91
|
+
***
|
|
92
|
+
|
|
93
|
+
### format
|
|
94
|
+
|
|
95
|
+
> **format**: `string`
|
|
96
|
+
|
|
97
|
+
Distribution format.
|
|
98
|
+
REQUIRED per Eclipse Data Space Protocol.
|
|
@@ -12,6 +12,12 @@ The contexts for Dataspace Protocol Protocol.
|
|
|
12
12
|
|
|
13
13
|
The context root for Dataspace Protocol Protocol.
|
|
14
14
|
|
|
15
|
+
### DspNamespace
|
|
16
|
+
|
|
17
|
+
> `readonly` **DspNamespace**: `"https://w3id.org/dspace/2025/1/"` = `"https://w3id.org/dspace/2025/1/"`
|
|
18
|
+
|
|
19
|
+
The namespace.
|
|
20
|
+
|
|
15
21
|
### ContextRedirect
|
|
16
22
|
|
|
17
23
|
> `readonly` **ContextRedirect**: `"https://w3id.org/dspace/2025/1/context.jsonld"` = `"https://w3id.org/dspace/2025/1/context.jsonld"`
|
package/locales/en.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/standards-dataspace-protocol",
|
|
3
|
-
"version": "0.0.3-next.
|
|
3
|
+
"version": "0.0.3-next.8",
|
|
4
4
|
"description": "Models which define the structure of Dataspace Protocol",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "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.8",
|
|
21
|
+
"@twin.org/standards-w3c-odrl": "0.0.3-next.8",
|
|
22
22
|
"@twin.org/web": "next"
|
|
23
23
|
},
|
|
24
24
|
"main": "./dist/es/index.js",
|