@twin.org/standards-w3c-odrl 0.0.3-next.3 → 0.0.3-next.30
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 +66 -77
- package/dist/es/dataTypes/odrlDataTypes.js.map +1 -1
- package/dist/es/models/IOdrlConstraint.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/schemas/OdrlAgreement.json +12 -3
- package/dist/es/schemas/OdrlConstraint.json +51 -4
- package/dist/es/schemas/OdrlOffer.json +12 -3
- package/dist/es/schemas/OdrlPolicy.json +12 -3
- package/dist/es/schemas/OdrlSet.json +12 -3
- package/dist/types/models/IOdrlConstraint.d.ts +5 -3
- package/dist/types/models/odrlContextType.d.ts +3 -3
- package/dist/types/models/odrlContexts.d.ts +13 -4
- package/docs/changelog.md +406 -0
- package/docs/reference/interfaces/IOdrlConstraint.md +3 -2
- package/docs/reference/type-aliases/OdrlContextType.md +1 -1
- package/docs/reference/variables/OdrlContexts.md +19 -6
- 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";
|
|
@@ -27,87 +27,76 @@ export class OdrlDataTypes {
|
|
|
27
27
|
* Register the JSON-LD Redirects.
|
|
28
28
|
*/
|
|
29
29
|
static registerRedirects() {
|
|
30
|
-
JsonLdProcessor.addRedirect(/https?:\/\/www\.w3\.org\/ns\/odrl\/?/, OdrlContexts.
|
|
30
|
+
JsonLdProcessor.addRedirect(/https?:\/\/www\.w3\.org\/ns\/odrl\/?/, OdrlContexts.JsonLdContext);
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
33
|
* Register all the data types.
|
|
34
34
|
*/
|
|
35
35
|
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
|
-
DataTypeHandlerFactory.register(`${OdrlContexts.ContextRoot}${OdrlTypes.Agreement}`, () => ({
|
|
102
|
-
context: OdrlContexts.ContextRoot,
|
|
103
|
-
type: OdrlTypes.Agreement,
|
|
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
|
-
}));
|
|
36
|
+
const types = [
|
|
37
|
+
{
|
|
38
|
+
type: OdrlTypes.Policy,
|
|
39
|
+
schema: OdrlPolicySchema
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
type: OdrlTypes.Asset,
|
|
43
|
+
schema: OdrlAssetSchema
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
type: OdrlTypes.AssetCollection,
|
|
47
|
+
schema: OdrlAssetCollectionSchema
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
type: OdrlTypes.Party,
|
|
51
|
+
schema: OdrlPartySchema
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
type: OdrlTypes.PartyCollection,
|
|
55
|
+
schema: OdrlPartyCollectionSchema
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
type: OdrlTypes.Action,
|
|
59
|
+
schema: OdrlActionSchema
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
type: OdrlTypes.Permission,
|
|
63
|
+
schema: OdrlPermissionSchema
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
type: OdrlTypes.Prohibition,
|
|
67
|
+
schema: OdrlProhibitionSchema
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
type: OdrlTypes.Duty,
|
|
71
|
+
schema: OdrlDutySchema
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
type: OdrlTypes.Constraint,
|
|
75
|
+
schema: OdrlConstraintSchema
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
type: OdrlTypes.LogicalConstraint,
|
|
79
|
+
schema: OdrlLogicalConstraintSchema
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
type: OdrlTypes.Set,
|
|
83
|
+
schema: OdrlSetSchema
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
type: OdrlTypes.Offer,
|
|
87
|
+
schema: OdrlOfferSchema
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
type: OdrlTypes.Agreement,
|
|
91
|
+
schema: OdrlAgreementSchema
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
type: OdrlTypes.Rule,
|
|
95
|
+
schema: OdrlRuleSchema
|
|
96
|
+
}
|
|
97
|
+
];
|
|
98
|
+
DataTypeHelper.registerTypes(OdrlContexts.Namespace, OdrlContexts.JsonLdContext, types);
|
|
99
|
+
DataTypeHelper.registerTypes(OdrlContexts.JsonSchemaNamespace, OdrlContexts.JsonLdContext, types);
|
|
111
100
|
}
|
|
112
101
|
}
|
|
113
102
|
//# 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,0BAA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C;IACL,CAAC;CACD","sourcesContent":["// 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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;gBAC/B,MAAM,EAAE,yBAAyB;aACjC;YACD;gBACC,IAAI,EAAE,SAAS,CAAC,KAAK;gBACrB,MAAM,EAAE,eAAe;aACvB;YACD;gBACC,IAAI,EAAE,SAAS,CAAC,eAAe;gBAC/B,MAAM,EAAE,yBAAyB;aACjC;YACD;gBACC,IAAI,EAAE,SAAS,CAAC,MAAM;gBACtB,MAAM,EAAE,gBAAgB;aACxB;YACD;gBACC,IAAI,EAAE,SAAS,CAAC,UAAU;gBAC1B,MAAM,EAAE,oBAAoB;aAC5B;YACD;gBACC,IAAI,EAAE,SAAS,CAAC,WAAW;gBAC3B,MAAM,EAAE,qBAAqB;aAC7B;YACD;gBACC,IAAI,EAAE,SAAS,CAAC,IAAI;gBACpB,MAAM,EAAE,cAAc;aACtB;YACD;gBACC,IAAI,EAAE,SAAS,CAAC,UAAU;gBAC1B,MAAM,EAAE,oBAAoB;aAC5B;YACD;gBACC,IAAI,EAAE,SAAS,CAAC,iBAAiB;gBACjC,MAAM,EAAE,2BAA2B;aACnC;YACD;gBACC,IAAI,EAAE,SAAS,CAAC,GAAG;gBACnB,MAAM,EAAE,aAAa;aACrB;YACD;gBACC,IAAI,EAAE,SAAS,CAAC,KAAK;gBACrB,MAAM,EAAE,eAAe;aACvB;YACD;gBACC,IAAI,EAAE,SAAS,CAAC,SAAS;gBACzB,MAAM,EAAE,mBAAmB;aAC3B;YACD;gBACC,IAAI,EAAE,SAAS,CAAC,IAAI;gBACpB,MAAM,EAAE,cAAc;aACtB;SACD,CAAC;QAEF,cAAc,CAAC,aAAa,CAAC,YAAY,CAAC,SAAS,EAAE,YAAY,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;QACxF,cAAc,CAAC,aAAa,CAC3B,YAAY,CAAC,mBAAmB,EAChC,YAAY,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 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.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"]}
|
|
@@ -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 */\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 */\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":"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"]}
|
|
@@ -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": {
|
|
@@ -91,6 +91,7 @@
|
|
|
91
91
|
"description": "The operator of the constraint."
|
|
92
92
|
},
|
|
93
93
|
"rightOperand": {
|
|
94
|
+
"description": "Object or array data type",
|
|
94
95
|
"anyOf": [
|
|
95
96
|
{
|
|
96
97
|
"type": "string"
|
|
@@ -121,13 +122,59 @@
|
|
|
121
122
|
"@id"
|
|
122
123
|
],
|
|
123
124
|
"additionalProperties": false
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"type": "array",
|
|
128
|
+
"items": {
|
|
129
|
+
"anyOf": [
|
|
130
|
+
{
|
|
131
|
+
"type": "string"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"type": "object",
|
|
135
|
+
"properties": {
|
|
136
|
+
"@value": {
|
|
137
|
+
"type": "string"
|
|
138
|
+
},
|
|
139
|
+
"@type": {
|
|
140
|
+
"type": "string"
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"required": [
|
|
144
|
+
"@value"
|
|
145
|
+
],
|
|
146
|
+
"additionalProperties": false
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"type": "object",
|
|
150
|
+
"properties": {
|
|
151
|
+
"@id": {
|
|
152
|
+
"type": "string"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"required": [
|
|
156
|
+
"@id"
|
|
157
|
+
],
|
|
158
|
+
"additionalProperties": false
|
|
159
|
+
}
|
|
160
|
+
]
|
|
161
|
+
}
|
|
124
162
|
}
|
|
125
|
-
]
|
|
126
|
-
"description": "The right operand of the constraint. value with optional"
|
|
163
|
+
]
|
|
127
164
|
},
|
|
128
165
|
"rightOperandReference": {
|
|
129
|
-
"
|
|
130
|
-
"
|
|
166
|
+
"description": "Object or array data type",
|
|
167
|
+
"anyOf": [
|
|
168
|
+
{
|
|
169
|
+
"type": "string"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"type": "array",
|
|
173
|
+
"items": {
|
|
174
|
+
"type": "string"
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
]
|
|
131
178
|
},
|
|
132
179
|
"dataType": {
|
|
133
180
|
"type": "string",
|
|
@@ -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": {
|
|
@@ -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": {
|
|
@@ -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": {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ObjectOrArray } from "@twin.org/core";
|
|
1
2
|
import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
2
3
|
import type { LeftOperandType } from "./types/leftOperandType.js";
|
|
3
4
|
import type { OperatorType } from "./types/operatorType.js";
|
|
@@ -24,16 +25,17 @@ export interface IOdrlConstraint extends IJsonLdNodeObject {
|
|
|
24
25
|
* value with optional @type is used for literal values (like "5.00" with type "xsd:decimal")
|
|
25
26
|
* id is used when referencing a URI/identifier (like odrl:policyUsage)
|
|
26
27
|
*/
|
|
27
|
-
rightOperand?: string | {
|
|
28
|
+
rightOperand?: ObjectOrArray<string | {
|
|
28
29
|
"@value": string;
|
|
29
30
|
"@type"?: string;
|
|
30
31
|
} | {
|
|
31
32
|
"@id": string;
|
|
32
|
-
}
|
|
33
|
+
}>;
|
|
33
34
|
/**
|
|
34
35
|
* Reference to the right operand.
|
|
36
|
+
* Can be used to reference external resources or policies using an IRI.
|
|
35
37
|
*/
|
|
36
|
-
rightOperandReference?: string
|
|
38
|
+
rightOperandReference?: ObjectOrArray<string>;
|
|
37
39
|
/**
|
|
38
40
|
* The data type of the right operand.
|
|
39
41
|
*/
|
|
@@ -3,12 +3,12 @@ import type { OdrlContexts } from "./odrlContexts.js";
|
|
|
3
3
|
/**
|
|
4
4
|
* The ODRL JSON-LD context type.
|
|
5
5
|
*/
|
|
6
|
-
export type OdrlContextType = typeof OdrlContexts.
|
|
6
|
+
export type OdrlContextType = typeof OdrlContexts.Context | [typeof OdrlContexts.Context] | [
|
|
7
7
|
...IJsonLdContextDefinitionElement[],
|
|
8
|
-
typeof OdrlContexts.
|
|
8
|
+
typeof OdrlContexts.Context,
|
|
9
9
|
IJsonLdContextDefinitionElement
|
|
10
10
|
] | [
|
|
11
11
|
IJsonLdContextDefinitionElement,
|
|
12
|
-
typeof OdrlContexts.
|
|
12
|
+
typeof OdrlContexts.Context,
|
|
13
13
|
...IJsonLdContextDefinitionElement[]
|
|
14
14
|
];
|
|
@@ -3,13 +3,22 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export declare const OdrlContexts: {
|
|
5
5
|
/**
|
|
6
|
-
* The
|
|
6
|
+
* The canonical RDF namespace URI.
|
|
7
7
|
*/
|
|
8
|
-
readonly
|
|
8
|
+
readonly Namespace: "http://www.w3.org/ns/odrl/2/";
|
|
9
9
|
/**
|
|
10
|
-
* The
|
|
10
|
+
* The value to use in @context.
|
|
11
|
+
* Note: Context points to the JSON-LD url as per ODRL 2.2 specification.
|
|
11
12
|
*/
|
|
12
|
-
readonly
|
|
13
|
+
readonly Context: "http://www.w3.org/ns/odrl.jsonld";
|
|
14
|
+
/**
|
|
15
|
+
* The JSON-LD Context URL.
|
|
16
|
+
*/
|
|
17
|
+
readonly JsonLdContext: "http://www.w3.org/ns/odrl.jsonld";
|
|
18
|
+
/**
|
|
19
|
+
* The namespace location of the hosted version of the JSON Schema.
|
|
20
|
+
*/
|
|
21
|
+
readonly JsonSchemaNamespace: "https://schema.twindev.org/w3c-odrl/";
|
|
13
22
|
};
|
|
14
23
|
/**
|
|
15
24
|
* The contexts for ODRL.
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,411 @@
|
|
|
1
1
|
# @twin.org/standards-w3c-odrl - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.3-next.30](https://github.com/twinfoundation/standards/compare/standards-w3c-odrl-v0.0.3-next.29...standards-w3c-odrl-v0.0.3-next.30) (2026-02-04)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Miscellaneous Chores
|
|
7
|
+
|
|
8
|
+
* **standards-w3c-odrl:** Synchronize repo versions
|
|
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.29 to 0.0.3-next.30
|
|
16
|
+
* @twin.org/standards-dublin-core bumped from 0.0.3-next.29 to 0.0.3-next.30
|
|
17
|
+
|
|
18
|
+
## [0.0.3-next.29](https://github.com/twinfoundation/standards/compare/standards-w3c-odrl-v0.0.3-next.28...standards-w3c-odrl-v0.0.3-next.29) (2026-02-03)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Miscellaneous Chores
|
|
22
|
+
|
|
23
|
+
* **standards-w3c-odrl:** Synchronize repo versions
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Dependencies
|
|
27
|
+
|
|
28
|
+
* The following workspace dependencies were updated
|
|
29
|
+
* dependencies
|
|
30
|
+
* @twin.org/standards-w3c-vcard bumped from 0.0.3-next.28 to 0.0.3-next.29
|
|
31
|
+
* @twin.org/standards-dublin-core bumped from 0.0.3-next.28 to 0.0.3-next.29
|
|
32
|
+
|
|
33
|
+
## [0.0.3-next.28](https://github.com/twinfoundation/standards/compare/standards-w3c-odrl-v0.0.3-next.27...standards-w3c-odrl-v0.0.3-next.28) (2026-02-03)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Bug Fixes
|
|
37
|
+
|
|
38
|
+
* odrl constraint right operand as array ([91c5bf6](https://github.com/twinfoundation/standards/commit/91c5bf6f12f5e2f57d22352b17a50cdf249059e3))
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
### Dependencies
|
|
42
|
+
|
|
43
|
+
* The following workspace dependencies were updated
|
|
44
|
+
* dependencies
|
|
45
|
+
* @twin.org/standards-w3c-vcard bumped from 0.0.3-next.27 to 0.0.3-next.28
|
|
46
|
+
* @twin.org/standards-dublin-core bumped from 0.0.3-next.27 to 0.0.3-next.28
|
|
47
|
+
|
|
48
|
+
## [0.0.3-next.27](https://github.com/twinfoundation/standards/compare/standards-w3c-odrl-v0.0.3-next.26...standards-w3c-odrl-v0.0.3-next.27) (2026-02-03)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
### Miscellaneous Chores
|
|
52
|
+
|
|
53
|
+
* **standards-w3c-odrl:** Synchronize repo versions
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
### Dependencies
|
|
57
|
+
|
|
58
|
+
* The following workspace dependencies were updated
|
|
59
|
+
* dependencies
|
|
60
|
+
* @twin.org/standards-w3c-vcard bumped from 0.0.3-next.26 to 0.0.3-next.27
|
|
61
|
+
* @twin.org/standards-dublin-core bumped from 0.0.3-next.26 to 0.0.3-next.27
|
|
62
|
+
|
|
63
|
+
## [0.0.3-next.26](https://github.com/twinfoundation/standards/compare/standards-w3c-odrl-v0.0.3-next.25...standards-w3c-odrl-v0.0.3-next.26) (2026-02-02)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
### Miscellaneous Chores
|
|
67
|
+
|
|
68
|
+
* **standards-w3c-odrl:** Synchronize repo versions
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
### Dependencies
|
|
72
|
+
|
|
73
|
+
* The following workspace dependencies were updated
|
|
74
|
+
* dependencies
|
|
75
|
+
* @twin.org/standards-w3c-vcard bumped from 0.0.3-next.25 to 0.0.3-next.26
|
|
76
|
+
* @twin.org/standards-dublin-core bumped from 0.0.3-next.25 to 0.0.3-next.26
|
|
77
|
+
|
|
78
|
+
## [0.0.3-next.25](https://github.com/twinfoundation/standards/compare/standards-w3c-odrl-v0.0.3-next.24...standards-w3c-odrl-v0.0.3-next.25) (2026-02-02)
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
### Features
|
|
82
|
+
|
|
83
|
+
* register schemas at hosted location ([#128](https://github.com/twinfoundation/standards/issues/128)) ([ab35298](https://github.com/twinfoundation/standards/commit/ab35298c812d69f043f69c35ab5aa1ac4a6aaa90))
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
### Dependencies
|
|
87
|
+
|
|
88
|
+
* The following workspace dependencies were updated
|
|
89
|
+
* dependencies
|
|
90
|
+
* @twin.org/standards-w3c-vcard bumped from 0.0.3-next.24 to 0.0.3-next.25
|
|
91
|
+
* @twin.org/standards-dublin-core bumped from 0.0.3-next.24 to 0.0.3-next.25
|
|
92
|
+
|
|
93
|
+
## [0.0.3-next.24](https://github.com/twinfoundation/standards/compare/standards-w3c-odrl-v0.0.3-next.23...standards-w3c-odrl-v0.0.3-next.24) (2026-01-30)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
### Miscellaneous Chores
|
|
97
|
+
|
|
98
|
+
* **standards-w3c-odrl:** Synchronize repo versions
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
### Dependencies
|
|
102
|
+
|
|
103
|
+
* The following workspace dependencies were updated
|
|
104
|
+
* dependencies
|
|
105
|
+
* @twin.org/standards-w3c-vcard bumped from 0.0.3-next.23 to 0.0.3-next.24
|
|
106
|
+
* @twin.org/standards-dublin-core bumped from 0.0.3-next.23 to 0.0.3-next.24
|
|
107
|
+
|
|
108
|
+
## [0.0.3-next.23](https://github.com/twinfoundation/standards/compare/standards-w3c-odrl-v0.0.3-next.22...standards-w3c-odrl-v0.0.3-next.23) (2026-01-30)
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
### Miscellaneous Chores
|
|
112
|
+
|
|
113
|
+
* **standards-w3c-odrl:** Synchronize repo versions
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
### Dependencies
|
|
117
|
+
|
|
118
|
+
* The following workspace dependencies were updated
|
|
119
|
+
* dependencies
|
|
120
|
+
* @twin.org/standards-w3c-vcard bumped from 0.0.3-next.22 to 0.0.3-next.23
|
|
121
|
+
* @twin.org/standards-dublin-core bumped from 0.0.3-next.22 to 0.0.3-next.23
|
|
122
|
+
|
|
123
|
+
## [0.0.3-next.22](https://github.com/twinfoundation/standards/compare/standards-w3c-odrl-v0.0.3-next.21...standards-w3c-odrl-v0.0.3-next.22) (2026-01-29)
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
### Miscellaneous Chores
|
|
127
|
+
|
|
128
|
+
* **standards-w3c-odrl:** Synchronize repo versions
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
### Dependencies
|
|
132
|
+
|
|
133
|
+
* The following workspace dependencies were updated
|
|
134
|
+
* dependencies
|
|
135
|
+
* @twin.org/standards-w3c-vcard bumped from 0.0.3-next.21 to 0.0.3-next.22
|
|
136
|
+
* @twin.org/standards-dublin-core bumped from 0.0.3-next.21 to 0.0.3-next.22
|
|
137
|
+
|
|
138
|
+
## [0.0.3-next.21](https://github.com/twinfoundation/standards/compare/standards-w3c-odrl-v0.0.3-next.20...standards-w3c-odrl-v0.0.3-next.21) (2026-01-23)
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
### Features
|
|
142
|
+
|
|
143
|
+
* remove unneeded redirect ([32f1b5a](https://github.com/twinfoundation/standards/commit/32f1b5a3479902673a3f7bd554bf6d963df7a462))
|
|
144
|
+
* update registrations ([dd3c92f](https://github.com/twinfoundation/standards/commit/dd3c92f52ff44679f61ff2a84b9fbc98bdc574d5))
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
### Dependencies
|
|
148
|
+
|
|
149
|
+
* The following workspace dependencies were updated
|
|
150
|
+
* dependencies
|
|
151
|
+
* @twin.org/standards-w3c-vcard bumped from 0.0.3-next.20 to 0.0.3-next.21
|
|
152
|
+
* @twin.org/standards-dublin-core bumped from 0.0.3-next.20 to 0.0.3-next.21
|
|
153
|
+
|
|
154
|
+
## [0.0.3-next.20](https://github.com/twinfoundation/standards/compare/standards-w3c-odrl-v0.0.3-next.19...standards-w3c-odrl-v0.0.3-next.20) (2026-01-21)
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
### Miscellaneous Chores
|
|
158
|
+
|
|
159
|
+
* **standards-w3c-odrl:** Synchronize repo versions
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
### Dependencies
|
|
163
|
+
|
|
164
|
+
* The following workspace dependencies were updated
|
|
165
|
+
* dependencies
|
|
166
|
+
* @twin.org/standards-w3c-vcard bumped from 0.0.3-next.19 to 0.0.3-next.20
|
|
167
|
+
* @twin.org/standards-dublin-core bumped from 0.0.3-next.19 to 0.0.3-next.20
|
|
168
|
+
|
|
169
|
+
## [0.0.3-next.19](https://github.com/twinfoundation/standards/compare/standards-w3c-odrl-v0.0.3-next.18...standards-w3c-odrl-v0.0.3-next.19) (2026-01-21)
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
### Miscellaneous Chores
|
|
173
|
+
|
|
174
|
+
* **standards-w3c-odrl:** Synchronize repo versions
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
### Dependencies
|
|
178
|
+
|
|
179
|
+
* The following workspace dependencies were updated
|
|
180
|
+
* dependencies
|
|
181
|
+
* @twin.org/standards-w3c-vcard bumped from 0.0.3-next.18 to 0.0.3-next.19
|
|
182
|
+
* @twin.org/standards-dublin-core bumped from 0.0.3-next.18 to 0.0.3-next.19
|
|
183
|
+
|
|
184
|
+
## [0.0.3-next.18](https://github.com/twinfoundation/standards/compare/standards-w3c-odrl-v0.0.3-next.17...standards-w3c-odrl-v0.0.3-next.18) (2026-01-21)
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
### Bug Fixes
|
|
188
|
+
|
|
189
|
+
* json-ld context for odrl ([78b694d](https://github.com/twinfoundation/standards/commit/78b694d922b1f3a5b57978c8d4586d22ff19970a))
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
### Dependencies
|
|
193
|
+
|
|
194
|
+
* The following workspace dependencies were updated
|
|
195
|
+
* dependencies
|
|
196
|
+
* @twin.org/standards-w3c-vcard bumped from 0.0.3-next.17 to 0.0.3-next.18
|
|
197
|
+
* @twin.org/standards-dublin-core bumped from 0.0.3-next.17 to 0.0.3-next.18
|
|
198
|
+
|
|
199
|
+
## [0.0.3-next.17](https://github.com/twinfoundation/standards/compare/standards-w3c-odrl-v0.0.3-next.16...standards-w3c-odrl-v0.0.3-next.17) (2026-01-21)
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
### Bug Fixes
|
|
203
|
+
|
|
204
|
+
* updating the missing packages ([#114](https://github.com/twinfoundation/standards/issues/114)) ([90b03f8](https://github.com/twinfoundation/standards/commit/90b03f8bdcd81506284d74a445840386c2da2d35))
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
### Dependencies
|
|
208
|
+
|
|
209
|
+
* The following workspace dependencies were updated
|
|
210
|
+
* dependencies
|
|
211
|
+
* @twin.org/standards-w3c-vcard bumped from 0.0.3-next.16 to 0.0.3-next.17
|
|
212
|
+
* @twin.org/standards-dublin-core bumped from 0.0.3-next.16 to 0.0.3-next.17
|
|
213
|
+
|
|
214
|
+
## [0.0.3-next.16](https://github.com/twinfoundation/standards/compare/standards-w3c-odrl-v0.0.3-next.15...standards-w3c-odrl-v0.0.3-next.16) (2026-01-19)
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
### Miscellaneous Chores
|
|
218
|
+
|
|
219
|
+
* **standards-w3c-odrl:** Synchronize repo versions
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
### Dependencies
|
|
223
|
+
|
|
224
|
+
* The following workspace dependencies were updated
|
|
225
|
+
* dependencies
|
|
226
|
+
* @twin.org/standards-w3c-vcard bumped from 0.0.3-next.15 to 0.0.3-next.16
|
|
227
|
+
* @twin.org/standards-dublin-core bumped from 0.0.3-next.15 to 0.0.3-next.16
|
|
228
|
+
|
|
229
|
+
## [0.0.3-next.15](https://github.com/twinfoundation/standards/compare/standards-w3c-odrl-v0.0.3-next.14...standards-w3c-odrl-v0.0.3-next.15) (2026-01-16)
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
### Miscellaneous Chores
|
|
233
|
+
|
|
234
|
+
* **standards-w3c-odrl:** Synchronize repo versions
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
### Dependencies
|
|
238
|
+
|
|
239
|
+
* The following workspace dependencies were updated
|
|
240
|
+
* dependencies
|
|
241
|
+
* @twin.org/standards-w3c-vcard bumped from 0.0.3-next.14 to 0.0.3-next.15
|
|
242
|
+
* @twin.org/standards-dublin-core bumped from 0.0.3-next.14 to 0.0.3-next.15
|
|
243
|
+
|
|
244
|
+
## [0.0.3-next.14](https://github.com/twinfoundation/standards/compare/standards-w3c-odrl-v0.0.3-next.13...standards-w3c-odrl-v0.0.3-next.14) (2026-01-15)
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
### Miscellaneous Chores
|
|
248
|
+
|
|
249
|
+
* **standards-w3c-odrl:** Synchronize repo versions
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
### Dependencies
|
|
253
|
+
|
|
254
|
+
* The following workspace dependencies were updated
|
|
255
|
+
* dependencies
|
|
256
|
+
* @twin.org/standards-w3c-vcard bumped from 0.0.3-next.13 to 0.0.3-next.14
|
|
257
|
+
* @twin.org/standards-dublin-core bumped from 0.0.3-next.13 to 0.0.3-next.14
|
|
258
|
+
|
|
259
|
+
## [0.0.3-next.13](https://github.com/twinfoundation/standards/compare/standards-w3c-odrl-v0.0.3-next.12...standards-w3c-odrl-v0.0.3-next.13) (2026-01-14)
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
### Miscellaneous Chores
|
|
263
|
+
|
|
264
|
+
* **standards-w3c-odrl:** Synchronize repo versions
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
### Dependencies
|
|
268
|
+
|
|
269
|
+
* The following workspace dependencies were updated
|
|
270
|
+
* dependencies
|
|
271
|
+
* @twin.org/standards-w3c-vcard bumped from 0.0.3-next.12 to 0.0.3-next.13
|
|
272
|
+
* @twin.org/standards-dublin-core bumped from 0.0.3-next.12 to 0.0.3-next.13
|
|
273
|
+
|
|
274
|
+
## [0.0.3-next.12](https://github.com/twinfoundation/standards/compare/standards-w3c-odrl-v0.0.3-next.11...standards-w3c-odrl-v0.0.3-next.12) (2026-01-14)
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
### Miscellaneous Chores
|
|
278
|
+
|
|
279
|
+
* **standards-w3c-odrl:** Synchronize repo versions
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
### Dependencies
|
|
283
|
+
|
|
284
|
+
* The following workspace dependencies were updated
|
|
285
|
+
* dependencies
|
|
286
|
+
* @twin.org/standards-w3c-vcard bumped from 0.0.3-next.11 to 0.0.3-next.12
|
|
287
|
+
* @twin.org/standards-dublin-core bumped from 0.0.3-next.11 to 0.0.3-next.12
|
|
288
|
+
|
|
289
|
+
## [0.0.3-next.11](https://github.com/twinfoundation/standards/compare/standards-w3c-odrl-v0.0.3-next.10...standards-w3c-odrl-v0.0.3-next.11) (2026-01-14)
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
### Features
|
|
293
|
+
|
|
294
|
+
* improved namespaces and contexts ([#102](https://github.com/twinfoundation/standards/issues/102)) ([c74c370](https://github.com/twinfoundation/standards/commit/c74c370cd8145d6166ca4454353f3774c302ac3b))
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
### Dependencies
|
|
298
|
+
|
|
299
|
+
* The following workspace dependencies were updated
|
|
300
|
+
* dependencies
|
|
301
|
+
* @twin.org/standards-w3c-vcard bumped from 0.0.3-next.10 to 0.0.3-next.11
|
|
302
|
+
* @twin.org/standards-dublin-core bumped from 0.0.3-next.10 to 0.0.3-next.11
|
|
303
|
+
|
|
304
|
+
## [0.0.3-next.10](https://github.com/twinfoundation/standards/compare/standards-w3c-odrl-v0.0.3-next.9...standards-w3c-odrl-v0.0.3-next.10) (2026-01-13)
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
### Features
|
|
308
|
+
|
|
309
|
+
* naming fixing and usage ([#98](https://github.com/twinfoundation/standards/issues/98)) ([9e95344](https://github.com/twinfoundation/standards/commit/9e953440963c9bc028399be9cbea25d92922bd01))
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
### Dependencies
|
|
313
|
+
|
|
314
|
+
* The following workspace dependencies were updated
|
|
315
|
+
* dependencies
|
|
316
|
+
* @twin.org/standards-w3c-vcard bumped from 0.0.3-next.9 to 0.0.3-next.10
|
|
317
|
+
* @twin.org/standards-dublin-core bumped from 0.0.3-next.9 to 0.0.3-next.10
|
|
318
|
+
|
|
319
|
+
## [0.0.3-next.9](https://github.com/twinfoundation/standards/compare/standards-w3c-odrl-v0.0.3-next.8...standards-w3c-odrl-v0.0.3-next.9) (2026-01-09)
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
### Miscellaneous Chores
|
|
323
|
+
|
|
324
|
+
* **standards-w3c-odrl:** Synchronize repo versions
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
### Dependencies
|
|
328
|
+
|
|
329
|
+
* The following workspace dependencies were updated
|
|
330
|
+
* dependencies
|
|
331
|
+
* @twin.org/standards-w3c-vcard bumped from 0.0.3-next.8 to 0.0.3-next.9
|
|
332
|
+
* @twin.org/standards-dublin-core bumped from 0.0.3-next.8 to 0.0.3-next.9
|
|
333
|
+
|
|
334
|
+
## [0.0.3-next.8](https://github.com/twinfoundation/standards/compare/standards-w3c-odrl-v0.0.3-next.7...standards-w3c-odrl-v0.0.3-next.8) (2026-01-08)
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
### Miscellaneous Chores
|
|
338
|
+
|
|
339
|
+
* **standards-w3c-odrl:** Synchronize repo versions
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
### Dependencies
|
|
343
|
+
|
|
344
|
+
* The following workspace dependencies were updated
|
|
345
|
+
* dependencies
|
|
346
|
+
* @twin.org/standards-w3c-vcard bumped from 0.0.3-next.7 to 0.0.3-next.8
|
|
347
|
+
* @twin.org/standards-dublin-core bumped from 0.0.3-next.7 to 0.0.3-next.8
|
|
348
|
+
|
|
349
|
+
## [0.0.3-next.7](https://github.com/twinfoundation/standards/compare/standards-w3c-odrl-v0.0.3-next.6...standards-w3c-odrl-v0.0.3-next.7) (2026-01-06)
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
### Bug Fixes
|
|
353
|
+
|
|
354
|
+
* odrl LD Context vs odrl namespace ([#83](https://github.com/twinfoundation/standards/issues/83)) ([d2c0c3c](https://github.com/twinfoundation/standards/commit/d2c0c3ca71b4a38f15d46070118fb4d6ac00fc02))
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
### Dependencies
|
|
358
|
+
|
|
359
|
+
* The following workspace dependencies were updated
|
|
360
|
+
* dependencies
|
|
361
|
+
* @twin.org/standards-w3c-vcard bumped from 0.0.3-next.6 to 0.0.3-next.7
|
|
362
|
+
* @twin.org/standards-dublin-core bumped from 0.0.3-next.6 to 0.0.3-next.7
|
|
363
|
+
|
|
364
|
+
## [0.0.3-next.6](https://github.com/twinfoundation/standards/compare/standards-w3c-odrl-v0.0.3-next.5...standards-w3c-odrl-v0.0.3-next.6) (2025-12-03)
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
### Miscellaneous Chores
|
|
368
|
+
|
|
369
|
+
* **standards-w3c-odrl:** Synchronize repo versions
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
### Dependencies
|
|
373
|
+
|
|
374
|
+
* The following workspace dependencies were updated
|
|
375
|
+
* dependencies
|
|
376
|
+
* @twin.org/standards-w3c-vcard bumped from 0.0.3-next.5 to 0.0.3-next.6
|
|
377
|
+
* @twin.org/standards-dublin-core bumped from 0.0.3-next.5 to 0.0.3-next.6
|
|
378
|
+
|
|
379
|
+
## [0.0.3-next.5](https://github.com/twinfoundation/standards/compare/standards-w3c-odrl-v0.0.3-next.4...standards-w3c-odrl-v0.0.3-next.5) (2025-11-28)
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
### Miscellaneous Chores
|
|
383
|
+
|
|
384
|
+
* **standards-w3c-odrl:** Synchronize repo versions
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
### Dependencies
|
|
388
|
+
|
|
389
|
+
* The following workspace dependencies were updated
|
|
390
|
+
* dependencies
|
|
391
|
+
* @twin.org/standards-w3c-vcard bumped from 0.0.3-next.4 to 0.0.3-next.5
|
|
392
|
+
* @twin.org/standards-dublin-core bumped from 0.0.3-next.4 to 0.0.3-next.5
|
|
393
|
+
|
|
394
|
+
## [0.0.3-next.4](https://github.com/twinfoundation/standards/compare/standards-w3c-odrl-v0.0.3-next.3...standards-w3c-odrl-v0.0.3-next.4) (2025-11-18)
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
### Miscellaneous Chores
|
|
398
|
+
|
|
399
|
+
* **standards-w3c-odrl:** Synchronize repo versions
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
### Dependencies
|
|
403
|
+
|
|
404
|
+
* The following workspace dependencies were updated
|
|
405
|
+
* dependencies
|
|
406
|
+
* @twin.org/standards-w3c-vcard bumped from 0.0.3-next.3 to 0.0.3-next.4
|
|
407
|
+
* @twin.org/standards-dublin-core bumped from 0.0.3-next.3 to 0.0.3-next.4
|
|
408
|
+
|
|
3
409
|
## [0.0.3-next.3](https://github.com/twinfoundation/standards/compare/standards-w3c-odrl-v0.0.3-next.2...standards-w3c-odrl-v0.0.3-next.3) (2025-11-18)
|
|
4
410
|
|
|
5
411
|
|
|
@@ -39,7 +39,7 @@ The operator of the constraint.
|
|
|
39
39
|
|
|
40
40
|
### rightOperand?
|
|
41
41
|
|
|
42
|
-
> `optional` **rightOperand**: `string` \| \{ `@value`: `string`; `@type?`: `string`; \} \| \{ `@id`: `string`; \}
|
|
42
|
+
> `optional` **rightOperand**: `ObjectOrArray`\<`string` \| \{ `@value`: `string`; `@type?`: `string`; \} \| \{ `@id`: `string`; \}\>
|
|
43
43
|
|
|
44
44
|
The right operand of the constraint.
|
|
45
45
|
value with optional
|
|
@@ -48,9 +48,10 @@ value with optional
|
|
|
48
48
|
|
|
49
49
|
### rightOperandReference?
|
|
50
50
|
|
|
51
|
-
> `optional` **rightOperandReference**: `string
|
|
51
|
+
> `optional` **rightOperandReference**: `ObjectOrArray`\<`string`\>
|
|
52
52
|
|
|
53
53
|
Reference to the right operand.
|
|
54
|
+
Can be used to reference external resources or policies using an IRI.
|
|
54
55
|
|
|
55
56
|
***
|
|
56
57
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Type Alias: OdrlContextType
|
|
2
2
|
|
|
3
|
-
> **OdrlContextType** = *typeof* [`
|
|
3
|
+
> **OdrlContextType** = *typeof* [`Context`](../variables/OdrlContexts.md#context) \| \[*typeof* [`Context`](../variables/OdrlContexts.md#context)\] \| \[`...IJsonLdContextDefinitionElement[]`, *typeof* [`Context`](../variables/OdrlContexts.md#context), `IJsonLdContextDefinitionElement`\] \| \[`IJsonLdContextDefinitionElement`, *typeof* [`Context`](../variables/OdrlContexts.md#context), `...IJsonLdContextDefinitionElement[]`\]
|
|
4
4
|
|
|
5
5
|
The ODRL JSON-LD context type.
|
|
@@ -6,14 +6,27 @@ The contexts for ODRL.
|
|
|
6
6
|
|
|
7
7
|
## Type Declaration
|
|
8
8
|
|
|
9
|
-
###
|
|
9
|
+
### Namespace
|
|
10
10
|
|
|
11
|
-
> `readonly` **
|
|
11
|
+
> `readonly` **Namespace**: `"http://www.w3.org/ns/odrl/2/"` = `"http://www.w3.org/ns/odrl/2/"`
|
|
12
12
|
|
|
13
|
-
The
|
|
13
|
+
The canonical RDF namespace URI.
|
|
14
14
|
|
|
15
|
-
###
|
|
15
|
+
### Context
|
|
16
16
|
|
|
17
|
-
> `readonly` **
|
|
17
|
+
> `readonly` **Context**: `"http://www.w3.org/ns/odrl.jsonld"` = `"http://www.w3.org/ns/odrl.jsonld"`
|
|
18
18
|
|
|
19
|
-
The
|
|
19
|
+
The value to use in @context.
|
|
20
|
+
Note: Context points to the JSON-LD url as per ODRL 2.2 specification.
|
|
21
|
+
|
|
22
|
+
### JsonLdContext
|
|
23
|
+
|
|
24
|
+
> `readonly` **JsonLdContext**: `"http://www.w3.org/ns/odrl.jsonld"` = `"http://www.w3.org/ns/odrl.jsonld"`
|
|
25
|
+
|
|
26
|
+
The JSON-LD Context URL.
|
|
27
|
+
|
|
28
|
+
### JsonSchemaNamespace
|
|
29
|
+
|
|
30
|
+
> `readonly` **JsonSchemaNamespace**: `"https://schema.twindev.org/w3c-odrl/"` = `"https://schema.twindev.org/w3c-odrl/"`
|
|
31
|
+
|
|
32
|
+
The namespace location of the hosted version of the JSON Schema.
|
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.30",
|
|
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.30",
|
|
21
|
+
"@twin.org/standards-w3c-vcard": "0.0.3-next.30",
|
|
22
22
|
"@twin.org/web": "next"
|
|
23
23
|
},
|
|
24
24
|
"main": "./dist/es/index.js",
|