@twin.org/rights-management-models 0.0.3-next.53 → 0.0.3-next.55
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/IRightsManagementInformation.js +4 -0
- package/dist/es/models/IRightsManagementInformation.js.map +1 -0
- package/dist/es/models/pdp/IPolicyArbiter.js.map +1 -1
- package/dist/es/models/pdp/IPolicyObligationEnforcer.js.map +1 -1
- package/dist/es/models/pip/IPolicyInformationPointComponent.js.map +1 -1
- package/dist/es/models/pip/IPolicyInformationSource.js.map +1 -1
- package/dist/es/models/pnp/IPolicyNegotiationPointComponent.js.map +1 -1
- package/dist/es/models/pnp/IPolicyNegotiator.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/models/IRightsManagementInformation.d.ts +8 -0
- package/dist/types/models/pdp/IPolicyArbiter.d.ts +4 -5
- package/dist/types/models/pdp/IPolicyObligationEnforcer.d.ts +2 -4
- package/dist/types/models/pip/IPolicyInformationPointComponent.d.ts +2 -4
- package/dist/types/models/pip/IPolicyInformationSource.d.ts +2 -4
- package/dist/types/models/pnp/IPolicyNegotiationPointComponent.d.ts +1 -2
- package/dist/types/models/pnp/IPolicyNegotiator.d.ts +3 -7
- package/docs/changelog.md +14 -0
- package/docs/reference/index.md +1 -0
- package/docs/reference/interfaces/IPolicyArbiter.md +4 -1
- package/docs/reference/interfaces/IPolicyInformationPointComponent.md +2 -2
- package/docs/reference/interfaces/IPolicyInformationSource.md +2 -2
- package/docs/reference/interfaces/IPolicyNegotiationPointComponent.md +1 -7
- package/docs/reference/interfaces/IPolicyNegotiator.md +4 -0
- package/docs/reference/interfaces/IPolicyObligationEnforcer.md +2 -0
- package/docs/reference/interfaces/IRightsManagementInformation.md +9 -0
- package/package.json +1 -1
package/dist/es/index.js
CHANGED
|
@@ -37,6 +37,7 @@ export * from "./models/api/pnp/IPnpNegotiationGetRequest.js";
|
|
|
37
37
|
export * from "./models/api/pnp/IPnpOfferRequest.js";
|
|
38
38
|
export * from "./models/api/pnp/IPnpTerminateRequest.js";
|
|
39
39
|
export * from "./models/IRightsManagementAgreement.js";
|
|
40
|
+
export * from "./models/IRightsManagementInformation.js";
|
|
40
41
|
export * from "./models/IRightsManagementOffer.js";
|
|
41
42
|
export * from "./models/IRightsManagementPolicy.js";
|
|
42
43
|
export * from "./models/IRightsManagementPolicyMetadata.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;AACvC,cAAc,qCAAqC,CAAC;AACpD,cAAc,kDAAkD,CAAC;AACjE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,wCAAwC,CAAC;AACvD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC;AACtD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,yCAAyC,CAAC;AACxD,cAAc,0CAA0C,CAAC;AACzD,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AACtD,cAAc,wCAAwC,CAAC;AACvD,cAAc,sCAAsC,CAAC;AACrD,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC;AACtD,cAAc,yCAAyC,CAAC;AACxD,cAAc,sCAAsC,CAAC;AACrD,cAAc,uCAAuC,CAAC;AACtD,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,yCAAyC,CAAC;AACxD,cAAc,sCAAsC,CAAC;AACrD,cAAc,0CAA0C,CAAC;AACzD,cAAc,sDAAsD,CAAC;AACrE,cAAc,qDAAqD,CAAC;AACpE,cAAc,0CAA0C,CAAC;AACzD,cAAc,sCAAsC,CAAC;AACrD,cAAc,0CAA0C,CAAC;AACzD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,sCAAsC,CAAC;AACrD,cAAc,0CAA0C,CAAC;AACzD,cAAc,wCAAwC,CAAC;AACvD,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,0CAA0C,CAAC;AACzD,cAAc,kCAAkC,CAAC;AACjD,cAAc,0BAA0B,CAAC;AACzC,cAAc,qDAAqD,CAAC;AACpE,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qCAAqC,CAAC;AACpD,cAAc,kDAAkD,CAAC;AACjE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,kDAAkD,CAAC;AACjE,cAAc,0CAA0C,CAAC;AACzD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,iDAAiD,CAAC;AAChE,cAAc,oCAAoC,CAAC;AACnD,cAAc,uDAAuD,CAAC;AACtE,cAAc,kDAAkD,CAAC;AACjE,cAAc,mCAAmC,CAAC;AAClD,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAClD,cAAc,wCAAwC,CAAC;AACvD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,sCAAsC,CAAC;AACrD,cAAc,wCAAwC,CAAC;AACvD,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./factories/policyArbiterFactory.js\";\nexport * from \"./factories/policyEnforcementProcessorFactory.js\";\nexport * from \"./factories/policyExecutionActionFactory.js\";\nexport * from \"./factories/policyInformationSourceFactory.js\";\nexport * from \"./factories/policyNegotiatorFactory.js\";\nexport * from \"./factories/policyObligationEnforcerFactory.js\";\nexport * from \"./factories/policyRequesterFactory.js\";\nexport * from \"./models/api/pap/IPapCreateRequest.js\";\nexport * from \"./models/api/pap/IPapGetAgreementRequest.js\";\nexport * from \"./models/api/pap/IPapGetAgreementResponse.js\";\nexport * from \"./models/api/pap/IPapGetOfferRequest.js\";\nexport * from \"./models/api/pap/IPapGetOfferResponse.js\";\nexport * from \"./models/api/pap/IPapGetRequest.js\";\nexport * from \"./models/api/pap/IPapGetResponse.js\";\nexport * from \"./models/api/pap/IPapGetSetRequest.js\";\nexport * from \"./models/api/pap/IPapGetSetResponse.js\";\nexport * from \"./models/api/pap/IPapQueryRequest.js\";\nexport * from \"./models/api/pap/IPapQueryResponse.js\";\nexport * from \"./models/api/pap/IPapRemoveRequest.js\";\nexport * from \"./models/api/pap/IPapUpdateRequest.js\";\nexport * from \"./models/api/pnap/IPnapCreateRequest.js\";\nexport * from \"./models/api/pnap/IPnapGetRequest.js\";\nexport * from \"./models/api/pnap/IPnapGetResponse.js\";\nexport * from \"./models/api/pnap/IPnapQueryRequest.js\";\nexport * from \"./models/api/pnap/IPnapQueryResponse.js\";\nexport * from \"./models/api/pnap/IPnapRemoveRequest.js\";\nexport * from \"./models/api/pnap/IPnapSetRequest.js\";\nexport * from \"./models/api/pnp/IPnpAgreementRequest.js\";\nexport * from \"./models/api/pnp/IPnpAgreementVerificationRequest.js\";\nexport * from \"./models/api/pnp/IPnpContractNegotiationResponse.js\";\nexport * from \"./models/api/pnp/IPnpContractResponse.js\";\nexport * from \"./models/api/pnp/IPnpEventRequest.js\";\nexport * from \"./models/api/pnp/IPnpNegotiateRequest.js\";\nexport * from \"./models/api/pnp/IPnpNegotiationGetRequest.js\";\nexport * from \"./models/api/pnp/IPnpOfferRequest.js\";\nexport * from \"./models/api/pnp/IPnpTerminateRequest.js\";\nexport * from \"./models/IRightsManagementAgreement.js\";\nexport * from \"./models/IRightsManagementOffer.js\";\nexport * from \"./models/IRightsManagementPolicy.js\";\nexport * from \"./models/IRightsManagementPolicyMetadata.js\";\nexport * from \"./models/IRightsManagementPolicyTrust.js\";\nexport * from \"./models/IRightsManagementSet.js\";\nexport * from \"./models/odrlProfiles.js\";\nexport * from \"./models/pap/IPolicyAdministrationPointComponent.js\";\nexport * from \"./models/pdp/IPolicyArbiter.js\";\nexport * from \"./models/pdp/IPolicyDecision.js\";\nexport * from \"./models/pdp/IPolicyDecisionPointComponent.js\";\nexport * from \"./models/pdp/IPolicyObligationEnforcer.js\";\nexport * from \"./models/pdp/policyDecision.js\";\nexport * from \"./models/pdp/policyDecisionStage.js\";\nexport * from \"./models/pep/IPolicyEnforcementPointComponent.js\";\nexport * from \"./models/pep/IPolicyEnforcementProcessor.js\";\nexport * from \"./models/pip/IPolicyInformationPointComponent.js\";\nexport * from \"./models/pip/IPolicyInformationSource.js\";\nexport * from \"./models/pip/policyInformationAccessMode.js\";\nexport * from \"./models/pmp/IPolicyManagementPointComponent.js\";\nexport * from \"./models/pnp/IPolicyNegotiation.js\";\nexport * from \"./models/pnp/IPolicyNegotiationAdminPointComponent.js\";\nexport * from \"./models/pnp/IPolicyNegotiationPointComponent.js\";\nexport * from \"./models/pnp/IPolicyNegotiator.js\";\nexport * from \"./models/pnp/IPolicyRequester.js\";\nexport * from \"./models/policyMetadataContext.js\";\nexport * from \"./models/pxp/IPolicyExecutionAction.js\";\nexport * from \"./models/pxp/IPolicyExecutionPointComponent.js\";\nexport * from \"./models/rightsManagementContexts.js\";\nexport * from \"./models/rightsManagementNamespaces.js\";\nexport * from \"./models/rightsManagementTypes.js\";\nexport * from \"./utils/odrlPolicyHelper.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,qCAAqC,CAAC;AACpD,cAAc,kDAAkD,CAAC;AACjE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,wCAAwC,CAAC;AACvD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC;AACtD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,yCAAyC,CAAC;AACxD,cAAc,0CAA0C,CAAC;AACzD,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AACtD,cAAc,wCAAwC,CAAC;AACvD,cAAc,sCAAsC,CAAC;AACrD,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC;AACtD,cAAc,yCAAyC,CAAC;AACxD,cAAc,sCAAsC,CAAC;AACrD,cAAc,uCAAuC,CAAC;AACtD,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,yCAAyC,CAAC;AACxD,cAAc,sCAAsC,CAAC;AACrD,cAAc,0CAA0C,CAAC;AACzD,cAAc,sDAAsD,CAAC;AACrE,cAAc,qDAAqD,CAAC;AACpE,cAAc,0CAA0C,CAAC;AACzD,cAAc,sCAAsC,CAAC;AACrD,cAAc,0CAA0C,CAAC;AACzD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,sCAAsC,CAAC;AACrD,cAAc,0CAA0C,CAAC;AACzD,cAAc,wCAAwC,CAAC;AACvD,cAAc,0CAA0C,CAAC;AACzD,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,0CAA0C,CAAC;AACzD,cAAc,kCAAkC,CAAC;AACjD,cAAc,0BAA0B,CAAC;AACzC,cAAc,qDAAqD,CAAC;AACpE,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qCAAqC,CAAC;AACpD,cAAc,kDAAkD,CAAC;AACjE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,kDAAkD,CAAC;AACjE,cAAc,0CAA0C,CAAC;AACzD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,iDAAiD,CAAC;AAChE,cAAc,oCAAoC,CAAC;AACnD,cAAc,uDAAuD,CAAC;AACtE,cAAc,kDAAkD,CAAC;AACjE,cAAc,mCAAmC,CAAC;AAClD,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAClD,cAAc,wCAAwC,CAAC;AACvD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,sCAAsC,CAAC;AACrD,cAAc,wCAAwC,CAAC;AACvD,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./factories/policyArbiterFactory.js\";\nexport * from \"./factories/policyEnforcementProcessorFactory.js\";\nexport * from \"./factories/policyExecutionActionFactory.js\";\nexport * from \"./factories/policyInformationSourceFactory.js\";\nexport * from \"./factories/policyNegotiatorFactory.js\";\nexport * from \"./factories/policyObligationEnforcerFactory.js\";\nexport * from \"./factories/policyRequesterFactory.js\";\nexport * from \"./models/api/pap/IPapCreateRequest.js\";\nexport * from \"./models/api/pap/IPapGetAgreementRequest.js\";\nexport * from \"./models/api/pap/IPapGetAgreementResponse.js\";\nexport * from \"./models/api/pap/IPapGetOfferRequest.js\";\nexport * from \"./models/api/pap/IPapGetOfferResponse.js\";\nexport * from \"./models/api/pap/IPapGetRequest.js\";\nexport * from \"./models/api/pap/IPapGetResponse.js\";\nexport * from \"./models/api/pap/IPapGetSetRequest.js\";\nexport * from \"./models/api/pap/IPapGetSetResponse.js\";\nexport * from \"./models/api/pap/IPapQueryRequest.js\";\nexport * from \"./models/api/pap/IPapQueryResponse.js\";\nexport * from \"./models/api/pap/IPapRemoveRequest.js\";\nexport * from \"./models/api/pap/IPapUpdateRequest.js\";\nexport * from \"./models/api/pnap/IPnapCreateRequest.js\";\nexport * from \"./models/api/pnap/IPnapGetRequest.js\";\nexport * from \"./models/api/pnap/IPnapGetResponse.js\";\nexport * from \"./models/api/pnap/IPnapQueryRequest.js\";\nexport * from \"./models/api/pnap/IPnapQueryResponse.js\";\nexport * from \"./models/api/pnap/IPnapRemoveRequest.js\";\nexport * from \"./models/api/pnap/IPnapSetRequest.js\";\nexport * from \"./models/api/pnp/IPnpAgreementRequest.js\";\nexport * from \"./models/api/pnp/IPnpAgreementVerificationRequest.js\";\nexport * from \"./models/api/pnp/IPnpContractNegotiationResponse.js\";\nexport * from \"./models/api/pnp/IPnpContractResponse.js\";\nexport * from \"./models/api/pnp/IPnpEventRequest.js\";\nexport * from \"./models/api/pnp/IPnpNegotiateRequest.js\";\nexport * from \"./models/api/pnp/IPnpNegotiationGetRequest.js\";\nexport * from \"./models/api/pnp/IPnpOfferRequest.js\";\nexport * from \"./models/api/pnp/IPnpTerminateRequest.js\";\nexport * from \"./models/IRightsManagementAgreement.js\";\nexport * from \"./models/IRightsManagementInformation.js\";\nexport * from \"./models/IRightsManagementOffer.js\";\nexport * from \"./models/IRightsManagementPolicy.js\";\nexport * from \"./models/IRightsManagementPolicyMetadata.js\";\nexport * from \"./models/IRightsManagementPolicyTrust.js\";\nexport * from \"./models/IRightsManagementSet.js\";\nexport * from \"./models/odrlProfiles.js\";\nexport * from \"./models/pap/IPolicyAdministrationPointComponent.js\";\nexport * from \"./models/pdp/IPolicyArbiter.js\";\nexport * from \"./models/pdp/IPolicyDecision.js\";\nexport * from \"./models/pdp/IPolicyDecisionPointComponent.js\";\nexport * from \"./models/pdp/IPolicyObligationEnforcer.js\";\nexport * from \"./models/pdp/policyDecision.js\";\nexport * from \"./models/pdp/policyDecisionStage.js\";\nexport * from \"./models/pep/IPolicyEnforcementPointComponent.js\";\nexport * from \"./models/pep/IPolicyEnforcementProcessor.js\";\nexport * from \"./models/pip/IPolicyInformationPointComponent.js\";\nexport * from \"./models/pip/IPolicyInformationSource.js\";\nexport * from \"./models/pip/policyInformationAccessMode.js\";\nexport * from \"./models/pmp/IPolicyManagementPointComponent.js\";\nexport * from \"./models/pnp/IPolicyNegotiation.js\";\nexport * from \"./models/pnp/IPolicyNegotiationAdminPointComponent.js\";\nexport * from \"./models/pnp/IPolicyNegotiationPointComponent.js\";\nexport * from \"./models/pnp/IPolicyNegotiator.js\";\nexport * from \"./models/pnp/IPolicyRequester.js\";\nexport * from \"./models/policyMetadataContext.js\";\nexport * from \"./models/pxp/IPolicyExecutionAction.js\";\nexport * from \"./models/pxp/IPolicyExecutionPointComponent.js\";\nexport * from \"./models/rightsManagementContexts.js\";\nexport * from \"./models/rightsManagementNamespaces.js\";\nexport * from \"./models/rightsManagementTypes.js\";\nexport * from \"./utils/odrlPolicyHelper.js\";\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IRightsManagementInformation.js","sourceRoot":"","sources":["../../../src/models/IRightsManagementInformation.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Named objects available to the rights management components during policy evaluation.\n * Values are accessed via JSONPath and may be any type - structured JSON-LD nodes,\n * plain objects, or scalar primitives.\n */\nexport interface IRightsManagementInformation {\n\t[id: string]: unknown;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IPolicyArbiter.js","sourceRoot":"","sources":["../../../../src/models/pdp/IPolicyArbiter.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type {
|
|
1
|
+
{"version":3,"file":"IPolicyArbiter.js","sourceRoot":"","sources":["../../../../src/models/pdp/IPolicyArbiter.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type { IDataspaceProtocolAgreement } from \"@twin.org/standards-dataspace-protocol\";\nimport type { OdrlActionType } from \"@twin.org/standards-w3c-odrl\";\nimport type { IRightsManagementInformation } from \"../IRightsManagementInformation.js\";\nimport type { IPolicyDecision } from \"./IPolicyDecision.js\";\n\n/**\n * Interface describing a Policy Arbiter.\n */\nexport interface IPolicyArbiter extends IComponent {\n\t/**\n\t * Makes decisions regarding policy access to data.\n\t * @param agreement The agreement to evaluate.\n\t * @param information Named objects available to the arbiter during evaluation. Values are accessed\n\t * via JSONPath and may be any type - structured JSON-LD nodes, plain objects, or scalar primitives.\n\t * @param data The data to make a decision on.\n\t * @param action Optional action to make a decision on, if not provided, the arbiter will evaluate all actions in the agreement.\n\t * @returns The decisions about access to the data.\n\t */\n\tdecide<D = unknown>(\n\t\tagreement: IDataspaceProtocolAgreement,\n\t\tinformation?: IRightsManagementInformation,\n\t\tdata?: D,\n\t\taction?: OdrlActionType | string\n\t): Promise<IPolicyDecision[]>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IPolicyObligationEnforcer.js","sourceRoot":"","sources":["../../../../src/models/pdp/IPolicyObligationEnforcer.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type {
|
|
1
|
+
{"version":3,"file":"IPolicyObligationEnforcer.js","sourceRoot":"","sources":["../../../../src/models/pdp/IPolicyObligationEnforcer.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type { OdrlActionType, IOdrlDuty } from \"@twin.org/standards-w3c-odrl\";\nimport type { IRightsManagementInformation } from \"../IRightsManagementInformation.js\";\nimport type { IRightsManagementPolicy } from \"../IRightsManagementPolicy.js\";\n\n/**\n * Interface describing a Policy Obligation Enforcer.\n */\nexport interface IPolicyObligationEnforcer extends IComponent {\n\t/**\n\t * Enforces obligations regarding policy access to data.\n\t * @param policy The policy to evaluate.\n\t * @param duty The duty to enforce.\n\t * @param information Information provided by the requester to determine if a policy can be created.\n\t * @param data The data to make a decision on.\n\t * @param action Optional action to make a decision on, if not provided, the enforcer will evaluate all actions in the duty.\n\t * @returns Whether the obligations were successfully enforced.\n\t */\n\tenforce<D = unknown>(\n\t\tpolicy: IRightsManagementPolicy,\n\t\tduty: IOdrlDuty,\n\t\tinformation?: IRightsManagementInformation,\n\t\tdata?: D,\n\t\taction?: OdrlActionType | string\n\t): Promise<boolean>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IPolicyInformationPointComponent.js","sourceRoot":"","sources":["../../../../src/models/pip/IPolicyInformationPointComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type {
|
|
1
|
+
{"version":3,"file":"IPolicyInformationPointComponent.js","sourceRoot":"","sources":["../../../../src/models/pip/IPolicyInformationPointComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type { OdrlActionType } from \"@twin.org/standards-w3c-odrl\";\nimport type { IRightsManagementInformation } from \"../IRightsManagementInformation.js\";\nimport type { IRightsManagementPolicy } from \"../IRightsManagementPolicy.js\";\nimport type { PolicyInformationAccessMode } from \"./policyInformationAccessMode.js\";\n\n/**\n * Interface describing a Policy Information Point (PIP) contract.\n * Provides additional information to the Policy Decision Point (PDP) when\n * it is making decisions.\n */\nexport interface IPolicyInformationPointComponent extends IComponent {\n\t/**\n\t * Retrieve additional information which is relevant in the PDP decision making.\n\t * @param policy The policy to retrieve the information for if available.\n\t * @param accessMode The access mode to use for the retrieval.\n\t * @param data The data to get any additional information for.\n\t * @param action Optional action to make a decision on, if not provided, the PIP will evaluate all actions in the policy.\n\t * @returns Returns additional information based on the data and identities.\n\t */\n\tretrieve<D = unknown>(\n\t\tpolicy: IRightsManagementPolicy | undefined,\n\t\taccessMode: PolicyInformationAccessMode,\n\t\tdata?: D,\n\t\taction?: OdrlActionType | string\n\t): Promise<IRightsManagementInformation>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IPolicyInformationSource.js","sourceRoot":"","sources":["../../../../src/models/pip/IPolicyInformationSource.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type {
|
|
1
|
+
{"version":3,"file":"IPolicyInformationSource.js","sourceRoot":"","sources":["../../../../src/models/pip/IPolicyInformationSource.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type { OdrlActionType } from \"@twin.org/standards-w3c-odrl\";\nimport type { IRightsManagementInformation } from \"../IRightsManagementInformation.js\";\nimport type { IRightsManagementPolicy } from \"../IRightsManagementPolicy.js\";\nimport type { PolicyInformationAccessMode } from \"./policyInformationAccessMode.js\";\n\n/**\n * Interface for policy information sources.\n */\nexport interface IPolicyInformationSource extends IComponent {\n\t/**\n\t * Retrieve information from the sources.\n\t * @param policy The policy to retrieve information for if available.\n\t * @param accessMode The access mode to use for the retrieval.\n\t * @param data The data to process.\n\t * @param action Optional action to make a decision on, if not provided, the PIP will evaluate all actions in the policy.\n\t * @returns The objects containing relevant information or undefined if nothing relevant is found.\n\t */\n\tretrieve<D = unknown>(\n\t\tpolicy: IRightsManagementPolicy | undefined,\n\t\taccessMode: PolicyInformationAccessMode,\n\t\tdata?: D,\n\t\taction?: OdrlActionType | string\n\t): Promise<IRightsManagementInformation | undefined>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IPolicyNegotiationPointComponent.js","sourceRoot":"","sources":["../../../../src/models/pnp/IPolicyNegotiationPointComponent.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\tIDataspaceProtocolContractAgreementMessage,\n\tIDataspaceProtocolContractAgreementVerificationMessage,\n\tIDataspaceProtocolContractNegotiation,\n\tIDataspaceProtocolContractNegotiationError,\n\tIDataspaceProtocolContractNegotiationEventMessage,\n\tIDataspaceProtocolContractNegotiationTerminationMessage,\n\tIDataspaceProtocolContractOfferMessage,\n\tIDataspaceProtocolContractRequestMessage\n} from \"@twin.org/standards-dataspace-protocol\";\n\n/**\n * Interface describing a Policy Negotiation Point (PNP) contract.\n * When receiving a request from another component, the PNP will negotiate the terms\n * of the request and determine the appropriate policies to create.\n * @see https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1/#negotiation-protocol\n */\nexport interface IPolicyNegotiationPointComponent extends IComponent {\n\t/**\n\t * Get the current state of the negotiation.\n\t * @param id The id of the negotiation to retrieve.\n\t * @param trustPayload Trust payload to verify the requesters identity.\n\t * @returns The current state of the negotiation or an error.\n\t */\n\tgetNegotiation(\n\t\tid: string,\n\t\ttrustPayload: unknown\n\t): Promise<IDataspaceProtocolContractNegotiation | IDataspaceProtocolContractNegotiationError>;\n\n\t/**\n\t * Send a request to a provider.\n\t * @param url The url of the provider to send the request to.\n\t * @param requesterType The type of the requester to use for the request, will use the registered requester to provide update.\n\t * @param odrlOfferId The id of the offer to request.\n\t * @param publicOrigin The public origin url of this PNP service.\n\t * @returns The negotiation id.\n\t */\n\tsendRequestToProvider(\n\t\turl: string,\n\t\trequesterType: string,\n\t\todrlOfferId: string,\n\t\tpublicOrigin: string\n\t): Promise<string>;\n\n\t/**\n\t * Processes an incoming request on a provider from a consumer.\n\t * @param message The negotiation request.\n\t * @param trustPayload Trust payload to verify the requesters identity.\n\t * @
|
|
1
|
+
{"version":3,"file":"IPolicyNegotiationPointComponent.js","sourceRoot":"","sources":["../../../../src/models/pnp/IPolicyNegotiationPointComponent.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\tIDataspaceProtocolContractAgreementMessage,\n\tIDataspaceProtocolContractAgreementVerificationMessage,\n\tIDataspaceProtocolContractNegotiation,\n\tIDataspaceProtocolContractNegotiationError,\n\tIDataspaceProtocolContractNegotiationEventMessage,\n\tIDataspaceProtocolContractNegotiationTerminationMessage,\n\tIDataspaceProtocolContractOfferMessage,\n\tIDataspaceProtocolContractRequestMessage\n} from \"@twin.org/standards-dataspace-protocol\";\n\n/**\n * Interface describing a Policy Negotiation Point (PNP) contract.\n * When receiving a request from another component, the PNP will negotiate the terms\n * of the request and determine the appropriate policies to create.\n * @see https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1/#negotiation-protocol\n */\nexport interface IPolicyNegotiationPointComponent extends IComponent {\n\t/**\n\t * Get the current state of the negotiation.\n\t * @param id The id of the negotiation to retrieve.\n\t * @param trustPayload Trust payload to verify the requesters identity.\n\t * @returns The current state of the negotiation or an error.\n\t */\n\tgetNegotiation(\n\t\tid: string,\n\t\ttrustPayload: unknown\n\t): Promise<IDataspaceProtocolContractNegotiation | IDataspaceProtocolContractNegotiationError>;\n\n\t/**\n\t * Send a request to a provider.\n\t * @param url The url of the provider to send the request to.\n\t * @param requesterType The type of the requester to use for the request, will use the registered requester to provide update.\n\t * @param odrlOfferId The id of the offer to request.\n\t * @param publicOrigin The public origin url of this PNP service.\n\t * @returns The negotiation id.\n\t */\n\tsendRequestToProvider(\n\t\turl: string,\n\t\trequesterType: string,\n\t\todrlOfferId: string,\n\t\tpublicOrigin: string\n\t): Promise<string>;\n\n\t/**\n\t * Processes an incoming request on a provider from a consumer.\n\t * @param message The negotiation request.\n\t * @param trustPayload Trust payload to verify the requesters identity.\n\t * @returns The current state of the contract negotiation or an error.\n\t */\n\trequestFromConsumer(\n\t\tmessage: IDataspaceProtocolContractRequestMessage,\n\t\ttrustPayload: unknown\n\t): Promise<IDataspaceProtocolContractNegotiation | IDataspaceProtocolContractNegotiationError>;\n\n\t/**\n\t * An offer has been received by a consumer.\n\t * @param message The offer being received by the consumer.\n\t * @param trustPayload Trust payload to verify the requesters identity.\n\t * @returns The current state of the contract negotiation or an error.\n\t */\n\tofferFromProvider(\n\t\tmessage: IDataspaceProtocolContractOfferMessage,\n\t\ttrustPayload: unknown\n\t): Promise<IDataspaceProtocolContractNegotiation | IDataspaceProtocolContractNegotiationError>;\n\n\t/**\n\t * An agreement has been received by a consumer.\n\t * @param message The agreement message to send.\n\t * @param trustPayload Trust payload to verify the requesters identity.\n\t * @returns The error if there is one.\n\t */\n\tagreementFromProvider(\n\t\tmessage: IDataspaceProtocolContractAgreementMessage,\n\t\ttrustPayload: unknown\n\t): Promise<IDataspaceProtocolContractNegotiationError | undefined>;\n\n\t/**\n\t * An agreement verification has been received by a provider.\n\t * @param message The agreement verification message to send.\n\t * @param trustPayload Trust payload to verify the requesters identity.\n\t * @returns The error if there is one.\n\t */\n\tagreementVerificationFromConsumer(\n\t\tmessage: IDataspaceProtocolContractAgreementVerificationMessage,\n\t\ttrustPayload: unknown\n\t): Promise<IDataspaceProtocolContractNegotiationError | undefined>;\n\n\t/**\n\t * An event has been received by the provider or consumer.\n\t * @param message The event message to send.\n\t * @param destination The destination is provider or consumer.\n\t * @param trustPayload Trust payload to verify the requesters identity.\n\t * @returns The error if there is one.\n\t */\n\tevent(\n\t\tmessage: IDataspaceProtocolContractNegotiationEventMessage,\n\t\tdestination: \"provider\" | \"consumer\",\n\t\ttrustPayload: unknown\n\t): Promise<IDataspaceProtocolContractNegotiationError | undefined>;\n\n\t/**\n\t * A termination message has been received by the provider or consumer.\n\t * @param message The termination message to send.\n\t * @param destination The destination is provider or consumer.\n\t * @param trustPayload Trust payload to verify the requesters identity.\n\t * @returns The error if there is one.\n\t */\n\tterminate(\n\t\tmessage: IDataspaceProtocolContractNegotiationTerminationMessage,\n\t\tdestination: \"provider\" | \"consumer\",\n\t\ttrustPayload: unknown\n\t): Promise<IDataspaceProtocolContractNegotiationError | undefined>;\n\n\t/**\n\t * Send a terminate message to a consumer at the given callback address.\n\t * Used by stall cleanup to notify consumers that their negotiation has been terminated.\n\t * @param callbackAddress The consumer callback URL to send the termination to.\n\t * @param providerPid The provider negotiation id.\n\t * @param consumerPid The consumer negotiation id.\n\t * @returns Resolves when the terminate message has been sent.\n\t */\n\tsendTerminateToConsumer(\n\t\tcallbackAddress: string,\n\t\tproviderPid: string,\n\t\tconsumerPid: string\n\t): Promise<void>;\n}\n"]}
|
|
@@ -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 {
|
|
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, and the interventionRequired flag if manual agreement is needed.\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}>;\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"]}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -35,6 +35,7 @@ export * from "./models/api/pnp/IPnpNegotiationGetRequest.js";
|
|
|
35
35
|
export * from "./models/api/pnp/IPnpOfferRequest.js";
|
|
36
36
|
export * from "./models/api/pnp/IPnpTerminateRequest.js";
|
|
37
37
|
export * from "./models/IRightsManagementAgreement.js";
|
|
38
|
+
export * from "./models/IRightsManagementInformation.js";
|
|
38
39
|
export * from "./models/IRightsManagementOffer.js";
|
|
39
40
|
export * from "./models/IRightsManagementPolicy.js";
|
|
40
41
|
export * from "./models/IRightsManagementPolicyMetadata.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Named objects available to the rights management components during policy evaluation.
|
|
3
|
+
* Values are accessed via JSONPath and may be any type - structured JSON-LD nodes,
|
|
4
|
+
* plain objects, or scalar primitives.
|
|
5
|
+
*/
|
|
6
|
+
export interface IRightsManagementInformation {
|
|
7
|
+
[id: string]: unknown;
|
|
8
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IComponent } from "@twin.org/core";
|
|
2
|
-
import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
3
2
|
import type { IDataspaceProtocolAgreement } from "@twin.org/standards-dataspace-protocol";
|
|
4
3
|
import type { OdrlActionType } from "@twin.org/standards-w3c-odrl";
|
|
4
|
+
import type { IRightsManagementInformation } from "../IRightsManagementInformation.js";
|
|
5
5
|
import type { IPolicyDecision } from "./IPolicyDecision.js";
|
|
6
6
|
/**
|
|
7
7
|
* Interface describing a Policy Arbiter.
|
|
@@ -10,12 +10,11 @@ export interface IPolicyArbiter extends IComponent {
|
|
|
10
10
|
/**
|
|
11
11
|
* Makes decisions regarding policy access to data.
|
|
12
12
|
* @param agreement The agreement to evaluate.
|
|
13
|
-
* @param information
|
|
13
|
+
* @param information Named objects available to the arbiter during evaluation. Values are accessed
|
|
14
|
+
* via JSONPath and may be any type - structured JSON-LD nodes, plain objects, or scalar primitives.
|
|
14
15
|
* @param data The data to make a decision on.
|
|
15
16
|
* @param action Optional action to make a decision on, if not provided, the arbiter will evaluate all actions in the agreement.
|
|
16
17
|
* @returns The decisions about access to the data.
|
|
17
18
|
*/
|
|
18
|
-
decide<D = unknown>(agreement: IDataspaceProtocolAgreement, information?:
|
|
19
|
-
[id: string]: IJsonLdNodeObject;
|
|
20
|
-
}, data?: D, action?: OdrlActionType | string): Promise<IPolicyDecision[]>;
|
|
19
|
+
decide<D = unknown>(agreement: IDataspaceProtocolAgreement, information?: IRightsManagementInformation, data?: D, action?: OdrlActionType | string): Promise<IPolicyDecision[]>;
|
|
21
20
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IComponent } from "@twin.org/core";
|
|
2
|
-
import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
3
2
|
import type { OdrlActionType, IOdrlDuty } from "@twin.org/standards-w3c-odrl";
|
|
3
|
+
import type { IRightsManagementInformation } from "../IRightsManagementInformation.js";
|
|
4
4
|
import type { IRightsManagementPolicy } from "../IRightsManagementPolicy.js";
|
|
5
5
|
/**
|
|
6
6
|
* Interface describing a Policy Obligation Enforcer.
|
|
@@ -15,7 +15,5 @@ export interface IPolicyObligationEnforcer extends IComponent {
|
|
|
15
15
|
* @param action Optional action to make a decision on, if not provided, the enforcer will evaluate all actions in the duty.
|
|
16
16
|
* @returns Whether the obligations were successfully enforced.
|
|
17
17
|
*/
|
|
18
|
-
enforce<D = unknown>(policy: IRightsManagementPolicy, duty: IOdrlDuty, information?:
|
|
19
|
-
[id: string]: IJsonLdNodeObject;
|
|
20
|
-
}, data?: D, action?: OdrlActionType | string): Promise<boolean>;
|
|
18
|
+
enforce<D = unknown>(policy: IRightsManagementPolicy, duty: IOdrlDuty, information?: IRightsManagementInformation, data?: D, action?: OdrlActionType | string): Promise<boolean>;
|
|
21
19
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IComponent } from "@twin.org/core";
|
|
2
|
-
import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
3
2
|
import type { OdrlActionType } from "@twin.org/standards-w3c-odrl";
|
|
3
|
+
import type { IRightsManagementInformation } from "../IRightsManagementInformation.js";
|
|
4
4
|
import type { IRightsManagementPolicy } from "../IRightsManagementPolicy.js";
|
|
5
5
|
import type { PolicyInformationAccessMode } from "./policyInformationAccessMode.js";
|
|
6
6
|
/**
|
|
@@ -17,7 +17,5 @@ export interface IPolicyInformationPointComponent extends IComponent {
|
|
|
17
17
|
* @param action Optional action to make a decision on, if not provided, the PIP will evaluate all actions in the policy.
|
|
18
18
|
* @returns Returns additional information based on the data and identities.
|
|
19
19
|
*/
|
|
20
|
-
retrieve<D = unknown>(policy: IRightsManagementPolicy | undefined, accessMode: PolicyInformationAccessMode, data?: D, action?: OdrlActionType | string): Promise<
|
|
21
|
-
[id: string]: IJsonLdNodeObject;
|
|
22
|
-
}>;
|
|
20
|
+
retrieve<D = unknown>(policy: IRightsManagementPolicy | undefined, accessMode: PolicyInformationAccessMode, data?: D, action?: OdrlActionType | string): Promise<IRightsManagementInformation>;
|
|
23
21
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IComponent } from "@twin.org/core";
|
|
2
|
-
import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
3
2
|
import type { OdrlActionType } from "@twin.org/standards-w3c-odrl";
|
|
3
|
+
import type { IRightsManagementInformation } from "../IRightsManagementInformation.js";
|
|
4
4
|
import type { IRightsManagementPolicy } from "../IRightsManagementPolicy.js";
|
|
5
5
|
import type { PolicyInformationAccessMode } from "./policyInformationAccessMode.js";
|
|
6
6
|
/**
|
|
@@ -15,7 +15,5 @@ export interface IPolicyInformationSource extends IComponent {
|
|
|
15
15
|
* @param action Optional action to make a decision on, if not provided, the PIP will evaluate all actions in the policy.
|
|
16
16
|
* @returns The objects containing relevant information or undefined if nothing relevant is found.
|
|
17
17
|
*/
|
|
18
|
-
retrieve<D = unknown>(policy: IRightsManagementPolicy | undefined, accessMode: PolicyInformationAccessMode, data?: D, action?: OdrlActionType | string): Promise<
|
|
19
|
-
[id: string]: IJsonLdNodeObject;
|
|
20
|
-
} | undefined>;
|
|
18
|
+
retrieve<D = unknown>(policy: IRightsManagementPolicy | undefined, accessMode: PolicyInformationAccessMode, data?: D, action?: OdrlActionType | string): Promise<IRightsManagementInformation | undefined>;
|
|
21
19
|
}
|
|
@@ -27,10 +27,9 @@ export interface IPolicyNegotiationPointComponent extends IComponent {
|
|
|
27
27
|
* Processes an incoming request on a provider from a consumer.
|
|
28
28
|
* @param message The negotiation request.
|
|
29
29
|
* @param trustPayload Trust payload to verify the requesters identity.
|
|
30
|
-
* @param publicOrigin The public origin url of this PNP service.
|
|
31
30
|
* @returns The current state of the contract negotiation or an error.
|
|
32
31
|
*/
|
|
33
|
-
requestFromConsumer(message: IDataspaceProtocolContractRequestMessage, trustPayload: unknown
|
|
32
|
+
requestFromConsumer(message: IDataspaceProtocolContractRequestMessage, trustPayload: unknown): Promise<IDataspaceProtocolContractNegotiation | IDataspaceProtocolContractNegotiationError>;
|
|
34
33
|
/**
|
|
35
34
|
* An offer has been received by a consumer.
|
|
36
35
|
* @param message The offer being received by the consumer.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IComponent } from "@twin.org/core";
|
|
2
|
-
import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
3
2
|
import type { IDataspaceProtocolAgreement, IDataspaceProtocolOffer } from "@twin.org/standards-dataspace-protocol";
|
|
4
3
|
import type { IOdrlParty } from "@twin.org/standards-w3c-odrl";
|
|
4
|
+
import type { IRightsManagementInformation } from "../IRightsManagementInformation.js";
|
|
5
5
|
/**
|
|
6
6
|
* Interface describing a Policy Negotiator.
|
|
7
7
|
*/
|
|
@@ -18,9 +18,7 @@ export interface IPolicyNegotiator extends IComponent {
|
|
|
18
18
|
* @param information Information provided by the requester to determine if a policy can be created.
|
|
19
19
|
* @returns Sets the accepted flag if it can be offered, and the interventionRequired flag if manual agreement is needed.
|
|
20
20
|
*/
|
|
21
|
-
handleOffer(offer: IDataspaceProtocolOffer, information?: {
|
|
22
|
-
[id: string]: IJsonLdNodeObject;
|
|
23
|
-
}): Promise<{
|
|
21
|
+
handleOffer(offer: IDataspaceProtocolOffer, information?: IRightsManagementInformation): Promise<{
|
|
24
22
|
accepted: boolean;
|
|
25
23
|
interventionRequired: boolean;
|
|
26
24
|
}>;
|
|
@@ -31,7 +29,5 @@ export interface IPolicyNegotiator extends IComponent {
|
|
|
31
29
|
* @param information Information provided by the requester to aid in the creation of the agreement.
|
|
32
30
|
* @returns The agreement created from the offer or undefined if an agreement could not be created.
|
|
33
31
|
*/
|
|
34
|
-
createAgreement(offer: IDataspaceProtocolOffer, assignee: string | IOdrlParty, information?:
|
|
35
|
-
[id: string]: IJsonLdNodeObject;
|
|
36
|
-
}): Promise<IDataspaceProtocolAgreement | undefined>;
|
|
32
|
+
createAgreement(offer: IDataspaceProtocolOffer, assignee: string | IOdrlParty, information?: IRightsManagementInformation): Promise<IDataspaceProtocolAgreement | undefined>;
|
|
37
33
|
}
|
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.0.3-next.55](https://github.com/iotaledger/twin-rights-management/compare/rights-management-models-v0.0.3-next.54...rights-management-models-v0.0.3-next.55) (2026-06-18)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* remove hosting component ([#207](https://github.com/iotaledger/twin-rights-management/issues/207)) ([2a51690](https://github.com/iotaledger/twin-rights-management/commit/2a5169085b7df2245a474580e88b5b4e501006fe))
|
|
15
|
+
|
|
16
|
+
## [0.0.3-next.54](https://github.com/iotaledger/twin-rights-management/compare/rights-management-models-v0.0.3-next.53...rights-management-models-v0.0.3-next.54) (2026-06-18)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
* left operators ([#203](https://github.com/iotaledger/twin-rights-management/issues/203)) ([93dced6](https://github.com/iotaledger/twin-rights-management/commit/93dced6186097794ef5f3620bcf8cc86c0a77f9d))
|
|
22
|
+
|
|
9
23
|
## [0.0.3-next.53](https://github.com/iotaledger/twin-rights-management/compare/rights-management-models-v0.0.3-next.52...rights-management-models-v0.0.3-next.53) (2026-06-17)
|
|
10
24
|
|
|
11
25
|
|
package/docs/reference/index.md
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
## Interfaces
|
|
8
8
|
|
|
9
9
|
- [IRightsManagementAgreement](interfaces/IRightsManagementAgreement.md)
|
|
10
|
+
- [IRightsManagementInformation](interfaces/IRightsManagementInformation.md)
|
|
10
11
|
- [IRightsManagementOffer](interfaces/IRightsManagementOffer.md)
|
|
11
12
|
- [IRightsManagementPolicy](interfaces/IRightsManagementPolicy.md)
|
|
12
13
|
- [IRightsManagementPolicyMetadata](interfaces/IRightsManagementPolicyMetadata.md)
|
|
@@ -30,7 +30,10 @@ The agreement to evaluate.
|
|
|
30
30
|
|
|
31
31
|
##### information?
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
[`IRightsManagementInformation`](IRightsManagementInformation.md)
|
|
34
|
+
|
|
35
|
+
Named objects available to the arbiter during evaluation. Values are accessed
|
|
36
|
+
via JSONPath and may be any type - structured JSON-LD nodes, plain objects, or scalar primitives.
|
|
34
37
|
|
|
35
38
|
##### data?
|
|
36
39
|
|
|
@@ -12,7 +12,7 @@ it is making decisions.
|
|
|
12
12
|
|
|
13
13
|
### retrieve() {#retrieve}
|
|
14
14
|
|
|
15
|
-
> **retrieve**\<`D`\>(`policy`, `accessMode`, `data?`, `action?`): `Promise
|
|
15
|
+
> **retrieve**\<`D`\>(`policy`, `accessMode`, `data?`, `action?`): `Promise`\<[`IRightsManagementInformation`](IRightsManagementInformation.md)\>
|
|
16
16
|
|
|
17
17
|
Retrieve additional information which is relevant in the PDP decision making.
|
|
18
18
|
|
|
@@ -50,6 +50,6 @@ Optional action to make a decision on, if not provided, the PIP will evaluate al
|
|
|
50
50
|
|
|
51
51
|
#### Returns
|
|
52
52
|
|
|
53
|
-
`Promise
|
|
53
|
+
`Promise`\<[`IRightsManagementInformation`](IRightsManagementInformation.md)\>
|
|
54
54
|
|
|
55
55
|
Returns additional information based on the data and identities.
|
|
@@ -10,7 +10,7 @@ Interface for policy information sources.
|
|
|
10
10
|
|
|
11
11
|
### retrieve() {#retrieve}
|
|
12
12
|
|
|
13
|
-
> **retrieve**\<`D`\>(`policy`, `accessMode`, `data?`, `action?`): `Promise
|
|
13
|
+
> **retrieve**\<`D`\>(`policy`, `accessMode`, `data?`, `action?`): `Promise`\<[`IRightsManagementInformation`](IRightsManagementInformation.md) \| `undefined`\>
|
|
14
14
|
|
|
15
15
|
Retrieve information from the sources.
|
|
16
16
|
|
|
@@ -48,6 +48,6 @@ Optional action to make a decision on, if not provided, the PIP will evaluate al
|
|
|
48
48
|
|
|
49
49
|
#### Returns
|
|
50
50
|
|
|
51
|
-
`Promise
|
|
51
|
+
`Promise`\<[`IRightsManagementInformation`](IRightsManagementInformation.md) \| `undefined`\>
|
|
52
52
|
|
|
53
53
|
The objects containing relevant information or undefined if nothing relevant is found.
|
|
@@ -84,7 +84,7 @@ The negotiation id.
|
|
|
84
84
|
|
|
85
85
|
### requestFromConsumer() {#requestfromconsumer}
|
|
86
86
|
|
|
87
|
-
> **requestFromConsumer**(`message`, `trustPayload
|
|
87
|
+
> **requestFromConsumer**(`message`, `trustPayload`): `Promise`\<`IDataspaceProtocolContractNegotiation` \| `IDataspaceProtocolContractNegotiationError`\>
|
|
88
88
|
|
|
89
89
|
Processes an incoming request on a provider from a consumer.
|
|
90
90
|
|
|
@@ -102,12 +102,6 @@ The negotiation request.
|
|
|
102
102
|
|
|
103
103
|
Trust payload to verify the requesters identity.
|
|
104
104
|
|
|
105
|
-
##### publicOrigin?
|
|
106
|
-
|
|
107
|
-
`string`
|
|
108
|
-
|
|
109
|
-
The public origin url of this PNP service.
|
|
110
|
-
|
|
111
105
|
#### Returns
|
|
112
106
|
|
|
113
107
|
`Promise`\<`IDataspaceProtocolContractNegotiation` \| `IDataspaceProtocolContractNegotiationError`\>
|
|
@@ -46,6 +46,8 @@ The offer to check.
|
|
|
46
46
|
|
|
47
47
|
##### information?
|
|
48
48
|
|
|
49
|
+
[`IRightsManagementInformation`](IRightsManagementInformation.md)
|
|
50
|
+
|
|
49
51
|
Information provided by the requester to determine if a policy can be created.
|
|
50
52
|
|
|
51
53
|
#### Returns
|
|
@@ -78,6 +80,8 @@ The assignee of the agreement.
|
|
|
78
80
|
|
|
79
81
|
##### information?
|
|
80
82
|
|
|
83
|
+
[`IRightsManagementInformation`](IRightsManagementInformation.md)
|
|
84
|
+
|
|
81
85
|
Information provided by the requester to aid in the creation of the agreement.
|
|
82
86
|
|
|
83
87
|
#### Returns
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Interface: IRightsManagementInformation
|
|
2
|
+
|
|
3
|
+
Named objects available to the rights management components during policy evaluation.
|
|
4
|
+
Values are accessed via JSONPath and may be any type - structured JSON-LD nodes,
|
|
5
|
+
plain objects, or scalar primitives.
|
|
6
|
+
|
|
7
|
+
## Indexable
|
|
8
|
+
|
|
9
|
+
> \[`id`: `string`\]: `unknown`
|
package/package.json
CHANGED