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

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 CHANGED
@@ -27,7 +27,6 @@ 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
30
  export * from "./models/api/pnap/IPnapCreateRequest.js";
32
31
  export * from "./models/api/pnap/IPnapGetRequest.js";
33
32
  export * from "./models/api/pnap/IPnapGetResponse.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,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"]}
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,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/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"]}
@@ -1,2 +1,4 @@
1
+ // Copyright 2026 IOTA Stiftung.
2
+ // SPDX-License-Identifier: Apache-2.0.
1
3
  export {};
2
4
  //# sourceMappingURL=IPnapCreateRequest.js.map
@@ -1 +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
+ {"version":3,"file":"IPnapCreateRequest.js","sourceRoot":"","sources":["../../../../../src/models/api/pnap/IPnapCreateRequest.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\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: {\n\t\t/**\n\t\t * The consumer-side negotiation identifier (DSP consumerPid).\n\t\t */\n\t\tid: string;\n\t};\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\";\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
+ {"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 * @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 * @param id The consumer-side negotiation identifier.\n\t * @returns The negotiation id (same as the caller-supplied id).\n\t */\n\tcreate(id: string): 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"]}
@@ -25,7 +25,6 @@ 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
28
  export * from "./models/api/pnap/IPnapCreateRequest.js";
30
29
  export * from "./models/api/pnap/IPnapGetRequest.js";
31
30
  export * from "./models/api/pnap/IPnapGetResponse.js";
@@ -1,4 +1,3 @@
1
- import type { IPnapCreateBody } from "./IPnapCreateBody.js";
2
1
  /**
3
2
  * The request structure for creating a policy negotiation entry.
4
3
  */
@@ -6,5 +5,10 @@ export interface IPnapCreateRequest {
6
5
  /**
7
6
  * The partial negotiation to pre-register.
8
7
  */
9
- body: IPnapCreateBody;
8
+ body: {
9
+ /**
10
+ * The consumer-side negotiation identifier (DSP consumerPid).
11
+ */
12
+ id: string;
13
+ };
10
14
  }
@@ -1,7 +1,6 @@
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";
5
4
  /**
6
5
  * Interface describing a Policy Negotiation Admin Point (PNAP) contract.
7
6
  * Components performs administration tasks on the policy negotiations.
@@ -11,11 +10,10 @@ export interface IPolicyNegotiationAdminPointComponent extends IComponent {
11
10
  /**
12
11
  * Pre-registers a consumer-side negotiation entry.
13
12
  * 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.
13
+ * @param id The consumer-side negotiation identifier.
16
14
  * @returns The negotiation id (same as the caller-supplied id).
17
15
  */
18
- create(negotiation: IPnapCreateBody): Promise<string>;
16
+ create(id: string): Promise<string>;
19
17
  /**
20
18
  * Retrieves a policy negotiation.
21
19
  * @param id The ID of the policy to retrieve the negotiation for.
package/docs/changelog.md CHANGED
@@ -6,6 +6,13 @@
6
6
 
7
7
  * remove EcosystemPolicy models/DTOs and standardize policy typing on `OdrlPolicyType` for v2.
8
8
 
9
+ ## [0.0.3-next.50](https://github.com/iotaledger/twin-rights-management/compare/rights-management-models-v0.0.3-next.49...rights-management-models-v0.0.3-next.50) (2026-06-15)
10
+
11
+
12
+ ### Features
13
+
14
+ * simplify pnap create request ([be4dfe7](https://github.com/iotaledger/twin-rights-management/commit/be4dfe726a0bc7af11eb05cfd0525e7bff8a7d98))
15
+
9
16
  ## [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
17
 
11
18
 
@@ -60,7 +60,6 @@
60
60
  - [IRightsManagementOffer](type-aliases/IRightsManagementOffer.md)
61
61
  - [IRightsManagementPolicy](type-aliases/IRightsManagementPolicy.md)
62
62
  - [IRightsManagementSet](type-aliases/IRightsManagementSet.md)
63
- - [IPnapCreateBody](type-aliases/IPnapCreateBody.md)
64
63
  - [OdrlProfiles](type-aliases/OdrlProfiles.md)
65
64
  - [PolicyDecision](type-aliases/PolicyDecision.md)
66
65
  - [PolicyDecisionStage](type-aliases/PolicyDecisionStage.md)
@@ -6,6 +6,12 @@ The request structure for creating a policy negotiation entry.
6
6
 
7
7
  ### body {#body}
8
8
 
9
- > **body**: [`IPnapCreateBody`](../type-aliases/IPnapCreateBody.md)
9
+ > **body**: `object`
10
10
 
11
11
  The partial negotiation to pre-register.
12
+
13
+ #### id
14
+
15
+ > **id**: `string`
16
+
17
+ The consumer-side negotiation identifier (DSP consumerPid).
@@ -15,19 +15,18 @@ https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1/#nego
15
15
 
16
16
  ### create() {#create}
17
17
 
18
- > **create**(`negotiation`): `Promise`\<`string`\>
18
+ > **create**(`id`): `Promise`\<`string`\>
19
19
 
20
20
  Pre-registers a consumer-side negotiation entry.
21
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
22
 
24
23
  #### Parameters
25
24
 
26
- ##### negotiation
25
+ ##### id
27
26
 
28
- [`IPnapCreateBody`](../type-aliases/IPnapCreateBody.md)
27
+ `string`
29
28
 
30
- The partial negotiation data.
29
+ The consumer-side negotiation identifier.
31
30
 
32
31
  #### Returns
33
32
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/rights-management-models",
3
- "version": "0.0.3-next.49",
3
+ "version": "0.0.3-next.50",
4
4
  "description": "Data model definitions for rights management policies, negotiations, and service contracts.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=IPnapCreateBody.js.map
@@ -1 +0,0 @@
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"]}
@@ -1,17 +0,0 @@
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
- };
@@ -1,20 +0,0 @@
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.