@twin.org/dataspace-models 0.9.1-next.8 → 0.9.1
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/entities/transferProcess.js.map +1 -1
- package/dist/es/models/IPushDeliveryPayload.js.map +1 -1
- 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/types/entities/transferProcess.d.ts +3 -2
- package/dist/types/models/IPushDeliveryPayload.d.ts +2 -2
- package/dist/types/models/controlPlane/ITransferContext.d.ts +3 -2
- package/dist/types/models/controlPlane/ITransferProcess.d.ts +3 -2
- package/docs/changelog.md +71 -0
- package/docs/reference/classes/TransferProcess.md +1 -1
- package/docs/reference/interfaces/IPushDeliveryPayload.md +1 -1
- package/docs/reference/interfaces/ITransferContext.md +1 -1
- package/docs/reference/interfaces/ITransferProcess.md +1 -1
- package/package.json +15 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transferProcess.js","sourceRoot":"","sources":["../../../src/entities/transferProcess.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAQnE;;;GAGG;AAEI,IAAM,eAAe,GAArB,MAAM,eAAe;IAC3B;;;OAGG;IAEI,WAAW,CAAU;IAE5B;;OAEG;IAEI,EAAE,CAAU;IAEnB;;;OAGG;IAEI,WAAW,CAAU;IAE5B;;OAEG;IAEI,WAAW,CAAU;IAE5B;;;OAGG;IAEI,KAAK,CAA6C;IAEzD;;OAEG;IAEI,SAAS,CAAU;IAE1B;;OAEG;IAEI,OAAO,CAAU;IAExB;;OAEG;IAEI,gBAAgB,CAAU;IAEjC;;OAEG;IAEI,gBAAgB,CAAU;IAEjC;;;;OAIG;IAEI,SAAS,CAAuB;IAEvC;;OAEG;IAEI,MAAM,CAAU;IAEvB;;OAEG;IAEI,eAAe,CAAU;IAEhC;;OAEG;IAEI,oBAAoB,CAAU;IAErC;;OAEG;IAEI,WAAW,CAAU;IAE5B;;OAEG;IAEI,YAAY,CAAU;IAE7B;;OAEG;IAEI,QAAQ,
|
|
1
|
+
{"version":3,"file":"transferProcess.js","sourceRoot":"","sources":["../../../src/entities/transferProcess.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAQnE;;;GAGG;AAEI,IAAM,eAAe,GAArB,MAAM,eAAe;IAC3B;;;OAGG;IAEI,WAAW,CAAU;IAE5B;;OAEG;IAEI,EAAE,CAAU;IAEnB;;;OAGG;IAEI,WAAW,CAAU;IAE5B;;OAEG;IAEI,WAAW,CAAU;IAE5B;;;OAGG;IAEI,KAAK,CAA6C;IAEzD;;OAEG;IAEI,SAAS,CAAU;IAE1B;;OAEG;IAEI,OAAO,CAAU;IAExB;;OAEG;IAEI,gBAAgB,CAAU;IAEjC;;OAEG;IAEI,gBAAgB,CAAU;IAEjC;;;;OAIG;IAEI,SAAS,CAAuB;IAEvC;;OAEG;IAEI,MAAM,CAAU;IAEvB;;OAEG;IAEI,eAAe,CAAU;IAEhC;;OAEG;IAEI,oBAAoB,CAAU;IAErC;;OAEG;IAEI,WAAW,CAAU;IAE5B;;OAEG;IAEI,YAAY,CAAU;IAE7B;;OAEG;IAEI,QAAQ,CAA6B;IAE5C;;OAEG;IAEI,WAAW,CAAiC;CACnD,CAAA;AArGO;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;oDAClB;AAMrB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;;2CACV;AAOZ;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;;oDACpB;AAMrB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;;oDACD;AAOrB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;;8CAC4B;AAMlD;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;;kDACH;AAMnB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;;gDACL;AAMjB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yDACZ;AAM1B;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yDACZ;AAQ1B;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDACN;AAMhC;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACtB;AAMhB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wDACb;AAMzB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;;6DACQ;AAM9B;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,CAAC,UAAU,EAAE,CAAC;;oDAC/D;AAMrB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;;qDACrB;AAMtB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDAChB;AAMrC;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oDACV;AA1GvC,eAAe;IAD3B,MAAM,EAAE;GACI,eAAe,CA2G3B","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { entity, property, SortDirection } from \"@twin.org/entity\";\nimport type { IRightsManagementPolicy } from \"@twin.org/rights-management-models\";\nimport type {\n\tDataspaceProtocolTransferProcessStateType,\n\tIDataspaceProtocolDataAddress\n} from \"@twin.org/standards-dataspace-protocol\";\nimport type { TransferProcessRole } from \"../models/controlPlane/transferProcessRole.js\";\n\n/**\n * Transfer Process for shared storage between Control Plane and Data Plane.\n * This entity is the persistent representation of ITransferProcess.\n */\n@entity()\nexport class TransferProcess {\n\t/**\n\t * The consumer PID is the primary key.\n\t * Used for direct lookup by consumerPid.\n\t */\n\t@property({ type: \"string\", isPrimary: true })\n\tpublic consumerPid!: string;\n\n\t/**\n\t * Internal UUID for storage (secondary key for providerPid lookup).\n\t */\n\t@property({ type: \"string\" })\n\tpublic id!: string;\n\n\t/**\n\t * Provider Process ID from the DSP protocol.\n\t * Indexed for lookup by providerPid.\n\t */\n\t@property({ type: \"string\", isSecondary: true })\n\tpublic providerPid!: string;\n\n\t/**\n\t * Agreement ID linking to the rights-management Agreement.\n\t */\n\t@property({ type: \"string\" })\n\tpublic agreementId!: 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\t@property({ type: \"string\" })\n\tpublic state!: DataspaceProtocolTransferProcessStateType;\n\n\t/**\n\t * Dataset ID for DSC resolution.\n\t */\n\t@property({ type: \"string\" })\n\tpublic datasetId!: string;\n\n\t/**\n\t * Offer ID from the original Catalog offer.\n\t */\n\t@property({ type: \"string\" })\n\tpublic offerId!: string;\n\n\t/**\n\t * Consumer identity (DID or URI).\n\t */\n\t@property({ type: \"string\", optional: true })\n\tpublic consumerIdentity?: string;\n\n\t/**\n\t * Provider identity (DID or URI).\n\t */\n\t@property({ type: \"string\", optional: true })\n\tpublic providerIdentity?: string;\n\n\t/**\n\t * This node's role in the transfer, captured at write time so state transitions and async delivery\n\t * can tell which party we are without inferring it from the matched PID (consumerPid is the primary\n\t * key on both nodes). Optional for back-compat with records written before this field existed.\n\t */\n\t@property({ type: \"string\", optional: true })\n\tpublic localRole?: TransferProcessRole;\n\n\t/**\n\t * Data format from the Dataset Distribution.\n\t */\n\t@property({ type: \"string\", optional: true })\n\tpublic format?: string;\n\n\t/**\n\t * Callback address for Consumer notifications.\n\t */\n\t@property({ type: \"string\", optional: true })\n\tpublic callbackAddress?: string;\n\n\t/**\n\t * The organization that owns this transfer process, captured from the request context at write time.\n\t */\n\t@property({ type: \"string\" })\n\tpublic organizationIdentity!: string;\n\n\t/**\n\t * Creation timestamp (ISO string format).\n\t */\n\t@property({ type: \"string\", format: \"date-time\", sortDirection: SortDirection.Descending })\n\tpublic dateCreated!: string;\n\n\t/**\n\t * Last update timestamp (ISO string format).\n\t */\n\t@property({ type: \"string\", format: \"date-time\" })\n\tpublic dateModified!: string;\n\n\t/**\n\t * Policies from the Agreement (stored as JSON).\n\t */\n\t@property({ type: \"array\", format: \"json\", optional: true })\n\tpublic policies?: IRightsManagementPolicy[];\n\n\t/**\n\t * Data address for push mode transfers (stored as JSON).\n\t */\n\t@property({ type: \"object\", format: \"json\", optional: true })\n\tpublic dataAddress?: IDataspaceProtocolDataAddress;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IPushDeliveryPayload.js","sourceRoot":"","sources":["../../../src/models/IPushDeliveryPayload.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type {
|
|
1
|
+
{"version":3,"file":"IPushDeliveryPayload.js","sourceRoot":"","sources":["../../../src/models/IPushDeliveryPayload.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { IRightsManagementAgreement } from \"@twin.org/rights-management-models\";\n\n/**\n * Payload handed to pushDeliveryRunner via a Background Task.\n * Contains everything the runner needs to POST one Activity Streams\n * object to a consumer's /inbox without touching entity storage.\n */\nexport interface IPushDeliveryPayload {\n\t/**\n\t * The consumer process ID identifying the transfer.\n\t */\n\tconsumerPid: string;\n\n\t/**\n\t * The provider process ID identifying the transfer.\n\t */\n\tproviderPid: string;\n\n\t/**\n\t * PID to set as Activity.generator. Always equals providerPid since\n\t * processOutboxActivity is only invoked for consumer-initiated push,\n\t * where the provider is the data sender.\n\t */\n\tgeneratorPid: string;\n\n\t/**\n\t * The consumer's inbox endpoint URL to POST the activity to.\n\t */\n\tconsumerEndpoint: string;\n\n\t/**\n\t * Optional Bearer token for authenticating the push request.\n\t */\n\tconsumerAuthToken?: string;\n\n\t/**\n\t * The ODRL agreement governing the data transfer.\n\t */\n\tagreement: IRightsManagementAgreement;\n\n\t/**\n\t * The JSON-LD data payload to deliver to the consumer.\n\t */\n\tdata: IJsonLdNodeObject;\n\n\t/**\n\t * The JSON-LD @type of the data entity being delivered.\n\t */\n\tentityType: string;\n\n\t/**\n\t * The tenant that owns this push delivery, captured at schedule time from the active\n\t * `ContextIdStore` context (typically from the subscription's `tenantId` field).\n\t * The runner re-establishes this tenant context via `ContextIdStore.run` before invoking\n\t * tenant-scoped operations (PEP, trust signing, vault lookups). Optional — single-tenant\n\t * nodes operate without a tenant context.\n\t */\n\ttenantId?: string;\n\n\t/**\n\t * Timeout (ms) for the push delivery HTTP POST. Packaged at schedule time from service config.\n\t * @default 30000\n\t */\n\tpushTimeoutMs?: number;\n\n\t/**\n\t * Max HTTP retry attempts for this delivery. Packaged at schedule time from service config.\n\t * @default 3\n\t */\n\tpushRetryCount?: number;\n\t/**\n\t * Base retry delay (ms) for this delivery. Packaged at schedule time from service config.\n\t * @default 1000\n\t */\n\tpushRetryBaseDelayMs?: number;\n}\n"]}
|
|
@@ -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\tIDataspaceProtocolVersionResponse\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 * When the caller's identity matches the local organization ID (implicit trust), an\n\t * agreement with full access is created and stored immediately, registered callbacks\n\t * are fired synchronously, and only `agreementId` is returned (no `negotiationId`).\n\t *\n\t * Otherwise the method returns immediately with a `negotiationId`. The caller is\n\t * notified 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 * The REST client does not support this method and throws a not supported error —\n\t * use ComponentFactory.get() for the in-process service.\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 trustPayload Trust payload for authentication (JWT or Verifiable Credential).\n\t * @returns For implicit trust: `{ agreementId }`. For external negotiation: `{ negotiationId }`.\n\t */\n\tnegotiateAgreement(\n\t\tdatasetId: string,\n\t\tofferId: string,\n\t\tproviderEndpoint: string,\n\t\ttrustPayload: unknown\n\t): Promise<{ negotiationId?: string; agreementId?: 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 * The REST client does not support this method and throws a not supported error —\n\t * use ComponentFactory.get() for the in-process service.\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 * Prepare 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 * The REST client does not support this method and throws a not supported error —\n\t * use ComponentFactory.get() for the in-process service.\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 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\tprepareTransfer(\n\t\tagreementId: string,\n\t\tproviderEndpoint: 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 * @remarks Whether the transfer auto-starts is a provider-side decision (service config), not\n\t * something the consumer can request.\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 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\ttrustPayload: unknown\n\t): Promise<IDataspaceProtocolTransferStartMessage | IDataspaceProtocolTransferError>;\n\n\t/**\n\t * Start a Transfer Process as the Provider.\n\t * Implements DSP Transfer Process Protocol.\n\t *\n\t * Builds a DSP TransferStartMessage for a transfer this node already accepted (created in\n\t * REQUESTED state by requestTransfer, or in SUSPENDED state to resume), transitions it to\n\t * STARTED, and POSTs the message to the consumer's callback address. Use this when the\n\t * provider did not auto-start the transfer (the autoStartTransfers config is off) and now\n\t * wants to start (or resume) it explicitly.\n\t *\n\t * DSP Spec: https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/#transfer-start-message\n\t *\n\t * @param pid The Process ID (consumerPid or providerPid) identifying the transfer to start.\n\t * @param trustPayload Trust payload proving the caller is the provider (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\ttransferStarted(\n\t\tpid: 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 A promise that resolves when the dataset has been updated in storage and the catalogue.\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 A promise that resolves when the dataset has been removed from storage and the catalogue.\n\t */\n\tdeleteAppDataset(id: string): Promise<void>;\n\n\t// ============================================================================\n\t// DSP VERSION DISCOVERY\n\t// ============================================================================\n\n\t/**\n\t * Return the Dataspace Protocol versions supported by this connector.\n\t * Used by the GET /.well-known/dspace-version discovery endpoint.\n\t * The path for each entry is derived from the connector's configured base route.\n\t * @returns The protocol version response listing all supported DSP versions.\n\t */\n\tgetProtocolVersions(): Promise<IDataspaceProtocolVersionResponse>;\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\tIDataspaceProtocolVersionResponse\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 * When the caller's identity matches the local organization ID (implicit trust), an\n\t * agreement with full access is created and stored immediately, registered callbacks\n\t * are fired synchronously, and only `agreementId` is returned (no `negotiationId`).\n\t *\n\t * Otherwise the method returns immediately with a `negotiationId`. The caller is\n\t * notified 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 * The REST client does not support this method and throws a not supported error —\n\t * use ComponentFactory.get() for the in-process service.\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 trustPayload Trust payload for authentication (JWT or Verifiable Credential).\n\t * @returns For implicit trust: `{ agreementId }`. For external negotiation: `{ negotiationId }`.\n\t */\n\tnegotiateAgreement(\n\t\tdatasetId: string,\n\t\tofferId: string,\n\t\tproviderEndpoint: string,\n\t\ttrustPayload: unknown\n\t): Promise<{ negotiationId?: string; agreementId?: 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\tIDataspaceProtocolContractNegotiation | 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 * The REST client does not support this method and throws a not supported error —\n\t * use ComponentFactory.get() for the in-process service.\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 * Prepare 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 * The REST client does not support this method and throws a not supported error —\n\t * use ComponentFactory.get() for the in-process service.\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 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\tprepareTransfer(\n\t\tagreementId: string,\n\t\tproviderEndpoint: 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 * @remarks Whether the transfer auto-starts is a provider-side decision (service config), not\n\t * something the consumer can request.\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 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\ttrustPayload: unknown\n\t): Promise<IDataspaceProtocolTransferStartMessage | IDataspaceProtocolTransferError>;\n\n\t/**\n\t * Start a Transfer Process as the Provider.\n\t * Implements DSP Transfer Process Protocol.\n\t *\n\t * Builds a DSP TransferStartMessage for a transfer this node already accepted (created in\n\t * REQUESTED state by requestTransfer, or in SUSPENDED state to resume), transitions it to\n\t * STARTED, and POSTs the message to the consumer's callback address. Use this when the\n\t * provider did not auto-start the transfer (the autoStartTransfers config is off) and now\n\t * wants to start (or resume) it explicitly.\n\t *\n\t * DSP Spec: https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/#transfer-start-message\n\t *\n\t * @param pid The Process ID (consumerPid or providerPid) identifying the transfer to start.\n\t * @param trustPayload Trust payload proving the caller is the provider (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\ttransferStarted(\n\t\tpid: 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 A promise that resolves when the dataset has been updated in storage and the catalogue.\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 A promise that resolves when the dataset has been removed from storage and the catalogue.\n\t */\n\tdeleteAppDataset(id: string): Promise<void>;\n\n\t// ============================================================================\n\t// DSP VERSION DISCOVERY\n\t// ============================================================================\n\n\t/**\n\t * Return the Dataspace Protocol versions supported by this connector.\n\t * Used by the GET /.well-known/dspace-version discovery endpoint.\n\t * The path for each entry is derived from the connector's configured base route.\n\t * @returns The protocol version response listing all supported DSP versions.\n\t */\n\tgetProtocolVersions(): Promise<IDataspaceProtocolVersionResponse>;\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\
|
|
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 { IRightsManagementAgreement } from \"@twin.org/rights-management-models\";\nimport type {\n\tDataspaceProtocolTransferProcessStateType,\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: IRightsManagementAgreement;\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
|
|
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 { IRightsManagementPolicy } from \"@twin.org/rights-management-models\";\nimport type {\n\tDataspaceProtocolTransferProcessStateType,\n\tIDataspaceProtocolDataAddress\n} from \"@twin.org/standards-dataspace-protocol\";\nimport type { TransferProcessRole } from \"./transferProcessRole.js\";\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?: IRightsManagementPolicy[];\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 * This node's role in the transfer, captured at write time so state transitions and async delivery\n\t * can tell which party we are without inferring it from the matched PID. Optional for back-compat.\n\t */\n\tlocalRole?: TransferProcessRole;\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 organization that owns this transfer process, captured at write time so async\n\t * delivery tasks and delayed state transitions can re-enter the right organization context.\n\t */\n\torganizationIdentity: 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"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IRightsManagementPolicy } from "@twin.org/rights-management-models";
|
|
2
|
+
import type { DataspaceProtocolTransferProcessStateType, IDataspaceProtocolDataAddress } from "@twin.org/standards-dataspace-protocol";
|
|
2
3
|
import type { TransferProcessRole } from "../models/controlPlane/transferProcessRole.js";
|
|
3
4
|
/**
|
|
4
5
|
* Transfer Process for shared storage between Control Plane and Data Plane.
|
|
@@ -73,7 +74,7 @@ export declare class TransferProcess {
|
|
|
73
74
|
/**
|
|
74
75
|
* Policies from the Agreement (stored as JSON).
|
|
75
76
|
*/
|
|
76
|
-
policies?:
|
|
77
|
+
policies?: IRightsManagementPolicy[];
|
|
77
78
|
/**
|
|
78
79
|
* Data address for push mode transfers (stored as JSON).
|
|
79
80
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
2
|
-
import type {
|
|
2
|
+
import type { IRightsManagementAgreement } from "@twin.org/rights-management-models";
|
|
3
3
|
/**
|
|
4
4
|
* Payload handed to pushDeliveryRunner via a Background Task.
|
|
5
5
|
* Contains everything the runner needs to POST one Activity Streams
|
|
@@ -31,7 +31,7 @@ export interface IPushDeliveryPayload {
|
|
|
31
31
|
/**
|
|
32
32
|
* The ODRL agreement governing the data transfer.
|
|
33
33
|
*/
|
|
34
|
-
agreement:
|
|
34
|
+
agreement: IRightsManagementAgreement;
|
|
35
35
|
/**
|
|
36
36
|
* The JSON-LD data payload to deliver to the consumer.
|
|
37
37
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IRightsManagementAgreement } from "@twin.org/rights-management-models";
|
|
2
|
+
import type { DataspaceProtocolTransferProcessStateType, IDataspaceProtocolDataAddress } from "@twin.org/standards-dataspace-protocol";
|
|
2
3
|
/**
|
|
3
4
|
* Transfer Context data structure.
|
|
4
5
|
* Contains all information needed by DSC to execute queries.
|
|
@@ -18,7 +19,7 @@ export interface ITransferContext {
|
|
|
18
19
|
* Agreement associated with this Transfer Process.
|
|
19
20
|
* Contains permissions, obligations, and prohibitions that DSC uses for runtime policy enforcement.
|
|
20
21
|
*/
|
|
21
|
-
agreement:
|
|
22
|
+
agreement: IRightsManagementAgreement;
|
|
22
23
|
/**
|
|
23
24
|
* Dataset ID - what the DSC needs to execute the query.
|
|
24
25
|
* Convenience field extracted from agreement.target for quick access.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IRightsManagementPolicy } from "@twin.org/rights-management-models";
|
|
2
|
+
import type { DataspaceProtocolTransferProcessStateType, IDataspaceProtocolDataAddress } from "@twin.org/standards-dataspace-protocol";
|
|
2
3
|
import type { TransferProcessRole } from "./transferProcessRole.js";
|
|
3
4
|
/**
|
|
4
5
|
* Transfer Process for internal storage.
|
|
@@ -43,7 +44,7 @@ export interface ITransferProcess {
|
|
|
43
44
|
* Policies from the Agreement.
|
|
44
45
|
* Used by DSC for runtime policy enforcement.
|
|
45
46
|
*/
|
|
46
|
-
policies?:
|
|
47
|
+
policies?: IRightsManagementPolicy[];
|
|
47
48
|
/**
|
|
48
49
|
* Consumer identity (DID or URI).
|
|
49
50
|
* Used for auditing and access control.
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,76 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.9.1](https://github.com/iotaledger/twin-dataspace/compare/dataspace-models-v0.9.1...dataspace-models-v0.9.1) (2026-07-27)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add consumer transfer callbacks and startDataTransfer convenience method ([#151](https://github.com/iotaledger/twin-dataspace/issues/151)) ([0ab66c3](https://github.com/iotaledger/twin-dataspace/commit/0ab66c3636fd1f98f89baca1e99764d77c6f91d9))
|
|
9
|
+
* add dataspace transfer format ([#111](https://github.com/iotaledger/twin-dataspace/issues/111)) ([f59ff5e](https://github.com/iotaledger/twin-dataspace/commit/f59ff5ef10d261d1cebbf5c6bb0689e74a10738a))
|
|
10
|
+
* add inline tasks and concurrent options ([#104](https://github.com/iotaledger/twin-dataspace/issues/104)) ([2227a21](https://github.com/iotaledger/twin-dataspace/commit/2227a212d906f58ba77850c79bb20bf2cb7195a8))
|
|
11
|
+
* add telemetry metrics to dataspace control and data plane services ([#212](https://github.com/iotaledger/twin-dataspace/issues/212)) ([b5b0248](https://github.com/iotaledger/twin-dataspace/commit/b5b024899ed12c0f639c5d51aefa3e509753eac6))
|
|
12
|
+
* add transferStarted provider method to start a data transfer ([#206](https://github.com/iotaledger/twin-dataspace/issues/206)) ([3ec2dc8](https://github.com/iotaledger/twin-dataspace/commit/3ec2dc8943c8531cd8d8e4ab07cb970ef7b11090))
|
|
13
|
+
* align all config times to ms ([40238d5](https://github.com/iotaledger/twin-dataspace/commit/40238d59a2b45caedc01792b682ce7206815dfd1))
|
|
14
|
+
* cross-node transfer callbacks and DataTransferManager auto-start ([#199](https://github.com/iotaledger/twin-dataspace/issues/199)) ([1089aa3](https://github.com/iotaledger/twin-dataspace/commit/1089aa344e3598e382f37a82ca03230c5cf6cacd))
|
|
15
|
+
* docs update ([8b44c7a](https://github.com/iotaledger/twin-dataspace/commit/8b44c7a75afb8d377a6f606616f8a78d58439ab4))
|
|
16
|
+
* endpoint encryption + getDatasetTargets multi-target fix ([#112](https://github.com/iotaledger/twin-dataspace/issues/112)) ([3288941](https://github.com/iotaledger/twin-dataspace/commit/328894113c19c7402f7d00dfa77b6a97ae40ca91))
|
|
17
|
+
* get activity log add trust payload ([#201](https://github.com/iotaledger/twin-dataspace/issues/201)) ([cdb5486](https://github.com/iotaledger/twin-dataspace/commit/cdb5486942c1b94ddf6435236b9b9d190bea0407))
|
|
18
|
+
* implement DSP push transfer mode ([#109](https://github.com/iotaledger/twin-dataspace/issues/109)) ([71f5fee](https://github.com/iotaledger/twin-dataspace/commit/71f5feec1d92dfec8ed6899c951809818e1bf2a3))
|
|
19
|
+
* improve error handling and component usage ([544e20e](https://github.com/iotaledger/twin-dataspace/commit/544e20e640d6f09266942bfc698aead6227a7769))
|
|
20
|
+
* improve open-api examples ([1368dbe](https://github.com/iotaledger/twin-dataspace/commit/1368dbed5c36e074b4854942304a19b9ce51e088))
|
|
21
|
+
* improve validation ([#82](https://github.com/iotaledger/twin-dataspace/issues/82)) ([8bfaf7b](https://github.com/iotaledger/twin-dataspace/commit/8bfaf7b830f89b63575f8a51ee96bd8ac4da02f4))
|
|
22
|
+
* organization identifiers ([#188](https://github.com/iotaledger/twin-dataspace/issues/188)) ([af643d3](https://github.com/iotaledger/twin-dataspace/commit/af643d3bb7f212d6cbb672e362a9e1bbe886d1a5))
|
|
23
|
+
* provider-side transfer auto-start and negotiation/transfer timeout callbacks ([#227](https://github.com/iotaledger/twin-dataspace/issues/227)) ([619d858](https://github.com/iotaledger/twin-dataspace/commit/619d858e8d44e59744dc8a0f73e06be976932b53))
|
|
24
|
+
* release to production ([#243](https://github.com/iotaledger/twin-dataspace/issues/243)) ([9906476](https://github.com/iotaledger/twin-dataspace/commit/9906476c5b9150f0660f7950a3afd4fa87009d14))
|
|
25
|
+
* release to production ([#308](https://github.com/iotaledger/twin-dataspace/issues/308)) ([fba29a0](https://github.com/iotaledger/twin-dataspace/commit/fba29a083d7e4892f1f06b9e2e3faa6a72185cda))
|
|
26
|
+
* remove datasetsHandled method from apps ([9fdc950](https://github.com/iotaledger/twin-dataspace/commit/9fdc95018d38ab49c4a1094642be2ee83ee0e4cd))
|
|
27
|
+
* remove hosting component ([#209](https://github.com/iotaledger/twin-dataspace/issues/209)) ([5e19328](https://github.com/iotaledger/twin-dataspace/commit/5e1932823aa8a0f88f559f096610b9df1f3b8615))
|
|
28
|
+
* rename completed callback ([#147](https://github.com/iotaledger/twin-dataspace/issues/147)) ([f62baad](https://github.com/iotaledger/twin-dataspace/commit/f62baad0ff444e2913439b12dcd06d20c9a4f6a4))
|
|
29
|
+
* resolve DSP transfer flow bugs for cross-node communication ([#76](https://github.com/iotaledger/twin-dataspace/issues/76)) ([506a45c](https://github.com/iotaledger/twin-dataspace/commit/506a45c94e63d5f958b1fc7131adfe452c3e2974))
|
|
30
|
+
* shortcut implicit trust ([#215](https://github.com/iotaledger/twin-dataspace/issues/215)) ([f9bcfea](https://github.com/iotaledger/twin-dataspace/commit/f9bcfeab8f069b62017502833c108b4ee3791414))
|
|
31
|
+
* types update ([77c338e](https://github.com/iotaledger/twin-dataspace/commit/77c338e9244dcc7e3d597fdb06229513b1f13eac))
|
|
32
|
+
* typescript 6 update ([340f10e](https://github.com/iotaledger/twin-dataspace/commit/340f10e4767f6285c694938944f7e044474f9aaa))
|
|
33
|
+
* unification of the data exchange and the data space connector ([#57](https://github.com/iotaledger/twin-dataspace/issues/57)) ([df2644d](https://github.com/iotaledger/twin-dataspace/commit/df2644d989471e07dadd83d27bef736179e31bf4))
|
|
34
|
+
* update DataspaceTransferFormat names ([2c9d424](https://github.com/iotaledger/twin-dataspace/commit/2c9d424a07b97346faa2124048c4675514d58109))
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### Bug Fixes
|
|
38
|
+
|
|
39
|
+
* always verify trust in notifyActivity, no internal by ([#192](https://github.com/iotaledger/twin-dataspace/issues/192)) ([2cfc160](https://github.com/iotaledger/twin-dataspace/commit/2cfc16082a7c9d417f0b05f90f123e40f47d1e05))
|
|
40
|
+
* avoid compaction of incoming activities ([#77](https://github.com/iotaledger/twin-dataspace/issues/77)) ([ff43d6a](https://github.com/iotaledger/twin-dataspace/commit/ff43d6a3e1563eb9cb185501134b2a53ae88787c))
|
|
41
|
+
* docs ([652f4f2](https://github.com/iotaledger/twin-dataspace/commit/652f4f2fec8601bb3772e054b2c823f599ef68dc))
|
|
42
|
+
* implement missing trust check on negotiateAgreement ([#136](https://github.com/iotaledger/twin-dataspace/issues/136)) ([a3589c2](https://github.com/iotaledger/twin-dataspace/commit/a3589c279476d5450b68ea7c2790be7e3125bfe2))
|
|
43
|
+
* return 422/500 when inline activity processing fails ([#135](https://github.com/iotaledger/twin-dataspace/issues/135)) ([8635187](https://github.com/iotaledger/twin-dataspace/commit/863518724cb90af15edc5f456d9a93c6cad7d661))
|
|
44
|
+
* throw not supported error for in-process only control plane methods ([#185](https://github.com/iotaledger/twin-dataspace/issues/185)) ([130f00a](https://github.com/iotaledger/twin-dataspace/commit/130f00a87412b34defde891855bee7aa3ac34130))
|
|
45
|
+
|
|
46
|
+
## [0.9.1-next.12](https://github.com/iotaledger/twin-dataspace/compare/dataspace-models-v0.9.1-next.11...dataspace-models-v0.9.1-next.12) (2026-07-26)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
### Bug Fixes
|
|
50
|
+
|
|
51
|
+
* missing dependencies ([54e9e9c](https://github.com/iotaledger/twin-dataspace/commit/54e9e9c474b61cce3b9a82f9ccec27c7f8133382))
|
|
52
|
+
|
|
53
|
+
## [0.9.1-next.11](https://github.com/iotaledger/twin-dataspace/compare/dataspace-models-v0.9.1-next.10...dataspace-models-v0.9.1-next.11) (2026-07-21)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
### Bug Fixes
|
|
57
|
+
|
|
58
|
+
* retain cursor after pep enforcement ([#296](https://github.com/iotaledger/twin-dataspace/issues/296)) ([5198cd2](https://github.com/iotaledger/twin-dataspace/commit/5198cd29505ceffa532fa4fa18c97a5c8e78f663))
|
|
59
|
+
|
|
60
|
+
## [0.9.1-next.10](https://github.com/iotaledger/twin-dataspace/compare/dataspace-models-v0.9.1-next.9...dataspace-models-v0.9.1-next.10) (2026-07-20)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
### Miscellaneous Chores
|
|
64
|
+
|
|
65
|
+
* **dataspace-models:** Synchronize repo versions
|
|
66
|
+
|
|
67
|
+
## [0.9.1-next.9](https://github.com/iotaledger/twin-dataspace/compare/dataspace-models-v0.9.1-next.8...dataspace-models-v0.9.1-next.9) (2026-07-06)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
### Miscellaneous Chores
|
|
71
|
+
|
|
72
|
+
* **dataspace-models:** Synchronize repo versions
|
|
73
|
+
|
|
3
74
|
## [0.9.1-next.8](https://github.com/iotaledger/twin-dataspace/compare/dataspace-models-v0.9.1-next.7...dataspace-models-v0.9.1-next.8) (2026-07-02)
|
|
4
75
|
|
|
5
76
|
|
|
@@ -142,7 +142,7 @@ Last update timestamp (ISO string format).
|
|
|
142
142
|
|
|
143
143
|
### policies? {#policies}
|
|
144
144
|
|
|
145
|
-
> `optional` **policies?**: `
|
|
145
|
+
> `optional` **policies?**: `IRightsManagementPolicy`[]
|
|
146
146
|
|
|
147
147
|
Policies from the Agreement (stored as JSON).
|
|
148
148
|
|
|
@@ -25,7 +25,7 @@ Provider Process ID.
|
|
|
25
25
|
|
|
26
26
|
### agreement {#agreement}
|
|
27
27
|
|
|
28
|
-
> **agreement**: `
|
|
28
|
+
> **agreement**: `IRightsManagementAgreement`
|
|
29
29
|
|
|
30
30
|
Agreement associated with this Transfer Process.
|
|
31
31
|
Contains permissions, obligations, and prohibitions that DSC uses for runtime policy enforcement.
|
|
@@ -69,7 +69,7 @@ Offer ID from the original Catalog offer.
|
|
|
69
69
|
|
|
70
70
|
### policies? {#policies}
|
|
71
71
|
|
|
72
|
-
> `optional` **policies?**: `
|
|
72
|
+
> `optional` **policies?**: `IRightsManagementPolicy`[]
|
|
73
73
|
|
|
74
74
|
Policies from the Agreement.
|
|
75
75
|
Used by DSC for runtime policy enforcement.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/dataspace-models",
|
|
3
|
-
"version": "0.9.1
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "Defines shared entities, interfaces, and data types used by control plane and data plane components.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -11,21 +11,22 @@
|
|
|
11
11
|
"license": "Apache-2.0",
|
|
12
12
|
"type": "module",
|
|
13
13
|
"engines": {
|
|
14
|
-
"node": ">=
|
|
14
|
+
"node": ">=24.0.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@twin.org/background-task-models": "
|
|
18
|
-
"@twin.org/core": "
|
|
19
|
-
"@twin.org/data-core": "
|
|
20
|
-
"@twin.org/data-json-ld": "
|
|
21
|
-
"@twin.org/entity": "
|
|
22
|
-
"@twin.org/nameof": "
|
|
23
|
-
"@twin.org/
|
|
24
|
-
"@twin.org/standards-
|
|
25
|
-
"@twin.org/standards-
|
|
26
|
-
"@twin.org/standards-w3c-
|
|
27
|
-
"@twin.org/standards-w3c-
|
|
28
|
-
"@twin.org/
|
|
17
|
+
"@twin.org/background-task-models": "^0.9.1",
|
|
18
|
+
"@twin.org/core": "^0.9.1",
|
|
19
|
+
"@twin.org/data-core": "^0.9.1",
|
|
20
|
+
"@twin.org/data-json-ld": "^0.9.1",
|
|
21
|
+
"@twin.org/entity": "^0.9.1",
|
|
22
|
+
"@twin.org/nameof": "^0.9.1",
|
|
23
|
+
"@twin.org/rights-management-models": "^0.9.1",
|
|
24
|
+
"@twin.org/standards-dataspace-protocol": "^0.9.1",
|
|
25
|
+
"@twin.org/standards-schema-org": "^0.9.1",
|
|
26
|
+
"@twin.org/standards-w3c-activity-streams": "^0.9.1",
|
|
27
|
+
"@twin.org/standards-w3c-dcat": "^0.9.1",
|
|
28
|
+
"@twin.org/standards-w3c-odrl": "^0.9.1",
|
|
29
|
+
"@twin.org/telemetry-models": "^0.9.1"
|
|
29
30
|
},
|
|
30
31
|
"main": "./dist/es/index.js",
|
|
31
32
|
"types": "./dist/types/index.d.ts",
|