@twin.org/rights-management-models 0.9.1-next.4 → 0.9.1-next.6
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":"IPolicyNegotiator.js","sourceRoot":"","sources":["../../../../src/models/pnp/IPolicyNegotiator.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type {\n\tIDataspaceProtocolAgreement,\n\tIDataspaceProtocolOffer\n} from \"@twin.org/standards-dataspace-protocol\";\nimport type { IOdrlParty } from \"@twin.org/standards-w3c-odrl\";\nimport type { IRightsManagementInformation } from \"../IRightsManagementInformation.js\";\n\n/**\n * Interface describing a Policy Negotiator.\n */\nexport interface IPolicyNegotiator extends IComponent {\n\t/**\n\t * Determines if the negotiator supports the given offer.\n\t * @param offer The offer to check.\n\t * @returns True if the negotiator supports the given offer.\n\t */\n\tsupportsOffer(offer: IDataspaceProtocolOffer): boolean;\n\n\t/**\n\t * Handle the offer.\n\t * @param offer The offer to check.\n\t * @param information Information provided by the requester to determine if a policy can be created.\n\t * @returns Sets the accepted flag if it can be offered,
|
|
1
|
+
{"version":3,"file":"IPolicyNegotiator.js","sourceRoot":"","sources":["../../../../src/models/pnp/IPolicyNegotiator.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type {\n\tIDataspaceProtocolAgreement,\n\tIDataspaceProtocolOffer\n} from \"@twin.org/standards-dataspace-protocol\";\nimport type { IOdrlParty } from \"@twin.org/standards-w3c-odrl\";\nimport type { IRightsManagementInformation } from \"../IRightsManagementInformation.js\";\n\n/**\n * Interface describing a Policy Negotiator.\n */\nexport interface IPolicyNegotiator extends IComponent {\n\t/**\n\t * Determines if the negotiator supports the given offer.\n\t * @param offer The offer to check.\n\t * @returns True if the negotiator supports the given offer.\n\t */\n\tsupportsOffer(offer: IDataspaceProtocolOffer): boolean;\n\n\t/**\n\t * Handle the offer.\n\t * @param offer The offer to check.\n\t * @param information Information provided by the requester to determine if a policy can be created.\n\t * @returns Sets the accepted flag if it can be offered, the interventionRequired flag if manual agreement is needed, and the directAgreement flag if the offer/accept round-trip can be skipped (ignored by callers when interventionRequired is true).\n\t */\n\thandleOffer(\n\t\toffer: IDataspaceProtocolOffer,\n\t\tinformation?: IRightsManagementInformation\n\t): Promise<{\n\t\taccepted: boolean;\n\t\tinterventionRequired: boolean;\n\t\tdirectAgreement?: boolean;\n\t}>;\n\n\t/**\n\t * Create an agreement based on the offer.\n\t * @param offer The offer to create the agreement from.\n\t * @param assignee The assignee of the agreement.\n\t * @param information Information provided by the requester to aid in the creation of the agreement.\n\t * @returns The agreement created from the offer or undefined if an agreement could not be created.\n\t */\n\tcreateAgreement(\n\t\toffer: IDataspaceProtocolOffer,\n\t\tassignee: string | IOdrlParty,\n\t\tinformation?: IRightsManagementInformation\n\t): Promise<IDataspaceProtocolAgreement | undefined>;\n}\n"]}
|
|
@@ -16,11 +16,12 @@ export interface IPolicyNegotiator extends IComponent {
|
|
|
16
16
|
* Handle the offer.
|
|
17
17
|
* @param offer The offer to check.
|
|
18
18
|
* @param information Information provided by the requester to determine if a policy can be created.
|
|
19
|
-
* @returns Sets the accepted flag if it can be offered,
|
|
19
|
+
* @returns Sets the accepted flag if it can be offered, the interventionRequired flag if manual agreement is needed, and the directAgreement flag if the offer/accept round-trip can be skipped (ignored by callers when interventionRequired is true).
|
|
20
20
|
*/
|
|
21
21
|
handleOffer(offer: IDataspaceProtocolOffer, information?: IRightsManagementInformation): Promise<{
|
|
22
22
|
accepted: boolean;
|
|
23
23
|
interventionRequired: boolean;
|
|
24
|
+
directAgreement?: boolean;
|
|
24
25
|
}>;
|
|
25
26
|
/**
|
|
26
27
|
* Create an agreement based on the offer.
|
package/docs/changelog.md
CHANGED
|
@@ -6,6 +6,20 @@
|
|
|
6
6
|
|
|
7
7
|
* remove EcosystemPolicy models/DTOs and standardize policy typing on `OdrlPolicyType` for v2.
|
|
8
8
|
|
|
9
|
+
## [0.9.1-next.6](https://github.com/iotaledger/twin-rights-management/compare/rights-management-models-v0.9.1-next.5...rights-management-models-v0.9.1-next.6) (2026-07-15)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Miscellaneous Chores
|
|
13
|
+
|
|
14
|
+
* **rights-management-models:** Synchronize repo versions
|
|
15
|
+
|
|
16
|
+
## [0.9.1-next.5](https://github.com/iotaledger/twin-rights-management/compare/rights-management-models-v0.9.1-next.4...rights-management-models-v0.9.1-next.5) (2026-07-14)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
* support direct REQUESTED -> AGREED contract negotiation shortcut ([#239](https://github.com/iotaledger/twin-rights-management/issues/239)) ([99aff32](https://github.com/iotaledger/twin-rights-management/commit/99aff32f867d097f8567bf61ed36996d194e3c0b))
|
|
22
|
+
|
|
9
23
|
## [0.9.1-next.4](https://github.com/iotaledger/twin-rights-management/compare/rights-management-models-v0.9.1-next.3...rights-management-models-v0.9.1-next.4) (2026-07-02)
|
|
10
24
|
|
|
11
25
|
|
|
@@ -32,7 +32,7 @@ True if the negotiator supports the given offer.
|
|
|
32
32
|
|
|
33
33
|
### handleOffer() {#handleoffer}
|
|
34
34
|
|
|
35
|
-
> **handleOffer**(`offer`, `information?`): `Promise`\<\{ `accepted`: `boolean`; `interventionRequired`: `boolean`; \}\>
|
|
35
|
+
> **handleOffer**(`offer`, `information?`): `Promise`\<\{ `accepted`: `boolean`; `interventionRequired`: `boolean`; `directAgreement?`: `boolean`; \}\>
|
|
36
36
|
|
|
37
37
|
Handle the offer.
|
|
38
38
|
|
|
@@ -52,9 +52,9 @@ Information provided by the requester to determine if a policy can be created.
|
|
|
52
52
|
|
|
53
53
|
#### Returns
|
|
54
54
|
|
|
55
|
-
`Promise`\<\{ `accepted`: `boolean`; `interventionRequired`: `boolean`; \}\>
|
|
55
|
+
`Promise`\<\{ `accepted`: `boolean`; `interventionRequired`: `boolean`; `directAgreement?`: `boolean`; \}\>
|
|
56
56
|
|
|
57
|
-
Sets the accepted flag if it can be offered,
|
|
57
|
+
Sets the accepted flag if it can be offered, the interventionRequired flag if manual agreement is needed, and the directAgreement flag if the offer/accept round-trip can be skipped (ignored by callers when interventionRequired is true).
|
|
58
58
|
|
|
59
59
|
***
|
|
60
60
|
|
package/package.json
CHANGED