@twin.org/standards-w3c-odrl 0.9.3-next.1 → 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 +15 -0
- package/docs/reference/variables/OdrlTypes.md +60 -0
- package/package.json +1 -1
- 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,2B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C7D,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,MA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AC,gBAAgB;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":"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IAAI,EAAE,MAAM;IAEZ;;OAEG;IACH,UAAU,EAAE,YAAY;IAExB;;OAEG;IACH,WAAW,EAAE,aAAa;IAE1B;;OAEG;IACH,IAAI,EAAE,MAAM;IAEZ;;OAEG;IACH,UAAU,EAAE,YAAY;IAExB;;OAEG;IACH,iBAAiB,EAAE,mBAAmB;IAEtC;;OAEG;IACH,wBAAwB,EAAE,0BAA0B;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,20 @@
|
|
|
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
|
+
|
|
3
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)
|
|
4
19
|
|
|
5
20
|
|
|
@@ -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,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
|
-
}
|