@twin.org/standards-w3c-odrl 0.0.1-next.44 → 0.0.1-next.46

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 (47) hide show
  1. package/dist/cjs/index.cjs +3201 -225
  2. package/dist/esm/index.mjs +3197 -221
  3. package/dist/types/dataTypes/odrlDataTypes.d.ts +13 -0
  4. package/dist/types/index.d.ts +24 -21
  5. package/dist/types/models/IOdrlAction.d.ts +1 -1
  6. package/dist/types/models/IOdrlAgreement.d.ts +23 -0
  7. package/dist/types/models/IOdrlConstraint.d.ts +5 -6
  8. package/dist/types/models/IOdrlOffer.d.ts +18 -0
  9. package/dist/types/models/IOdrlPolicy.d.ts +3 -3
  10. package/dist/types/models/IOdrlRule.d.ts +1 -1
  11. package/dist/types/models/IOdrlSet.d.ts +12 -0
  12. package/dist/types/models/odrlContextType.d.ts +3 -3
  13. package/dist/types/models/odrlContexts.d.ts +2 -14
  14. package/dist/types/models/types/{actionTypes.d.ts → actionType.d.ts} +2 -2
  15. package/dist/types/models/types/{conflictStrategyTypes.d.ts → conflictStrategyType.d.ts} +2 -2
  16. package/dist/types/models/types/odrlTypes.d.ts +8 -0
  17. package/dist/types/models/types/{rightOperandTypes.d.ts → rightOperandType.d.ts} +2 -2
  18. package/dist/types/models/types/{uriActionTypes.d.ts → uriActionType.d.ts} +2 -2
  19. package/docs/changelog.md +30 -0
  20. package/docs/reference/classes/OdrlDataTypes.md +37 -0
  21. package/docs/reference/index.md +11 -6
  22. package/docs/reference/interfaces/IOdrlAgreement.md +180 -0
  23. package/docs/reference/interfaces/IOdrlConstraint.md +2 -2
  24. package/docs/reference/interfaces/IOdrlOffer.md +180 -0
  25. package/docs/reference/interfaces/IOdrlPolicy.md +6 -0
  26. package/docs/reference/interfaces/IOdrlRule.md +1 -1
  27. package/docs/reference/interfaces/IOdrlSet.md +180 -0
  28. package/docs/reference/type-aliases/ActionType.md +1 -1
  29. package/docs/reference/type-aliases/ConflictStrategyType.md +1 -1
  30. package/docs/reference/type-aliases/OdrlContextType.md +1 -1
  31. package/docs/reference/type-aliases/RightOperandType.md +1 -1
  32. package/docs/reference/type-aliases/UriActionType.md +1 -1
  33. package/docs/reference/variables/{ActionTypes.md → ActionType.md} +2 -2
  34. package/docs/reference/variables/{ConflictStrategyTypes.md → ConflictStrategyType.md} +2 -2
  35. package/docs/reference/variables/OdrlContexts.md +4 -22
  36. package/docs/reference/variables/OdrlTypes.md +12 -0
  37. package/docs/reference/variables/{RightOperandTypes.md → RightOperandType.md} +2 -2
  38. package/docs/reference/variables/{UriActionTypes.md → UriActionType.md} +2 -2
  39. package/package.json +5 -3
  40. package/dist/types/models/types/dataTypes.d.ts +0 -37
  41. package/docs/reference/type-aliases/DataType.md +0 -5
  42. package/docs/reference/variables/DataType.md +0 -49
  43. /package/dist/types/models/types/{leftOperandTypes.d.ts → leftOperandType.d.ts} +0 -0
  44. /package/dist/types/models/types/{operatorTypes.d.ts → operatorType.d.ts} +0 -0
  45. /package/dist/types/models/types/{policyTypes.d.ts → policyType.d.ts} +0 -0
  46. /package/dist/types/models/types/{ruleTypes.d.ts → ruleType.d.ts} +0 -0
  47. /package/dist/types/models/types/{statusTypes.d.ts → statusType.d.ts} +0 -0
@@ -1,5 +1,8 @@
1
1
  'use strict';
2
2
 
3
+ var dataCore = require('@twin.org/data-core');
4
+ var dataJsonLd = require('@twin.org/data-json-ld');
5
+
3
6
  // Copyright 2024 IOTA Stiftung.
4
7
  // SPDX-License-Identifier: Apache-2.0.
5
8
  /**
@@ -10,23 +13,11 @@ const OdrlContexts = {
10
13
  /**
11
14
  * The context root for ODRL.
12
15
  */
13
- Context: "https://www.w3.org/ns/odrl.jsonld",
16
+ ContextRedirect: "https://www.w3.org/ns/odrl.jsonld",
14
17
  /**
15
18
  * The context root for ODRL vocabulary.
16
19
  */
17
- ContextVocabulary: "https://www.w3.org/ns/odrl/2/",
18
- /**
19
- * The context root for Dublin Core Terms.
20
- */
21
- ContextDcTerms: "https://purl.org/dc/terms/",
22
- /**
23
- * The context root for RDF.
24
- */
25
- ContextRdf: "https://www.w3.org/1999/02/22-rdf-syntax-ns#",
26
- /**
27
- * The context root for XSD.
28
- */
29
- ContextXsd: "https://www.w3.org/2001/XMLSchema#"
20
+ ContextRoot: "https://www.w3.org/ns/odrl/2/"
30
21
  };
31
22
 
32
23
  // Copyright 2024 IOTA Stiftung.
@@ -95,190 +86,3030 @@ const OdrlTypes = {
95
86
  /**
96
87
  * LogicalConstraint type.
97
88
  */
98
- LogicalConstraint: "LogicalConstraint"
99
- };
100
-
101
- // Copyright 2024 IOTA Stiftung.
102
- // SPDX-License-Identifier: Apache-2.0.
103
- /**
104
- * The types for ODRL Policies.
105
- */
106
- // eslint-disable-next-line @typescript-eslint/naming-convention
107
- const PolicyType = {
89
+ LogicalConstraint: "LogicalConstraint",
108
90
  /**
109
- * Policy type.
91
+ * ContextType.
110
92
  */
111
- Policy: "Policy",
93
+ ContextType: "ContextType",
112
94
  /**
113
- * Set type.
114
- */
115
- Set: "Set",
116
- /**
117
- * Offer type.
118
- */
119
- Offer: "Offer",
120
- /**
121
- * Agreement type.
95
+ * PolicyMetadata type.
122
96
  */
123
- Agreement: "Agreement"
97
+ PolicyMetadata: "PolicyMetadata"
124
98
  };
125
99
 
126
- // Copyright 2024 IOTA Stiftung.
127
- // SPDX-License-Identifier: Apache-2.0.
128
- /**
129
- * The types for ODRL Rules.
130
- */
131
- // eslint-disable-next-line @typescript-eslint/naming-convention
132
- const RuleType = {
133
- /**
134
- * Permission type.
135
- */
136
- Permission: "Permission",
137
- /**
138
- * Prohibition type.
139
- */
140
- Prohibition: "Prohibition",
141
- /**
142
- * Duty type.
143
- */
144
- Duty: "Duty"
100
+ var type$f = "object";
101
+ var properties$f = {
102
+ "@context": {
103
+ $ref: "https://schema.twindev.org/odrl/JsonLdContextDefinitionRoot"
104
+ },
105
+ "@id": {
106
+ type: "string",
107
+ description: "Direct action identifier. Used in simple action references."
108
+ },
109
+ "@included": {
110
+ $ref: "https://schema.twindev.org/odrl/JsonLdIncludedBlock"
111
+ },
112
+ "@graph": {
113
+ anyOf: [
114
+ {
115
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodeObject"
116
+ },
117
+ {
118
+ type: "array",
119
+ items: {
120
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodeObject"
121
+ }
122
+ }
123
+ ]
124
+ },
125
+ "@nest": {
126
+ anyOf: [
127
+ {
128
+ $ref: "https://schema.twindev.org/odrl/JsonLdJsonObject"
129
+ },
130
+ {
131
+ type: "array",
132
+ items: {
133
+ $ref: "https://schema.twindev.org/odrl/JsonLdJsonObject"
134
+ }
135
+ }
136
+ ]
137
+ },
138
+ "@type": {
139
+ anyOf: [
140
+ {
141
+ type: "string"
142
+ },
143
+ {
144
+ type: "array",
145
+ items: {
146
+ type: "string"
147
+ }
148
+ }
149
+ ]
150
+ },
151
+ "@reverse": {
152
+ type: "object",
153
+ additionalProperties: {
154
+ type: "string"
155
+ }
156
+ },
157
+ "@index": {
158
+ type: "string"
159
+ },
160
+ "rdf:value": {
161
+ type: "object",
162
+ properties: {
163
+ "@id": {
164
+ type: "string"
165
+ }
166
+ },
167
+ required: [
168
+ "@id"
169
+ ],
170
+ additionalProperties: false,
171
+ description: "The value/identifier of the action. Used in complex action definitions."
172
+ },
173
+ refinement: {
174
+ anyOf: [
175
+ {
176
+ $ref: "https://schema.twindev.org/odrl/OdrlConstraint"
177
+ },
178
+ {
179
+ $ref: "https://schema.twindev.org/odrl/OdrlLogicalConstraint"
180
+ },
181
+ {
182
+ type: "array",
183
+ items: {
184
+ anyOf: [
185
+ {
186
+ $ref: "https://schema.twindev.org/odrl/OdrlConstraint"
187
+ },
188
+ {
189
+ $ref: "https://schema.twindev.org/odrl/OdrlLogicalConstraint"
190
+ }
191
+ ]
192
+ }
193
+ }
194
+ ],
195
+ description: "Refinements applied to the action."
196
+ },
197
+ includedIn: {
198
+ $ref: "https://schema.twindev.org/odrl/ActionType",
199
+ description: "Reference to the action this action is included in."
200
+ },
201
+ implies: {
202
+ type: "array",
203
+ items: {
204
+ $ref: "https://schema.twindev.org/odrl/ActionType"
205
+ },
206
+ description: "References to actions this action implies."
207
+ }
208
+ };
209
+ var additionalProperties$f = {
210
+ anyOf: [
211
+ {
212
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodePrimitive"
213
+ },
214
+ {
215
+ $ref: "https://schema.twindev.org/odrl/JsonLdLanguageMap"
216
+ },
217
+ {
218
+ $ref: "https://schema.twindev.org/odrl/JsonLdIndexMap"
219
+ },
220
+ {
221
+ $ref: "https://schema.twindev.org/odrl/JsonLdIncludedBlock"
222
+ },
223
+ {
224
+ $ref: "https://schema.twindev.org/odrl/JsonLdIdMap"
225
+ },
226
+ {
227
+ $ref: "https://schema.twindev.org/odrl/JsonLdTypeMap"
228
+ },
229
+ {
230
+ type: "array"
231
+ }
232
+ ]
233
+ };
234
+ var description$g = "Interface for ODRL Actions.";
235
+ var OdrlActionSchema = {
236
+ type: type$f,
237
+ properties: properties$f,
238
+ additionalProperties: additionalProperties$f,
239
+ description: description$g
145
240
  };
146
241
 
147
- // Copyright 2024 IOTA Stiftung.
148
- // SPDX-License-Identifier: Apache-2.0.
149
- /**
150
- * The types for ODRL Conflict Resolution Strategies.
151
- */
152
- // eslint-disable-next-line @typescript-eslint/naming-convention
153
- const ConflictStrategyTypes = {
154
- /**
155
- * Permission type.
156
- */
157
- Perm: "perm",
158
- /**
159
- * Prohibition type.
160
- */
161
- Prohibit: "prohibit",
162
- /**
163
- * Invalid type.
164
- */
165
- Invalid: "invalid"
242
+ var type$e = "object";
243
+ var properties$e = {
244
+ "@context": {
245
+ $ref: "https://schema.twindev.org/odrl/OdrlContextType",
246
+ description: "The context for the policy. Must include \"https://www.w3.org/ns/odrl.jsonld\""
247
+ },
248
+ "@id": {
249
+ anyOf: [
250
+ {
251
+ type: "string"
252
+ },
253
+ {
254
+ type: "array",
255
+ items: {
256
+ type: "string"
257
+ }
258
+ }
259
+ ]
260
+ },
261
+ "@included": {
262
+ $ref: "https://schema.twindev.org/odrl/JsonLdIncludedBlock"
263
+ },
264
+ "@graph": {
265
+ anyOf: [
266
+ {
267
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodeObject"
268
+ },
269
+ {
270
+ type: "array",
271
+ items: {
272
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodeObject"
273
+ }
274
+ }
275
+ ]
276
+ },
277
+ "@nest": {
278
+ anyOf: [
279
+ {
280
+ $ref: "https://schema.twindev.org/odrl/JsonLdJsonObject"
281
+ },
282
+ {
283
+ type: "array",
284
+ items: {
285
+ $ref: "https://schema.twindev.org/odrl/JsonLdJsonObject"
286
+ }
287
+ }
288
+ ]
289
+ },
290
+ "@type": {
291
+ type: "string",
292
+ "const": "Agreement",
293
+ description: "The type must be \"Agreement\"."
294
+ },
295
+ "@reverse": {
296
+ type: "object",
297
+ additionalProperties: {
298
+ type: "string"
299
+ }
300
+ },
301
+ "@index": {
302
+ type: "string"
303
+ },
304
+ uid: {
305
+ type: "string",
306
+ description: "The unique identifier for the policy. Must be an IRI."
307
+ },
308
+ profile: {
309
+ anyOf: [
310
+ {
311
+ type: "string"
312
+ },
313
+ {
314
+ type: "array",
315
+ items: {
316
+ type: "string"
317
+ }
318
+ }
319
+ ],
320
+ description: "The profile(s) this policy conforms to. IRIs identifying the ODRL Profile(s)."
321
+ },
322
+ assigner: {
323
+ anyOf: [
324
+ {
325
+ type: "string"
326
+ },
327
+ {
328
+ $ref: "https://schema.twindev.org/odrl/OdrlParty"
329
+ }
330
+ ],
331
+ description: "The assigner of the agreement. Required for Agreement policies."
332
+ },
333
+ assignee: {
334
+ anyOf: [
335
+ {
336
+ type: "string"
337
+ },
338
+ {
339
+ $ref: "https://schema.twindev.org/odrl/OdrlParty"
340
+ }
341
+ ],
342
+ description: "The assignee of the agreement. Required for Agreement policies."
343
+ },
344
+ target: {
345
+ anyOf: [
346
+ {
347
+ type: "string"
348
+ },
349
+ {
350
+ $ref: "https://schema.twindev.org/odrl/OdrlAsset"
351
+ },
352
+ {
353
+ type: "array",
354
+ items: {
355
+ anyOf: [
356
+ {
357
+ type: "string"
358
+ },
359
+ {
360
+ $ref: "https://schema.twindev.org/odrl/OdrlAsset"
361
+ }
362
+ ]
363
+ }
364
+ }
365
+ ],
366
+ description: "The target asset for the rule."
367
+ },
368
+ action: {
369
+ anyOf: [
370
+ {
371
+ $ref: "https://schema.twindev.org/odrl/ActionType"
372
+ },
373
+ {
374
+ $ref: "https://schema.twindev.org/odrl/OdrlAction"
375
+ },
376
+ {
377
+ type: "array",
378
+ items: {
379
+ anyOf: [
380
+ {
381
+ $ref: "https://schema.twindev.org/odrl/ActionType"
382
+ },
383
+ {
384
+ $ref: "https://schema.twindev.org/odrl/OdrlAction"
385
+ }
386
+ ]
387
+ }
388
+ }
389
+ ],
390
+ description: "The action associated with the rule."
391
+ },
392
+ inheritFrom: {
393
+ anyOf: [
394
+ {
395
+ type: "string"
396
+ },
397
+ {
398
+ type: "array",
399
+ items: {
400
+ type: "string"
401
+ }
402
+ }
403
+ ],
404
+ description: "The parent policy(ies) this policy inherits from. IRIs identifying the parent Policy(ies)."
405
+ },
406
+ conflict: {
407
+ $ref: "https://schema.twindev.org/odrl/ConflictStrategyType",
408
+ description: "The conflict resolution strategy.\n- perm: Permissions override Prohibitions\n- prohibit: Prohibitions override Permissions\n- invalid: Policy is void if conflicts exist (default)"
409
+ },
410
+ permission: {
411
+ type: "array",
412
+ items: {
413
+ $ref: "https://schema.twindev.org/odrl/OdrlPermission"
414
+ },
415
+ description: "The permissions in the policy. At least one of permission, prohibition, or obligation must be present."
416
+ },
417
+ prohibition: {
418
+ type: "array",
419
+ items: {
420
+ $ref: "https://schema.twindev.org/odrl/OdrlProhibition"
421
+ },
422
+ description: "The prohibitions in the policy. At least one of permission, prohibition, or obligation must be present."
423
+ },
424
+ obligation: {
425
+ type: "array",
426
+ items: {
427
+ $ref: "https://schema.twindev.org/odrl/OdrlDuty"
428
+ },
429
+ description: "The obligations in the policy. At least one of permission, prohibition, or obligation must be present."
430
+ }
431
+ };
432
+ var required$6 = [
433
+ "@context",
434
+ "@type",
435
+ "assignee",
436
+ "assigner",
437
+ "uid"
438
+ ];
439
+ var additionalProperties$e = {
440
+ anyOf: [
441
+ {
442
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodePrimitive"
443
+ },
444
+ {
445
+ $ref: "https://schema.twindev.org/odrl/JsonLdLanguageMap"
446
+ },
447
+ {
448
+ $ref: "https://schema.twindev.org/odrl/JsonLdIndexMap"
449
+ },
450
+ {
451
+ $ref: "https://schema.twindev.org/odrl/JsonLdIncludedBlock"
452
+ },
453
+ {
454
+ $ref: "https://schema.twindev.org/odrl/JsonLdIdMap"
455
+ },
456
+ {
457
+ $ref: "https://schema.twindev.org/odrl/JsonLdTypeMap"
458
+ },
459
+ {
460
+ type: "array"
461
+ }
462
+ ]
463
+ };
464
+ var description$f = "Interface representing an ODRL Agreement. An Agreement requires both an assigner and assignee (both agreeing parties).";
465
+ var OdrlAgreementSchema = {
466
+ type: type$e,
467
+ properties: properties$e,
468
+ required: required$6,
469
+ additionalProperties: additionalProperties$e,
470
+ description: description$f
166
471
  };
167
472
 
168
- // Copyright 2024 IOTA Stiftung.
169
- // SPDX-License-Identifier: Apache-2.0.
170
- /**
171
- * The types for ODRL Status.
172
- */
173
- // eslint-disable-next-line @typescript-eslint/naming-convention
174
- const StatusType = {
175
- /**
176
- * Active type.
177
- */
178
- Active: "active",
179
- /**
180
- * Inactive type.
181
- */
182
- Inactive: "inactive",
183
- /**
184
- * Pending type.
185
- */
186
- Pending: "pending",
187
- /**
188
- * Revoked type.
189
- */
190
- Revoked: "revoked"
473
+ var type$d = "object";
474
+ var properties$d = {
475
+ "@context": {
476
+ $ref: "https://schema.twindev.org/odrl/JsonLdContextDefinitionRoot"
477
+ },
478
+ "@id": {
479
+ anyOf: [
480
+ {
481
+ type: "string"
482
+ },
483
+ {
484
+ type: "array",
485
+ items: {
486
+ type: "string"
487
+ }
488
+ }
489
+ ]
490
+ },
491
+ "@included": {
492
+ $ref: "https://schema.twindev.org/odrl/JsonLdIncludedBlock"
493
+ },
494
+ "@graph": {
495
+ anyOf: [
496
+ {
497
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodeObject"
498
+ },
499
+ {
500
+ type: "array",
501
+ items: {
502
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodeObject"
503
+ }
504
+ }
505
+ ]
506
+ },
507
+ "@nest": {
508
+ anyOf: [
509
+ {
510
+ $ref: "https://schema.twindev.org/odrl/JsonLdJsonObject"
511
+ },
512
+ {
513
+ type: "array",
514
+ items: {
515
+ $ref: "https://schema.twindev.org/odrl/JsonLdJsonObject"
516
+ }
517
+ }
518
+ ]
519
+ },
520
+ "@type": {
521
+ type: "string",
522
+ description: "The type of the asset. Can be used to specify additional type information."
523
+ },
524
+ "@reverse": {
525
+ type: "object",
526
+ additionalProperties: {
527
+ type: "string"
528
+ }
529
+ },
530
+ "@index": {
531
+ type: "string"
532
+ },
533
+ uid: {
534
+ type: "string",
535
+ description: "The unique identifier for the asset. Should be an IRI."
536
+ },
537
+ partOf: {
538
+ anyOf: [
539
+ {
540
+ type: "string"
541
+ },
542
+ {
543
+ $ref: "https://schema.twindev.org/odrl/OdrlAssetCollection"
544
+ }
545
+ ],
546
+ description: "Reference to the asset collection this asset is part of. Used to identify an AssetCollection that this Asset is a member of."
547
+ },
548
+ hasPolicy: {
549
+ type: "string",
550
+ description: "Reference to the policy that governs this asset. Used to identify the Policy that governs this Asset."
551
+ }
552
+ };
553
+ var additionalProperties$d = {
554
+ anyOf: [
555
+ {
556
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodePrimitive"
557
+ },
558
+ {
559
+ $ref: "https://schema.twindev.org/odrl/JsonLdLanguageMap"
560
+ },
561
+ {
562
+ $ref: "https://schema.twindev.org/odrl/JsonLdIndexMap"
563
+ },
564
+ {
565
+ $ref: "https://schema.twindev.org/odrl/JsonLdIncludedBlock"
566
+ },
567
+ {
568
+ $ref: "https://schema.twindev.org/odrl/JsonLdIdMap"
569
+ },
570
+ {
571
+ $ref: "https://schema.twindev.org/odrl/JsonLdTypeMap"
572
+ },
573
+ {
574
+ type: "array"
575
+ }
576
+ ]
577
+ };
578
+ var description$e = "Interface for ODRL Assets.";
579
+ var OdrlAssetSchema = {
580
+ type: type$d,
581
+ properties: properties$d,
582
+ additionalProperties: additionalProperties$d,
583
+ description: description$e
191
584
  };
192
585
 
193
- // Copyright 2024 IOTA Stiftung.
194
- // SPDX-License-Identifier: Apache-2.0.
195
- /**
196
- * The types for ODRL Operators.
197
- */
198
- // eslint-disable-next-line @typescript-eslint/naming-convention
199
- const OperatorType = {
200
- /**
201
- * Equal type.
202
- */
203
- Eq: "eq",
204
- /**
205
- * Greater than type.
206
- */
207
- Gt: "gt",
208
- /**
209
- * Greater than or equal to type.
210
- */
211
- Gteq: "gteq",
212
- /**
213
- * Less than type.
214
- */
215
- Lt: "lt",
216
- /**
217
- * Less than or equal to type.
218
- */
219
- Lteq: "lteq",
220
- /**
221
- * Not equal to type.
222
- */
223
- Neq: "neq",
224
- /**
225
- * Is a type.
226
- */
227
- IsA: "isA",
228
- /**
229
- * Has part type.
230
- */
231
- HasPart: "hasPart",
232
- /**
233
- * Is part of type.
234
- */
235
- IsPartOf: "isPartOf",
236
- /**
237
- * Is all of type.
238
- */
239
- IsAllOf: "isAllOf",
240
- /**
241
- * Is any of type.
242
- */
243
- IsAnyOf: "isAnyOf",
244
- /**
245
- * Is none of type.
246
- */
247
- IsNoneOf: "isNoneOf",
248
- /**
249
- * Location time equal to type.
250
- */
251
- LocTimeEq: "locTimeEq",
252
- /**
253
- * Location time greater than or equal to type.
254
- */
255
- LocTimeGteq: "locTimeGteq"
586
+ var type$c = "object";
587
+ var properties$c = {
588
+ "@context": {
589
+ $ref: "https://schema.twindev.org/odrl/JsonLdContextDefinitionRoot"
590
+ },
591
+ "@id": {
592
+ anyOf: [
593
+ {
594
+ type: "string"
595
+ },
596
+ {
597
+ type: "array",
598
+ items: {
599
+ type: "string"
600
+ }
601
+ }
602
+ ]
603
+ },
604
+ "@included": {
605
+ $ref: "https://schema.twindev.org/odrl/JsonLdIncludedBlock"
606
+ },
607
+ "@graph": {
608
+ anyOf: [
609
+ {
610
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodeObject"
611
+ },
612
+ {
613
+ type: "array",
614
+ items: {
615
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodeObject"
616
+ }
617
+ }
618
+ ]
619
+ },
620
+ "@nest": {
621
+ anyOf: [
622
+ {
623
+ $ref: "https://schema.twindev.org/odrl/JsonLdJsonObject"
624
+ },
625
+ {
626
+ type: "array",
627
+ items: {
628
+ $ref: "https://schema.twindev.org/odrl/JsonLdJsonObject"
629
+ }
630
+ }
631
+ ]
632
+ },
633
+ "@type": {
634
+ type: "string",
635
+ description: "The type of the asset. Can be used to specify additional type information."
636
+ },
637
+ "@reverse": {
638
+ type: "object",
639
+ additionalProperties: {
640
+ type: "string"
641
+ }
642
+ },
643
+ "@index": {
644
+ type: "string"
645
+ },
646
+ uid: {
647
+ type: "string",
648
+ description: "The unique identifier for the asset. Should be an IRI."
649
+ },
650
+ partOf: {
651
+ anyOf: [
652
+ {
653
+ type: "string"
654
+ },
655
+ {
656
+ $ref: "https://schema.twindev.org/odrl/OdrlAssetCollection"
657
+ }
658
+ ],
659
+ description: "Reference to the asset collection this asset is part of. Used to identify an AssetCollection that this Asset is a member of."
660
+ },
661
+ hasPolicy: {
662
+ type: "string",
663
+ description: "Reference to the policy that governs this asset. Used to identify the Policy that governs this Asset."
664
+ },
665
+ source: {
666
+ type: "string",
667
+ description: "Reference to the source of the asset collection. Must be an IRI that references the AssetCollection."
668
+ },
669
+ refinement: {
670
+ type: "array",
671
+ items: {
672
+ $ref: "https://schema.twindev.org/odrl/OdrlConstraint"
673
+ },
674
+ description: "Refinements applied to the asset collection. Used to specify the refinement context under which to identify individual Asset(s) of the complete collection. The refinement applies to the characteristics of each member of the collection (not the resource as a whole)."
675
+ }
676
+ };
677
+ var required$5 = [
678
+ "source"
679
+ ];
680
+ var additionalProperties$c = {
681
+ anyOf: [
682
+ {
683
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodePrimitive"
684
+ },
685
+ {
686
+ $ref: "https://schema.twindev.org/odrl/JsonLdLanguageMap"
687
+ },
688
+ {
689
+ $ref: "https://schema.twindev.org/odrl/JsonLdIndexMap"
690
+ },
691
+ {
692
+ $ref: "https://schema.twindev.org/odrl/JsonLdIncludedBlock"
693
+ },
694
+ {
695
+ $ref: "https://schema.twindev.org/odrl/JsonLdIdMap"
696
+ },
697
+ {
698
+ $ref: "https://schema.twindev.org/odrl/JsonLdTypeMap"
699
+ },
700
+ {
701
+ type: "array"
702
+ }
703
+ ]
704
+ };
705
+ var description$d = "Interface for ODRL Asset Collections. An AssetCollection is a single resource representing a set of member resources, where all members of the set will be the subject of the Rule.";
706
+ var OdrlAssetCollectionSchema = {
707
+ type: type$c,
708
+ properties: properties$c,
709
+ required: required$5,
710
+ additionalProperties: additionalProperties$c,
711
+ description: description$d
712
+ };
713
+
714
+ var type$b = "object";
715
+ var properties$b = {
716
+ "@context": {
717
+ $ref: "https://schema.twindev.org/odrl/JsonLdContextDefinitionRoot"
718
+ },
719
+ "@id": {
720
+ anyOf: [
721
+ {
722
+ type: "string"
723
+ },
724
+ {
725
+ type: "array",
726
+ items: {
727
+ type: "string"
728
+ }
729
+ }
730
+ ]
731
+ },
732
+ "@included": {
733
+ $ref: "https://schema.twindev.org/odrl/JsonLdIncludedBlock"
734
+ },
735
+ "@graph": {
736
+ anyOf: [
737
+ {
738
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodeObject"
739
+ },
740
+ {
741
+ type: "array",
742
+ items: {
743
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodeObject"
744
+ }
745
+ }
746
+ ]
747
+ },
748
+ "@nest": {
749
+ anyOf: [
750
+ {
751
+ $ref: "https://schema.twindev.org/odrl/JsonLdJsonObject"
752
+ },
753
+ {
754
+ type: "array",
755
+ items: {
756
+ $ref: "https://schema.twindev.org/odrl/JsonLdJsonObject"
757
+ }
758
+ }
759
+ ]
760
+ },
761
+ "@type": {
762
+ anyOf: [
763
+ {
764
+ type: "string"
765
+ },
766
+ {
767
+ type: "array",
768
+ items: {
769
+ type: "string"
770
+ }
771
+ }
772
+ ]
773
+ },
774
+ "@reverse": {
775
+ type: "object",
776
+ additionalProperties: {
777
+ type: "string"
778
+ }
779
+ },
780
+ "@index": {
781
+ type: "string"
782
+ },
783
+ uid: {
784
+ type: "string",
785
+ description: "Optional unique identifier for the constraint."
786
+ },
787
+ leftOperand: {
788
+ anyOf: [
789
+ {
790
+ type: "string"
791
+ },
792
+ {
793
+ $ref: "https://schema.twindev.org/odrl/LeftOperandType"
794
+ }
795
+ ],
796
+ description: "The left operand of the constraint."
797
+ },
798
+ operator: {
799
+ $ref: "https://schema.twindev.org/odrl/OperatorType",
800
+ description: "The operator of the constraint."
801
+ },
802
+ rightOperand: {
803
+ anyOf: [
804
+ {
805
+ type: "string"
806
+ },
807
+ {
808
+ type: "object",
809
+ properties: {
810
+ "@value": {
811
+ type: "string"
812
+ },
813
+ "@type": {
814
+ type: "string"
815
+ }
816
+ },
817
+ required: [
818
+ "@value"
819
+ ],
820
+ additionalProperties: false
821
+ },
822
+ {
823
+ type: "object",
824
+ properties: {
825
+ "@id": {
826
+ type: "string"
827
+ }
828
+ },
829
+ required: [
830
+ "@id"
831
+ ],
832
+ additionalProperties: false
833
+ }
834
+ ],
835
+ description: "The right operand of the constraint. value with optional"
836
+ },
837
+ rightOperandReference: {
838
+ type: "string",
839
+ description: "Reference to the right operand."
840
+ },
841
+ dataType: {
842
+ type: "string",
843
+ description: "The data type of the right operand."
844
+ },
845
+ unit: {
846
+ type: "string",
847
+ description: "The unit for the right operand value."
848
+ },
849
+ status: {
850
+ $ref: "https://schema.twindev.org/odrl/StatusType",
851
+ description: "The status value for comparison."
852
+ }
853
+ };
854
+ var required$4 = [
855
+ "leftOperand",
856
+ "operator"
857
+ ];
858
+ var additionalProperties$b = {
859
+ anyOf: [
860
+ {
861
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodePrimitive"
862
+ },
863
+ {
864
+ $ref: "https://schema.twindev.org/odrl/JsonLdLanguageMap"
865
+ },
866
+ {
867
+ $ref: "https://schema.twindev.org/odrl/JsonLdIndexMap"
868
+ },
869
+ {
870
+ $ref: "https://schema.twindev.org/odrl/JsonLdIncludedBlock"
871
+ },
872
+ {
873
+ $ref: "https://schema.twindev.org/odrl/JsonLdIdMap"
874
+ },
875
+ {
876
+ $ref: "https://schema.twindev.org/odrl/JsonLdTypeMap"
877
+ },
878
+ {
879
+ type: "array"
880
+ }
881
+ ]
882
+ };
883
+ var description$c = "Interface for ODRL Constraints.";
884
+ var OdrlConstraintSchema = {
885
+ type: type$b,
886
+ properties: properties$b,
887
+ required: required$4,
888
+ additionalProperties: additionalProperties$b,
889
+ description: description$c
890
+ };
891
+
892
+ var anyOf = [
893
+ {
894
+ type: "string",
895
+ "const": "https://www.w3.org/ns/odrl/2/"
896
+ },
897
+ {
898
+ type: "array",
899
+ minItems: 1,
900
+ items: [
901
+ {
902
+ type: "string",
903
+ "const": "https://www.w3.org/ns/odrl/2/"
904
+ }
905
+ ],
906
+ additionalItems: {
907
+ $ref: "https://schema.twindev.org/odrl/JsonLdContextDefinitionElement"
908
+ }
909
+ },
910
+ {
911
+ type: "array",
912
+ minItems: 2,
913
+ items: [
914
+ {
915
+ type: "string",
916
+ "const": "https://www.w3.org/ns/odrl/2/"
917
+ },
918
+ {
919
+ $ref: "https://schema.twindev.org/odrl/JsonLdContextDefinitionElement"
920
+ }
921
+ ],
922
+ additionalItems: {
923
+ $ref: "https://schema.twindev.org/odrl/JsonLdContextDefinitionElement"
924
+ }
925
+ },
926
+ {
927
+ type: "array",
928
+ minItems: 2,
929
+ items: [
930
+ {
931
+ $ref: "https://schema.twindev.org/odrl/JsonLdContextDefinitionElement"
932
+ },
933
+ {
934
+ type: "string",
935
+ "const": "https://www.w3.org/ns/odrl/2/"
936
+ }
937
+ ],
938
+ additionalItems: {
939
+ $ref: "https://schema.twindev.org/odrl/JsonLdContextDefinitionElement"
940
+ }
941
+ }
942
+ ];
943
+ var description$b = "The ODRL JSON-LD context type.";
944
+ var OdrlContextTypeSchema = {
945
+ anyOf: anyOf,
946
+ description: description$b
947
+ };
948
+
949
+ var type$a = "object";
950
+ var properties$a = {
951
+ "@context": {
952
+ $ref: "https://schema.twindev.org/odrl/JsonLdContextDefinitionRoot"
953
+ },
954
+ "@id": {
955
+ anyOf: [
956
+ {
957
+ type: "string"
958
+ },
959
+ {
960
+ type: "array",
961
+ items: {
962
+ type: "string"
963
+ }
964
+ }
965
+ ]
966
+ },
967
+ "@included": {
968
+ $ref: "https://schema.twindev.org/odrl/JsonLdIncludedBlock"
969
+ },
970
+ "@graph": {
971
+ anyOf: [
972
+ {
973
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodeObject"
974
+ },
975
+ {
976
+ type: "array",
977
+ items: {
978
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodeObject"
979
+ }
980
+ }
981
+ ]
982
+ },
983
+ "@nest": {
984
+ anyOf: [
985
+ {
986
+ $ref: "https://schema.twindev.org/odrl/JsonLdJsonObject"
987
+ },
988
+ {
989
+ type: "array",
990
+ items: {
991
+ $ref: "https://schema.twindev.org/odrl/JsonLdJsonObject"
992
+ }
993
+ }
994
+ ]
995
+ },
996
+ "@type": {
997
+ anyOf: [
998
+ {
999
+ type: "string"
1000
+ },
1001
+ {
1002
+ type: "array",
1003
+ items: {
1004
+ type: "string"
1005
+ }
1006
+ }
1007
+ ]
1008
+ },
1009
+ "@reverse": {
1010
+ type: "object",
1011
+ additionalProperties: {
1012
+ type: "string"
1013
+ }
1014
+ },
1015
+ "@index": {
1016
+ type: "string"
1017
+ },
1018
+ uid: {
1019
+ type: "string",
1020
+ description: "Optional unique identifier for the rule."
1021
+ },
1022
+ action: {
1023
+ anyOf: [
1024
+ {
1025
+ $ref: "https://schema.twindev.org/odrl/ActionType"
1026
+ },
1027
+ {
1028
+ $ref: "https://schema.twindev.org/odrl/OdrlAction"
1029
+ },
1030
+ {
1031
+ type: "array",
1032
+ items: {
1033
+ anyOf: [
1034
+ {
1035
+ $ref: "https://schema.twindev.org/odrl/ActionType"
1036
+ },
1037
+ {
1038
+ $ref: "https://schema.twindev.org/odrl/OdrlAction"
1039
+ }
1040
+ ]
1041
+ }
1042
+ }
1043
+ ],
1044
+ description: "The action associated with the rule."
1045
+ },
1046
+ target: {
1047
+ anyOf: [
1048
+ {
1049
+ type: "string"
1050
+ },
1051
+ {
1052
+ $ref: "https://schema.twindev.org/odrl/OdrlAsset"
1053
+ },
1054
+ {
1055
+ type: "array",
1056
+ items: {
1057
+ anyOf: [
1058
+ {
1059
+ type: "string"
1060
+ },
1061
+ {
1062
+ $ref: "https://schema.twindev.org/odrl/OdrlAsset"
1063
+ }
1064
+ ]
1065
+ }
1066
+ }
1067
+ ],
1068
+ description: "The target asset for the rule."
1069
+ },
1070
+ assigner: {
1071
+ anyOf: [
1072
+ {
1073
+ type: "string"
1074
+ },
1075
+ {
1076
+ $ref: "https://schema.twindev.org/odrl/OdrlParty"
1077
+ }
1078
+ ],
1079
+ description: "The assigner of the rule."
1080
+ },
1081
+ assignee: {
1082
+ anyOf: [
1083
+ {
1084
+ type: "string"
1085
+ },
1086
+ {
1087
+ $ref: "https://schema.twindev.org/odrl/OdrlParty"
1088
+ }
1089
+ ],
1090
+ description: "The assignee of the rule."
1091
+ },
1092
+ constraint: {
1093
+ type: "array",
1094
+ items: {
1095
+ $ref: "https://schema.twindev.org/odrl/OdrlConstraint"
1096
+ },
1097
+ description: "Constraints applied to the rule."
1098
+ },
1099
+ summary: {
1100
+ type: "string",
1101
+ 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."
1102
+ },
1103
+ attributedParty: {
1104
+ type: "string",
1105
+ description: "The party to be attributed Used when the duty involves attribution"
1106
+ },
1107
+ trackingParty: {
1108
+ type: "string",
1109
+ description: "The party performing the tracking Used when the duty involves tracking"
1110
+ },
1111
+ consequence: {
1112
+ type: "array",
1113
+ items: {
1114
+ $ref: "https://schema.twindev.org/odrl/OdrlDuty"
1115
+ },
1116
+ description: "The consequences if the duty is not fulfilled. Only applicable when the Duty is referenced by a Rule with duty or obligation properties."
1117
+ },
1118
+ remedy: {
1119
+ type: "array",
1120
+ items: {
1121
+ $ref: "https://schema.twindev.org/odrl/OdrlDuty"
1122
+ },
1123
+ description: "The remedies that may be fulfilled to cure the violation."
1124
+ },
1125
+ compensatedParty: {
1126
+ type: "string",
1127
+ description: "The party to be compensated Used when the duty involves compensation"
1128
+ }
1129
+ };
1130
+ var additionalProperties$a = {
1131
+ anyOf: [
1132
+ {
1133
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodePrimitive"
1134
+ },
1135
+ {
1136
+ $ref: "https://schema.twindev.org/odrl/JsonLdLanguageMap"
1137
+ },
1138
+ {
1139
+ $ref: "https://schema.twindev.org/odrl/JsonLdIndexMap"
1140
+ },
1141
+ {
1142
+ $ref: "https://schema.twindev.org/odrl/JsonLdIncludedBlock"
1143
+ },
1144
+ {
1145
+ $ref: "https://schema.twindev.org/odrl/JsonLdIdMap"
1146
+ },
1147
+ {
1148
+ $ref: "https://schema.twindev.org/odrl/JsonLdTypeMap"
1149
+ },
1150
+ {
1151
+ type: "array"
1152
+ }
1153
+ ]
1154
+ };
1155
+ var description$a = "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.";
1156
+ var OdrlDutySchema = {
1157
+ type: type$a,
1158
+ properties: properties$a,
1159
+ additionalProperties: additionalProperties$a,
1160
+ description: description$a
1161
+ };
1162
+
1163
+ var type$9 = "object";
1164
+ var properties$9 = {
1165
+ "@context": {
1166
+ $ref: "https://schema.twindev.org/odrl/JsonLdContextDefinitionRoot"
1167
+ },
1168
+ "@id": {
1169
+ anyOf: [
1170
+ {
1171
+ type: "string"
1172
+ },
1173
+ {
1174
+ type: "array",
1175
+ items: {
1176
+ type: "string"
1177
+ }
1178
+ }
1179
+ ]
1180
+ },
1181
+ "@included": {
1182
+ $ref: "https://schema.twindev.org/odrl/JsonLdIncludedBlock"
1183
+ },
1184
+ "@graph": {
1185
+ anyOf: [
1186
+ {
1187
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodeObject"
1188
+ },
1189
+ {
1190
+ type: "array",
1191
+ items: {
1192
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodeObject"
1193
+ }
1194
+ }
1195
+ ]
1196
+ },
1197
+ "@nest": {
1198
+ anyOf: [
1199
+ {
1200
+ $ref: "https://schema.twindev.org/odrl/JsonLdJsonObject"
1201
+ },
1202
+ {
1203
+ type: "array",
1204
+ items: {
1205
+ $ref: "https://schema.twindev.org/odrl/JsonLdJsonObject"
1206
+ }
1207
+ }
1208
+ ]
1209
+ },
1210
+ "@type": {
1211
+ anyOf: [
1212
+ {
1213
+ type: "string"
1214
+ },
1215
+ {
1216
+ type: "array",
1217
+ items: {
1218
+ type: "string"
1219
+ }
1220
+ }
1221
+ ]
1222
+ },
1223
+ "@reverse": {
1224
+ type: "object",
1225
+ additionalProperties: {
1226
+ type: "string"
1227
+ }
1228
+ },
1229
+ "@index": {
1230
+ type: "string"
1231
+ },
1232
+ uid: {
1233
+ type: "string",
1234
+ description: "Optional unique identifier for the logical constraint. Must be an IRI."
1235
+ },
1236
+ and: {
1237
+ type: "object",
1238
+ properties: {
1239
+ "@list": {
1240
+ type: "array",
1241
+ items: {
1242
+ type: "object",
1243
+ properties: {
1244
+ "@id": {
1245
+ type: "string"
1246
+ }
1247
+ },
1248
+ required: [
1249
+ "@id"
1250
+ ],
1251
+ additionalProperties: false
1252
+ }
1253
+ }
1254
+ },
1255
+ required: [
1256
+ "@list"
1257
+ ],
1258
+ additionalProperties: false,
1259
+ description: "AND operator - all constraints must be satisfied."
1260
+ },
1261
+ or: {
1262
+ type: "object",
1263
+ properties: {
1264
+ "@list": {
1265
+ type: "array",
1266
+ items: {
1267
+ type: "object",
1268
+ properties: {
1269
+ "@id": {
1270
+ type: "string"
1271
+ }
1272
+ },
1273
+ required: [
1274
+ "@id"
1275
+ ],
1276
+ additionalProperties: false
1277
+ }
1278
+ }
1279
+ },
1280
+ required: [
1281
+ "@list"
1282
+ ],
1283
+ additionalProperties: false,
1284
+ description: "OR operator - at least one constraint must be satisfied."
1285
+ },
1286
+ xone: {
1287
+ type: "object",
1288
+ properties: {
1289
+ "@list": {
1290
+ type: "array",
1291
+ items: {
1292
+ type: "object",
1293
+ properties: {
1294
+ "@id": {
1295
+ type: "string"
1296
+ }
1297
+ },
1298
+ required: [
1299
+ "@id"
1300
+ ],
1301
+ additionalProperties: false
1302
+ }
1303
+ }
1304
+ },
1305
+ required: [
1306
+ "@list"
1307
+ ],
1308
+ additionalProperties: false,
1309
+ description: "XOR operator - exactly one constraint must be satisfied."
1310
+ },
1311
+ andSequence: {
1312
+ type: "object",
1313
+ properties: {
1314
+ "@list": {
1315
+ type: "array",
1316
+ items: {
1317
+ type: "object",
1318
+ properties: {
1319
+ "@id": {
1320
+ type: "string"
1321
+ }
1322
+ },
1323
+ required: [
1324
+ "@id"
1325
+ ],
1326
+ additionalProperties: false
1327
+ }
1328
+ }
1329
+ },
1330
+ required: [
1331
+ "@list"
1332
+ ],
1333
+ additionalProperties: false,
1334
+ description: "AND Sequence operator - all constraints must be satisfied in order."
1335
+ }
1336
+ };
1337
+ var additionalProperties$9 = {
1338
+ anyOf: [
1339
+ {
1340
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodePrimitive"
1341
+ },
1342
+ {
1343
+ $ref: "https://schema.twindev.org/odrl/JsonLdLanguageMap"
1344
+ },
1345
+ {
1346
+ $ref: "https://schema.twindev.org/odrl/JsonLdIndexMap"
1347
+ },
1348
+ {
1349
+ $ref: "https://schema.twindev.org/odrl/JsonLdIncludedBlock"
1350
+ },
1351
+ {
1352
+ $ref: "https://schema.twindev.org/odrl/JsonLdIdMap"
1353
+ },
1354
+ {
1355
+ $ref: "https://schema.twindev.org/odrl/JsonLdTypeMap"
1356
+ },
1357
+ {
1358
+ type: "array"
1359
+ }
1360
+ ]
1361
+ };
1362
+ var description$9 = "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.";
1363
+ var OdrlLogicalConstraintSchema = {
1364
+ type: type$9,
1365
+ properties: properties$9,
1366
+ additionalProperties: additionalProperties$9,
1367
+ description: description$9
1368
+ };
1369
+
1370
+ var type$8 = "object";
1371
+ var properties$8 = {
1372
+ "@context": {
1373
+ $ref: "https://schema.twindev.org/odrl/OdrlContextType",
1374
+ description: "The context for the policy. Must include \"https://www.w3.org/ns/odrl.jsonld\""
1375
+ },
1376
+ "@id": {
1377
+ anyOf: [
1378
+ {
1379
+ type: "string"
1380
+ },
1381
+ {
1382
+ type: "array",
1383
+ items: {
1384
+ type: "string"
1385
+ }
1386
+ }
1387
+ ]
1388
+ },
1389
+ "@included": {
1390
+ $ref: "https://schema.twindev.org/odrl/JsonLdIncludedBlock"
1391
+ },
1392
+ "@graph": {
1393
+ anyOf: [
1394
+ {
1395
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodeObject"
1396
+ },
1397
+ {
1398
+ type: "array",
1399
+ items: {
1400
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodeObject"
1401
+ }
1402
+ }
1403
+ ]
1404
+ },
1405
+ "@nest": {
1406
+ anyOf: [
1407
+ {
1408
+ $ref: "https://schema.twindev.org/odrl/JsonLdJsonObject"
1409
+ },
1410
+ {
1411
+ type: "array",
1412
+ items: {
1413
+ $ref: "https://schema.twindev.org/odrl/JsonLdJsonObject"
1414
+ }
1415
+ }
1416
+ ]
1417
+ },
1418
+ "@type": {
1419
+ type: "string",
1420
+ "const": "Offer",
1421
+ description: "The type must be \"Offer\"."
1422
+ },
1423
+ "@reverse": {
1424
+ type: "object",
1425
+ additionalProperties: {
1426
+ type: "string"
1427
+ }
1428
+ },
1429
+ "@index": {
1430
+ type: "string"
1431
+ },
1432
+ uid: {
1433
+ type: "string",
1434
+ description: "The unique identifier for the policy. Must be an IRI."
1435
+ },
1436
+ profile: {
1437
+ anyOf: [
1438
+ {
1439
+ type: "string"
1440
+ },
1441
+ {
1442
+ type: "array",
1443
+ items: {
1444
+ type: "string"
1445
+ }
1446
+ }
1447
+ ],
1448
+ description: "The profile(s) this policy conforms to. IRIs identifying the ODRL Profile(s)."
1449
+ },
1450
+ assigner: {
1451
+ anyOf: [
1452
+ {
1453
+ type: "string"
1454
+ },
1455
+ {
1456
+ $ref: "https://schema.twindev.org/odrl/OdrlParty"
1457
+ }
1458
+ ],
1459
+ description: "The assigner of the offer. Required for Offer policies."
1460
+ },
1461
+ assignee: {
1462
+ anyOf: [
1463
+ {
1464
+ type: "string"
1465
+ },
1466
+ {
1467
+ $ref: "https://schema.twindev.org/odrl/OdrlParty"
1468
+ }
1469
+ ],
1470
+ description: "The assignee of the policy. Applies to all rules unless overridden at rule level."
1471
+ },
1472
+ target: {
1473
+ anyOf: [
1474
+ {
1475
+ type: "string"
1476
+ },
1477
+ {
1478
+ $ref: "https://schema.twindev.org/odrl/OdrlAsset"
1479
+ },
1480
+ {
1481
+ type: "array",
1482
+ items: {
1483
+ anyOf: [
1484
+ {
1485
+ type: "string"
1486
+ },
1487
+ {
1488
+ $ref: "https://schema.twindev.org/odrl/OdrlAsset"
1489
+ }
1490
+ ]
1491
+ }
1492
+ }
1493
+ ],
1494
+ description: "The target asset for the rule."
1495
+ },
1496
+ action: {
1497
+ anyOf: [
1498
+ {
1499
+ $ref: "https://schema.twindev.org/odrl/ActionType"
1500
+ },
1501
+ {
1502
+ $ref: "https://schema.twindev.org/odrl/OdrlAction"
1503
+ },
1504
+ {
1505
+ type: "array",
1506
+ items: {
1507
+ anyOf: [
1508
+ {
1509
+ $ref: "https://schema.twindev.org/odrl/ActionType"
1510
+ },
1511
+ {
1512
+ $ref: "https://schema.twindev.org/odrl/OdrlAction"
1513
+ }
1514
+ ]
1515
+ }
1516
+ }
1517
+ ],
1518
+ description: "The action associated with the rule."
1519
+ },
1520
+ inheritFrom: {
1521
+ anyOf: [
1522
+ {
1523
+ type: "string"
1524
+ },
1525
+ {
1526
+ type: "array",
1527
+ items: {
1528
+ type: "string"
1529
+ }
1530
+ }
1531
+ ],
1532
+ description: "The parent policy(ies) this policy inherits from. IRIs identifying the parent Policy(ies)."
1533
+ },
1534
+ conflict: {
1535
+ $ref: "https://schema.twindev.org/odrl/ConflictStrategyType",
1536
+ description: "The conflict resolution strategy.\n- perm: Permissions override Prohibitions\n- prohibit: Prohibitions override Permissions\n- invalid: Policy is void if conflicts exist (default)"
1537
+ },
1538
+ permission: {
1539
+ type: "array",
1540
+ items: {
1541
+ $ref: "https://schema.twindev.org/odrl/OdrlPermission"
1542
+ },
1543
+ description: "The permissions in the policy. At least one of permission, prohibition, or obligation must be present."
1544
+ },
1545
+ prohibition: {
1546
+ type: "array",
1547
+ items: {
1548
+ $ref: "https://schema.twindev.org/odrl/OdrlProhibition"
1549
+ },
1550
+ description: "The prohibitions in the policy. At least one of permission, prohibition, or obligation must be present."
1551
+ },
1552
+ obligation: {
1553
+ type: "array",
1554
+ items: {
1555
+ $ref: "https://schema.twindev.org/odrl/OdrlDuty"
1556
+ },
1557
+ description: "The obligations in the policy. At least one of permission, prohibition, or obligation must be present."
1558
+ }
1559
+ };
1560
+ var required$3 = [
1561
+ "@context",
1562
+ "@type",
1563
+ "assigner",
1564
+ "uid"
1565
+ ];
1566
+ var additionalProperties$8 = {
1567
+ anyOf: [
1568
+ {
1569
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodePrimitive"
1570
+ },
1571
+ {
1572
+ $ref: "https://schema.twindev.org/odrl/JsonLdLanguageMap"
1573
+ },
1574
+ {
1575
+ $ref: "https://schema.twindev.org/odrl/JsonLdIndexMap"
1576
+ },
1577
+ {
1578
+ $ref: "https://schema.twindev.org/odrl/JsonLdIncludedBlock"
1579
+ },
1580
+ {
1581
+ $ref: "https://schema.twindev.org/odrl/JsonLdIdMap"
1582
+ },
1583
+ {
1584
+ $ref: "https://schema.twindev.org/odrl/JsonLdTypeMap"
1585
+ },
1586
+ {
1587
+ type: "array"
1588
+ }
1589
+ ]
1590
+ };
1591
+ var description$8 = "Interface representing an ODRL Offer. An Offer requires an assigner (the party making the offer).";
1592
+ var OdrlOfferSchema = {
1593
+ type: type$8,
1594
+ properties: properties$8,
1595
+ required: required$3,
1596
+ additionalProperties: additionalProperties$8,
1597
+ description: description$8
1598
+ };
1599
+
1600
+ var type$7 = "object";
1601
+ var properties$7 = {
1602
+ "@context": {
1603
+ $ref: "https://schema.twindev.org/odrl/JsonLdContextDefinitionRoot"
1604
+ },
1605
+ "@id": {
1606
+ anyOf: [
1607
+ {
1608
+ type: "string"
1609
+ },
1610
+ {
1611
+ type: "array",
1612
+ items: {
1613
+ type: "string"
1614
+ }
1615
+ }
1616
+ ]
1617
+ },
1618
+ "@included": {
1619
+ $ref: "https://schema.twindev.org/odrl/JsonLdIncludedBlock"
1620
+ },
1621
+ "@graph": {
1622
+ anyOf: [
1623
+ {
1624
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodeObject"
1625
+ },
1626
+ {
1627
+ type: "array",
1628
+ items: {
1629
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodeObject"
1630
+ }
1631
+ }
1632
+ ]
1633
+ },
1634
+ "@nest": {
1635
+ anyOf: [
1636
+ {
1637
+ $ref: "https://schema.twindev.org/odrl/JsonLdJsonObject"
1638
+ },
1639
+ {
1640
+ type: "array",
1641
+ items: {
1642
+ $ref: "https://schema.twindev.org/odrl/JsonLdJsonObject"
1643
+ }
1644
+ }
1645
+ ]
1646
+ },
1647
+ "@type": {
1648
+ anyOf: [
1649
+ {
1650
+ type: "string"
1651
+ },
1652
+ {
1653
+ type: "array",
1654
+ items: {
1655
+ type: "string"
1656
+ }
1657
+ }
1658
+ ],
1659
+ description: "The type of the party. Can be used to specify additional type information (e.g., \"Party\", \"vcard:Organization\", \"vcard:Individual\")."
1660
+ },
1661
+ "@reverse": {
1662
+ type: "object",
1663
+ additionalProperties: {
1664
+ type: "string"
1665
+ }
1666
+ },
1667
+ "@index": {
1668
+ type: "string"
1669
+ },
1670
+ uid: {
1671
+ type: "string",
1672
+ description: "The unique identifier for the party. Must be an IRI."
1673
+ },
1674
+ partOf: {
1675
+ anyOf: [
1676
+ {
1677
+ type: "string"
1678
+ },
1679
+ {
1680
+ $ref: "https://schema.twindev.org/odrl/OdrlPartyCollection"
1681
+ }
1682
+ ],
1683
+ description: "Reference to the party collection this party is part of. Used to identify a PartyCollection that a Party entity is a member of."
1684
+ },
1685
+ assigneeOf: {
1686
+ type: "string",
1687
+ description: "Reference to a policy where this party is an assignee. When assigneeOf is asserted, the Party MUST be inferred to undertake the assignee functional role of all the Rules of that Policy."
1688
+ },
1689
+ assignerOf: {
1690
+ type: "string",
1691
+ description: "Reference to a policy where this party is an assigner. When assignerOf is asserted, the Party MUST be inferred to undertake the assigner functional role of all the Rules of that Policy."
1692
+ }
1693
+ };
1694
+ var additionalProperties$7 = {
1695
+ anyOf: [
1696
+ {
1697
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodePrimitive"
1698
+ },
1699
+ {
1700
+ $ref: "https://schema.twindev.org/odrl/JsonLdLanguageMap"
1701
+ },
1702
+ {
1703
+ $ref: "https://schema.twindev.org/odrl/JsonLdIndexMap"
1704
+ },
1705
+ {
1706
+ $ref: "https://schema.twindev.org/odrl/JsonLdIncludedBlock"
1707
+ },
1708
+ {
1709
+ $ref: "https://schema.twindev.org/odrl/JsonLdIdMap"
1710
+ },
1711
+ {
1712
+ $ref: "https://schema.twindev.org/odrl/JsonLdTypeMap"
1713
+ },
1714
+ {
1715
+ type: "array"
1716
+ }
1717
+ ]
1718
+ };
1719
+ var description$7 = "Interface for ODRL Parties.";
1720
+ var OdrlPartySchema = {
1721
+ type: type$7,
1722
+ properties: properties$7,
1723
+ additionalProperties: additionalProperties$7,
1724
+ description: description$7
1725
+ };
1726
+
1727
+ var type$6 = "object";
1728
+ var properties$6 = {
1729
+ "@context": {
1730
+ $ref: "https://schema.twindev.org/odrl/JsonLdContextDefinitionRoot"
1731
+ },
1732
+ "@id": {
1733
+ anyOf: [
1734
+ {
1735
+ type: "string"
1736
+ },
1737
+ {
1738
+ type: "array",
1739
+ items: {
1740
+ type: "string"
1741
+ }
1742
+ }
1743
+ ]
1744
+ },
1745
+ "@included": {
1746
+ $ref: "https://schema.twindev.org/odrl/JsonLdIncludedBlock"
1747
+ },
1748
+ "@graph": {
1749
+ anyOf: [
1750
+ {
1751
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodeObject"
1752
+ },
1753
+ {
1754
+ type: "array",
1755
+ items: {
1756
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodeObject"
1757
+ }
1758
+ }
1759
+ ]
1760
+ },
1761
+ "@nest": {
1762
+ anyOf: [
1763
+ {
1764
+ $ref: "https://schema.twindev.org/odrl/JsonLdJsonObject"
1765
+ },
1766
+ {
1767
+ type: "array",
1768
+ items: {
1769
+ $ref: "https://schema.twindev.org/odrl/JsonLdJsonObject"
1770
+ }
1771
+ }
1772
+ ]
1773
+ },
1774
+ "@type": {
1775
+ anyOf: [
1776
+ {
1777
+ type: "string"
1778
+ },
1779
+ {
1780
+ type: "array",
1781
+ items: {
1782
+ type: "string"
1783
+ }
1784
+ }
1785
+ ],
1786
+ description: "The type of the party. Can be used to specify additional type information (e.g., \"Party\", \"vcard:Organization\", \"vcard:Individual\")."
1787
+ },
1788
+ "@reverse": {
1789
+ type: "object",
1790
+ additionalProperties: {
1791
+ type: "string"
1792
+ }
1793
+ },
1794
+ "@index": {
1795
+ type: "string"
1796
+ },
1797
+ uid: {
1798
+ type: "string",
1799
+ description: "The unique identifier for the party. Must be an IRI."
1800
+ },
1801
+ partOf: {
1802
+ anyOf: [
1803
+ {
1804
+ type: "string"
1805
+ },
1806
+ {
1807
+ $ref: "https://schema.twindev.org/odrl/OdrlPartyCollection"
1808
+ }
1809
+ ],
1810
+ description: "Reference to the party collection this party is part of. Used to identify a PartyCollection that a Party entity is a member of."
1811
+ },
1812
+ assigneeOf: {
1813
+ type: "string",
1814
+ description: "Reference to a policy where this party is an assignee. When assigneeOf is asserted, the Party MUST be inferred to undertake the assignee functional role of all the Rules of that Policy."
1815
+ },
1816
+ assignerOf: {
1817
+ type: "string",
1818
+ description: "Reference to a policy where this party is an assigner. When assignerOf is asserted, the Party MUST be inferred to undertake the assigner functional role of all the Rules of that Policy."
1819
+ },
1820
+ source: {
1821
+ type: "string",
1822
+ description: "Reference to the source of the party collection. Used to identify the origin or location of the collection."
1823
+ },
1824
+ refinement: {
1825
+ type: "array",
1826
+ items: {
1827
+ $ref: "https://schema.twindev.org/odrl/OdrlConstraint"
1828
+ },
1829
+ description: "Refinements applied to the party collection. Used to specify constraints that apply to all members of the collection."
1830
+ }
1831
+ };
1832
+ var required$2 = [
1833
+ "source"
1834
+ ];
1835
+ var additionalProperties$6 = {
1836
+ anyOf: [
1837
+ {
1838
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodePrimitive"
1839
+ },
1840
+ {
1841
+ $ref: "https://schema.twindev.org/odrl/JsonLdLanguageMap"
1842
+ },
1843
+ {
1844
+ $ref: "https://schema.twindev.org/odrl/JsonLdIndexMap"
1845
+ },
1846
+ {
1847
+ $ref: "https://schema.twindev.org/odrl/JsonLdIncludedBlock"
1848
+ },
1849
+ {
1850
+ $ref: "https://schema.twindev.org/odrl/JsonLdIdMap"
1851
+ },
1852
+ {
1853
+ $ref: "https://schema.twindev.org/odrl/JsonLdTypeMap"
1854
+ },
1855
+ {
1856
+ type: "array"
1857
+ }
1858
+ ]
1859
+ };
1860
+ var description$6 = "Interface for ODRL Party Collections. A PartyCollection identifies a collection of entities and is a subclass of Party.";
1861
+ var OdrlPartyCollectionSchema = {
1862
+ type: type$6,
1863
+ properties: properties$6,
1864
+ required: required$2,
1865
+ additionalProperties: additionalProperties$6,
1866
+ description: description$6
1867
+ };
1868
+
1869
+ var type$5 = "object";
1870
+ var properties$5 = {
1871
+ "@context": {
1872
+ $ref: "https://schema.twindev.org/odrl/JsonLdContextDefinitionRoot"
1873
+ },
1874
+ "@id": {
1875
+ anyOf: [
1876
+ {
1877
+ type: "string"
1878
+ },
1879
+ {
1880
+ type: "array",
1881
+ items: {
1882
+ type: "string"
1883
+ }
1884
+ }
1885
+ ]
1886
+ },
1887
+ "@included": {
1888
+ $ref: "https://schema.twindev.org/odrl/JsonLdIncludedBlock"
1889
+ },
1890
+ "@graph": {
1891
+ anyOf: [
1892
+ {
1893
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodeObject"
1894
+ },
1895
+ {
1896
+ type: "array",
1897
+ items: {
1898
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodeObject"
1899
+ }
1900
+ }
1901
+ ]
1902
+ },
1903
+ "@nest": {
1904
+ anyOf: [
1905
+ {
1906
+ $ref: "https://schema.twindev.org/odrl/JsonLdJsonObject"
1907
+ },
1908
+ {
1909
+ type: "array",
1910
+ items: {
1911
+ $ref: "https://schema.twindev.org/odrl/JsonLdJsonObject"
1912
+ }
1913
+ }
1914
+ ]
1915
+ },
1916
+ "@type": {
1917
+ anyOf: [
1918
+ {
1919
+ type: "string"
1920
+ },
1921
+ {
1922
+ type: "array",
1923
+ items: {
1924
+ type: "string"
1925
+ }
1926
+ }
1927
+ ]
1928
+ },
1929
+ "@reverse": {
1930
+ type: "object",
1931
+ additionalProperties: {
1932
+ type: "string"
1933
+ }
1934
+ },
1935
+ "@index": {
1936
+ type: "string"
1937
+ },
1938
+ uid: {
1939
+ type: "string",
1940
+ description: "Optional unique identifier for the rule."
1941
+ },
1942
+ action: {
1943
+ anyOf: [
1944
+ {
1945
+ $ref: "https://schema.twindev.org/odrl/ActionType"
1946
+ },
1947
+ {
1948
+ $ref: "https://schema.twindev.org/odrl/OdrlAction"
1949
+ },
1950
+ {
1951
+ type: "array",
1952
+ items: {
1953
+ anyOf: [
1954
+ {
1955
+ $ref: "https://schema.twindev.org/odrl/ActionType"
1956
+ },
1957
+ {
1958
+ $ref: "https://schema.twindev.org/odrl/OdrlAction"
1959
+ }
1960
+ ]
1961
+ }
1962
+ }
1963
+ ],
1964
+ description: "The action associated with the rule."
1965
+ },
1966
+ target: {
1967
+ anyOf: [
1968
+ {
1969
+ type: "string"
1970
+ },
1971
+ {
1972
+ $ref: "https://schema.twindev.org/odrl/OdrlAsset"
1973
+ },
1974
+ {
1975
+ type: "array",
1976
+ items: {
1977
+ anyOf: [
1978
+ {
1979
+ type: "string"
1980
+ },
1981
+ {
1982
+ $ref: "https://schema.twindev.org/odrl/OdrlAsset"
1983
+ }
1984
+ ]
1985
+ }
1986
+ }
1987
+ ],
1988
+ description: "The target asset for the rule."
1989
+ },
1990
+ assigner: {
1991
+ anyOf: [
1992
+ {
1993
+ type: "string"
1994
+ },
1995
+ {
1996
+ $ref: "https://schema.twindev.org/odrl/OdrlParty"
1997
+ }
1998
+ ],
1999
+ description: "The assigner of the rule."
2000
+ },
2001
+ assignee: {
2002
+ anyOf: [
2003
+ {
2004
+ type: "string"
2005
+ },
2006
+ {
2007
+ $ref: "https://schema.twindev.org/odrl/OdrlParty"
2008
+ }
2009
+ ],
2010
+ description: "The assignee of the rule."
2011
+ },
2012
+ constraint: {
2013
+ type: "array",
2014
+ items: {
2015
+ $ref: "https://schema.twindev.org/odrl/OdrlConstraint"
2016
+ },
2017
+ description: "Constraints applied to the rule."
2018
+ },
2019
+ summary: {
2020
+ type: "string",
2021
+ 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."
2022
+ },
2023
+ duty: {
2024
+ type: "array",
2025
+ items: {
2026
+ $ref: "https://schema.twindev.org/odrl/OdrlDuty"
2027
+ },
2028
+ description: "The duties that must be fulfilled before the permission can be exercised. A Permission MAY have none, one, or more duty property values."
2029
+ }
2030
+ };
2031
+ var additionalProperties$5 = {
2032
+ anyOf: [
2033
+ {
2034
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodePrimitive"
2035
+ },
2036
+ {
2037
+ $ref: "https://schema.twindev.org/odrl/JsonLdLanguageMap"
2038
+ },
2039
+ {
2040
+ $ref: "https://schema.twindev.org/odrl/JsonLdIndexMap"
2041
+ },
2042
+ {
2043
+ $ref: "https://schema.twindev.org/odrl/JsonLdIncludedBlock"
2044
+ },
2045
+ {
2046
+ $ref: "https://schema.twindev.org/odrl/JsonLdIdMap"
2047
+ },
2048
+ {
2049
+ $ref: "https://schema.twindev.org/odrl/JsonLdTypeMap"
2050
+ },
2051
+ {
2052
+ type: "array"
2053
+ }
2054
+ ]
2055
+ };
2056
+ var description$5 = "Interface for Permission Rules. A Permission allows an action to be exercised on an Asset if all constraints are satisfied and if all duties are fulfilled.";
2057
+ var OdrlPermissionSchema = {
2058
+ type: type$5,
2059
+ properties: properties$5,
2060
+ additionalProperties: additionalProperties$5,
2061
+ description: description$5
2062
+ };
2063
+
2064
+ var type$4 = "object";
2065
+ var properties$4 = {
2066
+ "@context": {
2067
+ $ref: "https://schema.twindev.org/odrl/OdrlContextType",
2068
+ description: "The context for the policy. Must include \"https://www.w3.org/ns/odrl.jsonld\""
2069
+ },
2070
+ "@id": {
2071
+ $ref: "https://schema.twindev.org/odrl/JsonLdKeyword"
2072
+ },
2073
+ "@included": {
2074
+ $ref: "https://schema.twindev.org/odrl/JsonLdKeyword"
2075
+ },
2076
+ "@graph": {
2077
+ anyOf: [
2078
+ {
2079
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodeObject"
2080
+ },
2081
+ {
2082
+ type: "array",
2083
+ items: {
2084
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodeObject"
2085
+ }
2086
+ }
2087
+ ]
2088
+ },
2089
+ "@nest": {
2090
+ anyOf: [
2091
+ {
2092
+ $ref: "https://schema.twindev.org/odrl/JsonLdJsonObject"
2093
+ },
2094
+ {
2095
+ type: "array",
2096
+ items: {
2097
+ $ref: "https://schema.twindev.org/odrl/JsonLdJsonObject"
2098
+ }
2099
+ }
2100
+ ]
2101
+ },
2102
+ "@type": {
2103
+ $ref: "https://schema.twindev.org/odrl/PolicyType",
2104
+ description: "The type of policy. Must be one of: \"Set\", \"Offer\", \"Agreement\""
2105
+ },
2106
+ "@reverse": {
2107
+ type: "object",
2108
+ additionalProperties: {
2109
+ $ref: "https://schema.twindev.org/odrl/JsonLdKeyword"
2110
+ }
2111
+ },
2112
+ "@index": {
2113
+ $ref: "https://schema.twindev.org/odrl/JsonLdKeyword"
2114
+ },
2115
+ uid: {
2116
+ type: "string",
2117
+ description: "The unique identifier for the policy. Must be an IRI."
2118
+ },
2119
+ profile: {
2120
+ anyOf: [
2121
+ {
2122
+ type: "string"
2123
+ },
2124
+ {
2125
+ type: "array",
2126
+ items: {
2127
+ type: "string"
2128
+ }
2129
+ }
2130
+ ],
2131
+ description: "The profile(s) this policy conforms to. IRIs identifying the ODRL Profile(s)."
2132
+ },
2133
+ assigner: {
2134
+ anyOf: [
2135
+ {
2136
+ type: "string"
2137
+ },
2138
+ {
2139
+ $ref: "https://schema.twindev.org/odrl/OdrlParty"
2140
+ }
2141
+ ],
2142
+ description: "The assigner of the policy. Applies to all rules unless overridden at rule level."
2143
+ },
2144
+ assignee: {
2145
+ anyOf: [
2146
+ {
2147
+ type: "string"
2148
+ },
2149
+ {
2150
+ $ref: "https://schema.twindev.org/odrl/OdrlParty"
2151
+ }
2152
+ ],
2153
+ description: "The assignee of the policy. Applies to all rules unless overridden at rule level."
2154
+ },
2155
+ target: {
2156
+ anyOf: [
2157
+ {
2158
+ type: "string"
2159
+ },
2160
+ {
2161
+ $ref: "https://schema.twindev.org/odrl/OdrlAsset"
2162
+ },
2163
+ {
2164
+ type: "array",
2165
+ items: {
2166
+ anyOf: [
2167
+ {
2168
+ type: "string"
2169
+ },
2170
+ {
2171
+ $ref: "https://schema.twindev.org/odrl/OdrlAsset"
2172
+ }
2173
+ ]
2174
+ }
2175
+ }
2176
+ ],
2177
+ description: "The target asset for the rule."
2178
+ },
2179
+ action: {
2180
+ anyOf: [
2181
+ {
2182
+ $ref: "https://schema.twindev.org/odrl/ActionType"
2183
+ },
2184
+ {
2185
+ $ref: "https://schema.twindev.org/odrl/OdrlAction"
2186
+ },
2187
+ {
2188
+ type: "array",
2189
+ items: {
2190
+ anyOf: [
2191
+ {
2192
+ $ref: "https://schema.twindev.org/odrl/ActionType"
2193
+ },
2194
+ {
2195
+ $ref: "https://schema.twindev.org/odrl/OdrlAction"
2196
+ }
2197
+ ]
2198
+ }
2199
+ }
2200
+ ],
2201
+ description: "The action associated with the rule."
2202
+ },
2203
+ inheritFrom: {
2204
+ anyOf: [
2205
+ {
2206
+ type: "string"
2207
+ },
2208
+ {
2209
+ type: "array",
2210
+ items: {
2211
+ type: "string"
2212
+ }
2213
+ }
2214
+ ],
2215
+ description: "The parent policy(ies) this policy inherits from. IRIs identifying the parent Policy(ies)."
2216
+ },
2217
+ conflict: {
2218
+ $ref: "https://schema.twindev.org/odrl/ConflictStrategyType",
2219
+ description: "The conflict resolution strategy.\n- perm: Permissions override Prohibitions\n- prohibit: Prohibitions override Permissions\n- invalid: Policy is void if conflicts exist (default)"
2220
+ },
2221
+ permission: {
2222
+ type: "array",
2223
+ items: {
2224
+ $ref: "https://schema.twindev.org/odrl/OdrlPermission"
2225
+ },
2226
+ description: "The permissions in the policy. At least one of permission, prohibition, or obligation must be present."
2227
+ },
2228
+ prohibition: {
2229
+ type: "array",
2230
+ items: {
2231
+ $ref: "https://schema.twindev.org/odrl/OdrlProhibition"
2232
+ },
2233
+ description: "The prohibitions in the policy. At least one of permission, prohibition, or obligation must be present."
2234
+ },
2235
+ obligation: {
2236
+ type: "array",
2237
+ items: {
2238
+ $ref: "https://schema.twindev.org/odrl/OdrlDuty"
2239
+ },
2240
+ description: "The obligations in the policy. At least one of permission, prohibition, or obligation must be present."
2241
+ }
2242
+ };
2243
+ var required$1 = [
2244
+ "@context",
2245
+ "@type",
2246
+ "uid"
2247
+ ];
2248
+ var additionalProperties$4 = {
2249
+ anyOf: [
2250
+ {
2251
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodePrimitive"
2252
+ },
2253
+ {
2254
+ $ref: "https://schema.twindev.org/odrl/JsonLdLanguageMap"
2255
+ },
2256
+ {
2257
+ $ref: "https://schema.twindev.org/odrl/JsonLdIndexMap"
2258
+ },
2259
+ {
2260
+ $ref: "https://schema.twindev.org/odrl/JsonLdIncludedBlock"
2261
+ },
2262
+ {
2263
+ $ref: "https://schema.twindev.org/odrl/JsonLdIdMap"
2264
+ },
2265
+ {
2266
+ $ref: "https://schema.twindev.org/odrl/JsonLdTypeMap"
2267
+ },
2268
+ {
2269
+ type: "array"
2270
+ }
2271
+ ]
2272
+ };
2273
+ var description$4 = "Interface representing an ODRL Policy.";
2274
+ var OdrlPolicySchema = {
2275
+ type: type$4,
2276
+ properties: properties$4,
2277
+ required: required$1,
2278
+ additionalProperties: additionalProperties$4,
2279
+ description: description$4
2280
+ };
2281
+
2282
+ var type$3 = "object";
2283
+ var properties$3 = {
2284
+ "dc:creator": {
2285
+ anyOf: [
2286
+ {
2287
+ type: "string"
2288
+ },
2289
+ {
2290
+ type: "array",
2291
+ items: {
2292
+ type: "string"
2293
+ }
2294
+ }
2295
+ ],
2296
+ description: "The individual, agent, or organisation that authored the Policy. Note: String values may not be normalized and should not be used for direct comparison."
2297
+ },
2298
+ "dc:description": {
2299
+ anyOf: [
2300
+ {
2301
+ type: "string"
2302
+ },
2303
+ {
2304
+ type: "array",
2305
+ items: {
2306
+ type: "string"
2307
+ }
2308
+ }
2309
+ ],
2310
+ description: "A human-readable representation or summary of the Policy. Note: String values may not be normalized and should not be used for direct comparison."
2311
+ },
2312
+ "dc:issued": {
2313
+ type: "string",
2314
+ description: "The date (and time) the Policy was first issued. Note: String values may not be normalized and should not be used for direct comparison."
2315
+ },
2316
+ "dc:modified": {
2317
+ type: "string",
2318
+ description: "The date (and time) the Policy was updated. Note: String values may not be normalized and should not be used for direct comparison."
2319
+ },
2320
+ "dc:publisher": {
2321
+ type: "string",
2322
+ description: "The publisher of the Policy. Note: String values may not be normalized and should not be used for direct comparison."
2323
+ },
2324
+ "dc:subject": {
2325
+ anyOf: [
2326
+ {
2327
+ type: "string"
2328
+ },
2329
+ {
2330
+ type: "array",
2331
+ items: {
2332
+ type: "string"
2333
+ }
2334
+ }
2335
+ ],
2336
+ description: "The subject of the Policy. Note: String values may not be normalized and should not be used for direct comparison."
2337
+ },
2338
+ "dc:coverage": {
2339
+ anyOf: [
2340
+ {
2341
+ type: "string"
2342
+ },
2343
+ {
2344
+ type: "object",
2345
+ properties: {
2346
+ "@id": {
2347
+ type: "string"
2348
+ }
2349
+ },
2350
+ required: [
2351
+ "@id"
2352
+ ],
2353
+ additionalProperties: false
2354
+ }
2355
+ ],
2356
+ description: "The jurisdiction under which the Policy is relevant. Note: When using string values, they may not be normalized and should not be used for direct comparison. Using \"@id\" references is preferred for comparison purposes."
2357
+ },
2358
+ "dc:replaces": {
2359
+ anyOf: [
2360
+ {
2361
+ type: "string"
2362
+ },
2363
+ {
2364
+ type: "object",
2365
+ properties: {
2366
+ "@id": {
2367
+ type: "string"
2368
+ }
2369
+ },
2370
+ required: [
2371
+ "@id"
2372
+ ],
2373
+ additionalProperties: false
2374
+ }
2375
+ ],
2376
+ description: "The identifier of a Policy that this Policy supersedes. Using \"@id\" references is preferred for comparison purposes."
2377
+ },
2378
+ "dc:isReplacedBy": {
2379
+ anyOf: [
2380
+ {
2381
+ type: "string"
2382
+ },
2383
+ {
2384
+ type: "object",
2385
+ properties: {
2386
+ "@id": {
2387
+ type: "string"
2388
+ }
2389
+ },
2390
+ required: [
2391
+ "@id"
2392
+ ],
2393
+ additionalProperties: false
2394
+ }
2395
+ ],
2396
+ description: "The identifier of a Policy that supersedes this Policy. Using \"@id\" references is preferred for comparison purposes."
2397
+ }
2398
+ };
2399
+ var additionalProperties$3 = false;
2400
+ var description$3 = "Interface for ODRL Policy Metadata using Dublin Core terms. While these aren't explicitly defined in the ODRL spec, they are valid and useful metadata properties that follow Dublin Core standards.";
2401
+ var OdrlPolicyMetadataSchema = {
2402
+ type: type$3,
2403
+ properties: properties$3,
2404
+ additionalProperties: additionalProperties$3,
2405
+ description: description$3
2406
+ };
2407
+
2408
+ var type$2 = "object";
2409
+ var properties$2 = {
2410
+ "@context": {
2411
+ $ref: "https://schema.twindev.org/odrl/JsonLdContextDefinitionRoot"
2412
+ },
2413
+ "@id": {
2414
+ anyOf: [
2415
+ {
2416
+ type: "string"
2417
+ },
2418
+ {
2419
+ type: "array",
2420
+ items: {
2421
+ type: "string"
2422
+ }
2423
+ }
2424
+ ]
2425
+ },
2426
+ "@included": {
2427
+ $ref: "https://schema.twindev.org/odrl/JsonLdIncludedBlock"
2428
+ },
2429
+ "@graph": {
2430
+ anyOf: [
2431
+ {
2432
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodeObject"
2433
+ },
2434
+ {
2435
+ type: "array",
2436
+ items: {
2437
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodeObject"
2438
+ }
2439
+ }
2440
+ ]
2441
+ },
2442
+ "@nest": {
2443
+ anyOf: [
2444
+ {
2445
+ $ref: "https://schema.twindev.org/odrl/JsonLdJsonObject"
2446
+ },
2447
+ {
2448
+ type: "array",
2449
+ items: {
2450
+ $ref: "https://schema.twindev.org/odrl/JsonLdJsonObject"
2451
+ }
2452
+ }
2453
+ ]
2454
+ },
2455
+ "@type": {
2456
+ anyOf: [
2457
+ {
2458
+ type: "string"
2459
+ },
2460
+ {
2461
+ type: "array",
2462
+ items: {
2463
+ type: "string"
2464
+ }
2465
+ }
2466
+ ]
2467
+ },
2468
+ "@reverse": {
2469
+ type: "object",
2470
+ additionalProperties: {
2471
+ type: "string"
2472
+ }
2473
+ },
2474
+ "@index": {
2475
+ type: "string"
2476
+ },
2477
+ uid: {
2478
+ type: "string",
2479
+ description: "Optional unique identifier for the rule."
2480
+ },
2481
+ action: {
2482
+ anyOf: [
2483
+ {
2484
+ $ref: "https://schema.twindev.org/odrl/ActionType"
2485
+ },
2486
+ {
2487
+ $ref: "https://schema.twindev.org/odrl/OdrlAction"
2488
+ },
2489
+ {
2490
+ type: "array",
2491
+ items: {
2492
+ anyOf: [
2493
+ {
2494
+ $ref: "https://schema.twindev.org/odrl/ActionType"
2495
+ },
2496
+ {
2497
+ $ref: "https://schema.twindev.org/odrl/OdrlAction"
2498
+ }
2499
+ ]
2500
+ }
2501
+ }
2502
+ ],
2503
+ description: "The action associated with the rule."
2504
+ },
2505
+ target: {
2506
+ anyOf: [
2507
+ {
2508
+ type: "string"
2509
+ },
2510
+ {
2511
+ $ref: "https://schema.twindev.org/odrl/OdrlAsset"
2512
+ },
2513
+ {
2514
+ type: "array",
2515
+ items: {
2516
+ anyOf: [
2517
+ {
2518
+ type: "string"
2519
+ },
2520
+ {
2521
+ $ref: "https://schema.twindev.org/odrl/OdrlAsset"
2522
+ }
2523
+ ]
2524
+ }
2525
+ }
2526
+ ],
2527
+ description: "The target asset for the rule."
2528
+ },
2529
+ assigner: {
2530
+ anyOf: [
2531
+ {
2532
+ type: "string"
2533
+ },
2534
+ {
2535
+ $ref: "https://schema.twindev.org/odrl/OdrlParty"
2536
+ }
2537
+ ],
2538
+ description: "The assigner of the rule."
2539
+ },
2540
+ assignee: {
2541
+ anyOf: [
2542
+ {
2543
+ type: "string"
2544
+ },
2545
+ {
2546
+ $ref: "https://schema.twindev.org/odrl/OdrlParty"
2547
+ }
2548
+ ],
2549
+ description: "The assignee of the rule."
2550
+ },
2551
+ constraint: {
2552
+ type: "array",
2553
+ items: {
2554
+ $ref: "https://schema.twindev.org/odrl/OdrlConstraint"
2555
+ },
2556
+ description: "Constraints applied to the rule."
2557
+ },
2558
+ summary: {
2559
+ type: "string",
2560
+ 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."
2561
+ },
2562
+ remedy: {
2563
+ type: "array",
2564
+ items: {
2565
+ $ref: "https://schema.twindev.org/odrl/OdrlDuty"
2566
+ },
2567
+ description: "The remedies that must be fulfilled if prohibition is violated."
2568
+ }
2569
+ };
2570
+ var additionalProperties$2 = {
2571
+ anyOf: [
2572
+ {
2573
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodePrimitive"
2574
+ },
2575
+ {
2576
+ $ref: "https://schema.twindev.org/odrl/JsonLdLanguageMap"
2577
+ },
2578
+ {
2579
+ $ref: "https://schema.twindev.org/odrl/JsonLdIndexMap"
2580
+ },
2581
+ {
2582
+ $ref: "https://schema.twindev.org/odrl/JsonLdIncludedBlock"
2583
+ },
2584
+ {
2585
+ $ref: "https://schema.twindev.org/odrl/JsonLdIdMap"
2586
+ },
2587
+ {
2588
+ $ref: "https://schema.twindev.org/odrl/JsonLdTypeMap"
2589
+ },
2590
+ {
2591
+ type: "array"
2592
+ }
2593
+ ]
2594
+ };
2595
+ var description$2 = "Interface for Prohibition Rules.";
2596
+ var OdrlProhibitionSchema = {
2597
+ type: type$2,
2598
+ properties: properties$2,
2599
+ additionalProperties: additionalProperties$2,
2600
+ description: description$2
2601
+ };
2602
+
2603
+ var type$1 = "object";
2604
+ var properties$1 = {
2605
+ "@context": {
2606
+ $ref: "https://schema.twindev.org/odrl/JsonLdContextDefinitionRoot"
2607
+ },
2608
+ "@id": {
2609
+ anyOf: [
2610
+ {
2611
+ type: "string"
2612
+ },
2613
+ {
2614
+ type: "array",
2615
+ items: {
2616
+ type: "string"
2617
+ }
2618
+ }
2619
+ ]
2620
+ },
2621
+ "@included": {
2622
+ $ref: "https://schema.twindev.org/odrl/JsonLdIncludedBlock"
2623
+ },
2624
+ "@graph": {
2625
+ anyOf: [
2626
+ {
2627
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodeObject"
2628
+ },
2629
+ {
2630
+ type: "array",
2631
+ items: {
2632
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodeObject"
2633
+ }
2634
+ }
2635
+ ]
2636
+ },
2637
+ "@nest": {
2638
+ anyOf: [
2639
+ {
2640
+ $ref: "https://schema.twindev.org/odrl/JsonLdJsonObject"
2641
+ },
2642
+ {
2643
+ type: "array",
2644
+ items: {
2645
+ $ref: "https://schema.twindev.org/odrl/JsonLdJsonObject"
2646
+ }
2647
+ }
2648
+ ]
2649
+ },
2650
+ "@type": {
2651
+ anyOf: [
2652
+ {
2653
+ type: "string"
2654
+ },
2655
+ {
2656
+ type: "array",
2657
+ items: {
2658
+ type: "string"
2659
+ }
2660
+ }
2661
+ ]
2662
+ },
2663
+ "@reverse": {
2664
+ type: "object",
2665
+ additionalProperties: {
2666
+ type: "string"
2667
+ }
2668
+ },
2669
+ "@index": {
2670
+ type: "string"
2671
+ },
2672
+ uid: {
2673
+ type: "string",
2674
+ description: "Optional unique identifier for the rule."
2675
+ },
2676
+ action: {
2677
+ anyOf: [
2678
+ {
2679
+ $ref: "https://schema.twindev.org/odrl/ActionType"
2680
+ },
2681
+ {
2682
+ $ref: "https://schema.twindev.org/odrl/OdrlAction"
2683
+ },
2684
+ {
2685
+ type: "array",
2686
+ items: {
2687
+ anyOf: [
2688
+ {
2689
+ $ref: "https://schema.twindev.org/odrl/ActionType"
2690
+ },
2691
+ {
2692
+ $ref: "https://schema.twindev.org/odrl/OdrlAction"
2693
+ }
2694
+ ]
2695
+ }
2696
+ }
2697
+ ],
2698
+ description: "The action associated with the rule."
2699
+ },
2700
+ target: {
2701
+ anyOf: [
2702
+ {
2703
+ type: "string"
2704
+ },
2705
+ {
2706
+ $ref: "https://schema.twindev.org/odrl/OdrlAsset"
2707
+ },
2708
+ {
2709
+ type: "array",
2710
+ items: {
2711
+ anyOf: [
2712
+ {
2713
+ type: "string"
2714
+ },
2715
+ {
2716
+ $ref: "https://schema.twindev.org/odrl/OdrlAsset"
2717
+ }
2718
+ ]
2719
+ }
2720
+ }
2721
+ ],
2722
+ description: "The target asset for the rule."
2723
+ },
2724
+ assigner: {
2725
+ anyOf: [
2726
+ {
2727
+ type: "string"
2728
+ },
2729
+ {
2730
+ $ref: "https://schema.twindev.org/odrl/OdrlParty"
2731
+ }
2732
+ ],
2733
+ description: "The assigner of the rule."
2734
+ },
2735
+ assignee: {
2736
+ anyOf: [
2737
+ {
2738
+ type: "string"
2739
+ },
2740
+ {
2741
+ $ref: "https://schema.twindev.org/odrl/OdrlParty"
2742
+ }
2743
+ ],
2744
+ description: "The assignee of the rule."
2745
+ },
2746
+ constraint: {
2747
+ type: "array",
2748
+ items: {
2749
+ $ref: "https://schema.twindev.org/odrl/OdrlConstraint"
2750
+ },
2751
+ description: "Constraints applied to the rule."
2752
+ },
2753
+ summary: {
2754
+ type: "string",
2755
+ 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."
2756
+ }
2757
+ };
2758
+ var additionalProperties$1 = {
2759
+ anyOf: [
2760
+ {
2761
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodePrimitive"
2762
+ },
2763
+ {
2764
+ $ref: "https://schema.twindev.org/odrl/JsonLdLanguageMap"
2765
+ },
2766
+ {
2767
+ $ref: "https://schema.twindev.org/odrl/JsonLdIndexMap"
2768
+ },
2769
+ {
2770
+ $ref: "https://schema.twindev.org/odrl/JsonLdIncludedBlock"
2771
+ },
2772
+ {
2773
+ $ref: "https://schema.twindev.org/odrl/JsonLdIdMap"
2774
+ },
2775
+ {
2776
+ $ref: "https://schema.twindev.org/odrl/JsonLdTypeMap"
2777
+ },
2778
+ {
2779
+ type: "array"
2780
+ }
2781
+ ]
2782
+ };
2783
+ var description$1 = "Base interface for ODRL Rules.";
2784
+ var OdrlRuleSchema = {
2785
+ type: type$1,
2786
+ properties: properties$1,
2787
+ additionalProperties: additionalProperties$1,
2788
+ description: description$1
2789
+ };
2790
+
2791
+ var type = "object";
2792
+ var properties = {
2793
+ "@context": {
2794
+ $ref: "https://schema.twindev.org/odrl/OdrlContextType",
2795
+ description: "The context for the policy. Must include \"https://www.w3.org/ns/odrl.jsonld\""
2796
+ },
2797
+ "@id": {
2798
+ $ref: "https://schema.twindev.org/odrl/JsonLdKeyword"
2799
+ },
2800
+ "@included": {
2801
+ $ref: "https://schema.twindev.org/odrl/JsonLdKeyword"
2802
+ },
2803
+ "@graph": {
2804
+ anyOf: [
2805
+ {
2806
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodeObject"
2807
+ },
2808
+ {
2809
+ type: "array",
2810
+ items: {
2811
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodeObject"
2812
+ }
2813
+ }
2814
+ ]
2815
+ },
2816
+ "@nest": {
2817
+ anyOf: [
2818
+ {
2819
+ $ref: "https://schema.twindev.org/odrl/JsonLdJsonObject"
2820
+ },
2821
+ {
2822
+ type: "array",
2823
+ items: {
2824
+ $ref: "https://schema.twindev.org/odrl/JsonLdJsonObject"
2825
+ }
2826
+ }
2827
+ ]
2828
+ },
2829
+ "@type": {
2830
+ type: "string",
2831
+ "const": "Set",
2832
+ description: "The type must be \"Set\"."
2833
+ },
2834
+ "@reverse": {
2835
+ type: "object",
2836
+ additionalProperties: {
2837
+ $ref: "https://schema.twindev.org/odrl/JsonLdKeyword"
2838
+ }
2839
+ },
2840
+ "@index": {
2841
+ $ref: "https://schema.twindev.org/odrl/JsonLdKeyword"
2842
+ },
2843
+ uid: {
2844
+ type: "string",
2845
+ description: "The unique identifier for the policy. Must be an IRI."
2846
+ },
2847
+ profile: {
2848
+ anyOf: [
2849
+ {
2850
+ type: "string"
2851
+ },
2852
+ {
2853
+ type: "array",
2854
+ items: {
2855
+ type: "string"
2856
+ }
2857
+ }
2858
+ ],
2859
+ description: "The profile(s) this policy conforms to. IRIs identifying the ODRL Profile(s)."
2860
+ },
2861
+ assigner: {
2862
+ anyOf: [
2863
+ {
2864
+ type: "string"
2865
+ },
2866
+ {
2867
+ $ref: "https://schema.twindev.org/odrl/OdrlParty"
2868
+ }
2869
+ ],
2870
+ description: "The assigner of the policy. Applies to all rules unless overridden at rule level."
2871
+ },
2872
+ assignee: {
2873
+ anyOf: [
2874
+ {
2875
+ type: "string"
2876
+ },
2877
+ {
2878
+ $ref: "https://schema.twindev.org/odrl/OdrlParty"
2879
+ }
2880
+ ],
2881
+ description: "The assignee of the policy. Applies to all rules unless overridden at rule level."
2882
+ },
2883
+ target: {
2884
+ anyOf: [
2885
+ {
2886
+ type: "string"
2887
+ },
2888
+ {
2889
+ $ref: "https://schema.twindev.org/odrl/OdrlAsset"
2890
+ },
2891
+ {
2892
+ type: "array",
2893
+ items: {
2894
+ anyOf: [
2895
+ {
2896
+ type: "string"
2897
+ },
2898
+ {
2899
+ $ref: "https://schema.twindev.org/odrl/OdrlAsset"
2900
+ }
2901
+ ]
2902
+ }
2903
+ }
2904
+ ],
2905
+ description: "The target asset for the rule."
2906
+ },
2907
+ action: {
2908
+ anyOf: [
2909
+ {
2910
+ $ref: "https://schema.twindev.org/odrl/ActionType"
2911
+ },
2912
+ {
2913
+ $ref: "https://schema.twindev.org/odrl/OdrlAction"
2914
+ },
2915
+ {
2916
+ type: "array",
2917
+ items: {
2918
+ anyOf: [
2919
+ {
2920
+ $ref: "https://schema.twindev.org/odrl/ActionType"
2921
+ },
2922
+ {
2923
+ $ref: "https://schema.twindev.org/odrl/OdrlAction"
2924
+ }
2925
+ ]
2926
+ }
2927
+ }
2928
+ ],
2929
+ description: "The action associated with the rule."
2930
+ },
2931
+ inheritFrom: {
2932
+ anyOf: [
2933
+ {
2934
+ type: "string"
2935
+ },
2936
+ {
2937
+ type: "array",
2938
+ items: {
2939
+ type: "string"
2940
+ }
2941
+ }
2942
+ ],
2943
+ description: "The parent policy(ies) this policy inherits from. IRIs identifying the parent Policy(ies)."
2944
+ },
2945
+ conflict: {
2946
+ $ref: "https://schema.twindev.org/odrl/ConflictStrategyType",
2947
+ description: "The conflict resolution strategy.\n- perm: Permissions override Prohibitions\n- prohibit: Prohibitions override Permissions\n- invalid: Policy is void if conflicts exist (default)"
2948
+ },
2949
+ permission: {
2950
+ type: "array",
2951
+ items: {
2952
+ $ref: "https://schema.twindev.org/odrl/OdrlPermission"
2953
+ },
2954
+ description: "The permissions in the policy. At least one of permission, prohibition, or obligation must be present."
2955
+ },
2956
+ prohibition: {
2957
+ type: "array",
2958
+ items: {
2959
+ $ref: "https://schema.twindev.org/odrl/OdrlProhibition"
2960
+ },
2961
+ description: "The prohibitions in the policy. At least one of permission, prohibition, or obligation must be present."
2962
+ },
2963
+ obligation: {
2964
+ type: "array",
2965
+ items: {
2966
+ $ref: "https://schema.twindev.org/odrl/OdrlDuty"
2967
+ },
2968
+ description: "The obligations in the policy. At least one of permission, prohibition, or obligation must be present."
2969
+ }
2970
+ };
2971
+ var required = [
2972
+ "@context",
2973
+ "@type",
2974
+ "uid"
2975
+ ];
2976
+ var additionalProperties = {
2977
+ anyOf: [
2978
+ {
2979
+ $ref: "https://schema.twindev.org/odrl/JsonLdNodePrimitive"
2980
+ },
2981
+ {
2982
+ $ref: "https://schema.twindev.org/odrl/JsonLdLanguageMap"
2983
+ },
2984
+ {
2985
+ $ref: "https://schema.twindev.org/odrl/JsonLdIndexMap"
2986
+ },
2987
+ {
2988
+ $ref: "https://schema.twindev.org/odrl/JsonLdIncludedBlock"
2989
+ },
2990
+ {
2991
+ $ref: "https://schema.twindev.org/odrl/JsonLdIdMap"
2992
+ },
2993
+ {
2994
+ $ref: "https://schema.twindev.org/odrl/JsonLdTypeMap"
2995
+ },
2996
+ {
2997
+ type: "array"
2998
+ }
2999
+ ]
3000
+ };
3001
+ var description = "Interface representing an ODRL Set. A Set is a basic policy type with no specific party requirements.";
3002
+ var OdrlSetSchema = {
3003
+ type: type,
3004
+ properties: properties,
3005
+ required: required,
3006
+ additionalProperties: additionalProperties,
3007
+ description: description
256
3008
  };
257
3009
 
258
3010
  // Copyright 2024 IOTA Stiftung.
259
3011
  // SPDX-License-Identifier: Apache-2.0.
260
3012
  /**
261
- * The types for ODRL Logical Constraints.
3013
+ * Handle all the data types for ODRL.
262
3014
  */
263
- // eslint-disable-next-line @typescript-eslint/naming-convention
264
- const LogicalConstraintType = {
265
- /**
266
- * And type.
267
- */
268
- And: "and",
269
- /**
270
- * Or type.
271
- */
272
- Or: "or",
273
- /**
274
- * Xone type.
275
- */
276
- Xone: "xone",
277
- /**
278
- * And sequence type.
279
- */
280
- AndSequence: "andSequence"
281
- };
3015
+ class OdrlDataTypes {
3016
+ /**
3017
+ * Register the JSON-LD Redirects.
3018
+ */
3019
+ static registerRedirects() {
3020
+ dataJsonLd.JsonLdProcessor.addRedirect(/https?:\/\/www\.w3\.org\/ns\/odrl\/?/, "https://www.w3.org/ns/odrl.jsonld");
3021
+ }
3022
+ /**
3023
+ * Register all the data types.
3024
+ */
3025
+ static registerTypes() {
3026
+ dataCore.DataTypeHandlerFactory.register(`${OdrlContexts.ContextRoot}${OdrlTypes.Policy}`, () => ({
3027
+ context: OdrlContexts.ContextRoot,
3028
+ type: OdrlTypes.Policy,
3029
+ jsonSchema: async () => OdrlPolicySchema
3030
+ }));
3031
+ dataCore.DataTypeHandlerFactory.register(`${OdrlContexts.ContextRoot}${OdrlTypes.Asset}`, () => ({
3032
+ context: OdrlContexts.ContextRoot,
3033
+ type: OdrlTypes.Asset,
3034
+ jsonSchema: async () => OdrlAssetSchema
3035
+ }));
3036
+ dataCore.DataTypeHandlerFactory.register(`${OdrlContexts.ContextRoot}${OdrlTypes.AssetCollection}`, () => ({
3037
+ context: OdrlContexts.ContextRoot,
3038
+ type: OdrlTypes.AssetCollection,
3039
+ jsonSchema: async () => OdrlAssetCollectionSchema
3040
+ }));
3041
+ dataCore.DataTypeHandlerFactory.register(`${OdrlContexts.ContextRoot}${OdrlTypes.Party}`, () => ({
3042
+ context: OdrlContexts.ContextRoot,
3043
+ type: OdrlTypes.Party,
3044
+ jsonSchema: async () => OdrlPartySchema
3045
+ }));
3046
+ dataCore.DataTypeHandlerFactory.register(`${OdrlContexts.ContextRoot}${OdrlTypes.PartyCollection}`, () => ({
3047
+ context: OdrlContexts.ContextRoot,
3048
+ type: OdrlTypes.PartyCollection,
3049
+ jsonSchema: async () => OdrlPartyCollectionSchema
3050
+ }));
3051
+ dataCore.DataTypeHandlerFactory.register(`${OdrlContexts.ContextRoot}${OdrlTypes.Action}`, () => ({
3052
+ context: OdrlContexts.ContextRoot,
3053
+ type: OdrlTypes.Action,
3054
+ jsonSchema: async () => OdrlActionSchema
3055
+ }));
3056
+ dataCore.DataTypeHandlerFactory.register(`${OdrlContexts.ContextRoot}${OdrlTypes.Permission}`, () => ({
3057
+ context: OdrlContexts.ContextRoot,
3058
+ type: OdrlTypes.Permission,
3059
+ jsonSchema: async () => OdrlPermissionSchema
3060
+ }));
3061
+ dataCore.DataTypeHandlerFactory.register(`${OdrlContexts.ContextRoot}${OdrlTypes.Prohibition}`, () => ({
3062
+ context: OdrlContexts.ContextRoot,
3063
+ type: OdrlTypes.Prohibition,
3064
+ jsonSchema: async () => OdrlProhibitionSchema
3065
+ }));
3066
+ dataCore.DataTypeHandlerFactory.register(`${OdrlContexts.ContextRoot}${OdrlTypes.Duty}`, () => ({
3067
+ context: OdrlContexts.ContextRoot,
3068
+ type: OdrlTypes.Duty,
3069
+ jsonSchema: async () => OdrlDutySchema
3070
+ }));
3071
+ dataCore.DataTypeHandlerFactory.register(`${OdrlContexts.ContextRoot}${OdrlTypes.Constraint}`, () => ({
3072
+ context: OdrlContexts.ContextRoot,
3073
+ type: OdrlTypes.Constraint,
3074
+ jsonSchema: async () => OdrlConstraintSchema
3075
+ }));
3076
+ dataCore.DataTypeHandlerFactory.register(`${OdrlContexts.ContextRoot}${OdrlTypes.LogicalConstraint}`, () => ({
3077
+ context: OdrlContexts.ContextRoot,
3078
+ type: OdrlTypes.LogicalConstraint,
3079
+ jsonSchema: async () => OdrlLogicalConstraintSchema
3080
+ }));
3081
+ dataCore.DataTypeHandlerFactory.register(`${OdrlContexts.ContextRoot}${OdrlTypes.PolicyMetadata}`, () => ({
3082
+ context: OdrlContexts.ContextRoot,
3083
+ type: OdrlTypes.PolicyMetadata,
3084
+ jsonSchema: async () => OdrlPolicyMetadataSchema
3085
+ }));
3086
+ dataCore.DataTypeHandlerFactory.register(`${OdrlContexts.ContextRoot}${OdrlTypes.Set}`, () => ({
3087
+ context: OdrlContexts.ContextRoot,
3088
+ type: OdrlTypes.Set,
3089
+ jsonSchema: async () => OdrlSetSchema
3090
+ }));
3091
+ dataCore.DataTypeHandlerFactory.register(`${OdrlContexts.ContextRoot}${OdrlTypes.Offer}`, () => ({
3092
+ context: OdrlContexts.ContextRoot,
3093
+ type: OdrlTypes.Offer,
3094
+ jsonSchema: async () => OdrlOfferSchema
3095
+ }));
3096
+ dataCore.DataTypeHandlerFactory.register(`${OdrlContexts.ContextRoot}${OdrlTypes.Agreement}`, () => ({
3097
+ context: OdrlContexts.ContextRoot,
3098
+ type: OdrlTypes.Agreement,
3099
+ jsonSchema: async () => OdrlAgreementSchema
3100
+ }));
3101
+ dataCore.DataTypeHandlerFactory.register(`${OdrlContexts.ContextRoot}${OdrlTypes.Rule}`, () => ({
3102
+ context: OdrlContexts.ContextRoot,
3103
+ type: OdrlTypes.Rule,
3104
+ jsonSchema: async () => OdrlRuleSchema
3105
+ }));
3106
+ dataCore.DataTypeHandlerFactory.register(`${OdrlContexts.ContextRoot}${OdrlTypes.ContextType}`, () => ({
3107
+ context: OdrlContexts.ContextRoot,
3108
+ type: OdrlTypes.ContextType,
3109
+ jsonSchema: async () => OdrlContextTypeSchema
3110
+ }));
3111
+ }
3112
+ }
282
3113
 
283
3114
  // Copyright 2024 IOTA Stiftung.
284
3115
  // SPDX-License-Identifier: Apache-2.0.
@@ -287,7 +3118,7 @@ const LogicalConstraintType = {
287
3118
  * Simple action types (for direct string usage)
288
3119
  */
289
3120
  // eslint-disable-next-line @typescript-eslint/naming-convention
290
- const ActionTypes = {
3121
+ const ActionType = {
291
3122
  /**
292
3123
  * To use the Asset - actions that involve general usage by parties.
293
3124
  */
@@ -497,38 +3328,22 @@ const ActionTypes = {
497
3328
  // Copyright 2024 IOTA Stiftung.
498
3329
  // SPDX-License-Identifier: Apache-2.0.
499
3330
  /**
500
- * The types for ODRL Data Types.
3331
+ * The types for ODRL Conflict Resolution Strategies.
501
3332
  */
502
3333
  // eslint-disable-next-line @typescript-eslint/naming-convention
503
- const DataType = {
3334
+ const ConflictStrategyType = {
504
3335
  /**
505
- * String type.
506
- */
507
- String: "xsd:string",
508
- /**
509
- * Boolean type.
510
- */
511
- Boolean: "xsd:boolean",
512
- /**
513
- * Integer type.
514
- */
515
- Integer: "xsd:integer",
516
- /**
517
- * Decimal type.
518
- */
519
- Decimal: "xsd:decimal",
520
- /**
521
- * Double type.
3336
+ * Permission type.
522
3337
  */
523
- Double: "xsd:double",
3338
+ Perm: "perm",
524
3339
  /**
525
- * Date type.
3340
+ * Prohibition type.
526
3341
  */
527
- Date: "xsd:date",
3342
+ Prohibit: "prohibit",
528
3343
  /**
529
- * DateTime type.
3344
+ * Invalid type.
530
3345
  */
531
- DateTime: "xsd:dateTime"
3346
+ Invalid: "invalid"
532
3347
  };
533
3348
 
534
3349
  // Copyright 2024 IOTA Stiftung.
@@ -668,6 +3483,181 @@ const LeftOperandType = {
668
3483
  VirtualLocation: "virtualLocation"
669
3484
  };
670
3485
 
3486
+ // Copyright 2024 IOTA Stiftung.
3487
+ // SPDX-License-Identifier: Apache-2.0.
3488
+ /**
3489
+ * The types for ODRL Logical Constraints.
3490
+ */
3491
+ // eslint-disable-next-line @typescript-eslint/naming-convention
3492
+ const LogicalConstraintType = {
3493
+ /**
3494
+ * And type.
3495
+ */
3496
+ And: "and",
3497
+ /**
3498
+ * Or type.
3499
+ */
3500
+ Or: "or",
3501
+ /**
3502
+ * Xone type.
3503
+ */
3504
+ Xone: "xone",
3505
+ /**
3506
+ * And sequence type.
3507
+ */
3508
+ AndSequence: "andSequence"
3509
+ };
3510
+
3511
+ // Copyright 2024 IOTA Stiftung.
3512
+ // SPDX-License-Identifier: Apache-2.0.
3513
+ /**
3514
+ * The types for ODRL Operators.
3515
+ */
3516
+ // eslint-disable-next-line @typescript-eslint/naming-convention
3517
+ const OperatorType = {
3518
+ /**
3519
+ * Equal type.
3520
+ */
3521
+ Eq: "eq",
3522
+ /**
3523
+ * Greater than type.
3524
+ */
3525
+ Gt: "gt",
3526
+ /**
3527
+ * Greater than or equal to type.
3528
+ */
3529
+ Gteq: "gteq",
3530
+ /**
3531
+ * Less than type.
3532
+ */
3533
+ Lt: "lt",
3534
+ /**
3535
+ * Less than or equal to type.
3536
+ */
3537
+ Lteq: "lteq",
3538
+ /**
3539
+ * Not equal to type.
3540
+ */
3541
+ Neq: "neq",
3542
+ /**
3543
+ * Is a type.
3544
+ */
3545
+ IsA: "isA",
3546
+ /**
3547
+ * Has part type.
3548
+ */
3549
+ HasPart: "hasPart",
3550
+ /**
3551
+ * Is part of type.
3552
+ */
3553
+ IsPartOf: "isPartOf",
3554
+ /**
3555
+ * Is all of type.
3556
+ */
3557
+ IsAllOf: "isAllOf",
3558
+ /**
3559
+ * Is any of type.
3560
+ */
3561
+ IsAnyOf: "isAnyOf",
3562
+ /**
3563
+ * Is none of type.
3564
+ */
3565
+ IsNoneOf: "isNoneOf",
3566
+ /**
3567
+ * Location time equal to type.
3568
+ */
3569
+ LocTimeEq: "locTimeEq",
3570
+ /**
3571
+ * Location time greater than or equal to type.
3572
+ */
3573
+ LocTimeGteq: "locTimeGteq"
3574
+ };
3575
+
3576
+ // Copyright 2024 IOTA Stiftung.
3577
+ // SPDX-License-Identifier: Apache-2.0.
3578
+ /**
3579
+ * The types for ODRL Policies.
3580
+ */
3581
+ // eslint-disable-next-line @typescript-eslint/naming-convention
3582
+ const PolicyType = {
3583
+ /**
3584
+ * Policy type.
3585
+ */
3586
+ Policy: "Policy",
3587
+ /**
3588
+ * Set type.
3589
+ */
3590
+ Set: "Set",
3591
+ /**
3592
+ * Offer type.
3593
+ */
3594
+ Offer: "Offer",
3595
+ /**
3596
+ * Agreement type.
3597
+ */
3598
+ Agreement: "Agreement"
3599
+ };
3600
+
3601
+ // Copyright 2024 IOTA Stiftung.
3602
+ // SPDX-License-Identifier: Apache-2.0.
3603
+ /**
3604
+ * Right operand types for ODRL constraints
3605
+ */
3606
+ // eslint-disable-next-line @typescript-eslint/naming-convention
3607
+ const RightOperandType = {
3608
+ /**
3609
+ * Reference to policy usage events
3610
+ */
3611
+ PolicyUsage: "odrl:policyUsage"
3612
+ // ... other right operand types ...
3613
+ };
3614
+
3615
+ // Copyright 2024 IOTA Stiftung.
3616
+ // SPDX-License-Identifier: Apache-2.0.
3617
+ /**
3618
+ * The types for ODRL Rules.
3619
+ */
3620
+ // eslint-disable-next-line @typescript-eslint/naming-convention
3621
+ const RuleType = {
3622
+ /**
3623
+ * Permission type.
3624
+ */
3625
+ Permission: "Permission",
3626
+ /**
3627
+ * Prohibition type.
3628
+ */
3629
+ Prohibition: "Prohibition",
3630
+ /**
3631
+ * Duty type.
3632
+ */
3633
+ Duty: "Duty"
3634
+ };
3635
+
3636
+ // Copyright 2024 IOTA Stiftung.
3637
+ // SPDX-License-Identifier: Apache-2.0.
3638
+ /**
3639
+ * The types for ODRL Status.
3640
+ */
3641
+ // eslint-disable-next-line @typescript-eslint/naming-convention
3642
+ const StatusType = {
3643
+ /**
3644
+ * Active type.
3645
+ */
3646
+ Active: "active",
3647
+ /**
3648
+ * Inactive type.
3649
+ */
3650
+ Inactive: "inactive",
3651
+ /**
3652
+ * Pending type.
3653
+ */
3654
+ Pending: "pending",
3655
+ /**
3656
+ * Revoked type.
3657
+ */
3658
+ Revoked: "revoked"
3659
+ };
3660
+
671
3661
  // Copyright 2024 IOTA Stiftung.
672
3662
  // SPDX-License-Identifier: Apache-2.0.
673
3663
  /**
@@ -675,7 +3665,7 @@ const LeftOperandType = {
675
3665
  * URI action types (for use with rdf:value/@id)
676
3666
  */
677
3667
  // eslint-disable-next-line @typescript-eslint/naming-convention
678
- const UriActionTypes = {
3668
+ const UriActionType = {
679
3669
  /**
680
3670
  * To use the Asset - actions that involve general usage by parties.
681
3671
  */
@@ -882,30 +3872,16 @@ const UriActionTypes = {
882
3872
  OdrlWatermark: "odrl:watermark"
883
3873
  };
884
3874
 
885
- // Copyright 2024 IOTA Stiftung.
886
- // SPDX-License-Identifier: Apache-2.0.
887
- /**
888
- * Right operand types for ODRL constraints
889
- */
890
- // eslint-disable-next-line @typescript-eslint/naming-convention
891
- const RightOperandTypes = {
892
- /**
893
- * Reference to policy usage events
894
- */
895
- PolicyUsage: "odrl:policyUsage"
896
- // ... other right operand types ...
897
- };
898
-
899
- exports.ActionTypes = ActionTypes;
900
- exports.ConflictStrategyTypes = ConflictStrategyTypes;
901
- exports.DataType = DataType;
3875
+ exports.ActionType = ActionType;
3876
+ exports.ConflictStrategyType = ConflictStrategyType;
902
3877
  exports.LeftOperandType = LeftOperandType;
903
3878
  exports.LogicalConstraintType = LogicalConstraintType;
904
3879
  exports.OdrlContexts = OdrlContexts;
3880
+ exports.OdrlDataTypes = OdrlDataTypes;
905
3881
  exports.OdrlTypes = OdrlTypes;
906
3882
  exports.OperatorType = OperatorType;
907
3883
  exports.PolicyType = PolicyType;
908
- exports.RightOperandTypes = RightOperandTypes;
3884
+ exports.RightOperandType = RightOperandType;
909
3885
  exports.RuleType = RuleType;
910
3886
  exports.StatusType = StatusType;
911
- exports.UriActionTypes = UriActionTypes;
3887
+ exports.UriActionType = UriActionType;