@twin.org/standards-w3c-odrl 0.0.2-next.9 → 0.0.3-next.10

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.
Files changed (113) hide show
  1. package/dist/es/dataTypes/odrlDataTypes.js +113 -0
  2. package/dist/es/dataTypes/odrlDataTypes.js.map +1 -0
  3. package/dist/es/index.js +31 -0
  4. package/dist/es/index.js.map +1 -0
  5. package/dist/es/models/IOdrlAction.js +2 -0
  6. package/dist/es/models/IOdrlAction.js.map +1 -0
  7. package/dist/es/models/IOdrlAgreement.js +2 -0
  8. package/dist/es/models/IOdrlAgreement.js.map +1 -0
  9. package/dist/es/models/IOdrlAsset.js +2 -0
  10. package/dist/es/models/IOdrlAsset.js.map +1 -0
  11. package/dist/es/models/IOdrlAssetCollection.js +2 -0
  12. package/dist/es/models/IOdrlAssetCollection.js.map +1 -0
  13. package/dist/es/models/IOdrlConstraint.js +2 -0
  14. package/dist/es/models/IOdrlConstraint.js.map +1 -0
  15. package/dist/es/models/IOdrlDuty.js +2 -0
  16. package/dist/es/models/IOdrlDuty.js.map +1 -0
  17. package/dist/es/models/IOdrlLogicalConstraint.js +2 -0
  18. package/dist/es/models/IOdrlLogicalConstraint.js.map +1 -0
  19. package/dist/es/models/IOdrlOffer.js +2 -0
  20. package/dist/es/models/IOdrlOffer.js.map +1 -0
  21. package/dist/es/models/IOdrlParty.js +2 -0
  22. package/dist/es/models/IOdrlParty.js.map +1 -0
  23. package/dist/es/models/IOdrlPartyCollection.js +2 -0
  24. package/dist/es/models/IOdrlPartyCollection.js.map +1 -0
  25. package/dist/es/models/IOdrlPermission.js +2 -0
  26. package/dist/es/models/IOdrlPermission.js.map +1 -0
  27. package/dist/es/models/IOdrlPolicy.js +2 -0
  28. package/dist/es/models/IOdrlPolicy.js.map +1 -0
  29. package/dist/es/models/IOdrlProhibition.js +2 -0
  30. package/dist/es/models/IOdrlProhibition.js.map +1 -0
  31. package/dist/es/models/IOdrlRule.js +2 -0
  32. package/dist/es/models/IOdrlRule.js.map +1 -0
  33. package/dist/es/models/IOdrlSet.js +2 -0
  34. package/dist/es/models/IOdrlSet.js.map +1 -0
  35. package/dist/es/models/odrlContextType.js +2 -0
  36. package/dist/es/models/odrlContextType.js.map +1 -0
  37. package/dist/es/models/odrlContexts.js +21 -0
  38. package/dist/es/models/odrlContexts.js.map +1 -0
  39. package/dist/es/models/types/actionType.js +237 -0
  40. package/dist/es/models/types/actionType.js.map +1 -0
  41. package/dist/es/models/types/conflictStrategyType.js +21 -0
  42. package/dist/es/models/types/conflictStrategyType.js.map +1 -0
  43. package/dist/es/models/types/leftOperandType.js +137 -0
  44. package/dist/es/models/types/leftOperandType.js.map +1 -0
  45. package/dist/es/models/types/logicalConstraintType.js +25 -0
  46. package/dist/es/models/types/logicalConstraintType.js.map +1 -0
  47. package/dist/es/models/types/odrlTypes.js +69 -0
  48. package/dist/es/models/types/odrlTypes.js.map +1 -0
  49. package/dist/es/models/types/operatorType.js +65 -0
  50. package/dist/es/models/types/operatorType.js.map +1 -0
  51. package/dist/es/models/types/policyType.js +25 -0
  52. package/dist/es/models/types/policyType.js.map +1 -0
  53. package/dist/es/models/types/rightOperandType.js +14 -0
  54. package/dist/es/models/types/rightOperandType.js.map +1 -0
  55. package/dist/es/models/types/ruleType.js +21 -0
  56. package/dist/es/models/types/ruleType.js.map +1 -0
  57. package/dist/es/models/types/statusType.js +25 -0
  58. package/dist/es/models/types/statusType.js.map +1 -0
  59. package/dist/es/schemas/OdrlAction.json +153 -0
  60. package/dist/es/schemas/OdrlAgreement.json +279 -0
  61. package/dist/es/schemas/OdrlAsset.json +110 -0
  62. package/dist/es/schemas/OdrlAssetCollection.json +124 -0
  63. package/dist/es/schemas/OdrlConstraint.json +174 -0
  64. package/dist/es/schemas/OdrlDuty.json +217 -0
  65. package/dist/es/schemas/OdrlLogicalConstraint.json +204 -0
  66. package/dist/es/schemas/OdrlOffer.json +278 -0
  67. package/dist/es/schemas/OdrlParty.json +124 -0
  68. package/dist/es/schemas/OdrlPartyCollection.json +138 -0
  69. package/dist/es/schemas/OdrlPermission.json +198 -0
  70. package/dist/es/schemas/OdrlPolicy.json +276 -0
  71. package/dist/es/schemas/OdrlProhibition.json +198 -0
  72. package/dist/es/schemas/OdrlRule.json +191 -0
  73. package/dist/es/schemas/OdrlSet.json +277 -0
  74. package/dist/types/index.d.ts +28 -28
  75. package/dist/types/models/IOdrlAction.d.ts +3 -3
  76. package/dist/types/models/IOdrlAgreement.d.ts +3 -3
  77. package/dist/types/models/IOdrlAsset.d.ts +1 -1
  78. package/dist/types/models/IOdrlAssetCollection.d.ts +2 -2
  79. package/dist/types/models/IOdrlConstraint.d.ts +3 -3
  80. package/dist/types/models/IOdrlDuty.d.ts +1 -1
  81. package/dist/types/models/IOdrlOffer.d.ts +3 -3
  82. package/dist/types/models/IOdrlParty.d.ts +1 -1
  83. package/dist/types/models/IOdrlPartyCollection.d.ts +2 -2
  84. package/dist/types/models/IOdrlPermission.d.ts +2 -2
  85. package/dist/types/models/IOdrlPolicy.d.ts +10 -10
  86. package/dist/types/models/IOdrlProhibition.d.ts +2 -2
  87. package/dist/types/models/IOdrlRule.d.ts +5 -5
  88. package/dist/types/models/IOdrlSet.d.ts +2 -2
  89. package/dist/types/models/odrlContextType.d.ts +2 -2
  90. package/dist/types/models/odrlContexts.d.ts +6 -2
  91. package/dist/types/models/types/odrlTypes.d.ts +0 -4
  92. package/docs/changelog.md +271 -0
  93. package/docs/reference/interfaces/IOdrlAction.md +1 -1
  94. package/docs/reference/interfaces/IOdrlAgreement.md +1 -1
  95. package/docs/reference/interfaces/IOdrlAsset.md +1 -1
  96. package/docs/reference/interfaces/IOdrlAssetCollection.md +1 -1
  97. package/docs/reference/interfaces/IOdrlConstraint.md +1 -1
  98. package/docs/reference/interfaces/IOdrlDuty.md +1 -1
  99. package/docs/reference/interfaces/IOdrlLogicalConstraint.md +1 -1
  100. package/docs/reference/interfaces/IOdrlOffer.md +1 -1
  101. package/docs/reference/interfaces/IOdrlParty.md +1 -1
  102. package/docs/reference/interfaces/IOdrlPartyCollection.md +1 -1
  103. package/docs/reference/interfaces/IOdrlPermission.md +1 -1
  104. package/docs/reference/interfaces/IOdrlPolicy.md +1 -1
  105. package/docs/reference/interfaces/IOdrlProhibition.md +1 -1
  106. package/docs/reference/interfaces/IOdrlRule.md +1 -1
  107. package/docs/reference/interfaces/IOdrlSet.md +1 -1
  108. package/docs/reference/type-aliases/OdrlContextType.md +1 -1
  109. package/docs/reference/variables/OdrlContexts.md +8 -2
  110. package/docs/reference/variables/OdrlTypes.md +0 -6
  111. package/package.json +22 -10
  112. package/dist/cjs/index.cjs +0 -4008
  113. package/dist/esm/index.mjs +0 -3995
@@ -0,0 +1,217 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.twindev.org/w3c-odrl/OdrlDuty",
4
+ "description": "Interface for Duty Rules. A Duty is the obligation to exercise an action, with all refinements satisfied. A Duty is fulfilled if all constraints are satisfied and if its action has been exercised. https://www.w3.org/TR/odrl-model/#duty",
5
+ "type": "object",
6
+ "properties": {
7
+ "@context": {
8
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionRoot"
9
+ },
10
+ "@id": {
11
+ "anyOf": [
12
+ {
13
+ "type": "string"
14
+ },
15
+ {
16
+ "type": "array",
17
+ "items": {
18
+ "type": "string"
19
+ }
20
+ }
21
+ ]
22
+ },
23
+ "@included": {
24
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
25
+ },
26
+ "@graph": {
27
+ "anyOf": [
28
+ {
29
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
30
+ },
31
+ {
32
+ "type": "array",
33
+ "items": {
34
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
35
+ }
36
+ }
37
+ ]
38
+ },
39
+ "@nest": {
40
+ "anyOf": [
41
+ {
42
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdJsonObject"
43
+ },
44
+ {
45
+ "type": "array",
46
+ "items": {
47
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdJsonObject"
48
+ }
49
+ }
50
+ ]
51
+ },
52
+ "@type": {
53
+ "anyOf": [
54
+ {
55
+ "type": "string"
56
+ },
57
+ {
58
+ "type": "array",
59
+ "items": {
60
+ "type": "string"
61
+ }
62
+ }
63
+ ]
64
+ },
65
+ "@reverse": {
66
+ "type": "object",
67
+ "additionalProperties": {
68
+ "type": "string"
69
+ }
70
+ },
71
+ "@index": {
72
+ "type": "string"
73
+ },
74
+ "uid": {
75
+ "type": "string",
76
+ "description": "Optional unique identifier for the rule."
77
+ },
78
+ "action": {
79
+ "anyOf": [
80
+ {
81
+ "$ref": "https://schema.twindev.org/w3c-odrl/ActionType"
82
+ },
83
+ {
84
+ "type": "string"
85
+ },
86
+ {
87
+ "$ref": "https://schema.twindev.org/w3c-odrl/OdrlAction"
88
+ },
89
+ {
90
+ "type": "array",
91
+ "items": {
92
+ "anyOf": [
93
+ {
94
+ "$ref": "https://schema.twindev.org/w3c-odrl/ActionType"
95
+ },
96
+ {
97
+ "type": "string"
98
+ },
99
+ {
100
+ "$ref": "https://schema.twindev.org/w3c-odrl/OdrlAction"
101
+ }
102
+ ]
103
+ }
104
+ }
105
+ ],
106
+ "description": "The action associated with the rule."
107
+ },
108
+ "target": {
109
+ "anyOf": [
110
+ {
111
+ "type": "string"
112
+ },
113
+ {
114
+ "$ref": "https://schema.twindev.org/w3c-odrl/OdrlAsset"
115
+ },
116
+ {
117
+ "type": "array",
118
+ "items": {
119
+ "anyOf": [
120
+ {
121
+ "type": "string"
122
+ },
123
+ {
124
+ "$ref": "https://schema.twindev.org/w3c-odrl/OdrlAsset"
125
+ }
126
+ ]
127
+ }
128
+ }
129
+ ],
130
+ "description": "The target asset for the rule."
131
+ },
132
+ "assigner": {
133
+ "anyOf": [
134
+ {
135
+ "type": "string"
136
+ },
137
+ {
138
+ "$ref": "https://schema.twindev.org/w3c-odrl/OdrlParty"
139
+ }
140
+ ],
141
+ "description": "The assigner of the rule."
142
+ },
143
+ "assignee": {
144
+ "anyOf": [
145
+ {
146
+ "type": "string"
147
+ },
148
+ {
149
+ "$ref": "https://schema.twindev.org/w3c-odrl/OdrlParty"
150
+ }
151
+ ],
152
+ "description": "The assignee of the rule."
153
+ },
154
+ "constraint": {
155
+ "type": "array",
156
+ "items": {
157
+ "$ref": "https://schema.twindev.org/w3c-odrl/OdrlConstraint"
158
+ },
159
+ "description": "Constraints applied to the rule."
160
+ },
161
+ "summary": {
162
+ "type": "string",
163
+ "description": "Additional relation sub-properties as defined in ODRL profiles. For example, 'summary' in profile \"http://example.com/odrl:profile:03\" indicates where the output should be stored."
164
+ },
165
+ "attributedParty": {
166
+ "type": "string",
167
+ "description": "The party to be attributed Used when the duty involves attribution"
168
+ },
169
+ "trackingParty": {
170
+ "type": "string",
171
+ "description": "The party performing the tracking Used when the duty involves tracking"
172
+ },
173
+ "consequence": {
174
+ "type": "array",
175
+ "items": {
176
+ "$ref": "https://schema.twindev.org/w3c-odrl/OdrlDuty"
177
+ },
178
+ "description": "The consequences if the duty is not fulfilled. Only applicable when the Duty is referenced by a Rule with duty or obligation properties."
179
+ },
180
+ "remedy": {
181
+ "type": "array",
182
+ "items": {
183
+ "$ref": "https://schema.twindev.org/w3c-odrl/OdrlDuty"
184
+ },
185
+ "description": "The remedies that may be fulfilled to cure the violation."
186
+ },
187
+ "compensatedParty": {
188
+ "type": "string",
189
+ "description": "The party to be compensated Used when the duty involves compensation"
190
+ }
191
+ },
192
+ "additionalProperties": {
193
+ "anyOf": [
194
+ {
195
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
196
+ },
197
+ {
198
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
199
+ },
200
+ {
201
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdIndexMap"
202
+ },
203
+ {
204
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
205
+ },
206
+ {
207
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdIdMap"
208
+ },
209
+ {
210
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdTypeMap"
211
+ },
212
+ {
213
+ "type": "array"
214
+ }
215
+ ]
216
+ }
217
+ }
@@ -0,0 +1,204 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.twindev.org/w3c-odrl/OdrlLogicalConstraint",
4
+ "description": "Interface for ODRL Logical Constraints. A Logical Constraint compares two or more existing Constraints by one logical operator. If the comparison returns a logical match, then the Logical Constraint is satisfied. https://www.w3.org/TR/odrl-model/#constraint-logical",
5
+ "type": "object",
6
+ "properties": {
7
+ "@context": {
8
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionRoot"
9
+ },
10
+ "@id": {
11
+ "anyOf": [
12
+ {
13
+ "type": "string"
14
+ },
15
+ {
16
+ "type": "array",
17
+ "items": {
18
+ "type": "string"
19
+ }
20
+ }
21
+ ]
22
+ },
23
+ "@included": {
24
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
25
+ },
26
+ "@graph": {
27
+ "anyOf": [
28
+ {
29
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
30
+ },
31
+ {
32
+ "type": "array",
33
+ "items": {
34
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
35
+ }
36
+ }
37
+ ]
38
+ },
39
+ "@nest": {
40
+ "anyOf": [
41
+ {
42
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdJsonObject"
43
+ },
44
+ {
45
+ "type": "array",
46
+ "items": {
47
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdJsonObject"
48
+ }
49
+ }
50
+ ]
51
+ },
52
+ "@type": {
53
+ "anyOf": [
54
+ {
55
+ "type": "string"
56
+ },
57
+ {
58
+ "type": "array",
59
+ "items": {
60
+ "type": "string"
61
+ }
62
+ }
63
+ ]
64
+ },
65
+ "@reverse": {
66
+ "type": "object",
67
+ "additionalProperties": {
68
+ "type": "string"
69
+ }
70
+ },
71
+ "@index": {
72
+ "type": "string"
73
+ },
74
+ "uid": {
75
+ "type": "string",
76
+ "description": "Optional unique identifier for the logical constraint. Must be an IRI."
77
+ },
78
+ "and": {
79
+ "type": "object",
80
+ "properties": {
81
+ "@list": {
82
+ "type": "array",
83
+ "items": {
84
+ "type": "object",
85
+ "properties": {
86
+ "@id": {
87
+ "type": "string"
88
+ }
89
+ },
90
+ "required": [
91
+ "@id"
92
+ ],
93
+ "additionalProperties": false
94
+ }
95
+ }
96
+ },
97
+ "required": [
98
+ "@list"
99
+ ],
100
+ "additionalProperties": false,
101
+ "description": "AND operator - all constraints must be satisfied."
102
+ },
103
+ "or": {
104
+ "type": "object",
105
+ "properties": {
106
+ "@list": {
107
+ "type": "array",
108
+ "items": {
109
+ "type": "object",
110
+ "properties": {
111
+ "@id": {
112
+ "type": "string"
113
+ }
114
+ },
115
+ "required": [
116
+ "@id"
117
+ ],
118
+ "additionalProperties": false
119
+ }
120
+ }
121
+ },
122
+ "required": [
123
+ "@list"
124
+ ],
125
+ "additionalProperties": false,
126
+ "description": "OR operator - at least one constraint must be satisfied."
127
+ },
128
+ "xone": {
129
+ "type": "object",
130
+ "properties": {
131
+ "@list": {
132
+ "type": "array",
133
+ "items": {
134
+ "type": "object",
135
+ "properties": {
136
+ "@id": {
137
+ "type": "string"
138
+ }
139
+ },
140
+ "required": [
141
+ "@id"
142
+ ],
143
+ "additionalProperties": false
144
+ }
145
+ }
146
+ },
147
+ "required": [
148
+ "@list"
149
+ ],
150
+ "additionalProperties": false,
151
+ "description": "XOR operator - exactly one constraint must be satisfied."
152
+ },
153
+ "andSequence": {
154
+ "type": "object",
155
+ "properties": {
156
+ "@list": {
157
+ "type": "array",
158
+ "items": {
159
+ "type": "object",
160
+ "properties": {
161
+ "@id": {
162
+ "type": "string"
163
+ }
164
+ },
165
+ "required": [
166
+ "@id"
167
+ ],
168
+ "additionalProperties": false
169
+ }
170
+ }
171
+ },
172
+ "required": [
173
+ "@list"
174
+ ],
175
+ "additionalProperties": false,
176
+ "description": "AND Sequence operator - all constraints must be satisfied in order."
177
+ }
178
+ },
179
+ "additionalProperties": {
180
+ "anyOf": [
181
+ {
182
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
183
+ },
184
+ {
185
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
186
+ },
187
+ {
188
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdIndexMap"
189
+ },
190
+ {
191
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
192
+ },
193
+ {
194
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdIdMap"
195
+ },
196
+ {
197
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdTypeMap"
198
+ },
199
+ {
200
+ "type": "array"
201
+ }
202
+ ]
203
+ }
204
+ }
@@ -0,0 +1,278 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.twindev.org/w3c-odrl/OdrlOffer",
4
+ "description": "Interface representing an ODRL Offer. An Offer requires an assigner (the party making the offer). https://www.w3.org/TR/odrl-model/#policy-offer",
5
+ "type": "object",
6
+ "properties": {
7
+ "@context": {
8
+ "description": "The ODRL JSON-LD context type.",
9
+ "anyOf": [
10
+ {
11
+ "type": "string",
12
+ "const": "http://www.w3.org/ns/odrl.jsonld"
13
+ },
14
+ {
15
+ "type": "array",
16
+ "items": {
17
+ "type": "string",
18
+ "const": "http://www.w3.org/ns/odrl.jsonld"
19
+ },
20
+ "minItems": 1,
21
+ "maxItems": 1
22
+ },
23
+ {
24
+ "type": "array",
25
+ "minItems": 2,
26
+ "prefixItems": [
27
+ {
28
+ "type": "string",
29
+ "const": "http://www.w3.org/ns/odrl.jsonld"
30
+ },
31
+ {
32
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
33
+ }
34
+ ],
35
+ "items": {
36
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
37
+ }
38
+ },
39
+ {
40
+ "type": "array",
41
+ "minItems": 2,
42
+ "prefixItems": [
43
+ {
44
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
45
+ },
46
+ {
47
+ "type": "string",
48
+ "const": "http://www.w3.org/ns/odrl.jsonld"
49
+ }
50
+ ],
51
+ "items": {
52
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
53
+ }
54
+ }
55
+ ]
56
+ },
57
+ "@id": {
58
+ "anyOf": [
59
+ {
60
+ "type": "string"
61
+ },
62
+ {
63
+ "type": "array",
64
+ "items": {
65
+ "type": "string"
66
+ }
67
+ }
68
+ ]
69
+ },
70
+ "@included": {
71
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
72
+ },
73
+ "@graph": {
74
+ "anyOf": [
75
+ {
76
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
77
+ },
78
+ {
79
+ "type": "array",
80
+ "items": {
81
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
82
+ }
83
+ }
84
+ ]
85
+ },
86
+ "@nest": {
87
+ "anyOf": [
88
+ {
89
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdJsonObject"
90
+ },
91
+ {
92
+ "type": "array",
93
+ "items": {
94
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdJsonObject"
95
+ }
96
+ }
97
+ ]
98
+ },
99
+ "@type": {
100
+ "type": "string",
101
+ "const": "Offer",
102
+ "description": "The type must be \"Offer\"."
103
+ },
104
+ "@reverse": {
105
+ "type": "object",
106
+ "additionalProperties": {
107
+ "type": "string"
108
+ }
109
+ },
110
+ "@index": {
111
+ "type": "string"
112
+ },
113
+ "uid": {
114
+ "type": "string",
115
+ "description": "The unique identifier for the policy. Must be an IRI."
116
+ },
117
+ "profile": {
118
+ "anyOf": [
119
+ {
120
+ "type": "string"
121
+ },
122
+ {
123
+ "type": "array",
124
+ "items": {
125
+ "type": "string"
126
+ }
127
+ }
128
+ ],
129
+ "description": "The profile(s) this policy conforms to. IRIs identifying the ODRL Profile(s)."
130
+ },
131
+ "assigner": {
132
+ "anyOf": [
133
+ {
134
+ "type": "string"
135
+ },
136
+ {
137
+ "$ref": "https://schema.twindev.org/w3c-odrl/OdrlParty"
138
+ }
139
+ ],
140
+ "description": "The assigner of the offer. Required for Offer policies."
141
+ },
142
+ "assignee": {
143
+ "anyOf": [
144
+ {
145
+ "type": "string"
146
+ },
147
+ {
148
+ "$ref": "https://schema.twindev.org/w3c-odrl/OdrlParty"
149
+ }
150
+ ],
151
+ "description": "The assignee of the policy. Applies to all rules unless overridden at rule level."
152
+ },
153
+ "target": {
154
+ "anyOf": [
155
+ {
156
+ "type": "string"
157
+ },
158
+ {
159
+ "$ref": "https://schema.twindev.org/w3c-odrl/OdrlAsset"
160
+ },
161
+ {
162
+ "type": "array",
163
+ "items": {
164
+ "anyOf": [
165
+ {
166
+ "type": "string"
167
+ },
168
+ {
169
+ "$ref": "https://schema.twindev.org/w3c-odrl/OdrlAsset"
170
+ }
171
+ ]
172
+ }
173
+ }
174
+ ],
175
+ "description": "The target asset for the rule."
176
+ },
177
+ "action": {
178
+ "anyOf": [
179
+ {
180
+ "$ref": "https://schema.twindev.org/w3c-odrl/ActionType"
181
+ },
182
+ {
183
+ "type": "string"
184
+ },
185
+ {
186
+ "$ref": "https://schema.twindev.org/w3c-odrl/OdrlAction"
187
+ },
188
+ {
189
+ "type": "array",
190
+ "items": {
191
+ "anyOf": [
192
+ {
193
+ "$ref": "https://schema.twindev.org/w3c-odrl/ActionType"
194
+ },
195
+ {
196
+ "type": "string"
197
+ },
198
+ {
199
+ "$ref": "https://schema.twindev.org/w3c-odrl/OdrlAction"
200
+ }
201
+ ]
202
+ }
203
+ }
204
+ ],
205
+ "description": "The action associated with the rule."
206
+ },
207
+ "inheritFrom": {
208
+ "anyOf": [
209
+ {
210
+ "type": "string"
211
+ },
212
+ {
213
+ "type": "array",
214
+ "items": {
215
+ "type": "string"
216
+ }
217
+ }
218
+ ],
219
+ "description": "The parent policy(ies) this policy inherits from. IRIs identifying the parent Policy(ies)."
220
+ },
221
+ "conflict": {
222
+ "$ref": "https://schema.twindev.org/w3c-odrl/ConflictStrategyType",
223
+ "description": "The conflict resolution strategy.\n- perm: Permissions override Prohibitions\n- prohibit: Prohibitions override Permissions\n- invalid: Policy is void if conflicts exist (default)"
224
+ },
225
+ "permission": {
226
+ "type": "array",
227
+ "items": {
228
+ "$ref": "https://schema.twindev.org/w3c-odrl/OdrlPermission"
229
+ },
230
+ "description": "The permissions in the policy. At least one of permission, prohibition, or obligation must be present."
231
+ },
232
+ "prohibition": {
233
+ "type": "array",
234
+ "items": {
235
+ "$ref": "https://schema.twindev.org/w3c-odrl/OdrlProhibition"
236
+ },
237
+ "description": "The prohibitions in the policy. At least one of permission, prohibition, or obligation must be present."
238
+ },
239
+ "obligation": {
240
+ "type": "array",
241
+ "items": {
242
+ "$ref": "https://schema.twindev.org/w3c-odrl/OdrlDuty"
243
+ },
244
+ "description": "The obligations in the policy. At least one of permission, prohibition, or obligation must be present."
245
+ }
246
+ },
247
+ "required": [
248
+ "@context",
249
+ "@type",
250
+ "assigner",
251
+ "uid"
252
+ ],
253
+ "additionalProperties": {
254
+ "anyOf": [
255
+ {
256
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
257
+ },
258
+ {
259
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
260
+ },
261
+ {
262
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdIndexMap"
263
+ },
264
+ {
265
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
266
+ },
267
+ {
268
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdIdMap"
269
+ },
270
+ {
271
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdTypeMap"
272
+ },
273
+ {
274
+ "type": "array"
275
+ }
276
+ ]
277
+ }
278
+ }