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

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.
@@ -330,10 +330,6 @@ async function papQuery(httpRequestContext, componentName, request) {
330
330
  * This is a unified service that provides access to all Rights Management components.
331
331
  */
332
332
  class RightsManagementService {
333
- /**
334
- * The namespace supported by the Rights Management service.
335
- */
336
- static NAMESPACE = "rights-management";
337
333
  /**
338
334
  * Runtime name for the class.
339
335
  */
@@ -328,10 +328,6 @@ async function papQuery(httpRequestContext, componentName, request) {
328
328
  * This is a unified service that provides access to all Rights Management components.
329
329
  */
330
330
  class RightsManagementService {
331
- /**
332
- * The namespace supported by the Rights Management service.
333
- */
334
- static NAMESPACE = "rights-management";
335
331
  /**
336
332
  * Runtime name for the class.
337
333
  */
@@ -7,10 +7,6 @@ import type { IRightsManagementServiceConstructorOptions } from "./models/IRight
7
7
  * This is a unified service that provides access to all Rights Management components.
8
8
  */
9
9
  export declare class RightsManagementService implements IRightsManagementComponent {
10
- /**
11
- * The namespace supported by the Rights Management service.
12
- */
13
- static readonly NAMESPACE: string;
14
10
  /**
15
11
  * Runtime name for the class.
16
12
  */
package/docs/changelog.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # @twin.org/rights-management-pap-service - Changelog
2
2
 
3
+ ## [0.0.2-next.1](https://github.com/twinfoundation/rights-management/compare/rights-management-service-v0.0.2-next.0...rights-management-service-v0.0.2-next.1) (2025-08-20)
4
+
5
+
6
+ ### Features
7
+
8
+ * pap create, update methods ([#13](https://github.com/twinfoundation/rights-management/issues/13)) ([edb6c9e](https://github.com/twinfoundation/rights-management/commit/edb6c9efcfda55ac96f7594253bf831b4f0e5993))
9
+ * remove unnecessary config options from service ([31ef3a2](https://github.com/twinfoundation/rights-management/commit/31ef3a2eb2293efdad7e6b8b55f105cc62bba3ed))
10
+ * remove unused namespace ([e8aa679](https://github.com/twinfoundation/rights-management/commit/e8aa679479231a49f86dd8dec5f9b811bd3f595f))
11
+ * rename pap entity storage to pap service ([38a2c14](https://github.com/twinfoundation/rights-management/commit/38a2c14d8f63a86e398820166c83437be5aca1b8))
12
+ * rights management pap ([#4](https://github.com/twinfoundation/rights-management/issues/4)) ([d1165a9](https://github.com/twinfoundation/rights-management/commit/d1165a92f57128731cfb308d977832e28cf33493))
13
+ * update dependencies ([dd0a553](https://github.com/twinfoundation/rights-management/commit/dd0a553020b0dc5c41fb6865a2e36bd26045b0b9))
14
+ * update framework core ([d0ffcba](https://github.com/twinfoundation/rights-management/commit/d0ffcba9cf1dc2b562193ee298f099612d100ce8))
15
+ * update twindev schemas ([5d4edc1](https://github.com/twinfoundation/rights-management/commit/5d4edc1326fef611619d4b371a5d05a75ada719a))
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * adding missing dependency ([#15](https://github.com/twinfoundation/rights-management/issues/15)) ([c7e6267](https://github.com/twinfoundation/rights-management/commit/c7e62678b296ef8d28c31921cb78aeabe674cd84))
21
+ * modifying the function name for the rest routes ([#6](https://github.com/twinfoundation/rights-management/issues/6)) ([7915111](https://github.com/twinfoundation/rights-management/commit/7915111ac608c9d69bcaa819c85b553fc9bace6a))
22
+ * query params force coercion ([8590a0d](https://github.com/twinfoundation/rights-management/commit/8590a0da92584c04b67e73c448319f96f70c34a5))
23
+ * slimline openapi spec ([aacb9d5](https://github.com/twinfoundation/rights-management/commit/aacb9d50f80d3652ef7419ca3777f53e542773f1))
24
+
25
+
26
+ ### Dependencies
27
+
28
+ * The following workspace dependencies were updated
29
+ * dependencies
30
+ * @twin.org/rights-management-models bumped from 0.0.2-next.0 to 0.0.2-next.1
31
+ * @twin.org/rights-management-pap-service bumped from 0.0.2-next.0 to 0.0.2-next.1
32
+
3
33
  ## 0.0.1 (2025-07-08)
4
34
 
5
35
 
@@ -1,5 +1,5 @@
1
1
  {
2
- "openapi": "3.1.0",
2
+ "openapi": "3.1.1",
3
3
  "info": {
4
4
  "title": "TWIN - Test Endpoints",
5
5
  "description": "REST API for TWIN - Test Endpoints.",
@@ -39,7 +39,7 @@
39
39
  "content": {
40
40
  "application/json": {
41
41
  "schema": {
42
- "$ref": "https://schema.twindev.org/odrl/OdrlPolicy"
42
+ "$ref": "https://schema.twindev.org/w3c-odrl/OdrlPolicy"
43
43
  },
44
44
  "examples": {
45
45
  "papCreateExample": {
@@ -161,7 +161,7 @@
161
161
  "content": {
162
162
  "application/json": {
163
163
  "schema": {
164
- "$ref": "https://schema.twindev.org/odrl/OdrlPolicy"
164
+ "$ref": "https://schema.twindev.org/w3c-odrl/OdrlPolicy"
165
165
  },
166
166
  "examples": {
167
167
  "papUpdateExample": {
@@ -274,7 +274,7 @@
274
274
  "content": {
275
275
  "application/json": {
276
276
  "schema": {
277
- "$ref": "https://schema.twindev.org/odrl/OdrlPolicy"
277
+ "$ref": "https://schema.twindev.org/w3c-odrl/OdrlPolicy"
278
278
  },
279
279
  "examples": {
280
280
  "papRetrieveResponseExample": {
@@ -604,7 +604,7 @@
604
604
  "type": "string",
605
605
  "description": "The stack trace for the error."
606
606
  },
607
- "inner": {
607
+ "cause": {
608
608
  "$ref": "#/components/schemas/Error"
609
609
  }
610
610
  },
@@ -615,6 +615,357 @@
615
615
  "additionalProperties": false,
616
616
  "description": "Model to describe serialized error."
617
617
  },
618
+ "OdrlPolicy": {
619
+ "type": "object",
620
+ "properties": {
621
+ "@context": {
622
+ "$ref": "https://schema.twindev.org/w3c-odrl/OdrlContextType"
623
+ },
624
+ "@type": {
625
+ "$ref": "https://schema.twindev.org/w3c-odrl/PolicyType"
626
+ },
627
+ "profile": {
628
+ "anyOf": [
629
+ {
630
+ "type": "string"
631
+ },
632
+ {
633
+ "type": "array",
634
+ "items": false,
635
+ "prefixItems": [
636
+ {
637
+ "type": "string"
638
+ }
639
+ ]
640
+ }
641
+ ],
642
+ "description": "The profile(s) this policy conforms to. IRIs identifying the ODRL Profile(s)."
643
+ },
644
+ "assigner": {
645
+ "anyOf": [
646
+ {
647
+ "type": "string"
648
+ },
649
+ {
650
+ "$ref": "https://schema.twindev.org/w3c-odrl/OdrlParty"
651
+ }
652
+ ],
653
+ "description": "The assigner of the policy. Applies to all rules unless overridden at rule level."
654
+ },
655
+ "assignee": {
656
+ "anyOf": [
657
+ {
658
+ "type": "string"
659
+ },
660
+ {
661
+ "$ref": "https://schema.twindev.org/w3c-odrl/OdrlParty"
662
+ }
663
+ ],
664
+ "description": "The assignee of the policy. Applies to all rules unless overridden at rule level."
665
+ },
666
+ "target": {
667
+ "anyOf": [
668
+ {
669
+ "type": "string"
670
+ },
671
+ {
672
+ "$ref": "https://schema.twindev.org/w3c-odrl/OdrlAsset"
673
+ },
674
+ {
675
+ "type": "array",
676
+ "items": false,
677
+ "prefixItems": [
678
+ {
679
+ "anyOf": [
680
+ {
681
+ "type": "string"
682
+ },
683
+ {
684
+ "$ref": "https://schema.twindev.org/w3c-odrl/OdrlAsset"
685
+ }
686
+ ]
687
+ }
688
+ ]
689
+ }
690
+ ],
691
+ "description": "The target asset for the rule."
692
+ },
693
+ "action": {
694
+ "anyOf": [
695
+ {
696
+ "$ref": "https://schema.twindev.org/w3c-odrl/ActionType"
697
+ },
698
+ {
699
+ "$ref": "https://schema.twindev.org/w3c-odrl/OdrlAction"
700
+ },
701
+ {
702
+ "type": "array",
703
+ "items": false,
704
+ "prefixItems": [
705
+ {
706
+ "anyOf": [
707
+ {
708
+ "$ref": "https://schema.twindev.org/w3c-odrl/ActionType"
709
+ },
710
+ {
711
+ "$ref": "https://schema.twindev.org/w3c-odrl/OdrlAction"
712
+ }
713
+ ]
714
+ }
715
+ ]
716
+ }
717
+ ],
718
+ "description": "The action associated with the rule."
719
+ },
720
+ "inheritFrom": {
721
+ "anyOf": [
722
+ {
723
+ "type": "string"
724
+ },
725
+ {
726
+ "type": "array",
727
+ "items": false,
728
+ "prefixItems": [
729
+ {
730
+ "type": "string"
731
+ }
732
+ ]
733
+ }
734
+ ],
735
+ "description": "The parent policy(ies) this policy inherits from. IRIs identifying the parent Policy(ies)."
736
+ },
737
+ "conflict": {
738
+ "$ref": "https://schema.twindev.org/w3c-odrl/ConflictStrategyType"
739
+ },
740
+ "permission": {
741
+ "type": "array",
742
+ "items": false,
743
+ "description": "The permissions in the policy. At least one of permission, prohibition, or obligation must be present.",
744
+ "prefixItems": [
745
+ {
746
+ "$ref": "https://schema.twindev.org/w3c-odrl/OdrlPermission"
747
+ }
748
+ ]
749
+ },
750
+ "prohibition": {
751
+ "type": "array",
752
+ "items": false,
753
+ "description": "The prohibitions in the policy. At least one of permission, prohibition, or obligation must be present.",
754
+ "prefixItems": [
755
+ {
756
+ "$ref": "https://schema.twindev.org/w3c-odrl/OdrlProhibition"
757
+ }
758
+ ]
759
+ },
760
+ "obligation": {
761
+ "type": "array",
762
+ "items": false,
763
+ "description": "The obligations in the policy. At least one of permission, prohibition, or obligation must be present.",
764
+ "prefixItems": [
765
+ {
766
+ "$ref": "https://schema.twindev.org/w3c-odrl/OdrlDuty"
767
+ }
768
+ ]
769
+ },
770
+ "@id": {
771
+ "anyOf": [
772
+ {
773
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
774
+ },
775
+ {
776
+ "type": "array",
777
+ "items": false,
778
+ "prefixItems": [
779
+ {
780
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
781
+ }
782
+ ]
783
+ },
784
+ {
785
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
786
+ },
787
+ {
788
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdIndexMap"
789
+ },
790
+ {
791
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
792
+ },
793
+ {
794
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdIdMap"
795
+ },
796
+ {
797
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdTypeMap"
798
+ }
799
+ ]
800
+ },
801
+ "@included": {
802
+ "anyOf": [
803
+ {
804
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
805
+ },
806
+ {
807
+ "type": "array",
808
+ "items": false,
809
+ "prefixItems": [
810
+ {
811
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
812
+ }
813
+ ]
814
+ },
815
+ {
816
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
817
+ },
818
+ {
819
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdIndexMap"
820
+ },
821
+ {
822
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
823
+ },
824
+ {
825
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdIdMap"
826
+ },
827
+ {
828
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdTypeMap"
829
+ }
830
+ ]
831
+ },
832
+ "@graph": {
833
+ "anyOf": [
834
+ {
835
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
836
+ },
837
+ {
838
+ "type": "array",
839
+ "items": false,
840
+ "prefixItems": [
841
+ {
842
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
843
+ }
844
+ ]
845
+ },
846
+ {
847
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
848
+ },
849
+ {
850
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdIndexMap"
851
+ },
852
+ {
853
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
854
+ },
855
+ {
856
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdIdMap"
857
+ },
858
+ {
859
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdTypeMap"
860
+ }
861
+ ]
862
+ },
863
+ "@nest": {
864
+ "anyOf": [
865
+ {
866
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
867
+ },
868
+ {
869
+ "type": "array",
870
+ "items": false,
871
+ "prefixItems": [
872
+ {
873
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
874
+ }
875
+ ]
876
+ },
877
+ {
878
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
879
+ },
880
+ {
881
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdIndexMap"
882
+ },
883
+ {
884
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
885
+ },
886
+ {
887
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdIdMap"
888
+ },
889
+ {
890
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdTypeMap"
891
+ }
892
+ ]
893
+ },
894
+ "@reverse": {
895
+ "anyOf": [
896
+ {
897
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
898
+ },
899
+ {
900
+ "type": "array",
901
+ "items": false,
902
+ "prefixItems": [
903
+ {
904
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
905
+ }
906
+ ]
907
+ },
908
+ {
909
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
910
+ },
911
+ {
912
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdIndexMap"
913
+ },
914
+ {
915
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
916
+ },
917
+ {
918
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdIdMap"
919
+ },
920
+ {
921
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdTypeMap"
922
+ }
923
+ ]
924
+ },
925
+ "@index": {
926
+ "anyOf": [
927
+ {
928
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
929
+ },
930
+ {
931
+ "type": "array",
932
+ "items": false,
933
+ "prefixItems": [
934
+ {
935
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
936
+ }
937
+ ]
938
+ },
939
+ {
940
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
941
+ },
942
+ {
943
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdIndexMap"
944
+ },
945
+ {
946
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
947
+ },
948
+ {
949
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdIdMap"
950
+ },
951
+ {
952
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdTypeMap"
953
+ }
954
+ ]
955
+ }
956
+ },
957
+ "required": [
958
+ "@context",
959
+ "@type",
960
+ "@id",
961
+ "@included",
962
+ "@graph",
963
+ "@nest",
964
+ "@reverse",
965
+ "@index"
966
+ ],
967
+ "additionalProperties": false
968
+ },
618
969
  "PapQueryResponse": {
619
970
  "type": "object",
620
971
  "properties": {
@@ -624,10 +975,11 @@
624
975
  },
625
976
  "policies": {
626
977
  "type": "array",
978
+ "items": false,
627
979
  "description": "The policies matching the query.",
628
980
  "prefixItems": [
629
981
  {
630
- "$ref": "https://schema.twindev.org/odrl/OdrlPolicy"
982
+ "$ref": "https://schema.twindev.org/w3c-odrl/OdrlPolicy"
631
983
  }
632
984
  ]
633
985
  }
@@ -29,14 +29,6 @@ The options for the service.
29
29
 
30
30
  ## Properties
31
31
 
32
- ### NAMESPACE
33
-
34
- > `readonly` `static` **NAMESPACE**: `string` = `"rights-management"`
35
-
36
- The namespace supported by the Rights Management service.
37
-
38
- ***
39
-
40
32
  ### CLASS\_NAME
41
33
 
42
34
  > `readonly` **CLASS\_NAME**: `string`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/rights-management-service",
3
- "version": "0.0.1",
3
+ "version": "0.0.2-next.1",
4
4
  "description": "Rights Management service implementation and REST endpoint definitions",
5
5
  "repository": {
6
6
  "type": "git",
@@ -14,14 +14,14 @@
14
14
  "node": ">=20.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@twin.org/api-models": "^0.0.2-next.1",
18
- "@twin.org/core": "^0.0.1",
19
- "@twin.org/entity": "^0.0.1",
20
- "@twin.org/nameof": "^0.0.1",
21
- "@twin.org/rights-management-models": "^0.0.1",
22
- "@twin.org/rights-management-pap-service": "^0.0.1",
23
- "@twin.org/standards-w3c-odrl": "^0.0.1",
24
- "@twin.org/web": "^0.0.1"
17
+ "@twin.org/api-models": "next",
18
+ "@twin.org/core": "next",
19
+ "@twin.org/entity": "next",
20
+ "@twin.org/nameof": "next",
21
+ "@twin.org/rights-management-models": "0.0.2-next.1",
22
+ "@twin.org/rights-management-pap-service": "0.0.2-next.1",
23
+ "@twin.org/standards-w3c-odrl": "next",
24
+ "@twin.org/web": "next"
25
25
  },
26
26
  "main": "./dist/cjs/index.cjs",
27
27
  "module": "./dist/esm/index.mjs",