@twin.org/dataspace-models 0.9.1-next.9 → 0.9.2-next.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/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/IPushDeliveryPayload.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/ITransferContext.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 +5 -3
- package/dist/types/entities/transferRetrieval.d.ts +18 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/models/IPushDeliveryPayload.d.ts +2 -2
- 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/ITransferContext.d.ts +3 -2
- package/dist/types/models/controlPlane/ITransferProcess.d.ts +5 -6
- package/dist/types/models/controlPlane/ITransferQueryResult.d.ts +14 -0
- package/dist/types/models/controlPlane/transferTerminationCode.d.ts +14 -0
- package/docs/changelog.md +111 -0
- package/docs/reference/classes/DataspaceAppDataset.md +9 -0
- package/docs/reference/classes/DataspaceAppDatasetV0.md +77 -0
- package/docs/reference/classes/TransferProcess.md +3 -2
- 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/IPushDeliveryPayload.md +1 -1
- package/docs/reference/interfaces/ITransferCallback.md +3 -3
- package/docs/reference/interfaces/ITransferContext.md +1 -1
- package/docs/reference/interfaces/ITransferProcess.md +3 -5
- 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 +3 -2
|
@@ -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
|
|
|
@@ -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.
|
|
@@ -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.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/dataspace-models",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.2-next.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,7 +11,7 @@
|
|
|
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
17
|
"@twin.org/background-task-models": "next",
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"@twin.org/data-json-ld": "next",
|
|
21
21
|
"@twin.org/entity": "next",
|
|
22
22
|
"@twin.org/nameof": "next",
|
|
23
|
+
"@twin.org/rights-management-models": "next",
|
|
23
24
|
"@twin.org/standards-dataspace-protocol": "next",
|
|
24
25
|
"@twin.org/standards-schema-org": "next",
|
|
25
26
|
"@twin.org/standards-w3c-activity-streams": "next",
|