@twin.org/standards-w3c-odrl 0.9.2 → 0.9.3-next.2
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 +14 -14
- package/dist/es/dataTypes/odrlDataTypes.js.map +1 -1
- package/dist/es/models/types/odrlTypes.js +41 -1
- package/dist/es/models/types/odrlTypes.js.map +1 -1
- package/dist/es/schemas/OdrlConflictStrategyType.json +20 -0
- package/dist/types/models/types/odrlTypes.d.ts +40 -0
- package/docs/changelog.md +74 -0
- package/docs/reference/variables/OdrlTypes.md +60 -0
- package/package.json +5 -5
- package/dist/es/schemas/OdrlTypes.json +0 -72
|
@@ -9,6 +9,7 @@ import OdrlActionTypeSchema from "../schemas/OdrlActionType.json" with { type: "
|
|
|
9
9
|
import OdrlAgreementSchema from "../schemas/OdrlAgreement.json" with { type: "json" };
|
|
10
10
|
import OdrlAssetSchema from "../schemas/OdrlAsset.json" with { type: "json" };
|
|
11
11
|
import OdrlAssetCollectionSchema from "../schemas/OdrlAssetCollection.json" with { type: "json" };
|
|
12
|
+
import OdrlConflictStrategyTypeSchema from "../schemas/OdrlConflictStrategyType.json" with { type: "json" };
|
|
12
13
|
import OdrlConstraintSchema from "../schemas/OdrlConstraint.json" with { type: "json" };
|
|
13
14
|
import ContextTypeSchema from "../schemas/OdrlContextType.json" with { type: "json" };
|
|
14
15
|
import OdrlDutySchema from "../schemas/OdrlDuty.json" with { type: "json" };
|
|
@@ -29,7 +30,6 @@ import OdrlRuleSchema from "../schemas/OdrlRule.json" with { type: "json" };
|
|
|
29
30
|
import OdrlRuleTypeSchema from "../schemas/OdrlRuleType.json" with { type: "json" };
|
|
30
31
|
import OdrlSetSchema from "../schemas/OdrlSet.json" with { type: "json" };
|
|
31
32
|
import OdrlStatusTypeSchema from "../schemas/OdrlStatusType.json" with { type: "json" };
|
|
32
|
-
import OdrlTypesSchema from "../schemas/OdrlTypes.json" with { type: "json" };
|
|
33
33
|
/**
|
|
34
34
|
* Handle all the data types for ODRL.
|
|
35
35
|
*/
|
|
@@ -110,44 +110,44 @@ export class OdrlDataTypes {
|
|
|
110
110
|
schema: OdrlRuleSchema
|
|
111
111
|
},
|
|
112
112
|
{
|
|
113
|
-
type:
|
|
113
|
+
type: OdrlTypes.ContextType,
|
|
114
114
|
schema: ContextTypeSchema
|
|
115
115
|
},
|
|
116
116
|
{
|
|
117
|
-
type:
|
|
117
|
+
type: OdrlTypes.ActionType,
|
|
118
118
|
schema: OdrlActionTypeSchema
|
|
119
119
|
},
|
|
120
120
|
{
|
|
121
|
-
type:
|
|
121
|
+
type: OdrlTypes.ConflictStrategyType,
|
|
122
|
+
schema: OdrlConflictStrategyTypeSchema
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
type: OdrlTypes.LeftOperandType,
|
|
122
126
|
schema: OdrlLeftOperandTypeSchema
|
|
123
127
|
},
|
|
124
128
|
{
|
|
125
|
-
type:
|
|
129
|
+
type: OdrlTypes.LogicalConstraintType,
|
|
126
130
|
schema: OdrlLogicalConstraintTypeSchema
|
|
127
131
|
},
|
|
128
132
|
{
|
|
129
|
-
type:
|
|
133
|
+
type: OdrlTypes.OperatorType,
|
|
130
134
|
schema: OdrlOperatorTypeSchema
|
|
131
135
|
},
|
|
132
136
|
{
|
|
133
|
-
type:
|
|
137
|
+
type: OdrlTypes.PolicyType,
|
|
134
138
|
schema: OdrlPolicyTypeSchema
|
|
135
139
|
},
|
|
136
140
|
{
|
|
137
|
-
type:
|
|
141
|
+
type: OdrlTypes.RightOperandType,
|
|
138
142
|
schema: OdrlRightOperandTypeSchema
|
|
139
143
|
},
|
|
140
144
|
{
|
|
141
|
-
type:
|
|
145
|
+
type: OdrlTypes.RuleType,
|
|
142
146
|
schema: OdrlRuleTypeSchema
|
|
143
147
|
},
|
|
144
148
|
{
|
|
145
|
-
type:
|
|
149
|
+
type: OdrlTypes.StatusType,
|
|
146
150
|
schema: OdrlStatusTypeSchema
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
type: "Types",
|
|
150
|
-
schema: OdrlTypesSchema
|
|
151
151
|
}
|
|
152
152
|
];
|
|
153
153
|
DataTypeHelper.registerTypes(OdrlContexts.Namespace, OdrlContexts.JsonLdContext, types);
|
|
@@ -1 +1 @@
|
|
|
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,oBAAoB,MAAM,gCAAgC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACxF,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,iBAAiB,MAAM,iCAAiC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACtF,OAAO,cAAc,MAAM,0BAA0B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC5E,OAAO,yBAAyB,MAAM,qCAAqC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAClG,OAAO,2BAA2B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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 OdrlActionTypeSchema from \"../schemas/OdrlActionType.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 ContextTypeSchema from \"../schemas/OdrlContextType.json\" with { type: \"json\" };\nimport OdrlDutySchema from \"../schemas/OdrlDuty.json\" with { type: \"json\" };\nimport OdrlLeftOperandTypeSchema from \"../schemas/OdrlLeftOperandType.json\" with { type: \"json\" };\nimport OdrlLogicalConstraintSchema from \"../schemas/OdrlLogicalConstraint.json\" with { type: \"json\" };\nimport OdrlLogicalConstraintOperandSchema from \"../schemas/OdrlLogicalConstraintOperand.json\" with { type: \"json\" };\nimport OdrlLogicalConstraintTypeSchema from \"../schemas/OdrlLogicalConstraintType.json\" with { type: \"json\" };\nimport OdrlOfferSchema from \"../schemas/OdrlOffer.json\" with { type: \"json\" };\nimport OdrlOperatorTypeSchema from \"../schemas/OdrlOperatorType.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 OdrlPolicyTypeSchema from \"../schemas/OdrlPolicyType.json\" with { type: \"json\" };\nimport OdrlProhibitionSchema from \"../schemas/OdrlProhibition.json\" with { type: \"json\" };\nimport OdrlRightOperandTypeSchema from \"../schemas/OdrlRightOperandType.json\" with { type: \"json\" };\nimport OdrlRuleSchema from \"../schemas/OdrlRule.json\" with { type: \"json\" };\nimport OdrlRuleTypeSchema from \"../schemas/OdrlRuleType.json\" with { type: \"json\" };\nimport OdrlSetSchema from \"../schemas/OdrlSet.json\" with { type: \"json\" };\nimport OdrlStatusTypeSchema from \"../schemas/OdrlStatusType.json\" with { type: \"json\" };\nimport OdrlTypesSchema from \"../schemas/OdrlTypes.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\t{\n\t\t\t\ttype: \"ContextType\",\n\t\t\t\tschema: ContextTypeSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: \"ActionType\",\n\t\t\t\tschema: OdrlActionTypeSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: \"LeftOperandType\",\n\t\t\t\tschema: OdrlLeftOperandTypeSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: \"LogicalConstraintType\",\n\t\t\t\tschema: OdrlLogicalConstraintTypeSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: \"OperatorType\",\n\t\t\t\tschema: OdrlOperatorTypeSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: \"PolicyType\",\n\t\t\t\tschema: OdrlPolicyTypeSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: \"RightOperandType\",\n\t\t\t\tschema: OdrlRightOperandTypeSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: \"RuleType\",\n\t\t\t\tschema: OdrlRuleTypeSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: \"StatusType\",\n\t\t\t\tschema: OdrlStatusTypeSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: \"Types\",\n\t\t\t\tschema: OdrlTypesSchema\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.map(t => ({ type: `Odrl${t.type}`, schema: t.schema }))\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,oBAAoB,MAAM,gCAAgC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACxF,OAAO,mBAAmB,MAAM,+BAA+B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACtF,OAAO,eAAe,MAAM,2BAA2B,CAAC,OAAO,IAAI,EAAE,MAAM,E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BAAgB;gBAChC,MAAM,EAAE,0BAA0B;aAClC;YACD;gBACC,IAAI,EAAE,SAAS,CAAC,QAAQ;gBACxB,MAAM,EAAE,kBAAkB;aAC1B;YACD;gBACC,IAAI,EAAE,SAAS,CAAC,UAAU;gBAC1B,MAAM,EAAE,oBAAoB;aAC5B;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,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAC7D,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 OdrlActionTypeSchema from \"../schemas/OdrlActionType.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 OdrlConflictStrategyTypeSchema from \"../schemas/OdrlConflictStrategyType.json\" with { type: \"json\" };\nimport OdrlConstraintSchema from \"../schemas/OdrlConstraint.json\" with { type: \"json\" };\nimport ContextTypeSchema from \"../schemas/OdrlContextType.json\" with { type: \"json\" };\nimport OdrlDutySchema from \"../schemas/OdrlDuty.json\" with { type: \"json\" };\nimport OdrlLeftOperandTypeSchema from \"../schemas/OdrlLeftOperandType.json\" with { type: \"json\" };\nimport OdrlLogicalConstraintSchema from \"../schemas/OdrlLogicalConstraint.json\" with { type: \"json\" };\nimport OdrlLogicalConstraintOperandSchema from \"../schemas/OdrlLogicalConstraintOperand.json\" with { type: \"json\" };\nimport OdrlLogicalConstraintTypeSchema from \"../schemas/OdrlLogicalConstraintType.json\" with { type: \"json\" };\nimport OdrlOfferSchema from \"../schemas/OdrlOffer.json\" with { type: \"json\" };\nimport OdrlOperatorTypeSchema from \"../schemas/OdrlOperatorType.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 OdrlPolicyTypeSchema from \"../schemas/OdrlPolicyType.json\" with { type: \"json\" };\nimport OdrlProhibitionSchema from \"../schemas/OdrlProhibition.json\" with { type: \"json\" };\nimport OdrlRightOperandTypeSchema from \"../schemas/OdrlRightOperandType.json\" with { type: \"json\" };\nimport OdrlRuleSchema from \"../schemas/OdrlRule.json\" with { type: \"json\" };\nimport OdrlRuleTypeSchema from \"../schemas/OdrlRuleType.json\" with { type: \"json\" };\nimport OdrlSetSchema from \"../schemas/OdrlSet.json\" with { type: \"json\" };\nimport OdrlStatusTypeSchema from \"../schemas/OdrlStatusType.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\t{\n\t\t\t\ttype: OdrlTypes.ContextType,\n\t\t\t\tschema: ContextTypeSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.ActionType,\n\t\t\t\tschema: OdrlActionTypeSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.ConflictStrategyType,\n\t\t\t\tschema: OdrlConflictStrategyTypeSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.LeftOperandType,\n\t\t\t\tschema: OdrlLeftOperandTypeSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.LogicalConstraintType,\n\t\t\t\tschema: OdrlLogicalConstraintTypeSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.OperatorType,\n\t\t\t\tschema: OdrlOperatorTypeSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.PolicyType,\n\t\t\t\tschema: OdrlPolicyTypeSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.RightOperandType,\n\t\t\t\tschema: OdrlRightOperandTypeSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.RuleType,\n\t\t\t\tschema: OdrlRuleTypeSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.StatusType,\n\t\t\t\tschema: OdrlStatusTypeSchema\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.map(t => ({ type: `Odrl${t.type}`, schema: t.schema }))\n\t\t);\n\t}\n}\n"]}
|
|
@@ -68,6 +68,46 @@ export const OdrlTypes = {
|
|
|
68
68
|
/**
|
|
69
69
|
* LogicalConstraintOperand type.
|
|
70
70
|
*/
|
|
71
|
-
LogicalConstraintOperand: "LogicalConstraintOperand"
|
|
71
|
+
LogicalConstraintOperand: "LogicalConstraintOperand",
|
|
72
|
+
/**
|
|
73
|
+
* ContextType type.
|
|
74
|
+
*/
|
|
75
|
+
ContextType: "ContextType",
|
|
76
|
+
/**
|
|
77
|
+
* ActionType type.
|
|
78
|
+
*/
|
|
79
|
+
ActionType: "ActionType",
|
|
80
|
+
/**
|
|
81
|
+
* ConflictStrategyType type.
|
|
82
|
+
*/
|
|
83
|
+
ConflictStrategyType: "ConflictStrategyType",
|
|
84
|
+
/**
|
|
85
|
+
* LeftOperandType type.
|
|
86
|
+
*/
|
|
87
|
+
LeftOperandType: "LeftOperandType",
|
|
88
|
+
/**
|
|
89
|
+
* LogicalConstraintType type.
|
|
90
|
+
*/
|
|
91
|
+
LogicalConstraintType: "LogicalConstraintType",
|
|
92
|
+
/**
|
|
93
|
+
* OperatorType type.
|
|
94
|
+
*/
|
|
95
|
+
OperatorType: "OperatorType",
|
|
96
|
+
/**
|
|
97
|
+
* PolicyType type.
|
|
98
|
+
*/
|
|
99
|
+
PolicyType: "PolicyType",
|
|
100
|
+
/**
|
|
101
|
+
* RightOperandType type.
|
|
102
|
+
*/
|
|
103
|
+
RightOperandType: "RightOperandType",
|
|
104
|
+
/**
|
|
105
|
+
* RuleType type.
|
|
106
|
+
*/
|
|
107
|
+
RuleType: "RuleType",
|
|
108
|
+
/**
|
|
109
|
+
* StatusType type.
|
|
110
|
+
*/
|
|
111
|
+
StatusType: "StatusType"
|
|
72
112
|
};
|
|
73
113
|
//# sourceMappingURL=odrlTypes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odrlTypes.js","sourceRoot":"","sources":["../../../../src/models/types/odrlTypes.ts"],"names":[],"mappings":"AAAA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,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;IAEpD;;OAEG;IACH,WAAW,EAAE,aAAa;IAE1B;;OAEG;IACH,UAAU,EAAE,YAAY;IAExB;;OAEG;IACH,oBAAoB,EAAE,sBAAsB;IAE5C;;OAEG;IACH,eAAe,EAAE,iBAAiB;IAElC;;OAEG;IACH,qBAAqB,EAAE,uBAAuB;IAE9C;;OAEG;IACH,YAAY,EAAE,cAAc;IAE5B;;OAEG;IACH,UAAU,EAAE,YAAY;IAExB;;OAEG;IACH,gBAAgB,EAAE,kBAAkB;IAEpC;;OAEG;IACH,QAAQ,EAAE,UAAU;IAEpB;;OAEG;IACH,UAAU,EAAE,YAAY;CACf,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\n\t/**\n\t * ContextType type.\n\t */\n\tContextType: \"ContextType\",\n\n\t/**\n\t * ActionType type.\n\t */\n\tActionType: \"ActionType\",\n\n\t/**\n\t * ConflictStrategyType type.\n\t */\n\tConflictStrategyType: \"ConflictStrategyType\",\n\n\t/**\n\t * LeftOperandType type.\n\t */\n\tLeftOperandType: \"LeftOperandType\",\n\n\t/**\n\t * LogicalConstraintType type.\n\t */\n\tLogicalConstraintType: \"LogicalConstraintType\",\n\n\t/**\n\t * OperatorType type.\n\t */\n\tOperatorType: \"OperatorType\",\n\n\t/**\n\t * PolicyType type.\n\t */\n\tPolicyType: \"PolicyType\",\n\n\t/**\n\t * RightOperandType type.\n\t */\n\tRightOperandType: \"RightOperandType\",\n\n\t/**\n\t * RuleType type.\n\t */\n\tRuleType: \"RuleType\",\n\n\t/**\n\t * StatusType type.\n\t */\n\tStatusType: \"StatusType\"\n} as const;\n\n/**\n * The types for ODRL.\n */\nexport type OdrlTypes = (typeof OdrlTypes)[keyof typeof OdrlTypes];\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.twindev.org/w3c-odrl/OdrlConflictStrategyType",
|
|
4
|
+
"title": "OdrlConflictStrategyType",
|
|
5
|
+
"description": "The types for ODRL Conflict Resolution Strategies.",
|
|
6
|
+
"anyOf": [
|
|
7
|
+
{
|
|
8
|
+
"const": "perm",
|
|
9
|
+
"description": "Permission type."
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"const": "prohibit",
|
|
13
|
+
"description": "Prohibition type."
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"const": "invalid",
|
|
17
|
+
"description": "Invalid type."
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
@@ -66,6 +66,46 @@ export declare const OdrlTypes: {
|
|
|
66
66
|
* LogicalConstraintOperand type.
|
|
67
67
|
*/
|
|
68
68
|
readonly LogicalConstraintOperand: "LogicalConstraintOperand";
|
|
69
|
+
/**
|
|
70
|
+
* ContextType type.
|
|
71
|
+
*/
|
|
72
|
+
readonly ContextType: "ContextType";
|
|
73
|
+
/**
|
|
74
|
+
* ActionType type.
|
|
75
|
+
*/
|
|
76
|
+
readonly ActionType: "ActionType";
|
|
77
|
+
/**
|
|
78
|
+
* ConflictStrategyType type.
|
|
79
|
+
*/
|
|
80
|
+
readonly ConflictStrategyType: "ConflictStrategyType";
|
|
81
|
+
/**
|
|
82
|
+
* LeftOperandType type.
|
|
83
|
+
*/
|
|
84
|
+
readonly LeftOperandType: "LeftOperandType";
|
|
85
|
+
/**
|
|
86
|
+
* LogicalConstraintType type.
|
|
87
|
+
*/
|
|
88
|
+
readonly LogicalConstraintType: "LogicalConstraintType";
|
|
89
|
+
/**
|
|
90
|
+
* OperatorType type.
|
|
91
|
+
*/
|
|
92
|
+
readonly OperatorType: "OperatorType";
|
|
93
|
+
/**
|
|
94
|
+
* PolicyType type.
|
|
95
|
+
*/
|
|
96
|
+
readonly PolicyType: "PolicyType";
|
|
97
|
+
/**
|
|
98
|
+
* RightOperandType type.
|
|
99
|
+
*/
|
|
100
|
+
readonly RightOperandType: "RightOperandType";
|
|
101
|
+
/**
|
|
102
|
+
* RuleType type.
|
|
103
|
+
*/
|
|
104
|
+
readonly RuleType: "RuleType";
|
|
105
|
+
/**
|
|
106
|
+
* StatusType type.
|
|
107
|
+
*/
|
|
108
|
+
readonly StatusType: "StatusType";
|
|
69
109
|
};
|
|
70
110
|
/**
|
|
71
111
|
* The types for ODRL.
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,79 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.9.3-next.2](https://github.com/iotaledger/twin-standards/compare/standards-w3c-odrl-v0.9.3-next.1...standards-w3c-odrl-v0.9.3-next.2) (2026-09-10)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* improve type definitions ([#278](https://github.com/iotaledger/twin-standards/issues/278)) ([bf3f37e](https://github.com/iotaledger/twin-standards/commit/bf3f37e1c191770f2a88b65bec3d59506c93c263))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* devDependencies
|
|
15
|
+
* @twin.org/standards-dublin-core bumped from 0.9.3-next.1 to 0.9.3-next.2
|
|
16
|
+
* @twin.org/standards-w3c-vcard bumped from 0.9.3-next.1 to 0.9.3-next.2
|
|
17
|
+
|
|
18
|
+
## [0.9.3-next.1](https://github.com/iotaledger/twin-standards/compare/standards-w3c-odrl-v0.9.3-next.0...standards-w3c-odrl-v0.9.3-next.1) (2026-08-25)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Features
|
|
22
|
+
|
|
23
|
+
* add context id features ([#64](https://github.com/iotaledger/twin-standards/issues/64)) ([e68bb87](https://github.com/iotaledger/twin-standards/commit/e68bb87a215f3c3956cfd6400a5e1e2a16256085))
|
|
24
|
+
* add missing schema generation ([3a7b858](https://github.com/iotaledger/twin-standards/commit/3a7b858229a928b3fd29e0aec488d85c5a0eef0a))
|
|
25
|
+
* add missing schema generation ([e4e6aa0](https://github.com/iotaledger/twin-standards/commit/e4e6aa09c6f711a264d6a99f750abf8e204fc07d))
|
|
26
|
+
* add validate-locales ([838389c](https://github.com/iotaledger/twin-standards/commit/838389c1daf62ed42397d5758d267c3d1a37fa4d))
|
|
27
|
+
* add w3c dcat standards package ([#68](https://github.com/iotaledger/twin-standards/issues/68)) ([85746c6](https://github.com/iotaledger/twin-standards/commit/85746c673464498a52e9c30ce498fd88b81a7434))
|
|
28
|
+
* align ODRL models with specification ([#142](https://github.com/iotaledger/twin-standards/issues/142)) ([e57088c](https://github.com/iotaledger/twin-standards/commit/e57088c6296d95cf5956f8e6d8104aa97a7e5fc1))
|
|
29
|
+
* eslint migration to flat config ([648c1a1](https://github.com/iotaledger/twin-standards/commit/648c1a1e69d99b6b0cf69358ec6bdeecdbe3a5ea))
|
|
30
|
+
* fixes in dataspace and odrl ([9924f91](https://github.com/iotaledger/twin-standards/commit/9924f9135cb6e227e1040065ab017b1c7ef8347a))
|
|
31
|
+
* improve caching ([#196](https://github.com/iotaledger/twin-standards/issues/196)) ([968e61a](https://github.com/iotaledger/twin-standards/commit/968e61a04156a22cf5ffc3ba237a42a81ec2e0c1))
|
|
32
|
+
* improve LD Context definition for ODRL ([#28](https://github.com/iotaledger/twin-standards/issues/28)) ([3362fb0](https://github.com/iotaledger/twin-standards/commit/3362fb0fe301bef56f4d67955f21e44b9119b8ef))
|
|
33
|
+
* improved namespaces and contexts ([#102](https://github.com/iotaledger/twin-standards/issues/102)) ([c74c370](https://github.com/iotaledger/twin-standards/commit/c74c370cd8145d6166ca4454353f3774c302ac3b))
|
|
34
|
+
* inline context types in schemas ([11f8377](https://github.com/iotaledger/twin-standards/commit/11f8377b129d459a4596ff30a86651beacd7f743))
|
|
35
|
+
* linting and dependency update ([25c96f7](https://github.com/iotaledger/twin-standards/commit/25c96f7994c363d42c913fe18185a36003686a25))
|
|
36
|
+
* naming fixing and usage ([#98](https://github.com/iotaledger/twin-standards/issues/98)) ([9e95344](https://github.com/iotaledger/twin-standards/commit/9e953440963c9bc028399be9cbea25d92922bd01))
|
|
37
|
+
* normalise type outputs ([0b3aed7](https://github.com/iotaledger/twin-standards/commit/0b3aed7df0802cd609423bbd7fda6bde601d3ceb))
|
|
38
|
+
* register schemas at hosted location ([#128](https://github.com/iotaledger/twin-standards/issues/128)) ([ab35298](https://github.com/iotaledger/twin-standards/commit/ab35298c812d69f043f69c35ab5aa1ac4a6aaa90))
|
|
39
|
+
* remove IJsonLdNodeObject base interfaces ([#172](https://github.com/iotaledger/twin-standards/issues/172)) ([8ff8d7a](https://github.com/iotaledger/twin-standards/commit/8ff8d7a2892d626879b76ba5da912469ff899954))
|
|
40
|
+
* remove ObjectOrArray usage ([61fd52d](https://github.com/iotaledger/twin-standards/commit/61fd52da035356bbe5bcc315367089405b4d1386))
|
|
41
|
+
* remove unneeded redirect ([32f1b5a](https://github.com/iotaledger/twin-standards/commit/32f1b5a3479902673a3f7bd554bf6d963df7a462))
|
|
42
|
+
* typescript 6 update ([79bfb52](https://github.com/iotaledger/twin-standards/commit/79bfb52e3dcb24689cec7b201dde822bcee970c5))
|
|
43
|
+
* update dependencies ([e422ed3](https://github.com/iotaledger/twin-standards/commit/e422ed351fb09e2deea5ef741326c37b0802af3a))
|
|
44
|
+
* update framework core ([58c0c3d](https://github.com/iotaledger/twin-standards/commit/58c0c3dd6cea0e4c2393dc0e3e1eb33a6d06f617))
|
|
45
|
+
* update JsonSchemaHelper.validate usage ([fe08315](https://github.com/iotaledger/twin-standards/commit/fe0831571cc618465a4510b52c3032a750e6e149))
|
|
46
|
+
* update ODRL actions and allow custom actions ([c517dad](https://github.com/iotaledger/twin-standards/commit/c517dad09d68f5dee9117c6cb142f75caad098c4))
|
|
47
|
+
* update ODRL data types and context definitions ([#31](https://github.com/iotaledger/twin-standards/issues/31)) ([ade0169](https://github.com/iotaledger/twin-standards/commit/ade0169d1049e7812bfc128ce5c16512548714fa))
|
|
48
|
+
* update registrations ([dd3c92f](https://github.com/iotaledger/twin-standards/commit/dd3c92f52ff44679f61ff2a84b9fbc98bdc574d5))
|
|
49
|
+
* update schemas ([c3c11e0](https://github.com/iotaledger/twin-standards/commit/c3c11e07da6c0d3eac5ea4a68e3ad57f022b2351))
|
|
50
|
+
* update schemas to support additional properties ([4679e21](https://github.com/iotaledger/twin-standards/commit/4679e21728a54cb587f120874841c3d1ed3771de))
|
|
51
|
+
* update schemas with new enum format ([4851603](https://github.com/iotaledger/twin-standards/commit/4851603f26910fafd7fe22b46533814dba3b041c))
|
|
52
|
+
* update to latest JSON schema spec ([7a23930](https://github.com/iotaledger/twin-standards/commit/7a2393032d7f48bfb20d3a484f981fb6dd83a92c))
|
|
53
|
+
* update to new ts-ts-schema and generic constructs ([4dff991](https://github.com/iotaledger/twin-standards/commit/4dff991fb70de4320668641ed94abf8e9b06acad))
|
|
54
|
+
* update ts-to-schema generation ([0905daa](https://github.com/iotaledger/twin-standards/commit/0905daa4a344ed35fc37b7f12fcf9ce9d34e4bd6))
|
|
55
|
+
* use shared store mechanism ([#11](https://github.com/iotaledger/twin-standards/issues/11)) ([96fa237](https://github.com/iotaledger/twin-standards/commit/96fa23735f69c1fc7e3d0019b527634fa0a042d9))
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
### Bug Fixes
|
|
59
|
+
|
|
60
|
+
* incorrect base url for JSON-LD references in ODRL ([f66db7e](https://github.com/iotaledger/twin-standards/commit/f66db7ee8f3deaae96fe64bc67e3c93b593e9b8c))
|
|
61
|
+
* json-ld context for odrl ([78b694d](https://github.com/iotaledger/twin-standards/commit/78b694d922b1f3a5b57978c8d4586d22ff19970a))
|
|
62
|
+
* make IOdrlAssetCollection.source optional per W3C ODRL spec ([#261](https://github.com/iotaledger/twin-standards/issues/261)) ([bf26e61](https://github.com/iotaledger/twin-standards/commit/bf26e6107d7a37168debfbe8eb7f5833a53f80bc))
|
|
63
|
+
* make IOdrlPartyCollection.source optional to match supported usage ([#256](https://github.com/iotaledger/twin-standards/issues/256)) ([866111b](https://github.com/iotaledger/twin-standards/commit/866111b6870533b414a83ef2b285ab81a9447065))
|
|
64
|
+
* odrl constraint right operand as array ([91c5bf6](https://github.com/iotaledger/twin-standards/commit/91c5bf6f12f5e2f57d22352b17a50cdf249059e3))
|
|
65
|
+
* odrl LD Context vs odrl namespace ([#83](https://github.com/iotaledger/twin-standards/issues/83)) ([d2c0c3c](https://github.com/iotaledger/twin-standards/commit/d2c0c3ca71b4a38f15d46070118fb4d6ac00fc02))
|
|
66
|
+
* updating the missing packages ([#114](https://github.com/iotaledger/twin-standards/issues/114)) ([90b03f8](https://github.com/iotaledger/twin-standards/commit/90b03f8bdcd81506284d74a445840386c2da2d35))
|
|
67
|
+
* use async getStore in tests ([c5f4d53](https://github.com/iotaledger/twin-standards/commit/c5f4d533d5c9726e0cff6711fe22edbf0fc4d746))
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
### Dependencies
|
|
71
|
+
|
|
72
|
+
* The following workspace dependencies were updated
|
|
73
|
+
* devDependencies
|
|
74
|
+
* @twin.org/standards-dublin-core bumped from 0.9.3-next.0 to 0.9.3-next.1
|
|
75
|
+
* @twin.org/standards-w3c-vcard bumped from 0.9.3-next.0 to 0.9.3-next.1
|
|
76
|
+
|
|
3
77
|
## [0.9.2](https://github.com/iotaledger/twin-standards/compare/standards-w3c-odrl-v0.9.2...standards-w3c-odrl-v0.9.2) (2026-08-24)
|
|
4
78
|
|
|
5
79
|
|
|
@@ -101,3 +101,63 @@ LogicalConstraint type.
|
|
|
101
101
|
> `readonly` **LogicalConstraintOperand**: `"LogicalConstraintOperand"` = `"LogicalConstraintOperand"`
|
|
102
102
|
|
|
103
103
|
LogicalConstraintOperand type.
|
|
104
|
+
|
|
105
|
+
### ContextType {#contexttype}
|
|
106
|
+
|
|
107
|
+
> `readonly` **ContextType**: `"ContextType"` = `"ContextType"`
|
|
108
|
+
|
|
109
|
+
ContextType type.
|
|
110
|
+
|
|
111
|
+
### ActionType {#actiontype}
|
|
112
|
+
|
|
113
|
+
> `readonly` **ActionType**: `"ActionType"` = `"ActionType"`
|
|
114
|
+
|
|
115
|
+
ActionType type.
|
|
116
|
+
|
|
117
|
+
### ConflictStrategyType {#conflictstrategytype}
|
|
118
|
+
|
|
119
|
+
> `readonly` **ConflictStrategyType**: `"ConflictStrategyType"` = `"ConflictStrategyType"`
|
|
120
|
+
|
|
121
|
+
ConflictStrategyType type.
|
|
122
|
+
|
|
123
|
+
### LeftOperandType {#leftoperandtype}
|
|
124
|
+
|
|
125
|
+
> `readonly` **LeftOperandType**: `"LeftOperandType"` = `"LeftOperandType"`
|
|
126
|
+
|
|
127
|
+
LeftOperandType type.
|
|
128
|
+
|
|
129
|
+
### LogicalConstraintType {#logicalconstrainttype}
|
|
130
|
+
|
|
131
|
+
> `readonly` **LogicalConstraintType**: `"LogicalConstraintType"` = `"LogicalConstraintType"`
|
|
132
|
+
|
|
133
|
+
LogicalConstraintType type.
|
|
134
|
+
|
|
135
|
+
### OperatorType {#operatortype}
|
|
136
|
+
|
|
137
|
+
> `readonly` **OperatorType**: `"OperatorType"` = `"OperatorType"`
|
|
138
|
+
|
|
139
|
+
OperatorType type.
|
|
140
|
+
|
|
141
|
+
### PolicyType {#policytype}
|
|
142
|
+
|
|
143
|
+
> `readonly` **PolicyType**: `"PolicyType"` = `"PolicyType"`
|
|
144
|
+
|
|
145
|
+
PolicyType type.
|
|
146
|
+
|
|
147
|
+
### RightOperandType {#rightoperandtype}
|
|
148
|
+
|
|
149
|
+
> `readonly` **RightOperandType**: `"RightOperandType"` = `"RightOperandType"`
|
|
150
|
+
|
|
151
|
+
RightOperandType type.
|
|
152
|
+
|
|
153
|
+
### RuleType {#ruletype}
|
|
154
|
+
|
|
155
|
+
> `readonly` **RuleType**: `"RuleType"` = `"RuleType"`
|
|
156
|
+
|
|
157
|
+
RuleType type.
|
|
158
|
+
|
|
159
|
+
### StatusType {#statustype}
|
|
160
|
+
|
|
161
|
+
> `readonly` **StatusType**: `"StatusType"` = `"StatusType"`
|
|
162
|
+
|
|
163
|
+
StatusType type.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/standards-w3c-odrl",
|
|
3
|
-
"version": "0.9.2",
|
|
3
|
+
"version": "0.9.3-next.2",
|
|
4
4
|
"description": "Data models for the W3C ODRL information model.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
"node": ">=24.0.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@twin.org/core": "
|
|
18
|
-
"@twin.org/data-core": "
|
|
19
|
-
"@twin.org/data-json-ld": "
|
|
20
|
-
"@twin.org/web": "
|
|
17
|
+
"@twin.org/core": "next",
|
|
18
|
+
"@twin.org/data-core": "next",
|
|
19
|
+
"@twin.org/data-json-ld": "next",
|
|
20
|
+
"@twin.org/web": "next"
|
|
21
21
|
},
|
|
22
22
|
"main": "./dist/es/index.js",
|
|
23
23
|
"types": "./dist/types/index.d.ts",
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://schema.twindev.org/w3c-odrl/OdrlTypes",
|
|
4
|
-
"title": "OdrlTypes",
|
|
5
|
-
"description": "The types for ODRL.",
|
|
6
|
-
"anyOf": [
|
|
7
|
-
{
|
|
8
|
-
"const": "Policy",
|
|
9
|
-
"description": "Policy type."
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"const": "Set",
|
|
13
|
-
"description": "Set type (subclass of Policy)."
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"const": "Offer",
|
|
17
|
-
"description": "Offer type (subclass of Policy)."
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"const": "Agreement",
|
|
21
|
-
"description": "Agreement type (subclass of Policy)."
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"const": "Asset",
|
|
25
|
-
"description": "Asset type."
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"const": "AssetCollection",
|
|
29
|
-
"description": "AssetCollection type."
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"const": "Party",
|
|
33
|
-
"description": "Party type."
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"const": "PartyCollection",
|
|
37
|
-
"description": "PartyCollection type."
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"const": "Action",
|
|
41
|
-
"description": "Action type."
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"const": "Rule",
|
|
45
|
-
"description": "Rule type."
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
"const": "Permission",
|
|
49
|
-
"description": "Permission type (subclass of Rule)."
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
"const": "Prohibition",
|
|
53
|
-
"description": "Prohibition type (subclass of Rule)."
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
"const": "Duty",
|
|
57
|
-
"description": "Duty type (subclass of Rule)."
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
"const": "Constraint",
|
|
61
|
-
"description": "Constraint type."
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"const": "LogicalConstraint",
|
|
65
|
-
"description": "LogicalConstraint type."
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
"const": "LogicalConstraintOperand",
|
|
69
|
-
"description": "LogicalConstraintOperand type."
|
|
70
|
-
}
|
|
71
|
-
]
|
|
72
|
-
}
|