@twin.org/dataspace-models 0.0.3-next.34 → 0.0.3-next.35
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/models/controlPlane/IDataspaceControlPlaneComponent.js.map +1 -1
- package/dist/es/models/controlPlane/ITransferContext.js.map +1 -1
- package/dist/es/models/controlPlane/ITransferProcess.js.map +1 -1
- package/dist/es/models/dataspaceTransferFormat.js +3 -4
- package/dist/es/models/dataspaceTransferFormat.js.map +1 -1
- package/dist/types/models/controlPlane/IDataspaceControlPlaneComponent.d.ts +1 -1
- package/dist/types/models/controlPlane/ITransferContext.d.ts +2 -2
- package/dist/types/models/controlPlane/ITransferProcess.d.ts +2 -2
- package/dist/types/models/dataspaceTransferFormat.d.ts +3 -4
- package/docs/changelog.md +7 -0
- package/docs/reference/interfaces/IDataspaceControlPlaneComponent.md +1 -1
- package/docs/reference/interfaces/ITransferContext.md +2 -2
- package/docs/reference/interfaces/ITransferProcess.md +2 -2
- package/docs/reference/variables/DataspaceTransferFormat.md +6 -7
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IDataspaceControlPlaneComponent.js","sourceRoot":"","sources":["../../../../src/models/controlPlane/IDataspaceControlPlaneComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type {\n\tIDataspaceProtocolContractNegotiation,\n\tIDataspaceProtocolContractNegotiationError,\n\tIDataspaceProtocolDataset,\n\tIDataspaceProtocolTransferCompletionMessage,\n\tIDataspaceProtocolTransferError,\n\tIDataspaceProtocolTransferProcess,\n\tIDataspaceProtocolTransferRequestMessage,\n\tIDataspaceProtocolTransferStartMessage,\n\tIDataspaceProtocolTransferSuspensionMessage,\n\tIDataspaceProtocolTransferTerminationMessage\n} from \"@twin.org/standards-dataspace-protocol\";\nimport type { IDataspaceAppDataset } from \"./IDataspaceAppDataset.js\";\nimport type { INegotiationCallback } from \"./INegotiationCallback.js\";\nimport type { ITransferCallback } from \"./ITransferCallback.js\";\n\n/**\n * Dataspace Control Plane Component interface.\n * Implements Eclipse Dataspace Protocol (DSP) specifications:\n * - Contract Negotiation Protocol\n * - Transfer Process Protocol\n *\n * This component acts as the Control Plane for contract negotiation and\n * data transfers between nodes in a dataspace.\n *\n * DSP 2025-1 Specification: https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1/\n */\nexport interface IDataspaceControlPlaneComponent extends IComponent {\n\t// ============================================================================\n\t// CONTRACT NEGOTIATION PROTOCOL (DSP)\n\t// Methods for negotiating agreements before transfers\n\t// ============================================================================\n\n\t/**\n\t * Register a callback to receive negotiation state change notifications.\n\t * Upstream modules (e.g. supply-chain) register their callback here\n\t * to be notified when negotiations complete, fail, or change state.\n\t * @param key A unique key identifying this callback registration.\n\t * @param callback The callback interface to register.\n\t */\n\tregisterNegotiationCallback(key: string, callback: INegotiationCallback): void;\n\n\t/**\n\t * Unregister a previously registered negotiation callback.\n\t * @param key The key used when registering the callback.\n\t */\n\tunregisterNegotiationCallback(key: string): void;\n\n\t/**\n\t * Negotiate a contract agreement with a provider.\n\t * Implements DSP Contract Negotiation Protocol.\n\t *\n\t * Returns immediately with a negotiationId. The caller is notified\n\t * via the registered INegotiationCallback when the negotiation completes.\n\t * The negotiation follows DSP state machine: REQUESTED → OFFERED → AGREED → VERIFIED → FINALIZED.\n\t *\n\t * This method has NO REST client implementation — it is only accessible via ComponentFactory.get().\n\t *\n\t * DSP Spec: https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1/#negotiation-protocol\n\t *\n\t * @param datasetId The dataset ID from the provider's catalog.\n\t * @param offerId The offer ID from the provider's catalog.\n\t * @param providerEndpoint The provider's contract negotiation endpoint URL.\n\t * @param publicOrigin The public origin URL of this control plane (for callbacks).\n\t * @param trustPayload Trust payload for authentication (JWT or Verifiable Credential).\n\t * @returns The negotiation ID for tracking. Use registered callback for completion.\n\t */\n\tnegotiateAgreement(\n\t\tdatasetId: string,\n\t\tofferId: string,\n\t\tproviderEndpoint: string,\n\t\tpublicOrigin: string,\n\t\ttrustPayload: unknown\n\t): Promise<{ negotiationId: string }>;\n\n\t/**\n\t * Get the current state of a contract negotiation.\n\t * Implements DSP Contract Negotiation Protocol.\n\t *\n\t * Queries the current state of an ongoing or completed negotiation.\n\t * Use this to monitor negotiation progress.\n\t * Returns the DSP-compliant negotiation state or error.\n\t *\n\t * DSP Spec: https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1/#negotiation-protocol\n\t *\n\t * @param negotiationId The unique identifier of the negotiation.\n\t * @param trustPayload Trust payload for authentication.\n\t * @returns DSP ContractNegotiation with current state, or error.\n\t */\n\tgetNegotiation(\n\t\tnegotiationId: string,\n\t\ttrustPayload: unknown\n\t): Promise<IDataspaceProtocolContractNegotiation | IDataspaceProtocolContractNegotiationError>;\n\n\t/**\n\t * Get negotiation history.\n\t * Queries past contract negotiations for audit trails and debugging.\n\t *\n\t * Returns a list of past negotiations with their states and metadata.\n\t * Supports optional filtering by state and pagination via cursor.\n\t *\n\t * @param state Optional filter by negotiation state (e.g., \"FINALIZED\", \"TERMINATED\").\n\t * @param cursor Optional pagination cursor for fetching next page.\n\t * @param trustPayload Trust payload for authentication.\n\t * @returns List of negotiation history entries with pagination cursor.\n\t */\n\tgetNegotiationHistory(\n\t\tstate: string | undefined,\n\t\tcursor: string | undefined,\n\t\ttrustPayload: unknown\n\t): Promise<{\n\t\tnegotiations: {\n\t\t\tnegotiation:\n\t\t\t\t| IDataspaceProtocolContractNegotiation\n\t\t\t\t| IDataspaceProtocolContractNegotiationError;\n\t\t\tcreatedAt: string;\n\t\t\tofferId?: string;\n\t\t\tagreementId?: string;\n\t\t}[];\n\t\tcursor?: string;\n\t\tcount: number;\n\t}>;\n\n\t// ============================================================================\n\t// TRANSFER PROCESS PROTOCOL (DSP)\n\t// Methods for managing data transfers after agreements are established\n\t// ============================================================================\n\n\t// ----------------------------------------------------------------------------\n\t// CONSUMER SIDE OPERATIONS\n\t// Methods called by the Data Consumer to initiate transfers\n\t// ----------------------------------------------------------------------------\n\n\t/**\n\t * Register a callback to receive transfer process state change notifications.\n\t * Upstream modules register their callback here to be notified when a\n\t * consumer-initiated transfer changes state (STARTED, COMPLETED, SUSPENDED,\n\t * TERMINATED).\n\t *\n\t * This method has NO REST client implementation — in-process only.\n\t * @param key A unique key identifying this callback registration.\n\t * @param callback The callback interface to register.\n\t */\n\tregisterTransferCallback(key: string, callback: ITransferCallback): void;\n\n\t/**\n\t * Unregister a previously registered transfer callback.\n\t * @param key The key used when registering the callback.\n\t */\n\tunregisterTransferCallback(key: string): void;\n\n\t/**\n\t * Start a data transfer as a Consumer.\n\t * High-level convenience wrapper around the DSP Transfer Request protocol.\n\t *\n\t * This method:\n\t * 1. Generates a consumerPid.\n\t * 2. POSTs a TransferRequestMessage to the provider's DSP endpoint.\n\t * 3. Persists a local TransferProcess in REQUESTED state (only if provider accepts).\n\t * 4. Returns the consumerPid immediately.\n\t *\n\t * The caller is notified of subsequent state changes (STARTED, COMPLETED, etc.)\n\t * via the registered ITransferCallback. The transfer moves to STARTED when the\n\t * provider POSTs a TransferStartMessage back to this node's callback address.\n\t *\n\t * This method has NO REST client implementation — in-process only.\n\t *\n\t * @param agreementId The finalized agreement ID (from contract negotiation).\n\t * @param providerEndpoint The provider's DSP control plane base URL.\n\t * @param publicOrigin The public origin URL of this control plane (used as callbackAddress).\n\t * @param format The transfer format (e.g. \"HttpProxy-PULL\", \"HttpProxy-PUSH\").\n\t * @param trustPayload Trust payload for authentication.\n\t * @returns The consumerPid of the newly created TransferProcess.\n\t */\n\tstartDataTransfer(\n\t\tagreementId: string,\n\t\tproviderEndpoint: string,\n\t\tpublicOrigin: string,\n\t\tformat: string,\n\t\ttrustPayload: unknown\n\t): Promise<{ consumerPid: string }>;\n\n\t/**\n\t * Request a Transfer Process.\n\t * Creates a new Transfer Process in REQUESTED state.\n\t *\n\t * Role Performed: Provider\n\t * Called by: Consumer when it wants to request a new Transfer Process\n\t *\n\t * DSP Spec: https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/#transfer-request-message\n\t *\n\t * @param request Transfer request message (DSP compliant) containing agreementId,\n\t * consumerPid, callbackAddress, and format.\n\t * @param trustPayload Trust payload containing authorization information (JWT, VC, etc.).\n\t * The consumer must prove their identity by providing a valid trust payload.\n\t * @returns Transfer Process (DSP compliant) with state REQUESTED, including\n\t * both consumerPid and providerPid, or TransferError if the operation fails.\n\t */\n\trequestTransfer(\n\t\trequest: IDataspaceProtocolTransferRequestMessage,\n\t\ttrustPayload: unknown\n\t): Promise<IDataspaceProtocolTransferProcess | IDataspaceProtocolTransferError>;\n\n\t// ============================================================================\n\t// PROVIDER SIDE OPERATIONS\n\t// Methods called by the Data Provider to respond to transfer requests\n\t// ============================================================================\n\n\t/**\n\t * Start a Transfer Process.\n\t * Transitions Transfer Process from REQUESTED to STARTED state, or resumes from SUSPENDED state.\n\t *\n\t * Role Performed: Provider / Consumer\n\t * Called by: Provider when a Transfer Process starts, or Consumer to attempt to start a Transfer Process after it has been suspended\n\t *\n\t * DSP Spec: https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/#transfer-start-message\n\t *\n\t * @param message Transfer start message (DSP compliant).\n\t * @param publicOrigin The public origin URL of this service (used to construct data plane endpoint for PULL transfers).\n\t * @param trustPayload Trust payload containing authorization information (JWT, VC, etc.).\n\t * @returns Transfer Start Message (DSP compliant) with dataAddress for PULL transfers, or TransferError if the operation fails.\n\t */\n\tstartTransfer(\n\t\tmessage: IDataspaceProtocolTransferStartMessage,\n\t\tpublicOrigin: string,\n\t\ttrustPayload: unknown\n\t): Promise<IDataspaceProtocolTransferStartMessage | IDataspaceProtocolTransferError>;\n\n\t// ============================================================================\n\t// SHARED STATE MANAGEMENT OPERATIONS\n\t// Methods that can be called by either Consumer or Provider\n\t// ============================================================================\n\n\t/**\n\t * Complete a Transfer Process.\n\t * Transitions Transfer Process to COMPLETED state.\n\t *\n\t * Role Performed: Consumer / Provider\n\t * Called by: Provider or Consumer when a Transfer process is completed on their side\n\t *\n\t * DSP Spec: https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/#transfer-completion-message\n\t *\n\t * @param message Transfer completion message (DSP compliant).\n\t * @param trustPayload Trust payload containing authorization information (JWT, VC, etc.).\n\t * @returns Transfer Process (DSP compliant) with state COMPLETED, or TransferError if the operation fails.\n\t */\n\tcompleteTransfer(\n\t\tmessage: IDataspaceProtocolTransferCompletionMessage,\n\t\ttrustPayload: unknown\n\t): Promise<IDataspaceProtocolTransferProcess | IDataspaceProtocolTransferError>;\n\n\t/**\n\t * Suspend a Transfer Process.\n\t * Transitions Transfer Process to SUSPENDED state.\n\t *\n\t * Role Performed: Consumer / Provider\n\t * Called by: Provider or Consumer when a Transfer process needs to be temporarily suspended on their side\n\t *\n\t * DSP Spec: https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/#transfer-suspension-message\n\t *\n\t * @param message Transfer suspension message (DSP compliant) with optional reason.\n\t * @param trustPayload Trust payload containing authorization information (JWT, VC, etc.).\n\t * @returns Transfer Process (DSP compliant) with state SUSPENDED, or TransferError if the operation fails.\n\t */\n\tsuspendTransfer(\n\t\tmessage: IDataspaceProtocolTransferSuspensionMessage,\n\t\ttrustPayload: unknown\n\t): Promise<IDataspaceProtocolTransferProcess | IDataspaceProtocolTransferError>;\n\n\t/**\n\t * Terminate a Transfer Process.\n\t * Transitions Transfer Process to TERMINATED state.\n\t *\n\t * Role Performed: Consumer / Provider\n\t * Called by: Provider or Consumer when a Transfer process needs to be terminated on their side (e.g., due to error)\n\t *\n\t * DSP Spec: https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/#transfer-termination-message\n\t *\n\t * @param message Transfer termination message (DSP compliant) with optional reason.\n\t * @param trustPayload Trust payload containing authorization information (JWT, VC, etc.).\n\t * @returns Transfer Process (DSP compliant) with state TERMINATED, or TransferError if the operation fails.\n\t */\n\tterminateTransfer(\n\t\tmessage: IDataspaceProtocolTransferTerminationMessage,\n\t\ttrustPayload: unknown\n\t): Promise<IDataspaceProtocolTransferProcess | IDataspaceProtocolTransferError>;\n\n\t/**\n\t * Get Transfer Process State.\n\t * Query the current state of a Transfer Process.\n\t *\n\t * Role Performed: Consumer / Provider\n\t * Called by: Provider or Consumer when they need to check the status of a Transfer process on their side\n\t *\n\t * Supports role-agnostic lookup using either consumerPid or providerPid.\n\t * The service will automatically detect which role the caller is acting as\n\t * (Consumer or Provider) based on the PID provided.\n\t *\n\t * DSP Spec: https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/#ack-transfer-process\n\t *\n\t * @param pid The Process ID (consumerPid or providerPid) used to identify the transfer.\n\t * @param trustPayload Trust payload containing authorization information (JWT, VC, etc.).\n\t * @returns Transfer Process (DSP compliant) with current state, or TransferError if the operation fails.\n\t */\n\tgetTransferProcess(\n\t\tpid: string,\n\t\ttrustPayload: unknown\n\t): Promise<IDataspaceProtocolTransferProcess | IDataspaceProtocolTransferError>;\n\n\t// ============================================================================\n\t// DATASET MANAGEMENT\n\t// CRUD over the tenant-scoped dataset records the Control Plane reads at\n\t// start time to populate the federated catalogue.\n\t// ============================================================================\n\n\t/**\n\t * Register an app dataset for a dataspace app, owned by the calling tenant.\n\t * @param id Optional explicit id. If omitted, derived from `dataset[\"@id\"]`\n\t * or generated.\n\t * @param appId The dataspace app this dataset belongs to (matches\n\t * `DataspaceAppFactory` registration name).\n\t * @param dataset The dataset payload (may omit system-stamped fields).\n\t * @returns The resolved dataset id.\n\t */\n\tcreateAppDataset(\n\t\tid: string | undefined,\n\t\tappId: string,\n\t\tdataset: IDataspaceProtocolDataset\n\t): Promise<string>;\n\n\t/**\n\t * Get an app dataset record owned by the calling tenant.\n\t * @param id The stored app dataset id.\n\t * @returns The stored app dataset record.\n\t */\n\tgetAppDataset(id: string): Promise<IDataspaceAppDataset>;\n\n\t/**\n\t * List the app datasets owned by the calling tenant.\n\t * @param cursor Optional pagination cursor.\n\t * @param limit Optional maximum number of entries to return.\n\t * @returns The stored app datasets and the next-page cursor if more exist.\n\t */\n\tlistAppDatasets(\n\t\tcursor?: string,\n\t\tlimit?: number\n\t): Promise<{\n\t\tentities: IDataspaceAppDataset[];\n\t\tcursor?: string;\n\t}>;\n\n\t/**\n\t * Update an app dataset record owned by the calling tenant.\n\t * @param id The stored app dataset id.\n\t * @param appId The dataspace app this dataset belongs to.\n\t * @param dataset The dataset payload.\n\t * @returns Nothing.\n\t */\n\tupdateAppDataset(id: string, appId: string, dataset: IDataspaceProtocolDataset): Promise<void>;\n\n\t/**\n\t * Delete an app dataset record owned by the calling tenant.\n\t * @param id The stored app dataset id.\n\t * @returns Nothing.\n\t */\n\tdeleteAppDataset(id: string): Promise<void>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"IDataspaceControlPlaneComponent.js","sourceRoot":"","sources":["../../../../src/models/controlPlane/IDataspaceControlPlaneComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type {\n\tIDataspaceProtocolContractNegotiation,\n\tIDataspaceProtocolContractNegotiationError,\n\tIDataspaceProtocolDataset,\n\tIDataspaceProtocolTransferCompletionMessage,\n\tIDataspaceProtocolTransferError,\n\tIDataspaceProtocolTransferProcess,\n\tIDataspaceProtocolTransferRequestMessage,\n\tIDataspaceProtocolTransferStartMessage,\n\tIDataspaceProtocolTransferSuspensionMessage,\n\tIDataspaceProtocolTransferTerminationMessage\n} from \"@twin.org/standards-dataspace-protocol\";\nimport type { IDataspaceAppDataset } from \"./IDataspaceAppDataset.js\";\nimport type { INegotiationCallback } from \"./INegotiationCallback.js\";\nimport type { ITransferCallback } from \"./ITransferCallback.js\";\n\n/**\n * Dataspace Control Plane Component interface.\n * Implements Eclipse Dataspace Protocol (DSP) specifications:\n * - Contract Negotiation Protocol\n * - Transfer Process Protocol\n *\n * This component acts as the Control Plane for contract negotiation and\n * data transfers between nodes in a dataspace.\n *\n * DSP 2025-1 Specification: https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1/\n */\nexport interface IDataspaceControlPlaneComponent extends IComponent {\n\t// ============================================================================\n\t// CONTRACT NEGOTIATION PROTOCOL (DSP)\n\t// Methods for negotiating agreements before transfers\n\t// ============================================================================\n\n\t/**\n\t * Register a callback to receive negotiation state change notifications.\n\t * Upstream modules (e.g. supply-chain) register their callback here\n\t * to be notified when negotiations complete, fail, or change state.\n\t * @param key A unique key identifying this callback registration.\n\t * @param callback The callback interface to register.\n\t */\n\tregisterNegotiationCallback(key: string, callback: INegotiationCallback): void;\n\n\t/**\n\t * Unregister a previously registered negotiation callback.\n\t * @param key The key used when registering the callback.\n\t */\n\tunregisterNegotiationCallback(key: string): void;\n\n\t/**\n\t * Negotiate a contract agreement with a provider.\n\t * Implements DSP Contract Negotiation Protocol.\n\t *\n\t * Returns immediately with a negotiationId. The caller is notified\n\t * via the registered INegotiationCallback when the negotiation completes.\n\t * The negotiation follows DSP state machine: REQUESTED → OFFERED → AGREED → VERIFIED → FINALIZED.\n\t *\n\t * This method has NO REST client implementation — it is only accessible via ComponentFactory.get().\n\t *\n\t * DSP Spec: https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1/#negotiation-protocol\n\t *\n\t * @param datasetId The dataset ID from the provider's catalog.\n\t * @param offerId The offer ID from the provider's catalog.\n\t * @param providerEndpoint The provider's contract negotiation endpoint URL.\n\t * @param publicOrigin The public origin URL of this control plane (for callbacks).\n\t * @param trustPayload Trust payload for authentication (JWT or Verifiable Credential).\n\t * @returns The negotiation ID for tracking. Use registered callback for completion.\n\t */\n\tnegotiateAgreement(\n\t\tdatasetId: string,\n\t\tofferId: string,\n\t\tproviderEndpoint: string,\n\t\tpublicOrigin: string,\n\t\ttrustPayload: unknown\n\t): Promise<{ negotiationId: string }>;\n\n\t/**\n\t * Get the current state of a contract negotiation.\n\t * Implements DSP Contract Negotiation Protocol.\n\t *\n\t * Queries the current state of an ongoing or completed negotiation.\n\t * Use this to monitor negotiation progress.\n\t * Returns the DSP-compliant negotiation state or error.\n\t *\n\t * DSP Spec: https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1/#negotiation-protocol\n\t *\n\t * @param negotiationId The unique identifier of the negotiation.\n\t * @param trustPayload Trust payload for authentication.\n\t * @returns DSP ContractNegotiation with current state, or error.\n\t */\n\tgetNegotiation(\n\t\tnegotiationId: string,\n\t\ttrustPayload: unknown\n\t): Promise<IDataspaceProtocolContractNegotiation | IDataspaceProtocolContractNegotiationError>;\n\n\t/**\n\t * Get negotiation history.\n\t * Queries past contract negotiations for audit trails and debugging.\n\t *\n\t * Returns a list of past negotiations with their states and metadata.\n\t * Supports optional filtering by state and pagination via cursor.\n\t *\n\t * @param state Optional filter by negotiation state (e.g., \"FINALIZED\", \"TERMINATED\").\n\t * @param cursor Optional pagination cursor for fetching next page.\n\t * @param trustPayload Trust payload for authentication.\n\t * @returns List of negotiation history entries with pagination cursor.\n\t */\n\tgetNegotiationHistory(\n\t\tstate: string | undefined,\n\t\tcursor: string | undefined,\n\t\ttrustPayload: unknown\n\t): Promise<{\n\t\tnegotiations: {\n\t\t\tnegotiation:\n\t\t\t\t| IDataspaceProtocolContractNegotiation\n\t\t\t\t| IDataspaceProtocolContractNegotiationError;\n\t\t\tcreatedAt: string;\n\t\t\tofferId?: string;\n\t\t\tagreementId?: string;\n\t\t}[];\n\t\tcursor?: string;\n\t\tcount: number;\n\t}>;\n\n\t// ============================================================================\n\t// TRANSFER PROCESS PROTOCOL (DSP)\n\t// Methods for managing data transfers after agreements are established\n\t// ============================================================================\n\n\t// ----------------------------------------------------------------------------\n\t// CONSUMER SIDE OPERATIONS\n\t// Methods called by the Data Consumer to initiate transfers\n\t// ----------------------------------------------------------------------------\n\n\t/**\n\t * Register a callback to receive transfer process state change notifications.\n\t * Upstream modules register their callback here to be notified when a\n\t * consumer-initiated transfer changes state (STARTED, COMPLETED, SUSPENDED,\n\t * TERMINATED).\n\t *\n\t * This method has NO REST client implementation — in-process only.\n\t * @param key A unique key identifying this callback registration.\n\t * @param callback The callback interface to register.\n\t */\n\tregisterTransferCallback(key: string, callback: ITransferCallback): void;\n\n\t/**\n\t * Unregister a previously registered transfer callback.\n\t * @param key The key used when registering the callback.\n\t */\n\tunregisterTransferCallback(key: string): void;\n\n\t/**\n\t * Start a data transfer as a Consumer.\n\t * High-level convenience wrapper around the DSP Transfer Request protocol.\n\t *\n\t * This method:\n\t * 1. Generates a consumerPid.\n\t * 2. POSTs a TransferRequestMessage to the provider's DSP endpoint.\n\t * 3. Persists a local TransferProcess in REQUESTED state (only if provider accepts).\n\t * 4. Returns the consumerPid immediately.\n\t *\n\t * The caller is notified of subsequent state changes (STARTED, COMPLETED, etc.)\n\t * via the registered ITransferCallback. The transfer moves to STARTED when the\n\t * provider POSTs a TransferStartMessage back to this node's callback address.\n\t *\n\t * This method has NO REST client implementation — in-process only.\n\t *\n\t * @param agreementId The finalized agreement ID (from contract negotiation).\n\t * @param providerEndpoint The provider's DSP control plane base URL.\n\t * @param publicOrigin The public origin URL of this control plane (used as callbackAddress).\n\t * @param format The transfer format (e.g. \"HttpData-PULL\", \"HttpData-PUSH\").\n\t * @param trustPayload Trust payload for authentication.\n\t * @returns The consumerPid of the newly created TransferProcess.\n\t */\n\tstartDataTransfer(\n\t\tagreementId: string,\n\t\tproviderEndpoint: string,\n\t\tpublicOrigin: string,\n\t\tformat: string,\n\t\ttrustPayload: unknown\n\t): Promise<{ consumerPid: string }>;\n\n\t/**\n\t * Request a Transfer Process.\n\t * Creates a new Transfer Process in REQUESTED state.\n\t *\n\t * Role Performed: Provider\n\t * Called by: Consumer when it wants to request a new Transfer Process\n\t *\n\t * DSP Spec: https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/#transfer-request-message\n\t *\n\t * @param request Transfer request message (DSP compliant) containing agreementId,\n\t * consumerPid, callbackAddress, and format.\n\t * @param trustPayload Trust payload containing authorization information (JWT, VC, etc.).\n\t * The consumer must prove their identity by providing a valid trust payload.\n\t * @returns Transfer Process (DSP compliant) with state REQUESTED, including\n\t * both consumerPid and providerPid, or TransferError if the operation fails.\n\t */\n\trequestTransfer(\n\t\trequest: IDataspaceProtocolTransferRequestMessage,\n\t\ttrustPayload: unknown\n\t): Promise<IDataspaceProtocolTransferProcess | IDataspaceProtocolTransferError>;\n\n\t// ============================================================================\n\t// PROVIDER SIDE OPERATIONS\n\t// Methods called by the Data Provider to respond to transfer requests\n\t// ============================================================================\n\n\t/**\n\t * Start a Transfer Process.\n\t * Transitions Transfer Process from REQUESTED to STARTED state, or resumes from SUSPENDED state.\n\t *\n\t * Role Performed: Provider / Consumer\n\t * Called by: Provider when a Transfer Process starts, or Consumer to attempt to start a Transfer Process after it has been suspended\n\t *\n\t * DSP Spec: https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/#transfer-start-message\n\t *\n\t * @param message Transfer start message (DSP compliant).\n\t * @param publicOrigin The public origin URL of this service (used to construct data plane endpoint for PULL transfers).\n\t * @param trustPayload Trust payload containing authorization information (JWT, VC, etc.).\n\t * @returns Transfer Start Message (DSP compliant) with dataAddress for PULL transfers, or TransferError if the operation fails.\n\t */\n\tstartTransfer(\n\t\tmessage: IDataspaceProtocolTransferStartMessage,\n\t\tpublicOrigin: string,\n\t\ttrustPayload: unknown\n\t): Promise<IDataspaceProtocolTransferStartMessage | IDataspaceProtocolTransferError>;\n\n\t// ============================================================================\n\t// SHARED STATE MANAGEMENT OPERATIONS\n\t// Methods that can be called by either Consumer or Provider\n\t// ============================================================================\n\n\t/**\n\t * Complete a Transfer Process.\n\t * Transitions Transfer Process to COMPLETED state.\n\t *\n\t * Role Performed: Consumer / Provider\n\t * Called by: Provider or Consumer when a Transfer process is completed on their side\n\t *\n\t * DSP Spec: https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/#transfer-completion-message\n\t *\n\t * @param message Transfer completion message (DSP compliant).\n\t * @param trustPayload Trust payload containing authorization information (JWT, VC, etc.).\n\t * @returns Transfer Process (DSP compliant) with state COMPLETED, or TransferError if the operation fails.\n\t */\n\tcompleteTransfer(\n\t\tmessage: IDataspaceProtocolTransferCompletionMessage,\n\t\ttrustPayload: unknown\n\t): Promise<IDataspaceProtocolTransferProcess | IDataspaceProtocolTransferError>;\n\n\t/**\n\t * Suspend a Transfer Process.\n\t * Transitions Transfer Process to SUSPENDED state.\n\t *\n\t * Role Performed: Consumer / Provider\n\t * Called by: Provider or Consumer when a Transfer process needs to be temporarily suspended on their side\n\t *\n\t * DSP Spec: https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/#transfer-suspension-message\n\t *\n\t * @param message Transfer suspension message (DSP compliant) with optional reason.\n\t * @param trustPayload Trust payload containing authorization information (JWT, VC, etc.).\n\t * @returns Transfer Process (DSP compliant) with state SUSPENDED, or TransferError if the operation fails.\n\t */\n\tsuspendTransfer(\n\t\tmessage: IDataspaceProtocolTransferSuspensionMessage,\n\t\ttrustPayload: unknown\n\t): Promise<IDataspaceProtocolTransferProcess | IDataspaceProtocolTransferError>;\n\n\t/**\n\t * Terminate a Transfer Process.\n\t * Transitions Transfer Process to TERMINATED state.\n\t *\n\t * Role Performed: Consumer / Provider\n\t * Called by: Provider or Consumer when a Transfer process needs to be terminated on their side (e.g., due to error)\n\t *\n\t * DSP Spec: https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/#transfer-termination-message\n\t *\n\t * @param message Transfer termination message (DSP compliant) with optional reason.\n\t * @param trustPayload Trust payload containing authorization information (JWT, VC, etc.).\n\t * @returns Transfer Process (DSP compliant) with state TERMINATED, or TransferError if the operation fails.\n\t */\n\tterminateTransfer(\n\t\tmessage: IDataspaceProtocolTransferTerminationMessage,\n\t\ttrustPayload: unknown\n\t): Promise<IDataspaceProtocolTransferProcess | IDataspaceProtocolTransferError>;\n\n\t/**\n\t * Get Transfer Process State.\n\t * Query the current state of a Transfer Process.\n\t *\n\t * Role Performed: Consumer / Provider\n\t * Called by: Provider or Consumer when they need to check the status of a Transfer process on their side\n\t *\n\t * Supports role-agnostic lookup using either consumerPid or providerPid.\n\t * The service will automatically detect which role the caller is acting as\n\t * (Consumer or Provider) based on the PID provided.\n\t *\n\t * DSP Spec: https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/#ack-transfer-process\n\t *\n\t * @param pid The Process ID (consumerPid or providerPid) used to identify the transfer.\n\t * @param trustPayload Trust payload containing authorization information (JWT, VC, etc.).\n\t * @returns Transfer Process (DSP compliant) with current state, or TransferError if the operation fails.\n\t */\n\tgetTransferProcess(\n\t\tpid: string,\n\t\ttrustPayload: unknown\n\t): Promise<IDataspaceProtocolTransferProcess | IDataspaceProtocolTransferError>;\n\n\t// ============================================================================\n\t// DATASET MANAGEMENT\n\t// CRUD over the tenant-scoped dataset records the Control Plane reads at\n\t// start time to populate the federated catalogue.\n\t// ============================================================================\n\n\t/**\n\t * Register an app dataset for a dataspace app, owned by the calling tenant.\n\t * @param id Optional explicit id. If omitted, derived from `dataset[\"@id\"]`\n\t * or generated.\n\t * @param appId The dataspace app this dataset belongs to (matches\n\t * `DataspaceAppFactory` registration name).\n\t * @param dataset The dataset payload (may omit system-stamped fields).\n\t * @returns The resolved dataset id.\n\t */\n\tcreateAppDataset(\n\t\tid: string | undefined,\n\t\tappId: string,\n\t\tdataset: IDataspaceProtocolDataset\n\t): Promise<string>;\n\n\t/**\n\t * Get an app dataset record owned by the calling tenant.\n\t * @param id The stored app dataset id.\n\t * @returns The stored app dataset record.\n\t */\n\tgetAppDataset(id: string): Promise<IDataspaceAppDataset>;\n\n\t/**\n\t * List the app datasets owned by the calling tenant.\n\t * @param cursor Optional pagination cursor.\n\t * @param limit Optional maximum number of entries to return.\n\t * @returns The stored app datasets and the next-page cursor if more exist.\n\t */\n\tlistAppDatasets(\n\t\tcursor?: string,\n\t\tlimit?: number\n\t): Promise<{\n\t\tentities: IDataspaceAppDataset[];\n\t\tcursor?: string;\n\t}>;\n\n\t/**\n\t * Update an app dataset record owned by the calling tenant.\n\t * @param id The stored app dataset id.\n\t * @param appId The dataspace app this dataset belongs to.\n\t * @param dataset The dataset payload.\n\t * @returns Nothing.\n\t */\n\tupdateAppDataset(id: string, appId: string, dataset: IDataspaceProtocolDataset): Promise<void>;\n\n\t/**\n\t * Delete an app dataset record owned by the calling tenant.\n\t * @param id The stored app dataset id.\n\t * @returns Nothing.\n\t */\n\tdeleteAppDataset(id: string): Promise<void>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ITransferContext.js","sourceRoot":"","sources":["../../../../src/models/controlPlane/ITransferContext.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type {\n\tDataspaceProtocolTransferProcessStateType,\n\tIDataspaceProtocolAgreement,\n\tIDataspaceProtocolDataAddress\n} from \"@twin.org/standards-dataspace-protocol\";\n\n/**\n * Transfer Context data structure.\n * Contains all information needed by DSC to execute queries.\n * This is NOT part of the DSP protocol - it's a TWIN internal API\n * used by dataspace-control-plane to resolve consumerPid to datasetId and policies.\n */\nexport interface ITransferContext {\n\t/**\n\t * Consumer Process ID.\n\t */\n\tconsumerPid: string;\n\n\t/**\n\t * Provider Process ID.\n\t */\n\tproviderPid: string;\n\n\t/**\n\t * Agreement associated with this Transfer Process.\n\t * Contains permissions, obligations, and prohibitions that DSC uses for runtime policy enforcement.\n\t */\n\tagreement: IDataspaceProtocolAgreement;\n\n\t/**\n\t * Dataset ID - what the DSC needs to execute the query.\n\t * Convenience field extracted from agreement.target for quick access.\n\t */\n\tdatasetId: string;\n\n\t/**\n\t * Offer ID.\n\t */\n\tofferId: string;\n\n\t/**\n\t * Current Transfer Process state.\n\t * DSC should only allow queries if state is STARTED.\n\t */\n\tstate: DataspaceProtocolTransferProcessStateType;\n\n\t/**\n\t * Consumer identity (for auditing).\n\t */\n\tconsumerIdentity?: string;\n\n\t/**\n\t * Provider identity (for auditing).\n\t * Extracted from Agreement's assigner field.\n\t */\n\tproviderIdentity?: string;\n\n\t/**\n\t * Data address for consumer-initiated push transfers (
|
|
1
|
+
{"version":3,"file":"ITransferContext.js","sourceRoot":"","sources":["../../../../src/models/controlPlane/ITransferContext.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type {\n\tDataspaceProtocolTransferProcessStateType,\n\tIDataspaceProtocolAgreement,\n\tIDataspaceProtocolDataAddress\n} from \"@twin.org/standards-dataspace-protocol\";\n\n/**\n * Transfer Context data structure.\n * Contains all information needed by DSC to execute queries.\n * This is NOT part of the DSP protocol - it's a TWIN internal API\n * used by dataspace-control-plane to resolve consumerPid to datasetId and policies.\n */\nexport interface ITransferContext {\n\t/**\n\t * Consumer Process ID.\n\t */\n\tconsumerPid: string;\n\n\t/**\n\t * Provider Process ID.\n\t */\n\tproviderPid: string;\n\n\t/**\n\t * Agreement associated with this Transfer Process.\n\t * Contains permissions, obligations, and prohibitions that DSC uses for runtime policy enforcement.\n\t */\n\tagreement: IDataspaceProtocolAgreement;\n\n\t/**\n\t * Dataset ID - what the DSC needs to execute the query.\n\t * Convenience field extracted from agreement.target for quick access.\n\t */\n\tdatasetId: string;\n\n\t/**\n\t * Offer ID.\n\t */\n\tofferId: string;\n\n\t/**\n\t * Current Transfer Process state.\n\t * DSC should only allow queries if state is STARTED.\n\t */\n\tstate: DataspaceProtocolTransferProcessStateType;\n\n\t/**\n\t * Consumer identity (for auditing).\n\t */\n\tconsumerIdentity?: string;\n\n\t/**\n\t * Provider identity (for auditing).\n\t * Extracted from Agreement's assigner field.\n\t */\n\tproviderIdentity?: string;\n\n\t/**\n\t * Data address for consumer-initiated push transfers (HttpData-PUSH).\n\t * Contains the consumer's /inbox endpoint as supplied in the TransferRequestMessage.\n\t * Absent for PULL (HttpData-PULL) and provider-initiated push (HttpData-POST),\n\t * where the consumer deliberately omits a dataAddress.\n\t */\n\tdataAddress?: IDataspaceProtocolDataAddress;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ITransferProcess.js","sourceRoot":"","sources":["../../../../src/models/controlPlane/ITransferProcess.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type {\n\tDataspaceProtocolTransferProcessStateType,\n\tIDataspaceProtocolDataAddress,\n\tIDataspaceProtocolPolicy\n} from \"@twin.org/standards-dataspace-protocol\";\n\n/**\n * Transfer Process for internal storage.\n * Combines DSP protocol fields with internal TWIN fields.\n * This is NOT the DSP wire format (use ITransferProcess from standards for that).\n */\nexport interface ITransferProcess {\n\t/**\n\t * Internal UUID (primary key for entity storage).\n\t */\n\tid: string;\n\n\t// === DSP Protocol fields (public) ===\n\n\t/**\n\t * Consumer Process ID from the DSP protocol.\n\t * Refers to the transfer identifier on the Consumer side.\n\t */\n\tconsumerPid: string;\n\n\t/**\n\t * Provider Process ID from the DSP protocol.\n\t * Refers to the transfer identifier on the Provider side.\n\t */\n\tproviderPid: string;\n\n\t/**\n\t * Transfer Process state from the DSP protocol.\n\t * One of: REQUESTED, STARTED, COMPLETED, SUSPENDED, TERMINATED.\n\t */\n\tstate: DataspaceProtocolTransferProcessStateType;\n\n\t// === Internal TWIN fields (NOT in DSP protocol) ===\n\n\t/**\n\t * Agreement ID linking to the rights-management Agreement.\n\t * Used to resolve policies and permissions.\n\t */\n\tagreementId: string;\n\n\t/**\n\t * Dataset ID for DSC resolution.\n\t * Identifies the dataset being transferred.\n\t */\n\tdatasetId: string;\n\n\t/**\n\t * Offer ID from the original Catalog offer.\n\t */\n\tofferId: string;\n\n\t/**\n\t * Policies from the Agreement.\n\t * Used by DSC for runtime policy enforcement.\n\t */\n\tpolicies?: IDataspaceProtocolPolicy[];\n\n\t/**\n\t * Consumer identity (DID or URI).\n\t * Used for auditing and access control.\n\t */\n\tconsumerIdentity?: string;\n\n\t/**\n\t * Provider identity (DID or URI).\n\t * Used for auditing.\n\t */\n\tproviderIdentity?: string;\n\n\t/**\n\t * Callback address for Consumer notifications.\n\t * URI where messages to the Consumer should be sent.\n\t */\n\tcallbackAddress?: string;\n\n\t/**\n\t * The tenant that owns this transfer process, captured at write time so async\n\t * delivery tasks and delayed state transitions can re-enter the right tenant context.\n\t * Optional — single-tenant nodes operate without a tenant context.\n\t */\n\ttenantId?: string;\n\n\t/**\n\t * Data format from the Dataset Distribution.\n\t * Specified by a Distribution for the Dataset associated with the Agreement.\n\t */\n\tformat?: string;\n\n\t/**\n\t * Data address for consumer-initiated push transfers (
|
|
1
|
+
{"version":3,"file":"ITransferProcess.js","sourceRoot":"","sources":["../../../../src/models/controlPlane/ITransferProcess.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type {\n\tDataspaceProtocolTransferProcessStateType,\n\tIDataspaceProtocolDataAddress,\n\tIDataspaceProtocolPolicy\n} from \"@twin.org/standards-dataspace-protocol\";\n\n/**\n * Transfer Process for internal storage.\n * Combines DSP protocol fields with internal TWIN fields.\n * This is NOT the DSP wire format (use ITransferProcess from standards for that).\n */\nexport interface ITransferProcess {\n\t/**\n\t * Internal UUID (primary key for entity storage).\n\t */\n\tid: string;\n\n\t// === DSP Protocol fields (public) ===\n\n\t/**\n\t * Consumer Process ID from the DSP protocol.\n\t * Refers to the transfer identifier on the Consumer side.\n\t */\n\tconsumerPid: string;\n\n\t/**\n\t * Provider Process ID from the DSP protocol.\n\t * Refers to the transfer identifier on the Provider side.\n\t */\n\tproviderPid: string;\n\n\t/**\n\t * Transfer Process state from the DSP protocol.\n\t * One of: REQUESTED, STARTED, COMPLETED, SUSPENDED, TERMINATED.\n\t */\n\tstate: DataspaceProtocolTransferProcessStateType;\n\n\t// === Internal TWIN fields (NOT in DSP protocol) ===\n\n\t/**\n\t * Agreement ID linking to the rights-management Agreement.\n\t * Used to resolve policies and permissions.\n\t */\n\tagreementId: string;\n\n\t/**\n\t * Dataset ID for DSC resolution.\n\t * Identifies the dataset being transferred.\n\t */\n\tdatasetId: string;\n\n\t/**\n\t * Offer ID from the original Catalog offer.\n\t */\n\tofferId: string;\n\n\t/**\n\t * Policies from the Agreement.\n\t * Used by DSC for runtime policy enforcement.\n\t */\n\tpolicies?: IDataspaceProtocolPolicy[];\n\n\t/**\n\t * Consumer identity (DID or URI).\n\t * Used for auditing and access control.\n\t */\n\tconsumerIdentity?: string;\n\n\t/**\n\t * Provider identity (DID or URI).\n\t * Used for auditing.\n\t */\n\tproviderIdentity?: string;\n\n\t/**\n\t * Callback address for Consumer notifications.\n\t * URI where messages to the Consumer should be sent.\n\t */\n\tcallbackAddress?: string;\n\n\t/**\n\t * The tenant that owns this transfer process, captured at write time so async\n\t * delivery tasks and delayed state transitions can re-enter the right tenant context.\n\t * Optional — single-tenant nodes operate without a tenant context.\n\t */\n\ttenantId?: string;\n\n\t/**\n\t * Data format from the Dataset Distribution.\n\t * Specified by a Distribution for the Dataset associated with the Agreement.\n\t */\n\tformat?: string;\n\n\t/**\n\t * Data address for consumer-initiated push transfers (HttpData-PUSH).\n\t * Contains the consumer's /inbox endpoint as supplied in the TransferRequestMessage.\n\t * Absent for PULL (HttpData-PULL) and provider-initiated push (HttpData-POST),\n\t * where the consumer deliberately omits a dataAddress.\n\t */\n\tdataAddress?: IDataspaceProtocolDataAddress;\n\n\t/**\n\t * Creation timestamp.\n\t */\n\tdateCreated: Date;\n\n\t/**\n\t * Last update timestamp.\n\t */\n\tdateModified: Date;\n}\n"]}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* TWIN transfer format identifiers used in TransferRequestMessage.format.
|
|
5
5
|
* Follows the Eclipse EDC canonical pattern: DestinationType-FlowType.
|
|
6
|
-
* See RFC-007 Data Transfer Profile.
|
|
7
6
|
*/
|
|
8
7
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
9
8
|
export const DataspaceTransferFormat = {
|
|
@@ -11,18 +10,18 @@ export const DataspaceTransferFormat = {
|
|
|
11
10
|
* PULL mode: consumer queries data via a bearer-token-protected endpoint.
|
|
12
11
|
* Data flows: Consumer GET provider endpoint (with token).
|
|
13
12
|
*/
|
|
14
|
-
|
|
13
|
+
HttpDataPull: "HttpData-PULL",
|
|
15
14
|
/**
|
|
16
15
|
* Consumer-initiated PUSH mode: consumer supplies their /inbox endpoint in the
|
|
17
16
|
* TransferRequestMessage. Provider pushes ActivityStreams objects to that endpoint.
|
|
18
17
|
* Data flows: Provider POST to consumer's /inbox.
|
|
19
18
|
*/
|
|
20
|
-
|
|
19
|
+
HttpDataPush: "HttpData-PUSH",
|
|
21
20
|
/**
|
|
22
21
|
* Provider-initiated PUSH mode (inverted flow): consumer supplies no dataAddress.
|
|
23
22
|
* Provider returns its own /inbox URL + signed JWT. Consumer then posts data there.
|
|
24
23
|
* Data flows: Consumer POST to provider's /inbox.
|
|
25
24
|
*/
|
|
26
|
-
|
|
25
|
+
HttpDataPost: "HttpData-POST"
|
|
27
26
|
};
|
|
28
27
|
//# sourceMappingURL=dataspaceTransferFormat.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataspaceTransferFormat.js","sourceRoot":"","sources":["../../../src/models/dataspaceTransferFormat.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC
|
|
1
|
+
{"version":3,"file":"dataspaceTransferFormat.js","sourceRoot":"","sources":["../../../src/models/dataspaceTransferFormat.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;;GAGG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACtC;;;OAGG;IACH,YAAY,EAAE,eAAe;IAE7B;;;;OAIG;IACH,YAAY,EAAE,eAAe;IAE7B;;;;OAIG;IACH,YAAY,EAAE,eAAe;CACpB,CAAC","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * TWIN transfer format identifiers used in TransferRequestMessage.format.\n * Follows the Eclipse EDC canonical pattern: DestinationType-FlowType.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const DataspaceTransferFormat = {\n\t/**\n\t * PULL mode: consumer queries data via a bearer-token-protected endpoint.\n\t * Data flows: Consumer GET provider endpoint (with token).\n\t */\n\tHttpDataPull: \"HttpData-PULL\",\n\n\t/**\n\t * Consumer-initiated PUSH mode: consumer supplies their /inbox endpoint in the\n\t * TransferRequestMessage. Provider pushes ActivityStreams objects to that endpoint.\n\t * Data flows: Provider POST to consumer's /inbox.\n\t */\n\tHttpDataPush: \"HttpData-PUSH\",\n\n\t/**\n\t * Provider-initiated PUSH mode (inverted flow): consumer supplies no dataAddress.\n\t * Provider returns its own /inbox URL + signed JWT. Consumer then posts data there.\n\t * Data flows: Consumer POST to provider's /inbox.\n\t */\n\tHttpDataPost: \"HttpData-POST\"\n} as const;\n\n/**\n * Type for the DataspaceTransferFormat const values.\n */\nexport type DataspaceTransferFormat =\n\t(typeof DataspaceTransferFormat)[keyof typeof DataspaceTransferFormat];\n"]}
|
|
@@ -122,7 +122,7 @@ export interface IDataspaceControlPlaneComponent extends IComponent {
|
|
|
122
122
|
* @param agreementId The finalized agreement ID (from contract negotiation).
|
|
123
123
|
* @param providerEndpoint The provider's DSP control plane base URL.
|
|
124
124
|
* @param publicOrigin The public origin URL of this control plane (used as callbackAddress).
|
|
125
|
-
* @param format The transfer format (e.g. "
|
|
125
|
+
* @param format The transfer format (e.g. "HttpData-PULL", "HttpData-PUSH").
|
|
126
126
|
* @param trustPayload Trust payload for authentication.
|
|
127
127
|
* @returns The consumerPid of the newly created TransferProcess.
|
|
128
128
|
*/
|
|
@@ -43,9 +43,9 @@ export interface ITransferContext {
|
|
|
43
43
|
*/
|
|
44
44
|
providerIdentity?: string;
|
|
45
45
|
/**
|
|
46
|
-
* Data address for consumer-initiated push transfers (
|
|
46
|
+
* Data address for consumer-initiated push transfers (HttpData-PUSH).
|
|
47
47
|
* Contains the consumer's /inbox endpoint as supplied in the TransferRequestMessage.
|
|
48
|
-
* Absent for PULL (
|
|
48
|
+
* Absent for PULL (HttpData-PULL) and provider-initiated push (HttpData-POST),
|
|
49
49
|
* where the consumer deliberately omits a dataAddress.
|
|
50
50
|
*/
|
|
51
51
|
dataAddress?: IDataspaceProtocolDataAddress;
|
|
@@ -70,9 +70,9 @@ export interface ITransferProcess {
|
|
|
70
70
|
*/
|
|
71
71
|
format?: string;
|
|
72
72
|
/**
|
|
73
|
-
* Data address for consumer-initiated push transfers (
|
|
73
|
+
* Data address for consumer-initiated push transfers (HttpData-PUSH).
|
|
74
74
|
* Contains the consumer's /inbox endpoint as supplied in the TransferRequestMessage.
|
|
75
|
-
* Absent for PULL (
|
|
75
|
+
* Absent for PULL (HttpData-PULL) and provider-initiated push (HttpData-POST),
|
|
76
76
|
* where the consumer deliberately omits a dataAddress.
|
|
77
77
|
*/
|
|
78
78
|
dataAddress?: IDataspaceProtocolDataAddress;
|
|
@@ -1,26 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* TWIN transfer format identifiers used in TransferRequestMessage.format.
|
|
3
3
|
* Follows the Eclipse EDC canonical pattern: DestinationType-FlowType.
|
|
4
|
-
* See RFC-007 Data Transfer Profile.
|
|
5
4
|
*/
|
|
6
5
|
export declare const DataspaceTransferFormat: {
|
|
7
6
|
/**
|
|
8
7
|
* PULL mode: consumer queries data via a bearer-token-protected endpoint.
|
|
9
8
|
* Data flows: Consumer GET provider endpoint (with token).
|
|
10
9
|
*/
|
|
11
|
-
readonly
|
|
10
|
+
readonly HttpDataPull: "HttpData-PULL";
|
|
12
11
|
/**
|
|
13
12
|
* Consumer-initiated PUSH mode: consumer supplies their /inbox endpoint in the
|
|
14
13
|
* TransferRequestMessage. Provider pushes ActivityStreams objects to that endpoint.
|
|
15
14
|
* Data flows: Provider POST to consumer's /inbox.
|
|
16
15
|
*/
|
|
17
|
-
readonly
|
|
16
|
+
readonly HttpDataPush: "HttpData-PUSH";
|
|
18
17
|
/**
|
|
19
18
|
* Provider-initiated PUSH mode (inverted flow): consumer supplies no dataAddress.
|
|
20
19
|
* Provider returns its own /inbox URL + signed JWT. Consumer then posts data there.
|
|
21
20
|
* Data flows: Consumer POST to provider's /inbox.
|
|
22
21
|
*/
|
|
23
|
-
readonly
|
|
22
|
+
readonly HttpDataPost: "HttpData-POST";
|
|
24
23
|
};
|
|
25
24
|
/**
|
|
26
25
|
* Type for the DataspaceTransferFormat const values.
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.3-next.35](https://github.com/iotaledger/twin-dataspace/compare/dataspace-models-v0.0.3-next.34...dataspace-models-v0.0.3-next.35) (2026-06-02)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* update DataspaceTransferFormat names ([2c9d424](https://github.com/iotaledger/twin-dataspace/commit/2c9d424a07b97346faa2124048c4675514d58109))
|
|
9
|
+
|
|
3
10
|
## [0.0.3-next.34](https://github.com/iotaledger/twin-dataspace/compare/dataspace-models-v0.0.3-next.33...dataspace-models-v0.0.3-next.34) (2026-06-01)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -286,7 +286,7 @@ The public origin URL of this control plane (used as callbackAddress).
|
|
|
286
286
|
|
|
287
287
|
`string`
|
|
288
288
|
|
|
289
|
-
The transfer format (e.g. "
|
|
289
|
+
The transfer format (e.g. "HttpData-PULL", "HttpData-PUSH").
|
|
290
290
|
|
|
291
291
|
##### trustPayload
|
|
292
292
|
|
|
@@ -79,7 +79,7 @@ Extracted from Agreement's assigner field.
|
|
|
79
79
|
|
|
80
80
|
> `optional` **dataAddress?**: `IDataspaceProtocolDataAddress`
|
|
81
81
|
|
|
82
|
-
Data address for consumer-initiated push transfers (
|
|
82
|
+
Data address for consumer-initiated push transfers (HttpData-PUSH).
|
|
83
83
|
Contains the consumer's /inbox endpoint as supplied in the TransferRequestMessage.
|
|
84
|
-
Absent for PULL (
|
|
84
|
+
Absent for PULL (HttpData-PULL) and provider-initiated push (HttpData-POST),
|
|
85
85
|
where the consumer deliberately omits a dataAddress.
|
|
@@ -126,9 +126,9 @@ Specified by a Distribution for the Dataset associated with the Agreement.
|
|
|
126
126
|
|
|
127
127
|
> `optional` **dataAddress?**: `IDataspaceProtocolDataAddress`
|
|
128
128
|
|
|
129
|
-
Data address for consumer-initiated push transfers (
|
|
129
|
+
Data address for consumer-initiated push transfers (HttpData-PUSH).
|
|
130
130
|
Contains the consumer's /inbox endpoint as supplied in the TransferRequestMessage.
|
|
131
|
-
Absent for PULL (
|
|
131
|
+
Absent for PULL (HttpData-PULL) and provider-initiated push (HttpData-POST),
|
|
132
132
|
where the consumer deliberately omits a dataAddress.
|
|
133
133
|
|
|
134
134
|
***
|
|
@@ -4,28 +4,27 @@
|
|
|
4
4
|
|
|
5
5
|
TWIN transfer format identifiers used in TransferRequestMessage.format.
|
|
6
6
|
Follows the Eclipse EDC canonical pattern: DestinationType-FlowType.
|
|
7
|
-
See RFC-007 Data Transfer Profile.
|
|
8
7
|
|
|
9
8
|
## Type Declaration
|
|
10
9
|
|
|
11
|
-
###
|
|
10
|
+
### HttpDataPull {#httpdatapull}
|
|
12
11
|
|
|
13
|
-
> `readonly` **
|
|
12
|
+
> `readonly` **HttpDataPull**: `"HttpData-PULL"` = `"HttpData-PULL"`
|
|
14
13
|
|
|
15
14
|
PULL mode: consumer queries data via a bearer-token-protected endpoint.
|
|
16
15
|
Data flows: Consumer GET provider endpoint (with token).
|
|
17
16
|
|
|
18
|
-
###
|
|
17
|
+
### HttpDataPush {#httpdatapush}
|
|
19
18
|
|
|
20
|
-
> `readonly` **
|
|
19
|
+
> `readonly` **HttpDataPush**: `"HttpData-PUSH"` = `"HttpData-PUSH"`
|
|
21
20
|
|
|
22
21
|
Consumer-initiated PUSH mode: consumer supplies their /inbox endpoint in the
|
|
23
22
|
TransferRequestMessage. Provider pushes ActivityStreams objects to that endpoint.
|
|
24
23
|
Data flows: Provider POST to consumer's /inbox.
|
|
25
24
|
|
|
26
|
-
###
|
|
25
|
+
### HttpDataPost {#httpdatapost}
|
|
27
26
|
|
|
28
|
-
> `readonly` **
|
|
27
|
+
> `readonly` **HttpDataPost**: `"HttpData-POST"` = `"HttpData-POST"`
|
|
29
28
|
|
|
30
29
|
Provider-initiated PUSH mode (inverted flow): consumer supplies no dataAddress.
|
|
31
30
|
Provider returns its own /inbox URL + signed JWT. Consumer then posts data there.
|
package/package.json
CHANGED