@twin.org/standards-w3c-odrl 0.0.3-next.49 → 0.0.3-next.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IOdrlConstraint.js","sourceRoot":"","sources":["../../../src/models/IOdrlConstraint.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type {
|
|
1
|
+
{"version":3,"file":"IOdrlConstraint.js","sourceRoot":"","sources":["../../../src/models/IOdrlConstraint.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { LeftOperandType } from \"./types/leftOperandType.js\";\nimport type { OperatorType } from \"./types/operatorType.js\";\nimport type { StatusType } from \"./types/statusType.js\";\n\n/**\n * Interface for ODRL Constraints.\n * https://www.w3.org/TR/odrl-model/#constraint\n */\nexport interface IOdrlConstraint {\n\t/**\n\t * Optional unique identifier for the constraint.\n\t */\n\tuid?: string;\n\n\t/**\n\t * The left operand of the constraint.\n\t */\n\tleftOperand: string | LeftOperandType;\n\n\t/**\n\t * The operator of the constraint.\n\t */\n\toperator: OperatorType;\n\n\t/**\n\t * The right operand of the constraint.\n\t * value with optional @type is used for literal values (like \"5.00\" with type \"xsd:decimal\")\n\t * id is used when referencing a URI/identifier (like odrl:policyUsage)\n\t * Mutually exclusive with rightOperandReference.\n\t */\n\trightOperand?:\n\t\t| string\n\t\t| {\n\t\t\t\t\"@value\": string;\n\t\t\t\t\"@type\"?: string;\n\t\t }\n\t\t| {\n\t\t\t\t\"@id\": string;\n\t\t }\n\t\t| (\n\t\t\t\t| string\n\t\t\t\t| {\n\t\t\t\t\t\t\"@value\": string;\n\t\t\t\t\t\t\"@type\"?: string;\n\t\t\t\t }\n\t\t\t\t| {\n\t\t\t\t\t\t\"@id\": string;\n\t\t\t\t }\n\t\t )[];\n\n\t/**\n\t * Reference to the right operand.\n\t * Can be used to reference external resources or policies using an IRI.\n\t * Mutually exclusive with rightOperand.\n\t */\n\trightOperandReference?: string | string[];\n\n\t/**\n\t * The data type of the right operand.\n\t */\n\tdataType?: string;\n\n\t/**\n\t * The unit for the right operand value.\n\t */\n\tunit?: string;\n\n\t/**\n\t * The status value for comparison.\n\t */\n\tstatus?: StatusType;\n}\n"]}
|
|
@@ -24,7 +24,6 @@
|
|
|
24
24
|
"description": "The operator of the constraint."
|
|
25
25
|
},
|
|
26
26
|
"rightOperand": {
|
|
27
|
-
"description": "Object or array data type",
|
|
28
27
|
"anyOf": [
|
|
29
28
|
{
|
|
30
29
|
"type": "string"
|
|
@@ -73,7 +72,8 @@
|
|
|
73
72
|
},
|
|
74
73
|
"required": [
|
|
75
74
|
"@value"
|
|
76
|
-
]
|
|
75
|
+
],
|
|
76
|
+
"additionalProperties": false
|
|
77
77
|
},
|
|
78
78
|
{
|
|
79
79
|
"type": "object",
|
|
@@ -84,15 +84,16 @@
|
|
|
84
84
|
},
|
|
85
85
|
"required": [
|
|
86
86
|
"@id"
|
|
87
|
-
]
|
|
87
|
+
],
|
|
88
|
+
"additionalProperties": false
|
|
88
89
|
}
|
|
89
90
|
]
|
|
90
91
|
}
|
|
91
92
|
}
|
|
92
|
-
]
|
|
93
|
+
],
|
|
94
|
+
"description": "The right operand of the constraint. value with optional"
|
|
93
95
|
},
|
|
94
96
|
"rightOperandReference": {
|
|
95
|
-
"description": "Object or array data type",
|
|
96
97
|
"anyOf": [
|
|
97
98
|
{
|
|
98
99
|
"type": "string"
|
|
@@ -103,7 +104,8 @@
|
|
|
103
104
|
"type": "string"
|
|
104
105
|
}
|
|
105
106
|
}
|
|
106
|
-
]
|
|
107
|
+
],
|
|
108
|
+
"description": "Reference to the right operand. Can be used to reference external resources or policies using an IRI. Mutually exclusive with rightOperand."
|
|
107
109
|
},
|
|
108
110
|
"dataType": {
|
|
109
111
|
"type": "string",
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { ObjectOrArray } from "@twin.org/core";
|
|
2
1
|
import type { LeftOperandType } from "./types/leftOperandType.js";
|
|
3
2
|
import type { OperatorType } from "./types/operatorType.js";
|
|
4
3
|
import type { StatusType } from "./types/statusType.js";
|
|
@@ -25,18 +24,23 @@ export interface IOdrlConstraint {
|
|
|
25
24
|
* id is used when referencing a URI/identifier (like odrl:policyUsage)
|
|
26
25
|
* Mutually exclusive with rightOperandReference.
|
|
27
26
|
*/
|
|
28
|
-
rightOperand?:
|
|
27
|
+
rightOperand?: string | {
|
|
29
28
|
"@value": string;
|
|
30
29
|
"@type"?: string;
|
|
31
30
|
} | {
|
|
32
31
|
"@id": string;
|
|
33
|
-
}
|
|
32
|
+
} | (string | {
|
|
33
|
+
"@value": string;
|
|
34
|
+
"@type"?: string;
|
|
35
|
+
} | {
|
|
36
|
+
"@id": string;
|
|
37
|
+
})[];
|
|
34
38
|
/**
|
|
35
39
|
* Reference to the right operand.
|
|
36
40
|
* Can be used to reference external resources or policies using an IRI.
|
|
37
41
|
* Mutually exclusive with rightOperand.
|
|
38
42
|
*/
|
|
39
|
-
rightOperandReference?:
|
|
43
|
+
rightOperandReference?: string | string[];
|
|
40
44
|
/**
|
|
41
45
|
* The data type of the right operand.
|
|
42
46
|
*/
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @twin.org/standards-w3c-odrl - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.3-next.50](https://github.com/twinfoundation/standards/compare/standards-w3c-odrl-v0.0.3-next.49...standards-w3c-odrl-v0.0.3-next.50) (2026-03-09)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* remove ObjectOrArray usage ([61fd52d](https://github.com/twinfoundation/standards/commit/61fd52da035356bbe5bcc315367089405b4d1386))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* @twin.org/standards-w3c-vcard bumped from 0.0.3-next.49 to 0.0.3-next.50
|
|
16
|
+
* @twin.org/standards-dublin-core bumped from 0.0.3-next.49 to 0.0.3-next.50
|
|
17
|
+
|
|
3
18
|
## [0.0.3-next.49](https://github.com/twinfoundation/standards/compare/standards-w3c-odrl-v0.0.3-next.48...standards-w3c-odrl-v0.0.3-next.49) (2026-03-06)
|
|
4
19
|
|
|
5
20
|
|
|
@@ -31,7 +31,7 @@ The operator of the constraint.
|
|
|
31
31
|
|
|
32
32
|
### rightOperand?
|
|
33
33
|
|
|
34
|
-
> `optional` **rightOperand**: `
|
|
34
|
+
> `optional` **rightOperand**: `string` \| \{ `@value`: `string`; `@type?`: `string`; \} \| \{ `@id`: `string`; \} \| (`string` \| \{ `@value`: `string`; `@type?`: `string`; \} \| \{ `@id`: `string`; \})[]
|
|
35
35
|
|
|
36
36
|
The right operand of the constraint.
|
|
37
37
|
value with optional
|
|
@@ -40,7 +40,7 @@ value with optional
|
|
|
40
40
|
|
|
41
41
|
### rightOperandReference?
|
|
42
42
|
|
|
43
|
-
> `optional` **rightOperandReference**: `
|
|
43
|
+
> `optional` **rightOperandReference**: `string` \| `string`[]
|
|
44
44
|
|
|
45
45
|
Reference to the right operand.
|
|
46
46
|
Can be used to reference external resources or policies using an IRI.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/standards-w3c-odrl",
|
|
3
|
-
"version": "0.0.3-next.
|
|
3
|
+
"version": "0.0.3-next.50",
|
|
4
4
|
"description": "Models which define the structure of W3C ODRL Standard",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"@twin.org/core": "next",
|
|
18
18
|
"@twin.org/data-core": "next",
|
|
19
19
|
"@twin.org/data-json-ld": "next",
|
|
20
|
-
"@twin.org/standards-dublin-core": "0.0.3-next.
|
|
21
|
-
"@twin.org/standards-w3c-vcard": "0.0.3-next.
|
|
20
|
+
"@twin.org/standards-dublin-core": "0.0.3-next.50",
|
|
21
|
+
"@twin.org/standards-w3c-vcard": "0.0.3-next.50",
|
|
22
22
|
"@twin.org/web": "next"
|
|
23
23
|
},
|
|
24
24
|
"main": "./dist/es/index.js",
|