@twin.org/dataspace-models 0.9.1 → 0.9.2-next.2
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/dataspaceAppDataset.js +10 -1
- package/dist/es/entities/dataspaceAppDataset.js.map +1 -1
- package/dist/es/entities/dataspaceAppDatasetV0.js +73 -0
- package/dist/es/entities/dataspaceAppDatasetV0.js.map +1 -0
- package/dist/es/entities/transferProcess.js +2 -1
- package/dist/es/entities/transferProcess.js.map +1 -1
- package/dist/es/entities/transferRetrieval.js +38 -0
- package/dist/es/entities/transferRetrieval.js.map +1 -0
- package/dist/es/index.js +4 -0
- package/dist/es/index.js.map +1 -1
- package/dist/es/models/api/controlPlane/IAppDatasetCreateRequest.js.map +1 -1
- package/dist/es/models/api/controlPlane/IAppDatasetUpdateRequest.js.map +1 -1
- package/dist/es/models/controlPlane/IDataspaceAppDataset.js.map +1 -1
- package/dist/es/models/controlPlane/IDataspaceControlPlaneComponent.js.map +1 -1
- package/dist/es/models/controlPlane/ITransferCallback.js.map +1 -1
- package/dist/es/models/controlPlane/ITransferProcess.js.map +1 -1
- package/dist/es/models/controlPlane/ITransferQueryResult.js +2 -0
- package/dist/es/models/controlPlane/ITransferQueryResult.js.map +1 -0
- package/dist/es/models/controlPlane/transferTerminationCode.js +14 -0
- package/dist/es/models/controlPlane/transferTerminationCode.js.map +1 -0
- package/dist/types/entities/dataspaceAppDataset.d.ts +5 -0
- package/dist/types/entities/dataspaceAppDatasetV0.d.ts +39 -0
- package/dist/types/entities/transferProcess.d.ts +2 -1
- package/dist/types/entities/transferRetrieval.d.ts +18 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/models/api/controlPlane/IAppDatasetCreateRequest.d.ts +5 -0
- package/dist/types/models/api/controlPlane/IAppDatasetUpdateRequest.d.ts +5 -0
- package/dist/types/models/controlPlane/IDataspaceAppDataset.d.ts +5 -0
- package/dist/types/models/controlPlane/IDataspaceControlPlaneComponent.d.ts +33 -3
- package/dist/types/models/controlPlane/ITransferCallback.d.ts +3 -3
- package/dist/types/models/controlPlane/ITransferProcess.d.ts +2 -4
- package/dist/types/models/controlPlane/ITransferQueryResult.d.ts +14 -0
- package/dist/types/models/controlPlane/transferTerminationCode.d.ts +14 -0
- package/docs/changelog.md +54 -0
- package/docs/reference/classes/DataspaceAppDataset.md +9 -0
- package/docs/reference/classes/DataspaceAppDatasetV0.md +77 -0
- package/docs/reference/classes/TransferProcess.md +2 -1
- package/docs/reference/classes/TransferRetrieval.md +38 -0
- package/docs/reference/index.md +5 -0
- package/docs/reference/interfaces/IAppDatasetCreateRequest.md +7 -0
- package/docs/reference/interfaces/IAppDatasetUpdateRequest.md +7 -0
- package/docs/reference/interfaces/IDataspaceAppDataset.md +9 -0
- package/docs/reference/interfaces/IDataspaceControlPlaneComponent.md +74 -2
- package/docs/reference/interfaces/ITransferCallback.md +3 -3
- package/docs/reference/interfaces/ITransferProcess.md +2 -4
- package/docs/reference/interfaces/ITransferQueryResult.md +19 -0
- package/docs/reference/type-aliases/TransferTerminationCode.md +5 -0
- package/docs/reference/variables/TransferTerminationCode.md +14 -0
- package/package.json +14 -14
|
@@ -25,5 +25,10 @@ export interface IAppDatasetUpdateRequest {
|
|
|
25
25
|
* The dataset payload.
|
|
26
26
|
*/
|
|
27
27
|
dataset: IDataspaceProtocolDataset;
|
|
28
|
+
/**
|
|
29
|
+
* Optional idle window (ms) overriding the node-level idle policy for this
|
|
30
|
+
* dataset's PULL transfers; 0 disables it for this dataset.
|
|
31
|
+
*/
|
|
32
|
+
transferIdleTimeoutMs?: number;
|
|
28
33
|
};
|
|
29
34
|
}
|
|
@@ -15,6 +15,11 @@ export interface IDataspaceAppDataset {
|
|
|
15
15
|
* The dataset payload.
|
|
16
16
|
*/
|
|
17
17
|
dataset: IDataspaceProtocolDataset;
|
|
18
|
+
/**
|
|
19
|
+
* Idle window (ms) for this dataset's PULL transfers, overriding the node-level
|
|
20
|
+
* providerTransferIdleTimeoutMs; 0 disables the idle policy for this dataset.
|
|
21
|
+
*/
|
|
22
|
+
transferIdleTimeoutMs?: number;
|
|
18
23
|
/**
|
|
19
24
|
* Creation timestamp (ISO string).
|
|
20
25
|
*/
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { IComponent } from "@twin.org/core";
|
|
2
|
-
import type { IDataspaceProtocolContractNegotiation, IDataspaceProtocolContractNegotiationError, IDataspaceProtocolDataset, IDataspaceProtocolTransferCompletionMessage, IDataspaceProtocolTransferError, IDataspaceProtocolTransferProcess, IDataspaceProtocolTransferRequestMessage, IDataspaceProtocolTransferStartMessage, IDataspaceProtocolTransferSuspensionMessage, IDataspaceProtocolTransferTerminationMessage, IDataspaceProtocolVersionResponse } from "@twin.org/standards-dataspace-protocol";
|
|
2
|
+
import type { DataspaceProtocolTransferProcessStateType, IDataspaceProtocolContractNegotiation, IDataspaceProtocolContractNegotiationError, IDataspaceProtocolDataset, IDataspaceProtocolTransferCompletionMessage, IDataspaceProtocolTransferError, IDataspaceProtocolTransferProcess, IDataspaceProtocolTransferRequestMessage, IDataspaceProtocolTransferStartMessage, IDataspaceProtocolTransferSuspensionMessage, IDataspaceProtocolTransferTerminationMessage, IDataspaceProtocolVersionResponse } from "@twin.org/standards-dataspace-protocol";
|
|
3
3
|
import type { IDataspaceAppDataset } from "./IDataspaceAppDataset.js";
|
|
4
4
|
import type { INegotiationCallback } from "./INegotiationCallback.js";
|
|
5
5
|
import type { ITransferCallback } from "./ITransferCallback.js";
|
|
6
|
+
import type { ITransferQueryResult } from "./ITransferQueryResult.js";
|
|
6
7
|
/**
|
|
7
8
|
* Dataspace Control Plane Component interface.
|
|
8
9
|
* Implements Eclipse Dataspace Protocol (DSP) specifications:
|
|
@@ -245,6 +246,25 @@ export interface IDataspaceControlPlaneComponent extends IComponent {
|
|
|
245
246
|
* @returns Transfer Process (DSP compliant) with current state, or TransferError if the operation fails.
|
|
246
247
|
*/
|
|
247
248
|
getTransferProcess(pid: string, trustPayload: unknown): Promise<IDataspaceProtocolTransferProcess | IDataspaceProtocolTransferError>;
|
|
249
|
+
/**
|
|
250
|
+
* Query Transfer Processes by agreement id.
|
|
251
|
+
* Lets a caller check whether transfers already exist for an agreement
|
|
252
|
+
* (e.g. before initiating a new one) without knowing any process ids.
|
|
253
|
+
*
|
|
254
|
+
* Role Performed: Consumer / Provider
|
|
255
|
+
* Called by: Consumer orchestration before requesting a new transfer, or either
|
|
256
|
+
* party inspecting the transfers attached to an agreement on their side.
|
|
257
|
+
*
|
|
258
|
+
* Results are limited to transfers where the authenticated caller is a party
|
|
259
|
+
* (consumer or provider identity). A returned dataAddress is a point-in-time copy;
|
|
260
|
+
* if its token has expired the data plane rejects it and a new start is required.
|
|
261
|
+
* @param agreementId The agreement id to look up transfer processes for.
|
|
262
|
+
* @param state Optional filter to a single transfer process state.
|
|
263
|
+
* @param cursor Optional pagination cursor from a previous result page.
|
|
264
|
+
* @param trustPayload Trust payload containing authorization information (JWT, VC, etc.).
|
|
265
|
+
* @returns The matching transfer processes and a pagination cursor when more pages exist, empty when none match.
|
|
266
|
+
*/
|
|
267
|
+
queryDataTransfer(agreementId: string, state: DataspaceProtocolTransferProcessStateType | undefined, cursor: string | undefined, trustPayload: unknown): Promise<ITransferQueryResult>;
|
|
248
268
|
/**
|
|
249
269
|
* Register an app dataset for a dataspace app, owned by the calling tenant.
|
|
250
270
|
* @param id Optional explicit id. If omitted, derived from `dataset["@id"]`
|
|
@@ -252,9 +272,14 @@ export interface IDataspaceControlPlaneComponent extends IComponent {
|
|
|
252
272
|
* @param appId The dataspace app this dataset belongs to (matches
|
|
253
273
|
* `DataspaceAppFactory` registration name).
|
|
254
274
|
* @param dataset The dataset payload (may omit system-stamped fields).
|
|
275
|
+
* @param options Optional dataset settings.
|
|
276
|
+
* @param options.transferIdleTimeoutMs Optional idle window (ms) overriding the node-level idle
|
|
277
|
+
* policy for this dataset's PULL transfers; 0 disables it for this dataset.
|
|
255
278
|
* @returns The resolved dataset id.
|
|
256
279
|
*/
|
|
257
|
-
createAppDataset(id: string | undefined, appId: string, dataset: IDataspaceProtocolDataset
|
|
280
|
+
createAppDataset(id: string | undefined, appId: string, dataset: IDataspaceProtocolDataset, options?: {
|
|
281
|
+
transferIdleTimeoutMs?: number;
|
|
282
|
+
}): Promise<string>;
|
|
258
283
|
/**
|
|
259
284
|
* Get an app dataset record owned by the calling tenant.
|
|
260
285
|
* @param id The stored app dataset id.
|
|
@@ -276,9 +301,14 @@ export interface IDataspaceControlPlaneComponent extends IComponent {
|
|
|
276
301
|
* @param id The stored app dataset id.
|
|
277
302
|
* @param appId The dataspace app this dataset belongs to.
|
|
278
303
|
* @param dataset The dataset payload.
|
|
304
|
+
* @param options Optional dataset settings.
|
|
305
|
+
* @param options.transferIdleTimeoutMs Optional idle window (ms) overriding the node-level idle
|
|
306
|
+
* policy for this dataset's PULL transfers; 0 disables it for this dataset.
|
|
279
307
|
* @returns A promise that resolves when the dataset has been updated in storage and the catalogue.
|
|
280
308
|
*/
|
|
281
|
-
updateAppDataset(id: string, appId: string, dataset: IDataspaceProtocolDataset
|
|
309
|
+
updateAppDataset(id: string, appId: string, dataset: IDataspaceProtocolDataset, options?: {
|
|
310
|
+
transferIdleTimeoutMs?: number;
|
|
311
|
+
}): Promise<void>;
|
|
282
312
|
/**
|
|
283
313
|
* Delete an app dataset record owned by the calling tenant.
|
|
284
314
|
* @param id The stored app dataset id.
|
|
@@ -49,9 +49,9 @@ export interface ITransferCallback {
|
|
|
49
49
|
*/
|
|
50
50
|
onFailed?(consumerPid: string, reason: string): Promise<void>;
|
|
51
51
|
/**
|
|
52
|
-
* Called when the transfer times out
|
|
53
|
-
*
|
|
54
|
-
*
|
|
52
|
+
* Called when the transfer times out: a consumer-side REQUESTED transfer the provider never
|
|
53
|
+
* progressed, or a provider-side STARTED transfer idle beyond the configured window. Optional:
|
|
54
|
+
* otherwise the control plane falls back to `onFailed` with the timeout reason.
|
|
55
55
|
* @param consumerPid The consumer-side process ID.
|
|
56
56
|
* @returns Nothing.
|
|
57
57
|
*/
|
|
@@ -76,10 +76,8 @@ export interface ITransferProcess {
|
|
|
76
76
|
*/
|
|
77
77
|
format?: string;
|
|
78
78
|
/**
|
|
79
|
-
* Data address for consumer
|
|
80
|
-
*
|
|
81
|
-
* Absent for PULL (HttpData-PULL) and provider-initiated push (HttpData-POST),
|
|
82
|
-
* where the consumer deliberately omits a dataAddress.
|
|
79
|
+
* Data address for the transfer: the consumer's inbox for PUSH, or the
|
|
80
|
+
* provider-built address persisted at start for PULL/POST; may expire while STARTED.
|
|
83
81
|
*/
|
|
84
82
|
dataAddress?: IDataspaceProtocolDataAddress;
|
|
85
83
|
/**
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ITransferProcess } from "./ITransferProcess.js";
|
|
2
|
+
/**
|
|
3
|
+
* Result of querying Transfer Processes by agreement.
|
|
4
|
+
*/
|
|
5
|
+
export interface ITransferQueryResult {
|
|
6
|
+
/**
|
|
7
|
+
* The transfer processes matching the query, empty when none match.
|
|
8
|
+
*/
|
|
9
|
+
transfers: ITransferProcess[];
|
|
10
|
+
/**
|
|
11
|
+
* Pagination cursor for retrieving the next page, omitted when no more results exist.
|
|
12
|
+
*/
|
|
13
|
+
cursor?: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Machine-readable codes set on provider-initiated TransferTerminationMessages
|
|
3
|
+
* by the control plane's transfer lifecycle policies.
|
|
4
|
+
*/
|
|
5
|
+
export declare const TransferTerminationCode: {
|
|
6
|
+
/**
|
|
7
|
+
* A Provider-side STARTED transfer had no data-plane activity within the configured idle window.
|
|
8
|
+
*/
|
|
9
|
+
readonly IdleTimeout: "idleTimeout";
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Type for TransferTerminationCode values.
|
|
13
|
+
*/
|
|
14
|
+
export type TransferTerminationCode = (typeof TransferTerminationCode)[keyof typeof TransferTerminationCode];
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,59 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.9.2-next.2](https://github.com/iotaledger/twin-dataspace/compare/dataspace-models-v0.9.2-next.1...dataspace-models-v0.9.2-next.2) (2026-07-30)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Miscellaneous Chores
|
|
7
|
+
|
|
8
|
+
* **dataspace-models:** Synchronize repo versions
|
|
9
|
+
|
|
10
|
+
## [0.9.2-next.1](https://github.com/iotaledger/twin-dataspace/compare/dataspace-models-v0.9.2-next.0...dataspace-models-v0.9.2-next.1) (2026-07-28)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* 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))
|
|
16
|
+
* add dataspace transfer format ([#111](https://github.com/iotaledger/twin-dataspace/issues/111)) ([f59ff5e](https://github.com/iotaledger/twin-dataspace/commit/f59ff5ef10d261d1cebbf5c6bb0689e74a10738a))
|
|
17
|
+
* add inline tasks and concurrent options ([#104](https://github.com/iotaledger/twin-dataspace/issues/104)) ([2227a21](https://github.com/iotaledger/twin-dataspace/commit/2227a212d906f58ba77850c79bb20bf2cb7195a8))
|
|
18
|
+
* 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))
|
|
19
|
+
* 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))
|
|
20
|
+
* add well known versions endpoint ([#251](https://github.com/iotaledger/twin-dataspace/issues/251)) ([4b4cbe9](https://github.com/iotaledger/twin-dataspace/commit/4b4cbe91a40980481dad6e0650c1ee73c53ae360))
|
|
21
|
+
* align all config times to ms ([40238d5](https://github.com/iotaledger/twin-dataspace/commit/40238d59a2b45caedc01792b682ce7206815dfd1))
|
|
22
|
+
* 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))
|
|
23
|
+
* docs update ([8b44c7a](https://github.com/iotaledger/twin-dataspace/commit/8b44c7a75afb8d377a6f606616f8a78d58439ab4))
|
|
24
|
+
* endpoint encryption + getDatasetTargets multi-target fix ([#112](https://github.com/iotaledger/twin-dataspace/issues/112)) ([3288941](https://github.com/iotaledger/twin-dataspace/commit/328894113c19c7402f7d00dfa77b6a97ae40ca91))
|
|
25
|
+
* get activity log add trust payload ([#201](https://github.com/iotaledger/twin-dataspace/issues/201)) ([cdb5486](https://github.com/iotaledger/twin-dataspace/commit/cdb5486942c1b94ddf6435236b9b9d190bea0407))
|
|
26
|
+
* implement DSP push transfer mode ([#109](https://github.com/iotaledger/twin-dataspace/issues/109)) ([71f5fee](https://github.com/iotaledger/twin-dataspace/commit/71f5feec1d92dfec8ed6899c951809818e1bf2a3))
|
|
27
|
+
* improve error handling and component usage ([544e20e](https://github.com/iotaledger/twin-dataspace/commit/544e20e640d6f09266942bfc698aead6227a7769))
|
|
28
|
+
* improve open-api examples ([1368dbe](https://github.com/iotaledger/twin-dataspace/commit/1368dbed5c36e074b4854942304a19b9ce51e088))
|
|
29
|
+
* improve validation ([#82](https://github.com/iotaledger/twin-dataspace/issues/82)) ([8bfaf7b](https://github.com/iotaledger/twin-dataspace/commit/8bfaf7b830f89b63575f8a51ee96bd8ac4da02f4))
|
|
30
|
+
* organization identifiers ([#188](https://github.com/iotaledger/twin-dataspace/issues/188)) ([af643d3](https://github.com/iotaledger/twin-dataspace/commit/af643d3bb7f212d6cbb672e362a9e1bbe886d1a5))
|
|
31
|
+
* provider-side idle lifecycle policy for STARTED data transfers ([#284](https://github.com/iotaledger/twin-dataspace/issues/284)) ([a9312ef](https://github.com/iotaledger/twin-dataspace/commit/a9312ef7573a92805c99cb2a314e8b289a6ab195))
|
|
32
|
+
* 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))
|
|
33
|
+
* query existing data transfers by agreement to avoid duplicate preparations ([#289](https://github.com/iotaledger/twin-dataspace/issues/289)) ([53fe251](https://github.com/iotaledger/twin-dataspace/commit/53fe2516b2287b6b6a7a6ca6fc6063ea4a446cf0))
|
|
34
|
+
* remove datasetsHandled method from apps ([9fdc950](https://github.com/iotaledger/twin-dataspace/commit/9fdc95018d38ab49c4a1094642be2ee83ee0e4cd))
|
|
35
|
+
* remove hosting component ([#209](https://github.com/iotaledger/twin-dataspace/issues/209)) ([5e19328](https://github.com/iotaledger/twin-dataspace/commit/5e1932823aa8a0f88f559f096610b9df1f3b8615))
|
|
36
|
+
* rename completed callback ([#147](https://github.com/iotaledger/twin-dataspace/issues/147)) ([f62baad](https://github.com/iotaledger/twin-dataspace/commit/f62baad0ff444e2913439b12dcd06d20c9a4f6a4))
|
|
37
|
+
* 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))
|
|
38
|
+
* shortcut implicit trust ([#215](https://github.com/iotaledger/twin-dataspace/issues/215)) ([f9bcfea](https://github.com/iotaledger/twin-dataspace/commit/f9bcfeab8f069b62017502833c108b4ee3791414))
|
|
39
|
+
* types update ([77c338e](https://github.com/iotaledger/twin-dataspace/commit/77c338e9244dcc7e3d597fdb06229513b1f13eac))
|
|
40
|
+
* typescript 6 update ([340f10e](https://github.com/iotaledger/twin-dataspace/commit/340f10e4767f6285c694938944f7e044474f9aaa))
|
|
41
|
+
* 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))
|
|
42
|
+
* update DataspaceTransferFormat names ([2c9d424](https://github.com/iotaledger/twin-dataspace/commit/2c9d424a07b97346faa2124048c4675514d58109))
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
### Bug Fixes
|
|
46
|
+
|
|
47
|
+
* 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))
|
|
48
|
+
* avoid compaction of incoming activities ([#77](https://github.com/iotaledger/twin-dataspace/issues/77)) ([ff43d6a](https://github.com/iotaledger/twin-dataspace/commit/ff43d6a3e1563eb9cb185501134b2a53ae88787c))
|
|
49
|
+
* docs ([652f4f2](https://github.com/iotaledger/twin-dataspace/commit/652f4f2fec8601bb3772e054b2c823f599ef68dc))
|
|
50
|
+
* filtering query optional q ([#248](https://github.com/iotaledger/twin-dataspace/issues/248)) ([e9e8ff1](https://github.com/iotaledger/twin-dataspace/commit/e9e8ff1e1bb3b93f0960260c21a46d6f58dbfaa2))
|
|
51
|
+
* implement missing trust check on negotiateAgreement ([#136](https://github.com/iotaledger/twin-dataspace/issues/136)) ([a3589c2](https://github.com/iotaledger/twin-dataspace/commit/a3589c279476d5450b68ea7c2790be7e3125bfe2))
|
|
52
|
+
* missing dependencies ([54e9e9c](https://github.com/iotaledger/twin-dataspace/commit/54e9e9c474b61cce3b9a82f9ccec27c7f8133382))
|
|
53
|
+
* retain cursor after pep enforcement ([#296](https://github.com/iotaledger/twin-dataspace/issues/296)) ([5198cd2](https://github.com/iotaledger/twin-dataspace/commit/5198cd29505ceffa532fa4fa18c97a5c8e78f663))
|
|
54
|
+
* 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))
|
|
55
|
+
* 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))
|
|
56
|
+
|
|
3
57
|
## [0.9.1](https://github.com/iotaledger/twin-dataspace/compare/dataspace-models-v0.9.1...dataspace-models-v0.9.1) (2026-07-27)
|
|
4
58
|
|
|
5
59
|
|
|
@@ -62,6 +62,15 @@ opaque object and validated/populated at publish time.
|
|
|
62
62
|
|
|
63
63
|
***
|
|
64
64
|
|
|
65
|
+
### transferIdleTimeoutMs? {#transferidletimeoutms}
|
|
66
|
+
|
|
67
|
+
> `optional` **transferIdleTimeoutMs?**: `number`
|
|
68
|
+
|
|
69
|
+
Idle window (ms) for this dataset's PULL transfers, overriding the node-level
|
|
70
|
+
providerTransferIdleTimeoutMs; 0 disables the idle policy for this dataset.
|
|
71
|
+
|
|
72
|
+
***
|
|
73
|
+
|
|
65
74
|
### dateCreated {#datecreated}
|
|
66
75
|
|
|
67
76
|
> **dateCreated**: `string`
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Class: DataspaceAppDatasetV0
|
|
2
|
+
|
|
3
|
+
Tenant-supplied Dataset shape persisted by the Control Plane, version 0.
|
|
4
|
+
|
|
5
|
+
## Constructors
|
|
6
|
+
|
|
7
|
+
### Constructor
|
|
8
|
+
|
|
9
|
+
> **new DataspaceAppDatasetV0**(): `DataspaceAppDatasetV0`
|
|
10
|
+
|
|
11
|
+
#### Returns
|
|
12
|
+
|
|
13
|
+
`DataspaceAppDatasetV0`
|
|
14
|
+
|
|
15
|
+
## Properties
|
|
16
|
+
|
|
17
|
+
### id {#id}
|
|
18
|
+
|
|
19
|
+
> **id**: `string`
|
|
20
|
+
|
|
21
|
+
The unique identifier for the dataset.
|
|
22
|
+
|
|
23
|
+
***
|
|
24
|
+
|
|
25
|
+
### organizationIdentity {#organizationidentity}
|
|
26
|
+
|
|
27
|
+
> **organizationIdentity**: `string`
|
|
28
|
+
|
|
29
|
+
The identity of the organization that owns this entity.
|
|
30
|
+
|
|
31
|
+
***
|
|
32
|
+
|
|
33
|
+
### tenantId? {#tenantid}
|
|
34
|
+
|
|
35
|
+
> `optional` **tenantId?**: `string`
|
|
36
|
+
|
|
37
|
+
The tenant that owns this dataset, captured from the request context at
|
|
38
|
+
write time. Optional — single-tenant nodes (no `TWIN_TENANT_ENABLED`)
|
|
39
|
+
register datasets without a tenant context.
|
|
40
|
+
|
|
41
|
+
***
|
|
42
|
+
|
|
43
|
+
### appId {#appid}
|
|
44
|
+
|
|
45
|
+
> **appId**: `string`
|
|
46
|
+
|
|
47
|
+
The dataspace app that this dataset belongs to. Matches the app's
|
|
48
|
+
registered name in `DataspaceAppFactory` (typically the app's URI).
|
|
49
|
+
|
|
50
|
+
***
|
|
51
|
+
|
|
52
|
+
### dataset {#dataset}
|
|
53
|
+
|
|
54
|
+
> **dataset**: `object`
|
|
55
|
+
|
|
56
|
+
The user-controlled JSON-LD dataset payload. Stored as an
|
|
57
|
+
opaque object and validated/populated at publish time.
|
|
58
|
+
|
|
59
|
+
#### Index Signature
|
|
60
|
+
|
|
61
|
+
\[`key`: `string`\]: `unknown`
|
|
62
|
+
|
|
63
|
+
***
|
|
64
|
+
|
|
65
|
+
### dateCreated {#datecreated}
|
|
66
|
+
|
|
67
|
+
> **dateCreated**: `string`
|
|
68
|
+
|
|
69
|
+
Creation timestamp (ISO string format).
|
|
70
|
+
|
|
71
|
+
***
|
|
72
|
+
|
|
73
|
+
### dateModified {#datemodified}
|
|
74
|
+
|
|
75
|
+
> **dateModified**: `string`
|
|
76
|
+
|
|
77
|
+
Last update timestamp (ISO string format).
|
|
@@ -152,4 +152,5 @@ Policies from the Agreement (stored as JSON).
|
|
|
152
152
|
|
|
153
153
|
> `optional` **dataAddress?**: `IDataspaceProtocolDataAddress`
|
|
154
154
|
|
|
155
|
-
Data address for
|
|
155
|
+
Data address for the transfer (stored as JSON): the consumer's inbox for PUSH, or the
|
|
156
|
+
provider-built address persisted at start for PULL/POST; may expire while STARTED.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Class: TransferRetrieval
|
|
2
|
+
|
|
3
|
+
Records the consumer's first successful retrieval for a transfer.
|
|
4
|
+
Written by the Data Plane, read by the Control Plane's one-shot policy sweep.
|
|
5
|
+
|
|
6
|
+
## Constructors
|
|
7
|
+
|
|
8
|
+
### Constructor
|
|
9
|
+
|
|
10
|
+
> **new TransferRetrieval**(): `TransferRetrieval`
|
|
11
|
+
|
|
12
|
+
#### Returns
|
|
13
|
+
|
|
14
|
+
`TransferRetrieval`
|
|
15
|
+
|
|
16
|
+
## Properties
|
|
17
|
+
|
|
18
|
+
### consumerPid {#consumerpid}
|
|
19
|
+
|
|
20
|
+
> **consumerPid**: `string`
|
|
21
|
+
|
|
22
|
+
The consumer PID of the transfer, primary key.
|
|
23
|
+
|
|
24
|
+
***
|
|
25
|
+
|
|
26
|
+
### dateFirstRetrieved {#datefirstretrieved}
|
|
27
|
+
|
|
28
|
+
> **dateFirstRetrieved**: `string`
|
|
29
|
+
|
|
30
|
+
When the first successful retrieval happened (ISO string format).
|
|
31
|
+
|
|
32
|
+
***
|
|
33
|
+
|
|
34
|
+
### dateLastRetrieved {#datelastretrieved}
|
|
35
|
+
|
|
36
|
+
> **dateLastRetrieved**: `string`
|
|
37
|
+
|
|
38
|
+
When the most recent successful retrieval happened (ISO string format).
|
package/docs/reference/index.md
CHANGED
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
- [DataspaceDataTypes](classes/DataspaceDataTypes.md)
|
|
6
6
|
- [DataspaceAppDataset](classes/DataspaceAppDataset.md)
|
|
7
|
+
- [DataspaceAppDatasetV0](classes/DataspaceAppDatasetV0.md)
|
|
7
8
|
- [TransferProcess](classes/TransferProcess.md)
|
|
9
|
+
- [TransferRetrieval](classes/TransferRetrieval.md)
|
|
8
10
|
|
|
9
11
|
## Interfaces
|
|
10
12
|
|
|
@@ -65,6 +67,7 @@
|
|
|
65
67
|
- [ITransferCallback](interfaces/ITransferCallback.md)
|
|
66
68
|
- [ITransferContext](interfaces/ITransferContext.md)
|
|
67
69
|
- [ITransferProcess](interfaces/ITransferProcess.md)
|
|
70
|
+
- [ITransferQueryResult](interfaces/ITransferQueryResult.md)
|
|
68
71
|
- [ITransferContextResponse](interfaces/ITransferContextResponse.md)
|
|
69
72
|
- [IDataspaceDataPlaneComponent](interfaces/IDataspaceDataPlaneComponent.md)
|
|
70
73
|
|
|
@@ -76,6 +79,7 @@
|
|
|
76
79
|
- [DataRequestType](type-aliases/DataRequestType.md)
|
|
77
80
|
- [DataspaceControlPlaneMetricIds](type-aliases/DataspaceControlPlaneMetricIds.md)
|
|
78
81
|
- [TransferProcessRole](type-aliases/TransferProcessRole.md)
|
|
82
|
+
- [TransferTerminationCode](type-aliases/TransferTerminationCode.md)
|
|
79
83
|
- [DataspaceDataPlaneMetricIds](type-aliases/DataspaceDataPlaneMetricIds.md)
|
|
80
84
|
- [DataspaceContexts](type-aliases/DataspaceContexts.md)
|
|
81
85
|
- [DataspaceTransferFormat](type-aliases/DataspaceTransferFormat.md)
|
|
@@ -90,6 +94,7 @@
|
|
|
90
94
|
- [DataspaceControlPlaneMetricIds](variables/DataspaceControlPlaneMetricIds.md)
|
|
91
95
|
- [DataspaceControlPlaneMetrics](variables/DataspaceControlPlaneMetrics.md)
|
|
92
96
|
- [TransferProcessRole](variables/TransferProcessRole.md)
|
|
97
|
+
- [TransferTerminationCode](variables/TransferTerminationCode.md)
|
|
93
98
|
- [DataspaceDataPlaneMetricIds](variables/DataspaceDataPlaneMetricIds.md)
|
|
94
99
|
- [DataspaceDataPlaneMetrics](variables/DataspaceDataPlaneMetrics.md)
|
|
95
100
|
- [DataspaceContexts](variables/DataspaceContexts.md)
|
|
@@ -35,3 +35,10 @@ registered name in `DataspaceAppFactory` (typically the app's URI).
|
|
|
35
35
|
|
|
36
36
|
The dataset payload. System-stamped fields like `dcterms:publisher`
|
|
37
37
|
may be omitted — the Control Plane fills them in at publish time.
|
|
38
|
+
|
|
39
|
+
#### transferIdleTimeoutMs?
|
|
40
|
+
|
|
41
|
+
> `optional` **transferIdleTimeoutMs?**: `number`
|
|
42
|
+
|
|
43
|
+
Optional idle window (ms) overriding the node-level idle policy for this
|
|
44
|
+
dataset's PULL transfers; 0 disables it for this dataset.
|
|
@@ -36,3 +36,10 @@ update if the tenant wants to retarget the dataset.
|
|
|
36
36
|
> **dataset**: `IDataspaceProtocolDataset`
|
|
37
37
|
|
|
38
38
|
The dataset payload.
|
|
39
|
+
|
|
40
|
+
#### transferIdleTimeoutMs?
|
|
41
|
+
|
|
42
|
+
> `optional` **transferIdleTimeoutMs?**: `number`
|
|
43
|
+
|
|
44
|
+
Optional idle window (ms) overriding the node-level idle policy for this
|
|
45
|
+
dataset's PULL transfers; 0 disables it for this dataset.
|
|
@@ -28,6 +28,15 @@ The dataset payload.
|
|
|
28
28
|
|
|
29
29
|
***
|
|
30
30
|
|
|
31
|
+
### transferIdleTimeoutMs? {#transferidletimeoutms}
|
|
32
|
+
|
|
33
|
+
> `optional` **transferIdleTimeoutMs?**: `number`
|
|
34
|
+
|
|
35
|
+
Idle window (ms) for this dataset's PULL transfers, overriding the node-level
|
|
36
|
+
providerTransferIdleTimeoutMs; 0 disables the idle policy for this dataset.
|
|
37
|
+
|
|
38
|
+
***
|
|
39
|
+
|
|
31
40
|
### dateCreated {#datecreated}
|
|
32
41
|
|
|
33
42
|
> **dateCreated**: `string`
|
|
@@ -550,9 +550,59 @@ Transfer Process (DSP compliant) with current state, or TransferError if the ope
|
|
|
550
550
|
|
|
551
551
|
***
|
|
552
552
|
|
|
553
|
+
### queryDataTransfer() {#querydatatransfer}
|
|
554
|
+
|
|
555
|
+
> **queryDataTransfer**(`agreementId`, `state`, `cursor`, `trustPayload`): `Promise`\<[`ITransferQueryResult`](ITransferQueryResult.md)\>
|
|
556
|
+
|
|
557
|
+
Query Transfer Processes by agreement id.
|
|
558
|
+
Lets a caller check whether transfers already exist for an agreement
|
|
559
|
+
(e.g. before initiating a new one) without knowing any process ids.
|
|
560
|
+
|
|
561
|
+
Role Performed: Consumer / Provider
|
|
562
|
+
Called by: Consumer orchestration before requesting a new transfer, or either
|
|
563
|
+
party inspecting the transfers attached to an agreement on their side.
|
|
564
|
+
|
|
565
|
+
Results are limited to transfers where the authenticated caller is a party
|
|
566
|
+
(consumer or provider identity). A returned dataAddress is a point-in-time copy;
|
|
567
|
+
if its token has expired the data plane rejects it and a new start is required.
|
|
568
|
+
|
|
569
|
+
#### Parameters
|
|
570
|
+
|
|
571
|
+
##### agreementId
|
|
572
|
+
|
|
573
|
+
`string`
|
|
574
|
+
|
|
575
|
+
The agreement id to look up transfer processes for.
|
|
576
|
+
|
|
577
|
+
##### state
|
|
578
|
+
|
|
579
|
+
`DataspaceProtocolTransferProcessStateType` \| `undefined`
|
|
580
|
+
|
|
581
|
+
Optional filter to a single transfer process state.
|
|
582
|
+
|
|
583
|
+
##### cursor
|
|
584
|
+
|
|
585
|
+
`string` \| `undefined`
|
|
586
|
+
|
|
587
|
+
Optional pagination cursor from a previous result page.
|
|
588
|
+
|
|
589
|
+
##### trustPayload
|
|
590
|
+
|
|
591
|
+
`unknown`
|
|
592
|
+
|
|
593
|
+
Trust payload containing authorization information (JWT, VC, etc.).
|
|
594
|
+
|
|
595
|
+
#### Returns
|
|
596
|
+
|
|
597
|
+
`Promise`\<[`ITransferQueryResult`](ITransferQueryResult.md)\>
|
|
598
|
+
|
|
599
|
+
The matching transfer processes and a pagination cursor when more pages exist, empty when none match.
|
|
600
|
+
|
|
601
|
+
***
|
|
602
|
+
|
|
553
603
|
### createAppDataset() {#createappdataset}
|
|
554
604
|
|
|
555
|
-
> **createAppDataset**(`id`, `appId`, `dataset`): `Promise`\<`string`\>
|
|
605
|
+
> **createAppDataset**(`id`, `appId`, `dataset`, `options?`): `Promise`\<`string`\>
|
|
556
606
|
|
|
557
607
|
Register an app dataset for a dataspace app, owned by the calling tenant.
|
|
558
608
|
|
|
@@ -578,6 +628,17 @@ The dataspace app this dataset belongs to (matches
|
|
|
578
628
|
|
|
579
629
|
The dataset payload (may omit system-stamped fields).
|
|
580
630
|
|
|
631
|
+
##### options?
|
|
632
|
+
|
|
633
|
+
Optional dataset settings.
|
|
634
|
+
|
|
635
|
+
###### transferIdleTimeoutMs?
|
|
636
|
+
|
|
637
|
+
`number`
|
|
638
|
+
|
|
639
|
+
Optional idle window (ms) overriding the node-level idle
|
|
640
|
+
policy for this dataset's PULL transfers; 0 disables it for this dataset.
|
|
641
|
+
|
|
581
642
|
#### Returns
|
|
582
643
|
|
|
583
644
|
`Promise`\<`string`\>
|
|
@@ -638,7 +699,7 @@ The stored app datasets and the next-page cursor if more exist.
|
|
|
638
699
|
|
|
639
700
|
### updateAppDataset() {#updateappdataset}
|
|
640
701
|
|
|
641
|
-
> **updateAppDataset**(`id`, `appId`, `dataset`): `Promise`\<`void`\>
|
|
702
|
+
> **updateAppDataset**(`id`, `appId`, `dataset`, `options?`): `Promise`\<`void`\>
|
|
642
703
|
|
|
643
704
|
Update an app dataset record owned by the calling tenant.
|
|
644
705
|
|
|
@@ -662,6 +723,17 @@ The dataspace app this dataset belongs to.
|
|
|
662
723
|
|
|
663
724
|
The dataset payload.
|
|
664
725
|
|
|
726
|
+
##### options?
|
|
727
|
+
|
|
728
|
+
Optional dataset settings.
|
|
729
|
+
|
|
730
|
+
###### transferIdleTimeoutMs?
|
|
731
|
+
|
|
732
|
+
`number`
|
|
733
|
+
|
|
734
|
+
Optional idle window (ms) overriding the node-level idle
|
|
735
|
+
policy for this dataset's PULL transfers; 0 disables it for this dataset.
|
|
736
|
+
|
|
665
737
|
#### Returns
|
|
666
738
|
|
|
667
739
|
`Promise`\<`void`\>
|
|
@@ -174,9 +174,9 @@ Nothing.
|
|
|
174
174
|
|
|
175
175
|
> `optional` **onTimeout**(`consumerPid`): `Promise`\<`void`\>
|
|
176
176
|
|
|
177
|
-
Called when the transfer times out
|
|
178
|
-
|
|
179
|
-
|
|
177
|
+
Called when the transfer times out: a consumer-side REQUESTED transfer the provider never
|
|
178
|
+
progressed, or a provider-side STARTED transfer idle beyond the configured window. Optional:
|
|
179
|
+
otherwise the control plane falls back to `onFailed` with the timeout reason.
|
|
180
180
|
|
|
181
181
|
#### Parameters
|
|
182
182
|
|
|
@@ -134,10 +134,8 @@ Specified by a Distribution for the Dataset associated with the Agreement.
|
|
|
134
134
|
|
|
135
135
|
> `optional` **dataAddress?**: `IDataspaceProtocolDataAddress`
|
|
136
136
|
|
|
137
|
-
Data address for consumer
|
|
138
|
-
|
|
139
|
-
Absent for PULL (HttpData-PULL) and provider-initiated push (HttpData-POST),
|
|
140
|
-
where the consumer deliberately omits a dataAddress.
|
|
137
|
+
Data address for the transfer: the consumer's inbox for PUSH, or the
|
|
138
|
+
provider-built address persisted at start for PULL/POST; may expire while STARTED.
|
|
141
139
|
|
|
142
140
|
***
|
|
143
141
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Interface: ITransferQueryResult
|
|
2
|
+
|
|
3
|
+
Result of querying Transfer Processes by agreement.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### transfers {#transfers}
|
|
8
|
+
|
|
9
|
+
> **transfers**: [`ITransferProcess`](ITransferProcess.md)[]
|
|
10
|
+
|
|
11
|
+
The transfer processes matching the query, empty when none match.
|
|
12
|
+
|
|
13
|
+
***
|
|
14
|
+
|
|
15
|
+
### cursor? {#cursor}
|
|
16
|
+
|
|
17
|
+
> `optional` **cursor?**: `string`
|
|
18
|
+
|
|
19
|
+
Pagination cursor for retrieving the next page, omitted when no more results exist.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Type Alias: TransferTerminationCode
|
|
2
|
+
|
|
3
|
+
> **TransferTerminationCode** = *typeof* [`TransferTerminationCode`](../variables/TransferTerminationCode.md)\[keyof *typeof* [`TransferTerminationCode`](../variables/TransferTerminationCode.md)\]
|
|
4
|
+
|
|
5
|
+
Type for TransferTerminationCode values.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Variable: TransferTerminationCode
|
|
2
|
+
|
|
3
|
+
> `const` **TransferTerminationCode**: `object`
|
|
4
|
+
|
|
5
|
+
Machine-readable codes set on provider-initiated TransferTerminationMessages
|
|
6
|
+
by the control plane's transfer lifecycle policies.
|
|
7
|
+
|
|
8
|
+
## Type Declaration
|
|
9
|
+
|
|
10
|
+
### IdleTimeout {#idletimeout}
|
|
11
|
+
|
|
12
|
+
> `readonly` **IdleTimeout**: `"idleTimeout"` = `"idleTimeout"`
|
|
13
|
+
|
|
14
|
+
A Provider-side STARTED transfer had no data-plane activity within the configured idle window.
|