@twin.org/standards-dataspace-protocol 0.0.3-next.53 → 0.0.3-next.55
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 +18 -39
- package/dist/es/dataTypes/catalogDataTypes.js.map +1 -1
- package/dist/es/dataTypes/dataspaceProtocolDataTypes.js +6 -0
- package/dist/es/dataTypes/dataspaceProtocolDataTypes.js.map +1 -1
- package/dist/es/index.js +10 -13
- package/dist/es/index.js.map +1 -1
- package/dist/es/models/catalog/dataspaceProtocolCatalogTypes.js +1 -33
- package/dist/es/models/catalog/dataspaceProtocolCatalogTypes.js.map +1 -1
- package/dist/es/models/contractNegotiation/IDataspaceProtocolContractAgreementMessage.js.map +1 -1
- package/dist/es/models/contractNegotiation/IDataspaceProtocolContractOfferMessage.js.map +1 -1
- package/dist/es/models/contractNegotiation/IDataspaceProtocolContractRequestMessage.js.map +1 -1
- package/dist/es/models/dataspaceProtocolContextType.js.map +1 -1
- package/dist/es/models/dcat3/IDataspaceProtocolCatalog.js.map +1 -1
- package/dist/es/models/dcat3/IDataspaceProtocolCatalogBase.js +2 -0
- package/dist/es/models/dcat3/IDataspaceProtocolCatalogBase.js.map +1 -0
- package/dist/es/models/dcat3/IDataspaceProtocolDataService.js.map +1 -1
- package/dist/es/models/dcat3/IDataspaceProtocolDataServiceBase.js +2 -0
- package/dist/es/models/dcat3/IDataspaceProtocolDataServiceBase.js.map +1 -0
- package/dist/es/models/dcat3/IDataspaceProtocolDataset.js.map +1 -1
- package/dist/es/models/dcat3/IDataspaceProtocolDatasetBase.js +2 -0
- package/dist/es/models/dcat3/IDataspaceProtocolDatasetBase.js.map +1 -0
- package/dist/es/models/dcat3/IDataspaceProtocolDistribution.js.map +1 -1
- package/dist/es/models/dcat3/IDataspaceProtocolDistributionBase.js +2 -0
- package/dist/es/models/dcat3/IDataspaceProtocolDistributionBase.js.map +1 -0
- package/dist/es/models/odrl/IDataspaceProtocolOffer.js.map +1 -1
- package/dist/es/models/odrl/IDataspaceProtocolOfferBase.js +2 -0
- package/dist/es/models/odrl/IDataspaceProtocolOfferBase.js.map +1 -0
- package/dist/es/schemas/DataspaceProtocolAgreement.json +181 -158
- package/dist/es/schemas/DataspaceProtocolCatalog.json +13 -3
- package/dist/es/schemas/DataspaceProtocolCatalogBase.json +428 -0
- package/dist/es/schemas/DataspaceProtocolCatalogError.json +4 -50
- package/dist/es/schemas/DataspaceProtocolCatalogRequestMessage.json +4 -50
- package/dist/es/schemas/DataspaceProtocolContextType.json +30 -0
- package/dist/es/schemas/DataspaceProtocolContractAgreementMessage.json +191 -52
- package/dist/es/schemas/DataspaceProtocolContractAgreementVerificationMessage.json +4 -50
- package/dist/es/schemas/DataspaceProtocolContractNegotiation.json +4 -50
- package/dist/es/schemas/DataspaceProtocolContractNegotiationError.json +4 -50
- package/dist/es/schemas/DataspaceProtocolContractNegotiationEventMessage.json +4 -50
- package/dist/es/schemas/DataspaceProtocolContractNegotiationEventType.json +11 -5
- package/dist/es/schemas/DataspaceProtocolContractNegotiationStateType.json +31 -10
- package/dist/es/schemas/DataspaceProtocolContractNegotiationTerminationMessage.json +4 -50
- package/dist/es/schemas/DataspaceProtocolContractOfferMessage.json +5 -51
- package/dist/es/schemas/DataspaceProtocolContractRequestMessage.json +5 -51
- package/dist/es/schemas/DataspaceProtocolDataAddress.json +2 -2
- package/dist/es/schemas/DataspaceProtocolDataService.json +21 -0
- package/dist/es/schemas/DataspaceProtocolDataServiceBase.json +285 -0
- package/dist/es/schemas/DataspaceProtocolDataset.json +13 -3
- package/dist/es/schemas/DataspaceProtocolDatasetBase.json +342 -0
- package/dist/es/schemas/DataspaceProtocolDatasetRequestMessage.json +4 -50
- package/dist/es/schemas/DataspaceProtocolDistribution.json +26 -0
- package/dist/es/schemas/DataspaceProtocolDistributionBase.json +170 -0
- package/dist/es/schemas/DataspaceProtocolEndpointProperty.json +2 -2
- package/dist/es/schemas/DataspaceProtocolOffer.json +10 -186
- package/dist/es/schemas/DataspaceProtocolOfferBase.json +219 -0
- package/dist/es/schemas/DataspaceProtocolPolicy.json +214 -202
- package/dist/es/schemas/DataspaceProtocolSet.json +225 -202
- package/dist/es/schemas/DataspaceProtocolTransferCompletionMessage.json +4 -50
- package/dist/es/schemas/DataspaceProtocolTransferError.json +4 -50
- package/dist/es/schemas/DataspaceProtocolTransferProcess.json +4 -50
- package/dist/es/schemas/DataspaceProtocolTransferRequestMessage.json +6 -52
- package/dist/es/schemas/DataspaceProtocolTransferStartMessage.json +5 -51
- package/dist/es/schemas/DataspaceProtocolTransferSuspensionMessage.json +4 -50
- package/dist/es/schemas/DataspaceProtocolTransferTerminationMessage.json +4 -50
- package/dist/es/utils/dataspaceProtocolHelper.js +27 -29
- package/dist/es/utils/dataspaceProtocolHelper.js.map +1 -1
- package/dist/types/index.d.ts +10 -13
- package/dist/types/models/catalog/dataspaceProtocolCatalogTypes.d.ts +0 -32
- package/dist/types/models/contractNegotiation/IDataspaceProtocolContractAgreementMessage.d.ts +3 -2
- package/dist/types/models/contractNegotiation/IDataspaceProtocolContractOfferMessage.d.ts +2 -2
- package/dist/types/models/contractNegotiation/IDataspaceProtocolContractRequestMessage.d.ts +2 -2
- package/dist/types/models/dataspaceProtocolContextType.d.ts +2 -9
- package/dist/types/models/dcat3/IDataspaceProtocolCatalog.d.ts +2 -37
- package/dist/types/models/dcat3/IDataspaceProtocolCatalogBase.d.ts +58 -0
- package/dist/types/models/dcat3/IDataspaceProtocolDataService.d.ts +2 -22
- package/dist/types/models/dcat3/IDataspaceProtocolDataServiceBase.d.ts +44 -0
- package/dist/types/models/dcat3/IDataspaceProtocolDataset.d.ts +2 -29
- package/dist/types/models/dcat3/IDataspaceProtocolDatasetBase.d.ts +61 -0
- package/dist/types/models/dcat3/IDataspaceProtocolDistribution.d.ts +4 -31
- package/dist/types/models/dcat3/IDataspaceProtocolDistributionBase.d.ts +66 -0
- package/dist/types/models/odrl/IDataspaceProtocolOffer.d.ts +7 -2
- package/dist/types/models/odrl/IDataspaceProtocolOfferBase.d.ts +18 -0
- package/dist/types/utils/dataspaceProtocolHelper.d.ts +2 -3
- package/docs/changelog.md +35 -0
- package/docs/examples.md +2 -4
- package/docs/reference/classes/CatalogDataTypes.md +1 -1
- package/docs/reference/classes/ContractNegotiationDataTypes.md +1 -1
- package/docs/reference/classes/DataspaceProtocolDataTypes.md +2 -2
- package/docs/reference/classes/DataspaceProtocolHelper.md +5 -11
- package/docs/reference/classes/TransferProcessDataTypes.md +1 -1
- package/docs/reference/index.md +5 -8
- package/docs/reference/interfaces/IDataspaceProtocolAgreement.md +20 -20
- package/docs/reference/interfaces/IDataspaceProtocolCatalog.md +110 -86
- package/docs/reference/interfaces/IDataspaceProtocolCatalogBase.md +570 -0
- package/docs/reference/interfaces/IDataspaceProtocolCatalogError.md +4 -4
- package/docs/reference/interfaces/IDataspaceProtocolCatalogRequestMessage.md +3 -3
- package/docs/reference/interfaces/IDataspaceProtocolContractAgreementMessage.md +7 -7
- package/docs/reference/interfaces/IDataspaceProtocolContractAgreementVerificationMessage.md +4 -4
- package/docs/reference/interfaces/IDataspaceProtocolContractNegotiation.md +5 -5
- package/docs/reference/interfaces/IDataspaceProtocolContractNegotiationError.md +6 -6
- package/docs/reference/interfaces/IDataspaceProtocolContractNegotiationEventMessage.md +5 -5
- package/docs/reference/interfaces/IDataspaceProtocolContractNegotiationTerminationMessage.md +6 -6
- package/docs/reference/interfaces/IDataspaceProtocolContractOfferMessage.md +7 -7
- package/docs/reference/interfaces/IDataspaceProtocolContractRequestMessage.md +7 -7
- package/docs/reference/interfaces/IDataspaceProtocolDataAddress.md +4 -4
- package/docs/reference/interfaces/IDataspaceProtocolDataService.md +70 -58
- package/docs/reference/interfaces/IDataspaceProtocolDataServiceBase.md +387 -0
- package/docs/reference/interfaces/IDataspaceProtocolDataset.md +80 -68
- package/docs/reference/interfaces/IDataspaceProtocolDatasetBase.md +484 -0
- package/docs/reference/interfaces/IDataspaceProtocolDatasetRequestMessage.md +3 -3
- package/docs/reference/interfaces/IDataspaceProtocolDistribution.md +72 -56
- package/docs/reference/interfaces/IDataspaceProtocolDistributionBase.md +381 -0
- package/docs/reference/interfaces/IDataspaceProtocolEndpointProperty.md +3 -3
- package/docs/reference/interfaces/IDataspaceProtocolOffer.md +43 -44
- package/docs/reference/interfaces/IDataspaceProtocolOfferBase.md +171 -0
- package/docs/reference/interfaces/IDataspaceProtocolPolicy.md +22 -22
- package/docs/reference/interfaces/IDataspaceProtocolSet.md +22 -22
- package/docs/reference/interfaces/IDataspaceProtocolTransferCompletionMessage.md +4 -4
- package/docs/reference/interfaces/IDataspaceProtocolTransferError.md +6 -6
- package/docs/reference/interfaces/IDataspaceProtocolTransferProcess.md +5 -5
- package/docs/reference/interfaces/IDataspaceProtocolTransferRequestMessage.md +7 -7
- package/docs/reference/interfaces/IDataspaceProtocolTransferStartMessage.md +5 -5
- package/docs/reference/interfaces/IDataspaceProtocolTransferSuspensionMessage.md +6 -6
- package/docs/reference/interfaces/IDataspaceProtocolTransferTerminationMessage.md +6 -6
- package/docs/reference/type-aliases/DataspaceProtocolContextType.md +1 -1
- package/docs/reference/variables/DataspaceProtocolCatalogTypes.md +11 -59
- package/docs/reference/variables/DataspaceProtocolContexts.md +4 -4
- package/docs/reference/variables/DataspaceProtocolContractNegotiationEventType.md +2 -2
- package/docs/reference/variables/DataspaceProtocolContractNegotiationStateType.md +7 -7
- package/docs/reference/variables/DataspaceProtocolContractNegotiationTypes.md +10 -10
- package/docs/reference/variables/DataspaceProtocolEndpointType.md +4 -4
- package/docs/reference/variables/DataspaceProtocolTransferProcessStateType.md +5 -5
- package/docs/reference/variables/DataspaceProtocolTransferProcessTypes.md +9 -9
- package/locales/en.json +3 -0
- package/package.json +3 -3
- package/dist/es/models/dcat3/IDataspaceProtocolCatalogNoContext.js +0 -2
- package/dist/es/models/dcat3/IDataspaceProtocolCatalogNoContext.js.map +0 -1
- package/dist/es/models/dcat3/IDataspaceProtocolDataServiceNoContext.js +0 -2
- package/dist/es/models/dcat3/IDataspaceProtocolDataServiceNoContext.js.map +0 -1
- package/dist/es/models/dcat3/IDataspaceProtocolDatasetNoContext.js +0 -2
- package/dist/es/models/dcat3/IDataspaceProtocolDatasetNoContext.js.map +0 -1
- package/dist/es/models/dcat3/IDataspaceProtocolDistributionNoContext.js +0 -2
- package/dist/es/models/dcat3/IDataspaceProtocolDistributionNoContext.js.map +0 -1
- package/dist/es/models/odrl/IDataspaceProtocolAgreementNoContext.js +0 -2
- package/dist/es/models/odrl/IDataspaceProtocolAgreementNoContext.js.map +0 -1
- package/dist/es/models/odrl/IDataspaceProtocolOfferNoContext.js +0 -2
- package/dist/es/models/odrl/IDataspaceProtocolOfferNoContext.js.map +0 -1
- package/dist/es/models/odrl/IDataspaceProtocolPolicyNoContext.js +0 -2
- package/dist/es/models/odrl/IDataspaceProtocolPolicyNoContext.js.map +0 -1
- package/dist/es/models/odrl/IDataspaceProtocolSetNoContext.js +0 -2
- package/dist/es/models/odrl/IDataspaceProtocolSetNoContext.js.map +0 -1
- package/dist/es/schemas/DataspaceProtocolAgreementNoContext.json +0 -6
- package/dist/es/schemas/DataspaceProtocolCatalogNoContext.json +0 -6
- package/dist/es/schemas/DataspaceProtocolDataServiceNoContext.json +0 -6
- package/dist/es/schemas/DataspaceProtocolDatasetNoContext.json +0 -6
- package/dist/es/schemas/DataspaceProtocolDistributionNoContext.json +0 -6
- package/dist/es/schemas/DataspaceProtocolOfferNoContext.json +0 -6
- package/dist/es/schemas/DataspaceProtocolPolicyNoContext.json +0 -6
- package/dist/es/schemas/DataspaceProtocolSetNoContext.json +0 -6
- package/dist/es/schemas-src/DataspaceProtocolDataService.json +0 -11
- package/dist/es/schemas-src/DataspaceProtocolDistribution.json +0 -11
- package/dist/types/models/dcat3/IDataspaceProtocolCatalogNoContext.d.ts +0 -5
- package/dist/types/models/dcat3/IDataspaceProtocolDataServiceNoContext.d.ts +0 -5
- package/dist/types/models/dcat3/IDataspaceProtocolDatasetNoContext.d.ts +0 -5
- package/dist/types/models/dcat3/IDataspaceProtocolDistributionNoContext.d.ts +0 -5
- package/dist/types/models/odrl/IDataspaceProtocolAgreementNoContext.d.ts +0 -5
- package/dist/types/models/odrl/IDataspaceProtocolOfferNoContext.d.ts +0 -5
- package/dist/types/models/odrl/IDataspaceProtocolPolicyNoContext.d.ts +0 -5
- package/dist/types/models/odrl/IDataspaceProtocolSetNoContext.d.ts +0 -5
- package/docs/reference/type-aliases/IDataspaceProtocolAgreementNoContext.md +0 -5
- package/docs/reference/type-aliases/IDataspaceProtocolCatalogNoContext.md +0 -5
- package/docs/reference/type-aliases/IDataspaceProtocolDataServiceNoContext.md +0 -5
- package/docs/reference/type-aliases/IDataspaceProtocolDatasetNoContext.md +0 -5
- package/docs/reference/type-aliases/IDataspaceProtocolDistributionNoContext.md +0 -5
- package/docs/reference/type-aliases/IDataspaceProtocolOfferNoContext.md +0 -5
- package/docs/reference/type-aliases/IDataspaceProtocolPolicyNoContext.md +0 -5
- package/docs/reference/type-aliases/IDataspaceProtocolSetNoContext.md +0 -5
|
@@ -1,14 +1,7 @@
|
|
|
1
|
+
import type { SingleOccurrenceArray } from "@twin.org/core";
|
|
1
2
|
import type { IJsonLdContextDefinitionElement } from "@twin.org/data-json-ld";
|
|
2
3
|
import type { DataspaceProtocolContexts } from "./dataspaceProtocolContexts.js";
|
|
3
4
|
/**
|
|
4
5
|
* The Dataspace Protocol JSON-LD context type.
|
|
5
6
|
*/
|
|
6
|
-
export type DataspaceProtocolContextType = typeof DataspaceProtocolContexts.Context |
|
|
7
|
-
...IJsonLdContextDefinitionElement[],
|
|
8
|
-
typeof DataspaceProtocolContexts.Context,
|
|
9
|
-
IJsonLdContextDefinitionElement
|
|
10
|
-
] | [
|
|
11
|
-
IJsonLdContextDefinitionElement,
|
|
12
|
-
typeof DataspaceProtocolContexts.Context,
|
|
13
|
-
...IJsonLdContextDefinitionElement[]
|
|
14
|
-
];
|
|
7
|
+
export type DataspaceProtocolContextType = typeof DataspaceProtocolContexts.Context | SingleOccurrenceArray<IJsonLdContextDefinitionElement, typeof DataspaceProtocolContexts.Context>;
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import type { IDcatCatalog } from "@twin.org/standards-w3c-dcat";
|
|
2
|
-
import type { DataspaceProtocolCatalogTypes } from "../catalog/dataspaceProtocolCatalogTypes.js";
|
|
3
1
|
import type { DataspaceProtocolContextType } from "../dataspaceProtocolContextType.js";
|
|
4
|
-
import type {
|
|
5
|
-
import type { IDataspaceProtocolDataServiceNoContext } from "./IDataspaceProtocolDataServiceNoContext.js";
|
|
6
|
-
import type { IDataspaceProtocolDatasetNoContext } from "./IDataspaceProtocolDatasetNoContext.js";
|
|
7
|
-
import type { IDataspaceProtocolDistributionNoContext } from "./IDataspaceProtocolDistributionNoContext.js";
|
|
2
|
+
import type { IDataspaceProtocolCatalogBase } from "./IDataspaceProtocolCatalogBase.js";
|
|
8
3
|
/**
|
|
9
4
|
* Catalog interface compliant with Eclipse Data Space Protocol.
|
|
10
5
|
*
|
|
@@ -25,39 +20,9 @@ import type { IDataspaceProtocolDistributionNoContext } from "./IDataspaceProtoc
|
|
|
25
20
|
* @see https://www.w3.org/TR/vocab-dcat-3/ - W3C DCAT v3 spec
|
|
26
21
|
*
|
|
27
22
|
*/
|
|
28
|
-
export interface IDataspaceProtocolCatalog extends
|
|
23
|
+
export interface IDataspaceProtocolCatalog extends IDataspaceProtocolCatalogBase {
|
|
29
24
|
/**
|
|
30
25
|
* LD Context. Required per Eclipse Data Space Protocol.
|
|
31
26
|
*/
|
|
32
27
|
"@context": DataspaceProtocolContextType;
|
|
33
|
-
/**
|
|
34
|
-
* The type identifier for the Catalog.
|
|
35
|
-
* REQUIRED per Eclipse Data Space Protocol.
|
|
36
|
-
*/
|
|
37
|
-
"@type": typeof DataspaceProtocolCatalogTypes.Catalog;
|
|
38
|
-
/**
|
|
39
|
-
* Unique identifier for the dataset.
|
|
40
|
-
* REQUIRED per Eclipse Data Space Protocol.
|
|
41
|
-
*/
|
|
42
|
-
"@id": string;
|
|
43
|
-
/**
|
|
44
|
-
* Participant Id
|
|
45
|
-
*/
|
|
46
|
-
participantId: string;
|
|
47
|
-
/**
|
|
48
|
-
* Other concerned catalogs
|
|
49
|
-
*/
|
|
50
|
-
catalog?: IDataspaceProtocolCatalogNoContext | IDataspaceProtocolCatalogNoContext[];
|
|
51
|
-
/**
|
|
52
|
-
* Datasets registered
|
|
53
|
-
*/
|
|
54
|
-
dataset?: IDataspaceProtocolDatasetNoContext | IDataspaceProtocolDatasetNoContext[];
|
|
55
|
-
/**
|
|
56
|
-
* Catalog's distributions
|
|
57
|
-
*/
|
|
58
|
-
distribution?: IDataspaceProtocolDistributionNoContext | IDataspaceProtocolDistributionNoContext[];
|
|
59
|
-
/**
|
|
60
|
-
* Data services registered-
|
|
61
|
-
*/
|
|
62
|
-
service?: IDataspaceProtocolDataServiceNoContext | IDataspaceProtocolDataServiceNoContext[];
|
|
63
28
|
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { ObjectOrArray } from "@twin.org/core";
|
|
2
|
+
import type { IDcatCatalogBase } from "@twin.org/standards-w3c-dcat";
|
|
3
|
+
import type { IDataspaceProtocolDataServiceBase } from "./IDataspaceProtocolDataServiceBase.js";
|
|
4
|
+
import type { IDataspaceProtocolDatasetBase } from "./IDataspaceProtocolDatasetBase.js";
|
|
5
|
+
import type { IDataspaceProtocolDistributionBase } from "./IDataspaceProtocolDistributionBase.js";
|
|
6
|
+
import type { DataspaceProtocolCatalogTypes } from "../catalog/dataspaceProtocolCatalogTypes.js";
|
|
7
|
+
/**
|
|
8
|
+
* Catalog interface compliant with Eclipse Data Space Protocol.
|
|
9
|
+
*
|
|
10
|
+
* This interface extends ICatalog and enforces DS Protocol-specific requirements
|
|
11
|
+
* by overriding properties with more specific types and constraints.
|
|
12
|
+
*
|
|
13
|
+
* **Requirements per DS Protocol:**
|
|
14
|
+
* - `@id` MUST be present for dataset identification (REQUIRED)
|
|
15
|
+
* - participantId MUST be present (REQUIRED)
|
|
16
|
+
*
|
|
17
|
+
* **Type System Design:**
|
|
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
|
+
*
|
|
23
|
+
* @see https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1-err1/#lower-level-types
|
|
24
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/ - W3C DCAT v3 spec
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
export interface IDataspaceProtocolCatalogBase extends Omit<IDcatCatalogBase, "@type" | "dcat:catalog" | "dcat:dataset" | "dcat:distribution" | "dcat:service"> {
|
|
28
|
+
/**
|
|
29
|
+
* The type identifier for the Catalog.
|
|
30
|
+
* REQUIRED per Eclipse Data Space Protocol.
|
|
31
|
+
*/
|
|
32
|
+
"@type": typeof DataspaceProtocolCatalogTypes.Catalog;
|
|
33
|
+
/**
|
|
34
|
+
* Unique identifier for the dataset.
|
|
35
|
+
* REQUIRED per Eclipse Data Space Protocol.
|
|
36
|
+
*/
|
|
37
|
+
"@id": string;
|
|
38
|
+
/**
|
|
39
|
+
* Participant Id
|
|
40
|
+
*/
|
|
41
|
+
participantId: string;
|
|
42
|
+
/**
|
|
43
|
+
* Other concerned catalogs
|
|
44
|
+
*/
|
|
45
|
+
catalog?: ObjectOrArray<IDataspaceProtocolCatalogBase>;
|
|
46
|
+
/**
|
|
47
|
+
* Datasets registered
|
|
48
|
+
*/
|
|
49
|
+
dataset?: ObjectOrArray<IDataspaceProtocolDatasetBase>;
|
|
50
|
+
/**
|
|
51
|
+
* Catalog's distributions
|
|
52
|
+
*/
|
|
53
|
+
distribution?: ObjectOrArray<IDataspaceProtocolDistributionBase>;
|
|
54
|
+
/**
|
|
55
|
+
* Data services registered-
|
|
56
|
+
*/
|
|
57
|
+
service?: ObjectOrArray<IDataspaceProtocolDataServiceBase>;
|
|
58
|
+
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import type { IDcatDataService } from "@twin.org/standards-w3c-dcat";
|
|
2
|
-
import type { DataspaceProtocolCatalogTypes } from "../catalog/dataspaceProtocolCatalogTypes.js";
|
|
3
1
|
import type { DataspaceProtocolContextType } from "../dataspaceProtocolContextType.js";
|
|
4
|
-
import type {
|
|
2
|
+
import type { IDataspaceProtocolDataServiceBase } from "./IDataspaceProtocolDataServiceBase.js";
|
|
5
3
|
/**
|
|
6
4
|
* Data Service interface compliant with Eclipse Data Space Protocol.
|
|
7
5
|
*
|
|
@@ -22,27 +20,9 @@ import type { IDataspaceProtocolDatasetNoContext } from "./IDataspaceProtocolDat
|
|
|
22
20
|
* @see https://www.w3.org/TR/vocab-dcat-3/ - W3C DCAT v3 spec
|
|
23
21
|
*
|
|
24
22
|
*/
|
|
25
|
-
export interface IDataspaceProtocolDataService extends
|
|
23
|
+
export interface IDataspaceProtocolDataService extends IDataspaceProtocolDataServiceBase {
|
|
26
24
|
/**
|
|
27
25
|
* LD Context. Required per Eclipse Data Space Protocol.
|
|
28
26
|
*/
|
|
29
27
|
"@context": DataspaceProtocolContextType;
|
|
30
|
-
/**
|
|
31
|
-
* The type identifier for the Data Service.
|
|
32
|
-
* REQUIRED per Eclipse Data Space Protocol.
|
|
33
|
-
*/
|
|
34
|
-
"@type": typeof DataspaceProtocolCatalogTypes.DataService;
|
|
35
|
-
/**
|
|
36
|
-
* Unique identifier for the dataset.
|
|
37
|
-
* REQUIRED per Eclipse Data Space Protocol.
|
|
38
|
-
*/
|
|
39
|
-
"@id": string;
|
|
40
|
-
/**
|
|
41
|
-
* Endpoint URL
|
|
42
|
-
*/
|
|
43
|
-
endpointURL: string;
|
|
44
|
-
/**
|
|
45
|
-
* Datasets served.
|
|
46
|
-
*/
|
|
47
|
-
servesDataset?: IDataspaceProtocolDatasetNoContext | IDataspaceProtocolDatasetNoContext[];
|
|
48
28
|
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { ObjectOrArray } from "@twin.org/core";
|
|
2
|
+
import type { IDcatDataServiceBase } from "@twin.org/standards-w3c-dcat";
|
|
3
|
+
import type { IDataspaceProtocolDatasetBase } from "./IDataspaceProtocolDatasetBase.js";
|
|
4
|
+
import type { DataspaceProtocolCatalogTypes } from "../catalog/dataspaceProtocolCatalogTypes.js";
|
|
5
|
+
/**
|
|
6
|
+
* Data Service interface compliant with Eclipse Data Space Protocol.
|
|
7
|
+
*
|
|
8
|
+
* This interface extends IDataService and enforces DS Protocol-specific requirements
|
|
9
|
+
* by overriding properties with more specific types and constraints.
|
|
10
|
+
*
|
|
11
|
+
* **Requirements per DS Protocol:**
|
|
12
|
+
* - `@id` MUST be present for dataset identification (REQUIRED)
|
|
13
|
+
* - endpointURL MUST be present (REQUIRED)
|
|
14
|
+
*
|
|
15
|
+
* **Type System Design:**
|
|
16
|
+
* - Interface extension allows TypeScript to override inherited property types
|
|
17
|
+
* - Standards packages (@twin.org/standards-w3c-*) follow W3C specs exactly
|
|
18
|
+
* - DS Protocol-specific constraints are defined here
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
* @see https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1-err1/#lower-level-types
|
|
22
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/ - W3C DCAT v3 spec
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
export interface IDataspaceProtocolDataServiceBase extends Omit<IDcatDataServiceBase, "@type" | "dcat:servesDataset" | "dcat:endpointURL"> {
|
|
26
|
+
/**
|
|
27
|
+
* The type identifier for the Data Service.
|
|
28
|
+
* REQUIRED per Eclipse Data Space Protocol.
|
|
29
|
+
*/
|
|
30
|
+
"@type": typeof DataspaceProtocolCatalogTypes.DataService;
|
|
31
|
+
/**
|
|
32
|
+
* Unique identifier for the dataset.
|
|
33
|
+
* REQUIRED per Eclipse Data Space Protocol.
|
|
34
|
+
*/
|
|
35
|
+
"@id": string;
|
|
36
|
+
/**
|
|
37
|
+
* Endpoint URL.
|
|
38
|
+
*/
|
|
39
|
+
endpointURL: string;
|
|
40
|
+
/**
|
|
41
|
+
* Datasets served.
|
|
42
|
+
*/
|
|
43
|
+
servesDataset?: ObjectOrArray<IDataspaceProtocolDatasetBase>;
|
|
44
|
+
}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import type { IDcatDataset } from "@twin.org/standards-w3c-dcat";
|
|
2
|
-
import type { DataspaceProtocolCatalogTypes } from "../catalog/dataspaceProtocolCatalogTypes.js";
|
|
3
1
|
import type { DataspaceProtocolContextType } from "../dataspaceProtocolContextType.js";
|
|
4
|
-
import type {
|
|
5
|
-
import type { IDataspaceProtocolOfferNoContext } from "../odrl/IDataspaceProtocolOfferNoContext.js";
|
|
2
|
+
import type { IDataspaceProtocolDatasetBase } from "./IDataspaceProtocolDatasetBase.js";
|
|
6
3
|
/**
|
|
7
4
|
* Dataset interface compliant with Eclipse Data Space Protocol.
|
|
8
5
|
*
|
|
@@ -33,33 +30,9 @@ import type { IDataspaceProtocolOfferNoContext } from "../odrl/IDataspaceProtoco
|
|
|
33
30
|
* @see IOdrlOffer from @twin.org/standards-w3c-odrl
|
|
34
31
|
* @see IResource.odrl:hasPolicy from @twin.org/standards-w3c-dcat
|
|
35
32
|
*/
|
|
36
|
-
export interface IDataspaceProtocolDataset extends
|
|
33
|
+
export interface IDataspaceProtocolDataset extends IDataspaceProtocolDatasetBase {
|
|
37
34
|
/**
|
|
38
35
|
* LD Context. Required per Eclipse Data Space Protocol.
|
|
39
36
|
*/
|
|
40
37
|
"@context": DataspaceProtocolContextType;
|
|
41
|
-
/**
|
|
42
|
-
* The type identifier for the dataset.
|
|
43
|
-
* REQUIRED per Eclipse Data Space Protocol.
|
|
44
|
-
*/
|
|
45
|
-
"@type": typeof DataspaceProtocolCatalogTypes.Dataset;
|
|
46
|
-
/**
|
|
47
|
-
* Unique identifier for the dataset.
|
|
48
|
-
* REQUIRED per Eclipse Data Space Protocol.
|
|
49
|
-
*/
|
|
50
|
-
"@id": string;
|
|
51
|
-
/**
|
|
52
|
-
* Array of ODRL policies (Offers) as required by DS Protocol.
|
|
53
|
-
*
|
|
54
|
-
* REQUIRED per Eclipse Data Space Protocol spec.
|
|
55
|
-
* Must contain at least one IOdrlOffer.
|
|
56
|
-
* Currently only single offer is supported, but array structure
|
|
57
|
-
* allows for future multi-offer support.
|
|
58
|
-
*/
|
|
59
|
-
hasPolicy: IDataspaceProtocolOfferNoContext | IDataspaceProtocolOfferNoContext[];
|
|
60
|
-
/**
|
|
61
|
-
* Distribution of the dataset.
|
|
62
|
-
* REQUIRED per Eclipse Data Space Protocol.
|
|
63
|
-
*/
|
|
64
|
-
distribution: IDataspaceProtocolDistributionNoContext | IDataspaceProtocolDistributionNoContext[];
|
|
65
38
|
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { ObjectOrArray } from "@twin.org/core";
|
|
2
|
+
import type { IDcatDatasetBase } from "@twin.org/standards-w3c-dcat";
|
|
3
|
+
import type { IDataspaceProtocolDistributionBase } from "./IDataspaceProtocolDistributionBase.js";
|
|
4
|
+
import type { DataspaceProtocolCatalogTypes } from "../catalog/dataspaceProtocolCatalogTypes.js";
|
|
5
|
+
import type { IDataspaceProtocolOfferBase } from "../odrl/IDataspaceProtocolOfferBase.js";
|
|
6
|
+
/**
|
|
7
|
+
* Dataset interface compliant with Eclipse Data Space Protocol.
|
|
8
|
+
*
|
|
9
|
+
* This interface extends IDataset and enforces DS Protocol-specific requirements
|
|
10
|
+
* by overriding properties with more specific types and constraints.
|
|
11
|
+
*
|
|
12
|
+
* **Requirements per DS Protocol:**
|
|
13
|
+
* - `@id` MUST be present for dataset identification (REQUIRED)
|
|
14
|
+
* - `odrl:hasPolicy` MUST be present as an array of ODRL Offers (REQUIRED)
|
|
15
|
+
* - Array MUST contain at least one IOdrlOffer
|
|
16
|
+
* - Each Offer MUST have `@type`: "Offer"
|
|
17
|
+
* - Each Offer MUST have `@id`
|
|
18
|
+
* - `dcat:distribution` MUST be present (REQUIRED)
|
|
19
|
+
*
|
|
20
|
+
* **Type System Design:**
|
|
21
|
+
* - W3C DCAT spec defines `odrl:hasPolicy` as optional singular `IOdrlPolicy`
|
|
22
|
+
* - DS Protocol requires it as a REQUIRED array of `IOdrlOffer`
|
|
23
|
+
* - Interface extension allows TypeScript to override inherited property types
|
|
24
|
+
* - Standards packages (@twin.org/standards-w3c-*) follow W3C specs exactly
|
|
25
|
+
* - DS Protocol-specific constraints are defined here
|
|
26
|
+
*
|
|
27
|
+
* **Future Compatibility:**
|
|
28
|
+
* - Currently only one Offer per dataset is supported
|
|
29
|
+
* - Array structure allows future support for multiple offers
|
|
30
|
+
*
|
|
31
|
+
* @see https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1-err1/#lower-level-types
|
|
32
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/ - W3C DCAT v3 spec
|
|
33
|
+
* @see IOdrlOffer from @twin.org/standards-w3c-odrl
|
|
34
|
+
* @see IResource.odrl:hasPolicy from @twin.org/standards-w3c-dcat
|
|
35
|
+
*/
|
|
36
|
+
export interface IDataspaceProtocolDatasetBase extends Omit<IDcatDatasetBase, "odrl:hasPolicy" | "dcat:distribution" | "@type"> {
|
|
37
|
+
/**
|
|
38
|
+
* The type identifier for the dataset.
|
|
39
|
+
* REQUIRED per Eclipse Data Space Protocol.
|
|
40
|
+
*/
|
|
41
|
+
"@type": typeof DataspaceProtocolCatalogTypes.Dataset;
|
|
42
|
+
/**
|
|
43
|
+
* Unique identifier for the dataset.
|
|
44
|
+
* REQUIRED per Eclipse Data Space Protocol.
|
|
45
|
+
*/
|
|
46
|
+
"@id": string;
|
|
47
|
+
/**
|
|
48
|
+
* Array of ODRL policies (Offers) as required by DS Protocol.
|
|
49
|
+
*
|
|
50
|
+
* REQUIRED per Eclipse Data Space Protocol spec.
|
|
51
|
+
* Must contain at least one IOdrlOffer.
|
|
52
|
+
* Currently only single offer is supported, but array structure
|
|
53
|
+
* allows for future multi-offer support.
|
|
54
|
+
*/
|
|
55
|
+
hasPolicy: ObjectOrArray<IDataspaceProtocolOfferBase>;
|
|
56
|
+
/**
|
|
57
|
+
* Distribution of the dataset.
|
|
58
|
+
* REQUIRED per Eclipse Data Space Protocol.
|
|
59
|
+
*/
|
|
60
|
+
distribution: ObjectOrArray<IDataspaceProtocolDistributionBase>;
|
|
61
|
+
}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import type { IDcatDistribution } from "@twin.org/standards-w3c-dcat";
|
|
2
|
-
import type { DataspaceProtocolCatalogTypes } from "../catalog/dataspaceProtocolCatalogTypes.js";
|
|
3
1
|
import type { DataspaceProtocolContextType } from "../dataspaceProtocolContextType.js";
|
|
4
|
-
import type {
|
|
5
|
-
import type { IDataspaceProtocolOfferNoContext } from "../odrl/IDataspaceProtocolOfferNoContext.js";
|
|
2
|
+
import type { IDataspaceProtocolDistributionBase } from "./IDataspaceProtocolDistributionBase.js";
|
|
6
3
|
/**
|
|
7
4
|
* Distribution interface compliant with Eclipse Data Space Protocol.
|
|
8
5
|
*
|
|
@@ -32,38 +29,14 @@ import type { IDataspaceProtocolOfferNoContext } from "../odrl/IDataspaceProtoco
|
|
|
32
29
|
* @see IOdrlOffer from @twin.org/standards-w3c-odrl
|
|
33
30
|
* @see IResource.odrl:hasPolicy from @twin.org/standards-w3c-dcat
|
|
34
31
|
*/
|
|
35
|
-
export interface IDataspaceProtocolDistribution extends
|
|
32
|
+
export interface IDataspaceProtocolDistribution extends IDataspaceProtocolDistributionBase {
|
|
36
33
|
/**
|
|
37
34
|
* LD Context. Required per Eclipse Data Space Protocol.
|
|
38
35
|
*/
|
|
39
36
|
"@context": DataspaceProtocolContextType;
|
|
40
37
|
/**
|
|
41
|
-
*
|
|
42
|
-
* REQUIRED per Eclipse Data Space Protocol.
|
|
43
|
-
*/
|
|
44
|
-
"@type": typeof DataspaceProtocolCatalogTypes.Distribution;
|
|
45
|
-
/**
|
|
46
|
-
* Unique identifier for the dataset.
|
|
47
|
-
* REQUIRED per Eclipse Data Space Protocol.
|
|
38
|
+
* Unique identifier for the distribution.
|
|
39
|
+
* REQUIRED on standalone Distribution objects per Eclipse Data Space Protocol.
|
|
48
40
|
*/
|
|
49
41
|
"@id": string;
|
|
50
|
-
/**
|
|
51
|
-
* Array of ODRL policies (Offers) as required by DS Protocol.
|
|
52
|
-
*
|
|
53
|
-
* REQUIRED per Eclipse Data Space Protocol spec.
|
|
54
|
-
* Must contain at least one IOdrlOffer.
|
|
55
|
-
* Currently only single offer is supported, but array structure
|
|
56
|
-
* allows for future multi-offer support.
|
|
57
|
-
*/
|
|
58
|
-
hasPolicy?: IDataspaceProtocolOfferNoContext | IDataspaceProtocolOfferNoContext[];
|
|
59
|
-
/**
|
|
60
|
-
* Access service.
|
|
61
|
-
* It can be a URI pointing to an access service or inline the access service itself
|
|
62
|
-
*/
|
|
63
|
-
accessService: string | IDataspaceProtocolDataServiceNoContext;
|
|
64
|
-
/**
|
|
65
|
-
* Distribution format.
|
|
66
|
-
* REQUIRED per Eclipse Data Space Protocol.
|
|
67
|
-
*/
|
|
68
|
-
format: string;
|
|
69
42
|
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { ObjectOrArray } from "@twin.org/core";
|
|
2
|
+
import type { IDcatDistributionBase } from "@twin.org/standards-w3c-dcat";
|
|
3
|
+
import type { IDataspaceProtocolDataServiceBase } from "./IDataspaceProtocolDataServiceBase.js";
|
|
4
|
+
import type { DataspaceProtocolCatalogTypes } from "../catalog/dataspaceProtocolCatalogTypes.js";
|
|
5
|
+
import type { IDataspaceProtocolOfferBase } from "../odrl/IDataspaceProtocolOfferBase.js";
|
|
6
|
+
/**
|
|
7
|
+
* Distribution interface compliant with Eclipse Data Space Protocol.
|
|
8
|
+
*
|
|
9
|
+
* This interface extends IDistribution and enforces DS Protocol-specific requirements
|
|
10
|
+
* by overriding properties with more specific types and constraints.
|
|
11
|
+
*
|
|
12
|
+
* **Requirements per DS Protocol:**
|
|
13
|
+
* - `@id` MUST be present for dataset identification (REQUIRED)
|
|
14
|
+
* - `odrl:hasPolicy` MIGHT be present as an array of ODRL Offers (OPTIONAL)
|
|
15
|
+
* - Array MUST contain at least one IOdrlOffer
|
|
16
|
+
* - Each Offer MUST have `@type`: "Offer"
|
|
17
|
+
* - `format` is REQUIRED.
|
|
18
|
+
*
|
|
19
|
+
* **Type System Design:**
|
|
20
|
+
* - W3C DCAT spec defines `odrl:hasPolicy` as optional singular `IOdrlPolicy`
|
|
21
|
+
* - DS Protocol requires it as a REQUIRED array of `IOdrlOffer`
|
|
22
|
+
* - Interface extension allows TypeScript to override inherited property types
|
|
23
|
+
* - Standards packages (@twin.org/standards-w3c-*) follow W3C specs exactly
|
|
24
|
+
* - DS Protocol-specific constraints are defined here
|
|
25
|
+
*
|
|
26
|
+
* **Future Compatibility:**
|
|
27
|
+
* - Currently only one Offer per dataset is supported
|
|
28
|
+
* - Array structure allows future support for multiple offers
|
|
29
|
+
*
|
|
30
|
+
* @see https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1-err1/#lower-level-types
|
|
31
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/ - W3C DCAT v3 spec
|
|
32
|
+
* @see IOdrlOffer from @twin.org/standards-w3c-odrl
|
|
33
|
+
* @see IResource.odrl:hasPolicy from @twin.org/standards-w3c-dcat
|
|
34
|
+
*/
|
|
35
|
+
export interface IDataspaceProtocolDistributionBase extends Omit<IDcatDistributionBase, "odrl:hasPolicy" | "@type" | "dcterms:format"> {
|
|
36
|
+
/**
|
|
37
|
+
* The type identifier for the Distribution.
|
|
38
|
+
* REQUIRED per Eclipse Data Space Protocol.
|
|
39
|
+
*/
|
|
40
|
+
"@type": typeof DataspaceProtocolCatalogTypes.Distribution;
|
|
41
|
+
/**
|
|
42
|
+
* Unique identifier for the distribution.
|
|
43
|
+
* OPTIONAL for embedded distributions (may use JSON-LD blank nodes).
|
|
44
|
+
* REQUIRED on standalone Distribution objects per Eclipse Data Space Protocol.
|
|
45
|
+
*/
|
|
46
|
+
"@id"?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Array of ODRL policies (Offers) as required by DS Protocol.
|
|
49
|
+
*
|
|
50
|
+
* REQUIRED per Eclipse Data Space Protocol spec.
|
|
51
|
+
* Must contain at least one IOdrlOffer.
|
|
52
|
+
* Currently only single offer is supported, but array structure
|
|
53
|
+
* allows for future multi-offer support.
|
|
54
|
+
*/
|
|
55
|
+
hasPolicy?: ObjectOrArray<IDataspaceProtocolOfferBase>;
|
|
56
|
+
/**
|
|
57
|
+
* Access service.
|
|
58
|
+
* It can be a URI pointing to an access service or inline the access service itself.
|
|
59
|
+
*/
|
|
60
|
+
accessService: string | IDataspaceProtocolDataServiceBase;
|
|
61
|
+
/**
|
|
62
|
+
* Distribution format.
|
|
63
|
+
* REQUIRED per Eclipse Data Space Protocol.
|
|
64
|
+
*/
|
|
65
|
+
format: string;
|
|
66
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { OdrlContextType } from "@twin.org/standards-w3c-odrl";
|
|
2
|
+
import type { IDataspaceProtocolOfferBase } from "./IDataspaceProtocolOfferBase.js";
|
|
2
3
|
/**
|
|
3
4
|
* Offer interface compliant with Eclipse Data Space Protocol.
|
|
4
5
|
*
|
|
@@ -9,9 +10,13 @@ import type { IOdrlOffer } from "@twin.org/standards-w3c-odrl";
|
|
|
9
10
|
* @see https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1-err1/#lower-level-types
|
|
10
11
|
* @see IOdrlOffer from @twin.org/standards-w3c-odrl
|
|
11
12
|
*/
|
|
12
|
-
export interface IDataspaceProtocolOffer extends
|
|
13
|
+
export interface IDataspaceProtocolOffer extends IDataspaceProtocolOfferBase {
|
|
13
14
|
/**
|
|
14
15
|
* Unique identifier for the offer.
|
|
15
16
|
*/
|
|
16
17
|
"@id": string;
|
|
18
|
+
/**
|
|
19
|
+
* LD Context.
|
|
20
|
+
*/
|
|
21
|
+
"@context": OdrlContextType;
|
|
17
22
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { IOdrlOffer } from "@twin.org/standards-w3c-odrl";
|
|
2
|
+
/**
|
|
3
|
+
* Offer interface compliant with Eclipse Data Space Protocol without JSON-LD context.
|
|
4
|
+
* This is the context-free variant of IDataspaceProtocolOffer, intended for embedding
|
|
5
|
+
* offers inline within other objects where the context is provided by the enclosing document.
|
|
6
|
+
*
|
|
7
|
+
* Extends IOdrlOffer with DS Protocol-specific constraints:
|
|
8
|
+
* - '@id' is REQUIRED (used as the primary offer identifier in DS Protocol)
|
|
9
|
+
* - '@context' is omitted (context is inherited from the parent object)
|
|
10
|
+
*
|
|
11
|
+
* @see https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1-err1/#lower-level-types
|
|
12
|
+
*/
|
|
13
|
+
export interface IDataspaceProtocolOfferBase extends Omit<IOdrlOffer, "uid" | "@context"> {
|
|
14
|
+
/**
|
|
15
|
+
* Unique identifier for the offer.
|
|
16
|
+
*/
|
|
17
|
+
"@id": string;
|
|
18
|
+
}
|
|
@@ -7,10 +7,9 @@ export declare abstract class DataspaceProtocolHelper {
|
|
|
7
7
|
/**
|
|
8
8
|
* Checks whether the object passed as parameter is conformant to the DS Protocol definitions.
|
|
9
9
|
* @param object The object to check
|
|
10
|
-
* @
|
|
11
|
-
* @returns true or false depending whether the object is conformant or not
|
|
10
|
+
* @returns An array of validation failures, empty if the object is conformant
|
|
12
11
|
*/
|
|
13
|
-
static
|
|
12
|
+
static validate(object: IJsonLdNodeObject): Promise<IValidationFailure[]>;
|
|
14
13
|
/**
|
|
15
14
|
* Normalizes the input object making it compliant with the DS Protocol specifications.
|
|
16
15
|
* @param object The input object.
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.3-next.55](https://github.com/twinfoundation/standards/compare/standards-dataspace-protocol-v0.0.3-next.54...standards-dataspace-protocol-v0.0.3-next.55) (2026-03-19)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* update to new ts-ts-schema and generic constructs ([4dff991](https://github.com/twinfoundation/standards/commit/4dff991fb70de4320668641ed94abf8e9b06acad))
|
|
9
|
+
* use local LD contexts in tests instead of remote ones ([#201](https://github.com/twinfoundation/standards/issues/201)) ([7d6c6ea](https://github.com/twinfoundation/standards/commit/7d6c6ea7b952fb9e2240ff252f8ce85c42d78985))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Dependencies
|
|
13
|
+
|
|
14
|
+
* The following workspace dependencies were updated
|
|
15
|
+
* dependencies
|
|
16
|
+
* @twin.org/standards-w3c-dcat bumped from 0.0.3-next.54 to 0.0.3-next.55
|
|
17
|
+
* @twin.org/standards-w3c-odrl bumped from 0.0.3-next.54 to 0.0.3-next.55
|
|
18
|
+
* devDependencies
|
|
19
|
+
* @twin.org/standards-ld-contexts bumped from 0.0.3-next.54 to 0.0.3-next.55
|
|
20
|
+
|
|
21
|
+
## [0.0.3-next.54](https://github.com/twinfoundation/standards/compare/standards-dataspace-protocol-v0.0.3-next.53...standards-dataspace-protocol-v0.0.3-next.54) (2026-03-12)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Features
|
|
25
|
+
|
|
26
|
+
* update JsonSchemaHelper.validate usage ([fe08315](https://github.com/twinfoundation/standards/commit/fe0831571cc618465a4510b52c3032a750e6e149))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Dependencies
|
|
30
|
+
|
|
31
|
+
* The following workspace dependencies were updated
|
|
32
|
+
* dependencies
|
|
33
|
+
* @twin.org/standards-w3c-dcat bumped from 0.0.3-next.53 to 0.0.3-next.54
|
|
34
|
+
* @twin.org/standards-w3c-odrl bumped from 0.0.3-next.53 to 0.0.3-next.54
|
|
35
|
+
* devDependencies
|
|
36
|
+
* @twin.org/standards-ld-contexts bumped from 0.0.3-next.53 to 0.0.3-next.54
|
|
37
|
+
|
|
3
38
|
## [0.0.3-next.53](https://github.com/twinfoundation/standards/compare/standards-dataspace-protocol-v0.0.3-next.52...standards-dataspace-protocol-v0.0.3-next.53) (2026-03-11)
|
|
4
39
|
|
|
5
40
|
|
package/docs/examples.md
CHANGED
|
@@ -18,12 +18,10 @@ const payload: IJsonLdNodeObject = {
|
|
|
18
18
|
state: 'STARTED'
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
-
const failures: IValidationFailure[] = [];
|
|
22
21
|
const normalised = await DataspaceProtocolHelper.normalize(payload);
|
|
23
|
-
const
|
|
22
|
+
const validationFailures = await DataspaceProtocolHelper.validate(normalised);
|
|
24
23
|
|
|
25
|
-
console.log(
|
|
26
|
-
console.log(failures.length); // 0
|
|
24
|
+
console.log(validationFailures.length); // 0
|
|
27
25
|
```
|
|
28
26
|
|
|
29
27
|
## Data Types
|
|
@@ -14,7 +14,7 @@ Handle all the data types for Dataspace Protocol.
|
|
|
14
14
|
|
|
15
15
|
## Methods
|
|
16
16
|
|
|
17
|
-
### registerRedirects()
|
|
17
|
+
### registerRedirects() {#registerredirects}
|
|
18
18
|
|
|
19
19
|
> `static` **registerRedirects**(): `void`
|
|
20
20
|
|
|
@@ -26,7 +26,7 @@ Register the JSON-LD Redirects.
|
|
|
26
26
|
|
|
27
27
|
***
|
|
28
28
|
|
|
29
|
-
### registerTypes()
|
|
29
|
+
### registerTypes() {#registertypes}
|
|
30
30
|
|
|
31
31
|
> `static` **registerTypes**(): `void`
|
|
32
32
|
|
|
@@ -14,9 +14,9 @@ Dataspace protocol helper.
|
|
|
14
14
|
|
|
15
15
|
## Methods
|
|
16
16
|
|
|
17
|
-
###
|
|
17
|
+
### validate() {#validate}
|
|
18
18
|
|
|
19
|
-
> `static` **
|
|
19
|
+
> `static` **validate**(`object`): `Promise`\<`IValidationFailure`[]\>
|
|
20
20
|
|
|
21
21
|
Checks whether the object passed as parameter is conformant to the DS Protocol definitions.
|
|
22
22
|
|
|
@@ -28,21 +28,15 @@ Checks whether the object passed as parameter is conformant to the DS Protocol d
|
|
|
28
28
|
|
|
29
29
|
The object to check
|
|
30
30
|
|
|
31
|
-
##### validationFailures
|
|
32
|
-
|
|
33
|
-
`IValidationFailure`[]
|
|
34
|
-
|
|
35
|
-
the Validation failures obtained during the conformance checking.
|
|
36
|
-
|
|
37
31
|
#### Returns
|
|
38
32
|
|
|
39
|
-
`Promise`\<`
|
|
33
|
+
`Promise`\<`IValidationFailure`[]\>
|
|
40
34
|
|
|
41
|
-
|
|
35
|
+
An array of validation failures, empty if the object is conformant
|
|
42
36
|
|
|
43
37
|
***
|
|
44
38
|
|
|
45
|
-
### normalize()
|
|
39
|
+
### normalize() {#normalize}
|
|
46
40
|
|
|
47
41
|
> `static` **normalize**(`object`): `Promise`\<`IJsonLdNodeObject`\>
|
|
48
42
|
|