@twin.org/standards-dataspace-protocol 0.0.3-next.6 → 0.0.3-next.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/dataTypes/catalogDataTypes.js +36 -10
- package/dist/es/dataTypes/catalogDataTypes.js.map +1 -1
- package/dist/es/dataTypes/contractNegotiationDataTypes.js +41 -41
- package/dist/es/dataTypes/contractNegotiationDataTypes.js.map +1 -1
- package/dist/es/dataTypes/transferProcessDataTypes.js +37 -37
- package/dist/es/dataTypes/transferProcessDataTypes.js.map +1 -1
- package/dist/es/index.js +31 -26
- 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/{catalogTypes.js → dataspaceProtocolCatalogTypes.js} +2 -2
- 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} +2 -2
- package/dist/es/models/contractNegotiation/dataspaceProtocolContractNegotiationTypes.js.map +1 -0
- package/dist/es/models/contractNegotiation/types/{contractNegotiationEventType.js → dataspaceProtocolContractNegotiationEventType.js} +2 -2
- package/dist/es/models/contractNegotiation/types/dataspaceProtocolContractNegotiationEventType.js.map +1 -0
- package/dist/es/models/contractNegotiation/types/{contractNegotiationStateType.js → dataspaceProtocolContractNegotiationStateType.js} +2 -2
- package/dist/es/models/contractNegotiation/types/dataspaceProtocolContractNegotiationStateType.js.map +1 -0
- package/dist/es/models/dataspaceProtocolContexts.js +5 -1
- package/dist/es/models/dataspaceProtocolContexts.js.map +1 -1
- 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/{ITransferSuspensionMessage.js → IDataspaceProtocolTransferSuspensionMessage.js} +1 -1
- 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/{transferProcessTypes.js → dataspaceProtocolTransferProcessTypes.js} +2 -2
- package/dist/es/models/transferProcess/dataspaceProtocolTransferProcessTypes.js.map +1 -0
- package/dist/es/models/transferProcess/types/{transferProcessStateType.js → dataspaceProtocolTransferProcessStateType.js} +2 -2
- package/dist/es/models/transferProcess/types/dataspaceProtocolTransferProcessStateType.js.map +1 -0
- package/dist/es/schemas/DataspaceProtocolCatalog.json +11 -0
- package/dist/es/schemas/{CatalogError.json → DataspaceProtocolCatalogError.json} +4 -4
- package/dist/es/schemas/{CatalogRequestMessage.json → DataspaceProtocolCatalogRequestMessage.json} +4 -4
- package/dist/es/schemas/{ContractAgreementMessage.json → DataspaceProtocolContractAgreementMessage.json} +4 -4
- package/dist/es/schemas/{ContractAgreementVerificationMessage.json → DataspaceProtocolContractAgreementVerificationMessage.json} +4 -4
- package/dist/es/schemas/{ContractNegotiation.json → DataspaceProtocolContractNegotiation.json} +5 -5
- package/dist/es/schemas/{ContractNegotiationError.json → DataspaceProtocolContractNegotiationError.json} +4 -4
- package/dist/es/schemas/{ContractNegotiationEventMessage.json → DataspaceProtocolContractNegotiationEventMessage.json} +5 -5
- 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} +4 -4
- package/dist/es/schemas/{ContractOfferMessage.json → DataspaceProtocolContractOfferMessage.json} +4 -4
- package/dist/es/schemas/{ContractRequestMessage.json → DataspaceProtocolContractRequestMessage.json} +4 -4
- package/dist/es/schemas/{DataAddress.json → DataspaceProtocolDataAddress.json} +2 -2
- package/dist/es/schemas/DataspaceProtocolDataset.json +11 -0
- package/dist/es/schemas/{DatasetRequestMessage.json → DataspaceProtocolDatasetRequestMessage.json} +4 -4
- package/dist/es/schemas/{EndpointProperty.json → DataspaceProtocolEndpointProperty.json} +1 -1
- package/dist/es/schemas/{TransferCompletionMessage.json → DataspaceProtocolTransferCompletionMessage.json} +4 -4
- package/dist/es/schemas/{TransferError.json → DataspaceProtocolTransferError.json} +4 -4
- package/dist/es/schemas/{TransferProcess.json → DataspaceProtocolTransferProcess.json} +4 -4
- package/dist/es/schemas/{TransferRequestMessage.json → DataspaceProtocolTransferRequestMessage.json} +5 -5
- package/dist/es/schemas/{TransferStartMessage.json → DataspaceProtocolTransferStartMessage.json} +5 -5
- package/dist/es/schemas/{TransferSuspensionMessage.json → DataspaceProtocolTransferSuspensionMessage.json} +4 -4
- package/dist/es/schemas/{TransferTerminationMessage.json → DataspaceProtocolTransferTerminationMessage.json} +4 -4
- package/dist/es/schemas-src/DataspaceProtocolDataService.json +11 -0
- package/dist/es/schemas-src/DataspaceProtocolDistribution.json +11 -0
- package/dist/es/utils/dataspaceProtocolHelper.js +102 -0
- package/dist/es/utils/dataspaceProtocolHelper.js.map +1 -0
- package/dist/types/index.d.ts +31 -26
- package/dist/types/models/catalog/IDataspaceProtocolCatalog.d.ts +62 -0
- package/dist/types/models/catalog/{ICatalogError.d.ts → IDataspaceProtocolCatalogError.d.ts} +3 -3
- package/dist/types/models/catalog/{ICatalogRequestMessage.d.ts → IDataspaceProtocolCatalogRequestMessage.d.ts} +3 -3
- package/dist/types/models/catalog/IDataspaceProtocolDataService.d.ts +48 -0
- package/dist/types/models/catalog/IDataspaceProtocolDataset.d.ts +65 -0
- package/dist/types/models/catalog/{IDatasetRequestMessage.d.ts → IDataspaceProtocolDatasetRequestMessage.d.ts} +3 -3
- package/dist/types/models/catalog/IDataspaceProtocolDistribution.d.ts +69 -0
- package/dist/types/models/catalog/{catalogTypes.d.ts → dataspaceProtocolCatalogTypes.d.ts} +2 -2
- package/dist/types/models/contractNegotiation/{IContractAgreementMessage.d.ts → IDataspaceProtocolContractAgreementMessage.d.ts} +3 -3
- package/dist/types/models/contractNegotiation/{IContractAgreementVerificationMessage.d.ts → IDataspaceProtocolContractAgreementVerificationMessage.d.ts} +3 -3
- package/dist/types/models/contractNegotiation/{IContractNegotiation.d.ts → IDataspaceProtocolContractNegotiation.d.ts} +5 -5
- package/dist/types/models/contractNegotiation/{IContractNegotiationError.d.ts → IDataspaceProtocolContractNegotiationError.d.ts} +3 -3
- package/dist/types/models/contractNegotiation/{IContractNegotiationEventMessage.d.ts → IDataspaceProtocolContractNegotiationEventMessage.d.ts} +5 -5
- package/dist/types/models/contractNegotiation/{IContractNegotiationTerminationMessage.d.ts → IDataspaceProtocolContractNegotiationTerminationMessage.d.ts} +3 -3
- package/dist/types/models/contractNegotiation/{IContractOfferMessage.d.ts → IDataspaceProtocolContractOfferMessage.d.ts} +3 -3
- package/dist/types/models/contractNegotiation/{IContractRequestMessage.d.ts → IDataspaceProtocolContractRequestMessage.d.ts} +3 -3
- package/dist/types/models/contractNegotiation/{contractNegotiationTypes.d.ts → dataspaceProtocolContractNegotiationTypes.d.ts} +2 -2
- 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/dataspaceProtocolContexts.d.ts +5 -1
- package/dist/types/models/transferProcess/{IDataAddress.d.ts → IDataspaceProtocolDataAddress.d.ts} +5 -5
- package/dist/types/models/transferProcess/{IEndpointProperty.d.ts → IDataspaceProtocolEndpointProperty.d.ts} +3 -3
- package/dist/types/models/transferProcess/{ITransferCompletionMessage.d.ts → IDataspaceProtocolTransferCompletionMessage.d.ts} +3 -3
- package/dist/types/models/transferProcess/{ITransferError.d.ts → IDataspaceProtocolTransferError.d.ts} +3 -3
- package/dist/types/models/transferProcess/{ITransferProcess.d.ts → IDataspaceProtocolTransferProcess.d.ts} +5 -5
- package/dist/types/models/transferProcess/{ITransferRequestMessage.d.ts → IDataspaceProtocolTransferRequestMessage.d.ts} +5 -5
- package/dist/types/models/transferProcess/{ITransferStartMessage.d.ts → IDataspaceProtocolTransferStartMessage.d.ts} +5 -5
- package/dist/types/models/transferProcess/{ITransferSuspensionMessage.d.ts → IDataspaceProtocolTransferSuspensionMessage.d.ts} +3 -3
- package/dist/types/models/transferProcess/{ITransferTerminationMessage.d.ts → IDataspaceProtocolTransferTerminationMessage.d.ts} +3 -3
- package/dist/types/models/transferProcess/{transferProcessTypes.d.ts → dataspaceProtocolTransferProcessTypes.d.ts} +2 -2
- package/dist/types/models/transferProcess/types/{transferProcessStateType.d.ts → dataspaceProtocolTransferProcessStateType.d.ts} +2 -2
- package/dist/types/utils/dataspaceProtocolHelper.d.ts +20 -0
- package/docs/changelog.md +45 -0
- package/docs/reference/classes/DataspaceProtocolHelper.md +41 -0
- package/docs/reference/index.md +37 -32
- package/docs/reference/interfaces/IDataspaceProtocolCatalog.md +96 -0
- package/docs/reference/interfaces/{ICatalogError.md → IDataspaceProtocolCatalogError.md} +1 -1
- package/docs/reference/interfaces/{ICatalogRequestMessage.md → IDataspaceProtocolCatalogRequestMessage.md} +1 -1
- package/docs/reference/interfaces/{IContractAgreementMessage.md → IDataspaceProtocolContractAgreementMessage.md} +1 -1
- package/docs/reference/interfaces/{IContractAgreementVerificationMessage.md → IDataspaceProtocolContractAgreementVerificationMessage.md} +1 -1
- package/docs/reference/interfaces/{IContractNegotiation.md → IDataspaceProtocolContractNegotiation.md} +2 -2
- package/docs/reference/interfaces/{IContractNegotiationError.md → IDataspaceProtocolContractNegotiationError.md} +1 -1
- package/docs/reference/interfaces/{IContractNegotiationEventMessage.md → IDataspaceProtocolContractNegotiationEventMessage.md} +2 -2
- package/docs/reference/interfaces/{IContractNegotiationTerminationMessage.md → IDataspaceProtocolContractNegotiationTerminationMessage.md} +1 -1
- package/docs/reference/interfaces/{IContractOfferMessage.md → IDataspaceProtocolContractOfferMessage.md} +1 -1
- package/docs/reference/interfaces/{IContractRequestMessage.md → IDataspaceProtocolContractRequestMessage.md} +1 -1
- package/docs/reference/interfaces/{IDataAddress.md → IDataspaceProtocolDataAddress.md} +2 -2
- package/docs/reference/interfaces/IDataspaceProtocolDataService.md +72 -0
- package/docs/reference/interfaces/IDataspaceProtocolDataset.md +90 -0
- package/docs/reference/interfaces/{IDatasetRequestMessage.md → IDataspaceProtocolDatasetRequestMessage.md} +1 -1
- package/docs/reference/interfaces/IDataspaceProtocolDistribution.md +98 -0
- package/docs/reference/interfaces/{IEndpointProperty.md → IDataspaceProtocolEndpointProperty.md} +1 -1
- package/docs/reference/interfaces/{ITransferCompletionMessage.md → IDataspaceProtocolTransferCompletionMessage.md} +1 -1
- package/docs/reference/interfaces/{ITransferError.md → IDataspaceProtocolTransferError.md} +1 -1
- package/docs/reference/interfaces/{ITransferProcess.md → IDataspaceProtocolTransferProcess.md} +1 -1
- package/docs/reference/interfaces/{ITransferRequestMessage.md → IDataspaceProtocolTransferRequestMessage.md} +2 -2
- package/docs/reference/interfaces/{ITransferStartMessage.md → IDataspaceProtocolTransferStartMessage.md} +2 -2
- package/docs/reference/interfaces/{ITransferSuspensionMessage.md → IDataspaceProtocolTransferSuspensionMessage.md} +1 -1
- package/docs/reference/interfaces/{ITransferTerminationMessage.md → IDataspaceProtocolTransferTerminationMessage.md} +1 -1
- package/docs/reference/type-aliases/DataspaceProtocolCatalogTypes.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/DataspaceProtocolTransferProcessStateType.md +5 -0
- package/docs/reference/type-aliases/DataspaceProtocolTransferProcessTypes.md +5 -0
- package/docs/reference/variables/{CatalogTypes.md → DataspaceProtocolCatalogTypes.md} +2 -2
- package/docs/reference/variables/DataspaceProtocolContexts.md +7 -1
- package/docs/reference/variables/{ContractNegotiationEventType.md → DataspaceProtocolContractNegotiationEventType.md} +2 -2
- package/docs/reference/variables/{ContractNegotiationStateType.md → DataspaceProtocolContractNegotiationStateType.md} +2 -2
- package/docs/reference/variables/{ContractNegotiationTypes.md → DataspaceProtocolContractNegotiationTypes.md} +2 -2
- package/docs/reference/variables/{TransferProcessStateType.md → DataspaceProtocolTransferProcessStateType.md} +2 -2
- package/docs/reference/variables/{TransferProcessTypes.md → DataspaceProtocolTransferProcessTypes.md} +2 -2
- package/locales/en.json +7 -1
- package/package.json +3 -3
- package/dist/es/models/catalog/ICatalogError.js +0 -2
- package/dist/es/models/catalog/ICatalogError.js.map +0 -1
- package/dist/es/models/catalog/ICatalogRequestMessage.js +0 -2
- package/dist/es/models/catalog/ICatalogRequestMessage.js.map +0 -1
- package/dist/es/models/catalog/IDatasetRequestMessage.js +0 -2
- package/dist/es/models/catalog/IDatasetRequestMessage.js.map +0 -1
- package/dist/es/models/catalog/catalogTypes.js.map +0 -1
- 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/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/es/models/transferProcess/IDataAddress.js +0 -2
- package/dist/es/models/transferProcess/IDataAddress.js.map +0 -1
- package/dist/es/models/transferProcess/IEndpointProperty.js +0 -2
- package/dist/es/models/transferProcess/IEndpointProperty.js.map +0 -1
- package/dist/es/models/transferProcess/ITransferCompletionMessage.js +0 -2
- package/dist/es/models/transferProcess/ITransferCompletionMessage.js.map +0 -1
- package/dist/es/models/transferProcess/ITransferError.js +0 -2
- package/dist/es/models/transferProcess/ITransferError.js.map +0 -1
- package/dist/es/models/transferProcess/ITransferProcess.js +0 -2
- package/dist/es/models/transferProcess/ITransferProcess.js.map +0 -1
- package/dist/es/models/transferProcess/ITransferRequestMessage.js +0 -2
- package/dist/es/models/transferProcess/ITransferRequestMessage.js.map +0 -1
- package/dist/es/models/transferProcess/ITransferStartMessage.js +0 -2
- package/dist/es/models/transferProcess/ITransferStartMessage.js.map +0 -1
- package/dist/es/models/transferProcess/ITransferSuspensionMessage.js.map +0 -1
- package/dist/es/models/transferProcess/ITransferTerminationMessage.js +0 -2
- package/dist/es/models/transferProcess/ITransferTerminationMessage.js.map +0 -1
- package/dist/es/models/transferProcess/transferProcessTypes.js.map +0 -1
- package/dist/es/models/transferProcess/types/transferProcessStateType.js.map +0 -1
- package/docs/reference/type-aliases/CatalogTypes.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/type-aliases/TransferProcessStateType.md +0 -5
- package/docs/reference/type-aliases/TransferProcessTypes.md +0 -5
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
// Copyright 2025 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
import { GeneralError, Is, ObjectHelper } from "@twin.org/core";
|
|
4
|
+
import { DataTypeHandlerFactory, 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
|
+
/**
|
|
9
|
+
* Dataspace protocol helper.
|
|
10
|
+
*/
|
|
11
|
+
export class DataspaceProtocolHelper {
|
|
12
|
+
/**
|
|
13
|
+
* The class name.
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
static CLASS_NAME = "DataspaceProtocolHelper";
|
|
17
|
+
/**
|
|
18
|
+
* Checks whether the object passed as parameter is conformant to the DS Protocol definitions.
|
|
19
|
+
* @param object The object to check
|
|
20
|
+
* @param validationFailures the Validation failures obtained during the conformance checking.
|
|
21
|
+
* @returns true or false depending whether the object is conformant or not
|
|
22
|
+
*/
|
|
23
|
+
static async checkConformance(object, validationFailures) {
|
|
24
|
+
let result = false;
|
|
25
|
+
const dcatPrefix = DcatContexts.ContextRoot;
|
|
26
|
+
const objectTypes = await JsonLdHelper.getType(object);
|
|
27
|
+
for (const type of objectTypes) {
|
|
28
|
+
let dataTypeIdentifier = type;
|
|
29
|
+
if (type.startsWith(dcatPrefix)) {
|
|
30
|
+
const nonQualifiedType = `dcat:${type.replace(dcatPrefix, "")}`;
|
|
31
|
+
dataTypeIdentifier = `${DataspaceProtocolContexts.ContextRoot}#${nonQualifiedType}`;
|
|
32
|
+
}
|
|
33
|
+
const schemaHandler = DataTypeHandlerFactory.getIfExists(dataTypeIdentifier);
|
|
34
|
+
if (schemaHandler?.jsonSchema) {
|
|
35
|
+
const schema = await schemaHandler.jsonSchema();
|
|
36
|
+
if (!schema) {
|
|
37
|
+
throw new GeneralError(DataspaceProtocolHelper.CLASS_NAME, "schemaNotRegistered", {
|
|
38
|
+
schemaId: dataTypeIdentifier
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
const validationResult = await JsonSchemaHelper.validate(schema, await DataspaceProtocolHelper.normalize(object));
|
|
42
|
+
result = validationResult.result;
|
|
43
|
+
if (!result && Is.array(validationResult.error)) {
|
|
44
|
+
for (const aError of validationResult.error) {
|
|
45
|
+
const validationFailure = {
|
|
46
|
+
property: aError.instancePath,
|
|
47
|
+
reason: aError.message
|
|
48
|
+
};
|
|
49
|
+
validationFailures.push(validationFailure);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return result;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Normalizes the input object making it compliant with the DS Protocol specifications.
|
|
58
|
+
* @param object The input object.
|
|
59
|
+
* @returns The input object normalized.
|
|
60
|
+
* @internal
|
|
61
|
+
*/
|
|
62
|
+
static async normalize(object) {
|
|
63
|
+
const annotatedObject = DataspaceProtocolHelper.annotateLDContextForFormat(object);
|
|
64
|
+
const compactedObject = await JsonLdProcessor.compact(annotatedObject, [
|
|
65
|
+
DataspaceProtocolContexts.ContextRoot
|
|
66
|
+
]);
|
|
67
|
+
if (!Is.array(compactedObject["@context"])) {
|
|
68
|
+
ObjectHelper.propertySet(compactedObject, "@context", [
|
|
69
|
+
ObjectHelper.propertyGet(compactedObject, "@context")
|
|
70
|
+
]);
|
|
71
|
+
}
|
|
72
|
+
return compactedObject;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Ensures format property has a proper LD Context.
|
|
76
|
+
* @param object The object.
|
|
77
|
+
* @returns a copy of the object annotated with the proper LD Context.
|
|
78
|
+
*/
|
|
79
|
+
static annotateLDContextForFormat(object) {
|
|
80
|
+
const result = ObjectHelper.clone(object);
|
|
81
|
+
// This step is needed before compaction as 'dcterms:format' is not defined originally as '@vocab'
|
|
82
|
+
// but it is in the DSP LD Context
|
|
83
|
+
const EXTRA_ANNOTATION = {
|
|
84
|
+
"dcterms:format": {
|
|
85
|
+
"@id": "dcterms:format",
|
|
86
|
+
"@type": "@vocab"
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
const ldContext = ObjectHelper.propertyGet(result, "@context");
|
|
90
|
+
if (Is.array(ldContext)) {
|
|
91
|
+
ldContext.push(EXTRA_ANNOTATION);
|
|
92
|
+
}
|
|
93
|
+
else if (Is.object(ldContext)) {
|
|
94
|
+
ObjectHelper.propertySet(result, "@context", { ...ldContext, ...EXTRA_ANNOTATION });
|
|
95
|
+
}
|
|
96
|
+
else if (Is.string(ldContext)) {
|
|
97
|
+
ObjectHelper.propertySet(result, "@context", [ldContext, EXTRA_ANNOTATION]);
|
|
98
|
+
}
|
|
99
|
+
return result;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=dataspaceProtocolHelper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dataspaceProtocolHelper.js","sourceRoot":"","sources":["../../../src/utils/dataspaceProtocolHelper.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC,OAAO,EAAE,YAAY,EAAE,EAAE,EAAE,YAAY,EAA2B,MAAM,gBAAgB,CAAC;AACzF,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EACN,YAAY,EACZ,eAAe,EAGf,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AAEnF;;GAEG;AACH,MAAM,OAAgB,uBAAuB;IAC5C;;;OAGG;IACI,MAAM,CAAU,UAAU,6BAAqC;IAEtE;;;;;OAKG;IACI,MAAM,CAAC,KAAK,CAAC,gBAAgB,CACnC,MAAyB,EACzB,kBAAwC;QAExC,IAAI,MAAM,GAAG,KAAK,CAAC;QAEnB,MAAM,UAAU,GAAG,YAAY,CAAC,WAAW,CAAC;QAE5C,MAAM,WAAW,GAAG,MAAM,YAAY,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAEvD,KAAK,MAAM,IAAI,IAAI,WAAW,EAAE,CAAC;YAChC,IAAI,kBAAkB,GAAG,IAAI,CAAC;YAC9B,IAAI,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;gBACjC,MAAM,gBAAgB,GAAG,QAAQ,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,EAAE,CAAC;gBAChE,kBAAkB,GAAG,GAAG,yBAAyB,CAAC,WAAW,IAAI,gBAAgB,EAAE,CAAC;YACrF,CAAC;YAED,MAAM,aAAa,GAAG,sBAAsB,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC;YAC7E,IAAI,aAAa,EAAE,UAAU,EAAE,CAAC;gBAC/B,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,UAAU,EAAE,CAAC;gBAChD,IAAI,CAAC,MAAM,EAAE,CAAC;oBACb,MAAM,IAAI,YAAY,CAAC,uBAAuB,CAAC,UAAU,EAAE,qBAAqB,EAAE;wBACjF,QAAQ,EAAE,kBAAkB;qBAC5B,CAAC,CAAC;gBACJ,CAAC;gBAED,MAAM,gBAAgB,GAAG,MAAM,gBAAgB,CAAC,QAAQ,CACvD,MAAM,EACN,MAAM,uBAAuB,CAAC,SAAS,CAAC,MAAM,CAAC,CAC/C,CAAC;gBACF,MAAM,GAAG,gBAAgB,CAAC,MAAM,CAAC;gBAEjC,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC,KAAK,CAAC,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC;oBACjD,KAAK,MAAM,MAAM,IAAI,gBAAgB,CAAC,KAAK,EAAE,CAAC;wBAC7C,MAAM,iBAAiB,GAAuB;4BAC7C,QAAQ,EAAE,MAAM,CAAC,YAAY;4BAC7B,MAAM,EAAE,MAAM,CAAC,OAAiB;yBAChC,CAAC;wBACF,kBAAkB,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;oBAC5C,CAAC;gBACF,CAAC;YACF,CAAC;QACF,CAAC;QACD,OAAO,MAAM,CAAC;IACf,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,MAAyB;QACtD,MAAM,eAAe,GAAG,uBAAuB,CAAC,0BAA0B,CAAC,MAAM,CAAC,CAAC;QAEnF,MAAM,eAAe,GAAG,MAAM,eAAe,CAAC,OAAO,CAAC,eAAe,EAAE;YACtE,yBAAyB,CAAC,WAAW;SACrC,CAAC,CAAC;QAEH,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC;YAC5C,YAAY,CAAC,WAAW,CAAC,eAAe,EAAE,UAAU,EAAE;gBACrD,YAAY,CAAC,WAAW,CAAC,eAAe,EAAE,UAAU,CAAC;aACrD,CAAC,CAAC;QACJ,CAAC;QAED,OAAO,eAAe,CAAC;IACxB,CAAC;IAED;;;;OAIG;IACK,MAAM,CAAC,0BAA0B,CAAC,MAAyB;QAClE,MAAM,MAAM,GAAG,YAAY,CAAC,KAAK,CAAoB,MAAM,CAAC,CAAC;QAE7D,kGAAkG;QAClG,kCAAkC;QAClC,MAAM,gBAAgB,GAAG;YACxB,gBAAgB,EAAE;gBACjB,KAAK,EAAE,gBAAgB;gBACvB,OAAO,EAAE,QAAQ;aACjB;SACD,CAAC;QACF,MAAM,SAAS,GAAG,YAAY,CAAC,WAAW,CAA+B,MAAM,EAAE,UAAU,CAAC,CAAC;QAC7F,IAAI,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC;YACzB,SAAS,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAClC,CAAC;aAAM,IAAI,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC;YACjC,YAAY,CAAC,WAAW,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE,GAAG,SAAS,EAAE,GAAG,gBAAgB,EAAE,CAAC,CAAC;QACrF,CAAC;aAAM,IAAI,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC;YACjC,YAAY,CAAC,WAAW,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC,CAAC;QAC7E,CAAC;QAED,OAAO,MAAM,CAAC;IACf,CAAC","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\nimport { GeneralError, Is, ObjectHelper, type IValidationFailure } from \"@twin.org/core\";\nimport { DataTypeHandlerFactory, JsonSchemaHelper } from \"@twin.org/data-core\";\nimport {\n\tJsonLdHelper,\n\tJsonLdProcessor,\n\ttype IJsonLdNodeObject,\n\ttype IJsonLdContextDefinitionRoot\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\";\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 dcatPrefix = DcatContexts.ContextRoot;\n\n\t\tconst objectTypes = await JsonLdHelper.getType(object);\n\n\t\tfor (const type of objectTypes) {\n\t\t\tlet dataTypeIdentifier = type;\n\t\t\tif (type.startsWith(dcatPrefix)) {\n\t\t\t\tconst nonQualifiedType = `dcat:${type.replace(dcatPrefix, \"\")}`;\n\t\t\t\tdataTypeIdentifier = `${DataspaceProtocolContexts.ContextRoot}#${nonQualifiedType}`;\n\t\t\t}\n\n\t\t\tconst schemaHandler = DataTypeHandlerFactory.getIfExists(dataTypeIdentifier);\n\t\t\tif (schemaHandler?.jsonSchema) {\n\t\t\t\tconst schema = await schemaHandler.jsonSchema();\n\t\t\t\tif (!schema) {\n\t\t\t\t\tthrow new GeneralError(DataspaceProtocolHelper.CLASS_NAME, \"schemaNotRegistered\", {\n\t\t\t\t\t\tschemaId: dataTypeIdentifier\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tconst validationResult = await JsonSchemaHelper.validate(\n\t\t\t\t\tschema,\n\t\t\t\t\tawait DataspaceProtocolHelper.normalize(object)\n\t\t\t\t);\n\t\t\t\tresult = validationResult.result;\n\n\t\t\t\tif (!result && Is.array(validationResult.error)) {\n\t\t\t\t\tfor (const aError of validationResult.error) {\n\t\t\t\t\t\tconst validationFailure: IValidationFailure = {\n\t\t\t\t\t\t\tproperty: aError.instancePath,\n\t\t\t\t\t\t\treason: aError.message as string\n\t\t\t\t\t\t};\n\t\t\t\t\t\tvalidationFailures.push(validationFailure);\n\t\t\t\t\t}\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 * @internal\n\t */\n\tpublic static async normalize(object: IJsonLdNodeObject): Promise<IJsonLdNodeObject> {\n\t\tconst annotatedObject = DataspaceProtocolHelper.annotateLDContextForFormat(object);\n\n\t\tconst compactedObject = await JsonLdProcessor.compact(annotatedObject, [\n\t\t\tDataspaceProtocolContexts.ContextRoot\n\t\t]);\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 */\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"]}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,32 +1,37 @@
|
|
|
1
1
|
export * from "./models/dataspaceProtocolContexts.js";
|
|
2
2
|
export * from "./models/dataspaceProtocolContextType.js";
|
|
3
3
|
export * from "./dataTypes/dataspaceProtocolDataTypes.js";
|
|
4
|
-
export * from "./models/catalog/
|
|
5
|
-
export * from "./models/catalog/
|
|
6
|
-
export * from "./models/catalog/
|
|
7
|
-
export * from "./models/catalog/
|
|
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";
|
|
8
12
|
export * from "./dataTypes/catalogDataTypes.js";
|
|
9
|
-
export * from "./models/contractNegotiation/
|
|
10
|
-
export * from "./models/contractNegotiation/
|
|
11
|
-
export * from "./models/contractNegotiation/
|
|
12
|
-
export * from "./models/contractNegotiation/
|
|
13
|
-
export * from "./models/contractNegotiation/
|
|
14
|
-
export * from "./models/contractNegotiation/
|
|
15
|
-
export * from "./models/contractNegotiation/
|
|
16
|
-
export * from "./models/contractNegotiation/
|
|
17
|
-
export * from "./models/contractNegotiation/
|
|
18
|
-
export * from "./models/contractNegotiation/types/
|
|
19
|
-
export * from "./models/contractNegotiation/types/
|
|
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";
|
|
20
24
|
export * from "./dataTypes/contractNegotiationDataTypes.js";
|
|
21
|
-
export * from "./models/transferProcess/
|
|
22
|
-
export * from "./models/transferProcess/
|
|
23
|
-
export * from "./models/transferProcess/
|
|
24
|
-
export * from "./models/transferProcess/
|
|
25
|
-
export * from "./models/transferProcess/
|
|
26
|
-
export * from "./models/transferProcess/
|
|
27
|
-
export * from "./models/transferProcess/
|
|
28
|
-
export * from "./models/transferProcess/
|
|
29
|
-
export * from "./models/transferProcess/
|
|
30
|
-
export * from "./models/transferProcess/
|
|
31
|
-
export * from "./models/transferProcess/types/
|
|
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";
|
|
32
36
|
export * from "./dataTypes/transferProcessDataTypes.js";
|
|
37
|
+
export * from "./utils/dataspaceProtocolHelper.js";
|
|
@@ -0,0 +1,62 @@
|
|
|
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 { IDataspaceProtocolDataService } from "./IDataspaceProtocolDataService.js";
|
|
5
|
+
import type { IDataspaceProtocolDataset } from "./IDataspaceProtocolDataset.js";
|
|
6
|
+
import type { IDataspaceProtocolDistribution } from "./IDataspaceProtocolDistribution.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 IDataspaceProtocolCatalog extends Omit<IDcatCatalog, "@type" | "@context" | "dcat:catalog" | "dcat:dataset" | "dcat:distribution" | "dcat:service"> {
|
|
28
|
+
/**
|
|
29
|
+
* LD Context. Required per Eclipse Data Space Protocol.
|
|
30
|
+
*/
|
|
31
|
+
"@context": DataspaceProtocolContextType;
|
|
32
|
+
/**
|
|
33
|
+
* The type identifier for the Catalog.
|
|
34
|
+
* REQUIRED per Eclipse Data Space Protocol.
|
|
35
|
+
*/
|
|
36
|
+
"@type": "Catalog";
|
|
37
|
+
/**
|
|
38
|
+
* Unique identifier for the dataset.
|
|
39
|
+
* REQUIRED per Eclipse Data Space Protocol.
|
|
40
|
+
*/
|
|
41
|
+
"@id": string;
|
|
42
|
+
/**
|
|
43
|
+
* Participant Id
|
|
44
|
+
*/
|
|
45
|
+
participantId: string;
|
|
46
|
+
/**
|
|
47
|
+
* Other concerned catalogs
|
|
48
|
+
*/
|
|
49
|
+
catalog?: ObjectOrArray<IDataspaceProtocolCatalog>;
|
|
50
|
+
/**
|
|
51
|
+
* Datasets registered
|
|
52
|
+
*/
|
|
53
|
+
dataset?: ObjectOrArray<IDataspaceProtocolDataset>;
|
|
54
|
+
/**
|
|
55
|
+
* Catalog's distributions
|
|
56
|
+
*/
|
|
57
|
+
distribution?: ObjectOrArray<IDataspaceProtocolDistribution>;
|
|
58
|
+
/**
|
|
59
|
+
* Data services registered-
|
|
60
|
+
*/
|
|
61
|
+
service?: ObjectOrArray<IDataspaceProtocolDataService>;
|
|
62
|
+
}
|
package/dist/types/models/catalog/{ICatalogError.d.ts → IDataspaceProtocolCatalogError.d.ts}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { DataspaceProtocolContextType } from "../dataspaceProtocolContextType.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { DataspaceProtocolCatalogTypes } from "./dataspaceProtocolCatalogTypes.js";
|
|
3
3
|
/**
|
|
4
4
|
* Interface for Dataspace Protocol Catalog Error.
|
|
5
5
|
* https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1/#error-catalog-error
|
|
6
6
|
*/
|
|
7
|
-
export interface
|
|
7
|
+
export interface IDataspaceProtocolCatalogError {
|
|
8
8
|
/**
|
|
9
9
|
* The JSON-LD context.
|
|
10
10
|
*/
|
|
@@ -12,7 +12,7 @@ export interface ICatalogError {
|
|
|
12
12
|
/**
|
|
13
13
|
* The type of the message.
|
|
14
14
|
*/
|
|
15
|
-
"@type": typeof
|
|
15
|
+
"@type": typeof DataspaceProtocolCatalogTypes.CatalogError;
|
|
16
16
|
/**
|
|
17
17
|
* The error code.
|
|
18
18
|
*/
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { DataspaceProtocolContextType } from "../dataspaceProtocolContextType.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { DataspaceProtocolCatalogTypes } from "./dataspaceProtocolCatalogTypes.js";
|
|
3
3
|
/**
|
|
4
4
|
* Interface for Dataspace Protocol Catalog Request Messages.
|
|
5
5
|
* https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1/#catalog-request-message
|
|
6
6
|
*/
|
|
7
|
-
export interface
|
|
7
|
+
export interface IDataspaceProtocolCatalogRequestMessage {
|
|
8
8
|
/**
|
|
9
9
|
* The JSON-LD context.
|
|
10
10
|
*/
|
|
@@ -12,7 +12,7 @@ export interface ICatalogRequestMessage {
|
|
|
12
12
|
/**
|
|
13
13
|
* The type of the message.
|
|
14
14
|
*/
|
|
15
|
-
"@type": typeof
|
|
15
|
+
"@type": typeof DataspaceProtocolCatalogTypes.CatalogRequestMessage;
|
|
16
16
|
/**
|
|
17
17
|
* An implementation-specific query or filter expression.
|
|
18
18
|
*/
|
|
@@ -0,0 +1,48 @@
|
|
|
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 { IDataspaceProtocolDataset } from "./IDataspaceProtocolDataset.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 IDataspaceProtocolDataService extends Omit<IDcatDataService, "@type" | "@context" | "dcat:servesDataset" | "dcat:endpointURL"> {
|
|
26
|
+
/**
|
|
27
|
+
* LD Context. Required per Eclipse Data Space Protocol.
|
|
28
|
+
*/
|
|
29
|
+
"@context": DataspaceProtocolContextType;
|
|
30
|
+
/**
|
|
31
|
+
* The type identifier for the Data Service.
|
|
32
|
+
* REQUIRED per Eclipse Data Space Protocol.
|
|
33
|
+
*/
|
|
34
|
+
"@type": "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?: ObjectOrArray<IDataspaceProtocolDataset>;
|
|
48
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
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 { IDataspaceProtocolDistribution } from "./IDataspaceProtocolDistribution.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` or `uid` for identification
|
|
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 IDataspaceProtocolDataset extends Omit<IDcatDataset, "odrl:hasPolicy" | "dcat:distribution" | "@type" | "@context"> {
|
|
37
|
+
/**
|
|
38
|
+
* LD Context. Required per Eclipse Data Space Protocol.
|
|
39
|
+
*/
|
|
40
|
+
"@context": DataspaceProtocolContextType;
|
|
41
|
+
/**
|
|
42
|
+
* The type identifier for the dataset.
|
|
43
|
+
* REQUIRED per Eclipse Data Space Protocol.
|
|
44
|
+
*/
|
|
45
|
+
"@type": "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: ObjectOrArray<IOdrlOffer>;
|
|
60
|
+
/**
|
|
61
|
+
* Distribution of the dataset.
|
|
62
|
+
* REQUIRED per Eclipse Data Space Protocol.
|
|
63
|
+
*/
|
|
64
|
+
distribution: ObjectOrArray<IDataspaceProtocolDistribution>;
|
|
65
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { DataspaceProtocolContextType } from "../dataspaceProtocolContextType.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { DataspaceProtocolCatalogTypes } from "./dataspaceProtocolCatalogTypes.js";
|
|
3
3
|
/**
|
|
4
4
|
* Interface for Dataspace Protocol Dataset Request Messages.
|
|
5
5
|
* https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1/#dataset-request-message
|
|
6
6
|
*/
|
|
7
|
-
export interface
|
|
7
|
+
export interface IDataspaceProtocolDatasetRequestMessage {
|
|
8
8
|
/**
|
|
9
9
|
* The JSON-LD context.
|
|
10
10
|
*/
|
|
@@ -12,7 +12,7 @@ export interface IDatasetRequestMessage {
|
|
|
12
12
|
/**
|
|
13
13
|
* The type of the message.
|
|
14
14
|
*/
|
|
15
|
-
"@type": typeof
|
|
15
|
+
"@type": typeof DataspaceProtocolCatalogTypes.DatasetRequestMessage;
|
|
16
16
|
/**
|
|
17
17
|
* The identifier of the dataset.
|
|
18
18
|
*/
|
|
@@ -0,0 +1,69 @@
|
|
|
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 { IDataspaceProtocolDataService } from "./IDataspaceProtocolDataService.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 IDataspaceProtocolDistribution extends Omit<IDcatDistribution, "odrl:hasPolicy" | "@type" | "@context" | "dcterms:format"> {
|
|
36
|
+
/**
|
|
37
|
+
* LD Context. Required per Eclipse Data Space Protocol.
|
|
38
|
+
*/
|
|
39
|
+
"@context": DataspaceProtocolContextType;
|
|
40
|
+
/**
|
|
41
|
+
* The type identifier for the Distribution.
|
|
42
|
+
* REQUIRED per Eclipse Data Space Protocol.
|
|
43
|
+
*/
|
|
44
|
+
"@type": "Distribution";
|
|
45
|
+
/**
|
|
46
|
+
* Unique identifier for the dataset.
|
|
47
|
+
* REQUIRED per Eclipse Data Space Protocol.
|
|
48
|
+
*/
|
|
49
|
+
"@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?: ObjectOrArray<IOdrlOffer>;
|
|
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 | IDataspaceProtocolDataService;
|
|
64
|
+
/**
|
|
65
|
+
* Distribution format.
|
|
66
|
+
* REQUIRED per Eclipse Data Space Protocol.
|
|
67
|
+
*/
|
|
68
|
+
format: string;
|
|
69
|
+
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* The types for Dataspace Protocol Catalog Protocol.
|
|
3
3
|
* https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1/#catalog-protocol
|
|
4
4
|
*/
|
|
5
|
-
export declare const
|
|
5
|
+
export declare const DataspaceProtocolCatalogTypes: {
|
|
6
6
|
/**
|
|
7
7
|
* Catalog Request Message.
|
|
8
8
|
*/
|
|
@@ -19,4 +19,4 @@ export declare const CatalogTypes: {
|
|
|
19
19
|
/**
|
|
20
20
|
* The types for Dataspace Protocol Catalog Protocol.
|
|
21
21
|
*/
|
|
22
|
-
export type
|
|
22
|
+
export type DataspaceProtocolCatalogTypes = (typeof DataspaceProtocolCatalogTypes)[keyof typeof DataspaceProtocolCatalogTypes];
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { IOdrlAgreement } from "@twin.org/standards-w3c-odrl";
|
|
2
|
-
import type {
|
|
2
|
+
import type { DataspaceProtocolContractNegotiationTypes } from "./dataspaceProtocolContractNegotiationTypes.js";
|
|
3
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
|
*/
|
|
@@ -13,7 +13,7 @@ export interface IContractAgreementMessage {
|
|
|
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,10 +1,10 @@
|
|
|
1
1
|
import type { DataspaceProtocolContextType } from "../dataspaceProtocolContextType.js";
|
|
2
|
-
import type {
|
|
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
|
*/
|
|
@@ -12,7 +12,7 @@ export interface IContractAgreementVerificationMessage {
|
|
|
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
|
*/
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { DataspaceProtocolContextType } from "../dataspaceProtocolContextType.js";
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
2
|
+
import type { DataspaceProtocolContractNegotiationTypes } from "./dataspaceProtocolContractNegotiationTypes.js";
|
|
3
|
+
import type { DataspaceProtocolContractNegotiationStateType } from "./types/dataspaceProtocolContractNegotiationStateType.js";
|
|
4
4
|
/**
|
|
5
5
|
* Interface for Dataspace Protocol Contract Agreement Messages.
|
|
6
6
|
* https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1/#ack-contract-negotiation
|
|
7
7
|
*/
|
|
8
|
-
export interface
|
|
8
|
+
export interface IDataspaceProtocolContractNegotiation {
|
|
9
9
|
/**
|
|
10
10
|
* The JSON-LD context.
|
|
11
11
|
*/
|
|
@@ -13,7 +13,7 @@ export interface IContractNegotiation {
|
|
|
13
13
|
/**
|
|
14
14
|
* The type of the message.
|
|
15
15
|
*/
|
|
16
|
-
"@type": typeof
|
|
16
|
+
"@type": typeof DataspaceProtocolContractNegotiationTypes.ContractNegotiation;
|
|
17
17
|
/**
|
|
18
18
|
* The provider id for the contract.
|
|
19
19
|
*/
|
|
@@ -25,5 +25,5 @@ export interface IContractNegotiation {
|
|
|
25
25
|
/**
|
|
26
26
|
* The offer being requested.
|
|
27
27
|
*/
|
|
28
|
-
state:
|
|
28
|
+
state: DataspaceProtocolContractNegotiationStateType;
|
|
29
29
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { DataspaceProtocolContextType } from "../dataspaceProtocolContextType.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { DataspaceProtocolContractNegotiationTypes } from "./dataspaceProtocolContractNegotiationTypes.js";
|
|
3
3
|
/**
|
|
4
4
|
* Interface for Dataspace Protocol Contract Negotiation Error Messages.
|
|
5
5
|
* https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1/#error-contract-negotiation-error
|
|
6
6
|
*/
|
|
7
|
-
export interface
|
|
7
|
+
export interface IDataspaceProtocolContractNegotiationError {
|
|
8
8
|
/**
|
|
9
9
|
* The JSON-LD context.
|
|
10
10
|
*/
|
|
@@ -12,7 +12,7 @@ export interface IContractNegotiationError {
|
|
|
12
12
|
/**
|
|
13
13
|
* The type of the message.
|
|
14
14
|
*/
|
|
15
|
-
"@type": typeof
|
|
15
|
+
"@type": typeof DataspaceProtocolContractNegotiationTypes.ContractNegotiationError;
|
|
16
16
|
/**
|
|
17
17
|
* The provider id for the contract.
|
|
18
18
|
*/
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { DataspaceProtocolContextType } from "../dataspaceProtocolContextType.js";
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
2
|
+
import type { DataspaceProtocolContractNegotiationTypes } from "./dataspaceProtocolContractNegotiationTypes.js";
|
|
3
|
+
import type { DataspaceProtocolContractNegotiationEventType } from "./types/dataspaceProtocolContractNegotiationEventType.js";
|
|
4
4
|
/**
|
|
5
5
|
* Interface for Dataspace Protocol Contract Negotiation Event Messages.
|
|
6
6
|
* https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1/#contract-negotiation-event-message
|
|
7
7
|
*/
|
|
8
|
-
export interface
|
|
8
|
+
export interface IDataspaceProtocolContractNegotiationEventMessage {
|
|
9
9
|
/**
|
|
10
10
|
* The JSON-LD context.
|
|
11
11
|
*/
|
|
@@ -13,7 +13,7 @@ export interface IContractNegotiationEventMessage {
|
|
|
13
13
|
/**
|
|
14
14
|
* The type of the message.
|
|
15
15
|
*/
|
|
16
|
-
"@type": typeof
|
|
16
|
+
"@type": typeof DataspaceProtocolContractNegotiationTypes.ContractNegotiationEventMessage;
|
|
17
17
|
/**
|
|
18
18
|
* The provider id for the contract.
|
|
19
19
|
*/
|
|
@@ -25,5 +25,5 @@ export interface IContractNegotiationEventMessage {
|
|
|
25
25
|
/**
|
|
26
26
|
* The event type.
|
|
27
27
|
*/
|
|
28
|
-
event:
|
|
28
|
+
event: DataspaceProtocolContractNegotiationEventType;
|
|
29
29
|
}
|