@twin.org/dataspace-models 0.0.3-next.28 → 0.0.3-next.30
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 +11 -0
- package/dist/es/entities/transferProcess.js.map +1 -1
- package/dist/es/index.js +5 -0
- package/dist/es/index.js.map +1 -1
- package/dist/es/models/IPushDeliveryPayload.js +2 -0
- package/dist/es/models/IPushDeliveryPayload.js.map +1 -0
- package/dist/es/models/api/IActivityStreamNotifyRequest.js.map +1 -1
- package/dist/es/models/api/IActivityStreamNotifyResponse.js.map +1 -1
- package/dist/es/models/app/IDataspaceApp.js.map +1 -1
- package/dist/es/models/app/IFollowActivity.js +2 -0
- package/dist/es/models/app/IFollowActivity.js.map +1 -0
- package/dist/es/models/app/IUndoActivity.js +2 -0
- package/dist/es/models/app/IUndoActivity.js.map +1 -0
- package/dist/es/models/controlPlane/ITransferContext.js.map +1 -1
- package/dist/es/models/controlPlane/ITransferProcess.js.map +1 -1
- package/dist/es/models/dataPlane/IDataspaceDataPlaneComponent.js.map +1 -1
- package/dist/es/utils/jsonLdUtils.js +20 -0
- package/dist/es/utils/jsonLdUtils.js.map +1 -0
- package/dist/types/entities/transferProcess.d.ts +7 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/models/IPushDeliveryPayload.d.ts +66 -0
- package/dist/types/models/api/IActivityStreamNotifyRequest.d.ts +7 -0
- package/dist/types/models/api/IActivityStreamNotifyResponse.d.ts +2 -2
- package/dist/types/models/app/IDataspaceApp.d.ts +15 -0
- package/dist/types/models/app/IFollowActivity.d.ts +29 -0
- package/dist/types/models/app/IUndoActivity.d.ts +24 -0
- package/dist/types/models/controlPlane/ITransferContext.d.ts +4 -3
- package/dist/types/models/controlPlane/ITransferProcess.d.ts +10 -3
- package/dist/types/models/dataPlane/IDataspaceDataPlaneComponent.d.ts +40 -1
- package/dist/types/utils/jsonLdUtils.d.ts +12 -0
- package/docs/changelog.md +14 -0
- package/docs/reference/classes/TransferProcess.md +11 -0
- package/docs/reference/functions/getJsonLdId.md +19 -0
- package/docs/reference/functions/getJsonLdType.md +19 -0
- package/docs/reference/index.md +8 -0
- package/docs/reference/interfaces/IActivityStreamNotifyRequest.md +12 -0
- package/docs/reference/interfaces/IActivityStreamNotifyResponse.md +2 -2
- package/docs/reference/interfaces/IDataspaceApp.md +45 -0
- package/docs/reference/interfaces/IDataspaceDataPlaneComponent.md +125 -1
- package/docs/reference/interfaces/IFollowActivity.md +61 -0
- package/docs/reference/interfaces/IPushDeliveryPayload.md +125 -0
- package/docs/reference/interfaces/ITransferContext.md +4 -3
- package/docs/reference/interfaces/ITransferProcess.md +14 -3
- package/docs/reference/interfaces/IUndoActivity.md +57 -0
- package/package.json +1 -1
|
@@ -53,6 +53,13 @@ let TransferProcess = class TransferProcess {
|
|
|
53
53
|
* Callback address for Consumer notifications.
|
|
54
54
|
*/
|
|
55
55
|
callbackAddress;
|
|
56
|
+
/**
|
|
57
|
+
* The tenant that owns this transfer process, captured from the request context
|
|
58
|
+
* at write time. Optional — single-tenant nodes (no `TWIN_TENANT_ENABLED`) register
|
|
59
|
+
* transfers without a tenant context. Persisted so async push delivery tasks and
|
|
60
|
+
* setTimeout-delayed state transitions can re-enter the right tenant context.
|
|
61
|
+
*/
|
|
62
|
+
tenantId;
|
|
56
63
|
/**
|
|
57
64
|
* Creation timestamp (ISO string format).
|
|
58
65
|
*/
|
|
@@ -114,6 +121,10 @@ __decorate([
|
|
|
114
121
|
property({ type: "string", optional: true }),
|
|
115
122
|
__metadata("design:type", String)
|
|
116
123
|
], TransferProcess.prototype, "callbackAddress", void 0);
|
|
124
|
+
__decorate([
|
|
125
|
+
property({ type: "string", optional: true }),
|
|
126
|
+
__metadata("design:type", String)
|
|
127
|
+
], TransferProcess.prototype, "tenantId", void 0);
|
|
117
128
|
__decorate([
|
|
118
129
|
property({ type: "string", format: "date-time", sortDirection: SortDirection.Descending }),
|
|
119
130
|
__metadata("design:type", String)
|
|
@@ -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;AAOnE;;;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;;OAEG;IAEI,MAAM,CAAU;IAEvB;;OAEG;IAEI,eAAe,CAAU;IAEhC;;OAEG;IAEI,WAAW,CAAU;IAE5B;;OAEG;IAEI,YAAY,CAAU;IAE7B;;OAEG;IAEI,QAAQ,CAA8B;IAE7C;;OAEG;IAEI,WAAW,CAAiC;CACnD,CAAA;
|
|
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;AAOnE;;;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;;OAEG;IAEI,MAAM,CAAU;IAEvB;;OAEG;IAEI,eAAe,CAAU;IAEhC;;;;;OAKG;IAEI,QAAQ,CAAU;IAEzB;;OAEG;IAEI,WAAW,CAAU;IAE5B;;OAEG;IAEI,YAAY,CAAU;IAE7B;;OAEG;IAEI,QAAQ,CAA8B;IAE7C;;OAEG;IAEI,WAAW,CAAiC;CACnD,CAAA;AAhGO;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;AAM1B;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;AASzB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACpB;AAMlB;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;;iDACf;AAMtC;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oDACV;AArGvC,eAAe;IAD3B,MAAM,EAAE;GACI,eAAe,CAsG3B","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { entity, property, SortDirection } from \"@twin.org/entity\";\nimport type {\n\tDataspaceProtocolTransferProcessStateType,\n\tIDataspaceProtocolDataAddress,\n\tIDataspaceProtocolPolicy\n} from \"@twin.org/standards-dataspace-protocol\";\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 * 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 tenant that owns this transfer process, captured from the request context\n\t * at write time. Optional — single-tenant nodes (no `TWIN_TENANT_ENABLED`) register\n\t * transfers without a tenant context. Persisted so async push delivery tasks and\n\t * setTimeout-delayed state transitions can re-enter the right tenant context.\n\t */\n\t@property({ type: \"string\", optional: true })\n\tpublic tenantId?: 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?: IDataspaceProtocolPolicy[];\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"]}
|
package/dist/es/index.js
CHANGED
|
@@ -22,6 +22,8 @@ export * from "./dataTypes/dataspaceDataTypes.js";
|
|
|
22
22
|
// App exports
|
|
23
23
|
export * from "./factories/dataspaceAppFactory.js";
|
|
24
24
|
export * from "./models/app/IDataspaceApp.js";
|
|
25
|
+
export * from "./models/app/IFollowActivity.js";
|
|
26
|
+
export * from "./models/app/IUndoActivity.js";
|
|
25
27
|
export * from "./models/app/IProcessingGroupOptions.js";
|
|
26
28
|
// Other exports
|
|
27
29
|
export * from "./models/activityProcessingStatus.js";
|
|
@@ -72,4 +74,7 @@ export * from "./models/IDataAssetItemListResult.js";
|
|
|
72
74
|
export * from "./models/IEntitySet.js";
|
|
73
75
|
export * from "./models/IExecutionPayload.js";
|
|
74
76
|
export * from "./models/IFilteringQuery.js";
|
|
77
|
+
export * from "./models/IPushDeliveryPayload.js";
|
|
78
|
+
// Utility exports
|
|
79
|
+
export * from "./utils/jsonLdUtils.js";
|
|
75
80
|
//# sourceMappingURL=index.js.map
|
package/dist/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC,iBAAiB;AACjB,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAE9C,wBAAwB;AACxB,cAAc,uDAAuD,CAAC;AACtE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,0DAA0D,CAAC;AACzE,cAAc,kEAAkE,CAAC;AACjF,cAAc,+CAA+C,CAAC;AAC9D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,8CAA8C,CAAC;AAE7D,qBAAqB;AACrB,cAAc,oDAAoD,CAAC;AAEnE,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qCAAqC,CAAC;AACpD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAE/C,cAAc,mCAAmC,CAAC;AAElD,cAAc;AACd,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yCAAyC,CAAC;AAExD,gBAAgB;AAChB,cAAc,sCAAsC,CAAC;AACrD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,uDAAuD,CAAC;AACtE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,wCAAwC,CAAC;AAEvD,wDAAwD;AACxD,cAAc,uDAAuD,CAAC;AACtE,cAAc,wDAAwD,CAAC;AACvE,cAAc,uDAAuD,CAAC;AACtE,cAAc,oDAAoD,CAAC;AACnE,cAAc,qDAAqD,CAAC;AACpE,cAAc,qDAAqD,CAAC;AACpE,cAAc,sDAAsD,CAAC;AACrE,cAAc,uDAAuD,CAAC;AACtE,cAAc,uDAAuD,CAAC;AACtE,cAAc,wDAAwD,CAAC;AACvE,cAAc,yDAAyD,CAAC;AACxE,cAAc,0DAA0D,CAAC;AACzE,cAAc,sDAAsD,CAAC;AACrE,cAAc,uDAAuD,CAAC;AACtE,cAAc,oDAAoD,CAAC;AACnE,cAAc,qDAAqD,CAAC;AACpE,cAAc,sDAAsD,CAAC;AACrE,cAAc,uDAAuD,CAAC;AACtE,cAAc,wDAAwD,CAAC;AACvE,cAAc,yDAAyD,CAAC;AAExE,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2CAA2C,CAAC;AAC1D,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wCAAwC,CAAC;AACvD,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4CAA4C,CAAC;AAC3D,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sCAAsC,CAAC;AACrD,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n// Entity exports\nexport * from \"./entities/dataspaceAppDataset.js\";\nexport * from \"./entities/transferProcess.js\";\n\n// Control Plane exports\nexport * from \"./models/controlPlane/api/ITransferContextResponse.js\";\nexport * from \"./models/controlPlane/IDataspaceAppDataset.js\";\nexport * from \"./models/controlPlane/IDataspaceControlPlaneComponent.js\";\nexport * from \"./models/controlPlane/IDataspaceControlPlaneResolverComponent.js\";\nexport * from \"./models/controlPlane/INegotiationCallback.js\";\nexport * from \"./models/controlPlane/ITransferContext.js\";\nexport * from \"./models/controlPlane/ITransferProcess.js\";\nexport * from \"./models/controlPlane/transferProcessRole.js\";\n\n// Data Plane exports\nexport * from \"./models/dataPlane/IDataspaceDataPlaneComponent.js\";\n\nexport * from \"./models/dataspaceContexts.js\";\nexport * from \"./models/dataspaceTransferFormat.js\";\nexport * from \"./models/dataspaceTypes.js\";\nexport * from \"./models/IDataspaceActivity.js\";\n\nexport * from \"./dataTypes/dataspaceDataTypes.js\";\n\n// App exports\nexport * from \"./factories/dataspaceAppFactory.js\";\nexport * from \"./models/app/IDataspaceApp.js\";\nexport * from \"./models/app/IProcessingGroupOptions.js\";\n\n// Other exports\nexport * from \"./models/activityProcessingStatus.js\";\nexport * from \"./models/api/IActivityLogEntryGetRequest.js\";\nexport * from \"./models/api/IActivityLogEntryGetResponse.js\";\nexport * from \"./models/api/IActivityLogStatusNotificationPayload.js\";\nexport * from \"./models/api/IActivityLogStatusRequest.js\";\nexport * from \"./models/api/IActivityStreamNotifyRequest.js\";\nexport * from \"./models/api/IActivityStreamNotifyResponse.js\";\nexport * from \"./models/api/IDataAssetEntitiesResponse.js\";\nexport * from \"./models/api/IDataAssetGetEntitiesRequest.js\";\nexport * from \"./models/api/IDataAssetQueryRequest.js\";\n\n// Control Plane API exports - Transfer Process Protocol\nexport * from \"./models/api/controlPlane/IAppDatasetCreateRequest.js\";\nexport * from \"./models/api/controlPlane/IAppDatasetCreateResponse.js\";\nexport * from \"./models/api/controlPlane/IAppDatasetDeleteRequest.js\";\nexport * from \"./models/api/controlPlane/IAppDatasetGetRequest.js\";\nexport * from \"./models/api/controlPlane/IAppDatasetGetResponse.js\";\nexport * from \"./models/api/controlPlane/IAppDatasetListRequest.js\";\nexport * from \"./models/api/controlPlane/IAppDatasetListResponse.js\";\nexport * from \"./models/api/controlPlane/IAppDatasetUpdateRequest.js\";\nexport * from \"./models/api/controlPlane/ICompleteTransferRequest.js\";\nexport * from \"./models/api/controlPlane/ICompleteTransferResponse.js\";\nexport * from \"./models/api/controlPlane/IGetTransferProcessRequest.js\";\nexport * from \"./models/api/controlPlane/IGetTransferProcessResponse.js\";\nexport * from \"./models/api/controlPlane/IRequestTransferRequest.js\";\nexport * from \"./models/api/controlPlane/IRequestTransferResponse.js\";\nexport * from \"./models/api/controlPlane/IStartTransferRequest.js\";\nexport * from \"./models/api/controlPlane/IStartTransferResponse.js\";\nexport * from \"./models/api/controlPlane/ISuspendTransferRequest.js\";\nexport * from \"./models/api/controlPlane/ISuspendTransferResponse.js\";\nexport * from \"./models/api/controlPlane/ITerminateTransferRequest.js\";\nexport * from \"./models/api/controlPlane/ITerminateTransferResponse.js\";\n\nexport * from \"./models/activityTaskStatus.js\";\nexport * from \"./models/app/dataRequestType.js\";\nexport * from \"./models/app/IActivityQuery.js\";\nexport * from \"./models/app/IDataAssetEntitiesRequest.js\";\nexport * from \"./models/app/IDataAssetQuery.js\";\nexport * from \"./models/app/IDataRequest.js\";\nexport * from \"./models/app/IQueryDataAssetRequest.js\";\nexport * from \"./models/IActivityLogDetails.js\";\nexport * from \"./models/IActivityLogEntry.js\";\nexport * from \"./models/IActivityLogStatusNotification.js\";\nexport * from \"./models/IActivityTask.js\";\nexport * from \"./models/IActivityTaskEntry.js\";\nexport * from \"./models/IDataAssetItemList.js\";\nexport * from \"./models/IDataAssetItemListResult.js\";\nexport * from \"./models/IEntitySet.js\";\nexport * from \"./models/IExecutionPayload.js\";\nexport * from \"./models/IFilteringQuery.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC,iBAAiB;AACjB,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAE9C,wBAAwB;AACxB,cAAc,uDAAuD,CAAC;AACtE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,0DAA0D,CAAC;AACzE,cAAc,kEAAkE,CAAC;AACjF,cAAc,+CAA+C,CAAC;AAC9D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,8CAA8C,CAAC;AAE7D,qBAAqB;AACrB,cAAc,oDAAoD,CAAC;AAEnE,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qCAAqC,CAAC;AACpD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAE/C,cAAc,mCAAmC,CAAC;AAElD,cAAc;AACd,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yCAAyC,CAAC;AAExD,gBAAgB;AAChB,cAAc,sCAAsC,CAAC;AACrD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,uDAAuD,CAAC;AACtE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,wCAAwC,CAAC;AAEvD,wDAAwD;AACxD,cAAc,uDAAuD,CAAC;AACtE,cAAc,wDAAwD,CAAC;AACvE,cAAc,uDAAuD,CAAC;AACtE,cAAc,oDAAoD,CAAC;AACnE,cAAc,qDAAqD,CAAC;AACpE,cAAc,qDAAqD,CAAC;AACpE,cAAc,sDAAsD,CAAC;AACrE,cAAc,uDAAuD,CAAC;AACtE,cAAc,uDAAuD,CAAC;AACtE,cAAc,wDAAwD,CAAC;AACvE,cAAc,yDAAyD,CAAC;AACxE,cAAc,0DAA0D,CAAC;AACzE,cAAc,sDAAsD,CAAC;AACrE,cAAc,uDAAuD,CAAC;AACtE,cAAc,oDAAoD,CAAC;AACnE,cAAc,qDAAqD,CAAC;AACpE,cAAc,sDAAsD,CAAC;AACrE,cAAc,uDAAuD,CAAC;AACtE,cAAc,wDAAwD,CAAC;AACvE,cAAc,yDAAyD,CAAC;AAExE,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2CAA2C,CAAC;AAC1D,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wCAAwC,CAAC;AACvD,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4CAA4C,CAAC;AAC3D,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sCAAsC,CAAC;AACrD,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kCAAkC,CAAC;AAEjD,kBAAkB;AAClB,cAAc,wBAAwB,CAAC","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n// Entity exports\nexport * from \"./entities/dataspaceAppDataset.js\";\nexport * from \"./entities/transferProcess.js\";\n\n// Control Plane exports\nexport * from \"./models/controlPlane/api/ITransferContextResponse.js\";\nexport * from \"./models/controlPlane/IDataspaceAppDataset.js\";\nexport * from \"./models/controlPlane/IDataspaceControlPlaneComponent.js\";\nexport * from \"./models/controlPlane/IDataspaceControlPlaneResolverComponent.js\";\nexport * from \"./models/controlPlane/INegotiationCallback.js\";\nexport * from \"./models/controlPlane/ITransferContext.js\";\nexport * from \"./models/controlPlane/ITransferProcess.js\";\nexport * from \"./models/controlPlane/transferProcessRole.js\";\n\n// Data Plane exports\nexport * from \"./models/dataPlane/IDataspaceDataPlaneComponent.js\";\n\nexport * from \"./models/dataspaceContexts.js\";\nexport * from \"./models/dataspaceTransferFormat.js\";\nexport * from \"./models/dataspaceTypes.js\";\nexport * from \"./models/IDataspaceActivity.js\";\n\nexport * from \"./dataTypes/dataspaceDataTypes.js\";\n\n// App exports\nexport * from \"./factories/dataspaceAppFactory.js\";\nexport * from \"./models/app/IDataspaceApp.js\";\nexport * from \"./models/app/IFollowActivity.js\";\nexport * from \"./models/app/IUndoActivity.js\";\nexport * from \"./models/app/IProcessingGroupOptions.js\";\n\n// Other exports\nexport * from \"./models/activityProcessingStatus.js\";\nexport * from \"./models/api/IActivityLogEntryGetRequest.js\";\nexport * from \"./models/api/IActivityLogEntryGetResponse.js\";\nexport * from \"./models/api/IActivityLogStatusNotificationPayload.js\";\nexport * from \"./models/api/IActivityLogStatusRequest.js\";\nexport * from \"./models/api/IActivityStreamNotifyRequest.js\";\nexport * from \"./models/api/IActivityStreamNotifyResponse.js\";\nexport * from \"./models/api/IDataAssetEntitiesResponse.js\";\nexport * from \"./models/api/IDataAssetGetEntitiesRequest.js\";\nexport * from \"./models/api/IDataAssetQueryRequest.js\";\n\n// Control Plane API exports - Transfer Process Protocol\nexport * from \"./models/api/controlPlane/IAppDatasetCreateRequest.js\";\nexport * from \"./models/api/controlPlane/IAppDatasetCreateResponse.js\";\nexport * from \"./models/api/controlPlane/IAppDatasetDeleteRequest.js\";\nexport * from \"./models/api/controlPlane/IAppDatasetGetRequest.js\";\nexport * from \"./models/api/controlPlane/IAppDatasetGetResponse.js\";\nexport * from \"./models/api/controlPlane/IAppDatasetListRequest.js\";\nexport * from \"./models/api/controlPlane/IAppDatasetListResponse.js\";\nexport * from \"./models/api/controlPlane/IAppDatasetUpdateRequest.js\";\nexport * from \"./models/api/controlPlane/ICompleteTransferRequest.js\";\nexport * from \"./models/api/controlPlane/ICompleteTransferResponse.js\";\nexport * from \"./models/api/controlPlane/IGetTransferProcessRequest.js\";\nexport * from \"./models/api/controlPlane/IGetTransferProcessResponse.js\";\nexport * from \"./models/api/controlPlane/IRequestTransferRequest.js\";\nexport * from \"./models/api/controlPlane/IRequestTransferResponse.js\";\nexport * from \"./models/api/controlPlane/IStartTransferRequest.js\";\nexport * from \"./models/api/controlPlane/IStartTransferResponse.js\";\nexport * from \"./models/api/controlPlane/ISuspendTransferRequest.js\";\nexport * from \"./models/api/controlPlane/ISuspendTransferResponse.js\";\nexport * from \"./models/api/controlPlane/ITerminateTransferRequest.js\";\nexport * from \"./models/api/controlPlane/ITerminateTransferResponse.js\";\n\nexport * from \"./models/activityTaskStatus.js\";\nexport * from \"./models/app/dataRequestType.js\";\nexport * from \"./models/app/IActivityQuery.js\";\nexport * from \"./models/app/IDataAssetEntitiesRequest.js\";\nexport * from \"./models/app/IDataAssetQuery.js\";\nexport * from \"./models/app/IDataRequest.js\";\nexport * from \"./models/app/IQueryDataAssetRequest.js\";\nexport * from \"./models/IActivityLogDetails.js\";\nexport * from \"./models/IActivityLogEntry.js\";\nexport * from \"./models/IActivityLogStatusNotification.js\";\nexport * from \"./models/IActivityTask.js\";\nexport * from \"./models/IActivityTaskEntry.js\";\nexport * from \"./models/IDataAssetItemList.js\";\nexport * from \"./models/IDataAssetItemListResult.js\";\nexport * from \"./models/IEntitySet.js\";\nexport * from \"./models/IExecutionPayload.js\";\nexport * from \"./models/IFilteringQuery.js\";\nexport * from \"./models/IPushDeliveryPayload.js\";\n\n// Utility exports\nexport * from \"./utils/jsonLdUtils.js\";\n"]}
|
|
@@ -0,0 +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 { IDataspaceProtocolAgreement } from \"@twin.org/standards-dataspace-protocol\";\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: IDataspaceProtocolAgreement;\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":"IActivityStreamNotifyRequest.js","sourceRoot":"","sources":["../../../../src/models/api/IActivityStreamNotifyRequest.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IActivityStreamsActivity } from \"@twin.org/standards-w3c-activity-streams\";\n\n/**\n * Activity Stream Notify Request.\n */\nexport interface IActivityStreamNotifyRequest {\n\t/**\n\t * The Activity sent to the Stream.\n\t */\n\tbody: IActivityStreamsActivity;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"IActivityStreamNotifyRequest.js","sourceRoot":"","sources":["../../../../src/models/api/IActivityStreamNotifyRequest.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IActivityStreamsActivity } from \"@twin.org/standards-w3c-activity-streams\";\nimport type { HeaderTypes } from \"@twin.org/web\";\n\n/**\n * Activity Stream Notify Request.\n */\nexport interface IActivityStreamNotifyRequest {\n\t/**\n\t * The headers which can be used for authentication (e.g. Bearer token for cross-node push).\n\t */\n\theaders?: {\n\t\t[HeaderTypes.Authorization]?: string;\n\t};\n\n\t/**\n\t * The Activity sent to the Stream.\n\t */\n\tbody: IActivityStreamsActivity;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IActivityStreamNotifyResponse.js","sourceRoot":"","sources":["../../../../src/models/api/IActivityStreamNotifyResponse.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { HeaderTypes, HttpStatusCode } from \"@twin.org/web\";\nimport type { IActivityLogEntry } from \"../IActivityLogEntry.js\";\n\n/**\n * Activity Stream Notify Response.\n */\nexport interface IActivityStreamNotifyResponse {\n\t/**\n\t * The status code indicating the result of the notification processing. It can be either:\n\t * - `201 Created` if the notification was processed inline and a new activity log entry was created.\n\t * - `
|
|
1
|
+
{"version":3,"file":"IActivityStreamNotifyResponse.js","sourceRoot":"","sources":["../../../../src/models/api/IActivityStreamNotifyResponse.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { HeaderTypes, HttpStatusCode } from \"@twin.org/web\";\nimport type { IActivityLogEntry } from \"../IActivityLogEntry.js\";\n\n/**\n * Activity Stream Notify Response.\n */\nexport interface IActivityStreamNotifyResponse {\n\t/**\n\t * The status code indicating the result of the notification processing. It can be either:\n\t * - `201 Created` if the notification was processed inline and a new activity log entry was created.\n\t * - `202 Accepted` if the notification was accepted for async processing but has not been completed yet.\n\t */\n\tstatusCode: typeof HttpStatusCode.created | typeof HttpStatusCode.accepted;\n\n\t/**\n\t * Optional headers.\n\t */\n\theaders?: {\n\t\t[HeaderTypes.Location]?: string;\n\t};\n\n\t/**\n\t * The Activity log entry if the notification was processed inline.\n\t */\n\tbody?: IActivityLogEntry;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IDataspaceApp.js","sourceRoot":"","sources":["../../../../src/models/app/IDataspaceApp.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type { IJsonLdDocument } from \"@twin.org/data-json-ld\";\nimport type { IDataspaceProtocolDataset } from \"@twin.org/standards-dataspace-protocol\";\nimport type { IActivityQuery } from \"./IActivityQuery.js\";\nimport type { IDataRequest } from \"./IDataRequest.js\";\nimport type { IDataspaceActivity } from \"../IDataspaceActivity.js\";\nimport type { IProcessingGroupOptions } from \"./IProcessingGroupOptions.js\";\n\n/**\n * Interface describes a Dataspace App.\n */\nexport interface IDataspaceApp extends IComponent {\n\t/**\n\t * The settings for the processing groups for tasks.\n\t * @returns The options for each process group.\n\t */\n\tprocessingGroups?(): { [id: string]: IProcessingGroupOptions };\n\n\t/**\n\t * The activities handled by the App.\n\t * @returns A query that describes the set of activities handled by the App.\n\t */\n\tactivitiesHandled(): IActivityQuery[];\n\n\t/**\n\t * Optional override called by the Control Plane when publishing a stored dataset for this app.\n\t * The Control Plane always calls `populateDefaults` (e.g. `dcterms:publisher`)\n\t * on every dataset returned here, so apps don't need to populate publisher themselves.\n\t * @param payload The user-stored dataset payload.\n\t * @param tenantId The owning tenant for this dataset. Empty string on\n\t * single-tenant nodes (no `TWIN_TENANT_ENABLED`).\n\t * @returns One or more datasets to publish to the catalogue. System-stamped\n\t * fields like `dcterms:publisher` may be omitted — the Control Plane fills them in.\n\t */\n\tdatasetsHandled?(\n\t\tpayload: IDataspaceProtocolDataset,\n\t\ttenantId: string\n\t): Promise<IDataspaceProtocolDataset[]>;\n\n\t/**\n\t * The types of queries supported.\n\t * @returns The types of queries supported by the Dataspace App to retrieve data.\n\t */\n\tsupportedQueryTypes(): string[];\n\n\t/**\n\t * Handles an Activity and report about results through the Dataspace Data Plane Callback\n\t * @param activity The Activity to be handled\n\t * @returns The result of executing the Activity.\n\t */\n\thandleActivity?<T>(activity: IDataspaceActivity): Promise<T>;\n\n\t/**\n\t * Handles a Data Request.\n\t * @param dataRequest The data request.\n\t * @param cursor Cursor that points to the next item in the result set.\n\t * @param limit Maximum number of entries retrieved or to be retrieved.\n\t * @returns Data as JSON-Ld.\n\t */\n\thandleDataRequest?(\n\t\tdataRequest: IDataRequest,\n\t\tcursor?: string,\n\t\tlimit?: number\n\t): Promise<{ data: IJsonLdDocument; cursor?: string }>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"IDataspaceApp.js","sourceRoot":"","sources":["../../../../src/models/app/IDataspaceApp.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type { IJsonLdDocument } from \"@twin.org/data-json-ld\";\nimport type { IDataspaceProtocolDataset } from \"@twin.org/standards-dataspace-protocol\";\nimport type { IActivityQuery } from \"./IActivityQuery.js\";\nimport type { IDataRequest } from \"./IDataRequest.js\";\nimport type { IFollowActivity } from \"./IFollowActivity.js\";\nimport type { IUndoActivity } from \"./IUndoActivity.js\";\nimport type { IDataspaceActivity } from \"../IDataspaceActivity.js\";\nimport type { IProcessingGroupOptions } from \"./IProcessingGroupOptions.js\";\n\n/**\n * Interface describes a Dataspace App.\n */\nexport interface IDataspaceApp extends IComponent {\n\t/**\n\t * The settings for the processing groups for tasks.\n\t * @returns The options for each process group.\n\t */\n\tprocessingGroups?(): { [id: string]: IProcessingGroupOptions };\n\n\t/**\n\t * The activities handled by the App.\n\t * @returns A query that describes the set of activities handled by the App.\n\t */\n\tactivitiesHandled(): IActivityQuery[];\n\n\t/**\n\t * Optional override called by the Control Plane when publishing a stored dataset for this app.\n\t * The Control Plane always calls `populateDefaults` (e.g. `dcterms:publisher`)\n\t * on every dataset returned here, so apps don't need to populate publisher themselves.\n\t * @param payload The user-stored dataset payload.\n\t * @param tenantId The owning tenant for this dataset. Empty string on\n\t * single-tenant nodes (no `TWIN_TENANT_ENABLED`).\n\t * @returns One or more datasets to publish to the catalogue. System-stamped\n\t * fields like `dcterms:publisher` may be omitted — the Control Plane fills them in.\n\t */\n\tdatasetsHandled?(\n\t\tpayload: IDataspaceProtocolDataset,\n\t\ttenantId: string\n\t): Promise<IDataspaceProtocolDataset[]>;\n\n\t/**\n\t * The types of queries supported.\n\t * @returns The types of queries supported by the Dataspace App to retrieve data.\n\t */\n\tsupportedQueryTypes(): string[];\n\n\t/**\n\t * Handles an Activity and report about results through the Dataspace Data Plane Callback\n\t * @param activity The Activity to be handled\n\t * @returns The result of executing the Activity.\n\t */\n\thandleActivity?<T>(activity: IDataspaceActivity): Promise<T>;\n\n\t/**\n\t * Handles a Data Request.\n\t * @param dataRequest The data request.\n\t * @param cursor Cursor that points to the next item in the result set.\n\t * @param limit Maximum number of entries retrieved or to be retrieved.\n\t * @returns Data as JSON-Ld.\n\t */\n\thandleDataRequest?(\n\t\tdataRequest: IDataRequest,\n\t\tcursor?: string,\n\t\tlimit?: number\n\t): Promise<{ data: IJsonLdDocument; cursor?: string }>;\n\n\t/**\n\t * Subscribe the app to produce data for a follower. Called by the\n\t * DS Connector after a push transfer enters STARTED state.\n\t * @param followActivity The Follow activity describing the follower + filter.\n\t * @returns Promise that resolves when the subscription is set up.\n\t */\n\tsubscribeToData?(followActivity: IFollowActivity): Promise<void>;\n\n\t/**\n\t * Undo a previous subscription. Called on transfer complete/terminate.\n\t * @param undoActivity The Undo activity referencing the original Follow.\n\t * @returns Promise that resolves when the subscription is torn down.\n\t */\n\tunsubscribeToData?(undoActivity: IUndoActivity): Promise<void>;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IFollowActivity.js","sourceRoot":"","sources":["../../../../src/models/app/IFollowActivity.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type {\n\tActivityStreamsTypes,\n\tIActivityStreamsActivity\n} from \"@twin.org/standards-w3c-activity-streams\";\n\n/**\n * ActivityPub Follow activity used by the DS Connector to subscribe\n * an app to a data source. The app treats this as \"start producing\n * data for this consumer.\"\n *\n * generator = consumerPid (URN) of the follower\n * actor = DID of the follower's organization\n * object = TransferProcess reference, optionally with a filter expressed as JSON-LD\n */\nexport interface IFollowActivity extends IActivityStreamsActivity {\n\t/**\n\t * The activity type, always \"Follow\".\n\t */\n\ttype: typeof ActivityStreamsTypes.Follow;\n\n\t/**\n\t * The consumerPid URN identifying the follower's transfer process.\n\t */\n\tgenerator: string;\n\n\t/**\n\t * The DID of the follower's organization.\n\t */\n\tactor: string;\n\n\t/**\n\t * The TransferProcess reference, optionally with a filter expressed as JSON-LD.\n\t */\n\tobject: string | IJsonLdNodeObject;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IUndoActivity.js","sourceRoot":"","sources":["../../../../src/models/app/IUndoActivity.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type {\n\tActivityStreamsTypes,\n\tIActivityStreamsActivity\n} from \"@twin.org/standards-w3c-activity-streams\";\n\n/**\n * ActivityPub Undo activity used by the DS Connector to unsubscribe\n * an app from a data source. The object MUST reference the `@id` of\n * a previously issued Follow activity.\n */\nexport interface IUndoActivity extends IActivityStreamsActivity {\n\t/**\n\t * The activity type, always \"Undo\".\n\t */\n\ttype: typeof ActivityStreamsTypes.Undo;\n\n\t/**\n\t * The consumerPid URN identifying the transfer process being unsubscribed.\n\t */\n\tgenerator: string;\n\n\t/**\n\t * The DID of the unsubscribing organization.\n\t */\n\tactor: string;\n\n\t/**\n\t * The `@id` of the Follow activity being undone.\n\t */\n\tobject: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ITransferContext.js","sourceRoot":"","sources":["../../../../src/models/controlPlane/ITransferContext.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type {\n\tDataspaceProtocolTransferProcessStateType,\n\tIDataspaceProtocolAgreement,\n\tIDataspaceProtocolDataAddress\n} from \"@twin.org/standards-dataspace-protocol\";\n\n/**\n * Transfer Context data structure.\n * Contains all information needed by DSC to execute queries.\n * This is NOT part of the DSP protocol - it's a TWIN internal API\n * used by dataspace-control-plane to resolve consumerPid to datasetId and policies.\n */\nexport interface ITransferContext {\n\t/**\n\t * Consumer Process ID.\n\t */\n\tconsumerPid: string;\n\n\t/**\n\t * Provider Process ID.\n\t */\n\tproviderPid: string;\n\n\t/**\n\t * Agreement associated with this Transfer Process.\n\t * Contains permissions, obligations, and prohibitions that DSC uses for runtime policy enforcement.\n\t */\n\tagreement: IDataspaceProtocolAgreement;\n\n\t/**\n\t * Dataset ID - what the DSC needs to execute the query.\n\t * Convenience field extracted from agreement.target for quick access.\n\t */\n\tdatasetId: string;\n\n\t/**\n\t * Offer ID.\n\t */\n\tofferId: string;\n\n\t/**\n\t * Current Transfer Process state.\n\t * DSC should only allow queries if state is STARTED.\n\t */\n\tstate: DataspaceProtocolTransferProcessStateType;\n\n\t/**\n\t * Consumer identity (for auditing).\n\t */\n\tconsumerIdentity?: string;\n\n\t/**\n\t * Provider identity (for auditing).\n\t * Extracted from Agreement's assigner field.\n\t */\n\tproviderIdentity?: string;\n\n\t/**\n\t * Data address for push
|
|
1
|
+
{"version":3,"file":"ITransferContext.js","sourceRoot":"","sources":["../../../../src/models/controlPlane/ITransferContext.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type {\n\tDataspaceProtocolTransferProcessStateType,\n\tIDataspaceProtocolAgreement,\n\tIDataspaceProtocolDataAddress\n} from \"@twin.org/standards-dataspace-protocol\";\n\n/**\n * Transfer Context data structure.\n * Contains all information needed by DSC to execute queries.\n * This is NOT part of the DSP protocol - it's a TWIN internal API\n * used by dataspace-control-plane to resolve consumerPid to datasetId and policies.\n */\nexport interface ITransferContext {\n\t/**\n\t * Consumer Process ID.\n\t */\n\tconsumerPid: string;\n\n\t/**\n\t * Provider Process ID.\n\t */\n\tproviderPid: string;\n\n\t/**\n\t * Agreement associated with this Transfer Process.\n\t * Contains permissions, obligations, and prohibitions that DSC uses for runtime policy enforcement.\n\t */\n\tagreement: IDataspaceProtocolAgreement;\n\n\t/**\n\t * Dataset ID - what the DSC needs to execute the query.\n\t * Convenience field extracted from agreement.target for quick access.\n\t */\n\tdatasetId: string;\n\n\t/**\n\t * Offer ID.\n\t */\n\tofferId: string;\n\n\t/**\n\t * Current Transfer Process state.\n\t * DSC should only allow queries if state is STARTED.\n\t */\n\tstate: DataspaceProtocolTransferProcessStateType;\n\n\t/**\n\t * Consumer identity (for auditing).\n\t */\n\tconsumerIdentity?: string;\n\n\t/**\n\t * Provider identity (for auditing).\n\t * Extracted from Agreement's assigner field.\n\t */\n\tproviderIdentity?: string;\n\n\t/**\n\t * Data address for consumer-initiated push transfers (HttpProxy-PUSH).\n\t * Contains the consumer's /inbox endpoint as supplied in the TransferRequestMessage.\n\t * Absent for PULL (HttpProxy-PULL) and provider-initiated push (HttpProxy-POST),\n\t * where the consumer deliberately omits a dataAddress.\n\t */\n\tdataAddress?: IDataspaceProtocolDataAddress;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ITransferProcess.js","sourceRoot":"","sources":["../../../../src/models/controlPlane/ITransferProcess.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type {\n\tDataspaceProtocolTransferProcessStateType,\n\tIDataspaceProtocolDataAddress,\n\tIDataspaceProtocolPolicy\n} from \"@twin.org/standards-dataspace-protocol\";\n\n/**\n * Transfer Process for internal storage.\n * Combines DSP protocol fields with internal TWIN fields.\n * This is NOT the DSP wire format (use ITransferProcess from standards for that).\n */\nexport interface ITransferProcess {\n\t/**\n\t * Internal UUID (primary key for entity storage).\n\t */\n\tid: string;\n\n\t// === DSP Protocol fields (public) ===\n\n\t/**\n\t * Consumer Process ID from the DSP protocol.\n\t * Refers to the transfer identifier on the Consumer side.\n\t */\n\tconsumerPid: string;\n\n\t/**\n\t * Provider Process ID from the DSP protocol.\n\t * Refers to the transfer identifier on the Provider side.\n\t */\n\tproviderPid: string;\n\n\t/**\n\t * Transfer Process state from the DSP protocol.\n\t * One of: REQUESTED, STARTED, COMPLETED, SUSPENDED, TERMINATED.\n\t */\n\tstate: DataspaceProtocolTransferProcessStateType;\n\n\t// === Internal TWIN fields (NOT in DSP protocol) ===\n\n\t/**\n\t * Agreement ID linking to the rights-management Agreement.\n\t * Used to resolve policies and permissions.\n\t */\n\tagreementId: string;\n\n\t/**\n\t * Dataset ID for DSC resolution.\n\t * Identifies the dataset being transferred.\n\t */\n\tdatasetId: string;\n\n\t/**\n\t * Offer ID from the original Catalog offer.\n\t */\n\tofferId: string;\n\n\t/**\n\t * Policies from the Agreement.\n\t * Used by DSC for runtime policy enforcement.\n\t */\n\tpolicies?: IDataspaceProtocolPolicy[];\n\n\t/**\n\t * Consumer identity (DID or URI).\n\t * Used for auditing and access control.\n\t */\n\tconsumerIdentity?: string;\n\n\t/**\n\t * Provider identity (DID or URI).\n\t * Used for auditing.\n\t */\n\tproviderIdentity?: string;\n\n\t/**\n\t * Callback address for Consumer notifications.\n\t * URI where messages to the Consumer should be sent.\n\t */\n\tcallbackAddress?: string;\n\n\t/**\n\t * 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 push
|
|
1
|
+
{"version":3,"file":"ITransferProcess.js","sourceRoot":"","sources":["../../../../src/models/controlPlane/ITransferProcess.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type {\n\tDataspaceProtocolTransferProcessStateType,\n\tIDataspaceProtocolDataAddress,\n\tIDataspaceProtocolPolicy\n} from \"@twin.org/standards-dataspace-protocol\";\n\n/**\n * Transfer Process for internal storage.\n * Combines DSP protocol fields with internal TWIN fields.\n * This is NOT the DSP wire format (use ITransferProcess from standards for that).\n */\nexport interface ITransferProcess {\n\t/**\n\t * Internal UUID (primary key for entity storage).\n\t */\n\tid: string;\n\n\t// === DSP Protocol fields (public) ===\n\n\t/**\n\t * Consumer Process ID from the DSP protocol.\n\t * Refers to the transfer identifier on the Consumer side.\n\t */\n\tconsumerPid: string;\n\n\t/**\n\t * Provider Process ID from the DSP protocol.\n\t * Refers to the transfer identifier on the Provider side.\n\t */\n\tproviderPid: string;\n\n\t/**\n\t * Transfer Process state from the DSP protocol.\n\t * One of: REQUESTED, STARTED, COMPLETED, SUSPENDED, TERMINATED.\n\t */\n\tstate: DataspaceProtocolTransferProcessStateType;\n\n\t// === Internal TWIN fields (NOT in DSP protocol) ===\n\n\t/**\n\t * Agreement ID linking to the rights-management Agreement.\n\t * Used to resolve policies and permissions.\n\t */\n\tagreementId: string;\n\n\t/**\n\t * Dataset ID for DSC resolution.\n\t * Identifies the dataset being transferred.\n\t */\n\tdatasetId: string;\n\n\t/**\n\t * Offer ID from the original Catalog offer.\n\t */\n\tofferId: string;\n\n\t/**\n\t * Policies from the Agreement.\n\t * Used by DSC for runtime policy enforcement.\n\t */\n\tpolicies?: IDataspaceProtocolPolicy[];\n\n\t/**\n\t * Consumer identity (DID or URI).\n\t * Used for auditing and access control.\n\t */\n\tconsumerIdentity?: string;\n\n\t/**\n\t * Provider identity (DID or URI).\n\t * Used for auditing.\n\t */\n\tproviderIdentity?: string;\n\n\t/**\n\t * Callback address for Consumer notifications.\n\t * URI where messages to the Consumer should be sent.\n\t */\n\tcallbackAddress?: string;\n\n\t/**\n\t * The tenant that owns this transfer process, captured at write time so async\n\t * delivery tasks and delayed state transitions can re-enter the right tenant context.\n\t * Optional — single-tenant nodes operate without a tenant context.\n\t */\n\ttenantId?: string;\n\n\t/**\n\t * Data format from the Dataset Distribution.\n\t * Specified by a Distribution for the Dataset associated with the Agreement.\n\t */\n\tformat?: string;\n\n\t/**\n\t * Data address for consumer-initiated push transfers (HttpProxy-PUSH).\n\t * Contains the consumer's /inbox endpoint as supplied in the TransferRequestMessage.\n\t * Absent for PULL (HttpProxy-PULL) and provider-initiated push (HttpProxy-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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IDataspaceDataPlaneComponent.js","sourceRoot":"","sources":["../../../../src/models/dataPlane/IDataspaceDataPlaneComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { IActivityStreamsActivity } from \"@twin.org/standards-w3c-activity-streams\";\nimport type { IActivityLogEntry } from \"../IActivityLogEntry.js\";\nimport type { IActivityLogStatusNotification } from \"../IActivityLogStatusNotification.js\";\nimport type { IDataAssetItemListResult } from \"../IDataAssetItemListResult.js\";\nimport type { IEntitySet } from \"../IEntitySet.js\";\nimport type { IFilteringQuery } from \"../IFilteringQuery.js\";\n\n/**\n * Dataspace Data Plane component interface.\n * Implements the Data Plane functionality for the Eclipse Dataspace Protocol.\n */\nexport interface IDataspaceDataPlaneComponent extends IComponent {\n\t/**\n\t * Notify an Activity to the Dataspace Data Plane Activity Stream.\n\t * @param activity The Activity notified.\n\t * @returns The activity's entry.\n\t */\n\tnotifyActivity(
|
|
1
|
+
{"version":3,"file":"IDataspaceDataPlaneComponent.js","sourceRoot":"","sources":["../../../../src/models/dataPlane/IDataspaceDataPlaneComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { IActivityStreamsActivity } from \"@twin.org/standards-w3c-activity-streams\";\nimport type { IActivityLogEntry } from \"../IActivityLogEntry.js\";\nimport type { IActivityLogStatusNotification } from \"../IActivityLogStatusNotification.js\";\nimport type { IDataAssetItemListResult } from \"../IDataAssetItemListResult.js\";\nimport type { IEntitySet } from \"../IEntitySet.js\";\nimport type { IFilteringQuery } from \"../IFilteringQuery.js\";\n\n/**\n * Dataspace Data Plane component interface.\n * Implements the Data Plane functionality for the Eclipse Dataspace Protocol.\n */\nexport interface IDataspaceDataPlaneComponent extends IComponent {\n\t/**\n\t * Notify an Activity to the Dataspace Data Plane Activity Stream.\n\t * @param activity The Activity notified.\n\t * @param trustPayload Optional trust payload to verify the requester's identity.\n\t * @returns The activity's entry.\n\t */\n\tnotifyActivity(\n\t\tactivity: IActivityStreamsActivity,\n\t\ttrustPayload?: unknown\n\t): Promise<string | IActivityLogEntry>;\n\n\t/**\n\t * Subscribes to the activity log.\n\t * @param callback The callback to be called when Activity Log is called.\n\t * @param subscriptionId The subscription Id.\n\t * @returns The subscription Id.\n\t */\n\tsubscribeToActivityLog(\n\t\tcallback: (notification: IActivityLogStatusNotification) => Promise<void>,\n\t\tsubscriptionId?: string\n\t): Promise<string>;\n\n\t/**\n\t * Unsubscribes to the activity log.\n\t * @param subscriptionId The subscription Id.\n\t * @returns The subscription Id.\n\t */\n\tunSubscribeToActivityLog(subscriptionId: string): Promise<void>;\n\n\t/**\n\t * Returns Activity Log Entry which contains the Activity processing details.\n\t * @param logEntryId The Id of the Activity Log Entry (a URI).\n\t * @returns the Activity Log Entry with the processing details.\n\t * @throws NotFoundError if activity log entry is not known.\n\t */\n\tgetActivityLogEntry(logEntryId: string): Promise<IActivityLogEntry>;\n\n\t/**\n\t * Get Data Asset entities. Allows to retrieve entities by their type or id.\n\t * @param entitySet The set of entities to be retrieved.\n\t * @param entitySet.jsonLdContext The JSON-LD Context to be used to expand the referred entityType.\n\t * @param consumerPid The consumer Process ID from the DSP Transfer Process.\n\t * Used to resolve datasetId from the Transfer Process.\n\t * @param cursor Pagination details - cursor.\n\t * @param limit Pagination details - max number of entities.\n\t * @param trustPayload Trust payload to verify the requesters identity.\n\t * @returns The item list and optional cursor for pagination via Link headers.\n\t */\n\tgetDataAssetEntities(\n\t\tentitySet: IEntitySet & {\n\t\t\tjsonLdContext?: IJsonLdContextDefinitionElement[];\n\t\t},\n\t\tconsumerPid: string,\n\t\tcursor?: string,\n\t\tlimit?: number,\n\t\ttrustPayload?: unknown\n\t): Promise<IDataAssetItemListResult>;\n\n\t/**\n\t * Queries a data asset controlled by this Dataspace App.\n\t * @param consumerPid The consumer Process ID from the DSP Transfer Process.\n\t * Used to resolve datasetId from the Transfer Process.\n\t * @param query The filtering query.\n\t * @param cursor Pagination details - cursor.\n\t * @param limit Pagination details - max number of entities.\n\t * @param trustPayload Trust payload to verify the requesters identity.\n\t * @returns The item list and optional cursor for pagination via Link headers.\n\t */\n\tqueryDataAsset(\n\t\tconsumerPid: string,\n\t\tquery: IFilteringQuery,\n\t\tcursor?: string,\n\t\tlimit?: number,\n\t\ttrustPayload?: unknown\n\t): Promise<IDataAssetItemListResult>;\n\n\t/**\n\t * Set up a push subscription after a transfer enters STARTED from REQUESTED.\n\t * Reads the TransferProcess, builds an IFollowActivity, calls the app's\n\t * subscribeToData, and persists a PushSubscription entity.\n\t * @param consumerPid The consumer process ID identifying the transfer.\n\t * @returns Promise that resolves when the subscription is created.\n\t */\n\tsetupPushSubscription(consumerPid: string): Promise<void>;\n\n\t/**\n\t * Pause deliveries for a push subscription. The subscription entity stays\n\t * alive with status=Paused. No app unsubscribe call.\n\t * @param consumerPid The consumer process ID identifying the transfer.\n\t * @returns Promise that resolves when the subscription is paused.\n\t */\n\tsuspendPushSubscription(consumerPid: string): Promise<void>;\n\n\t/**\n\t * Resume deliveries after a SUSPENDED → STARTED transition. Flips status\n\t * back to Active. No app subscribeToData call.\n\t * @param consumerPid The consumer process ID identifying the transfer.\n\t * @returns Promise that resolves when the subscription is resumed.\n\t */\n\tresumePushSubscription(consumerPid: string): Promise<void>;\n\n\t/**\n\t * Tear down a push subscription. Builds an IUndoActivity, calls the app's\n\t * unsubscribeToData, and deletes the PushSubscription entity.\n\t * @param consumerPid The consumer process ID identifying the transfer.\n\t * @returns Promise that resolves when the subscription is torn down.\n\t */\n\tteardownPushSubscription(consumerPid: string): Promise<void>;\n\n\t/**\n\t * Called by the app when new data is available for a follower.\n\t * The activity's `to` attribute contains the consumerPid URN. This method\n\t * looks up the matching PushSubscription, validates transfer state, and\n\t * schedules a Background Task that POSTs the activity to the consumer.\n\t * @param activity The outbound activity carrying the data payload.\n\t * @returns Promise that resolves when the delivery task is scheduled.\n\t */\n\tprocessOutboxActivity(activity: IActivityStreamsActivity): Promise<void>;\n}\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Copyright 2025 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
import { ObjectHelper } from "@twin.org/core";
|
|
4
|
+
/**
|
|
5
|
+
* Get a JSON-LD id.
|
|
6
|
+
* @param object The object to get the id from.
|
|
7
|
+
* @returns The JSON-LD id.
|
|
8
|
+
*/
|
|
9
|
+
export function getJsonLdId(object) {
|
|
10
|
+
return ObjectHelper.extractProperty(object, ["@id", "id"], false);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Get a JSON-LD type.
|
|
14
|
+
* @param object The object to get the type from.
|
|
15
|
+
* @returns The JSON-LD type.
|
|
16
|
+
*/
|
|
17
|
+
export function getJsonLdType(object) {
|
|
18
|
+
return ObjectHelper.extractProperty(object, ["@type", "type"], false);
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=jsonLdUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonLdUtils.js","sourceRoot":"","sources":["../../../src/utils/jsonLdUtils.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,MAAe;IAC1C,OAAO,YAAY,CAAC,eAAe,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC;AACnE,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,MAAe;IAC5C,OAAO,YAAY,CAAC,eAAe,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,KAAK,CAAC,CAAC;AACvE,CAAC","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { ObjectHelper } from \"@twin.org/core\";\n\n/**\n * Get a JSON-LD id.\n * @param object The object to get the id from.\n * @returns The JSON-LD id.\n */\nexport function getJsonLdId(object: unknown): string | undefined {\n\treturn ObjectHelper.extractProperty(object, [\"@id\", \"id\"], false);\n}\n\n/**\n * Get a JSON-LD type.\n * @param object The object to get the type from.\n * @returns The JSON-LD type.\n */\nexport function getJsonLdType(object: unknown): string | undefined {\n\treturn ObjectHelper.extractProperty(object, [\"@type\", \"type\"], false);\n}\n"]}
|
|
@@ -51,6 +51,13 @@ export declare class TransferProcess {
|
|
|
51
51
|
* Callback address for Consumer notifications.
|
|
52
52
|
*/
|
|
53
53
|
callbackAddress?: string;
|
|
54
|
+
/**
|
|
55
|
+
* The tenant that owns this transfer process, captured from the request context
|
|
56
|
+
* at write time. Optional — single-tenant nodes (no `TWIN_TENANT_ENABLED`) register
|
|
57
|
+
* transfers without a tenant context. Persisted so async push delivery tasks and
|
|
58
|
+
* setTimeout-delayed state transitions can re-enter the right tenant context.
|
|
59
|
+
*/
|
|
60
|
+
tenantId?: string;
|
|
54
61
|
/**
|
|
55
62
|
* Creation timestamp (ISO string format).
|
|
56
63
|
*/
|
package/dist/types/index.d.ts
CHANGED
|
@@ -16,6 +16,8 @@ export * from "./models/IDataspaceActivity.js";
|
|
|
16
16
|
export * from "./dataTypes/dataspaceDataTypes.js";
|
|
17
17
|
export * from "./factories/dataspaceAppFactory.js";
|
|
18
18
|
export * from "./models/app/IDataspaceApp.js";
|
|
19
|
+
export * from "./models/app/IFollowActivity.js";
|
|
20
|
+
export * from "./models/app/IUndoActivity.js";
|
|
19
21
|
export * from "./models/app/IProcessingGroupOptions.js";
|
|
20
22
|
export * from "./models/activityProcessingStatus.js";
|
|
21
23
|
export * from "./models/api/IActivityLogEntryGetRequest.js";
|
|
@@ -64,3 +66,5 @@ export * from "./models/IDataAssetItemListResult.js";
|
|
|
64
66
|
export * from "./models/IEntitySet.js";
|
|
65
67
|
export * from "./models/IExecutionPayload.js";
|
|
66
68
|
export * from "./models/IFilteringQuery.js";
|
|
69
|
+
export * from "./models/IPushDeliveryPayload.js";
|
|
70
|
+
export * from "./utils/jsonLdUtils.js";
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
2
|
+
import type { IDataspaceProtocolAgreement } from "@twin.org/standards-dataspace-protocol";
|
|
3
|
+
/**
|
|
4
|
+
* Payload handed to pushDeliveryRunner via a Background Task.
|
|
5
|
+
* Contains everything the runner needs to POST one Activity Streams
|
|
6
|
+
* object to a consumer's /inbox without touching entity storage.
|
|
7
|
+
*/
|
|
8
|
+
export interface IPushDeliveryPayload {
|
|
9
|
+
/**
|
|
10
|
+
* The consumer process ID identifying the transfer.
|
|
11
|
+
*/
|
|
12
|
+
consumerPid: string;
|
|
13
|
+
/**
|
|
14
|
+
* The provider process ID identifying the transfer.
|
|
15
|
+
*/
|
|
16
|
+
providerPid: string;
|
|
17
|
+
/**
|
|
18
|
+
* PID to set as Activity.generator. Always equals providerPid since
|
|
19
|
+
* processOutboxActivity is only invoked for consumer-initiated push,
|
|
20
|
+
* where the provider is the data sender.
|
|
21
|
+
*/
|
|
22
|
+
generatorPid: string;
|
|
23
|
+
/**
|
|
24
|
+
* The consumer's inbox endpoint URL to POST the activity to.
|
|
25
|
+
*/
|
|
26
|
+
consumerEndpoint: string;
|
|
27
|
+
/**
|
|
28
|
+
* Optional Bearer token for authenticating the push request.
|
|
29
|
+
*/
|
|
30
|
+
consumerAuthToken?: string;
|
|
31
|
+
/**
|
|
32
|
+
* The ODRL agreement governing the data transfer.
|
|
33
|
+
*/
|
|
34
|
+
agreement: IDataspaceProtocolAgreement;
|
|
35
|
+
/**
|
|
36
|
+
* The JSON-LD data payload to deliver to the consumer.
|
|
37
|
+
*/
|
|
38
|
+
data: IJsonLdNodeObject;
|
|
39
|
+
/**
|
|
40
|
+
* The JSON-LD @type of the data entity being delivered.
|
|
41
|
+
*/
|
|
42
|
+
entityType: string;
|
|
43
|
+
/**
|
|
44
|
+
* The tenant that owns this push delivery, captured at schedule time from the active
|
|
45
|
+
* `ContextIdStore` context (typically from the subscription's `tenantId` field).
|
|
46
|
+
* The runner re-establishes this tenant context via `ContextIdStore.run` before invoking
|
|
47
|
+
* tenant-scoped operations (PEP, trust signing, vault lookups). Optional — single-tenant
|
|
48
|
+
* nodes operate without a tenant context.
|
|
49
|
+
*/
|
|
50
|
+
tenantId?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Timeout (ms) for the push delivery HTTP POST. Packaged at schedule time from service config.
|
|
53
|
+
* @default 30000
|
|
54
|
+
*/
|
|
55
|
+
pushTimeoutMs?: number;
|
|
56
|
+
/**
|
|
57
|
+
* Max HTTP retry attempts for this delivery. Packaged at schedule time from service config.
|
|
58
|
+
* @default 3
|
|
59
|
+
*/
|
|
60
|
+
pushRetryCount?: number;
|
|
61
|
+
/**
|
|
62
|
+
* Base retry delay (ms) for this delivery. Packaged at schedule time from service config.
|
|
63
|
+
* @default 1000
|
|
64
|
+
*/
|
|
65
|
+
pushRetryBaseDelayMs?: number;
|
|
66
|
+
}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import type { IActivityStreamsActivity } from "@twin.org/standards-w3c-activity-streams";
|
|
2
|
+
import type { HeaderTypes } from "@twin.org/web";
|
|
2
3
|
/**
|
|
3
4
|
* Activity Stream Notify Request.
|
|
4
5
|
*/
|
|
5
6
|
export interface IActivityStreamNotifyRequest {
|
|
7
|
+
/**
|
|
8
|
+
* The headers which can be used for authentication (e.g. Bearer token for cross-node push).
|
|
9
|
+
*/
|
|
10
|
+
headers?: {
|
|
11
|
+
[HeaderTypes.Authorization]?: string;
|
|
12
|
+
};
|
|
6
13
|
/**
|
|
7
14
|
* The Activity sent to the Stream.
|
|
8
15
|
*/
|
|
@@ -7,9 +7,9 @@ export interface IActivityStreamNotifyResponse {
|
|
|
7
7
|
/**
|
|
8
8
|
* The status code indicating the result of the notification processing. It can be either:
|
|
9
9
|
* - `201 Created` if the notification was processed inline and a new activity log entry was created.
|
|
10
|
-
* - `
|
|
10
|
+
* - `202 Accepted` if the notification was accepted for async processing but has not been completed yet.
|
|
11
11
|
*/
|
|
12
|
-
statusCode: typeof HttpStatusCode.created | typeof HttpStatusCode.
|
|
12
|
+
statusCode: typeof HttpStatusCode.created | typeof HttpStatusCode.accepted;
|
|
13
13
|
/**
|
|
14
14
|
* Optional headers.
|
|
15
15
|
*/
|
|
@@ -3,6 +3,8 @@ import type { IJsonLdDocument } from "@twin.org/data-json-ld";
|
|
|
3
3
|
import type { IDataspaceProtocolDataset } from "@twin.org/standards-dataspace-protocol";
|
|
4
4
|
import type { IActivityQuery } from "./IActivityQuery.js";
|
|
5
5
|
import type { IDataRequest } from "./IDataRequest.js";
|
|
6
|
+
import type { IFollowActivity } from "./IFollowActivity.js";
|
|
7
|
+
import type { IUndoActivity } from "./IUndoActivity.js";
|
|
6
8
|
import type { IDataspaceActivity } from "../IDataspaceActivity.js";
|
|
7
9
|
import type { IProcessingGroupOptions } from "./IProcessingGroupOptions.js";
|
|
8
10
|
/**
|
|
@@ -54,4 +56,17 @@ export interface IDataspaceApp extends IComponent {
|
|
|
54
56
|
data: IJsonLdDocument;
|
|
55
57
|
cursor?: string;
|
|
56
58
|
}>;
|
|
59
|
+
/**
|
|
60
|
+
* Subscribe the app to produce data for a follower. Called by the
|
|
61
|
+
* DS Connector after a push transfer enters STARTED state.
|
|
62
|
+
* @param followActivity The Follow activity describing the follower + filter.
|
|
63
|
+
* @returns Promise that resolves when the subscription is set up.
|
|
64
|
+
*/
|
|
65
|
+
subscribeToData?(followActivity: IFollowActivity): Promise<void>;
|
|
66
|
+
/**
|
|
67
|
+
* Undo a previous subscription. Called on transfer complete/terminate.
|
|
68
|
+
* @param undoActivity The Undo activity referencing the original Follow.
|
|
69
|
+
* @returns Promise that resolves when the subscription is torn down.
|
|
70
|
+
*/
|
|
71
|
+
unsubscribeToData?(undoActivity: IUndoActivity): Promise<void>;
|
|
57
72
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
2
|
+
import type { ActivityStreamsTypes, IActivityStreamsActivity } from "@twin.org/standards-w3c-activity-streams";
|
|
3
|
+
/**
|
|
4
|
+
* ActivityPub Follow activity used by the DS Connector to subscribe
|
|
5
|
+
* an app to a data source. The app treats this as "start producing
|
|
6
|
+
* data for this consumer."
|
|
7
|
+
*
|
|
8
|
+
* generator = consumerPid (URN) of the follower
|
|
9
|
+
* actor = DID of the follower's organization
|
|
10
|
+
* object = TransferProcess reference, optionally with a filter expressed as JSON-LD
|
|
11
|
+
*/
|
|
12
|
+
export interface IFollowActivity extends IActivityStreamsActivity {
|
|
13
|
+
/**
|
|
14
|
+
* The activity type, always "Follow".
|
|
15
|
+
*/
|
|
16
|
+
type: typeof ActivityStreamsTypes.Follow;
|
|
17
|
+
/**
|
|
18
|
+
* The consumerPid URN identifying the follower's transfer process.
|
|
19
|
+
*/
|
|
20
|
+
generator: string;
|
|
21
|
+
/**
|
|
22
|
+
* The DID of the follower's organization.
|
|
23
|
+
*/
|
|
24
|
+
actor: string;
|
|
25
|
+
/**
|
|
26
|
+
* The TransferProcess reference, optionally with a filter expressed as JSON-LD.
|
|
27
|
+
*/
|
|
28
|
+
object: string | IJsonLdNodeObject;
|
|
29
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ActivityStreamsTypes, IActivityStreamsActivity } from "@twin.org/standards-w3c-activity-streams";
|
|
2
|
+
/**
|
|
3
|
+
* ActivityPub Undo activity used by the DS Connector to unsubscribe
|
|
4
|
+
* an app from a data source. The object MUST reference the `@id` of
|
|
5
|
+
* a previously issued Follow activity.
|
|
6
|
+
*/
|
|
7
|
+
export interface IUndoActivity extends IActivityStreamsActivity {
|
|
8
|
+
/**
|
|
9
|
+
* The activity type, always "Undo".
|
|
10
|
+
*/
|
|
11
|
+
type: typeof ActivityStreamsTypes.Undo;
|
|
12
|
+
/**
|
|
13
|
+
* The consumerPid URN identifying the transfer process being unsubscribed.
|
|
14
|
+
*/
|
|
15
|
+
generator: string;
|
|
16
|
+
/**
|
|
17
|
+
* The DID of the unsubscribing organization.
|
|
18
|
+
*/
|
|
19
|
+
actor: string;
|
|
20
|
+
/**
|
|
21
|
+
* The `@id` of the Follow activity being undone.
|
|
22
|
+
*/
|
|
23
|
+
object: string;
|
|
24
|
+
}
|
|
@@ -43,9 +43,10 @@ export interface ITransferContext {
|
|
|
43
43
|
*/
|
|
44
44
|
providerIdentity?: string;
|
|
45
45
|
/**
|
|
46
|
-
* Data address for push
|
|
47
|
-
* Contains
|
|
48
|
-
*
|
|
46
|
+
* Data address for consumer-initiated push transfers (HttpProxy-PUSH).
|
|
47
|
+
* Contains the consumer's /inbox endpoint as supplied in the TransferRequestMessage.
|
|
48
|
+
* Absent for PULL (HttpProxy-PULL) and provider-initiated push (HttpProxy-POST),
|
|
49
|
+
* where the consumer deliberately omits a dataAddress.
|
|
49
50
|
*/
|
|
50
51
|
dataAddress?: IDataspaceProtocolDataAddress;
|
|
51
52
|
}
|
|
@@ -58,15 +58,22 @@ export interface ITransferProcess {
|
|
|
58
58
|
* URI where messages to the Consumer should be sent.
|
|
59
59
|
*/
|
|
60
60
|
callbackAddress?: string;
|
|
61
|
+
/**
|
|
62
|
+
* The tenant that owns this transfer process, captured at write time so async
|
|
63
|
+
* delivery tasks and delayed state transitions can re-enter the right tenant context.
|
|
64
|
+
* Optional — single-tenant nodes operate without a tenant context.
|
|
65
|
+
*/
|
|
66
|
+
tenantId?: string;
|
|
61
67
|
/**
|
|
62
68
|
* Data format from the Dataset Distribution.
|
|
63
69
|
* Specified by a Distribution for the Dataset associated with the Agreement.
|
|
64
70
|
*/
|
|
65
71
|
format?: string;
|
|
66
72
|
/**
|
|
67
|
-
* Data address for push
|
|
68
|
-
* Contains
|
|
69
|
-
*
|
|
73
|
+
* Data address for consumer-initiated push transfers (HttpProxy-PUSH).
|
|
74
|
+
* Contains the consumer's /inbox endpoint as supplied in the TransferRequestMessage.
|
|
75
|
+
* Absent for PULL (HttpProxy-PULL) and provider-initiated push (HttpProxy-POST),
|
|
76
|
+
* where the consumer deliberately omits a dataAddress.
|
|
70
77
|
*/
|
|
71
78
|
dataAddress?: IDataspaceProtocolDataAddress;
|
|
72
79
|
/**
|
|
@@ -14,9 +14,10 @@ export interface IDataspaceDataPlaneComponent extends IComponent {
|
|
|
14
14
|
/**
|
|
15
15
|
* Notify an Activity to the Dataspace Data Plane Activity Stream.
|
|
16
16
|
* @param activity The Activity notified.
|
|
17
|
+
* @param trustPayload Optional trust payload to verify the requester's identity.
|
|
17
18
|
* @returns The activity's entry.
|
|
18
19
|
*/
|
|
19
|
-
notifyActivity(activity: IActivityStreamsActivity): Promise<string | IActivityLogEntry>;
|
|
20
|
+
notifyActivity(activity: IActivityStreamsActivity, trustPayload?: unknown): Promise<string | IActivityLogEntry>;
|
|
20
21
|
/**
|
|
21
22
|
* Subscribes to the activity log.
|
|
22
23
|
* @param callback The callback to be called when Activity Log is called.
|
|
@@ -62,4 +63,42 @@ export interface IDataspaceDataPlaneComponent extends IComponent {
|
|
|
62
63
|
* @returns The item list and optional cursor for pagination via Link headers.
|
|
63
64
|
*/
|
|
64
65
|
queryDataAsset(consumerPid: string, query: IFilteringQuery, cursor?: string, limit?: number, trustPayload?: unknown): Promise<IDataAssetItemListResult>;
|
|
66
|
+
/**
|
|
67
|
+
* Set up a push subscription after a transfer enters STARTED from REQUESTED.
|
|
68
|
+
* Reads the TransferProcess, builds an IFollowActivity, calls the app's
|
|
69
|
+
* subscribeToData, and persists a PushSubscription entity.
|
|
70
|
+
* @param consumerPid The consumer process ID identifying the transfer.
|
|
71
|
+
* @returns Promise that resolves when the subscription is created.
|
|
72
|
+
*/
|
|
73
|
+
setupPushSubscription(consumerPid: string): Promise<void>;
|
|
74
|
+
/**
|
|
75
|
+
* Pause deliveries for a push subscription. The subscription entity stays
|
|
76
|
+
* alive with status=Paused. No app unsubscribe call.
|
|
77
|
+
* @param consumerPid The consumer process ID identifying the transfer.
|
|
78
|
+
* @returns Promise that resolves when the subscription is paused.
|
|
79
|
+
*/
|
|
80
|
+
suspendPushSubscription(consumerPid: string): Promise<void>;
|
|
81
|
+
/**
|
|
82
|
+
* Resume deliveries after a SUSPENDED → STARTED transition. Flips status
|
|
83
|
+
* back to Active. No app subscribeToData call.
|
|
84
|
+
* @param consumerPid The consumer process ID identifying the transfer.
|
|
85
|
+
* @returns Promise that resolves when the subscription is resumed.
|
|
86
|
+
*/
|
|
87
|
+
resumePushSubscription(consumerPid: string): Promise<void>;
|
|
88
|
+
/**
|
|
89
|
+
* Tear down a push subscription. Builds an IUndoActivity, calls the app's
|
|
90
|
+
* unsubscribeToData, and deletes the PushSubscription entity.
|
|
91
|
+
* @param consumerPid The consumer process ID identifying the transfer.
|
|
92
|
+
* @returns Promise that resolves when the subscription is torn down.
|
|
93
|
+
*/
|
|
94
|
+
teardownPushSubscription(consumerPid: string): Promise<void>;
|
|
95
|
+
/**
|
|
96
|
+
* Called by the app when new data is available for a follower.
|
|
97
|
+
* The activity's `to` attribute contains the consumerPid URN. This method
|
|
98
|
+
* looks up the matching PushSubscription, validates transfer state, and
|
|
99
|
+
* schedules a Background Task that POSTs the activity to the consumer.
|
|
100
|
+
* @param activity The outbound activity carrying the data payload.
|
|
101
|
+
* @returns Promise that resolves when the delivery task is scheduled.
|
|
102
|
+
*/
|
|
103
|
+
processOutboxActivity(activity: IActivityStreamsActivity): Promise<void>;
|
|
65
104
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get a JSON-LD id.
|
|
3
|
+
* @param object The object to get the id from.
|
|
4
|
+
* @returns The JSON-LD id.
|
|
5
|
+
*/
|
|
6
|
+
export declare function getJsonLdId(object: unknown): string | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* Get a JSON-LD type.
|
|
9
|
+
* @param object The object to get the type from.
|
|
10
|
+
* @returns The JSON-LD type.
|
|
11
|
+
*/
|
|
12
|
+
export declare function getJsonLdType(object: unknown): string | undefined;
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.3-next.30](https://github.com/iotaledger/twin-dataspace/compare/dataspace-models-v0.0.3-next.29...dataspace-models-v0.0.3-next.30) (2026-05-26)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* implement DSP push transfer mode ([#109](https://github.com/iotaledger/twin-dataspace/issues/109)) ([71f5fee](https://github.com/iotaledger/twin-dataspace/commit/71f5feec1d92dfec8ed6899c951809818e1bf2a3))
|
|
9
|
+
|
|
10
|
+
## [0.0.3-next.29](https://github.com/iotaledger/twin-dataspace/compare/dataspace-models-v0.0.3-next.28...dataspace-models-v0.0.3-next.29) (2026-05-20)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Miscellaneous Chores
|
|
14
|
+
|
|
15
|
+
* **dataspace-models:** Synchronize repo versions
|
|
16
|
+
|
|
3
17
|
## [0.0.3-next.28](https://github.com/iotaledger/twin-dataspace/compare/dataspace-models-v0.0.3-next.27...dataspace-models-v0.0.3-next.28) (2026-05-12)
|
|
4
18
|
|
|
5
19
|
|
|
@@ -106,6 +106,17 @@ Callback address for Consumer notifications.
|
|
|
106
106
|
|
|
107
107
|
***
|
|
108
108
|
|
|
109
|
+
### tenantId? {#tenantid}
|
|
110
|
+
|
|
111
|
+
> `optional` **tenantId?**: `string`
|
|
112
|
+
|
|
113
|
+
The tenant that owns this transfer process, captured from the request context
|
|
114
|
+
at write time. Optional — single-tenant nodes (no `TWIN_TENANT_ENABLED`) register
|
|
115
|
+
transfers without a tenant context. Persisted so async push delivery tasks and
|
|
116
|
+
setTimeout-delayed state transitions can re-enter the right tenant context.
|
|
117
|
+
|
|
118
|
+
***
|
|
119
|
+
|
|
109
120
|
### dateCreated {#datecreated}
|
|
110
121
|
|
|
111
122
|
> **dateCreated**: `string`
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Function: getJsonLdId()
|
|
2
|
+
|
|
3
|
+
> **getJsonLdId**(`object`): `string` \| `undefined`
|
|
4
|
+
|
|
5
|
+
Get a JSON-LD id.
|
|
6
|
+
|
|
7
|
+
## Parameters
|
|
8
|
+
|
|
9
|
+
### object
|
|
10
|
+
|
|
11
|
+
`unknown`
|
|
12
|
+
|
|
13
|
+
The object to get the id from.
|
|
14
|
+
|
|
15
|
+
## Returns
|
|
16
|
+
|
|
17
|
+
`string` \| `undefined`
|
|
18
|
+
|
|
19
|
+
The JSON-LD id.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Function: getJsonLdType()
|
|
2
|
+
|
|
3
|
+
> **getJsonLdType**(`object`): `string` \| `undefined`
|
|
4
|
+
|
|
5
|
+
Get a JSON-LD type.
|
|
6
|
+
|
|
7
|
+
## Parameters
|
|
8
|
+
|
|
9
|
+
### object
|
|
10
|
+
|
|
11
|
+
`unknown`
|
|
12
|
+
|
|
13
|
+
The object to get the type from.
|
|
14
|
+
|
|
15
|
+
## Returns
|
|
16
|
+
|
|
17
|
+
`string` \| `undefined`
|
|
18
|
+
|
|
19
|
+
The JSON-LD type.
|
package/docs/reference/index.md
CHANGED
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
- [IEntitySet](interfaces/IEntitySet.md)
|
|
20
20
|
- [IExecutionPayload](interfaces/IExecutionPayload.md)
|
|
21
21
|
- [IFilteringQuery](interfaces/IFilteringQuery.md)
|
|
22
|
+
- [IPushDeliveryPayload](interfaces/IPushDeliveryPayload.md)
|
|
22
23
|
- [IActivityLogEntryGetRequest](interfaces/IActivityLogEntryGetRequest.md)
|
|
23
24
|
- [IActivityLogEntryGetResponse](interfaces/IActivityLogEntryGetResponse.md)
|
|
24
25
|
- [IActivityLogStatusNotificationPayload](interfaces/IActivityLogStatusNotificationPayload.md)
|
|
@@ -52,8 +53,10 @@
|
|
|
52
53
|
- [IDataAssetEntitiesRequest](interfaces/IDataAssetEntitiesRequest.md)
|
|
53
54
|
- [IDataAssetQuery](interfaces/IDataAssetQuery.md)
|
|
54
55
|
- [IDataspaceApp](interfaces/IDataspaceApp.md)
|
|
56
|
+
- [IFollowActivity](interfaces/IFollowActivity.md)
|
|
55
57
|
- [IProcessingGroupOptions](interfaces/IProcessingGroupOptions.md)
|
|
56
58
|
- [IQueryDataAssetRequest](interfaces/IQueryDataAssetRequest.md)
|
|
59
|
+
- [IUndoActivity](interfaces/IUndoActivity.md)
|
|
57
60
|
- [IDataspaceAppDataset](interfaces/IDataspaceAppDataset.md)
|
|
58
61
|
- [IDataspaceControlPlaneComponent](interfaces/IDataspaceControlPlaneComponent.md)
|
|
59
62
|
- [IDataspaceControlPlaneResolverComponent](interfaces/IDataspaceControlPlaneResolverComponent.md)
|
|
@@ -84,3 +87,8 @@
|
|
|
84
87
|
- [DataspaceContexts](variables/DataspaceContexts.md)
|
|
85
88
|
- [DataspaceTransferFormat](variables/DataspaceTransferFormat.md)
|
|
86
89
|
- [DataspaceTypes](variables/DataspaceTypes.md)
|
|
90
|
+
|
|
91
|
+
## Functions
|
|
92
|
+
|
|
93
|
+
- [getJsonLdId](functions/getJsonLdId.md)
|
|
94
|
+
- [getJsonLdType](functions/getJsonLdType.md)
|
|
@@ -4,6 +4,18 @@ Activity Stream Notify Request.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
+
### headers? {#headers}
|
|
8
|
+
|
|
9
|
+
> `optional` **headers?**: `object`
|
|
10
|
+
|
|
11
|
+
The headers which can be used for authentication (e.g. Bearer token for cross-node push).
|
|
12
|
+
|
|
13
|
+
#### authorization?
|
|
14
|
+
|
|
15
|
+
> `optional` **authorization?**: `string`
|
|
16
|
+
|
|
17
|
+
***
|
|
18
|
+
|
|
7
19
|
### body {#body}
|
|
8
20
|
|
|
9
21
|
> **body**: `IActivityStreamsActivity`
|
|
@@ -6,11 +6,11 @@ Activity Stream Notify Response.
|
|
|
6
6
|
|
|
7
7
|
### statusCode {#statuscode}
|
|
8
8
|
|
|
9
|
-
> **statusCode**: `
|
|
9
|
+
> **statusCode**: `201` \| `202`
|
|
10
10
|
|
|
11
11
|
The status code indicating the result of the notification processing. It can be either:
|
|
12
12
|
- `201 Created` if the notification was processed inline and a new activity log entry was created.
|
|
13
|
-
- `
|
|
13
|
+
- `202 Accepted` if the notification was accepted for async processing but has not been completed yet.
|
|
14
14
|
|
|
15
15
|
***
|
|
16
16
|
|
|
@@ -141,3 +141,48 @@ Maximum number of entries retrieved or to be retrieved.
|
|
|
141
141
|
`Promise`\<\{ `data`: `IJsonLdDocument`; `cursor?`: `string`; \}\>
|
|
142
142
|
|
|
143
143
|
Data as JSON-Ld.
|
|
144
|
+
|
|
145
|
+
***
|
|
146
|
+
|
|
147
|
+
### subscribeToData()? {#subscribetodata}
|
|
148
|
+
|
|
149
|
+
> `optional` **subscribeToData**(`followActivity`): `Promise`\<`void`\>
|
|
150
|
+
|
|
151
|
+
Subscribe the app to produce data for a follower. Called by the
|
|
152
|
+
DS Connector after a push transfer enters STARTED state.
|
|
153
|
+
|
|
154
|
+
#### Parameters
|
|
155
|
+
|
|
156
|
+
##### followActivity
|
|
157
|
+
|
|
158
|
+
[`IFollowActivity`](IFollowActivity.md)
|
|
159
|
+
|
|
160
|
+
The Follow activity describing the follower + filter.
|
|
161
|
+
|
|
162
|
+
#### Returns
|
|
163
|
+
|
|
164
|
+
`Promise`\<`void`\>
|
|
165
|
+
|
|
166
|
+
Promise that resolves when the subscription is set up.
|
|
167
|
+
|
|
168
|
+
***
|
|
169
|
+
|
|
170
|
+
### unsubscribeToData()? {#unsubscribetodata}
|
|
171
|
+
|
|
172
|
+
> `optional` **unsubscribeToData**(`undoActivity`): `Promise`\<`void`\>
|
|
173
|
+
|
|
174
|
+
Undo a previous subscription. Called on transfer complete/terminate.
|
|
175
|
+
|
|
176
|
+
#### Parameters
|
|
177
|
+
|
|
178
|
+
##### undoActivity
|
|
179
|
+
|
|
180
|
+
[`IUndoActivity`](IUndoActivity.md)
|
|
181
|
+
|
|
182
|
+
The Undo activity referencing the original Follow.
|
|
183
|
+
|
|
184
|
+
#### Returns
|
|
185
|
+
|
|
186
|
+
`Promise`\<`void`\>
|
|
187
|
+
|
|
188
|
+
Promise that resolves when the subscription is torn down.
|
|
@@ -11,7 +11,7 @@ Implements the Data Plane functionality for the Eclipse Dataspace Protocol.
|
|
|
11
11
|
|
|
12
12
|
### notifyActivity() {#notifyactivity}
|
|
13
13
|
|
|
14
|
-
> **notifyActivity**(`activity`): `Promise`\<`string` \| [`IActivityLogEntry`](IActivityLogEntry.md)\>
|
|
14
|
+
> **notifyActivity**(`activity`, `trustPayload?`): `Promise`\<`string` \| [`IActivityLogEntry`](IActivityLogEntry.md)\>
|
|
15
15
|
|
|
16
16
|
Notify an Activity to the Dataspace Data Plane Activity Stream.
|
|
17
17
|
|
|
@@ -23,6 +23,12 @@ Notify an Activity to the Dataspace Data Plane Activity Stream.
|
|
|
23
23
|
|
|
24
24
|
The Activity notified.
|
|
25
25
|
|
|
26
|
+
##### trustPayload?
|
|
27
|
+
|
|
28
|
+
`unknown`
|
|
29
|
+
|
|
30
|
+
Optional trust payload to verify the requester's identity.
|
|
31
|
+
|
|
26
32
|
#### Returns
|
|
27
33
|
|
|
28
34
|
`Promise`\<`string` \| [`IActivityLogEntry`](IActivityLogEntry.md)\>
|
|
@@ -198,3 +204,121 @@ Trust payload to verify the requesters identity.
|
|
|
198
204
|
`Promise`\<[`IDataAssetItemListResult`](IDataAssetItemListResult.md)\>
|
|
199
205
|
|
|
200
206
|
The item list and optional cursor for pagination via Link headers.
|
|
207
|
+
|
|
208
|
+
***
|
|
209
|
+
|
|
210
|
+
### setupPushSubscription() {#setuppushsubscription}
|
|
211
|
+
|
|
212
|
+
> **setupPushSubscription**(`consumerPid`): `Promise`\<`void`\>
|
|
213
|
+
|
|
214
|
+
Set up a push subscription after a transfer enters STARTED from REQUESTED.
|
|
215
|
+
Reads the TransferProcess, builds an IFollowActivity, calls the app's
|
|
216
|
+
subscribeToData, and persists a PushSubscription entity.
|
|
217
|
+
|
|
218
|
+
#### Parameters
|
|
219
|
+
|
|
220
|
+
##### consumerPid
|
|
221
|
+
|
|
222
|
+
`string`
|
|
223
|
+
|
|
224
|
+
The consumer process ID identifying the transfer.
|
|
225
|
+
|
|
226
|
+
#### Returns
|
|
227
|
+
|
|
228
|
+
`Promise`\<`void`\>
|
|
229
|
+
|
|
230
|
+
Promise that resolves when the subscription is created.
|
|
231
|
+
|
|
232
|
+
***
|
|
233
|
+
|
|
234
|
+
### suspendPushSubscription() {#suspendpushsubscription}
|
|
235
|
+
|
|
236
|
+
> **suspendPushSubscription**(`consumerPid`): `Promise`\<`void`\>
|
|
237
|
+
|
|
238
|
+
Pause deliveries for a push subscription. The subscription entity stays
|
|
239
|
+
alive with status=Paused. No app unsubscribe call.
|
|
240
|
+
|
|
241
|
+
#### Parameters
|
|
242
|
+
|
|
243
|
+
##### consumerPid
|
|
244
|
+
|
|
245
|
+
`string`
|
|
246
|
+
|
|
247
|
+
The consumer process ID identifying the transfer.
|
|
248
|
+
|
|
249
|
+
#### Returns
|
|
250
|
+
|
|
251
|
+
`Promise`\<`void`\>
|
|
252
|
+
|
|
253
|
+
Promise that resolves when the subscription is paused.
|
|
254
|
+
|
|
255
|
+
***
|
|
256
|
+
|
|
257
|
+
### resumePushSubscription() {#resumepushsubscription}
|
|
258
|
+
|
|
259
|
+
> **resumePushSubscription**(`consumerPid`): `Promise`\<`void`\>
|
|
260
|
+
|
|
261
|
+
Resume deliveries after a SUSPENDED → STARTED transition. Flips status
|
|
262
|
+
back to Active. No app subscribeToData call.
|
|
263
|
+
|
|
264
|
+
#### Parameters
|
|
265
|
+
|
|
266
|
+
##### consumerPid
|
|
267
|
+
|
|
268
|
+
`string`
|
|
269
|
+
|
|
270
|
+
The consumer process ID identifying the transfer.
|
|
271
|
+
|
|
272
|
+
#### Returns
|
|
273
|
+
|
|
274
|
+
`Promise`\<`void`\>
|
|
275
|
+
|
|
276
|
+
Promise that resolves when the subscription is resumed.
|
|
277
|
+
|
|
278
|
+
***
|
|
279
|
+
|
|
280
|
+
### teardownPushSubscription() {#teardownpushsubscription}
|
|
281
|
+
|
|
282
|
+
> **teardownPushSubscription**(`consumerPid`): `Promise`\<`void`\>
|
|
283
|
+
|
|
284
|
+
Tear down a push subscription. Builds an IUndoActivity, calls the app's
|
|
285
|
+
unsubscribeToData, and deletes the PushSubscription entity.
|
|
286
|
+
|
|
287
|
+
#### Parameters
|
|
288
|
+
|
|
289
|
+
##### consumerPid
|
|
290
|
+
|
|
291
|
+
`string`
|
|
292
|
+
|
|
293
|
+
The consumer process ID identifying the transfer.
|
|
294
|
+
|
|
295
|
+
#### Returns
|
|
296
|
+
|
|
297
|
+
`Promise`\<`void`\>
|
|
298
|
+
|
|
299
|
+
Promise that resolves when the subscription is torn down.
|
|
300
|
+
|
|
301
|
+
***
|
|
302
|
+
|
|
303
|
+
### processOutboxActivity() {#processoutboxactivity}
|
|
304
|
+
|
|
305
|
+
> **processOutboxActivity**(`activity`): `Promise`\<`void`\>
|
|
306
|
+
|
|
307
|
+
Called by the app when new data is available for a follower.
|
|
308
|
+
The activity's `to` attribute contains the consumerPid URN. This method
|
|
309
|
+
looks up the matching PushSubscription, validates transfer state, and
|
|
310
|
+
schedules a Background Task that POSTs the activity to the consumer.
|
|
311
|
+
|
|
312
|
+
#### Parameters
|
|
313
|
+
|
|
314
|
+
##### activity
|
|
315
|
+
|
|
316
|
+
`IActivityStreamsActivity`
|
|
317
|
+
|
|
318
|
+
The outbound activity carrying the data payload.
|
|
319
|
+
|
|
320
|
+
#### Returns
|
|
321
|
+
|
|
322
|
+
`Promise`\<`void`\>
|
|
323
|
+
|
|
324
|
+
Promise that resolves when the delivery task is scheduled.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Interface: IFollowActivity
|
|
2
|
+
|
|
3
|
+
ActivityPub Follow activity used by the DS Connector to subscribe
|
|
4
|
+
an app to a data source. The app treats this as "start producing
|
|
5
|
+
data for this consumer."
|
|
6
|
+
|
|
7
|
+
generator = consumerPid (URN) of the follower
|
|
8
|
+
actor = DID of the follower's organization
|
|
9
|
+
object = TransferProcess reference, optionally with a filter expressed as JSON-LD
|
|
10
|
+
|
|
11
|
+
## Extends
|
|
12
|
+
|
|
13
|
+
- `IActivityStreamsActivity`
|
|
14
|
+
|
|
15
|
+
## Properties
|
|
16
|
+
|
|
17
|
+
### type {#type}
|
|
18
|
+
|
|
19
|
+
> **type**: `"Follow"`
|
|
20
|
+
|
|
21
|
+
The activity type, always "Follow".
|
|
22
|
+
|
|
23
|
+
#### Overrides
|
|
24
|
+
|
|
25
|
+
`IActivityStreamsActivity.type`
|
|
26
|
+
|
|
27
|
+
***
|
|
28
|
+
|
|
29
|
+
### generator {#generator}
|
|
30
|
+
|
|
31
|
+
> **generator**: `string`
|
|
32
|
+
|
|
33
|
+
The consumerPid URN identifying the follower's transfer process.
|
|
34
|
+
|
|
35
|
+
#### Overrides
|
|
36
|
+
|
|
37
|
+
`IActivityStreamsActivity.generator`
|
|
38
|
+
|
|
39
|
+
***
|
|
40
|
+
|
|
41
|
+
### actor {#actor}
|
|
42
|
+
|
|
43
|
+
> **actor**: `string`
|
|
44
|
+
|
|
45
|
+
The DID of the follower's organization.
|
|
46
|
+
|
|
47
|
+
#### Overrides
|
|
48
|
+
|
|
49
|
+
`IActivityStreamsActivity.actor`
|
|
50
|
+
|
|
51
|
+
***
|
|
52
|
+
|
|
53
|
+
### object {#object}
|
|
54
|
+
|
|
55
|
+
> **object**: `string` \| `IJsonLdNodeObject`
|
|
56
|
+
|
|
57
|
+
The TransferProcess reference, optionally with a filter expressed as JSON-LD.
|
|
58
|
+
|
|
59
|
+
#### Overrides
|
|
60
|
+
|
|
61
|
+
`IActivityStreamsActivity.object`
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# Interface: IPushDeliveryPayload
|
|
2
|
+
|
|
3
|
+
Payload handed to pushDeliveryRunner via a Background Task.
|
|
4
|
+
Contains everything the runner needs to POST one Activity Streams
|
|
5
|
+
object to a consumer's /inbox without touching entity storage.
|
|
6
|
+
|
|
7
|
+
## Properties
|
|
8
|
+
|
|
9
|
+
### consumerPid {#consumerpid}
|
|
10
|
+
|
|
11
|
+
> **consumerPid**: `string`
|
|
12
|
+
|
|
13
|
+
The consumer process ID identifying the transfer.
|
|
14
|
+
|
|
15
|
+
***
|
|
16
|
+
|
|
17
|
+
### providerPid {#providerpid}
|
|
18
|
+
|
|
19
|
+
> **providerPid**: `string`
|
|
20
|
+
|
|
21
|
+
The provider process ID identifying the transfer.
|
|
22
|
+
|
|
23
|
+
***
|
|
24
|
+
|
|
25
|
+
### generatorPid {#generatorpid}
|
|
26
|
+
|
|
27
|
+
> **generatorPid**: `string`
|
|
28
|
+
|
|
29
|
+
PID to set as Activity.generator. Always equals providerPid since
|
|
30
|
+
processOutboxActivity is only invoked for consumer-initiated push,
|
|
31
|
+
where the provider is the data sender.
|
|
32
|
+
|
|
33
|
+
***
|
|
34
|
+
|
|
35
|
+
### consumerEndpoint {#consumerendpoint}
|
|
36
|
+
|
|
37
|
+
> **consumerEndpoint**: `string`
|
|
38
|
+
|
|
39
|
+
The consumer's inbox endpoint URL to POST the activity to.
|
|
40
|
+
|
|
41
|
+
***
|
|
42
|
+
|
|
43
|
+
### consumerAuthToken? {#consumerauthtoken}
|
|
44
|
+
|
|
45
|
+
> `optional` **consumerAuthToken?**: `string`
|
|
46
|
+
|
|
47
|
+
Optional Bearer token for authenticating the push request.
|
|
48
|
+
|
|
49
|
+
***
|
|
50
|
+
|
|
51
|
+
### agreement {#agreement}
|
|
52
|
+
|
|
53
|
+
> **agreement**: `IDataspaceProtocolAgreement`
|
|
54
|
+
|
|
55
|
+
The ODRL agreement governing the data transfer.
|
|
56
|
+
|
|
57
|
+
***
|
|
58
|
+
|
|
59
|
+
### data {#data}
|
|
60
|
+
|
|
61
|
+
> **data**: `IJsonLdNodeObject`
|
|
62
|
+
|
|
63
|
+
The JSON-LD data payload to deliver to the consumer.
|
|
64
|
+
|
|
65
|
+
***
|
|
66
|
+
|
|
67
|
+
### entityType {#entitytype}
|
|
68
|
+
|
|
69
|
+
> **entityType**: `string`
|
|
70
|
+
|
|
71
|
+
The JSON-LD
|
|
72
|
+
|
|
73
|
+
***
|
|
74
|
+
|
|
75
|
+
### tenantId? {#tenantid}
|
|
76
|
+
|
|
77
|
+
> `optional` **tenantId?**: `string`
|
|
78
|
+
|
|
79
|
+
The tenant that owns this push delivery, captured at schedule time from the active
|
|
80
|
+
`ContextIdStore` context (typically from the subscription's `tenantId` field).
|
|
81
|
+
The runner re-establishes this tenant context via `ContextIdStore.run` before invoking
|
|
82
|
+
tenant-scoped operations (PEP, trust signing, vault lookups). Optional — single-tenant
|
|
83
|
+
nodes operate without a tenant context.
|
|
84
|
+
|
|
85
|
+
***
|
|
86
|
+
|
|
87
|
+
### pushTimeoutMs? {#pushtimeoutms}
|
|
88
|
+
|
|
89
|
+
> `optional` **pushTimeoutMs?**: `number`
|
|
90
|
+
|
|
91
|
+
Timeout (ms) for the push delivery HTTP POST. Packaged at schedule time from service config.
|
|
92
|
+
|
|
93
|
+
#### Default
|
|
94
|
+
|
|
95
|
+
```ts
|
|
96
|
+
30000
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
***
|
|
100
|
+
|
|
101
|
+
### pushRetryCount? {#pushretrycount}
|
|
102
|
+
|
|
103
|
+
> `optional` **pushRetryCount?**: `number`
|
|
104
|
+
|
|
105
|
+
Max HTTP retry attempts for this delivery. Packaged at schedule time from service config.
|
|
106
|
+
|
|
107
|
+
#### Default
|
|
108
|
+
|
|
109
|
+
```ts
|
|
110
|
+
3
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
***
|
|
114
|
+
|
|
115
|
+
### pushRetryBaseDelayMs? {#pushretrybasedelayms}
|
|
116
|
+
|
|
117
|
+
> `optional` **pushRetryBaseDelayMs?**: `number`
|
|
118
|
+
|
|
119
|
+
Base retry delay (ms) for this delivery. Packaged at schedule time from service config.
|
|
120
|
+
|
|
121
|
+
#### Default
|
|
122
|
+
|
|
123
|
+
```ts
|
|
124
|
+
1000
|
|
125
|
+
```
|
|
@@ -79,6 +79,7 @@ Extracted from Agreement's assigner field.
|
|
|
79
79
|
|
|
80
80
|
> `optional` **dataAddress?**: `IDataspaceProtocolDataAddress`
|
|
81
81
|
|
|
82
|
-
Data address for push
|
|
83
|
-
Contains
|
|
84
|
-
|
|
82
|
+
Data address for consumer-initiated push transfers (HttpProxy-PUSH).
|
|
83
|
+
Contains the consumer's /inbox endpoint as supplied in the TransferRequestMessage.
|
|
84
|
+
Absent for PULL (HttpProxy-PULL) and provider-initiated push (HttpProxy-POST),
|
|
85
|
+
where the consumer deliberately omits a dataAddress.
|
|
@@ -103,6 +103,16 @@ URI where messages to the Consumer should be sent.
|
|
|
103
103
|
|
|
104
104
|
***
|
|
105
105
|
|
|
106
|
+
### tenantId? {#tenantid}
|
|
107
|
+
|
|
108
|
+
> `optional` **tenantId?**: `string`
|
|
109
|
+
|
|
110
|
+
The tenant that owns this transfer process, captured at write time so async
|
|
111
|
+
delivery tasks and delayed state transitions can re-enter the right tenant context.
|
|
112
|
+
Optional — single-tenant nodes operate without a tenant context.
|
|
113
|
+
|
|
114
|
+
***
|
|
115
|
+
|
|
106
116
|
### format? {#format}
|
|
107
117
|
|
|
108
118
|
> `optional` **format?**: `string`
|
|
@@ -116,9 +126,10 @@ Specified by a Distribution for the Dataset associated with the Agreement.
|
|
|
116
126
|
|
|
117
127
|
> `optional` **dataAddress?**: `IDataspaceProtocolDataAddress`
|
|
118
128
|
|
|
119
|
-
Data address for push
|
|
120
|
-
Contains
|
|
121
|
-
|
|
129
|
+
Data address for consumer-initiated push transfers (HttpProxy-PUSH).
|
|
130
|
+
Contains the consumer's /inbox endpoint as supplied in the TransferRequestMessage.
|
|
131
|
+
Absent for PULL (HttpProxy-PULL) and provider-initiated push (HttpProxy-POST),
|
|
132
|
+
where the consumer deliberately omits a dataAddress.
|
|
122
133
|
|
|
123
134
|
***
|
|
124
135
|
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Interface: IUndoActivity
|
|
2
|
+
|
|
3
|
+
ActivityPub Undo activity used by the DS Connector to unsubscribe
|
|
4
|
+
an app from a data source. The object MUST reference the `@id` of
|
|
5
|
+
a previously issued Follow activity.
|
|
6
|
+
|
|
7
|
+
## Extends
|
|
8
|
+
|
|
9
|
+
- `IActivityStreamsActivity`
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
### type {#type}
|
|
14
|
+
|
|
15
|
+
> **type**: `"Undo"`
|
|
16
|
+
|
|
17
|
+
The activity type, always "Undo".
|
|
18
|
+
|
|
19
|
+
#### Overrides
|
|
20
|
+
|
|
21
|
+
`IActivityStreamsActivity.type`
|
|
22
|
+
|
|
23
|
+
***
|
|
24
|
+
|
|
25
|
+
### generator {#generator}
|
|
26
|
+
|
|
27
|
+
> **generator**: `string`
|
|
28
|
+
|
|
29
|
+
The consumerPid URN identifying the transfer process being unsubscribed.
|
|
30
|
+
|
|
31
|
+
#### Overrides
|
|
32
|
+
|
|
33
|
+
`IActivityStreamsActivity.generator`
|
|
34
|
+
|
|
35
|
+
***
|
|
36
|
+
|
|
37
|
+
### actor {#actor}
|
|
38
|
+
|
|
39
|
+
> **actor**: `string`
|
|
40
|
+
|
|
41
|
+
The DID of the unsubscribing organization.
|
|
42
|
+
|
|
43
|
+
#### Overrides
|
|
44
|
+
|
|
45
|
+
`IActivityStreamsActivity.actor`
|
|
46
|
+
|
|
47
|
+
***
|
|
48
|
+
|
|
49
|
+
### object {#object}
|
|
50
|
+
|
|
51
|
+
> **object**: `string`
|
|
52
|
+
|
|
53
|
+
The `@id` of the Follow activity being undone.
|
|
54
|
+
|
|
55
|
+
#### Overrides
|
|
56
|
+
|
|
57
|
+
`IActivityStreamsActivity.object`
|
package/package.json
CHANGED