@twin.org/standards-dataspace-protocol 0.0.3-next.3 → 0.0.3-next.30
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 +61 -0
- package/dist/es/dataTypes/catalogDataTypes.js.map +1 -0
- package/dist/es/dataTypes/contractNegotiationDataTypes.js +60 -71
- package/dist/es/dataTypes/contractNegotiationDataTypes.js.map +1 -1
- package/dist/es/dataTypes/dataspaceProtocolDataTypes.js +30 -0
- package/dist/es/dataTypes/dataspaceProtocolDataTypes.js.map +1 -0
- package/dist/es/dataTypes/transferProcessDataTypes.js +65 -0
- package/dist/es/dataTypes/transferProcessDataTypes.js.map +1 -0
- package/dist/es/index.js +41 -14
- 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/IDataspaceProtocolCatalogError.js +2 -0
- package/dist/es/models/catalog/IDataspaceProtocolCatalogError.js.map +1 -0
- package/dist/es/models/catalog/IDataspaceProtocolCatalogRequestMessage.js +2 -0
- package/dist/es/models/catalog/IDataspaceProtocolCatalogRequestMessage.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/IDataspaceProtocolDatasetRequestMessage.js +2 -0
- package/dist/es/models/catalog/IDataspaceProtocolDatasetRequestMessage.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/catalog/dataspaceProtocolCatalogTypes.js +38 -0
- package/dist/es/models/catalog/dataspaceProtocolCatalogTypes.js.map +1 -0
- package/dist/es/models/contractNegotiation/IDataspaceProtocolContractAgreementMessage.js +2 -0
- package/dist/es/models/contractNegotiation/IDataspaceProtocolContractAgreementMessage.js.map +1 -0
- package/dist/es/models/contractNegotiation/IDataspaceProtocolContractAgreementVerificationMessage.js +2 -0
- package/dist/es/models/contractNegotiation/IDataspaceProtocolContractAgreementVerificationMessage.js.map +1 -0
- package/dist/es/models/contractNegotiation/IDataspaceProtocolContractNegotiation.js +2 -0
- package/dist/es/models/contractNegotiation/IDataspaceProtocolContractNegotiation.js.map +1 -0
- package/dist/es/models/contractNegotiation/IDataspaceProtocolContractNegotiationError.js +2 -0
- package/dist/es/models/contractNegotiation/IDataspaceProtocolContractNegotiationError.js.map +1 -0
- package/dist/es/models/contractNegotiation/IDataspaceProtocolContractNegotiationEventMessage.js +2 -0
- package/dist/es/models/contractNegotiation/IDataspaceProtocolContractNegotiationEventMessage.js.map +1 -0
- package/dist/es/models/contractNegotiation/IDataspaceProtocolContractNegotiationTerminationMessage.js +2 -0
- package/dist/es/models/contractNegotiation/IDataspaceProtocolContractNegotiationTerminationMessage.js.map +1 -0
- package/dist/es/models/contractNegotiation/IDataspaceProtocolContractOfferMessage.js +2 -0
- package/dist/es/models/contractNegotiation/IDataspaceProtocolContractOfferMessage.js.map +1 -0
- package/dist/es/models/contractNegotiation/IDataspaceProtocolContractRequestMessage.js +2 -0
- package/dist/es/models/contractNegotiation/IDataspaceProtocolContractRequestMessage.js.map +1 -0
- package/dist/es/models/contractNegotiation/{contractNegotiationTypes.js → dataspaceProtocolContractNegotiationTypes.js} +3 -3
- package/dist/es/models/contractNegotiation/dataspaceProtocolContractNegotiationTypes.js.map +1 -0
- package/dist/es/models/contractNegotiation/types/{contractNegotiationEventType.js → dataspaceProtocolContractNegotiationEventType.js} +3 -3
- package/dist/es/models/contractNegotiation/types/dataspaceProtocolContractNegotiationEventType.js.map +1 -0
- package/dist/es/models/contractNegotiation/types/{contractNegotiationStateType.js → dataspaceProtocolContractNegotiationStateType.js} +3 -3
- package/dist/es/models/contractNegotiation/types/dataspaceProtocolContractNegotiationStateType.js.map +1 -0
- package/dist/es/models/dataspaceProtocolContextType.js +2 -0
- package/dist/es/models/dataspaceProtocolContextType.js.map +1 -0
- package/dist/es/models/dataspaceProtocolContexts.js +25 -0
- package/dist/es/models/dataspaceProtocolContexts.js.map +1 -0
- package/dist/es/models/transferProcess/IDataspaceProtocolDataAddress.js +2 -0
- package/dist/es/models/transferProcess/IDataspaceProtocolDataAddress.js.map +1 -0
- package/dist/es/models/transferProcess/IDataspaceProtocolEndpointProperty.js +2 -0
- package/dist/es/models/transferProcess/IDataspaceProtocolEndpointProperty.js.map +1 -0
- package/dist/es/models/transferProcess/IDataspaceProtocolTransferCompletionMessage.js +2 -0
- package/dist/es/models/transferProcess/IDataspaceProtocolTransferCompletionMessage.js.map +1 -0
- package/dist/es/models/transferProcess/IDataspaceProtocolTransferError.js +2 -0
- package/dist/es/models/transferProcess/IDataspaceProtocolTransferError.js.map +1 -0
- package/dist/es/models/transferProcess/IDataspaceProtocolTransferProcess.js +2 -0
- package/dist/es/models/transferProcess/IDataspaceProtocolTransferProcess.js.map +1 -0
- package/dist/es/models/transferProcess/IDataspaceProtocolTransferRequestMessage.js +2 -0
- package/dist/es/models/transferProcess/IDataspaceProtocolTransferRequestMessage.js.map +1 -0
- package/dist/es/models/transferProcess/IDataspaceProtocolTransferStartMessage.js +2 -0
- package/dist/es/models/transferProcess/IDataspaceProtocolTransferStartMessage.js.map +1 -0
- package/dist/es/models/transferProcess/IDataspaceProtocolTransferSuspensionMessage.js +4 -0
- package/dist/es/models/transferProcess/IDataspaceProtocolTransferSuspensionMessage.js.map +1 -0
- package/dist/es/models/transferProcess/IDataspaceProtocolTransferTerminationMessage.js +2 -0
- package/dist/es/models/transferProcess/IDataspaceProtocolTransferTerminationMessage.js.map +1 -0
- package/dist/es/models/transferProcess/dataspaceProtocolTransferProcessTypes.js +46 -0
- package/dist/es/models/transferProcess/dataspaceProtocolTransferProcessTypes.js.map +1 -0
- package/dist/es/models/transferProcess/types/dataspaceProtocolEndpointType.js +89 -0
- package/dist/es/models/transferProcess/types/dataspaceProtocolEndpointType.js.map +1 -0
- package/dist/es/models/transferProcess/types/dataspaceProtocolTransferProcessStateType.js +30 -0
- package/dist/es/models/transferProcess/types/dataspaceProtocolTransferProcessStateType.js.map +1 -0
- package/dist/es/schemas/DataspaceProtocolCatalog.json +11 -0
- package/dist/es/schemas/DataspaceProtocolCatalogError.json +78 -0
- package/dist/es/schemas/DataspaceProtocolCatalogRequestMessage.json +73 -0
- package/dist/es/schemas/{ContractAgreementMessage.json → DataspaceProtocolContractAgreementMessage.json} +14 -5
- package/dist/es/schemas/{ContractAgreementVerificationMessage.json → DataspaceProtocolContractAgreementVerificationMessage.json} +14 -5
- package/dist/es/schemas/{ContractNegotiation.json → DataspaceProtocolContractNegotiation.json} +15 -6
- package/dist/es/schemas/{ContractNegotiationError.json → DataspaceProtocolContractNegotiationError.json} +15 -39
- package/dist/es/schemas/{ContractNegotiationEventMessage.json → DataspaceProtocolContractNegotiationEventMessage.json} +15 -6
- package/dist/es/schemas/{ContractNegotiationEventType.json → DataspaceProtocolContractNegotiationEventType.json} +1 -1
- package/dist/es/schemas/{ContractNegotiationStateType.json → DataspaceProtocolContractNegotiationStateType.json} +1 -1
- package/dist/es/schemas/{ContractNegotiationTerminationMessage.json → DataspaceProtocolContractNegotiationTerminationMessage.json} +14 -5
- package/dist/es/schemas/{ContractOfferMessage.json → DataspaceProtocolContractOfferMessage.json} +14 -5
- package/dist/es/schemas/{ContractRequestMessage.json → DataspaceProtocolContractRequestMessage.json} +14 -5
- package/dist/es/schemas/DataspaceProtocolDataAddress.json +33 -0
- package/dist/es/schemas/DataspaceProtocolDataset.json +11 -0
- package/dist/es/schemas/DataspaceProtocolDatasetRequestMessage.json +73 -0
- package/dist/es/schemas/DataspaceProtocolEndpointProperty.json +27 -0
- package/dist/es/schemas/DataspaceProtocolTransferCompletionMessage.json +78 -0
- package/dist/es/schemas/DataspaceProtocolTransferError.json +87 -0
- package/dist/es/schemas/DataspaceProtocolTransferProcess.json +83 -0
- package/dist/es/schemas/DataspaceProtocolTransferRequestMessage.json +92 -0
- package/dist/es/schemas/DataspaceProtocolTransferStartMessage.json +82 -0
- package/dist/es/schemas/DataspaceProtocolTransferSuspensionMessage.json +87 -0
- package/dist/es/schemas/DataspaceProtocolTransferTerminationMessage.json +87 -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 +110 -0
- package/dist/es/utils/dataspaceProtocolHelper.js.map +1 -0
- package/dist/types/dataTypes/catalogDataTypes.d.ts +9 -0
- package/dist/types/dataTypes/contractNegotiationDataTypes.d.ts +1 -5
- package/dist/types/dataTypes/dataspaceProtocolDataTypes.d.ts +13 -0
- package/dist/types/dataTypes/transferProcessDataTypes.d.ts +9 -0
- package/dist/types/index.d.ts +37 -13
- package/dist/types/models/catalog/IDataspaceProtocolCatalog.d.ts +63 -0
- package/dist/types/models/catalog/IDataspaceProtocolCatalogError.d.ts +24 -0
- package/dist/types/models/catalog/IDataspaceProtocolCatalogRequestMessage.d.ts +20 -0
- package/dist/types/models/catalog/IDataspaceProtocolDataService.d.ts +49 -0
- package/dist/types/models/catalog/IDataspaceProtocolDataset.d.ts +66 -0
- package/dist/types/models/catalog/IDataspaceProtocolDatasetRequestMessage.d.ts +20 -0
- package/dist/types/models/catalog/IDataspaceProtocolDistribution.d.ts +70 -0
- package/dist/types/models/catalog/dataspaceProtocolCatalogTypes.d.ts +38 -0
- package/dist/types/models/contractNegotiation/{IContractAgreementMessage.d.ts → IDataspaceProtocolContractAgreementMessage.d.ts} +5 -5
- package/dist/types/models/contractNegotiation/{IContractAgreementVerificationMessage.d.ts → IDataspaceProtocolContractAgreementVerificationMessage.d.ts} +5 -5
- package/dist/types/models/contractNegotiation/IDataspaceProtocolContractNegotiation.d.ts +29 -0
- package/dist/types/models/contractNegotiation/{IContractNegotiationError.d.ts → IDataspaceProtocolContractNegotiationError.d.ts} +6 -16
- package/dist/types/models/contractNegotiation/IDataspaceProtocolContractNegotiationEventMessage.d.ts +29 -0
- package/dist/types/models/contractNegotiation/{IContractNegotiationTerminationMessage.d.ts → IDataspaceProtocolContractNegotiationTerminationMessage.d.ts} +5 -5
- package/dist/types/models/contractNegotiation/{IContractOfferMessage.d.ts → IDataspaceProtocolContractOfferMessage.d.ts} +5 -5
- package/dist/types/models/contractNegotiation/{IContractRequestMessage.d.ts → IDataspaceProtocolContractRequestMessage.d.ts} +5 -5
- package/dist/types/models/contractNegotiation/dataspaceProtocolContractNegotiationTypes.d.ts +50 -0
- package/dist/types/models/contractNegotiation/types/{contractNegotiationEventType.d.ts → dataspaceProtocolContractNegotiationEventType.d.ts} +2 -2
- package/dist/types/models/contractNegotiation/types/{contractNegotiationStateType.d.ts → dataspaceProtocolContractNegotiationStateType.d.ts} +2 -2
- package/dist/types/models/dataspaceProtocolContextType.d.ts +14 -0
- package/dist/types/models/dataspaceProtocolContexts.d.ts +25 -0
- package/dist/types/models/transferProcess/IDataspaceProtocolDataAddress.d.ts +24 -0
- package/dist/types/models/transferProcess/IDataspaceProtocolEndpointProperty.d.ts +19 -0
- package/dist/types/models/transferProcess/IDataspaceProtocolTransferCompletionMessage.d.ts +24 -0
- package/dist/types/models/transferProcess/IDataspaceProtocolTransferError.d.ts +32 -0
- package/dist/types/models/transferProcess/IDataspaceProtocolTransferProcess.d.ts +29 -0
- package/dist/types/models/transferProcess/IDataspaceProtocolTransferRequestMessage.d.ts +39 -0
- package/dist/types/models/transferProcess/IDataspaceProtocolTransferStartMessage.d.ts +30 -0
- package/dist/types/models/transferProcess/IDataspaceProtocolTransferSuspensionMessage.d.ts +32 -0
- package/dist/types/models/transferProcess/IDataspaceProtocolTransferTerminationMessage.d.ts +32 -0
- package/dist/types/models/transferProcess/dataspaceProtocolTransferProcessTypes.d.ts +46 -0
- package/dist/types/models/transferProcess/types/dataspaceProtocolEndpointType.d.ts +89 -0
- package/dist/types/models/transferProcess/types/dataspaceProtocolTransferProcessStateType.d.ts +30 -0
- package/dist/types/utils/dataspaceProtocolHelper.d.ts +20 -0
- package/docs/changelog.md +470 -0
- package/docs/reference/classes/CatalogDataTypes.md +25 -0
- package/docs/reference/classes/ContractNegotiationDataTypes.md +1 -13
- package/docs/reference/classes/DataspaceProtocolDataTypes.md +37 -0
- package/docs/reference/classes/DataspaceProtocolHelper.md +63 -0
- package/docs/reference/classes/TransferProcessDataTypes.md +25 -0
- package/docs/reference/index.md +45 -17
- package/docs/reference/interfaces/IDataspaceProtocolCatalog.md +96 -0
- package/docs/reference/interfaces/IDataspaceProtocolCatalogError.md +36 -0
- package/docs/reference/interfaces/IDataspaceProtocolCatalogRequestMessage.md +28 -0
- package/docs/reference/interfaces/{IContractAgreementMessage.md → IDataspaceProtocolContractAgreementMessage.md} +3 -3
- package/docs/reference/interfaces/{IContractAgreementVerificationMessage.md → IDataspaceProtocolContractAgreementVerificationMessage.md} +3 -3
- package/docs/reference/interfaces/{IContractNegotiation.md → IDataspaceProtocolContractNegotiation.md} +4 -4
- package/docs/reference/interfaces/{IContractNegotiationError.md → IDataspaceProtocolContractNegotiationError.md} +4 -28
- package/docs/reference/interfaces/{IContractNegotiationEventMessage.md → IDataspaceProtocolContractNegotiationEventMessage.md} +4 -4
- package/docs/reference/interfaces/{IContractNegotiationTerminationMessage.md → IDataspaceProtocolContractNegotiationTerminationMessage.md} +3 -3
- package/docs/reference/interfaces/{IContractOfferMessage.md → IDataspaceProtocolContractOfferMessage.md} +3 -3
- package/docs/reference/interfaces/{IContractRequestMessage.md → IDataspaceProtocolContractRequestMessage.md} +3 -3
- package/docs/reference/interfaces/IDataspaceProtocolDataAddress.md +36 -0
- package/docs/reference/interfaces/IDataspaceProtocolDataService.md +72 -0
- package/docs/reference/interfaces/IDataspaceProtocolDataset.md +90 -0
- package/docs/reference/interfaces/IDataspaceProtocolDatasetRequestMessage.md +28 -0
- package/docs/reference/interfaces/IDataspaceProtocolDistribution.md +98 -0
- package/docs/reference/interfaces/IDataspaceProtocolEndpointProperty.md +28 -0
- package/docs/reference/interfaces/IDataspaceProtocolTransferCompletionMessage.md +36 -0
- package/docs/reference/interfaces/IDataspaceProtocolTransferError.md +52 -0
- package/docs/reference/interfaces/IDataspaceProtocolTransferProcess.md +44 -0
- package/docs/reference/interfaces/IDataspaceProtocolTransferRequestMessage.md +62 -0
- package/docs/reference/interfaces/IDataspaceProtocolTransferStartMessage.md +45 -0
- package/docs/reference/interfaces/IDataspaceProtocolTransferSuspensionMessage.md +52 -0
- package/docs/reference/interfaces/IDataspaceProtocolTransferTerminationMessage.md +52 -0
- package/docs/reference/type-aliases/DataspaceProtocolCatalogTypes.md +5 -0
- package/docs/reference/type-aliases/DataspaceProtocolContextType.md +5 -0
- package/docs/reference/type-aliases/DataspaceProtocolContexts.md +5 -0
- package/docs/reference/type-aliases/DataspaceProtocolContractNegotiationEventType.md +5 -0
- package/docs/reference/type-aliases/DataspaceProtocolContractNegotiationStateType.md +5 -0
- package/docs/reference/type-aliases/DataspaceProtocolContractNegotiationTypes.md +5 -0
- package/docs/reference/type-aliases/DataspaceProtocolEndpointType.md +12 -0
- package/docs/reference/type-aliases/DataspaceProtocolTransferProcessStateType.md +5 -0
- package/docs/reference/type-aliases/DataspaceProtocolTransferProcessTypes.md +5 -0
- package/docs/reference/variables/DataspaceProtocolCatalogTypes.md +50 -0
- package/docs/reference/variables/DataspaceProtocolContexts.md +31 -0
- package/docs/reference/variables/{ContractNegotiationEventType.md → DataspaceProtocolContractNegotiationEventType.md} +2 -2
- package/docs/reference/variables/{ContractNegotiationStateType.md → DataspaceProtocolContractNegotiationStateType.md} +2 -2
- package/docs/reference/variables/DataspaceProtocolContractNegotiationTypes.md +68 -0
- package/docs/reference/variables/DataspaceProtocolEndpointType.md +96 -0
- package/docs/reference/variables/DataspaceProtocolTransferProcessStateType.md +38 -0
- package/docs/reference/variables/DataspaceProtocolTransferProcessTypes.md +62 -0
- package/locales/en.json +7 -1
- package/package.json +3 -2
- package/dist/es/models/contractNegotiation/IContractAgreementMessage.js +0 -2
- package/dist/es/models/contractNegotiation/IContractAgreementMessage.js.map +0 -1
- package/dist/es/models/contractNegotiation/IContractAgreementVerificationMessage.js +0 -2
- package/dist/es/models/contractNegotiation/IContractAgreementVerificationMessage.js.map +0 -1
- package/dist/es/models/contractNegotiation/IContractNegotiation.js +0 -2
- package/dist/es/models/contractNegotiation/IContractNegotiation.js.map +0 -1
- package/dist/es/models/contractNegotiation/IContractNegotiationError.js +0 -2
- package/dist/es/models/contractNegotiation/IContractNegotiationError.js.map +0 -1
- package/dist/es/models/contractNegotiation/IContractNegotiationEventMessage.js +0 -2
- package/dist/es/models/contractNegotiation/IContractNegotiationEventMessage.js.map +0 -1
- package/dist/es/models/contractNegotiation/IContractNegotiationTerminationMessage.js +0 -2
- package/dist/es/models/contractNegotiation/IContractNegotiationTerminationMessage.js.map +0 -1
- package/dist/es/models/contractNegotiation/IContractOfferMessage.js +0 -2
- package/dist/es/models/contractNegotiation/IContractOfferMessage.js.map +0 -1
- package/dist/es/models/contractNegotiation/IContractRequestMessage.js +0 -2
- package/dist/es/models/contractNegotiation/IContractRequestMessage.js.map +0 -1
- package/dist/es/models/contractNegotiation/contractNegotiationContextType.js +0 -2
- package/dist/es/models/contractNegotiation/contractNegotiationContextType.js.map +0 -1
- package/dist/es/models/contractNegotiation/contractNegotiationContexts.js +0 -17
- package/dist/es/models/contractNegotiation/contractNegotiationContexts.js.map +0 -1
- package/dist/es/models/contractNegotiation/contractNegotiationTypes.js.map +0 -1
- package/dist/es/models/contractNegotiation/types/contractNegotiationEventType.js.map +0 -1
- package/dist/es/models/contractNegotiation/types/contractNegotiationStateType.js.map +0 -1
- package/dist/types/models/contractNegotiation/IContractNegotiation.d.ts +0 -29
- package/dist/types/models/contractNegotiation/IContractNegotiationEventMessage.d.ts +0 -29
- package/dist/types/models/contractNegotiation/contractNegotiationContextType.d.ts +0 -14
- package/dist/types/models/contractNegotiation/contractNegotiationContexts.d.ts +0 -17
- package/dist/types/models/contractNegotiation/contractNegotiationTypes.d.ts +0 -50
- package/docs/reference/type-aliases/ContractNegotiationContextType.md +0 -5
- package/docs/reference/type-aliases/ContractNegotiationContexts.md +0 -5
- package/docs/reference/type-aliases/ContractNegotiationEventType.md +0 -5
- package/docs/reference/type-aliases/ContractNegotiationStateType.md +0 -5
- package/docs/reference/type-aliases/ContractNegotiationTypes.md +0 -5
- package/docs/reference/variables/ContractNegotiationContexts.md +0 -19
- package/docs/reference/variables/ContractNegotiationTypes.md +0 -68
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
// Copyright 2025 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
import { GeneralError, Is, ObjectHelper } from "@twin.org/core";
|
|
4
|
+
import { DataTypeHelper, JsonSchemaHelper } from "@twin.org/data-core";
|
|
5
|
+
import { JsonLdHelper, JsonLdProcessor } from "@twin.org/data-json-ld";
|
|
6
|
+
import { DcatContexts } from "@twin.org/standards-w3c-dcat";
|
|
7
|
+
import { DataspaceProtocolContexts } from "../models/dataspaceProtocolContexts.js";
|
|
8
|
+
import { DataspaceProtocolTransferProcessTypes } from "../models/transferProcess/dataspaceProtocolTransferProcessTypes.js";
|
|
9
|
+
/**
|
|
10
|
+
* Dataspace protocol helper.
|
|
11
|
+
*/
|
|
12
|
+
export class DataspaceProtocolHelper {
|
|
13
|
+
/**
|
|
14
|
+
* The class name.
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
static CLASS_NAME = "DataspaceProtocolHelper";
|
|
18
|
+
/**
|
|
19
|
+
* Checks whether the object passed as parameter is conformant to the DS Protocol definitions.
|
|
20
|
+
* @param object The object to check
|
|
21
|
+
* @param validationFailures the Validation failures obtained during the conformance checking.
|
|
22
|
+
* @returns true or false depending whether the object is conformant or not
|
|
23
|
+
*/
|
|
24
|
+
static async checkConformance(object, validationFailures) {
|
|
25
|
+
let result = false;
|
|
26
|
+
const dcatNamespace = DcatContexts.Namespace;
|
|
27
|
+
const objectTypes = await JsonLdHelper.getType(object);
|
|
28
|
+
for (const type of objectTypes) {
|
|
29
|
+
let dataTypeIdentifier = type;
|
|
30
|
+
// If the DCAT3 types are used, convert to the DS Protocol equivalent
|
|
31
|
+
// which have the enhancements and constraints defined by the DS Protocol
|
|
32
|
+
if (type.startsWith(dcatNamespace)) {
|
|
33
|
+
const nonQualifiedType = type.replace(dcatNamespace, "");
|
|
34
|
+
dataTypeIdentifier = `${DataspaceProtocolContexts.Namespace}${nonQualifiedType}`;
|
|
35
|
+
}
|
|
36
|
+
const schema = await DataTypeHelper.getSchemaForType(dataTypeIdentifier);
|
|
37
|
+
if (!schema) {
|
|
38
|
+
throw new GeneralError(DataspaceProtocolHelper.CLASS_NAME, "schemaNotRegistered", {
|
|
39
|
+
schemaId: dataTypeIdentifier
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
const normalizedObject = await DataspaceProtocolHelper.normalize(object);
|
|
43
|
+
const validationResult = await JsonSchemaHelper.validate(schema, normalizedObject);
|
|
44
|
+
result = validationResult.result;
|
|
45
|
+
if (!result && Is.array(validationResult.error)) {
|
|
46
|
+
for (const aError of validationResult.error) {
|
|
47
|
+
const validationFailure = {
|
|
48
|
+
property: aError.instancePath,
|
|
49
|
+
reason: aError.message
|
|
50
|
+
};
|
|
51
|
+
validationFailures.push(validationFailure);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return result;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Normalizes the input object making it compliant with the DS Protocol specifications.
|
|
59
|
+
* @param object The input object.
|
|
60
|
+
* @returns The input object normalized.
|
|
61
|
+
*/
|
|
62
|
+
static async normalize(object) {
|
|
63
|
+
const annotatedObject = DataspaceProtocolHelper.annotateLDContextForFormat(object);
|
|
64
|
+
// Determine if this is a message/transfer type (which expects Context) or a catalog type (which expects JsonLdContext)
|
|
65
|
+
const objectType = ObjectHelper.propertyGet(object, "@type");
|
|
66
|
+
const isTransferProcessType = Is.string(objectType) &&
|
|
67
|
+
(objectType.includes("Message") ||
|
|
68
|
+
objectType === DataspaceProtocolTransferProcessTypes.TransferProcess ||
|
|
69
|
+
objectType === DataspaceProtocolTransferProcessTypes.TransferError);
|
|
70
|
+
const contextToUse = isTransferProcessType
|
|
71
|
+
? DataspaceProtocolContexts.Context
|
|
72
|
+
: DataspaceProtocolContexts.JsonLdContext;
|
|
73
|
+
const compactedObject = await JsonLdProcessor.compact(annotatedObject, [contextToUse]);
|
|
74
|
+
if (!Is.array(compactedObject["@context"])) {
|
|
75
|
+
ObjectHelper.propertySet(compactedObject, "@context", [
|
|
76
|
+
ObjectHelper.propertyGet(compactedObject, "@context")
|
|
77
|
+
]);
|
|
78
|
+
}
|
|
79
|
+
return compactedObject;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Ensures format property has a proper LD Context.
|
|
83
|
+
* @param object The object.
|
|
84
|
+
* @returns a copy of the object annotated with the proper LD Context.
|
|
85
|
+
* @internal
|
|
86
|
+
*/
|
|
87
|
+
static annotateLDContextForFormat(object) {
|
|
88
|
+
const result = ObjectHelper.clone(object);
|
|
89
|
+
// This step is needed before compaction as 'dcterms:format' is not defined originally as '@vocab'
|
|
90
|
+
// but it is in the DSP LD Context
|
|
91
|
+
const EXTRA_ANNOTATION = {
|
|
92
|
+
"dcterms:format": {
|
|
93
|
+
"@id": "dcterms:format",
|
|
94
|
+
"@type": "@vocab"
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
const ldContext = ObjectHelper.propertyGet(result, "@context");
|
|
98
|
+
if (Is.array(ldContext)) {
|
|
99
|
+
ldContext.push(EXTRA_ANNOTATION);
|
|
100
|
+
}
|
|
101
|
+
else if (Is.object(ldContext)) {
|
|
102
|
+
ObjectHelper.propertySet(result, "@context", { ...ldContext, ...EXTRA_ANNOTATION });
|
|
103
|
+
}
|
|
104
|
+
else if (Is.string(ldContext)) {
|
|
105
|
+
ObjectHelper.propertySet(result, "@context", [ldContext, EXTRA_ANNOTATION]);
|
|
106
|
+
}
|
|
107
|
+
return result;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
//# sourceMappingURL=dataspaceProtocolHelper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dataspaceProtocolHelper.js","sourceRoot":"","sources":["../../../src/utils/dataspaceProtocolHelper.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\nimport { GeneralError, Is, ObjectHelper, type IValidationFailure } from \"@twin.org/core\";\nimport { DataTypeHelper, JsonSchemaHelper } from \"@twin.org/data-core\";\nimport {\n\tJsonLdHelper,\n\tJsonLdProcessor,\n\ttype IJsonLdContextDefinitionRoot,\n\ttype IJsonLdNodeObject\n} from \"@twin.org/data-json-ld\";\nimport { nameof } from \"@twin.org/nameof\";\nimport { DcatContexts } from \"@twin.org/standards-w3c-dcat\";\nimport { DataspaceProtocolContexts } from \"../models/dataspaceProtocolContexts.js\";\nimport { DataspaceProtocolTransferProcessTypes } from \"../models/transferProcess/dataspaceProtocolTransferProcessTypes.js\";\n\n/**\n * Dataspace protocol helper.\n */\nexport abstract class DataspaceProtocolHelper {\n\t/**\n\t * The class name.\n\t * @internal\n\t */\n\tpublic static readonly CLASS_NAME = nameof<DataspaceProtocolHelper>();\n\n\t/**\n\t * Checks whether the object passed as parameter is conformant to the DS Protocol definitions.\n\t * @param object The object to check\n\t * @param validationFailures the Validation failures obtained during the conformance checking.\n\t * @returns true or false depending whether the object is conformant or not\n\t */\n\tpublic static async checkConformance(\n\t\tobject: IJsonLdNodeObject,\n\t\tvalidationFailures: IValidationFailure[]\n\t): Promise<boolean> {\n\t\tlet result = false;\n\n\t\tconst dcatNamespace = DcatContexts.Namespace;\n\n\t\tconst objectTypes = await JsonLdHelper.getType(object);\n\n\t\tfor (const type of objectTypes) {\n\t\t\tlet dataTypeIdentifier = type;\n\n\t\t\t// If the DCAT3 types are used, convert to the DS Protocol equivalent\n\t\t\t// which have the enhancements and constraints defined by the DS Protocol\n\t\t\tif (type.startsWith(dcatNamespace)) {\n\t\t\t\tconst nonQualifiedType = type.replace(dcatNamespace, \"\");\n\t\t\t\tdataTypeIdentifier = `${DataspaceProtocolContexts.Namespace}${nonQualifiedType}`;\n\t\t\t}\n\n\t\t\tconst schema = await DataTypeHelper.getSchemaForType(dataTypeIdentifier);\n\t\t\tif (!schema) {\n\t\t\t\tthrow new GeneralError(DataspaceProtocolHelper.CLASS_NAME, \"schemaNotRegistered\", {\n\t\t\t\t\tschemaId: dataTypeIdentifier\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tconst normalizedObject = await DataspaceProtocolHelper.normalize(object);\n\n\t\t\tconst validationResult = await JsonSchemaHelper.validate(schema, normalizedObject);\n\t\t\tresult = validationResult.result;\n\n\t\t\tif (!result && Is.array(validationResult.error)) {\n\t\t\t\tfor (const aError of validationResult.error) {\n\t\t\t\t\tconst validationFailure: IValidationFailure = {\n\t\t\t\t\t\tproperty: aError.instancePath,\n\t\t\t\t\t\treason: aError.message as string\n\t\t\t\t\t};\n\t\t\t\t\tvalidationFailures.push(validationFailure);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * Normalizes the input object making it compliant with the DS Protocol specifications.\n\t * @param object The input object.\n\t * @returns The input object normalized.\n\t */\n\tpublic static async normalize(object: IJsonLdNodeObject): Promise<IJsonLdNodeObject> {\n\t\tconst annotatedObject = DataspaceProtocolHelper.annotateLDContextForFormat(object);\n\n\t\t// Determine if this is a message/transfer type (which expects Context) or a catalog type (which expects JsonLdContext)\n\t\tconst objectType = ObjectHelper.propertyGet<string | string[]>(object, \"@type\");\n\t\tconst isTransferProcessType =\n\t\t\tIs.string(objectType) &&\n\t\t\t(objectType.includes(\"Message\") ||\n\t\t\t\tobjectType === DataspaceProtocolTransferProcessTypes.TransferProcess ||\n\t\t\t\tobjectType === DataspaceProtocolTransferProcessTypes.TransferError);\n\n\t\tconst contextToUse = isTransferProcessType\n\t\t\t? DataspaceProtocolContexts.Context\n\t\t\t: DataspaceProtocolContexts.JsonLdContext;\n\n\t\tconst compactedObject = await JsonLdProcessor.compact(annotatedObject, [contextToUse]);\n\n\t\tif (!Is.array(compactedObject[\"@context\"])) {\n\t\t\tObjectHelper.propertySet(compactedObject, \"@context\", [\n\t\t\t\tObjectHelper.propertyGet(compactedObject, \"@context\")\n\t\t\t]);\n\t\t}\n\n\t\treturn compactedObject;\n\t}\n\n\t/**\n\t * Ensures format property has a proper LD Context.\n\t * @param object The object.\n\t * @returns a copy of the object annotated with the proper LD Context.\n\t * @internal\n\t */\n\tprivate static annotateLDContextForFormat(object: IJsonLdNodeObject): IJsonLdNodeObject {\n\t\tconst result = ObjectHelper.clone<IJsonLdNodeObject>(object);\n\n\t\t// This step is needed before compaction as 'dcterms:format' is not defined originally as '@vocab'\n\t\t// but it is in the DSP LD Context\n\t\tconst EXTRA_ANNOTATION = {\n\t\t\t\"dcterms:format\": {\n\t\t\t\t\"@id\": \"dcterms:format\",\n\t\t\t\t\"@type\": \"@vocab\"\n\t\t\t}\n\t\t};\n\t\tconst ldContext = ObjectHelper.propertyGet<IJsonLdContextDefinitionRoot>(result, \"@context\");\n\t\tif (Is.array(ldContext)) {\n\t\t\tldContext.push(EXTRA_ANNOTATION);\n\t\t} else if (Is.object(ldContext)) {\n\t\t\tObjectHelper.propertySet(result, \"@context\", { ...ldContext, ...EXTRA_ANNOTATION });\n\t\t} else if (Is.string(ldContext)) {\n\t\t\tObjectHelper.propertySet(result, \"@context\", [ldContext, EXTRA_ANNOTATION]);\n\t\t}\n\n\t\treturn result;\n\t}\n}\n"]}
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Handle all the data types for Dataspace Protocol
|
|
2
|
+
* Handle all the contract negotiation data types for Dataspace Protocol.
|
|
3
3
|
*/
|
|
4
4
|
export declare class ContractNegotiationDataTypes {
|
|
5
|
-
/**
|
|
6
|
-
* Register the JSON-LD Redirects.
|
|
7
|
-
*/
|
|
8
|
-
static registerRedirects(): void;
|
|
9
5
|
/**
|
|
10
6
|
* Register all the data types.
|
|
11
7
|
*/
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Handle all the data types for Dataspace Protocol.
|
|
3
|
+
*/
|
|
4
|
+
export declare class DataspaceProtocolDataTypes {
|
|
5
|
+
/**
|
|
6
|
+
* Register the JSON-LD Redirects.
|
|
7
|
+
*/
|
|
8
|
+
static registerRedirects(): void;
|
|
9
|
+
/**
|
|
10
|
+
* Register all the data types.
|
|
11
|
+
*/
|
|
12
|
+
static registerTypes(): void;
|
|
13
|
+
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,14 +1,38 @@
|
|
|
1
|
+
export * from "./models/dataspaceProtocolContexts.js";
|
|
2
|
+
export * from "./models/dataspaceProtocolContextType.js";
|
|
3
|
+
export * from "./dataTypes/dataspaceProtocolDataTypes.js";
|
|
4
|
+
export * from "./models/catalog/dataspaceProtocolCatalogTypes.js";
|
|
5
|
+
export * from "./models/catalog/IDataspaceProtocolCatalogError.js";
|
|
6
|
+
export * from "./models/catalog/IDataspaceProtocolCatalogRequestMessage.js";
|
|
7
|
+
export * from "./models/catalog/IDataspaceProtocolDatasetRequestMessage.js";
|
|
8
|
+
export * from "./models/catalog/IDataspaceProtocolDataset.js";
|
|
9
|
+
export * from "./models/catalog/IDataspaceProtocolCatalog.js";
|
|
10
|
+
export * from "./models/catalog/IDataspaceProtocolDistribution.js";
|
|
11
|
+
export * from "./models/catalog/IDataspaceProtocolDataService.js";
|
|
12
|
+
export * from "./dataTypes/catalogDataTypes.js";
|
|
13
|
+
export * from "./models/contractNegotiation/dataspaceProtocolContractNegotiationTypes.js";
|
|
14
|
+
export * from "./models/contractNegotiation/IDataspaceProtocolContractAgreementMessage.js";
|
|
15
|
+
export * from "./models/contractNegotiation/IDataspaceProtocolContractAgreementVerificationMessage.js";
|
|
16
|
+
export * from "./models/contractNegotiation/IDataspaceProtocolContractNegotiation.js";
|
|
17
|
+
export * from "./models/contractNegotiation/IDataspaceProtocolContractNegotiationError.js";
|
|
18
|
+
export * from "./models/contractNegotiation/IDataspaceProtocolContractNegotiationEventMessage.js";
|
|
19
|
+
export * from "./models/contractNegotiation/IDataspaceProtocolContractNegotiationTerminationMessage.js";
|
|
20
|
+
export * from "./models/contractNegotiation/IDataspaceProtocolContractOfferMessage.js";
|
|
21
|
+
export * from "./models/contractNegotiation/IDataspaceProtocolContractRequestMessage.js";
|
|
22
|
+
export * from "./models/contractNegotiation/types/dataspaceProtocolContractNegotiationEventType.js";
|
|
23
|
+
export * from "./models/contractNegotiation/types/dataspaceProtocolContractNegotiationStateType.js";
|
|
1
24
|
export * from "./dataTypes/contractNegotiationDataTypes.js";
|
|
2
|
-
export * from "./models/
|
|
3
|
-
export * from "./models/
|
|
4
|
-
export * from "./models/
|
|
5
|
-
export * from "./models/
|
|
6
|
-
export * from "./models/
|
|
7
|
-
export * from "./models/
|
|
8
|
-
export * from "./models/
|
|
9
|
-
export * from "./models/
|
|
10
|
-
export * from "./models/
|
|
11
|
-
export * from "./models/
|
|
12
|
-
export * from "./models/
|
|
13
|
-
export * from "./models/
|
|
14
|
-
export * from "./
|
|
25
|
+
export * from "./models/transferProcess/dataspaceProtocolTransferProcessTypes.js";
|
|
26
|
+
export * from "./models/transferProcess/IDataspaceProtocolDataAddress.js";
|
|
27
|
+
export * from "./models/transferProcess/IDataspaceProtocolEndpointProperty.js";
|
|
28
|
+
export * from "./models/transferProcess/IDataspaceProtocolTransferCompletionMessage.js";
|
|
29
|
+
export * from "./models/transferProcess/IDataspaceProtocolTransferError.js";
|
|
30
|
+
export * from "./models/transferProcess/IDataspaceProtocolTransferProcess.js";
|
|
31
|
+
export * from "./models/transferProcess/IDataspaceProtocolTransferRequestMessage.js";
|
|
32
|
+
export * from "./models/transferProcess/IDataspaceProtocolTransferStartMessage.js";
|
|
33
|
+
export * from "./models/transferProcess/IDataspaceProtocolTransferSuspensionMessage.js";
|
|
34
|
+
export * from "./models/transferProcess/IDataspaceProtocolTransferTerminationMessage.js";
|
|
35
|
+
export * from "./models/transferProcess/types/dataspaceProtocolTransferProcessStateType.js";
|
|
36
|
+
export * from "./models/transferProcess/types/dataspaceProtocolEndpointType.js";
|
|
37
|
+
export * from "./dataTypes/transferProcessDataTypes.js";
|
|
38
|
+
export * from "./utils/dataspaceProtocolHelper.js";
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { ObjectOrArray } from "@twin.org/core";
|
|
2
|
+
import type { IDcatCatalog } from "@twin.org/standards-w3c-dcat";
|
|
3
|
+
import type { DataspaceProtocolContextType } from "../dataspaceProtocolContextType.js";
|
|
4
|
+
import type { DataspaceProtocolCatalogTypes } from "./dataspaceProtocolCatalogTypes.js";
|
|
5
|
+
import type { IDataspaceProtocolDataService } from "./IDataspaceProtocolDataService.js";
|
|
6
|
+
import type { IDataspaceProtocolDataset } from "./IDataspaceProtocolDataset.js";
|
|
7
|
+
import type { IDataspaceProtocolDistribution } from "./IDataspaceProtocolDistribution.js";
|
|
8
|
+
/**
|
|
9
|
+
* Catalog interface compliant with Eclipse Data Space Protocol.
|
|
10
|
+
*
|
|
11
|
+
* This interface extends ICatalog and enforces DS Protocol-specific requirements
|
|
12
|
+
* by overriding properties with more specific types and constraints.
|
|
13
|
+
*
|
|
14
|
+
* **Requirements per DS Protocol:**
|
|
15
|
+
* - `@id` MUST be present for dataset identification (REQUIRED)
|
|
16
|
+
* - participantId MUST be present (REQUIRED)
|
|
17
|
+
*
|
|
18
|
+
* **Type System Design:**
|
|
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
|
+
*
|
|
24
|
+
* @see https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1-err1/#lower-level-types
|
|
25
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/ - W3C DCAT v3 spec
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export interface IDataspaceProtocolCatalog extends Omit<IDcatCatalog, "@type" | "@context" | "dcat:catalog" | "dcat:dataset" | "dcat:distribution" | "dcat:service"> {
|
|
29
|
+
/**
|
|
30
|
+
* LD Context. Required per Eclipse Data Space Protocol.
|
|
31
|
+
*/
|
|
32
|
+
"@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?: ObjectOrArray<Omit<IDataspaceProtocolCatalog, "@context">>;
|
|
51
|
+
/**
|
|
52
|
+
* Datasets registered
|
|
53
|
+
*/
|
|
54
|
+
dataset?: ObjectOrArray<Omit<IDataspaceProtocolDataset, "@context">>;
|
|
55
|
+
/**
|
|
56
|
+
* Catalog's distributions
|
|
57
|
+
*/
|
|
58
|
+
distribution?: ObjectOrArray<Omit<IDataspaceProtocolDistribution, "@context">>;
|
|
59
|
+
/**
|
|
60
|
+
* Data services registered-
|
|
61
|
+
*/
|
|
62
|
+
service?: ObjectOrArray<Omit<IDataspaceProtocolDataService, "@context">>;
|
|
63
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { DataspaceProtocolContextType } from "../dataspaceProtocolContextType.js";
|
|
2
|
+
import type { DataspaceProtocolCatalogTypes } from "./dataspaceProtocolCatalogTypes.js";
|
|
3
|
+
/**
|
|
4
|
+
* Interface for Dataspace Protocol Catalog Error.
|
|
5
|
+
* https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1/#error-catalog-error
|
|
6
|
+
*/
|
|
7
|
+
export interface IDataspaceProtocolCatalogError {
|
|
8
|
+
/**
|
|
9
|
+
* The JSON-LD context.
|
|
10
|
+
*/
|
|
11
|
+
"@context": DataspaceProtocolContextType;
|
|
12
|
+
/**
|
|
13
|
+
* The type of the message.
|
|
14
|
+
*/
|
|
15
|
+
"@type": typeof DataspaceProtocolCatalogTypes.CatalogError;
|
|
16
|
+
/**
|
|
17
|
+
* The error code.
|
|
18
|
+
*/
|
|
19
|
+
code: string;
|
|
20
|
+
/**
|
|
21
|
+
* The error reason(s).
|
|
22
|
+
*/
|
|
23
|
+
reason?: any[];
|
|
24
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { DataspaceProtocolContextType } from "../dataspaceProtocolContextType.js";
|
|
2
|
+
import type { DataspaceProtocolCatalogTypes } from "./dataspaceProtocolCatalogTypes.js";
|
|
3
|
+
/**
|
|
4
|
+
* Interface for Dataspace Protocol Catalog Request Messages.
|
|
5
|
+
* https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1/#catalog-request-message
|
|
6
|
+
*/
|
|
7
|
+
export interface IDataspaceProtocolCatalogRequestMessage {
|
|
8
|
+
/**
|
|
9
|
+
* The JSON-LD context.
|
|
10
|
+
*/
|
|
11
|
+
"@context": DataspaceProtocolContextType;
|
|
12
|
+
/**
|
|
13
|
+
* The type of the message.
|
|
14
|
+
*/
|
|
15
|
+
"@type": typeof DataspaceProtocolCatalogTypes.CatalogRequestMessage;
|
|
16
|
+
/**
|
|
17
|
+
* An implementation-specific query or filter expression.
|
|
18
|
+
*/
|
|
19
|
+
filter?: unknown[];
|
|
20
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { ObjectOrArray } from "@twin.org/core";
|
|
2
|
+
import type { IDcatDataService } from "@twin.org/standards-w3c-dcat";
|
|
3
|
+
import type { DataspaceProtocolContextType } from "../dataspaceProtocolContextType.js";
|
|
4
|
+
import type { DataspaceProtocolCatalogTypes } from "./dataspaceProtocolCatalogTypes.js";
|
|
5
|
+
import type { IDataspaceProtocolDataset } from "./IDataspaceProtocolDataset.js";
|
|
6
|
+
/**
|
|
7
|
+
* Data Service interface compliant with Eclipse Data Space Protocol.
|
|
8
|
+
*
|
|
9
|
+
* This interface extends IDataService 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
|
+
* - endpointURL MUST be present (REQUIRED)
|
|
15
|
+
*
|
|
16
|
+
* **Type System Design:**
|
|
17
|
+
* - Interface extension allows TypeScript to override inherited property types
|
|
18
|
+
* - Standards packages (@twin.org/standards-w3c-*) follow W3C specs exactly
|
|
19
|
+
* - DS Protocol-specific constraints are defined here
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
* @see https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1-err1/#lower-level-types
|
|
23
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/ - W3C DCAT v3 spec
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
export interface IDataspaceProtocolDataService extends Omit<IDcatDataService, "@type" | "@context" | "dcat:servesDataset" | "dcat:endpointURL"> {
|
|
27
|
+
/**
|
|
28
|
+
* LD Context. Required per Eclipse Data Space Protocol.
|
|
29
|
+
*/
|
|
30
|
+
"@context": DataspaceProtocolContextType;
|
|
31
|
+
/**
|
|
32
|
+
* The type identifier for the Data Service.
|
|
33
|
+
* REQUIRED per Eclipse Data Space Protocol.
|
|
34
|
+
*/
|
|
35
|
+
"@type": typeof DataspaceProtocolCatalogTypes.DataService;
|
|
36
|
+
/**
|
|
37
|
+
* Unique identifier for the dataset.
|
|
38
|
+
* REQUIRED per Eclipse Data Space Protocol.
|
|
39
|
+
*/
|
|
40
|
+
"@id": string;
|
|
41
|
+
/**
|
|
42
|
+
* Endpoint URL
|
|
43
|
+
*/
|
|
44
|
+
endpointURL: string;
|
|
45
|
+
/**
|
|
46
|
+
* Datasets served.
|
|
47
|
+
*/
|
|
48
|
+
servesDataset?: ObjectOrArray<Omit<IDataspaceProtocolDataset, "@context">>;
|
|
49
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { ObjectOrArray } from "@twin.org/core";
|
|
2
|
+
import type { IDcatDataset } from "@twin.org/standards-w3c-dcat";
|
|
3
|
+
import type { IOdrlOffer } from "@twin.org/standards-w3c-odrl";
|
|
4
|
+
import type { DataspaceProtocolContextType } from "../dataspaceProtocolContextType.js";
|
|
5
|
+
import type { DataspaceProtocolCatalogTypes } from "./dataspaceProtocolCatalogTypes.js";
|
|
6
|
+
import type { IDataspaceProtocolDistribution } from "./IDataspaceProtocolDistribution.js";
|
|
7
|
+
/**
|
|
8
|
+
* Dataset interface compliant with Eclipse Data Space Protocol.
|
|
9
|
+
*
|
|
10
|
+
* This interface extends IDataset 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
|
+
* - `odrl:hasPolicy` MUST be present as an array of ODRL Offers (REQUIRED)
|
|
16
|
+
* - Array MUST contain at least one IOdrlOffer
|
|
17
|
+
* - Each Offer MUST have `@type`: "Offer"
|
|
18
|
+
* - Each Offer MUST have `@id` or `uid` for identification
|
|
19
|
+
* - `dcat:distribution` MUST be present (REQUIRED)
|
|
20
|
+
*
|
|
21
|
+
* **Type System Design:**
|
|
22
|
+
* - W3C DCAT spec defines `odrl:hasPolicy` as optional singular `IOdrlPolicy`
|
|
23
|
+
* - DS Protocol requires it as a REQUIRED array of `IOdrlOffer`
|
|
24
|
+
* - Interface extension allows TypeScript to override inherited property types
|
|
25
|
+
* - Standards packages (@twin.org/standards-w3c-*) follow W3C specs exactly
|
|
26
|
+
* - DS Protocol-specific constraints are defined here
|
|
27
|
+
*
|
|
28
|
+
* **Future Compatibility:**
|
|
29
|
+
* - Currently only one Offer per dataset is supported
|
|
30
|
+
* - Array structure allows future support for multiple offers
|
|
31
|
+
*
|
|
32
|
+
* @see https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1-err1/#lower-level-types
|
|
33
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/ - W3C DCAT v3 spec
|
|
34
|
+
* @see IOdrlOffer from @twin.org/standards-w3c-odrl
|
|
35
|
+
* @see IResource.odrl:hasPolicy from @twin.org/standards-w3c-dcat
|
|
36
|
+
*/
|
|
37
|
+
export interface IDataspaceProtocolDataset extends Omit<IDcatDataset, "odrl:hasPolicy" | "dcat:distribution" | "@type" | "@context"> {
|
|
38
|
+
/**
|
|
39
|
+
* LD Context. Required per Eclipse Data Space Protocol.
|
|
40
|
+
*/
|
|
41
|
+
"@context": DataspaceProtocolContextType;
|
|
42
|
+
/**
|
|
43
|
+
* The type identifier for the dataset.
|
|
44
|
+
* REQUIRED per Eclipse Data Space Protocol.
|
|
45
|
+
*/
|
|
46
|
+
"@type": typeof DataspaceProtocolCatalogTypes.Dataset;
|
|
47
|
+
/**
|
|
48
|
+
* Unique identifier for the dataset.
|
|
49
|
+
* REQUIRED per Eclipse Data Space Protocol.
|
|
50
|
+
*/
|
|
51
|
+
"@id": string;
|
|
52
|
+
/**
|
|
53
|
+
* Array of ODRL policies (Offers) as required by DS Protocol.
|
|
54
|
+
*
|
|
55
|
+
* REQUIRED per Eclipse Data Space Protocol spec.
|
|
56
|
+
* Must contain at least one IOdrlOffer.
|
|
57
|
+
* Currently only single offer is supported, but array structure
|
|
58
|
+
* allows for future multi-offer support.
|
|
59
|
+
*/
|
|
60
|
+
hasPolicy: ObjectOrArray<Omit<IOdrlOffer, "@context">>;
|
|
61
|
+
/**
|
|
62
|
+
* Distribution of the dataset.
|
|
63
|
+
* REQUIRED per Eclipse Data Space Protocol.
|
|
64
|
+
*/
|
|
65
|
+
distribution: ObjectOrArray<Omit<IDataspaceProtocolDistribution, "@context">>;
|
|
66
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { DataspaceProtocolContextType } from "../dataspaceProtocolContextType.js";
|
|
2
|
+
import type { DataspaceProtocolCatalogTypes } from "./dataspaceProtocolCatalogTypes.js";
|
|
3
|
+
/**
|
|
4
|
+
* Interface for Dataspace Protocol Dataset Request Messages.
|
|
5
|
+
* https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1/#dataset-request-message
|
|
6
|
+
*/
|
|
7
|
+
export interface IDataspaceProtocolDatasetRequestMessage {
|
|
8
|
+
/**
|
|
9
|
+
* The JSON-LD context.
|
|
10
|
+
*/
|
|
11
|
+
"@context": DataspaceProtocolContextType;
|
|
12
|
+
/**
|
|
13
|
+
* The type of the message.
|
|
14
|
+
*/
|
|
15
|
+
"@type": typeof DataspaceProtocolCatalogTypes.DatasetRequestMessage;
|
|
16
|
+
/**
|
|
17
|
+
* The identifier of the dataset.
|
|
18
|
+
*/
|
|
19
|
+
dataset: string;
|
|
20
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { ObjectOrArray } from "@twin.org/core";
|
|
2
|
+
import type { IDcatDistribution } from "@twin.org/standards-w3c-dcat";
|
|
3
|
+
import type { IOdrlOffer } from "@twin.org/standards-w3c-odrl";
|
|
4
|
+
import type { DataspaceProtocolContextType } from "../dataspaceProtocolContextType.js";
|
|
5
|
+
import type { DataspaceProtocolCatalogTypes } from "./dataspaceProtocolCatalogTypes.js";
|
|
6
|
+
import type { IDataspaceProtocolDataService } from "./IDataspaceProtocolDataService.js";
|
|
7
|
+
/**
|
|
8
|
+
* Distribution interface compliant with Eclipse Data Space Protocol.
|
|
9
|
+
*
|
|
10
|
+
* This interface extends IDistribution 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
|
+
* - `odrl:hasPolicy` MIGHT be present as an array of ODRL Offers (OPTIONAL)
|
|
16
|
+
* - Array MUST contain at least one IOdrlOffer
|
|
17
|
+
* - Each Offer MUST have `@type`: "Offer"
|
|
18
|
+
* - `format` is 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 IDataspaceProtocolDistribution extends Omit<IDcatDistribution, "odrl:hasPolicy" | "@type" | "@context" | "dcterms:format"> {
|
|
37
|
+
/**
|
|
38
|
+
* LD Context. Required per Eclipse Data Space Protocol.
|
|
39
|
+
*/
|
|
40
|
+
"@context": DataspaceProtocolContextType;
|
|
41
|
+
/**
|
|
42
|
+
* The type identifier for the Distribution.
|
|
43
|
+
* REQUIRED per Eclipse Data Space Protocol.
|
|
44
|
+
*/
|
|
45
|
+
"@type": typeof DataspaceProtocolCatalogTypes.Distribution;
|
|
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?: ObjectOrArray<Omit<IOdrlOffer, "@context">>;
|
|
60
|
+
/**
|
|
61
|
+
* Access service.
|
|
62
|
+
* It can be a URI pointing to an access service or inline the access service itself
|
|
63
|
+
*/
|
|
64
|
+
accessService: string | Omit<IDataspaceProtocolDataService, "@context">;
|
|
65
|
+
/**
|
|
66
|
+
* Distribution format.
|
|
67
|
+
* REQUIRED per Eclipse Data Space Protocol.
|
|
68
|
+
*/
|
|
69
|
+
format: string;
|
|
70
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The types for Dataspace Protocol Catalog Protocol.
|
|
3
|
+
* https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1/#catalog-protocol
|
|
4
|
+
*/
|
|
5
|
+
export declare const DataspaceProtocolCatalogTypes: {
|
|
6
|
+
/**
|
|
7
|
+
* Catalog Request Message.
|
|
8
|
+
*/
|
|
9
|
+
readonly CatalogRequestMessage: "CatalogRequestMessage";
|
|
10
|
+
/**
|
|
11
|
+
* Dataset Request Message.
|
|
12
|
+
*/
|
|
13
|
+
readonly DatasetRequestMessage: "DatasetRequestMessage";
|
|
14
|
+
/**
|
|
15
|
+
* Catalog Error.
|
|
16
|
+
*/
|
|
17
|
+
readonly CatalogError: "CatalogError";
|
|
18
|
+
/**
|
|
19
|
+
* Dataset.
|
|
20
|
+
*/
|
|
21
|
+
readonly Dataset: "Dataset";
|
|
22
|
+
/**
|
|
23
|
+
* Data Service.
|
|
24
|
+
*/
|
|
25
|
+
readonly DataService: "DataService";
|
|
26
|
+
/**
|
|
27
|
+
* Distribution.
|
|
28
|
+
*/
|
|
29
|
+
readonly Distribution: "Distribution";
|
|
30
|
+
/**
|
|
31
|
+
* Catalog.
|
|
32
|
+
*/
|
|
33
|
+
readonly Catalog: "Catalog";
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* The types for Dataspace Protocol Catalog Protocol.
|
|
37
|
+
*/
|
|
38
|
+
export type DataspaceProtocolCatalogTypes = (typeof DataspaceProtocolCatalogTypes)[keyof typeof DataspaceProtocolCatalogTypes];
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import type { IOdrlAgreement } from "@twin.org/standards-w3c-odrl";
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
2
|
+
import type { DataspaceProtocolContractNegotiationTypes } from "./dataspaceProtocolContractNegotiationTypes.js";
|
|
3
|
+
import type { DataspaceProtocolContextType } from "../dataspaceProtocolContextType.js";
|
|
4
4
|
/**
|
|
5
5
|
* Interface for Dataspace Protocol Contract Agreement Messages.
|
|
6
6
|
* https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1/#contract-agreement-message
|
|
7
7
|
*/
|
|
8
|
-
export interface
|
|
8
|
+
export interface IDataspaceProtocolContractAgreementMessage {
|
|
9
9
|
/**
|
|
10
10
|
* The JSON-LD context.
|
|
11
11
|
*/
|
|
12
|
-
"@context":
|
|
12
|
+
"@context": DataspaceProtocolContextType;
|
|
13
13
|
/**
|
|
14
14
|
* The type of the message.
|
|
15
15
|
*/
|
|
16
|
-
"@type": typeof
|
|
16
|
+
"@type": typeof DataspaceProtocolContractNegotiationTypes.ContractAgreementMessage;
|
|
17
17
|
/**
|
|
18
18
|
* The provider id for the contract.
|
|
19
19
|
*/
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { DataspaceProtocolContextType } from "../dataspaceProtocolContextType.js";
|
|
2
|
+
import type { DataspaceProtocolContractNegotiationTypes } from "./dataspaceProtocolContractNegotiationTypes.js";
|
|
3
3
|
/**
|
|
4
4
|
* Interface for Dataspace Protocol Contract Agreement Verification Messages.
|
|
5
5
|
* https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1/#contract-agreement-verification-message
|
|
6
6
|
*/
|
|
7
|
-
export interface
|
|
7
|
+
export interface IDataspaceProtocolContractAgreementVerificationMessage {
|
|
8
8
|
/**
|
|
9
9
|
* The JSON-LD context.
|
|
10
10
|
*/
|
|
11
|
-
"@context":
|
|
11
|
+
"@context": DataspaceProtocolContextType;
|
|
12
12
|
/**
|
|
13
13
|
* The type of the message.
|
|
14
14
|
*/
|
|
15
|
-
"@type": typeof
|
|
15
|
+
"@type": typeof DataspaceProtocolContractNegotiationTypes.ContractAgreementVerificationMessage;
|
|
16
16
|
/**
|
|
17
17
|
* The provider id for the contract.
|
|
18
18
|
*/
|