@twin.org/rights-management-pap-service 0.0.1 → 0.0.2-next.2

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # TWIN Rights Management Policy Administration Service
2
2
 
3
- Policy administration point implementation implementation.
3
+ Policy administration point implementation.
4
4
 
5
5
  ## Installation
6
6
 
@@ -154,10 +154,6 @@ function convertFromStoragePolicy(storagePolicy) {
154
154
  * Class implementation of Policy Administration Point Component.
155
155
  */
156
156
  class PolicyAdministrationPointService {
157
- /**
158
- * The namespace supported by the Policy Administration Point entity storage implementation.
159
- */
160
- static NAMESPACE = "pap";
161
157
  /**
162
158
  * Default maximum query results.
163
159
  * @internal
@@ -167,6 +163,11 @@ class PolicyAdministrationPointService {
167
163
  * The class name of the Policy Administration Point Service.
168
164
  */
169
165
  CLASS_NAME = "PolicyAdministrationPointService";
166
+ /**
167
+ * The logging component.
168
+ * @internal
169
+ */
170
+ _logging;
170
171
  /**
171
172
  * The entity storage component for storing policies.
172
173
  * @internal
@@ -177,6 +178,7 @@ class PolicyAdministrationPointService {
177
178
  * @param options The options for the component.
178
179
  */
179
180
  constructor(options) {
181
+ this._logging = core.ComponentFactory.getIfExists(options?.loggingComponentType ?? "logging");
180
182
  standardsW3cOdrl.OdrlDataTypes.registerRedirects();
181
183
  standardsW3cOdrl.OdrlDataTypes.registerTypes();
182
184
  this._odrlPolicyEntityStorage = entityStorageModels.EntityStorageConnectorFactory.get(options?.odrlPolicyEntityStorageType ?? "odrl-policy");
@@ -1,5 +1,5 @@
1
1
  import { property, entity, EntitySchemaFactory, EntitySchemaHelper } from '@twin.org/entity';
2
- import { Guards, Urn, Validation, NotFoundError, Is } from '@twin.org/core';
2
+ import { ComponentFactory, Guards, Urn, Validation, NotFoundError, Is } from '@twin.org/core';
3
3
  import { JsonLdHelper } from '@twin.org/data-json-ld';
4
4
  import { EntityStorageConnectorFactory } from '@twin.org/entity-storage-models';
5
5
  import { OdrlContexts, OdrlDataTypes } from '@twin.org/standards-w3c-odrl';
@@ -152,10 +152,6 @@ function convertFromStoragePolicy(storagePolicy) {
152
152
  * Class implementation of Policy Administration Point Component.
153
153
  */
154
154
  class PolicyAdministrationPointService {
155
- /**
156
- * The namespace supported by the Policy Administration Point entity storage implementation.
157
- */
158
- static NAMESPACE = "pap";
159
155
  /**
160
156
  * Default maximum query results.
161
157
  * @internal
@@ -165,6 +161,11 @@ class PolicyAdministrationPointService {
165
161
  * The class name of the Policy Administration Point Service.
166
162
  */
167
163
  CLASS_NAME = "PolicyAdministrationPointService";
164
+ /**
165
+ * The logging component.
166
+ * @internal
167
+ */
168
+ _logging;
168
169
  /**
169
170
  * The entity storage component for storing policies.
170
171
  * @internal
@@ -175,6 +176,7 @@ class PolicyAdministrationPointService {
175
176
  * @param options The options for the component.
176
177
  */
177
178
  constructor(options) {
179
+ this._logging = ComponentFactory.getIfExists(options?.loggingComponentType ?? "logging");
178
180
  OdrlDataTypes.registerRedirects();
179
181
  OdrlDataTypes.registerTypes();
180
182
  this._odrlPolicyEntityStorage = EntityStorageConnectorFactory.get(options?.odrlPolicyEntityStorageType ?? "odrl-policy");
@@ -2,8 +2,14 @@
2
2
  * Options for the Policy Administration Point Component.
3
3
  */
4
4
  export interface IPolicyAdministrationPointServiceOptions {
5
+ /**
6
+ * The logging component for logging administration actions.
7
+ * @default logging
8
+ */
9
+ loggingComponentType?: string;
5
10
  /**
6
11
  * The entity storage component for storing policies.
12
+ * @default odrl-policy
7
13
  */
8
14
  odrlPolicyEntityStorageType?: string;
9
15
  }
@@ -6,10 +6,6 @@ import type { IPolicyAdministrationPointServiceOptions } from "./models/IPolicyA
6
6
  * Class implementation of Policy Administration Point Component.
7
7
  */
8
8
  export declare class PolicyAdministrationPointService implements IPolicyAdministrationPointComponent {
9
- /**
10
- * The namespace supported by the Policy Administration Point entity storage implementation.
11
- */
12
- static readonly NAMESPACE: string;
13
9
  /**
14
10
  * The class name of the Policy Administration Point Service.
15
11
  */
package/docs/changelog.md CHANGED
@@ -1,5 +1,42 @@
1
1
  # @twin.org/rights-management-pap-service - Changelog
2
2
 
3
+ ## [0.0.2-next.2](https://github.com/twinfoundation/rights-management/compare/rights-management-pap-service-v0.0.2-next.1...rights-management-pap-service-v0.0.2-next.2) (2025-08-22)
4
+
5
+
6
+ ### Features
7
+
8
+ * add scaffold for other services ([de25f34](https://github.com/twinfoundation/rights-management/commit/de25f34c40fb65b6d73df98965ea4e368019da84))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @twin.org/rights-management-models bumped from 0.0.2-next.1 to 0.0.2-next.2
16
+
17
+ ## [0.0.2-next.1](https://github.com/twinfoundation/rights-management/compare/rights-management-pap-service-v0.0.2-next.0...rights-management-pap-service-v0.0.2-next.1) (2025-08-20)
18
+
19
+
20
+ ### Features
21
+
22
+ * pap create, update methods ([#13](https://github.com/twinfoundation/rights-management/issues/13)) ([edb6c9e](https://github.com/twinfoundation/rights-management/commit/edb6c9efcfda55ac96f7594253bf831b4f0e5993))
23
+ * remove unused namespace ([e8aa679](https://github.com/twinfoundation/rights-management/commit/e8aa679479231a49f86dd8dec5f9b811bd3f595f))
24
+ * rename pap entity storage to pap service ([38a2c14](https://github.com/twinfoundation/rights-management/commit/38a2c14d8f63a86e398820166c83437be5aca1b8))
25
+ * update dependencies ([dd0a553](https://github.com/twinfoundation/rights-management/commit/dd0a553020b0dc5c41fb6865a2e36bd26045b0b9))
26
+ * update framework core ([d0ffcba](https://github.com/twinfoundation/rights-management/commit/d0ffcba9cf1dc2b562193ee298f099612d100ce8))
27
+
28
+
29
+ ### Bug Fixes
30
+
31
+ * bump versions ([#11](https://github.com/twinfoundation/rights-management/issues/11)) ([ed7691f](https://github.com/twinfoundation/rights-management/commit/ed7691f29c0dab54421ef273892f1d33c230b040))
32
+
33
+
34
+ ### Dependencies
35
+
36
+ * The following workspace dependencies were updated
37
+ * dependencies
38
+ * @twin.org/rights-management-models bumped from 0.0.2-next.0 to 0.0.2-next.1
39
+
3
40
  ## 0.0.1 (2025-07-08)
4
41
 
5
42
 
@@ -28,14 +28,6 @@ The options for the component.
28
28
 
29
29
  ## Properties
30
30
 
31
- ### NAMESPACE
32
-
33
- > `readonly` `static` **NAMESPACE**: `string` = `"pap"`
34
-
35
- The namespace supported by the Policy Administration Point entity storage implementation.
36
-
37
- ***
38
-
39
31
  ### CLASS\_NAME
40
32
 
41
33
  > `readonly` **CLASS\_NAME**: `string`
@@ -4,8 +4,28 @@ Options for the Policy Administration Point Component.
4
4
 
5
5
  ## Properties
6
6
 
7
+ ### loggingComponentType?
8
+
9
+ > `optional` **loggingComponentType**: `string`
10
+
11
+ The logging component for logging administration actions.
12
+
13
+ #### Default
14
+
15
+ ```ts
16
+ logging
17
+ ```
18
+
19
+ ***
20
+
7
21
  ### odrlPolicyEntityStorageType?
8
22
 
9
23
  > `optional` **odrlPolicyEntityStorageType**: `string`
10
24
 
11
25
  The entity storage component for storing policies.
26
+
27
+ #### Default
28
+
29
+ ```ts
30
+ odrl-policy
31
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/rights-management-pap-service",
3
- "version": "0.0.1",
3
+ "version": "0.0.2-next.2",
4
4
  "description": "Policy administration point implementation",
5
5
  "repository": {
6
6
  "type": "git",
@@ -14,13 +14,14 @@
14
14
  "node": ">=20.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@twin.org/core": "^0.0.1",
18
- "@twin.org/data-json-ld": "^0.0.1",
19
- "@twin.org/entity": "^0.0.1",
20
- "@twin.org/entity-storage-models": "^0.0.1",
21
- "@twin.org/nameof": "^0.0.1",
22
- "@twin.org/rights-management-models": "^0.0.1",
23
- "@twin.org/standards-w3c-odrl": "^0.0.1"
17
+ "@twin.org/core": "next",
18
+ "@twin.org/data-json-ld": "next",
19
+ "@twin.org/entity": "next",
20
+ "@twin.org/entity-storage-models": "next",
21
+ "@twin.org/logging-models": "next",
22
+ "@twin.org/nameof": "next",
23
+ "@twin.org/rights-management-models": "0.0.2-next.2",
24
+ "@twin.org/standards-w3c-odrl": "next"
24
25
  },
25
26
  "main": "./dist/cjs/index.cjs",
26
27
  "module": "./dist/esm/index.mjs",