@twin.org/rights-management-models 0.0.3-next.54 → 0.0.3-next.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"IPolicyNegotiationPointComponent.js","sourceRoot":"","sources":["../../../../src/models/pnp/IPolicyNegotiationPointComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type {\n\tIDataspaceProtocolContractAgreementMessage,\n\tIDataspaceProtocolContractAgreementVerificationMessage,\n\tIDataspaceProtocolContractNegotiation,\n\tIDataspaceProtocolContractNegotiationError,\n\tIDataspaceProtocolContractNegotiationEventMessage,\n\tIDataspaceProtocolContractNegotiationTerminationMessage,\n\tIDataspaceProtocolContractOfferMessage,\n\tIDataspaceProtocolContractRequestMessage\n} from \"@twin.org/standards-dataspace-protocol\";\n\n/**\n * Interface describing a Policy Negotiation Point (PNP) contract.\n * When receiving a request from another component, the PNP will negotiate the terms\n * of the request and determine the appropriate policies to create.\n * @see https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1/#negotiation-protocol\n */\nexport interface IPolicyNegotiationPointComponent extends IComponent {\n\t/**\n\t * Get the current state of the negotiation.\n\t * @param id The id of the negotiation to retrieve.\n\t * @param trustPayload Trust payload to verify the requesters identity.\n\t * @returns The current state of the negotiation or an error.\n\t */\n\tgetNegotiation(\n\t\tid: string,\n\t\ttrustPayload: unknown\n\t): Promise<IDataspaceProtocolContractNegotiation | IDataspaceProtocolContractNegotiationError>;\n\n\t/**\n\t * Send a request to a provider.\n\t * @param url The url of the provider to send the request to.\n\t * @param requesterType The type of the requester to use for the request, will use the registered requester to provide update.\n\t * @param odrlOfferId The id of the offer to request.\n\t * @param publicOrigin The public origin url of this PNP service.\n\t * @returns The negotiation id.\n\t */\n\tsendRequestToProvider(\n\t\turl: string,\n\t\trequesterType: string,\n\t\todrlOfferId: string,\n\t\tpublicOrigin: string\n\t): Promise<string>;\n\n\t/**\n\t * Processes an incoming request on a provider from a consumer.\n\t * @param message The negotiation request.\n\t * @param trustPayload Trust payload to verify the requesters identity.\n\t * @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 * @returns The current state of the contract negotiation or an error.\n\t */\n\trequestFromConsumer(\n\t\tmessage: IDataspaceProtocolContractRequestMessage,\n\t\ttrustPayload: unknown\n\t): Promise<IDataspaceProtocolContractNegotiation | IDataspaceProtocolContractNegotiationError>;\n\n\t/**\n\t * An offer has been received by a consumer.\n\t * @param message The offer being received by the consumer.\n\t * @param trustPayload Trust payload to verify the requesters identity.\n\t * @returns The current state of the contract negotiation or an error.\n\t */\n\tofferFromProvider(\n\t\tmessage: IDataspaceProtocolContractOfferMessage,\n\t\ttrustPayload: unknown\n\t): Promise<IDataspaceProtocolContractNegotiation | IDataspaceProtocolContractNegotiationError>;\n\n\t/**\n\t * An agreement has been received by a consumer.\n\t * @param message The agreement message to send.\n\t * @param trustPayload Trust payload to verify the requesters identity.\n\t * @returns The error if there is one.\n\t */\n\tagreementFromProvider(\n\t\tmessage: IDataspaceProtocolContractAgreementMessage,\n\t\ttrustPayload: unknown\n\t): Promise<IDataspaceProtocolContractNegotiationError | undefined>;\n\n\t/**\n\t * An agreement verification has been received by a provider.\n\t * @param message The agreement verification message to send.\n\t * @param trustPayload Trust payload to verify the requesters identity.\n\t * @returns The error if there is one.\n\t */\n\tagreementVerificationFromConsumer(\n\t\tmessage: IDataspaceProtocolContractAgreementVerificationMessage,\n\t\ttrustPayload: unknown\n\t): Promise<IDataspaceProtocolContractNegotiationError | undefined>;\n\n\t/**\n\t * An event has been received by the provider or consumer.\n\t * @param message The event message to send.\n\t * @param destination The destination is provider or consumer.\n\t * @param trustPayload Trust payload to verify the requesters identity.\n\t * @returns The error if there is one.\n\t */\n\tevent(\n\t\tmessage: IDataspaceProtocolContractNegotiationEventMessage,\n\t\tdestination: \"provider\" | \"consumer\",\n\t\ttrustPayload: unknown\n\t): Promise<IDataspaceProtocolContractNegotiationError | undefined>;\n\n\t/**\n\t * A termination message has been received by the provider or consumer.\n\t * @param message The termination message to send.\n\t * @param destination The destination is provider or consumer.\n\t * @param trustPayload Trust payload to verify the requesters identity.\n\t * @returns The error if there is one.\n\t */\n\tterminate(\n\t\tmessage: IDataspaceProtocolContractNegotiationTerminationMessage,\n\t\tdestination: \"provider\" | \"consumer\",\n\t\ttrustPayload: unknown\n\t): Promise<IDataspaceProtocolContractNegotiationError | undefined>;\n\n\t/**\n\t * Send a terminate message to a consumer at the given callback address.\n\t * Used by stall cleanup to notify consumers that their negotiation has been terminated.\n\t * @param callbackAddress The consumer callback URL to send the termination to.\n\t * @param providerPid The provider negotiation id.\n\t * @param consumerPid The consumer negotiation id.\n\t * @returns Resolves when the terminate message has been sent.\n\t */\n\tsendTerminateToConsumer(\n\t\tcallbackAddress: string,\n\t\tproviderPid: string,\n\t\tconsumerPid: string\n\t): Promise<void>;\n}\n"]}
@@ -27,10 +27,9 @@ export interface IPolicyNegotiationPointComponent extends IComponent {
27
27
  * Processes an incoming request on a provider from a consumer.
28
28
  * @param message The negotiation request.
29
29
  * @param trustPayload Trust payload to verify the requesters identity.
30
- * @param publicOrigin The public origin url of this PNP service.
31
30
  * @returns The current state of the contract negotiation or an error.
32
31
  */
33
- requestFromConsumer(message: IDataspaceProtocolContractRequestMessage, trustPayload: unknown, publicOrigin?: string): Promise<IDataspaceProtocolContractNegotiation | IDataspaceProtocolContractNegotiationError>;
32
+ requestFromConsumer(message: IDataspaceProtocolContractRequestMessage, trustPayload: unknown): Promise<IDataspaceProtocolContractNegotiation | IDataspaceProtocolContractNegotiationError>;
34
33
  /**
35
34
  * An offer has been received by a consumer.
36
35
  * @param message The offer being received by the consumer.
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.55](https://github.com/iotaledger/twin-rights-management/compare/rights-management-models-v0.0.3-next.54...rights-management-models-v0.0.3-next.55) (2026-06-18)
10
+
11
+
12
+ ### Features
13
+
14
+ * remove hosting component ([#207](https://github.com/iotaledger/twin-rights-management/issues/207)) ([2a51690](https://github.com/iotaledger/twin-rights-management/commit/2a5169085b7df2245a474580e88b5b4e501006fe))
15
+
9
16
  ## [0.0.3-next.54](https://github.com/iotaledger/twin-rights-management/compare/rights-management-models-v0.0.3-next.53...rights-management-models-v0.0.3-next.54) (2026-06-18)
10
17
 
11
18
 
@@ -84,7 +84,7 @@ The negotiation id.
84
84
 
85
85
  ### requestFromConsumer() {#requestfromconsumer}
86
86
 
87
- > **requestFromConsumer**(`message`, `trustPayload`, `publicOrigin?`): `Promise`\<`IDataspaceProtocolContractNegotiation` \| `IDataspaceProtocolContractNegotiationError`\>
87
+ > **requestFromConsumer**(`message`, `trustPayload`): `Promise`\<`IDataspaceProtocolContractNegotiation` \| `IDataspaceProtocolContractNegotiationError`\>
88
88
 
89
89
  Processes an incoming request on a provider from a consumer.
90
90
 
@@ -102,12 +102,6 @@ The negotiation request.
102
102
 
103
103
  Trust payload to verify the requesters identity.
104
104
 
105
- ##### publicOrigin?
106
-
107
- `string`
108
-
109
- The public origin url of this PNP service.
110
-
111
105
  #### Returns
112
106
 
113
107
  `Promise`\<`IDataspaceProtocolContractNegotiation` \| `IDataspaceProtocolContractNegotiationError`\>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/rights-management-models",
3
- "version": "0.0.3-next.54",
3
+ "version": "0.0.3-next.55",
4
4
  "description": "Data model definitions for rights management policies, negotiations, and service contracts.",
5
5
  "repository": {
6
6
  "type": "git",