@twin.org/standards-w3c-odrl 0.0.3-next.4 → 0.0.3-next.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/dataTypes/odrlDataTypes.js +71 -77
- package/dist/es/dataTypes/odrlDataTypes.js.map +1 -1
- package/dist/es/index.js +1 -0
- package/dist/es/index.js.map +1 -1
- package/dist/es/models/IOdrlAsset.js.map +1 -1
- package/dist/es/models/IOdrlAssetCollection.js.map +1 -1
- package/dist/es/models/IOdrlConstraint.js.map +1 -1
- package/dist/es/models/IOdrlDuty.js.map +1 -1
- package/dist/es/models/IOdrlLogicalConstraint.js.map +1 -1
- package/dist/es/models/IOdrlLogicalConstraintOperand.js +4 -0
- package/dist/es/models/IOdrlLogicalConstraintOperand.js.map +1 -0
- package/dist/es/models/IOdrlParty.js.map +1 -1
- package/dist/es/models/IOdrlPartyCollection.js.map +1 -1
- package/dist/es/models/IOdrlPermission.js.map +1 -1
- package/dist/es/models/IOdrlPolicy.js.map +1 -1
- package/dist/es/models/IOdrlProhibition.js.map +1 -1
- package/dist/es/models/IOdrlRule.js.map +1 -1
- package/dist/es/models/odrlContextType.js.map +1 -1
- package/dist/es/models/odrlContexts.js +13 -4
- package/dist/es/models/odrlContexts.js.map +1 -1
- package/dist/es/models/types/odrlTypes.js +5 -1
- package/dist/es/models/types/odrlTypes.js.map +1 -1
- package/dist/es/schemas/OdrlAgreement.json +51 -15
- package/dist/es/schemas/OdrlAsset.json +24 -1
- package/dist/es/schemas/OdrlAssetCollection.json +45 -5
- package/dist/es/schemas/OdrlConstraint.json +51 -4
- package/dist/es/schemas/OdrlDuty.json +76 -15
- package/dist/es/schemas/OdrlLogicalConstraint.json +8 -92
- package/dist/es/schemas/OdrlLogicalConstraintOperand.json +28 -0
- package/dist/es/schemas/OdrlOffer.json +70 -15
- package/dist/es/schemas/OdrlParty.json +35 -2
- package/dist/es/schemas/OdrlPartyCollection.json +56 -6
- package/dist/es/schemas/OdrlPermission.json +76 -8
- package/dist/es/schemas/OdrlPolicy.json +89 -15
- package/dist/es/schemas/OdrlProhibition.json +76 -8
- package/dist/es/schemas/OdrlRule.json +65 -4
- package/dist/es/schemas/OdrlSet.json +89 -15
- package/dist/types/index.d.ts +1 -0
- package/dist/types/models/IOdrlAsset.d.ts +2 -2
- package/dist/types/models/IOdrlAssetCollection.d.ts +2 -1
- package/dist/types/models/IOdrlConstraint.d.ts +7 -3
- package/dist/types/models/IOdrlDuty.d.ts +1 -5
- package/dist/types/models/IOdrlLogicalConstraint.d.ts +9 -20
- package/dist/types/models/IOdrlLogicalConstraintOperand.d.ts +12 -0
- package/dist/types/models/IOdrlParty.d.ts +3 -3
- package/dist/types/models/IOdrlPartyCollection.d.ts +2 -1
- package/dist/types/models/IOdrlPermission.d.ts +1 -1
- package/dist/types/models/IOdrlPolicy.d.ts +8 -6
- package/dist/types/models/IOdrlProhibition.d.ts +1 -1
- package/dist/types/models/IOdrlRule.d.ts +7 -4
- package/dist/types/models/odrlContextType.d.ts +3 -3
- package/dist/types/models/odrlContexts.d.ts +13 -4
- package/dist/types/models/types/odrlTypes.d.ts +4 -0
- package/docs/changelog.md +586 -0
- package/docs/reference/index.md +1 -0
- package/docs/reference/interfaces/IOdrlAgreement.md +4 -4
- package/docs/reference/interfaces/IOdrlAsset.md +2 -2
- package/docs/reference/interfaces/IOdrlAssetCollection.md +3 -3
- package/docs/reference/interfaces/IOdrlConstraint.md +4 -2
- package/docs/reference/interfaces/IOdrlDuty.md +5 -13
- package/docs/reference/interfaces/IOdrlLogicalConstraint.md +8 -20
- package/docs/reference/interfaces/IOdrlLogicalConstraintOperand.md +16 -0
- package/docs/reference/interfaces/IOdrlOffer.md +5 -5
- package/docs/reference/interfaces/IOdrlParty.md +3 -3
- package/docs/reference/interfaces/IOdrlPartyCollection.md +4 -4
- package/docs/reference/interfaces/IOdrlPermission.md +5 -5
- package/docs/reference/interfaces/IOdrlPolicy.md +6 -6
- package/docs/reference/interfaces/IOdrlProhibition.md +5 -5
- package/docs/reference/interfaces/IOdrlRule.md +4 -4
- package/docs/reference/interfaces/IOdrlSet.md +6 -6
- package/docs/reference/type-aliases/OdrlContextType.md +1 -1
- package/docs/reference/variables/OdrlContexts.md +19 -6
- package/docs/reference/variables/OdrlTypes.md +6 -0
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Copyright 2024 IOTA Stiftung.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
-
import {
|
|
3
|
+
import { DataTypeHelper } from "@twin.org/data-core";
|
|
4
4
|
import { JsonLdProcessor } from "@twin.org/data-json-ld";
|
|
5
5
|
import { OdrlContexts } from "../models/odrlContexts.js";
|
|
6
6
|
import { OdrlTypes } from "../models/types/odrlTypes.js";
|
|
@@ -11,6 +11,7 @@ import OdrlAssetCollectionSchema from "../schemas/OdrlAssetCollection.json" with
|
|
|
11
11
|
import OdrlConstraintSchema from "../schemas/OdrlConstraint.json" with { type: "json" };
|
|
12
12
|
import OdrlDutySchema from "../schemas/OdrlDuty.json" with { type: "json" };
|
|
13
13
|
import OdrlLogicalConstraintSchema from "../schemas/OdrlLogicalConstraint.json" with { type: "json" };
|
|
14
|
+
import OdrlLogicalConstraintOperandSchema from "../schemas/OdrlLogicalConstraintOperand.json" with { type: "json" };
|
|
14
15
|
import OdrlOfferSchema from "../schemas/OdrlOffer.json" with { type: "json" };
|
|
15
16
|
import OdrlPartySchema from "../schemas/OdrlParty.json" with { type: "json" };
|
|
16
17
|
import OdrlPartyCollectionSchema from "../schemas/OdrlPartyCollection.json" with { type: "json" };
|
|
@@ -27,87 +28,80 @@ export class OdrlDataTypes {
|
|
|
27
28
|
* Register the JSON-LD Redirects.
|
|
28
29
|
*/
|
|
29
30
|
static registerRedirects() {
|
|
30
|
-
JsonLdProcessor.addRedirect(/https?:\/\/www\.w3\.org\/ns\/odrl\/?/, OdrlContexts.
|
|
31
|
+
JsonLdProcessor.addRedirect(/https?:\/\/www\.w3\.org\/ns\/odrl\/?/, OdrlContexts.JsonLdContext);
|
|
31
32
|
}
|
|
32
33
|
/**
|
|
33
34
|
* Register all the data types.
|
|
34
35
|
*/
|
|
35
36
|
static registerTypes() {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
jsonSchema: async () => OdrlAgreementSchema
|
|
105
|
-
}));
|
|
106
|
-
DataTypeHandlerFactory.register(`${OdrlContexts.ContextRoot}${OdrlTypes.Rule}`, () => ({
|
|
107
|
-
context: OdrlContexts.ContextRoot,
|
|
108
|
-
type: OdrlTypes.Rule,
|
|
109
|
-
jsonSchema: async () => OdrlRuleSchema
|
|
110
|
-
}));
|
|
37
|
+
const types = [
|
|
38
|
+
{
|
|
39
|
+
type: OdrlTypes.Policy,
|
|
40
|
+
schema: OdrlPolicySchema
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
type: OdrlTypes.Asset,
|
|
44
|
+
schema: OdrlAssetSchema
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
type: OdrlTypes.AssetCollection,
|
|
48
|
+
schema: OdrlAssetCollectionSchema
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
type: OdrlTypes.Party,
|
|
52
|
+
schema: OdrlPartySchema
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
type: OdrlTypes.PartyCollection,
|
|
56
|
+
schema: OdrlPartyCollectionSchema
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
type: OdrlTypes.Action,
|
|
60
|
+
schema: OdrlActionSchema
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
type: OdrlTypes.Permission,
|
|
64
|
+
schema: OdrlPermissionSchema
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
type: OdrlTypes.Prohibition,
|
|
68
|
+
schema: OdrlProhibitionSchema
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
type: OdrlTypes.Duty,
|
|
72
|
+
schema: OdrlDutySchema
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
type: OdrlTypes.Constraint,
|
|
76
|
+
schema: OdrlConstraintSchema
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
type: OdrlTypes.LogicalConstraint,
|
|
80
|
+
schema: OdrlLogicalConstraintSchema
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
type: OdrlTypes.LogicalConstraintOperand,
|
|
84
|
+
schema: OdrlLogicalConstraintOperandSchema
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
type: OdrlTypes.Set,
|
|
88
|
+
schema: OdrlSetSchema
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
type: OdrlTypes.Offer,
|
|
92
|
+
schema: OdrlOfferSchema
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
type: OdrlTypes.Agreement,
|
|
96
|
+
schema: OdrlAgreementSchema
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
type: OdrlTypes.Rule,
|
|
100
|
+
schema: OdrlRuleSchema
|
|
101
|
+
}
|
|
102
|
+
];
|
|
103
|
+
DataTypeHelper.registerTypes(OdrlContexts.Namespace, OdrlContexts.JsonLdContext, types);
|
|
104
|
+
DataTypeHelper.registerTypes(OdrlContexts.JsonSchemaNamespace, OdrlContexts.JsonLdContext, types);
|
|
111
105
|
}
|
|
112
106
|
}
|
|
113
107
|
//# sourceMappingURL=odrlDataTypes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odrlDataTypes.js","sourceRoot":"","sources":["../../../src/dataTypes/odrlDataTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,gBAAgB,MAAM,4BAA4B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAChF,OAAO,mBAAmB,MAAM,+BAA+B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACtF,OAAO,eAAe,MAAM,2BAA2B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC9E,OAAO,yBAAyB,MAAM,qCAAqC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAClG,OAAO,oBAAoB,MAAM,gCAAgC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACxF,OAAO,cAAc,MAAM,0BAA0B,CAAC,OAAO,IAAI,E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Content":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { DataTypeHandlerFactory } from \"@twin.org/data-core\";\nimport type { IJsonSchema } from \"@twin.org/data-core\";\nimport { JsonLdProcessor } from \"@twin.org/data-json-ld\";\nimport { OdrlContexts } from \"../models/odrlContexts.js\";\nimport { OdrlTypes } from \"../models/types/odrlTypes.js\";\nimport OdrlActionSchema from \"../schemas/OdrlAction.json\" with { type: \"json\" };\nimport OdrlAgreementSchema from \"../schemas/OdrlAgreement.json\" with { type: \"json\" };\nimport OdrlAssetSchema from \"../schemas/OdrlAsset.json\" with { type: \"json\" };\nimport OdrlAssetCollectionSchema from \"../schemas/OdrlAssetCollection.json\" with { type: \"json\" };\nimport OdrlConstraintSchema from \"../schemas/OdrlConstraint.json\" with { type: \"json\" };\nimport OdrlDutySchema from \"../schemas/OdrlDuty.json\" with { type: \"json\" };\nimport OdrlLogicalConstraintSchema from \"../schemas/OdrlLogicalConstraint.json\" with { type: \"json\" };\nimport OdrlOfferSchema from \"../schemas/OdrlOffer.json\" with { type: \"json\" };\nimport OdrlPartySchema from \"../schemas/OdrlParty.json\" with { type: \"json\" };\nimport OdrlPartyCollectionSchema from \"../schemas/OdrlPartyCollection.json\" with { type: \"json\" };\nimport OdrlPermissionSchema from \"../schemas/OdrlPermission.json\" with { type: \"json\" };\nimport OdrlPolicySchema from \"../schemas/OdrlPolicy.json\" with { type: \"json\" };\nimport OdrlProhibitionSchema from \"../schemas/OdrlProhibition.json\" with { type: \"json\" };\nimport OdrlRuleSchema from \"../schemas/OdrlRule.json\" with { type: \"json\" };\nimport OdrlSetSchema from \"../schemas/OdrlSet.json\" with { type: \"json\" };\n\n/**\n * Handle all the data types for ODRL.\n */\nexport class OdrlDataTypes {\n\t/**\n\t * Register the JSON-LD Redirects.\n\t */\n\tpublic static registerRedirects(): void {\n\t\tJsonLdProcessor.addRedirect(\n\t\t\t/https?:\\/\\/www\\.w3\\.org\\/ns\\/odrl\\/?/,\n\t\t\tOdrlContexts.ContextRedirect\n\t\t);\n\t}\n\n\t/**\n\t * Register all the data types.\n\t */\n\tpublic static registerTypes(): void {\n\t\tDataTypeHandlerFactory.register(`${OdrlContexts.ContextRoot}${OdrlTypes.Policy}`, () => ({\n\t\t\tcontext: OdrlContexts.ContextRoot,\n\t\t\ttype: OdrlTypes.Policy,\n\t\t\tjsonSchema: async () => OdrlPolicySchema as IJsonSchema\n\t\t}));\n\n\t\tDataTypeHandlerFactory.register(`${OdrlContexts.ContextRoot}${OdrlTypes.Asset}`, () => ({\n\t\t\tcontext: OdrlContexts.ContextRoot,\n\t\t\ttype: OdrlTypes.Asset,\n\t\t\tjsonSchema: async () => OdrlAssetSchema as IJsonSchema\n\t\t}));\n\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${OdrlContexts.ContextRoot}${OdrlTypes.AssetCollection}`,\n\t\t\t() => ({\n\t\t\t\tcontext: OdrlContexts.ContextRoot,\n\t\t\t\ttype: OdrlTypes.AssetCollection,\n\t\t\t\tjsonSchema: async () => OdrlAssetCollectionSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\n\t\tDataTypeHandlerFactory.register(`${OdrlContexts.ContextRoot}${OdrlTypes.Party}`, () => ({\n\t\t\tcontext: OdrlContexts.ContextRoot,\n\t\t\ttype: OdrlTypes.Party,\n\t\t\tjsonSchema: async () => OdrlPartySchema as IJsonSchema\n\t\t}));\n\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${OdrlContexts.ContextRoot}${OdrlTypes.PartyCollection}`,\n\t\t\t() => ({\n\t\t\t\tcontext: OdrlContexts.ContextRoot,\n\t\t\t\ttype: OdrlTypes.PartyCollection,\n\t\t\t\tjsonSchema: async () => OdrlPartyCollectionSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\n\t\tDataTypeHandlerFactory.register(`${OdrlContexts.ContextRoot}${OdrlTypes.Action}`, () => ({\n\t\t\tcontext: OdrlContexts.ContextRoot,\n\t\t\ttype: OdrlTypes.Action,\n\t\t\tjsonSchema: async () => OdrlActionSchema as IJsonSchema\n\t\t}));\n\n\t\tDataTypeHandlerFactory.register(`${OdrlContexts.ContextRoot}${OdrlTypes.Permission}`, () => ({\n\t\t\tcontext: OdrlContexts.ContextRoot,\n\t\t\ttype: OdrlTypes.Permission,\n\t\t\tjsonSchema: async () => OdrlPermissionSchema as IJsonSchema\n\t\t}));\n\n\t\tDataTypeHandlerFactory.register(`${OdrlContexts.ContextRoot}${OdrlTypes.Prohibition}`, () => ({\n\t\t\tcontext: OdrlContexts.ContextRoot,\n\t\t\ttype: OdrlTypes.Prohibition,\n\t\t\tjsonSchema: async () => OdrlProhibitionSchema as IJsonSchema\n\t\t}));\n\n\t\tDataTypeHandlerFactory.register(`${OdrlContexts.ContextRoot}${OdrlTypes.Duty}`, () => ({\n\t\t\tcontext: OdrlContexts.ContextRoot,\n\t\t\ttype: OdrlTypes.Duty,\n\t\t\tjsonSchema: async () => OdrlDutySchema as IJsonSchema\n\t\t}));\n\n\t\tDataTypeHandlerFactory.register(`${OdrlContexts.ContextRoot}${OdrlTypes.Constraint}`, () => ({\n\t\t\tcontext: OdrlContexts.ContextRoot,\n\t\t\ttype: OdrlTypes.Constraint,\n\t\t\tjsonSchema: async () => OdrlConstraintSchema as IJsonSchema\n\t\t}));\n\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${OdrlContexts.ContextRoot}${OdrlTypes.LogicalConstraint}`,\n\t\t\t() => ({\n\t\t\t\tcontext: OdrlContexts.ContextRoot,\n\t\t\t\ttype: OdrlTypes.LogicalConstraint,\n\t\t\t\tjsonSchema: async () => OdrlLogicalConstraintSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\n\t\tDataTypeHandlerFactory.register(`${OdrlContexts.ContextRoot}${OdrlTypes.Set}`, () => ({\n\t\t\tcontext: OdrlContexts.ContextRoot,\n\t\t\ttype: OdrlTypes.Set,\n\t\t\tjsonSchema: async () => OdrlSetSchema as IJsonSchema\n\t\t}));\n\n\t\tDataTypeHandlerFactory.register(`${OdrlContexts.ContextRoot}${OdrlTypes.Offer}`, () => ({\n\t\t\tcontext: OdrlContexts.ContextRoot,\n\t\t\ttype: OdrlTypes.Offer,\n\t\t\tjsonSchema: async () => OdrlOfferSchema as IJsonSchema\n\t\t}));\n\n\t\tDataTypeHandlerFactory.register(`${OdrlContexts.ContextRoot}${OdrlTypes.Agreement}`, () => ({\n\t\t\tcontext: OdrlContexts.ContextRoot,\n\t\t\ttype: OdrlTypes.Agreement,\n\t\t\tjsonSchema: async () => OdrlAgreementSchema as IJsonSchema\n\t\t}));\n\n\t\tDataTypeHandlerFactory.register(`${OdrlContexts.ContextRoot}${OdrlTypes.Rule}`, () => ({\n\t\t\tcontext: OdrlContexts.ContextRoot,\n\t\t\ttype: OdrlTypes.Rule,\n\t\t\tjsonSchema: async () => OdrlRuleSchema as IJsonSchema\n\t\t}));\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"odrlDataTypes.js","sourceRoot":"","sources":["../../../src/dataTypes/odrlDataTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,gBAAgB,MAAM,4BAA4B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAChF,OAAO,mBAAmB,MAAM,+BAA+B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACtF,OAAO,eAAe,MAAM,2BAA2B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC9E,OAAO,yBAAyB,MAAM,qCAAqC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAClG,OAAO,oBAAoB,MAAM,gCAAgC,CAAC,O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Y,CAAC,aAAa,EAC1B,KAAK,CACL,CAAC;IACH,CAAC;CACD","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { DataTypeHelper } from \"@twin.org/data-core\";\nimport { JsonLdProcessor } from \"@twin.org/data-json-ld\";\nimport { OdrlContexts } from \"../models/odrlContexts.js\";\nimport { OdrlTypes } from \"../models/types/odrlTypes.js\";\nimport OdrlActionSchema from \"../schemas/OdrlAction.json\" with { type: \"json\" };\nimport OdrlAgreementSchema from \"../schemas/OdrlAgreement.json\" with { type: \"json\" };\nimport OdrlAssetSchema from \"../schemas/OdrlAsset.json\" with { type: \"json\" };\nimport OdrlAssetCollectionSchema from \"../schemas/OdrlAssetCollection.json\" with { type: \"json\" };\nimport OdrlConstraintSchema from \"../schemas/OdrlConstraint.json\" with { type: \"json\" };\nimport OdrlDutySchema from \"../schemas/OdrlDuty.json\" with { type: \"json\" };\nimport OdrlLogicalConstraintSchema from \"../schemas/OdrlLogicalConstraint.json\" with { type: \"json\" };\nimport OdrlLogicalConstraintOperandSchema from \"../schemas/OdrlLogicalConstraintOperand.json\" with { type: \"json\" };\nimport OdrlOfferSchema from \"../schemas/OdrlOffer.json\" with { type: \"json\" };\nimport OdrlPartySchema from \"../schemas/OdrlParty.json\" with { type: \"json\" };\nimport OdrlPartyCollectionSchema from \"../schemas/OdrlPartyCollection.json\" with { type: \"json\" };\nimport OdrlPermissionSchema from \"../schemas/OdrlPermission.json\" with { type: \"json\" };\nimport OdrlPolicySchema from \"../schemas/OdrlPolicy.json\" with { type: \"json\" };\nimport OdrlProhibitionSchema from \"../schemas/OdrlProhibition.json\" with { type: \"json\" };\nimport OdrlRuleSchema from \"../schemas/OdrlRule.json\" with { type: \"json\" };\nimport OdrlSetSchema from \"../schemas/OdrlSet.json\" with { type: \"json\" };\n\n/**\n * Handle all the data types for ODRL.\n */\nexport class OdrlDataTypes {\n\t/**\n\t * Register the JSON-LD Redirects.\n\t */\n\tpublic static registerRedirects(): void {\n\t\tJsonLdProcessor.addRedirect(/https?:\\/\\/www\\.w3\\.org\\/ns\\/odrl\\/?/, OdrlContexts.JsonLdContext);\n\t}\n\n\t/**\n\t * Register all the data types.\n\t */\n\tpublic static registerTypes(): void {\n\t\tconst types = [\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.Policy,\n\t\t\t\tschema: OdrlPolicySchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.Asset,\n\t\t\t\tschema: OdrlAssetSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.AssetCollection,\n\t\t\t\tschema: OdrlAssetCollectionSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.Party,\n\t\t\t\tschema: OdrlPartySchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.PartyCollection,\n\t\t\t\tschema: OdrlPartyCollectionSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.Action,\n\t\t\t\tschema: OdrlActionSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.Permission,\n\t\t\t\tschema: OdrlPermissionSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.Prohibition,\n\t\t\t\tschema: OdrlProhibitionSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.Duty,\n\t\t\t\tschema: OdrlDutySchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.Constraint,\n\t\t\t\tschema: OdrlConstraintSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.LogicalConstraint,\n\t\t\t\tschema: OdrlLogicalConstraintSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.LogicalConstraintOperand,\n\t\t\t\tschema: OdrlLogicalConstraintOperandSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.Set,\n\t\t\t\tschema: OdrlSetSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.Offer,\n\t\t\t\tschema: OdrlOfferSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.Agreement,\n\t\t\t\tschema: OdrlAgreementSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.Rule,\n\t\t\t\tschema: OdrlRuleSchema\n\t\t\t}\n\t\t];\n\n\t\tDataTypeHelper.registerTypes(OdrlContexts.Namespace, OdrlContexts.JsonLdContext, types);\n\t\tDataTypeHelper.registerTypes(\n\t\t\tOdrlContexts.JsonSchemaNamespace,\n\t\t\tOdrlContexts.JsonLdContext,\n\t\t\ttypes\n\t\t);\n\t}\n}\n"]}
|
package/dist/es/index.js
CHANGED
|
@@ -8,6 +8,7 @@ export * from "./models/IOdrlAssetCollection.js";
|
|
|
8
8
|
export * from "./models/IOdrlConstraint.js";
|
|
9
9
|
export * from "./models/IOdrlDuty.js";
|
|
10
10
|
export * from "./models/IOdrlLogicalConstraint.js";
|
|
11
|
+
export * from "./models/IOdrlLogicalConstraintOperand.js";
|
|
11
12
|
export * from "./models/IOdrlOffer.js";
|
|
12
13
|
export * from "./models/IOdrlParty.js";
|
|
13
14
|
export * from "./models/IOdrlPartyCollection.js";
|
package/dist/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,kCAAkC,CAAC;AACjD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,oCAAoC,CAAC;AACnD,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kCAAkC,CAAC;AACjD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wCAAwC,CAAC;AACvD,cAAc,mCAAmC,CAAC;AAClD,cAAc,yCAAyC,CAAC;AACxD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AACnD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./dataTypes/odrlDataTypes.js\";\nexport * from \"./models/IOdrlAction.js\";\nexport * from \"./models/IOdrlAgreement.js\";\nexport * from \"./models/IOdrlAsset.js\";\nexport * from \"./models/IOdrlAssetCollection.js\";\nexport * from \"./models/IOdrlConstraint.js\";\nexport * from \"./models/IOdrlDuty.js\";\nexport * from \"./models/IOdrlLogicalConstraint.js\";\nexport * from \"./models/IOdrlOffer.js\";\nexport * from \"./models/IOdrlParty.js\";\nexport * from \"./models/IOdrlPartyCollection.js\";\nexport * from \"./models/IOdrlPermission.js\";\nexport * from \"./models/IOdrlPolicy.js\";\nexport * from \"./models/IOdrlProhibition.js\";\nexport * from \"./models/IOdrlRule.js\";\nexport * from \"./models/IOdrlSet.js\";\nexport * from \"./models/odrlContexts.js\";\nexport * from \"./models/odrlContextType.js\";\nexport * from \"./models/types/actionType.js\";\nexport * from \"./models/types/conflictStrategyType.js\";\nexport * from \"./models/types/leftOperandType.js\";\nexport * from \"./models/types/logicalConstraintType.js\";\nexport * from \"./models/types/odrlTypes.js\";\nexport * from \"./models/types/operatorType.js\";\nexport * from \"./models/types/policyType.js\";\nexport * from \"./models/types/rightOperandType.js\";\nexport * from \"./models/types/ruleType.js\";\nexport * from \"./models/types/statusType.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,kCAAkC,CAAC;AACjD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,oCAAoC,CAAC;AACnD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kCAAkC,CAAC;AACjD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wCAAwC,CAAC;AACvD,cAAc,mCAAmC,CAAC;AAClD,cAAc,yCAAyC,CAAC;AACxD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AACnD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./dataTypes/odrlDataTypes.js\";\nexport * from \"./models/IOdrlAction.js\";\nexport * from \"./models/IOdrlAgreement.js\";\nexport * from \"./models/IOdrlAsset.js\";\nexport * from \"./models/IOdrlAssetCollection.js\";\nexport * from \"./models/IOdrlConstraint.js\";\nexport * from \"./models/IOdrlDuty.js\";\nexport * from \"./models/IOdrlLogicalConstraint.js\";\nexport * from \"./models/IOdrlLogicalConstraintOperand.js\";\nexport * from \"./models/IOdrlOffer.js\";\nexport * from \"./models/IOdrlParty.js\";\nexport * from \"./models/IOdrlPartyCollection.js\";\nexport * from \"./models/IOdrlPermission.js\";\nexport * from \"./models/IOdrlPolicy.js\";\nexport * from \"./models/IOdrlProhibition.js\";\nexport * from \"./models/IOdrlRule.js\";\nexport * from \"./models/IOdrlSet.js\";\nexport * from \"./models/odrlContexts.js\";\nexport * from \"./models/odrlContextType.js\";\nexport * from \"./models/types/actionType.js\";\nexport * from \"./models/types/conflictStrategyType.js\";\nexport * from \"./models/types/leftOperandType.js\";\nexport * from \"./models/types/logicalConstraintType.js\";\nexport * from \"./models/types/odrlTypes.js\";\nexport * from \"./models/types/operatorType.js\";\nexport * from \"./models/types/policyType.js\";\nexport * from \"./models/types/rightOperandType.js\";\nexport * from \"./models/types/ruleType.js\";\nexport * from \"./models/types/statusType.js\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IOdrlAsset.js","sourceRoot":"","sources":["../../../src/models/IOdrlAsset.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { IOdrlAssetCollection } from \"./IOdrlAssetCollection.js\";\n\n/**\n * Interface for ODRL Assets.\n * https://www.w3.org/TR/odrl-model/#asset\n */\nexport interface IOdrlAsset extends IJsonLdNodeObject {\n\t/**\n\t * The unique identifier for the asset.\n\t * Should be an IRI.\n\t */\n\tuid?: string;\n\n\t/**\n\t * The type of the asset.\n\t * Can be used to specify additional type information.\n\t */\n\t\"@type\"?: string;\n\n\t/**\n\t * Reference to the asset collection this asset is part of.\n\t * Used to identify an AssetCollection that this Asset is a member of.\n\t */\n\tpartOf?: string | IOdrlAssetCollection;\n\n\t/**\n\t * Reference to the policy that governs this asset.\n\t * Used to identify the Policy that governs this Asset.\n\t */\n\thasPolicy?: string;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"IOdrlAsset.js","sourceRoot":"","sources":["../../../src/models/IOdrlAsset.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { IOdrlAssetCollection } from \"./IOdrlAssetCollection.js\";\n\n/**\n * Interface for ODRL Assets.\n * https://www.w3.org/TR/odrl-model/#asset\n */\nexport interface IOdrlAsset extends IJsonLdNodeObject {\n\t/**\n\t * The unique identifier for the asset.\n\t * Should be an IRI.\n\t */\n\tuid?: string;\n\n\t/**\n\t * The type of the asset.\n\t * Can be used to specify additional type information.\n\t */\n\t\"@type\"?: string;\n\n\t/**\n\t * Reference to the asset collection this asset is part of.\n\t * Used to identify an AssetCollection that this Asset is a member of.\n\t */\n\tpartOf?: string | IOdrlAssetCollection | (string | IOdrlAssetCollection)[];\n\n\t/**\n\t * Reference to the policy that governs this asset.\n\t * Used to identify the Policy that governs this Asset.\n\t */\n\thasPolicy?: string | string[];\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IOdrlAssetCollection.js","sourceRoot":"","sources":["../../../src/models/IOdrlAssetCollection.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IOdrlAsset } from \"./IOdrlAsset.js\";\nimport type { IOdrlConstraint } from \"./IOdrlConstraint.js\";\n\n/**\n * Interface for ODRL Asset Collections.\n * An AssetCollection is a single resource representing a set of member resources,\n * where all members of the set will be the subject of the Rule.\n * https://www.w3.org/TR/odrl-model/#asset\n */\nexport interface IOdrlAssetCollection extends IOdrlAsset {\n\t/**\n\t * Reference to the source of the asset collection.\n\t * Must be an IRI that references the AssetCollection.\n\t */\n\tsource: string;\n\n\t/**\n\t * Refinements applied to the asset collection.\n\t * Used to specify the refinement context under which to identify individual Asset(s)\n\t * of the complete collection. The refinement applies to the characteristics of each\n\t * member of the collection (not the resource as a whole).\n\t */\n\trefinement
|
|
1
|
+
{"version":3,"file":"IOdrlAssetCollection.js","sourceRoot":"","sources":["../../../src/models/IOdrlAssetCollection.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IOdrlAsset } from \"./IOdrlAsset.js\";\nimport type { IOdrlConstraint } from \"./IOdrlConstraint.js\";\nimport type { IOdrlLogicalConstraint } from \"./IOdrlLogicalConstraint.js\";\n\n/**\n * Interface for ODRL Asset Collections.\n * An AssetCollection is a single resource representing a set of member resources,\n * where all members of the set will be the subject of the Rule.\n * https://www.w3.org/TR/odrl-model/#asset\n */\nexport interface IOdrlAssetCollection extends IOdrlAsset {\n\t/**\n\t * Reference to the source of the asset collection.\n\t * Must be an IRI that references the AssetCollection.\n\t */\n\tsource: string;\n\n\t/**\n\t * Refinements applied to the asset collection.\n\t * Used to specify the refinement context under which to identify individual Asset(s)\n\t * of the complete collection. The refinement applies to the characteristics of each\n\t * member of the collection (not the resource as a whole).\n\t */\n\trefinement?:\n\t\t| IOdrlConstraint\n\t\t| IOdrlLogicalConstraint\n\t\t| (IOdrlConstraint | IOdrlLogicalConstraint)[];\n}\n"]}
|
|
@@ -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 { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\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 extends IJsonLdNodeObject {\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 */\n\trightOperand
|
|
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 { ObjectOrArray } from \"@twin.org/core\";\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\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 extends IJsonLdNodeObject {\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?: ObjectOrArray<\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>;\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?: ObjectOrArray<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"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IOdrlDuty.js","sourceRoot":"","sources":["../../../src/models/IOdrlDuty.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IOdrlRule } from \"./IOdrlRule.js\";\n\n/**\n * Interface for Duty Rules.\n * A Duty is the obligation to exercise an action, with all refinements satisfied.\n * A Duty is fulfilled if all constraints are satisfied and if its action has been exercised.\n * https://www.w3.org/TR/odrl-model/#duty\n */\nexport interface IOdrlDuty extends IOdrlRule {\n\t/**\n\t * The party to be attributed\n\t * Used when the duty involves attribution\n\t */\n\tattributedParty?: string;\n\n\t/**\n\t * The party performing the tracking\n\t * Used when the duty involves tracking\n\t */\n\ttrackingParty?: string;\n\t/**\n\t * The consequences if the duty is not fulfilled.\n\t * Only applicable when the Duty is referenced by a Rule with duty or obligation\n\t * properties.\n\t */\n\tconsequence?: IOdrlDuty
|
|
1
|
+
{"version":3,"file":"IOdrlDuty.js","sourceRoot":"","sources":["../../../src/models/IOdrlDuty.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IOdrlRule } from \"./IOdrlRule.js\";\n\n/**\n * Interface for Duty Rules.\n * A Duty is the obligation to exercise an action, with all refinements satisfied.\n * A Duty is fulfilled if all constraints are satisfied and if its action has been exercised.\n * https://www.w3.org/TR/odrl-model/#duty\n */\nexport interface IOdrlDuty extends IOdrlRule {\n\t/**\n\t * The party to be attributed\n\t * Used when the duty involves attribution\n\t */\n\tattributedParty?: string;\n\n\t/**\n\t * The party performing the tracking\n\t * Used when the duty involves tracking\n\t */\n\ttrackingParty?: string;\n\t/**\n\t * The consequences if the duty is not fulfilled.\n\t * Only applicable when the Duty is referenced by a Rule with duty or obligation\n\t * properties.\n\t */\n\tconsequence?: IOdrlDuty | IOdrlDuty[];\n\n\t/**\n\t * The party to be compensated\n\t * Used when the duty involves compensation\n\t */\n\tcompensatedParty?: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IOdrlLogicalConstraint.js","sourceRoot":"","sources":["../../../src/models/IOdrlLogicalConstraint.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\n\n/**\n * Interface for ODRL Logical Constraints.\n * A Logical Constraint compares two or more existing Constraints by one logical operator.\n * If the comparison returns a logical match, then the Logical Constraint is satisfied.\n * https://www.w3.org/TR/odrl-model/#constraint-logical\n */\nexport interface IOdrlLogicalConstraint extends IJsonLdNodeObject {\n\t/**\n\t * Optional unique identifier for the logical constraint.\n\t * Must be an IRI.\n\t */\n\tuid?: string;\n\n\t/**\n\t * AND operator - all constraints must be satisfied.\n\t
|
|
1
|
+
{"version":3,"file":"IOdrlLogicalConstraint.js","sourceRoot":"","sources":["../../../src/models/IOdrlLogicalConstraint.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { IOdrlLogicalConstraintOperand } from \"./IOdrlLogicalConstraintOperand.js\";\n\n/**\n * Interface for ODRL Logical Constraints.\n * A Logical Constraint compares two or more existing Constraints by one logical operator.\n * If the comparison returns a logical match, then the Logical Constraint is satisfied.\n * https://www.w3.org/TR/odrl-model/#constraint-logical\n */\nexport interface IOdrlLogicalConstraint extends IJsonLdNodeObject {\n\t/**\n\t * Optional unique identifier for the logical constraint.\n\t * Must be an IRI.\n\t */\n\tuid?: string;\n\n\t/**\n\t * AND operator - all constraints must be satisfied.\n\t * Exactly one logical operator must be present.\n\t */\n\tand?: IOdrlLogicalConstraintOperand;\n\n\t/**\n\t * OR operator - at least one constraint must be satisfied.\n\t * Exactly one logical operator must be present.\n\t */\n\tor?: IOdrlLogicalConstraintOperand;\n\n\t/**\n\t * XOR operator - exactly one constraint must be satisfied.\n\t * Exactly one logical operator must be present.\n\t */\n\txone?: IOdrlLogicalConstraintOperand;\n\n\t/**\n\t * AND Sequence operator - all constraints must be satisfied in order.\n\t * Exactly one logical operator must be present.\n\t */\n\tandSequence?: IOdrlLogicalConstraintOperand;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IOdrlLogicalConstraintOperand.js","sourceRoot":"","sources":["../../../src/models/IOdrlLogicalConstraintOperand.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Operand list wrapper for logical constraints.\n * Uses JSON-LD list to preserve order for andSequence.\n */\nexport interface IOdrlLogicalConstraintOperand {\n\t/**\n\t * Ordered list of constraint references for logical evaluation.\n\t */\n\t\"@list\": { \"@id\": string }[];\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IOdrlParty.js","sourceRoot":"","sources":["../../../src/models/IOdrlParty.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { IOdrlPartyCollection } from \"./IOdrlPartyCollection.js\";\n\n/**\n * Interface for ODRL Parties.\n * https://www.w3.org/TR/odrl-model/#party\n */\nexport interface IOdrlParty extends IJsonLdNodeObject {\n\t/**\n\t * The unique identifier for the party.\n\t * Must be an IRI.\n\t */\n\tuid?: string;\n\n\t/**\n\t * The type of the party.\n\t * Can be used to specify additional type information (e.g., \"Party\",\n\t * \"vcard:Organization\", \"vcard:Individual\").\n\t */\n\t\"@type\"?: string | string[];\n\n\t/**\n\t * Reference to the party collection this party is part of.\n\t * Used to identify a PartyCollection that a Party entity is a member of.\n\t */\n\tpartOf?: string | IOdrlPartyCollection;\n\n\t/**\n\t * Reference to a policy where this party is an assignee.\n\t * When assigneeOf is asserted, the Party MUST be inferred to undertake\n\t * the assignee functional role of all the Rules of that Policy.\n\t */\n\tassigneeOf?: string;\n\n\t/**\n\t * Reference to a policy where this party is an assigner.\n\t * When assignerOf is asserted, the Party MUST be inferred to undertake\n\t * the assigner functional role of all the Rules of that Policy.\n\t */\n\tassignerOf?: string;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"IOdrlParty.js","sourceRoot":"","sources":["../../../src/models/IOdrlParty.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { IOdrlPartyCollection } from \"./IOdrlPartyCollection.js\";\n\n/**\n * Interface for ODRL Parties.\n * https://www.w3.org/TR/odrl-model/#party\n */\nexport interface IOdrlParty extends IJsonLdNodeObject {\n\t/**\n\t * The unique identifier for the party.\n\t * Must be an IRI.\n\t */\n\tuid?: string;\n\n\t/**\n\t * The type of the party.\n\t * Can be used to specify additional type information (e.g., \"Party\",\n\t * \"vcard:Organization\", \"vcard:Individual\").\n\t */\n\t\"@type\"?: string | string[];\n\n\t/**\n\t * Reference to the party collection this party is part of.\n\t * Used to identify a PartyCollection that a Party entity is a member of.\n\t */\n\tpartOf?: string | IOdrlPartyCollection | (string | IOdrlPartyCollection)[];\n\n\t/**\n\t * Reference to a policy where this party is an assignee.\n\t * When assigneeOf is asserted, the Party MUST be inferred to undertake\n\t * the assignee functional role of all the Rules of that Policy.\n\t */\n\tassigneeOf?: string | string[];\n\n\t/**\n\t * Reference to a policy where this party is an assigner.\n\t * When assignerOf is asserted, the Party MUST be inferred to undertake\n\t * the assigner functional role of all the Rules of that Policy.\n\t */\n\tassignerOf?: string | string[];\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IOdrlPartyCollection.js","sourceRoot":"","sources":["../../../src/models/IOdrlPartyCollection.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IOdrlConstraint } from \"./IOdrlConstraint.js\";\nimport type { IOdrlParty } from \"./IOdrlParty.js\";\n\n/**\n * Interface for ODRL Party Collections.\n * A PartyCollection identifies a collection of entities and is a subclass of Party.\n * https://www.w3.org/TR/odrl-model/#party\n */\nexport interface IOdrlPartyCollection extends IOdrlParty {\n\t/**\n\t * Reference to the source of the party collection.\n\t * Used to identify the origin or location of the collection.\n\t */\n\tsource: string;\n\n\t/**\n\t * Refinements applied to the party collection.\n\t * Used to specify constraints that apply to all members of the collection.\n\t */\n\trefinement
|
|
1
|
+
{"version":3,"file":"IOdrlPartyCollection.js","sourceRoot":"","sources":["../../../src/models/IOdrlPartyCollection.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IOdrlConstraint } from \"./IOdrlConstraint.js\";\nimport type { IOdrlLogicalConstraint } from \"./IOdrlLogicalConstraint.js\";\nimport type { IOdrlParty } from \"./IOdrlParty.js\";\n\n/**\n * Interface for ODRL Party Collections.\n * A PartyCollection identifies a collection of entities and is a subclass of Party.\n * https://www.w3.org/TR/odrl-model/#party\n */\nexport interface IOdrlPartyCollection extends IOdrlParty {\n\t/**\n\t * Reference to the source of the party collection.\n\t * Used to identify the origin or location of the collection.\n\t */\n\tsource: string;\n\n\t/**\n\t * Refinements applied to the party collection.\n\t * Used to specify constraints that apply to all members of the collection.\n\t */\n\trefinement?:\n\t\t| IOdrlConstraint\n\t\t| IOdrlLogicalConstraint\n\t\t| (IOdrlConstraint | IOdrlLogicalConstraint)[];\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IOdrlPermission.js","sourceRoot":"","sources":["../../../src/models/IOdrlPermission.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IOdrlDuty } from \"./IOdrlDuty.js\";\nimport type { IOdrlRule } from \"./IOdrlRule.js\";\n\n/**\n * Interface for Permission Rules.\n * A Permission allows an action to be exercised on an Asset\n * if all constraints are satisfied and if all duties are fulfilled.\n * https://www.w3.org/TR/odrl-model/#permission\n */\nexport interface IOdrlPermission extends IOdrlRule {\n\t/**\n\t * The duties that must be fulfilled before the permission can be exercised.\n\t * A Permission MAY have none, one, or more duty property values.\n\t */\n\tduty?: IOdrlDuty[];\n}\n"]}
|
|
1
|
+
{"version":3,"file":"IOdrlPermission.js","sourceRoot":"","sources":["../../../src/models/IOdrlPermission.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IOdrlDuty } from \"./IOdrlDuty.js\";\nimport type { IOdrlRule } from \"./IOdrlRule.js\";\n\n/**\n * Interface for Permission Rules.\n * A Permission allows an action to be exercised on an Asset\n * if all constraints are satisfied and if all duties are fulfilled.\n * https://www.w3.org/TR/odrl-model/#permission\n */\nexport interface IOdrlPermission extends IOdrlRule {\n\t/**\n\t * The duties that must be fulfilled before the permission can be exercised.\n\t * A Permission MAY have none, one, or more duty property values.\n\t */\n\tduty?: IOdrlDuty | IOdrlDuty[];\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IOdrlPolicy.js","sourceRoot":"","sources":["../../../src/models/IOdrlPolicy.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { IOdrlAction } from \"./IOdrlAction.js\";\nimport type { IOdrlAsset } from \"./IOdrlAsset.js\";\nimport type { IOdrlDuty } from \"./IOdrlDuty.js\";\nimport type { IOdrlParty } from \"./IOdrlParty.js\";\nimport type { IOdrlPermission } from \"./IOdrlPermission.js\";\nimport type { IOdrlProhibition } from \"./IOdrlProhibition.js\";\nimport type { OdrlContextType } from \"./odrlContextType.js\";\nimport type { ActionType } from \"./types/actionType.js\";\nimport type { ConflictStrategyType } from \"./types/conflictStrategyType.js\";\nimport type { PolicyType } from \"./types/policyType.js\";\n\n/**\n * Interface representing an ODRL Policy.\n * https://www.w3.org/TR/odrl-model/#policy\n */\nexport interface IOdrlPolicy extends IJsonLdNodeObject {\n\t/**\n\t * The context for the policy.\n\t * Must include \"https://www.w3.org/ns/odrl.jsonld\"\n\t */\n\t\"@context\": OdrlContextType;\n\n\t/**\n\t * The type of policy.\n\t * Must be one of: \"Set\", \"Offer\", \"Agreement\"\n\t */\n\t\"@type\": PolicyType;\n\n\t/**\n\t * The unique identifier for the policy.\n\t * Must be an IRI.\n\t */\n\tuid: string;\n\n\t/**\n\t * The profile(s) this policy conforms to.\n\t * IRIs identifying the ODRL Profile(s).\n\t */\n\tprofile?: string | string[];\n\n\t/**\n\t * The assigner of the policy.\n\t * Applies to all rules unless overridden at rule level.\n\t */\n\tassigner
|
|
1
|
+
{"version":3,"file":"IOdrlPolicy.js","sourceRoot":"","sources":["../../../src/models/IOdrlPolicy.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { IOdrlAction } from \"./IOdrlAction.js\";\nimport type { IOdrlAsset } from \"./IOdrlAsset.js\";\nimport type { IOdrlAssetCollection } from \"./IOdrlAssetCollection.js\";\nimport type { IOdrlDuty } from \"./IOdrlDuty.js\";\nimport type { IOdrlParty } from \"./IOdrlParty.js\";\nimport type { IOdrlPartyCollection } from \"./IOdrlPartyCollection.js\";\nimport type { IOdrlPermission } from \"./IOdrlPermission.js\";\nimport type { IOdrlProhibition } from \"./IOdrlProhibition.js\";\nimport type { OdrlContextType } from \"./odrlContextType.js\";\nimport type { ActionType } from \"./types/actionType.js\";\nimport type { ConflictStrategyType } from \"./types/conflictStrategyType.js\";\nimport type { PolicyType } from \"./types/policyType.js\";\n\n/**\n * Interface representing an ODRL Policy.\n * https://www.w3.org/TR/odrl-model/#policy\n */\nexport interface IOdrlPolicy extends IJsonLdNodeObject {\n\t/**\n\t * The context for the policy.\n\t * Must include \"https://www.w3.org/ns/odrl.jsonld\"\n\t */\n\t\"@context\": OdrlContextType;\n\n\t/**\n\t * The type of policy.\n\t * Must be one of: \"Set\", \"Offer\", \"Agreement\"\n\t */\n\t\"@type\": PolicyType;\n\n\t/**\n\t * The unique identifier for the policy.\n\t * Must be an IRI.\n\t */\n\tuid: string;\n\n\t/**\n\t * The profile(s) this policy conforms to.\n\t * IRIs identifying the ODRL Profile(s).\n\t */\n\tprofile?: string | string[];\n\n\t/**\n\t * The assigner of the policy.\n\t * Applies to all rules unless overridden at rule level.\n\t */\n\tassigner?:\n\t\t| string\n\t\t| IOdrlParty\n\t\t| IOdrlPartyCollection\n\t\t| (string | IOdrlParty | IOdrlPartyCollection)[];\n\n\t/**\n\t * The assignee of the policy.\n\t * Applies to all rules unless overridden at rule level.\n\t */\n\tassignee?:\n\t\t| string\n\t\t| IOdrlParty\n\t\t| IOdrlPartyCollection\n\t\t| (string | IOdrlParty | IOdrlPartyCollection)[];\n\n\t/**\n\t * The target asset for the rule.\n\t */\n\ttarget?:\n\t\t| string\n\t\t| IOdrlAsset\n\t\t| IOdrlAssetCollection\n\t\t| (string | IOdrlAsset | IOdrlAssetCollection)[];\n\n\t/**\n\t * The action associated with the rule.\n\t */\n\taction?: ActionType | string | IOdrlAction | (ActionType | string | IOdrlAction)[];\n\n\t/**\n\t * The parent policy(ies) this policy inherits from.\n\t * IRIs identifying the parent Policy(ies).\n\t */\n\tinheritFrom?: string | string[];\n\n\t/**\n\t * The conflict resolution strategy.\n\t * - perm: Permissions override Prohibitions\n\t * - prohibit: Prohibitions override Permissions\n\t * - invalid: Policy is void if conflicts exist (default)\n\t */\n\tconflict?: ConflictStrategyType;\n\n\t/**\n\t * The permissions in the policy.\n\t * At least one of permission, prohibition, or obligation must be present.\n\t */\n\tpermission?: IOdrlPermission | IOdrlPermission[];\n\n\t/**\n\t * The prohibitions in the policy.\n\t * At least one of permission, prohibition, or obligation must be present.\n\t */\n\tprohibition?: IOdrlProhibition | IOdrlProhibition[];\n\n\t/**\n\t * The obligations in the policy.\n\t * At least one of permission, prohibition, or obligation must be present.\n\t */\n\tobligation?: IOdrlDuty | IOdrlDuty[];\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IOdrlProhibition.js","sourceRoot":"","sources":["../../../src/models/IOdrlProhibition.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IOdrlDuty } from \"./IOdrlDuty.js\";\nimport type { IOdrlRule } from \"./IOdrlRule.js\";\n\n/**\n * Interface for Prohibition Rules.\n * https://www.w3.org/TR/odrl-model/#prohibition\n */\nexport interface IOdrlProhibition extends IOdrlRule {\n\t/**\n\t * The remedies that must be fulfilled if prohibition is violated.\n\t */\n\tremedy?: IOdrlDuty[];\n}\n"]}
|
|
1
|
+
{"version":3,"file":"IOdrlProhibition.js","sourceRoot":"","sources":["../../../src/models/IOdrlProhibition.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IOdrlDuty } from \"./IOdrlDuty.js\";\nimport type { IOdrlRule } from \"./IOdrlRule.js\";\n\n/**\n * Interface for Prohibition Rules.\n * https://www.w3.org/TR/odrl-model/#prohibition\n */\nexport interface IOdrlProhibition extends IOdrlRule {\n\t/**\n\t * The remedies that must be fulfilled if prohibition is violated.\n\t */\n\tremedy?: IOdrlDuty | IOdrlDuty[];\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IOdrlRule.js","sourceRoot":"","sources":["../../../src/models/IOdrlRule.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { IOdrlAction } from \"./IOdrlAction.js\";\nimport type { IOdrlAsset } from \"./IOdrlAsset.js\";\nimport type { IOdrlConstraint } from \"./IOdrlConstraint.js\";\nimport type { IOdrlParty } from \"./IOdrlParty.js\";\nimport type { ActionType } from \"./types/actionType.js\";\n\n/**\n * Base interface for ODRL Rules.\n * https://www.w3.org/TR/odrl-model/#rule\n */\nexport interface IOdrlRule extends IJsonLdNodeObject {\n\t/**\n\t * Optional unique identifier for the rule.\n\t */\n\tuid?: string;\n\n\t/**\n\t * The action associated with the rule.\n\t */\n\taction?: ActionType | string | IOdrlAction | (ActionType | string | IOdrlAction)[];\n\n\t/**\n\t * The target asset for the rule.\n\t */\n\ttarget
|
|
1
|
+
{"version":3,"file":"IOdrlRule.js","sourceRoot":"","sources":["../../../src/models/IOdrlRule.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { IOdrlAction } from \"./IOdrlAction.js\";\nimport type { IOdrlAsset } from \"./IOdrlAsset.js\";\nimport type { IOdrlAssetCollection } from \"./IOdrlAssetCollection.js\";\nimport type { IOdrlConstraint } from \"./IOdrlConstraint.js\";\nimport type { IOdrlLogicalConstraint } from \"./IOdrlLogicalConstraint.js\";\nimport type { IOdrlParty } from \"./IOdrlParty.js\";\nimport type { IOdrlPartyCollection } from \"./IOdrlPartyCollection.js\";\nimport type { ActionType } from \"./types/actionType.js\";\n\n/**\n * Base interface for ODRL Rules.\n * https://www.w3.org/TR/odrl-model/#rule\n */\nexport interface IOdrlRule extends IJsonLdNodeObject {\n\t/**\n\t * Optional unique identifier for the rule.\n\t */\n\tuid?: string;\n\n\t/**\n\t * The action associated with the rule.\n\t */\n\taction?: ActionType | string | IOdrlAction | (ActionType | string | IOdrlAction)[];\n\n\t/**\n\t * The target asset for the rule.\n\t */\n\ttarget?:\n\t\t| string\n\t\t| IOdrlAsset\n\t\t| IOdrlAssetCollection\n\t\t| (string | IOdrlAsset | IOdrlAssetCollection)[];\n\n\t/**\n\t * The assigner of the rule.\n\t */\n\tassigner?:\n\t\t| string\n\t\t| IOdrlParty\n\t\t| IOdrlPartyCollection\n\t\t| (string | IOdrlParty | IOdrlPartyCollection)[];\n\n\t/**\n\t * The assignee of the rule.\n\t */\n\tassignee?:\n\t\t| string\n\t\t| IOdrlParty\n\t\t| IOdrlPartyCollection\n\t\t| (string | IOdrlParty | IOdrlPartyCollection)[];\n\n\t/**\n\t * Constraints applied to the rule.\n\t */\n\tconstraint?:\n\t\t| IOdrlConstraint\n\t\t| IOdrlLogicalConstraint\n\t\t| (IOdrlConstraint | IOdrlLogicalConstraint)[];\n\n\t/**\n\t * Additional relation sub-properties as defined in ODRL profiles.\n\t * For example, 'summary' in profile \"http://example.com/odrl:profile:03\"\n\t * indicates where the output should be stored.\n\t */\n\tsummary?: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odrlContextType.js","sourceRoot":"","sources":["../../../src/models/odrlContextType.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { OdrlContexts } from \"./odrlContexts.js\";\n\n/**\n * The ODRL JSON-LD context type.\n */\nexport type OdrlContextType =\n\t| typeof OdrlContexts.
|
|
1
|
+
{"version":3,"file":"odrlContextType.js","sourceRoot":"","sources":["../../../src/models/odrlContextType.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { OdrlContexts } from \"./odrlContexts.js\";\n\n/**\n * The ODRL JSON-LD context type.\n */\nexport type OdrlContextType =\n\t| typeof OdrlContexts.Context\n\t| [typeof OdrlContexts.Context]\n\t| [\n\t\t\t...IJsonLdContextDefinitionElement[],\n\t\t\ttypeof OdrlContexts.Context,\n\t\t\tIJsonLdContextDefinitionElement\n\t ]\n\t| [\n\t\t\tIJsonLdContextDefinitionElement,\n\t\t\ttypeof OdrlContexts.Context,\n\t\t\t...IJsonLdContextDefinitionElement[]\n\t ];\n"]}
|
|
@@ -6,12 +6,21 @@
|
|
|
6
6
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
7
|
export const OdrlContexts = {
|
|
8
8
|
/**
|
|
9
|
-
* The
|
|
9
|
+
* The canonical RDF namespace URI.
|
|
10
10
|
*/
|
|
11
|
-
|
|
11
|
+
Namespace: "http://www.w3.org/ns/odrl/2/",
|
|
12
12
|
/**
|
|
13
|
-
* The
|
|
13
|
+
* The value to use in @context.
|
|
14
|
+
* Note: Context points to the JSON-LD url as per ODRL 2.2 specification.
|
|
14
15
|
*/
|
|
15
|
-
|
|
16
|
+
Context: "http://www.w3.org/ns/odrl.jsonld",
|
|
17
|
+
/**
|
|
18
|
+
* The JSON-LD Context URL.
|
|
19
|
+
*/
|
|
20
|
+
JsonLdContext: "http://www.w3.org/ns/odrl.jsonld",
|
|
21
|
+
/**
|
|
22
|
+
* The namespace location of the hosted version of the JSON Schema.
|
|
23
|
+
*/
|
|
24
|
+
JsonSchemaNamespace: "https://schema.twindev.org/w3c-odrl/"
|
|
16
25
|
};
|
|
17
26
|
//# sourceMappingURL=odrlContexts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odrlContexts.js","sourceRoot":"","sources":["../../../src/models/odrlContexts.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,YAAY,GAAG;IAC3B;;OAEG;IACH,
|
|
1
|
+
{"version":3,"file":"odrlContexts.js","sourceRoot":"","sources":["../../../src/models/odrlContexts.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,YAAY,GAAG;IAC3B;;OAEG;IACH,SAAS,EAAE,8BAA8B;IAEzC;;;OAGG;IACH,OAAO,EAAE,kCAAkC;IAE3C;;OAEG;IACH,aAAa,EAAE,kCAAkC;IAEjD;;OAEG;IACH,mBAAmB,EAAE,sCAAsC;CAClD,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The contexts for ODRL.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const OdrlContexts = {\n\t/**\n\t * The canonical RDF namespace URI.\n\t */\n\tNamespace: \"http://www.w3.org/ns/odrl/2/\",\n\n\t/**\n\t * The value to use in @context.\n\t * Note: Context points to the JSON-LD url as per ODRL 2.2 specification.\n\t */\n\tContext: \"http://www.w3.org/ns/odrl.jsonld\",\n\n\t/**\n\t * The JSON-LD Context URL.\n\t */\n\tJsonLdContext: \"http://www.w3.org/ns/odrl.jsonld\",\n\n\t/**\n\t * The namespace location of the hosted version of the JSON Schema.\n\t */\n\tJsonSchemaNamespace: \"https://schema.twindev.org/w3c-odrl/\"\n} as const;\n\n/**\n * The contexts for ODRL.\n */\nexport type OdrlContexts = (typeof OdrlContexts)[keyof typeof OdrlContexts];\n"]}
|
|
@@ -64,6 +64,10 @@ export const OdrlTypes = {
|
|
|
64
64
|
/**
|
|
65
65
|
* LogicalConstraint type.
|
|
66
66
|
*/
|
|
67
|
-
LogicalConstraint: "LogicalConstraint"
|
|
67
|
+
LogicalConstraint: "LogicalConstraint",
|
|
68
|
+
/**
|
|
69
|
+
* LogicalConstraintOperand type.
|
|
70
|
+
*/
|
|
71
|
+
LogicalConstraintOperand: "LogicalConstraintOperand"
|
|
68
72
|
};
|
|
69
73
|
//# sourceMappingURL=odrlTypes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odrlTypes.js","sourceRoot":"","sources":["../../../../src/models/types/odrlTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,SAAS,GAAG;IACxB;;OAEG;IACH,MAAM,EAAE,QAAQ;IAEhB;;OAEG;IACH,GAAG,EAAE,KAAK;IAEV;;OAEG;IACH,KAAK,EAAE,OAAO;IAEd;;OAEG;IACH,SAAS,EAAE,WAAW;IAEtB;;OAEG;IACH,KAAK,EAAE,OAAO;IAEd;;OAEG;IACH,eAAe,EAAE,iBAAiB;IAElC;;OAEG;IACH,KAAK,EAAE,OAAO;IAEd;;OAEG;IACH,eAAe,EAAE,iBAAiB;IAElC;;OAEG;IACH,MAAM,EAAE,QAAQ;IAEhB;;OAEG;IACH,IAAI,EAAE,MAAM;IAEZ;;OAEG;IACH,UAAU,EAAE,YAAY;IAExB;;OAEG;IACH,WAAW,EAAE,aAAa;IAE1B;;OAEG;IACH,IAAI,EAAE,MAAM;IAEZ;;OAEG;IACH,UAAU,EAAE,YAAY;IAExB;;OAEG;IACH,iBAAiB,EAAE,mBAAmB;
|
|
1
|
+
{"version":3,"file":"odrlTypes.js","sourceRoot":"","sources":["../../../../src/models/types/odrlTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,SAAS,GAAG;IACxB;;OAEG;IACH,MAAM,EAAE,QAAQ;IAEhB;;OAEG;IACH,GAAG,EAAE,KAAK;IAEV;;OAEG;IACH,KAAK,EAAE,OAAO;IAEd;;OAEG;IACH,SAAS,EAAE,WAAW;IAEtB;;OAEG;IACH,KAAK,EAAE,OAAO;IAEd;;OAEG;IACH,eAAe,EAAE,iBAAiB;IAElC;;OAEG;IACH,KAAK,EAAE,OAAO;IAEd;;OAEG;IACH,eAAe,EAAE,iBAAiB;IAElC;;OAEG;IACH,MAAM,EAAE,QAAQ;IAEhB;;OAEG;IACH,IAAI,EAAE,MAAM;IAEZ;;OAEG;IACH,UAAU,EAAE,YAAY;IAExB;;OAEG;IACH,WAAW,EAAE,aAAa;IAE1B;;OAEG;IACH,IAAI,EAAE,MAAM;IAEZ;;OAEG;IACH,UAAU,EAAE,YAAY;IAExB;;OAEG;IACH,iBAAiB,EAAE,mBAAmB;IAEtC;;OAEG;IACH,wBAAwB,EAAE,0BAA0B;CAC3C,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The types for ODRL.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const OdrlTypes = {\n\t/**\n\t * Policy type.\n\t */\n\tPolicy: \"Policy\",\n\n\t/**\n\t * Set type (subclass of Policy).\n\t */\n\tSet: \"Set\",\n\n\t/**\n\t * Offer type (subclass of Policy).\n\t */\n\tOffer: \"Offer\",\n\n\t/**\n\t * Agreement type (subclass of Policy).\n\t */\n\tAgreement: \"Agreement\",\n\n\t/**\n\t * Asset type.\n\t */\n\tAsset: \"Asset\",\n\n\t/**\n\t * AssetCollection type.\n\t */\n\tAssetCollection: \"AssetCollection\",\n\n\t/**\n\t * Party type.\n\t */\n\tParty: \"Party\",\n\n\t/**\n\t * PartyCollection type.\n\t */\n\tPartyCollection: \"PartyCollection\",\n\n\t/**\n\t * Action type.\n\t */\n\tAction: \"Action\",\n\n\t/**\n\t * Rule type.\n\t */\n\tRule: \"Rule\",\n\n\t/**\n\t * Permission type (subclass of Rule).\n\t */\n\tPermission: \"Permission\",\n\n\t/**\n\t * Prohibition type (subclass of Rule).\n\t */\n\tProhibition: \"Prohibition\",\n\n\t/**\n\t * Duty type (subclass of Rule).\n\t */\n\tDuty: \"Duty\",\n\n\t/**\n\t * Constraint type.\n\t */\n\tConstraint: \"Constraint\",\n\n\t/**\n\t * LogicalConstraint type.\n\t */\n\tLogicalConstraint: \"LogicalConstraint\",\n\n\t/**\n\t * LogicalConstraintOperand type.\n\t */\n\tLogicalConstraintOperand: \"LogicalConstraintOperand\"\n} as const;\n\n/**\n * The types for ODRL.\n */\nexport type OdrlTypes = (typeof OdrlTypes)[keyof typeof OdrlTypes];\n"]}
|
|
@@ -9,7 +9,16 @@
|
|
|
9
9
|
"anyOf": [
|
|
10
10
|
{
|
|
11
11
|
"type": "string",
|
|
12
|
-
"const": "http://www.w3.org/ns/odrl
|
|
12
|
+
"const": "http://www.w3.org/ns/odrl.jsonld"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"type": "array",
|
|
16
|
+
"items": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"const": "http://www.w3.org/ns/odrl.jsonld"
|
|
19
|
+
},
|
|
20
|
+
"minItems": 1,
|
|
21
|
+
"maxItems": 1
|
|
13
22
|
},
|
|
14
23
|
{
|
|
15
24
|
"type": "array",
|
|
@@ -17,7 +26,7 @@
|
|
|
17
26
|
"prefixItems": [
|
|
18
27
|
{
|
|
19
28
|
"type": "string",
|
|
20
|
-
"const": "http://www.w3.org/ns/odrl
|
|
29
|
+
"const": "http://www.w3.org/ns/odrl.jsonld"
|
|
21
30
|
},
|
|
22
31
|
{
|
|
23
32
|
"$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
|
|
@@ -36,7 +45,7 @@
|
|
|
36
45
|
},
|
|
37
46
|
{
|
|
38
47
|
"type": "string",
|
|
39
|
-
"const": "http://www.w3.org/ns/odrl
|
|
48
|
+
"const": "http://www.w3.org/ns/odrl.jsonld"
|
|
40
49
|
}
|
|
41
50
|
],
|
|
42
51
|
"items": {
|
|
@@ -149,6 +158,9 @@
|
|
|
149
158
|
{
|
|
150
159
|
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAsset"
|
|
151
160
|
},
|
|
161
|
+
{
|
|
162
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAssetCollection"
|
|
163
|
+
},
|
|
152
164
|
{
|
|
153
165
|
"type": "array",
|
|
154
166
|
"items": {
|
|
@@ -158,6 +170,9 @@
|
|
|
158
170
|
},
|
|
159
171
|
{
|
|
160
172
|
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAsset"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAssetCollection"
|
|
161
176
|
}
|
|
162
177
|
]
|
|
163
178
|
}
|
|
@@ -214,24 +229,45 @@
|
|
|
214
229
|
"description": "The conflict resolution strategy.\n- perm: Permissions override Prohibitions\n- prohibit: Prohibitions override Permissions\n- invalid: Policy is void if conflicts exist (default)"
|
|
215
230
|
},
|
|
216
231
|
"permission": {
|
|
217
|
-
"
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
232
|
+
"anyOf": [
|
|
233
|
+
{
|
|
234
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlPermission"
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"type": "array",
|
|
238
|
+
"items": {
|
|
239
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlPermission"
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
],
|
|
221
243
|
"description": "The permissions in the policy. At least one of permission, prohibition, or obligation must be present."
|
|
222
244
|
},
|
|
223
245
|
"prohibition": {
|
|
224
|
-
"
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
246
|
+
"anyOf": [
|
|
247
|
+
{
|
|
248
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlProhibition"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"type": "array",
|
|
252
|
+
"items": {
|
|
253
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlProhibition"
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
],
|
|
228
257
|
"description": "The prohibitions in the policy. At least one of permission, prohibition, or obligation must be present."
|
|
229
258
|
},
|
|
230
259
|
"obligation": {
|
|
231
|
-
"
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
260
|
+
"anyOf": [
|
|
261
|
+
{
|
|
262
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlDuty"
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"type": "array",
|
|
266
|
+
"items": {
|
|
267
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlDuty"
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
],
|
|
235
271
|
"description": "The obligations in the policy. At least one of permission, prohibition, or obligation must be present."
|
|
236
272
|
}
|
|
237
273
|
},
|
|
@@ -73,12 +73,35 @@
|
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
75
|
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAssetCollection"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"type": "array",
|
|
79
|
+
"items": {
|
|
80
|
+
"anyOf": [
|
|
81
|
+
{
|
|
82
|
+
"type": "string"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAssetCollection"
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
}
|
|
76
89
|
}
|
|
77
90
|
],
|
|
78
91
|
"description": "Reference to the asset collection this asset is part of. Used to identify an AssetCollection that this Asset is a member of."
|
|
79
92
|
},
|
|
80
93
|
"hasPolicy": {
|
|
81
|
-
"
|
|
94
|
+
"anyOf": [
|
|
95
|
+
{
|
|
96
|
+
"type": "string"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"type": "array",
|
|
100
|
+
"items": {
|
|
101
|
+
"type": "string"
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
],
|
|
82
105
|
"description": "Reference to the policy that governs this asset. Used to identify the Policy that governs this Asset."
|
|
83
106
|
}
|
|
84
107
|
},
|