@twin.org/rights-management-models 0.0.3-next.47 → 0.0.3-next.49

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.
Files changed (38) hide show
  1. package/dist/es/index.js +2 -0
  2. package/dist/es/index.js.map +1 -1
  3. package/dist/es/models/api/pnap/IPnapCreateBody.js +2 -0
  4. package/dist/es/models/api/pnap/IPnapCreateBody.js.map +1 -0
  5. package/dist/es/models/api/pnap/IPnapCreateRequest.js +2 -0
  6. package/dist/es/models/api/pnap/IPnapCreateRequest.js.map +1 -0
  7. package/dist/es/models/pap/IPolicyAdministrationPointComponent.js.map +1 -1
  8. package/dist/es/models/pdp/IPolicyDecision.js.map +1 -1
  9. package/dist/es/models/pip/IPolicyInformationPointComponent.js.map +1 -1
  10. package/dist/es/models/pnp/IPolicyNegotiationAdminPointComponent.js.map +1 -1
  11. package/dist/es/models/pnp/IPolicyNegotiationPointComponent.js.map +1 -1
  12. package/dist/es/models/pnp/IPolicyNegotiator.js.map +1 -1
  13. package/dist/es/models/pnp/IPolicyRequester.js.map +1 -1
  14. package/dist/es/models/pxp/IPolicyExecutionPointComponent.js.map +1 -1
  15. package/dist/types/index.d.ts +2 -0
  16. package/dist/types/models/api/pnap/IPnapCreateBody.d.ts +17 -0
  17. package/dist/types/models/api/pnap/IPnapCreateRequest.d.ts +10 -0
  18. package/dist/types/models/pap/IPolicyAdministrationPointComponent.d.ts +2 -2
  19. package/dist/types/models/pdp/IPolicyDecision.d.ts +1 -1
  20. package/dist/types/models/pip/IPolicyInformationPointComponent.d.ts +1 -1
  21. package/dist/types/models/pnp/IPolicyNegotiationAdminPointComponent.d.ts +12 -3
  22. package/dist/types/models/pnp/IPolicyNegotiationPointComponent.d.ts +1 -1
  23. package/dist/types/models/pnp/IPolicyNegotiator.d.ts +1 -1
  24. package/dist/types/models/pnp/IPolicyRequester.d.ts +2 -2
  25. package/dist/types/models/pxp/IPolicyExecutionPointComponent.d.ts +1 -1
  26. package/docs/changelog.md +14 -0
  27. package/docs/reference/index.md +2 -0
  28. package/docs/reference/interfaces/IPnapCreateRequest.md +11 -0
  29. package/docs/reference/interfaces/IPolicyAdministrationPointComponent.md +2 -2
  30. package/docs/reference/interfaces/IPolicyDecision.md +1 -1
  31. package/docs/reference/interfaces/IPolicyExecutionPointComponent.md +1 -1
  32. package/docs/reference/interfaces/IPolicyInformationPointComponent.md +1 -1
  33. package/docs/reference/interfaces/IPolicyNegotiationAdminPointComponent.md +29 -2
  34. package/docs/reference/interfaces/IPolicyNegotiationPointComponent.md +3 -0
  35. package/docs/reference/interfaces/IPolicyNegotiator.md +1 -1
  36. package/docs/reference/interfaces/IPolicyRequester.md +2 -2
  37. package/docs/reference/type-aliases/IPnapCreateBody.md +20 -0
  38. package/package.json +1 -1
package/dist/es/index.js CHANGED
@@ -27,6 +27,8 @@ export * from "./models/api/pap/IPapQueryRequest.js";
27
27
  export * from "./models/api/pap/IPapQueryResponse.js";
28
28
  export * from "./models/api/pap/IPapRemoveRequest.js";
29
29
  export * from "./models/api/pap/IPapUpdateRequest.js";
30
+ export * from "./models/api/pnap/IPnapCreateBody.js";
31
+ export * from "./models/api/pnap/IPnapCreateRequest.js";
30
32
  export * from "./models/api/pnap/IPnapGetRequest.js";
31
33
  export * from "./models/api/pnap/IPnapGetResponse.js";
32
34
  export * from "./models/api/pnap/IPnapQueryRequest.js";
@@ -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,wCAAwC,CAAC;AACvD,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,mCAAmC,CAAC;AAClD,cAAc,kCAAkC,CAAC;AACjD,cAAc,0BAA0B,CAAC;AACzC,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,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,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,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/IRightsManagementAgreement.js\";\nexport * from \"./models/IRightsManagementOffer.js\";\nexport * from \"./models/IRightsManagementPolicy.js\";\nexport * from \"./models/IRightsManagementPolicyMetadata.js\";\nexport * from \"./models/policyMetadataContext.js\";\nexport * from \"./models/IRightsManagementSet.js\";\nexport * from \"./models/odrlProfiles.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/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/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/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,wCAAwC,CAAC;AACvD,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,mCAAmC,CAAC;AAClD,cAAc,kCAAkC,CAAC;AACjD,cAAc,0BAA0B,CAAC;AACzC,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,sCAAsC,CAAC;AACrD,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,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,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/IRightsManagementAgreement.js\";\nexport * from \"./models/IRightsManagementOffer.js\";\nexport * from \"./models/IRightsManagementPolicy.js\";\nexport * from \"./models/IRightsManagementPolicyMetadata.js\";\nexport * from \"./models/policyMetadataContext.js\";\nexport * from \"./models/IRightsManagementSet.js\";\nexport * from \"./models/odrlProfiles.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/IPnapCreateBody.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/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/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,2 @@
1
+ export {};
2
+ //# sourceMappingURL=IPnapCreateBody.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IPnapCreateBody.js","sourceRoot":"","sources":["../../../../../src/models/api/pnap/IPnapCreateBody.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IPolicyNegotiation } from \"../../pnp/IPolicyNegotiation.js\";\n\n/**\n * The body of a PNAP create request.\n * dateCreated, organizationIdentity and correlationId are server-managed and must not be supplied.\n * id must be the consumer's chosen consumerPid — it becomes the primary key used by offerFromProvider().\n *\n * Only id needs to be supplied for a correct pre-registration. All other optional fields are\n * unsupported at pre-registration time. In particular, supplying a state other than REQUESTED\n * will cause offerFromProvider() to reject the incoming ContractOfferMessage (it requires\n * state === REQUESTED at policyNegotiationPointService.ts).\n */\nexport type IPnapCreateBody = Omit<\n\tPartial<IPolicyNegotiation>,\n\t\"dateCreated\" | \"organizationIdentity\" | \"correlationId\"\n> & {\n\t/**\n\t * The consumer-side negotiation identifier (DSP consumerPid). Stored as the primary key.\n\t */\n\tid: string;\n};\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=IPnapCreateRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IPnapCreateRequest.js","sourceRoot":"","sources":["../../../../../src/models/api/pnap/IPnapCreateRequest.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IPnapCreateBody } from \"./IPnapCreateBody.js\";\n\n/**\n * The request structure for creating a policy negotiation entry.\n */\nexport interface IPnapCreateRequest {\n\t/**\n\t * The partial negotiation to pre-register.\n\t */\n\tbody: IPnapCreateBody;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IPolicyAdministrationPointComponent.js","sourceRoot":"","sources":["../../../../src/models/pap/IPolicyAdministrationPointComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type { JsonLdObjectWithOptionalAtId } from \"@twin.org/data-json-ld\";\nimport type { EntityCondition } from \"@twin.org/entity\";\nimport type { IRightsManagementAgreement } from \"../IRightsManagementAgreement.js\";\nimport type { IRightsManagementOffer } from \"../IRightsManagementOffer.js\";\nimport type { IRightsManagementPolicy } from \"../IRightsManagementPolicy.js\";\nimport type { IRightsManagementSet } from \"../IRightsManagementSet.js\";\n\n/**\n * Interface describing a Policy Administration Point (PAP) component that manages ODRL policies.\n */\nexport interface IPolicyAdministrationPointComponent extends IComponent {\n\t/**\n\t * Create a new policy with auto-generated UID.\n\t * @param policy The policy to create (uid will be auto-generated).\n\t * @returns The UID of the created policy.\n\t */\n\tcreate(policy: JsonLdObjectWithOptionalAtId<IRightsManagementPolicy>): Promise<string>;\n\n\t/**\n\t * Update an existing policy.\n\t * @param policy The policy to update (must include uid).\n\t * @returns Nothing.\n\t */\n\tupdate(policy: IRightsManagementPolicy): Promise<void>;\n\n\t/**\n\t * Get a policy.\n\t * @param policyId The id of the policy to get.\n\t * @returns The policy.\n\t */\n\tget(policyId: string): Promise<IRightsManagementPolicy>;\n\n\t/**\n\t * Get an agreement.\n\t * @param agreementId The id of the agreement to get.\n\t * @returns The agreement.\n\t */\n\tgetAgreement(agreementId: string): Promise<IRightsManagementAgreement>;\n\n\t/**\n\t * Get a set.\n\t * @param setId The id of the set to get.\n\t * @returns The set.\n\t */\n\tgetSet(setId: string): Promise<IRightsManagementSet>;\n\n\t/**\n\t * Get an offer.\n\t * @param offerId The id of the offer to get.\n\t * @returns The offer.\n\t */\n\tgetOffer(offerId: string): Promise<IRightsManagementOffer>;\n\n\t/**\n\t * Remove a policy.\n\t * @param policyId The id of the policy to remove.\n\t * @returns Nothing.\n\t */\n\tremove(policyId: string): Promise<void>;\n\n\t/**\n\t * Query the policies using the specified conditions.\n\t * @param options Optional options to filter by assigner or assignee.\n\t * @param options.assigner The assigner to filter by.\n\t * @param options.assignee The assignee to filter by.\n\t * @param options.target The target to filter by.\n\t * @param options.action The action to filter by.\n\t * @param conditions The conditions to use for the query.\n\t * @param cursor The cursor to use for pagination.\n\t * @param limit The number of results to return per page.\n\t * @returns Cursor for next page of results and the policies matching the query.\n\t */\n\tquery(\n\t\toptions?: {\n\t\t\tassigner?: string;\n\t\t\tassignee?: string;\n\t\t\ttarget?: string;\n\t\t\taction?: string;\n\t\t},\n\t\tconditions?: EntityCondition<IRightsManagementPolicy>,\n\t\tcursor?: string,\n\t\tlimit?: number\n\t): Promise<{\n\t\t/**\n\t\t * The cursor for the next page of results.\n\t\t */\n\t\tcursor?: string;\n\n\t\t/**\n\t\t * The policies that match the query.\n\t\t */\n\t\tpolicies: IRightsManagementPolicy[];\n\t}>;\n}\n"]}
1
+ {"version":3,"file":"IPolicyAdministrationPointComponent.js","sourceRoot":"","sources":["../../../../src/models/pap/IPolicyAdministrationPointComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type { JsonLdObjectWithOptionalAtId } from \"@twin.org/data-json-ld\";\nimport type { EntityCondition } from \"@twin.org/entity\";\nimport type { IRightsManagementAgreement } from \"../IRightsManagementAgreement.js\";\nimport type { IRightsManagementOffer } from \"../IRightsManagementOffer.js\";\nimport type { IRightsManagementPolicy } from \"../IRightsManagementPolicy.js\";\nimport type { IRightsManagementSet } from \"../IRightsManagementSet.js\";\n\n/**\n * Interface describing a Policy Administration Point (PAP) component that manages ODRL policies.\n */\nexport interface IPolicyAdministrationPointComponent extends IComponent {\n\t/**\n\t * Create a new policy with auto-generated UID.\n\t * @param policy The policy to create (uid will be auto-generated).\n\t * @returns The UID of the created policy.\n\t */\n\tcreate(policy: JsonLdObjectWithOptionalAtId<IRightsManagementPolicy>): Promise<string>;\n\n\t/**\n\t * Update an existing policy.\n\t * @param policy The policy to update (must include uid).\n\t * @returns A promise that resolves when the policy has been updated.\n\t */\n\tupdate(policy: IRightsManagementPolicy): Promise<void>;\n\n\t/**\n\t * Get a policy.\n\t * @param policyId The id of the policy to get.\n\t * @returns The policy.\n\t */\n\tget(policyId: string): Promise<IRightsManagementPolicy>;\n\n\t/**\n\t * Get an agreement.\n\t * @param agreementId The id of the agreement to get.\n\t * @returns The agreement.\n\t */\n\tgetAgreement(agreementId: string): Promise<IRightsManagementAgreement>;\n\n\t/**\n\t * Get a set.\n\t * @param setId The id of the set to get.\n\t * @returns The set.\n\t */\n\tgetSet(setId: string): Promise<IRightsManagementSet>;\n\n\t/**\n\t * Get an offer.\n\t * @param offerId The id of the offer to get.\n\t * @returns The offer.\n\t */\n\tgetOffer(offerId: string): Promise<IRightsManagementOffer>;\n\n\t/**\n\t * Remove a policy.\n\t * @param policyId The id of the policy to remove.\n\t * @returns A promise that resolves when the policy has been removed.\n\t */\n\tremove(policyId: string): Promise<void>;\n\n\t/**\n\t * Query the policies using the specified conditions.\n\t * @param options Optional options to filter by assigner or assignee.\n\t * @param options.assigner The assigner to filter by.\n\t * @param options.assignee The assignee to filter by.\n\t * @param options.target The target to filter by.\n\t * @param options.action The action to filter by.\n\t * @param conditions The conditions to use for the query.\n\t * @param cursor The cursor to use for pagination.\n\t * @param limit The number of results to return per page.\n\t * @returns Cursor for next page of results and the policies matching the query.\n\t */\n\tquery(\n\t\toptions?: {\n\t\t\tassigner?: string;\n\t\t\tassignee?: string;\n\t\t\ttarget?: string;\n\t\t\taction?: string;\n\t\t},\n\t\tconditions?: EntityCondition<IRightsManagementPolicy>,\n\t\tcursor?: string,\n\t\tlimit?: number\n\t): Promise<{\n\t\t/**\n\t\t * The cursor for the next page of results.\n\t\t */\n\t\tcursor?: string;\n\n\t\t/**\n\t\t * The policies that match the query.\n\t\t */\n\t\tpolicies: IRightsManagementPolicy[];\n\t}>;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IPolicyDecision.js","sourceRoot":"","sources":["../../../../src/models/pdp/IPolicyDecision.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { PolicyDecision } from \"./policyDecision.js\";\n\n/**\n * The information regarding a policy decision.\n */\nexport interface IPolicyDecision {\n\t/**\n\t * The target object for the decision, using JSON-path syntax.\n\t */\n\ttarget: string;\n\n\t/**\n\t * The type of the proof.\n\t */\n\tdecision: PolicyDecision;\n\n\t/**\n\t * The value to replace with, if decision is Replace.\n\t */\n\treplaceValue?: unknown;\n}\n"]}
1
+ {"version":3,"file":"IPolicyDecision.js","sourceRoot":"","sources":["../../../../src/models/pdp/IPolicyDecision.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { PolicyDecision } from \"./policyDecision.js\";\n\n/**\n * The information regarding a policy decision.\n */\nexport interface IPolicyDecision {\n\t/**\n\t * The target object for the decision, using JSON-path syntax.\n\t */\n\ttarget: string;\n\n\t/**\n\t * The outcome of the policy decision.\n\t */\n\tdecision: PolicyDecision;\n\n\t/**\n\t * The value to replace with, if decision is Replace.\n\t */\n\treplaceValue?: unknown;\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 { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { OdrlActionType } from \"@twin.org/standards-w3c-odrl\";\nimport type { IRightsManagementPolicy } from \"../IRightsManagementPolicy.js\";\nimport type { PolicyInformationAccessMode } from \"./policyInformationAccessMode.js\";\n\n/**\n * Interface describing a Policy Information Point (PEP) 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<{ [id: string]: IJsonLdNodeObject }>;\n}\n"]}
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 { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { OdrlActionType } from \"@twin.org/standards-w3c-odrl\";\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<{ [id: string]: IJsonLdNodeObject }>;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IPolicyNegotiationAdminPointComponent.js","sourceRoot":"","sources":["../../../../src/models/pnp/IPolicyNegotiationAdminPointComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type { DataspaceProtocolContractNegotiationStateType } from \"@twin.org/standards-dataspace-protocol\";\nimport type { IPolicyNegotiation } from \"./IPolicyNegotiation.js\";\n\n/**\n * Interface describing a Policy Negotiation Admin Point (PNAP) contract.\n * Components performs administration tasks on the policy negotiations.\n * https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1/#negotiation-protocol\n */\nexport interface IPolicyNegotiationAdminPointComponent extends IComponent {\n\t/**\n\t * Retrieves a policy negotiation.\n\t * @param id The ID of the policy to retrieve the negotiation for.\n\t * @returns The policy negotiation.\n\t */\n\tget(id: string): Promise<IPolicyNegotiation>;\n\n\t/**\n\t * Sets a policy negotiation.\n\t * @param negotiation The updated policy negotiation.\n\t * @returns Nothing.\n\t */\n\tset(negotiation: IPolicyNegotiation): Promise<void>;\n\n\t/**\n\t * Cancels an ongoing negotiation for a resource.\n\t * @param policyId The ID of the policy to cancel.\n\t * @returns Nothing.\n\t */\n\tremove(policyId: string): Promise<void>;\n\n\t/**\n\t * Get a list of the negotiations.\n\t * @param status The state of the negotiations to retrieve.\n\t * @param cursor The cursor to use for pagination.\n\t * @returns A list of negotiations and cursor if there are more entries.\n\t */\n\tquery(\n\t\tstatus?: DataspaceProtocolContractNegotiationStateType,\n\t\tcursor?: string\n\t): Promise<{ items: IPolicyNegotiation[]; cursor?: string }>;\n}\n"]}
1
+ {"version":3,"file":"IPolicyNegotiationAdminPointComponent.js","sourceRoot":"","sources":["../../../../src/models/pnp/IPolicyNegotiationAdminPointComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type { DataspaceProtocolContractNegotiationStateType } from \"@twin.org/standards-dataspace-protocol\";\nimport type { IPolicyNegotiation } from \"./IPolicyNegotiation.js\";\nimport type { IPnapCreateBody } from \"../api/pnap/IPnapCreateBody.js\";\n\n/**\n * Interface describing a Policy Negotiation Admin Point (PNAP) contract.\n * Components performs administration tasks on the policy negotiations.\n * @see https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1/#negotiation-protocol\n */\nexport interface IPolicyNegotiationAdminPointComponent extends IComponent {\n\t/**\n\t * Pre-registers a consumer-side negotiation entry.\n\t * id must be the consumer's chosen consumerPid — it becomes the primary key used by offerFromProvider().\n\t * dateCreated, organizationIdentity and correlationId are set by the service.\n\t * @param negotiation The partial negotiation data.\n\t * @returns The negotiation id (same as the caller-supplied id).\n\t */\n\tcreate(negotiation: IPnapCreateBody): Promise<string>;\n\n\t/**\n\t * Retrieves a policy negotiation.\n\t * @param id The ID of the policy to retrieve the negotiation for.\n\t * @returns The policy negotiation.\n\t */\n\tget(id: string): Promise<IPolicyNegotiation>;\n\n\t/**\n\t * Sets a policy negotiation.\n\t * @param negotiation The updated policy negotiation.\n\t * @returns A promise that resolves when the negotiation has been stored.\n\t */\n\tset(negotiation: IPolicyNegotiation): Promise<void>;\n\n\t/**\n\t * Cancels an ongoing negotiation for a resource.\n\t * @param policyId The ID of the policy to cancel.\n\t * @returns A promise that resolves when the negotiation has been removed.\n\t */\n\tremove(policyId: string): Promise<void>;\n\n\t/**\n\t * Get a list of the negotiations.\n\t * @param status The state of the negotiations to retrieve.\n\t * @param cursor The cursor to use for pagination.\n\t * @returns A list of negotiations and cursor if there are more entries.\n\t */\n\tquery(\n\t\tstatus?: DataspaceProtocolContractNegotiationStateType,\n\t\tcursor?: string\n\t): Promise<{ items: IPolicyNegotiation[]; cursor?: string }>;\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 * 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 * @param publicOrigin The public origin url of this PNP service.\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\tpublicOrigin?: string\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
+ {"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 * @param publicOrigin The public origin url of this PNP service.\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\tpublicOrigin?: string\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 { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type {\n\tIDataspaceProtocolAgreement,\n\tIDataspaceProtocolOffer\n} from \"@twin.org/standards-dataspace-protocol\";\nimport type { IOdrlParty } from \"@twin.org/standards-w3c-odrl\";\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 Sets the supports flag if it can be offered, and the interventionRequired flag if manual agreement is needed.\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?: { [id: string]: IJsonLdNodeObject }\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?: { [id: string]: IJsonLdNodeObject }\n\t): Promise<IDataspaceProtocolAgreement | undefined>;\n}\n"]}
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 { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type {\n\tIDataspaceProtocolAgreement,\n\tIDataspaceProtocolOffer\n} from \"@twin.org/standards-dataspace-protocol\";\nimport type { IOdrlParty } from \"@twin.org/standards-w3c-odrl\";\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?: { [id: string]: IJsonLdNodeObject }\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?: { [id: string]: IJsonLdNodeObject }\n\t): Promise<IDataspaceProtocolAgreement | undefined>;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IPolicyRequester.js","sourceRoot":"","sources":["../../../../src/models/pnp/IPolicyRequester.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type { JsonLdObjectWithOptionalContext } from \"@twin.org/data-json-ld\";\nimport type {\n\tIDataspaceProtocolAgreement,\n\tIDataspaceProtocolOffer\n} from \"@twin.org/standards-dataspace-protocol\";\n\n/**\n * Interface describing a Policy Requester.\n */\nexport interface IPolicyRequester extends IComponent {\n\t/**\n\t * A policy has been offered by a provider, let the requester know about it.\n\t * @param negotiationId The id of the negotiation.\n\t * @param offer The offer sent by the provider.\n\t * @returns True if the offer was accepted, false otherwise.\n\t */\n\toffer(\n\t\tnegotiationId: string,\n\t\toffer: JsonLdObjectWithOptionalContext<IDataspaceProtocolOffer>\n\t): Promise<boolean>;\n\n\t/**\n\t * A policy agreement has been sent by a provider, let the requester know about it.\n\t * @param negotiationId The id of the negotiation.\n\t * @param agreement The agreement sent by the provider.\n\t * @returns True if the agreement was accepted, false otherwise.\n\t */\n\tagreement(\n\t\tnegotiationId: string,\n\t\tagreement: JsonLdObjectWithOptionalContext<IDataspaceProtocolAgreement>\n\t): Promise<boolean>;\n\n\t/**\n\t * A policy finalisation has been sent by a provider, let the requester know about it.\n\t * @param negotiationId The id of the negotiation.\n\t * @returns Nothing.\n\t */\n\tfinalised(negotiationId: string): Promise<void>;\n\n\t/**\n\t * A policy termination has been sent by a provider, let the requester know about it.\n\t * @param negotiationId The id of the negotiation.\n\t * @returns Nothing.\n\t */\n\tterminated(negotiationId: string): Promise<void>;\n}\n"]}
1
+ {"version":3,"file":"IPolicyRequester.js","sourceRoot":"","sources":["../../../../src/models/pnp/IPolicyRequester.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type { JsonLdObjectWithOptionalContext } from \"@twin.org/data-json-ld\";\nimport type {\n\tIDataspaceProtocolAgreement,\n\tIDataspaceProtocolOffer\n} from \"@twin.org/standards-dataspace-protocol\";\n\n/**\n * Interface describing a Policy Requester.\n */\nexport interface IPolicyRequester extends IComponent {\n\t/**\n\t * A policy has been offered by a provider, let the requester know about it.\n\t * @param negotiationId The id of the negotiation.\n\t * @param offer The offer sent by the provider.\n\t * @returns True if the offer was accepted, false otherwise.\n\t */\n\toffer(\n\t\tnegotiationId: string,\n\t\toffer: JsonLdObjectWithOptionalContext<IDataspaceProtocolOffer>\n\t): Promise<boolean>;\n\n\t/**\n\t * A policy agreement has been sent by a provider, let the requester know about it.\n\t * @param negotiationId The id of the negotiation.\n\t * @param agreement The agreement sent by the provider.\n\t * @returns True if the agreement was accepted, false otherwise.\n\t */\n\tagreement(\n\t\tnegotiationId: string,\n\t\tagreement: JsonLdObjectWithOptionalContext<IDataspaceProtocolAgreement>\n\t): Promise<boolean>;\n\n\t/**\n\t * A policy finalisation has been sent by a provider, let the requester know about it.\n\t * @param negotiationId The id of the negotiation.\n\t * @returns A promise that resolves when the finalisation has been processed.\n\t */\n\tfinalised(negotiationId: string): Promise<void>;\n\n\t/**\n\t * A policy termination has been sent by a provider, let the requester know about it.\n\t * @param negotiationId The id of the negotiation.\n\t * @returns A promise that resolves when the termination has been processed.\n\t */\n\tterminated(negotiationId: string): Promise<void>;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IPolicyExecutionPointComponent.js","sourceRoot":"","sources":["../../../../src/models/pxp/IPolicyExecutionPointComponent.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 { IRightsManagementPolicy } from \"../IRightsManagementPolicy.js\";\nimport type { IPolicyDecision } from \"../pdp/IPolicyDecision.js\";\nimport type { PolicyDecisionStage } from \"../pdp/policyDecisionStage.js\";\n\n/**\n * Interface describing a Policy Execution Point (PXP) contract.\n * When a decision is made by the Policy Decision Point (PDP),\n * the Policy Execution Point (PXP) will execute any\n * registered actions based on the decision.\n */\nexport interface IPolicyExecutionPointComponent extends IComponent {\n\t/**\n\t * Execute actions based on the PDP's decisions.\n\t * @param policy The policy that applied to the data.\n\t * @param decisions The decisions made by the PDP.\n\t * @param data The data used in the decision by the PDP.\n\t * @param action The action that was evaluated.\n\t * @param stage The stage at which the PXP is executed in the PDP.\n\t * @returns Nothing.\n\t */\n\texecuteActions<D = unknown>(\n\t\tpolicy: IRightsManagementPolicy,\n\t\tdecisions: IPolicyDecision[],\n\t\tdata: D | undefined,\n\t\taction: OdrlActionType | string | undefined,\n\t\tstage: PolicyDecisionStage\n\t): Promise<void>;\n}\n"]}
1
+ {"version":3,"file":"IPolicyExecutionPointComponent.js","sourceRoot":"","sources":["../../../../src/models/pxp/IPolicyExecutionPointComponent.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 { IRightsManagementPolicy } from \"../IRightsManagementPolicy.js\";\nimport type { IPolicyDecision } from \"../pdp/IPolicyDecision.js\";\nimport type { PolicyDecisionStage } from \"../pdp/policyDecisionStage.js\";\n\n/**\n * Interface describing a Policy Execution Point (PXP) contract.\n * When a decision is made by the Policy Decision Point (PDP),\n * the Policy Execution Point (PXP) will execute any\n * registered actions based on the decision.\n */\nexport interface IPolicyExecutionPointComponent extends IComponent {\n\t/**\n\t * Execute actions based on the PDP's decisions.\n\t * @param policy The policy that applied to the data.\n\t * @param decisions The decisions made by the PDP.\n\t * @param data The data used in the decision by the PDP.\n\t * @param action The action that was evaluated.\n\t * @param stage The stage at which the PXP is executed in the PDP.\n\t * @returns A promise that resolves when all registered actions have been executed.\n\t */\n\texecuteActions<D = unknown>(\n\t\tpolicy: IRightsManagementPolicy,\n\t\tdecisions: IPolicyDecision[],\n\t\tdata: D | undefined,\n\t\taction: OdrlActionType | string | undefined,\n\t\tstage: PolicyDecisionStage\n\t): Promise<void>;\n}\n"]}
@@ -25,6 +25,8 @@ export * from "./models/api/pap/IPapQueryRequest.js";
25
25
  export * from "./models/api/pap/IPapQueryResponse.js";
26
26
  export * from "./models/api/pap/IPapRemoveRequest.js";
27
27
  export * from "./models/api/pap/IPapUpdateRequest.js";
28
+ export * from "./models/api/pnap/IPnapCreateBody.js";
29
+ export * from "./models/api/pnap/IPnapCreateRequest.js";
28
30
  export * from "./models/api/pnap/IPnapGetRequest.js";
29
31
  export * from "./models/api/pnap/IPnapGetResponse.js";
30
32
  export * from "./models/api/pnap/IPnapQueryRequest.js";
@@ -0,0 +1,17 @@
1
+ import type { IPolicyNegotiation } from "../../pnp/IPolicyNegotiation.js";
2
+ /**
3
+ * The body of a PNAP create request.
4
+ * dateCreated, organizationIdentity and correlationId are server-managed and must not be supplied.
5
+ * id must be the consumer's chosen consumerPid — it becomes the primary key used by offerFromProvider().
6
+ *
7
+ * Only id needs to be supplied for a correct pre-registration. All other optional fields are
8
+ * unsupported at pre-registration time. In particular, supplying a state other than REQUESTED
9
+ * will cause offerFromProvider() to reject the incoming ContractOfferMessage (it requires
10
+ * state === REQUESTED at policyNegotiationPointService.ts).
11
+ */
12
+ export type IPnapCreateBody = Omit<Partial<IPolicyNegotiation>, "dateCreated" | "organizationIdentity" | "correlationId"> & {
13
+ /**
14
+ * The consumer-side negotiation identifier (DSP consumerPid). Stored as the primary key.
15
+ */
16
+ id: string;
17
+ };
@@ -0,0 +1,10 @@
1
+ import type { IPnapCreateBody } from "./IPnapCreateBody.js";
2
+ /**
3
+ * The request structure for creating a policy negotiation entry.
4
+ */
5
+ export interface IPnapCreateRequest {
6
+ /**
7
+ * The partial negotiation to pre-register.
8
+ */
9
+ body: IPnapCreateBody;
10
+ }
@@ -18,7 +18,7 @@ export interface IPolicyAdministrationPointComponent extends IComponent {
18
18
  /**
19
19
  * Update an existing policy.
20
20
  * @param policy The policy to update (must include uid).
21
- * @returns Nothing.
21
+ * @returns A promise that resolves when the policy has been updated.
22
22
  */
23
23
  update(policy: IRightsManagementPolicy): Promise<void>;
24
24
  /**
@@ -48,7 +48,7 @@ export interface IPolicyAdministrationPointComponent extends IComponent {
48
48
  /**
49
49
  * Remove a policy.
50
50
  * @param policyId The id of the policy to remove.
51
- * @returns Nothing.
51
+ * @returns A promise that resolves when the policy has been removed.
52
52
  */
53
53
  remove(policyId: string): Promise<void>;
54
54
  /**
@@ -8,7 +8,7 @@ export interface IPolicyDecision {
8
8
  */
9
9
  target: string;
10
10
  /**
11
- * The type of the proof.
11
+ * The outcome of the policy decision.
12
12
  */
13
13
  decision: PolicyDecision;
14
14
  /**
@@ -4,7 +4,7 @@ import type { OdrlActionType } from "@twin.org/standards-w3c-odrl";
4
4
  import type { IRightsManagementPolicy } from "../IRightsManagementPolicy.js";
5
5
  import type { PolicyInformationAccessMode } from "./policyInformationAccessMode.js";
6
6
  /**
7
- * Interface describing a Policy Information Point (PEP) contract.
7
+ * Interface describing a Policy Information Point (PIP) contract.
8
8
  * Provides additional information to the Policy Decision Point (PDP) when
9
9
  * it is making decisions.
10
10
  */
@@ -1,12 +1,21 @@
1
1
  import type { IComponent } from "@twin.org/core";
2
2
  import type { DataspaceProtocolContractNegotiationStateType } from "@twin.org/standards-dataspace-protocol";
3
3
  import type { IPolicyNegotiation } from "./IPolicyNegotiation.js";
4
+ import type { IPnapCreateBody } from "../api/pnap/IPnapCreateBody.js";
4
5
  /**
5
6
  * Interface describing a Policy Negotiation Admin Point (PNAP) contract.
6
7
  * Components performs administration tasks on the policy negotiations.
7
- * https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1/#negotiation-protocol
8
+ * @see https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1/#negotiation-protocol
8
9
  */
9
10
  export interface IPolicyNegotiationAdminPointComponent extends IComponent {
11
+ /**
12
+ * Pre-registers a consumer-side negotiation entry.
13
+ * id must be the consumer's chosen consumerPid — it becomes the primary key used by offerFromProvider().
14
+ * dateCreated, organizationIdentity and correlationId are set by the service.
15
+ * @param negotiation The partial negotiation data.
16
+ * @returns The negotiation id (same as the caller-supplied id).
17
+ */
18
+ create(negotiation: IPnapCreateBody): Promise<string>;
10
19
  /**
11
20
  * Retrieves a policy negotiation.
12
21
  * @param id The ID of the policy to retrieve the negotiation for.
@@ -16,13 +25,13 @@ export interface IPolicyNegotiationAdminPointComponent extends IComponent {
16
25
  /**
17
26
  * Sets a policy negotiation.
18
27
  * @param negotiation The updated policy negotiation.
19
- * @returns Nothing.
28
+ * @returns A promise that resolves when the negotiation has been stored.
20
29
  */
21
30
  set(negotiation: IPolicyNegotiation): Promise<void>;
22
31
  /**
23
32
  * Cancels an ongoing negotiation for a resource.
24
33
  * @param policyId The ID of the policy to cancel.
25
- * @returns Nothing.
34
+ * @returns A promise that resolves when the negotiation has been removed.
26
35
  */
27
36
  remove(policyId: string): Promise<void>;
28
37
  /**
@@ -4,7 +4,7 @@ import type { IDataspaceProtocolContractAgreementMessage, IDataspaceProtocolCont
4
4
  * Interface describing a Policy Negotiation Point (PNP) contract.
5
5
  * When receiving a request from another component, the PNP will negotiate the terms
6
6
  * of the request and determine the appropriate policies to create.
7
- * https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1/#negotiation-protocol
7
+ * @see https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1/#negotiation-protocol
8
8
  */
9
9
  export interface IPolicyNegotiationPointComponent extends IComponent {
10
10
  /**
@@ -9,7 +9,7 @@ export interface IPolicyNegotiator extends IComponent {
9
9
  /**
10
10
  * Determines if the negotiator supports the given offer.
11
11
  * @param offer The offer to check.
12
- * @returns Sets the supports flag if it can be offered, and the interventionRequired flag if manual agreement is needed.
12
+ * @returns True if the negotiator supports the given offer.
13
13
  */
14
14
  supportsOffer(offer: IDataspaceProtocolOffer): boolean;
15
15
  /**
@@ -22,13 +22,13 @@ export interface IPolicyRequester extends IComponent {
22
22
  /**
23
23
  * A policy finalisation has been sent by a provider, let the requester know about it.
24
24
  * @param negotiationId The id of the negotiation.
25
- * @returns Nothing.
25
+ * @returns A promise that resolves when the finalisation has been processed.
26
26
  */
27
27
  finalised(negotiationId: string): Promise<void>;
28
28
  /**
29
29
  * A policy termination has been sent by a provider, let the requester know about it.
30
30
  * @param negotiationId The id of the negotiation.
31
- * @returns Nothing.
31
+ * @returns A promise that resolves when the termination has been processed.
32
32
  */
33
33
  terminated(negotiationId: string): Promise<void>;
34
34
  }
@@ -17,7 +17,7 @@ export interface IPolicyExecutionPointComponent extends IComponent {
17
17
  * @param data The data used in the decision by the PDP.
18
18
  * @param action The action that was evaluated.
19
19
  * @param stage The stage at which the PXP is executed in the PDP.
20
- * @returns Nothing.
20
+ * @returns A promise that resolves when all registered actions have been executed.
21
21
  */
22
22
  executeActions<D = unknown>(policy: IRightsManagementPolicy, decisions: IPolicyDecision[], data: D | undefined, action: OdrlActionType | string | undefined, stage: PolicyDecisionStage): Promise<void>;
23
23
  }
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.49](https://github.com/iotaledger/twin-rights-management/compare/rights-management-models-v0.0.3-next.48...rights-management-models-v0.0.3-next.49) (2026-06-15)
10
+
11
+
12
+ ### Miscellaneous Chores
13
+
14
+ * **rights-management-models:** Synchronize repo versions
15
+
16
+ ## [0.0.3-next.48](https://github.com/iotaledger/twin-rights-management/compare/rights-management-models-v0.0.3-next.47...rights-management-models-v0.0.3-next.48) (2026-06-15)
17
+
18
+
19
+ ### Features
20
+
21
+ * add create() to pre-register consumer-side contract negotiations ([#187](https://github.com/iotaledger/twin-rights-management/issues/187)) ([6007f83](https://github.com/iotaledger/twin-rights-management/commit/6007f83579cc8d4dbc4c2243fed0cbe948371f82))
22
+
9
23
  ## [0.0.3-next.47](https://github.com/iotaledger/twin-rights-management/compare/rights-management-models-v0.0.3-next.46...rights-management-models-v0.0.3-next.47) (2026-06-12)
10
24
 
11
25
 
@@ -20,6 +20,7 @@
20
20
  - [IPapQueryResponse](interfaces/IPapQueryResponse.md)
21
21
  - [IPapRemoveRequest](interfaces/IPapRemoveRequest.md)
22
22
  - [IPapUpdateRequest](interfaces/IPapUpdateRequest.md)
23
+ - [IPnapCreateRequest](interfaces/IPnapCreateRequest.md)
23
24
  - [IPnapGetRequest](interfaces/IPnapGetRequest.md)
24
25
  - [IPnapGetResponse](interfaces/IPnapGetResponse.md)
25
26
  - [IPnapQueryRequest](interfaces/IPnapQueryRequest.md)
@@ -59,6 +60,7 @@
59
60
  - [IRightsManagementOffer](type-aliases/IRightsManagementOffer.md)
60
61
  - [IRightsManagementPolicy](type-aliases/IRightsManagementPolicy.md)
61
62
  - [IRightsManagementSet](type-aliases/IRightsManagementSet.md)
63
+ - [IPnapCreateBody](type-aliases/IPnapCreateBody.md)
62
64
  - [OdrlProfiles](type-aliases/OdrlProfiles.md)
63
65
  - [PolicyDecision](type-aliases/PolicyDecision.md)
64
66
  - [PolicyDecisionStage](type-aliases/PolicyDecisionStage.md)
@@ -0,0 +1,11 @@
1
+ # Interface: IPnapCreateRequest
2
+
3
+ The request structure for creating a policy negotiation entry.
4
+
5
+ ## Properties
6
+
7
+ ### body {#body}
8
+
9
+ > **body**: [`IPnapCreateBody`](../type-aliases/IPnapCreateBody.md)
10
+
11
+ The partial negotiation to pre-register.
@@ -48,7 +48,7 @@ The policy to update (must include uid).
48
48
 
49
49
  `Promise`\<`void`\>
50
50
 
51
- Nothing.
51
+ A promise that resolves when the policy has been updated.
52
52
 
53
53
  ***
54
54
 
@@ -158,7 +158,7 @@ The id of the policy to remove.
158
158
 
159
159
  `Promise`\<`void`\>
160
160
 
161
- Nothing.
161
+ A promise that resolves when the policy has been removed.
162
162
 
163
163
  ***
164
164
 
@@ -16,7 +16,7 @@ The target object for the decision, using JSON-path syntax.
16
16
 
17
17
  > **decision**: [`PolicyDecision`](../type-aliases/PolicyDecision.md)
18
18
 
19
- The type of the proof.
19
+ The outcome of the policy decision.
20
20
 
21
21
  ***
22
22
 
@@ -59,4 +59,4 @@ The stage at which the PXP is executed in the PDP.
59
59
 
60
60
  `Promise`\<`void`\>
61
61
 
62
- Nothing.
62
+ A promise that resolves when all registered actions have been executed.
@@ -1,6 +1,6 @@
1
1
  # Interface: IPolicyInformationPointComponent
2
2
 
3
- Interface describing a Policy Information Point (PEP) contract.
3
+ Interface describing a Policy Information Point (PIP) contract.
4
4
  Provides additional information to the Policy Decision Point (PDP) when
5
5
  it is making decisions.
6
6
 
@@ -2,6 +2,9 @@
2
2
 
3
3
  Interface describing a Policy Negotiation Admin Point (PNAP) contract.
4
4
  Components performs administration tasks on the policy negotiations.
5
+
6
+ ## See
7
+
5
8
  https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1/#negotiation-protocol
6
9
 
7
10
  ## Extends
@@ -10,6 +13,30 @@ https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1/#nego
10
13
 
11
14
  ## Methods
12
15
 
16
+ ### create() {#create}
17
+
18
+ > **create**(`negotiation`): `Promise`\<`string`\>
19
+
20
+ Pre-registers a consumer-side negotiation entry.
21
+ id must be the consumer's chosen consumerPid — it becomes the primary key used by offerFromProvider().
22
+ dateCreated, organizationIdentity and correlationId are set by the service.
23
+
24
+ #### Parameters
25
+
26
+ ##### negotiation
27
+
28
+ [`IPnapCreateBody`](../type-aliases/IPnapCreateBody.md)
29
+
30
+ The partial negotiation data.
31
+
32
+ #### Returns
33
+
34
+ `Promise`\<`string`\>
35
+
36
+ The negotiation id (same as the caller-supplied id).
37
+
38
+ ***
39
+
13
40
  ### get() {#get}
14
41
 
15
42
  > **get**(`id`): `Promise`\<[`IPolicyNegotiation`](IPolicyNegotiation.md)\>
@@ -50,7 +77,7 @@ The updated policy negotiation.
50
77
 
51
78
  `Promise`\<`void`\>
52
79
 
53
- Nothing.
80
+ A promise that resolves when the negotiation has been stored.
54
81
 
55
82
  ***
56
83
 
@@ -72,7 +99,7 @@ The ID of the policy to cancel.
72
99
 
73
100
  `Promise`\<`void`\>
74
101
 
75
- Nothing.
102
+ A promise that resolves when the negotiation has been removed.
76
103
 
77
104
  ***
78
105
 
@@ -3,6 +3,9 @@
3
3
  Interface describing a Policy Negotiation Point (PNP) contract.
4
4
  When receiving a request from another component, the PNP will negotiate the terms
5
5
  of the request and determine the appropriate policies to create.
6
+
7
+ ## See
8
+
6
9
  https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1/#negotiation-protocol
7
10
 
8
11
  ## Extends
@@ -26,7 +26,7 @@ The offer to check.
26
26
 
27
27
  `boolean`
28
28
 
29
- Sets the supports flag if it can be offered, and the interventionRequired flag if manual agreement is needed.
29
+ True if the negotiator supports the given offer.
30
30
 
31
31
  ***
32
32
 
@@ -82,7 +82,7 @@ The id of the negotiation.
82
82
 
83
83
  `Promise`\<`void`\>
84
84
 
85
- Nothing.
85
+ A promise that resolves when the finalisation has been processed.
86
86
 
87
87
  ***
88
88
 
@@ -104,4 +104,4 @@ The id of the negotiation.
104
104
 
105
105
  `Promise`\<`void`\>
106
106
 
107
- Nothing.
107
+ A promise that resolves when the termination has been processed.
@@ -0,0 +1,20 @@
1
+ # Type Alias: IPnapCreateBody
2
+
3
+ > **IPnapCreateBody** = `Omit`\<`Partial`\<[`IPolicyNegotiation`](../interfaces/IPolicyNegotiation.md)\>, `"dateCreated"` \| `"organizationIdentity"` \| `"correlationId"`\> & `object`
4
+
5
+ The body of a PNAP create request.
6
+ dateCreated, organizationIdentity and correlationId are server-managed and must not be supplied.
7
+ id must be the consumer's chosen consumerPid — it becomes the primary key used by offerFromProvider().
8
+
9
+ Only id needs to be supplied for a correct pre-registration. All other optional fields are
10
+ unsupported at pre-registration time. In particular, supplying a state other than REQUESTED
11
+ will cause offerFromProvider() to reject the incoming ContractOfferMessage (it requires
12
+ state === REQUESTED at policyNegotiationPointService.ts).
13
+
14
+ ## Type Declaration
15
+
16
+ ### id
17
+
18
+ > **id**: `string`
19
+
20
+ The consumer-side negotiation identifier (DSP consumerPid). Stored as the primary key.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/rights-management-models",
3
- "version": "0.0.3-next.47",
3
+ "version": "0.0.3-next.49",
4
4
  "description": "Data model definitions for rights management policies, negotiations, and service contracts.",
5
5
  "repository": {
6
6
  "type": "git",