@twin.org/dataspace-models 0.0.3-next.31 → 0.0.3-next.33
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/index.js +1 -0
- package/dist/es/index.js.map +1 -1
- package/dist/es/models/api/IActivityLogEntryWithError.js +2 -0
- package/dist/es/models/api/IActivityLogEntryWithError.js.map +1 -0
- package/dist/es/models/api/IActivityStreamNotifyResponse.js.map +1 -1
- package/dist/es/models/controlPlane/INegotiationCallback.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/models/api/IActivityLogEntryWithError.d.ts +13 -0
- package/dist/types/models/api/IActivityStreamNotifyResponse.d.ts +6 -3
- package/dist/types/models/controlPlane/INegotiationCallback.d.ts +2 -2
- package/docs/changelog.md +19 -0
- package/docs/reference/index.md +1 -0
- package/docs/reference/interfaces/IActivityLogEntry.md +4 -0
- package/docs/reference/interfaces/IActivityLogEntryWithError.md +101 -0
- package/docs/reference/interfaces/IActivityStreamNotifyResponse.md +5 -2
- package/docs/reference/interfaces/INegotiationCallback.md +3 -3
- package/package.json +3 -3
package/dist/es/index.js
CHANGED
|
@@ -31,6 +31,7 @@ export * from "./models/api/IActivityLogEntryGetRequest.js";
|
|
|
31
31
|
export * from "./models/api/IActivityLogEntryGetResponse.js";
|
|
32
32
|
export * from "./models/api/IActivityLogStatusNotificationPayload.js";
|
|
33
33
|
export * from "./models/api/IActivityLogStatusRequest.js";
|
|
34
|
+
export * from "./models/api/IActivityLogEntryWithError.js";
|
|
34
35
|
export * from "./models/api/IActivityStreamNotifyRequest.js";
|
|
35
36
|
export * from "./models/api/IActivityStreamNotifyResponse.js";
|
|
36
37
|
export * from "./models/api/IDataAssetEntitiesResponse.js";
|
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;AAE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A0D,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"]}
|
|
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,+CA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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/IActivityLogEntryWithError.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":"IActivityLogEntryWithError.js","sourceRoot":"","sources":["../../../../src/models/api/IActivityLogEntryWithError.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IError } from \"@twin.org/core\";\nimport type { IActivityLogEntry } from \"../IActivityLogEntry.js\";\n\n/**\n * Activity log entry extended with a top-level RFC 9457 error field.\n * Returned as the response body for 422/500 inline-processing failures.\n */\nexport interface IActivityLogEntryWithError extends IActivityLogEntry {\n\t/**\n\t * Top-level RFC 9457-formatted error describing the processing failure.\n\t * Present only for 422 and 500 responses.\n\t */\n\terror?: IError;\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 {
|
|
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 { IActivityLogEntryWithError } from \"./IActivityLogEntryWithError.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 * - `422 Unprocessable Entity` if inline processing failed due to a semantic problem in the Activity.\n\t * - `500 Internal Server Error` if inline processing failed due to a server-side processing error.\n\t */\n\tstatusCode:\n\t\t| typeof HttpStatusCode.created\n\t\t| typeof HttpStatusCode.accepted\n\t\t| typeof HttpStatusCode.unprocessableEntity\n\t\t| typeof HttpStatusCode.internalServerError;\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 * For 422/500 responses, also includes a top-level `error` field per IETF RFC 9457.\n\t */\n\tbody?: IActivityLogEntryWithError;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"INegotiationCallback.js","sourceRoot":"","sources":["../../../../src/models/controlPlane/INegotiationCallback.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type {\n\tDataspaceProtocolContractNegotiationStateType,\n\tIDataspaceProtocolAgreement,\n\tIDataspaceProtocolOffer\n} from \"@twin.org/standards-dataspace-protocol\";\n\n/**\n * Callback interface for negotiation state change notifications.\n * Upstream modules register an implementation of this interface\n * via IDataspaceControlPlaneComponent.registerNegotiationCallback()\n * to be notified when PNP callbacks fire.\n */\nexport interface INegotiationCallback {\n\t/**\n\t * Called when the negotiation state changes (offer received, agreement received).\n\t * @param negotiationId The negotiation ID.\n\t * @param state The new state.\n\t * @param data Optional data associated with the state change.\n\t * @param data.offer The offer received from the provider.\n\t * @param data.agreement The agreement received from the provider.\n\t * @returns Nothing.\n\t */\n\tonStateChanged(\n\t\tnegotiationId: string,\n\t\tstate: DataspaceProtocolContractNegotiationStateType,\n\t\tdata?: { offer?: IDataspaceProtocolOffer; agreement?: IDataspaceProtocolAgreement }\n\t): Promise<void>;\n\n\t/**\n\t * Called when the negotiation
|
|
1
|
+
{"version":3,"file":"INegotiationCallback.js","sourceRoot":"","sources":["../../../../src/models/controlPlane/INegotiationCallback.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type {\n\tDataspaceProtocolContractNegotiationStateType,\n\tIDataspaceProtocolAgreement,\n\tIDataspaceProtocolOffer\n} from \"@twin.org/standards-dataspace-protocol\";\n\n/**\n * Callback interface for negotiation state change notifications.\n * Upstream modules register an implementation of this interface\n * via IDataspaceControlPlaneComponent.registerNegotiationCallback()\n * to be notified when PNP callbacks fire.\n */\nexport interface INegotiationCallback {\n\t/**\n\t * Called when the negotiation state changes (offer received, agreement received).\n\t * @param negotiationId The negotiation ID.\n\t * @param state The new state.\n\t * @param data Optional data associated with the state change.\n\t * @param data.offer The offer received from the provider.\n\t * @param data.agreement The agreement received from the provider.\n\t * @returns Nothing.\n\t */\n\tonStateChanged(\n\t\tnegotiationId: string,\n\t\tstate: DataspaceProtocolContractNegotiationStateType,\n\t\tdata?: { offer?: IDataspaceProtocolOffer; agreement?: IDataspaceProtocolAgreement }\n\t): Promise<void>;\n\n\t/**\n\t * Called when the negotiation finalizes.\n\t * @param negotiationId The negotiation ID.\n\t * @param agreementId The agreement ID (from agreement.uid).\n\t * @returns Nothing.\n\t */\n\tonFinalized(negotiationId: string, agreementId: string): Promise<void>;\n\n\t/**\n\t * Called when the negotiation fails (terminated or stalled).\n\t * @param negotiationId The negotiation ID.\n\t * @param reason The failure reason.\n\t * @returns Nothing.\n\t */\n\tonFailed(negotiationId: string, reason: string): Promise<void>;\n}\n"]}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ export * from "./models/api/IActivityLogEntryGetRequest.js";
|
|
|
24
24
|
export * from "./models/api/IActivityLogEntryGetResponse.js";
|
|
25
25
|
export * from "./models/api/IActivityLogStatusNotificationPayload.js";
|
|
26
26
|
export * from "./models/api/IActivityLogStatusRequest.js";
|
|
27
|
+
export * from "./models/api/IActivityLogEntryWithError.js";
|
|
27
28
|
export * from "./models/api/IActivityStreamNotifyRequest.js";
|
|
28
29
|
export * from "./models/api/IActivityStreamNotifyResponse.js";
|
|
29
30
|
export * from "./models/api/IDataAssetEntitiesResponse.js";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { IError } from "@twin.org/core";
|
|
2
|
+
import type { IActivityLogEntry } from "../IActivityLogEntry.js";
|
|
3
|
+
/**
|
|
4
|
+
* Activity log entry extended with a top-level RFC 9457 error field.
|
|
5
|
+
* Returned as the response body for 422/500 inline-processing failures.
|
|
6
|
+
*/
|
|
7
|
+
export interface IActivityLogEntryWithError extends IActivityLogEntry {
|
|
8
|
+
/**
|
|
9
|
+
* Top-level RFC 9457-formatted error describing the processing failure.
|
|
10
|
+
* Present only for 422 and 500 responses.
|
|
11
|
+
*/
|
|
12
|
+
error?: IError;
|
|
13
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HeaderTypes, HttpStatusCode } from "@twin.org/web";
|
|
2
|
-
import type {
|
|
2
|
+
import type { IActivityLogEntryWithError } from "./IActivityLogEntryWithError.js";
|
|
3
3
|
/**
|
|
4
4
|
* Activity Stream Notify Response.
|
|
5
5
|
*/
|
|
@@ -8,8 +8,10 @@ export interface IActivityStreamNotifyResponse {
|
|
|
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
|
+
* - `422 Unprocessable Entity` if inline processing failed due to a semantic problem in the Activity.
|
|
12
|
+
* - `500 Internal Server Error` if inline processing failed due to a server-side processing error.
|
|
11
13
|
*/
|
|
12
|
-
statusCode: typeof HttpStatusCode.created | typeof HttpStatusCode.accepted;
|
|
14
|
+
statusCode: typeof HttpStatusCode.created | typeof HttpStatusCode.accepted | typeof HttpStatusCode.unprocessableEntity | typeof HttpStatusCode.internalServerError;
|
|
13
15
|
/**
|
|
14
16
|
* Optional headers.
|
|
15
17
|
*/
|
|
@@ -18,6 +20,7 @@ export interface IActivityStreamNotifyResponse {
|
|
|
18
20
|
};
|
|
19
21
|
/**
|
|
20
22
|
* The Activity log entry if the notification was processed inline.
|
|
23
|
+
* For 422/500 responses, also includes a top-level `error` field per IETF RFC 9457.
|
|
21
24
|
*/
|
|
22
|
-
body?:
|
|
25
|
+
body?: IActivityLogEntryWithError;
|
|
23
26
|
}
|
|
@@ -20,12 +20,12 @@ export interface INegotiationCallback {
|
|
|
20
20
|
agreement?: IDataspaceProtocolAgreement;
|
|
21
21
|
}): Promise<void>;
|
|
22
22
|
/**
|
|
23
|
-
* Called when the negotiation
|
|
23
|
+
* Called when the negotiation finalizes.
|
|
24
24
|
* @param negotiationId The negotiation ID.
|
|
25
25
|
* @param agreementId The agreement ID (from agreement.uid).
|
|
26
26
|
* @returns Nothing.
|
|
27
27
|
*/
|
|
28
|
-
|
|
28
|
+
onFinalized(negotiationId: string, agreementId: string): Promise<void>;
|
|
29
29
|
/**
|
|
30
30
|
* Called when the negotiation fails (terminated or stalled).
|
|
31
31
|
* @param negotiationId The negotiation ID.
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.3-next.33](https://github.com/iotaledger/twin-dataspace/compare/dataspace-models-v0.0.3-next.32...dataspace-models-v0.0.3-next.33) (2026-06-01)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* rename completed callback ([#147](https://github.com/iotaledger/twin-dataspace/issues/147)) ([f62baad](https://github.com/iotaledger/twin-dataspace/commit/f62baad0ff444e2913439b12dcd06d20c9a4f6a4))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* implement missing trust check on negotiateAgreement ([#136](https://github.com/iotaledger/twin-dataspace/issues/136)) ([a3589c2](https://github.com/iotaledger/twin-dataspace/commit/a3589c279476d5450b68ea7c2790be7e3125bfe2))
|
|
14
|
+
|
|
15
|
+
## [0.0.3-next.32](https://github.com/iotaledger/twin-dataspace/compare/dataspace-models-v0.0.3-next.31...dataspace-models-v0.0.3-next.32) (2026-05-29)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* return 422/500 when inline activity processing fails ([#135](https://github.com/iotaledger/twin-dataspace/issues/135)) ([8635187](https://github.com/iotaledger/twin-dataspace/commit/863518724cb90af15edc5f456d9a93c6cad7d661))
|
|
21
|
+
|
|
3
22
|
## [0.0.3-next.31](https://github.com/iotaledger/twin-dataspace/compare/dataspace-models-v0.0.3-next.30...dataspace-models-v0.0.3-next.31) (2026-05-27)
|
|
4
23
|
|
|
5
24
|
|
package/docs/reference/index.md
CHANGED
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
- [IPushDeliveryPayload](interfaces/IPushDeliveryPayload.md)
|
|
23
23
|
- [IActivityLogEntryGetRequest](interfaces/IActivityLogEntryGetRequest.md)
|
|
24
24
|
- [IActivityLogEntryGetResponse](interfaces/IActivityLogEntryGetResponse.md)
|
|
25
|
+
- [IActivityLogEntryWithError](interfaces/IActivityLogEntryWithError.md)
|
|
25
26
|
- [IActivityLogStatusNotificationPayload](interfaces/IActivityLogStatusNotificationPayload.md)
|
|
26
27
|
- [IActivityLogStatusRequest](interfaces/IActivityLogStatusRequest.md)
|
|
27
28
|
- [IActivityStreamNotifyRequest](interfaces/IActivityStreamNotifyRequest.md)
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Interface: IActivityLogEntryWithError
|
|
2
|
+
|
|
3
|
+
Activity log entry extended with a top-level RFC 9457 error field.
|
|
4
|
+
Returned as the response body for 422/500 inline-processing failures.
|
|
5
|
+
|
|
6
|
+
## Extends
|
|
7
|
+
|
|
8
|
+
- [`IActivityLogEntry`](IActivityLogEntry.md)
|
|
9
|
+
|
|
10
|
+
## Properties
|
|
11
|
+
|
|
12
|
+
### id {#id}
|
|
13
|
+
|
|
14
|
+
> **id**: `string`
|
|
15
|
+
|
|
16
|
+
The Id of the Activity Log entry.
|
|
17
|
+
|
|
18
|
+
#### Inherited from
|
|
19
|
+
|
|
20
|
+
[`IActivityLogEntry`](IActivityLogEntry.md).[`id`](IActivityLogEntry.md#id)
|
|
21
|
+
|
|
22
|
+
***
|
|
23
|
+
|
|
24
|
+
### activityId? {#activityid}
|
|
25
|
+
|
|
26
|
+
> `optional` **activityId?**: `string`
|
|
27
|
+
|
|
28
|
+
The activity Id that this entry refers to.
|
|
29
|
+
|
|
30
|
+
#### Inherited from
|
|
31
|
+
|
|
32
|
+
[`IActivityLogEntry`](IActivityLogEntry.md).[`activityId`](IActivityLogEntry.md#activityid)
|
|
33
|
+
|
|
34
|
+
***
|
|
35
|
+
|
|
36
|
+
### generator {#generator}
|
|
37
|
+
|
|
38
|
+
> **generator**: `string`
|
|
39
|
+
|
|
40
|
+
The identity of the Activity's generator.
|
|
41
|
+
|
|
42
|
+
#### Inherited from
|
|
43
|
+
|
|
44
|
+
[`IActivityLogEntry`](IActivityLogEntry.md).[`generator`](IActivityLogEntry.md#generator)
|
|
45
|
+
|
|
46
|
+
***
|
|
47
|
+
|
|
48
|
+
### dateCreated {#datecreated}
|
|
49
|
+
|
|
50
|
+
> **dateCreated**: `string`
|
|
51
|
+
|
|
52
|
+
The creation date of this object.
|
|
53
|
+
|
|
54
|
+
#### Inherited from
|
|
55
|
+
|
|
56
|
+
[`IActivityLogEntry`](IActivityLogEntry.md).[`dateCreated`](IActivityLogEntry.md#datecreated)
|
|
57
|
+
|
|
58
|
+
***
|
|
59
|
+
|
|
60
|
+
### dateModified {#datemodified}
|
|
61
|
+
|
|
62
|
+
> **dateModified**: `string`
|
|
63
|
+
|
|
64
|
+
The last update date of this object.
|
|
65
|
+
|
|
66
|
+
#### Inherited from
|
|
67
|
+
|
|
68
|
+
[`IActivityLogEntry`](IActivityLogEntry.md).[`dateModified`](IActivityLogEntry.md#datemodified)
|
|
69
|
+
|
|
70
|
+
***
|
|
71
|
+
|
|
72
|
+
### status {#status}
|
|
73
|
+
|
|
74
|
+
> **status**: [`ActivityProcessingStatus`](../type-aliases/ActivityProcessingStatus.md)
|
|
75
|
+
|
|
76
|
+
Status of the Activity Processing.
|
|
77
|
+
|
|
78
|
+
#### Inherited from
|
|
79
|
+
|
|
80
|
+
[`IActivityLogEntry`](IActivityLogEntry.md).[`status`](IActivityLogEntry.md#status)
|
|
81
|
+
|
|
82
|
+
***
|
|
83
|
+
|
|
84
|
+
### tasks? {#tasks}
|
|
85
|
+
|
|
86
|
+
> `optional` **tasks?**: [`IActivityTaskEntry`](IActivityTaskEntry.md)[]
|
|
87
|
+
|
|
88
|
+
The tasks that have to be run to process the Activity.
|
|
89
|
+
|
|
90
|
+
#### Inherited from
|
|
91
|
+
|
|
92
|
+
[`IActivityLogEntry`](IActivityLogEntry.md).[`tasks`](IActivityLogEntry.md#tasks)
|
|
93
|
+
|
|
94
|
+
***
|
|
95
|
+
|
|
96
|
+
### error? {#error}
|
|
97
|
+
|
|
98
|
+
> `optional` **error?**: `IError`
|
|
99
|
+
|
|
100
|
+
Top-level RFC 9457-formatted error describing the processing failure.
|
|
101
|
+
Present only for 422 and 500 responses.
|
|
@@ -6,11 +6,13 @@ Activity Stream Notify Response.
|
|
|
6
6
|
|
|
7
7
|
### statusCode {#statuscode}
|
|
8
8
|
|
|
9
|
-
> **statusCode**: `201` \| `202`
|
|
9
|
+
> **statusCode**: `201` \| `202` \| `422` \| `500`
|
|
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
|
+
- `422 Unprocessable Entity` if inline processing failed due to a semantic problem in the Activity.
|
|
15
|
+
- `500 Internal Server Error` if inline processing failed due to a server-side processing error.
|
|
14
16
|
|
|
15
17
|
***
|
|
16
18
|
|
|
@@ -28,6 +30,7 @@ Optional headers.
|
|
|
28
30
|
|
|
29
31
|
### body? {#body}
|
|
30
32
|
|
|
31
|
-
> `optional` **body?**: [`
|
|
33
|
+
> `optional` **body?**: [`IActivityLogEntryWithError`](IActivityLogEntryWithError.md)
|
|
32
34
|
|
|
33
35
|
The Activity log entry if the notification was processed inline.
|
|
36
|
+
For 422/500 responses, also includes a top-level `error` field per IETF RFC 9457.
|
|
@@ -51,11 +51,11 @@ Nothing.
|
|
|
51
51
|
|
|
52
52
|
***
|
|
53
53
|
|
|
54
|
-
###
|
|
54
|
+
### onFinalized() {#onfinalized}
|
|
55
55
|
|
|
56
|
-
> **
|
|
56
|
+
> **onFinalized**(`negotiationId`, `agreementId`): `Promise`\<`void`\>
|
|
57
57
|
|
|
58
|
-
Called when the negotiation
|
|
58
|
+
Called when the negotiation finalizes.
|
|
59
59
|
|
|
60
60
|
#### Parameters
|
|
61
61
|
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/dataspace-models",
|
|
3
|
-
"version": "0.0.3-next.
|
|
3
|
+
"version": "0.0.3-next.33",
|
|
4
4
|
"description": "Defines shared entities, interfaces, and data types used by control plane and data plane components.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
|
-
"url": "git+https://github.com/iotaledger/dataspace.git",
|
|
7
|
+
"url": "git+https://github.com/iotaledger/twin-dataspace.git",
|
|
8
8
|
"directory": "packages/dataspace-models"
|
|
9
9
|
},
|
|
10
10
|
"author": "jose.cantera@iota.org",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"schemas"
|
|
57
57
|
],
|
|
58
58
|
"bugs": {
|
|
59
|
-
"url": "git+https://github.com/iotaledger/dataspace/issues"
|
|
59
|
+
"url": "git+https://github.com/iotaledger/twin-dataspace/issues"
|
|
60
60
|
},
|
|
61
61
|
"homepage": "https://twindev.org"
|
|
62
62
|
}
|