@twin.org/rights-management-models 0.9.2-next.3 → 0.9.2-next.5

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":"IPapQueryRequest.js","sourceRoot":"","sources":["../../../../../src/models/api/pap/IPapQueryRequest.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The request structure for querying policies.\n */\nexport interface IPapQueryRequest {\n\t/**\n\t * The query parameters of the request.\n\t */\n\tquery?: {\n\t\t/**\n\t\t * The type of policy to filter by.\n\t\t */\n\t\ttype?: string;\n\n\t\t/**\n\t\t * The assigner to filter by.\n\t\t */\n\t\tassigner?: string;\n\n\t\t/**\n\t\t * The assignee to filter by.\n\t\t */\n\t\tassignee?: string;\n\n\t\t/**\n\t\t * The action to filter by.\n\t\t */\n\t\taction?: string;\n\n\t\t/**\n\t\t * The target to filter by.\n\t\t */\n\t\ttarget?: string;\n\n\t\t/**\n\t\t * The condition for the query.\n\t\t */\n\t\tconditions?: string;\n\n\t\t/**\n\t\t * Limit the number of entities to return.\n\t\t */\n\t\tlimit?: string;\n\n\t\t/**\n\t\t * The cursor to get next chunk of data, returned in previous response.\n\t\t */\n\t\tcursor?: string;\n\t};\n}\n"]}
1
+ {"version":3,"file":"IPapQueryRequest.js","sourceRoot":"","sources":["../../../../../src/models/api/pap/IPapQueryRequest.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The request structure for querying policies.\n */\nexport interface IPapQueryRequest {\n\t/**\n\t * The query parameters of the request.\n\t */\n\tquery?: {\n\t\t/**\n\t\t * The type of policy to filter by.\n\t\t */\n\t\ttype?: string;\n\n\t\t/**\n\t\t * The assigner to filter by.\n\t\t */\n\t\tassigner?: string;\n\n\t\t/**\n\t\t * The assignee to filter by.\n\t\t */\n\t\tassignee?: string;\n\n\t\t/**\n\t\t * The action to filter by.\n\t\t */\n\t\taction?: string;\n\n\t\t/**\n\t\t * The target to filter by.\n\t\t */\n\t\ttarget?: string;\n\n\t\t/**\n\t\t * The condition for the query.\n\t\t */\n\t\tconditions?: string;\n\n\t\t/**\n\t\t * Limit the number of entities to return.\n\t\t */\n\t\tlimit?: string;\n\n\t\t/**\n\t\t * The cursor to get next chunk of data, returned in previous response.\n\t\t */\n\t\tcursor?: string;\n\n\t\t/**\n\t\t * Comma-separated list of policy property names to include in the response.\n\t\t */\n\t\tproperties?: string;\n\t};\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\";\nimport type { IPolicyLocator } from \"./IPolicyLocator.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 locator Optional locator to filter by type, assigner, assignee, target, or action.\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\tlocator?: IPolicyLocator,\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\";\nimport type { IPolicyLocator } from \"./IPolicyLocator.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 locator Optional locator to filter by type, assigner, assignee, target, or action.\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 * @param properties Optional list of policy property names to include in the response.\n\t * @returns Cursor for next page of results and the policies matching the query.\n\t */\n\tquery(\n\t\tlocator?: IPolicyLocator,\n\t\tconditions?: EntityCondition<IRightsManagementPolicy>,\n\t\tcursor?: string,\n\t\tlimit?: number,\n\t\tproperties?: (keyof IRightsManagementPolicy)[]\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"]}
@@ -38,5 +38,9 @@ export interface IPapQueryRequest {
38
38
  * The cursor to get next chunk of data, returned in previous response.
39
39
  */
40
40
  cursor?: string;
41
+ /**
42
+ * Comma-separated list of policy property names to include in the response.
43
+ */
44
+ properties?: string;
41
45
  };
42
46
  }
@@ -58,9 +58,10 @@ export interface IPolicyAdministrationPointComponent extends IComponent {
58
58
  * @param conditions The conditions to use for the query.
59
59
  * @param cursor The cursor to use for pagination.
60
60
  * @param limit The number of results to return per page.
61
+ * @param properties Optional list of policy property names to include in the response.
61
62
  * @returns Cursor for next page of results and the policies matching the query.
62
63
  */
63
- query(locator?: IPolicyLocator, conditions?: EntityCondition<IRightsManagementPolicy>, cursor?: string, limit?: number): Promise<{
64
+ query(locator?: IPolicyLocator, conditions?: EntityCondition<IRightsManagementPolicy>, cursor?: string, limit?: number, properties?: (keyof IRightsManagementPolicy)[]): Promise<{
64
65
  /**
65
66
  * The cursor for the next page of results.
66
67
  */
package/docs/changelog.md CHANGED
@@ -6,6 +6,20 @@
6
6
 
7
7
  * remove EcosystemPolicy models/DTOs and standardize policy typing on `OdrlPolicyType` for v2.
8
8
 
9
+ ## [0.9.2-next.5](https://github.com/iotaledger/twin-rights-management/compare/rights-management-models-v0.9.2-next.4...rights-management-models-v0.9.2-next.5) (2026-08-12)
10
+
11
+
12
+ ### Features
13
+
14
+ * query properties ([#289](https://github.com/iotaledger/twin-rights-management/issues/289)) ([e2481f2](https://github.com/iotaledger/twin-rights-management/commit/e2481f256e8b74c2bf56dca6d9df817919ab8a3a))
15
+
16
+ ## [0.9.2-next.4](https://github.com/iotaledger/twin-rights-management/compare/rights-management-models-v0.9.2-next.3...rights-management-models-v0.9.2-next.4) (2026-08-10)
17
+
18
+
19
+ ### Miscellaneous Chores
20
+
21
+ * **rights-management-models:** Synchronize repo versions
22
+
9
23
  ## [0.9.2-next.3](https://github.com/iotaledger/twin-rights-management/compare/rights-management-models-v0.9.2-next.2...rights-management-models-v0.9.2-next.3) (2026-08-07)
10
24
 
11
25
 
@@ -57,3 +57,9 @@ Limit the number of entities to return.
57
57
  > `optional` **cursor?**: `string`
58
58
 
59
59
  The cursor to get next chunk of data, returned in previous response.
60
+
61
+ #### properties?
62
+
63
+ > `optional` **properties?**: `string`
64
+
65
+ Comma-separated list of policy property names to include in the response.
@@ -164,7 +164,7 @@ A promise that resolves when the policy has been removed.
164
164
 
165
165
  ### query() {#query}
166
166
 
167
- > **query**(`locator?`, `conditions?`, `cursor?`, `limit?`): `Promise`\<\{ `cursor?`: `string`; `policies`: [`IRightsManagementPolicy`](IRightsManagementPolicy.md)[]; \}\>
167
+ > **query**(`locator?`, `conditions?`, `cursor?`, `limit?`, `properties?`): `Promise`\<\{ `cursor?`: `string`; `policies`: [`IRightsManagementPolicy`](IRightsManagementPolicy.md)[]; \}\>
168
168
 
169
169
  Query the policies using the specified conditions.
170
170
 
@@ -194,6 +194,12 @@ The cursor to use for pagination.
194
194
 
195
195
  The number of results to return per page.
196
196
 
197
+ ##### properties?
198
+
199
+ keyof [`IRightsManagementPolicy`](IRightsManagementPolicy.md)[]
200
+
201
+ Optional list of policy property names to include in the response.
202
+
197
203
  #### Returns
198
204
 
199
205
  `Promise`\<\{ `cursor?`: `string`; `policies`: [`IRightsManagementPolicy`](IRightsManagementPolicy.md)[]; \}\>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/rights-management-models",
3
- "version": "0.9.2-next.3",
3
+ "version": "0.9.2-next.5",
4
4
  "description": "Data model definitions for rights management policies, negotiations, and service contracts.",
5
5
  "repository": {
6
6
  "type": "git",