@twin.org/dataspace-models 0.0.3-next.32 → 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.
@@ -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 completes successfully (finalized).\n\t * @param negotiationId The negotiation ID.\n\t * @param agreementId The agreement ID (from agreement.uid).\n\t * @returns Nothing.\n\t */\n\tonCompleted(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"]}
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"]}
@@ -20,12 +20,12 @@ export interface INegotiationCallback {
20
20
  agreement?: IDataspaceProtocolAgreement;
21
21
  }): Promise<void>;
22
22
  /**
23
- * Called when the negotiation completes successfully (finalized).
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
- onCompleted(negotiationId: string, agreementId: string): Promise<void>;
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,17 @@
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
+
3
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)
4
16
 
5
17
 
@@ -51,11 +51,11 @@ Nothing.
51
51
 
52
52
  ***
53
53
 
54
- ### onCompleted() {#oncompleted}
54
+ ### onFinalized() {#onfinalized}
55
55
 
56
- > **onCompleted**(`negotiationId`, `agreementId`): `Promise`\<`void`\>
56
+ > **onFinalized**(`negotiationId`, `agreementId`): `Promise`\<`void`\>
57
57
 
58
- Called when the negotiation completes successfully (finalized).
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.32",
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
  }