@twin.org/standards-w3c-odrl 0.0.2-next.9 → 0.0.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 +113 -0
- package/dist/es/dataTypes/odrlDataTypes.js.map +1 -0
- package/dist/es/index.js +31 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/models/IOdrlAction.js +2 -0
- package/dist/es/models/IOdrlAction.js.map +1 -0
- package/dist/es/models/IOdrlAgreement.js +2 -0
- package/dist/es/models/IOdrlAgreement.js.map +1 -0
- package/dist/es/models/IOdrlAsset.js +2 -0
- package/dist/es/models/IOdrlAsset.js.map +1 -0
- package/dist/es/models/IOdrlAssetCollection.js +2 -0
- package/dist/es/models/IOdrlAssetCollection.js.map +1 -0
- package/dist/es/models/IOdrlConstraint.js +2 -0
- package/dist/es/models/IOdrlConstraint.js.map +1 -0
- package/dist/es/models/IOdrlDuty.js +2 -0
- package/dist/es/models/IOdrlDuty.js.map +1 -0
- package/dist/es/models/IOdrlLogicalConstraint.js +2 -0
- package/dist/es/models/IOdrlLogicalConstraint.js.map +1 -0
- package/dist/es/models/IOdrlOffer.js +2 -0
- package/dist/es/models/IOdrlOffer.js.map +1 -0
- package/dist/es/models/IOdrlParty.js +2 -0
- package/dist/es/models/IOdrlParty.js.map +1 -0
- package/dist/es/models/IOdrlPartyCollection.js +2 -0
- package/dist/es/models/IOdrlPartyCollection.js.map +1 -0
- package/dist/es/models/IOdrlPermission.js +2 -0
- package/dist/es/models/IOdrlPermission.js.map +1 -0
- package/dist/es/models/IOdrlPolicy.js +2 -0
- package/dist/es/models/IOdrlPolicy.js.map +1 -0
- package/dist/es/models/IOdrlProhibition.js +2 -0
- package/dist/es/models/IOdrlProhibition.js.map +1 -0
- package/dist/es/models/IOdrlRule.js +2 -0
- package/dist/es/models/IOdrlRule.js.map +1 -0
- package/dist/es/models/IOdrlSet.js +2 -0
- package/dist/es/models/IOdrlSet.js.map +1 -0
- package/dist/es/models/odrlContextType.js +2 -0
- package/dist/es/models/odrlContextType.js.map +1 -0
- package/dist/es/models/odrlContexts.js +17 -0
- package/dist/es/models/odrlContexts.js.map +1 -0
- package/dist/es/models/types/actionType.js +237 -0
- package/dist/es/models/types/actionType.js.map +1 -0
- package/dist/es/models/types/conflictStrategyType.js +21 -0
- package/dist/es/models/types/conflictStrategyType.js.map +1 -0
- package/dist/es/models/types/leftOperandType.js +137 -0
- package/dist/es/models/types/leftOperandType.js.map +1 -0
- package/dist/es/models/types/logicalConstraintType.js +25 -0
- package/dist/es/models/types/logicalConstraintType.js.map +1 -0
- package/dist/es/models/types/odrlTypes.js +69 -0
- package/dist/es/models/types/odrlTypes.js.map +1 -0
- package/dist/es/models/types/operatorType.js +65 -0
- package/dist/es/models/types/operatorType.js.map +1 -0
- package/dist/es/models/types/policyType.js +25 -0
- package/dist/es/models/types/policyType.js.map +1 -0
- package/dist/es/models/types/rightOperandType.js +14 -0
- package/dist/es/models/types/rightOperandType.js.map +1 -0
- package/dist/es/models/types/ruleType.js +21 -0
- package/dist/es/models/types/ruleType.js.map +1 -0
- package/dist/es/models/types/statusType.js +25 -0
- package/dist/es/models/types/statusType.js.map +1 -0
- package/dist/es/schemas/OdrlAction.json +153 -0
- package/dist/es/schemas/OdrlAgreement.json +270 -0
- package/dist/es/schemas/OdrlAsset.json +110 -0
- package/dist/es/schemas/OdrlAssetCollection.json +124 -0
- package/dist/es/schemas/OdrlConstraint.json +174 -0
- package/dist/es/schemas/OdrlDuty.json +217 -0
- package/dist/es/schemas/OdrlLogicalConstraint.json +204 -0
- package/dist/es/schemas/OdrlOffer.json +269 -0
- package/dist/es/schemas/OdrlParty.json +124 -0
- package/dist/es/schemas/OdrlPartyCollection.json +138 -0
- package/dist/es/schemas/OdrlPermission.json +198 -0
- package/dist/es/schemas/OdrlPolicy.json +267 -0
- package/dist/es/schemas/OdrlProhibition.json +198 -0
- package/dist/es/schemas/OdrlRule.json +191 -0
- package/dist/es/schemas/OdrlSet.json +268 -0
- package/dist/types/index.d.ts +28 -28
- package/dist/types/models/IOdrlAction.d.ts +3 -3
- package/dist/types/models/IOdrlAgreement.d.ts +3 -3
- package/dist/types/models/IOdrlAsset.d.ts +1 -1
- package/dist/types/models/IOdrlAssetCollection.d.ts +2 -2
- package/dist/types/models/IOdrlConstraint.d.ts +3 -3
- package/dist/types/models/IOdrlDuty.d.ts +1 -1
- package/dist/types/models/IOdrlOffer.d.ts +3 -3
- package/dist/types/models/IOdrlParty.d.ts +1 -1
- package/dist/types/models/IOdrlPartyCollection.d.ts +2 -2
- package/dist/types/models/IOdrlPermission.d.ts +2 -2
- package/dist/types/models/IOdrlPolicy.d.ts +10 -10
- package/dist/types/models/IOdrlProhibition.d.ts +2 -2
- package/dist/types/models/IOdrlRule.d.ts +5 -5
- package/dist/types/models/IOdrlSet.d.ts +2 -2
- package/dist/types/models/odrlContextType.d.ts +1 -1
- package/dist/types/models/types/odrlTypes.d.ts +0 -4
- package/docs/changelog.md +151 -0
- package/docs/reference/interfaces/IOdrlAction.md +1 -1
- package/docs/reference/interfaces/IOdrlAgreement.md +1 -1
- package/docs/reference/interfaces/IOdrlAsset.md +1 -1
- package/docs/reference/interfaces/IOdrlAssetCollection.md +1 -1
- package/docs/reference/interfaces/IOdrlConstraint.md +1 -1
- package/docs/reference/interfaces/IOdrlDuty.md +1 -1
- package/docs/reference/interfaces/IOdrlLogicalConstraint.md +1 -1
- package/docs/reference/interfaces/IOdrlOffer.md +1 -1
- package/docs/reference/interfaces/IOdrlParty.md +1 -1
- package/docs/reference/interfaces/IOdrlPartyCollection.md +1 -1
- package/docs/reference/interfaces/IOdrlPermission.md +1 -1
- package/docs/reference/interfaces/IOdrlPolicy.md +1 -1
- package/docs/reference/interfaces/IOdrlProhibition.md +1 -1
- package/docs/reference/interfaces/IOdrlRule.md +1 -1
- package/docs/reference/interfaces/IOdrlSet.md +1 -1
- package/docs/reference/variables/OdrlTypes.md +0 -6
- package/package.json +22 -10
- package/dist/cjs/index.cjs +0 -4008
- package/dist/esm/index.mjs +0 -3995
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actionType.js","sourceRoot":"","sources":["../../../../src/models/types/actionType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;;GAGG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,UAAU,GAAG;IACzB,eAAe;IAEf;;;OAGG;IACH,GAAG,EAAE,KAAK;IAEV;;OAEG;IACH,QAAQ,EAAE,UAAU;IAEpB,uBAAuB;IAEvB;;OAEG;IACH,SAAS,EAAE,WAAW;IAEtB;;OAEG;IACH,QAAQ,EAAE,UAAU;IAEpB;;OAEG;IACH,SAAS,EAAE,WAAW;IAEtB;;OAEG;IACH,OAAO,EAAE,SAAS;IAElB;;OAEG;IACH,aAAa,EAAE,eAAe;IAE9B;;OAEG;IACH,aAAa,EAAE,eAAe;IAE9B;;OAEG;IACH,IAAI,EAAE,MAAM;IAEZ;;OAEG;IACH,MAAM,EAAE,QAAQ;IAEhB;;OAEG;IACH,QAAQ,EAAE,UAAU;IAEpB;;;OAGG;IACH,OAAO,EAAE,SAAS;IAElB;;OAEG;IACH,UAAU,EAAE,YAAY;IAExB;;OAEG;IACH,OAAO,EAAE,SAAS;IAElB;;OAEG;IACH,OAAO,EAAE,SAAS;IAElB;;OAEG;IACH,WAAW,EAAE,aAAa;IAE1B;;OAEG;IACH,WAAW,EAAE,aAAa;IAE1B;;OAEG;IACH,WAAW,EAAE,aAAa;IAE1B;;OAEG;IACH,KAAK,EAAE,OAAO;IAEd;;OAEG;IACH,OAAO,EAAE,SAAS;IAElB;;OAEG;IACH,OAAO,EAAE,SAAS;IAElB;;OAEG;IACH,KAAK,EAAE,OAAO;IAEd;;OAEG;IACH,IAAI,EAAE,MAAM;IAEZ;;OAEG;IACH,MAAM,EAAE,QAAQ;IAEhB;;OAEG;IACH,IAAI,EAAE,MAAM;IAEZ;;OAEG;IACH,IAAI,EAAE,MAAM;IAEZ;;OAEG;IACH,OAAO,EAAE,SAAS;IAElB;;OAEG;IACH,KAAK,EAAE,OAAO;IAEd;;OAEG;IACH,IAAI,EAAE,MAAM;IAEZ;;OAEG;IACH,YAAY,EAAE,cAAc;IAE5B;;OAEG;IACH,KAAK,EAAE,OAAO;IAEd;;OAEG;IACH,UAAU,EAAE,YAAY;IAExB;;OAEG;IACH,UAAU,EAAE,YAAY;IAExB;;OAEG;IACH,YAAY,EAAE,cAAc;IAE5B;;OAEG;IACH,SAAS,EAAE,WAAW;IAEtB;;OAEG;IACH,SAAS,EAAE,WAAW;IAEtB;;OAEG;IACH,SAAS,EAAE,WAAW;IAEtB;;OAEG;IACH,SAAS,EAAE,WAAW;IAEtB;;OAEG;IACH,KAAK,EAAE,OAAO;IAEd;;;OAGG;IACH,MAAM,EAAE,QAAQ;IAEhB,4BAA4B;IAE5B;;OAEG;IACH,IAAI,EAAE,MAAM;IAEZ;;OAEG;IACH,IAAI,EAAE,MAAM;IAEZ,mCAAmC;IAEnC;;OAEG;IACH,cAAc,EAAE,gBAAgB;IAEhC;;OAEG;IACH,YAAY,EAAE,cAAc;IAE5B;;OAEG;IACH,YAAY,EAAE,cAAc;IAE5B;;OAEG;IACH,SAAS,EAAE,WAAW;IAEtB;;OAEG;IACH,UAAU,EAAE,YAAY;IAExB;;OAEG;IACH,MAAM,EAAE,QAAQ;IAEhB;;OAEG;IACH,iBAAiB,EAAE,mBAAmB;IAEtC;;OAEG;IACH,OAAO,EAAE,SAAS;IAElB;;OAEG;IACH,MAAM,EAAE,QAAQ;IAEhB;;OAEG;IACH,UAAU,EAAE,YAAY;IAExB;;OAEG;IACH,aAAa,EAAE,eAAe;IAE9B;;OAEG;IACH,GAAG,EAAE,KAAK;IAEV;;OAEG;IACH,YAAY,EAAE,cAAc;CACnB,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The types for ODRL Actions.\n * Simple action types (for direct string usage)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const ActionType = {\n\t// Core actions\n\n\t/**\n\t * The act of using an asset, covering any general usage where ownership does not change.\n\t * This is the parent term for most permissions and prohibitions.\n\t */\n\tUse: \"use\",\n\n\t/**\n\t * The act of transferring the ownership of an asset in perpetuity to a third party.\n\t */\n\tTransfer: \"transfer\",\n\n\t// Sub-actions of 'use'\n\n\t/**\n\t * The act of using an asset (or parts of it) as part of a composite collection.\n\t */\n\tAggregate: \"aggregate\",\n\n\t/**\n\t * The act of adding explanatory notations/commentaries to the asset.\n\t */\n\tAnnotate: \"annotate\",\n\n\t/**\n\t * The act of anonymising all or parts of the asset, for example, to remove identifying particulars.\n\t */\n\tAnonymize: \"anonymize\",\n\n\t/**\n\t * The act of persistently storing the asset in a non-transient form.\n\t */\n\tArchive: \"archive\",\n\n\t/**\n\t * The act of multiple concurrent use of the asset.\n\t */\n\tConcurrentUse: \"concurrentUse\",\n\n\t/**\n\t * The act of using the asset in a business environment where it may be traded for profit.\n\t */\n\tCommercialize: \"commercialize\",\n\n\t/**\n\t * The act of making an exact reproduction of the asset. Also identified as `reproduce`.\n\t */\n\tCopy: \"copy\",\n\n\t/**\n\t * The act of creating a new derivative asset from the original and editing or modifying it.\n\t */\n\tDerive: \"derive\",\n\n\t/**\n\t * The act of producing a digital copy of an asset from its analogue form.\n\t */\n\tDigitize: \"digitize\",\n\n\t/**\n\t * The act of making a transient visible rendering of the asset, such as displaying an image on a screen.\n\t * Also identified as `present` in earlier versions.\n\t */\n\tDisplay: \"display\",\n\n\t/**\n\t * The act of publicly distributing, displaying, or performing the asset.\n\t */\n\tDistribute: \"distribute\",\n\n\t/**\n\t * The act of executing the asset, such as running a program or application.\n\t */\n\tExecute: \"execute\",\n\n\t/**\n\t * The act of extracting (replicating) unchanged parts of the asset for reuse.\n\t */\n\tExtract: \"extract\",\n\n\t/**\n\t * The act of extracting unchanged character(s) from the asset.\n\t */\n\tExtractChar: \"extractChar\",\n\n\t/**\n\t * The act of extracting unchanged word(s) from the asset.\n\t */\n\tExtractWord: \"extractWord\",\n\n\t/**\n\t * The act of extracting unchanged page(s) from the asset.\n\t */\n\tExtractPage: \"extractPage\",\n\n\t/**\n\t * The act of recording the asset in an index, for example, a search engine database.\n\t */\n\tIndex: \"index\",\n\n\t/**\n\t * The act of loading the asset onto a storage device ready for operation.\n\t */\n\tInstall: \"install\",\n\n\t/**\n\t * The act of granting the use of the asset to third parties. Also identified as `sublicense` in earlier versions.\n\t */\n\tLicense: \"license\",\n\n\t/**\n\t * The act of making the asset available to a third-party for a fixed period with exchange of value.\n\t */\n\tLease: \"lease\",\n\n\t/**\n\t * The act of making the asset available to a third-party for a fixed period without exchange of value.\n\t */\n\tLend: \"lend\",\n\n\t/**\n\t * The act of updating existing content of the asset without creating a new one.\n\t */\n\tModify: \"modify\",\n\n\t/**\n\t * The act of moving the asset from one digital location to another and deleting the original.\n\t */\n\tMove: \"move\",\n\n\t/**\n\t * The act of rendering the asset into audio and/or video form.\n\t */\n\tPlay: \"play\",\n\n\t/**\n\t * The act of providing a short preview of the asset.\n\t */\n\tPreview: \"preview\",\n\n\t/**\n\t * The act of rendering the asset onto paper or hard copy form.\n\t */\n\tPrint: \"print\",\n\n\t/**\n\t * The act of obtaining data from the asset, such as a database record.\n\t */\n\tRead: \"read\",\n\n\t/**\n\t * The act of using the asset for a purpose other than its intended purpose.\n\t */\n\tSecondaryUse: \"secondaryUse\",\n\n\t/**\n\t * The act of non-commercial reproduction and distribution of the asset to third-parties.\n\t */\n\tShare: \"share\",\n\n\t/**\n\t * The act of sharing the asset to parties in close proximity to the owner.\n\t */\n\tAdhocShare: \"adhocShare\",\n\n\t/**\n\t * The act of distributing any derivative asset under the same terms as the original.\n\t */\n\tShareAlike: \"shareAlike\",\n\n\t/**\n\t * The act of a system reading the text of the asset out loud.\n\t */\n\tTextToSpeech: \"textToSpeech\",\n\n\t/**\n\t * The act of translating the asset's original language into another, creating a new derivative asset.\n\t */\n\tTranslate: \"translate\",\n\n\t/**\n\t * The act of transforming the asset into a different digital format.\n\t */\n\tTransform: \"transform\",\n\n\t/**\n\t * The act of unloading the asset from a storage device, making it no longer accessible.\n\t */\n\tUninstall: \"uninstall\",\n\n\t/**\n\t * The act of applying a watermark to the asset.\n\t */\n\tWatermark: \"watermark\",\n\n\t/**\n\t * The act of writing to or modifying the asset.\n\t */\n\tWrite: \"write\",\n\n\t/**\n\t * The act of adding to the end of an asset, for example, a database record.\n\t * Also identified as `appendTo`.\n\t */\n\tAppend: \"append\",\n\n\t// Sub-actions of 'transfer'\n\n\t/**\n\t * The act of giving away the asset in perpetuity without exchange of value, requiring the original to be deleted.\n\t */\n\tGive: \"give\",\n\n\t/**\n\t * The act of trading the asset in exchange for compensation, requiring the original to be deleted.\n\t */\n\tSell: \"sell\",\n\n\t// Actions typically used in Duties\n\n\t/**\n\t * The act of accepting that the use of the asset may be tracked by a specified party.\n\t */\n\tAcceptTracking: \"acceptTracking\",\n\n\t/**\n\t * The act of keeping a policy notice attached to the asset.\n\t */\n\tAttachPolicy: \"attachPolicy\",\n\n\t/**\n\t * The act of attaching the source of the asset and its derivatives.\n\t */\n\tAttachSource: \"attachSource\",\n\n\t/**\n\t * The act of attributing the asset to a specified party.\n\t */\n\tAttribute: \"attribute\",\n\n\t/**\n\t * The act of compensating a specified party by some amount for use of the asset.\n\t */\n\tCompensate: \"compensate\",\n\n\t/**\n\t * The act of permanently removing all copies of the asset.\n\t */\n\tDelete: \"delete\",\n\n\t/**\n\t * The act of requiring the assigner to ensure a permission is exclusive to the assignee.\n\t */\n\tEnsureExclusivity: \"ensureExclusivity\",\n\n\t/**\n\t * The act of including other related assets to fulfil the function.\n\t */\n\tInclude: \"include\",\n\n\t/**\n\t * The act of informing a party that an action has been performed on the asset.\n\t */\n\tInform: \"inform\",\n\n\t/**\n\t * The act of specifying a policy for third-party use of the asset.\n\t */\n\tNextPolicy: \"nextPolicy\",\n\n\t/**\n\t * The act of requiring explicit consent from a party to perform an action.\n\t */\n\tObtainConsent: \"obtainConsent\",\n\n\t/**\n\t * The act of paying a financial amount to a party for use of the asset.\n\t */\n\tPay: \"pay\",\n\n\t/**\n\t * The act of performing a manual review of the terms associated with the asset.\n\t */\n\tReviewPolicy: \"reviewPolicy\"\n} as const;\n\n/**\n * The types for ODRL Actions.\n */\nexport type ActionType = (typeof ActionType)[keyof typeof ActionType];\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Copyright 2024 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
/**
|
|
4
|
+
* The types for ODRL Conflict Resolution Strategies.
|
|
5
|
+
*/
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
|
+
export const ConflictStrategyType = {
|
|
8
|
+
/**
|
|
9
|
+
* Permission type.
|
|
10
|
+
*/
|
|
11
|
+
Perm: "perm",
|
|
12
|
+
/**
|
|
13
|
+
* Prohibition type.
|
|
14
|
+
*/
|
|
15
|
+
Prohibit: "prohibit",
|
|
16
|
+
/**
|
|
17
|
+
* Invalid type.
|
|
18
|
+
*/
|
|
19
|
+
Invalid: "invalid"
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=conflictStrategyType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conflictStrategyType.js","sourceRoot":"","sources":["../../../../src/models/types/conflictStrategyType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,oBAAoB,GAAG;IACnC;;OAEG;IACH,IAAI,EAAE,MAAM;IAEZ;;OAEG;IACH,QAAQ,EAAE,UAAU;IAEpB;;OAEG;IACH,OAAO,EAAE,SAAS;CACT,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The types for ODRL Conflict Resolution Strategies.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const ConflictStrategyType = {\n\t/**\n\t * Permission type.\n\t */\n\tPerm: \"perm\",\n\n\t/**\n\t * Prohibition type.\n\t */\n\tProhibit: \"prohibit\",\n\n\t/**\n\t * Invalid type.\n\t */\n\tInvalid: \"invalid\"\n} as const;\n\n/**\n * The types for ODRL Conflict Resolution Strategies.\n */\nexport type ConflictStrategyType = (typeof ConflictStrategyType)[keyof typeof ConflictStrategyType];\n"]}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
// Copyright 2024 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
/**
|
|
4
|
+
* The types for ODRL Data Types.
|
|
5
|
+
*/
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
|
+
export const LeftOperandType = {
|
|
8
|
+
/**
|
|
9
|
+
* Absolute Position type.
|
|
10
|
+
*/
|
|
11
|
+
AbsolutePosition: "absolutePosition",
|
|
12
|
+
/**
|
|
13
|
+
* Absolute Spatial Position type.
|
|
14
|
+
*/
|
|
15
|
+
AbsoluteSpatialPosition: "absoluteSpatialPosition",
|
|
16
|
+
/**
|
|
17
|
+
* Absolute Temporal Position type.
|
|
18
|
+
*/
|
|
19
|
+
AbsoluteTemporalPosition: "absoluteTemporalPosition",
|
|
20
|
+
/**
|
|
21
|
+
* Absolute Size type.
|
|
22
|
+
*/
|
|
23
|
+
AbsoluteSize: "absoluteSize",
|
|
24
|
+
/**
|
|
25
|
+
* Count type.
|
|
26
|
+
*/
|
|
27
|
+
Count: "count",
|
|
28
|
+
/**
|
|
29
|
+
* DateTime type.
|
|
30
|
+
*/
|
|
31
|
+
DateTime: "dateTime",
|
|
32
|
+
/**
|
|
33
|
+
* Delay Period type.
|
|
34
|
+
*/
|
|
35
|
+
DelayPeriod: "delayPeriod",
|
|
36
|
+
/**
|
|
37
|
+
* Delivery Channel type.
|
|
38
|
+
*/
|
|
39
|
+
DeliveryChannel: "deliveryChannel",
|
|
40
|
+
/**
|
|
41
|
+
* Elapsed Time type.
|
|
42
|
+
*/
|
|
43
|
+
ElapsedTime: "elapsedTime",
|
|
44
|
+
/**
|
|
45
|
+
* Event type.
|
|
46
|
+
*/
|
|
47
|
+
Event: "event",
|
|
48
|
+
/**
|
|
49
|
+
* File Format type.
|
|
50
|
+
*/
|
|
51
|
+
FileFormat: "fileFormat",
|
|
52
|
+
/**
|
|
53
|
+
* Industry type.
|
|
54
|
+
*/
|
|
55
|
+
Industry: "industry",
|
|
56
|
+
/**
|
|
57
|
+
* Language type.
|
|
58
|
+
*/
|
|
59
|
+
Language: "language",
|
|
60
|
+
/**
|
|
61
|
+
* Media type.
|
|
62
|
+
*/
|
|
63
|
+
Media: "media",
|
|
64
|
+
/**
|
|
65
|
+
* Metered Time type.
|
|
66
|
+
*/
|
|
67
|
+
MeteredTime: "meteredTime",
|
|
68
|
+
/**
|
|
69
|
+
* Pay Amount type.
|
|
70
|
+
*/
|
|
71
|
+
PayAmount: "payAmount",
|
|
72
|
+
/**
|
|
73
|
+
* Percentage type.
|
|
74
|
+
*/
|
|
75
|
+
Percentage: "percentage",
|
|
76
|
+
/**
|
|
77
|
+
* Product type.
|
|
78
|
+
*/
|
|
79
|
+
Product: "product",
|
|
80
|
+
/**
|
|
81
|
+
* Purpose type.
|
|
82
|
+
*/
|
|
83
|
+
Purpose: "purpose",
|
|
84
|
+
/**
|
|
85
|
+
* Recipient type.
|
|
86
|
+
*/
|
|
87
|
+
Recipient: "recipient",
|
|
88
|
+
/**
|
|
89
|
+
* Relative Position type.
|
|
90
|
+
*/
|
|
91
|
+
RelativePosition: "relativePosition",
|
|
92
|
+
/**
|
|
93
|
+
* Relative Spatial Position type.
|
|
94
|
+
*/
|
|
95
|
+
RelativeSpatialPosition: "relativeSpatialPosition",
|
|
96
|
+
/**
|
|
97
|
+
* Relative Temporal Position type.
|
|
98
|
+
*/
|
|
99
|
+
RelativeTemporalPosition: "relativeTemporalPosition",
|
|
100
|
+
/**
|
|
101
|
+
* Relative Size type.
|
|
102
|
+
*/
|
|
103
|
+
RelativeSize: "relativeSize",
|
|
104
|
+
/**
|
|
105
|
+
* Resolution type.
|
|
106
|
+
*/
|
|
107
|
+
Resolution: "resolution",
|
|
108
|
+
/**
|
|
109
|
+
* Spatial type.
|
|
110
|
+
*/
|
|
111
|
+
Spatial: "spatial",
|
|
112
|
+
/**
|
|
113
|
+
* Spatial Coordinates type.
|
|
114
|
+
*/
|
|
115
|
+
SpatialCoordinates: "spatialCoordinates",
|
|
116
|
+
/**
|
|
117
|
+
* System Device type.
|
|
118
|
+
*/
|
|
119
|
+
SystemDevice: "systemDevice",
|
|
120
|
+
/**
|
|
121
|
+
* Time Interval type.
|
|
122
|
+
*/
|
|
123
|
+
TimeInterval: "timeInterval",
|
|
124
|
+
/**
|
|
125
|
+
* Unit of Count type.
|
|
126
|
+
*/
|
|
127
|
+
UnitOfCount: "unitOfCount",
|
|
128
|
+
/**
|
|
129
|
+
* Version type.
|
|
130
|
+
*/
|
|
131
|
+
Version: "version",
|
|
132
|
+
/**
|
|
133
|
+
* Virtual Location type.
|
|
134
|
+
*/
|
|
135
|
+
VirtualLocation: "virtualLocation"
|
|
136
|
+
};
|
|
137
|
+
//# sourceMappingURL=leftOperandType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"leftOperandType.js","sourceRoot":"","sources":["../../../../src/models/types/leftOperandType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,eAAe,GAAG;IAC9B;;OAEG;IACH,gBAAgB,EAAE,kBAAkB;IAEpC;;OAEG;IACH,uBAAuB,EAAE,yBAAyB;IAElD;;OAEG;IACH,wBAAwB,EAAE,0BAA0B;IAEpD;;OAEG;IACH,YAAY,EAAE,cAAc;IAE5B;;OAEG;IACH,KAAK,EAAE,OAAO;IAEd;;OAEG;IACH,QAAQ,EAAE,UAAU;IAEpB;;OAEG;IACH,WAAW,EAAE,aAAa;IAE1B;;OAEG;IACH,eAAe,EAAE,iBAAiB;IAElC;;OAEG;IACH,WAAW,EAAE,aAAa;IAE1B;;OAEG;IACH,KAAK,EAAE,OAAO;IAEd;;OAEG;IACH,UAAU,EAAE,YAAY;IAExB;;OAEG;IACH,QAAQ,EAAE,UAAU;IAEpB;;OAEG;IACH,QAAQ,EAAE,UAAU;IAEpB;;OAEG;IACH,KAAK,EAAE,OAAO;IAEd;;OAEG;IACH,WAAW,EAAE,aAAa;IAE1B;;OAEG;IACH,SAAS,EAAE,WAAW;IAEtB;;OAEG;IACH,UAAU,EAAE,YAAY;IAExB;;OAEG;IACH,OAAO,EAAE,SAAS;IAElB;;OAEG;IACH,OAAO,EAAE,SAAS;IAElB;;OAEG;IACH,SAAS,EAAE,WAAW;IAEtB;;OAEG;IACH,gBAAgB,EAAE,kBAAkB;IAEpC;;OAEG;IACH,uBAAuB,EAAE,yBAAyB;IAElD;;OAEG;IACH,wBAAwB,EAAE,0BAA0B;IAEpD;;OAEG;IACH,YAAY,EAAE,cAAc;IAE5B;;OAEG;IACH,UAAU,EAAE,YAAY;IAExB;;OAEG;IACH,OAAO,EAAE,SAAS;IAElB;;OAEG;IACH,kBAAkB,EAAE,oBAAoB;IAExC;;OAEG;IACH,YAAY,EAAE,cAAc;IAE5B;;OAEG;IACH,YAAY,EAAE,cAAc;IAE5B;;OAEG;IACH,WAAW,EAAE,aAAa;IAE1B;;OAEG;IACH,OAAO,EAAE,SAAS;IAElB;;OAEG;IACH,eAAe,EAAE,iBAAiB;CACzB,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The types for ODRL Data Types.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const LeftOperandType = {\n\t/**\n\t * Absolute Position type.\n\t */\n\tAbsolutePosition: \"absolutePosition\",\n\n\t/**\n\t * Absolute Spatial Position type.\n\t */\n\tAbsoluteSpatialPosition: \"absoluteSpatialPosition\",\n\n\t/**\n\t * Absolute Temporal Position type.\n\t */\n\tAbsoluteTemporalPosition: \"absoluteTemporalPosition\",\n\n\t/**\n\t * Absolute Size type.\n\t */\n\tAbsoluteSize: \"absoluteSize\",\n\n\t/**\n\t * Count type.\n\t */\n\tCount: \"count\",\n\n\t/**\n\t * DateTime type.\n\t */\n\tDateTime: \"dateTime\",\n\n\t/**\n\t * Delay Period type.\n\t */\n\tDelayPeriod: \"delayPeriod\",\n\n\t/**\n\t * Delivery Channel type.\n\t */\n\tDeliveryChannel: \"deliveryChannel\",\n\n\t/**\n\t * Elapsed Time type.\n\t */\n\tElapsedTime: \"elapsedTime\",\n\n\t/**\n\t * Event type.\n\t */\n\tEvent: \"event\",\n\n\t/**\n\t * File Format type.\n\t */\n\tFileFormat: \"fileFormat\",\n\n\t/**\n\t * Industry type.\n\t */\n\tIndustry: \"industry\",\n\n\t/**\n\t * Language type.\n\t */\n\tLanguage: \"language\",\n\n\t/**\n\t * Media type.\n\t */\n\tMedia: \"media\",\n\n\t/**\n\t * Metered Time type.\n\t */\n\tMeteredTime: \"meteredTime\",\n\n\t/**\n\t * Pay Amount type.\n\t */\n\tPayAmount: \"payAmount\",\n\n\t/**\n\t * Percentage type.\n\t */\n\tPercentage: \"percentage\",\n\n\t/**\n\t * Product type.\n\t */\n\tProduct: \"product\",\n\n\t/**\n\t * Purpose type.\n\t */\n\tPurpose: \"purpose\",\n\n\t/**\n\t * Recipient type.\n\t */\n\tRecipient: \"recipient\",\n\n\t/**\n\t * Relative Position type.\n\t */\n\tRelativePosition: \"relativePosition\",\n\n\t/**\n\t * Relative Spatial Position type.\n\t */\n\tRelativeSpatialPosition: \"relativeSpatialPosition\",\n\n\t/**\n\t * Relative Temporal Position type.\n\t */\n\tRelativeTemporalPosition: \"relativeTemporalPosition\",\n\n\t/**\n\t * Relative Size type.\n\t */\n\tRelativeSize: \"relativeSize\",\n\n\t/**\n\t * Resolution type.\n\t */\n\tResolution: \"resolution\",\n\n\t/**\n\t * Spatial type.\n\t */\n\tSpatial: \"spatial\",\n\n\t/**\n\t * Spatial Coordinates type.\n\t */\n\tSpatialCoordinates: \"spatialCoordinates\",\n\n\t/**\n\t * System Device type.\n\t */\n\tSystemDevice: \"systemDevice\",\n\n\t/**\n\t * Time Interval type.\n\t */\n\tTimeInterval: \"timeInterval\",\n\n\t/**\n\t * Unit of Count type.\n\t */\n\tUnitOfCount: \"unitOfCount\",\n\n\t/**\n\t * Version type.\n\t */\n\tVersion: \"version\",\n\n\t/**\n\t * Virtual Location type.\n\t */\n\tVirtualLocation: \"virtualLocation\"\n} as const;\n\n/**\n * The types for ODRL Data Types.\n */\nexport type LeftOperandType = (typeof LeftOperandType)[keyof typeof LeftOperandType];\n"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Copyright 2024 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
/**
|
|
4
|
+
* The types for ODRL Logical Constraints.
|
|
5
|
+
*/
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
|
+
export const LogicalConstraintType = {
|
|
8
|
+
/**
|
|
9
|
+
* And type.
|
|
10
|
+
*/
|
|
11
|
+
And: "and",
|
|
12
|
+
/**
|
|
13
|
+
* Or type.
|
|
14
|
+
*/
|
|
15
|
+
Or: "or",
|
|
16
|
+
/**
|
|
17
|
+
* Xone type.
|
|
18
|
+
*/
|
|
19
|
+
Xone: "xone",
|
|
20
|
+
/**
|
|
21
|
+
* And sequence type.
|
|
22
|
+
*/
|
|
23
|
+
AndSequence: "andSequence"
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=logicalConstraintType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logicalConstraintType.js","sourceRoot":"","sources":["../../../../src/models/types/logicalConstraintType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACpC;;OAEG;IACH,GAAG,EAAE,KAAK;IAEV;;OAEG;IACH,EAAE,EAAE,IAAI;IAER;;OAEG;IACH,IAAI,EAAE,MAAM;IAEZ;;OAEG;IACH,WAAW,EAAE,aAAa;CACjB,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The types for ODRL Logical Constraints.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const LogicalConstraintType = {\n\t/**\n\t * And type.\n\t */\n\tAnd: \"and\",\n\n\t/**\n\t * Or type.\n\t */\n\tOr: \"or\",\n\n\t/**\n\t * Xone type.\n\t */\n\tXone: \"xone\",\n\n\t/**\n\t * And sequence type.\n\t */\n\tAndSequence: \"andSequence\"\n} as const;\n\n/**\n * The types for ODRL Logical Constraints.\n */\nexport type LogicalConstraintType =\n\t(typeof LogicalConstraintType)[keyof typeof LogicalConstraintType];\n"]}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// Copyright 2024 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
/**
|
|
4
|
+
* The types for ODRL.
|
|
5
|
+
*/
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
|
+
export const OdrlTypes = {
|
|
8
|
+
/**
|
|
9
|
+
* Policy type.
|
|
10
|
+
*/
|
|
11
|
+
Policy: "Policy",
|
|
12
|
+
/**
|
|
13
|
+
* Set type (subclass of Policy).
|
|
14
|
+
*/
|
|
15
|
+
Set: "Set",
|
|
16
|
+
/**
|
|
17
|
+
* Offer type (subclass of Policy).
|
|
18
|
+
*/
|
|
19
|
+
Offer: "Offer",
|
|
20
|
+
/**
|
|
21
|
+
* Agreement type (subclass of Policy).
|
|
22
|
+
*/
|
|
23
|
+
Agreement: "Agreement",
|
|
24
|
+
/**
|
|
25
|
+
* Asset type.
|
|
26
|
+
*/
|
|
27
|
+
Asset: "Asset",
|
|
28
|
+
/**
|
|
29
|
+
* AssetCollection type.
|
|
30
|
+
*/
|
|
31
|
+
AssetCollection: "AssetCollection",
|
|
32
|
+
/**
|
|
33
|
+
* Party type.
|
|
34
|
+
*/
|
|
35
|
+
Party: "Party",
|
|
36
|
+
/**
|
|
37
|
+
* PartyCollection type.
|
|
38
|
+
*/
|
|
39
|
+
PartyCollection: "PartyCollection",
|
|
40
|
+
/**
|
|
41
|
+
* Action type.
|
|
42
|
+
*/
|
|
43
|
+
Action: "Action",
|
|
44
|
+
/**
|
|
45
|
+
* Rule type.
|
|
46
|
+
*/
|
|
47
|
+
Rule: "Rule",
|
|
48
|
+
/**
|
|
49
|
+
* Permission type (subclass of Rule).
|
|
50
|
+
*/
|
|
51
|
+
Permission: "Permission",
|
|
52
|
+
/**
|
|
53
|
+
* Prohibition type (subclass of Rule).
|
|
54
|
+
*/
|
|
55
|
+
Prohibition: "Prohibition",
|
|
56
|
+
/**
|
|
57
|
+
* Duty type (subclass of Rule).
|
|
58
|
+
*/
|
|
59
|
+
Duty: "Duty",
|
|
60
|
+
/**
|
|
61
|
+
* Constraint type.
|
|
62
|
+
*/
|
|
63
|
+
Constraint: "Constraint",
|
|
64
|
+
/**
|
|
65
|
+
* LogicalConstraint type.
|
|
66
|
+
*/
|
|
67
|
+
LogicalConstraint: "LogicalConstraint"
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=odrlTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"odrlTypes.js","sourceRoot":"","sources":["../../../../src/models/types/odrlTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,SAAS,GAAG;IACxB;;OAEG;IACH,MAAM,EAAE,QAAQ;IAEhB;;OAEG;IACH,GAAG,EAAE,KAAK;IAEV;;OAEG;IACH,KAAK,EAAE,OAAO;IAEd;;OAEG;IACH,SAAS,EAAE,WAAW;IAEtB;;OAEG;IACH,KAAK,EAAE,OAAO;IAEd;;OAEG;IACH,eAAe,EAAE,iBAAiB;IAElC;;OAEG;IACH,KAAK,EAAE,OAAO;IAEd;;OAEG;IACH,eAAe,EAAE,iBAAiB;IAElC;;OAEG;IACH,MAAM,EAAE,QAAQ;IAEhB;;OAEG;IACH,IAAI,EAAE,MAAM;IAEZ;;OAEG;IACH,UAAU,EAAE,YAAY;IAExB;;OAEG;IACH,WAAW,EAAE,aAAa;IAE1B;;OAEG;IACH,IAAI,EAAE,MAAM;IAEZ;;OAEG;IACH,UAAU,EAAE,YAAY;IAExB;;OAEG;IACH,iBAAiB,EAAE,mBAAmB;CAC7B,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} as const;\n\n/**\n * The types for ODRL.\n */\nexport type OdrlTypes = (typeof OdrlTypes)[keyof typeof OdrlTypes];\n"]}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// Copyright 2024 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
/**
|
|
4
|
+
* The types for ODRL Operators.
|
|
5
|
+
*/
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
|
+
export const OperatorType = {
|
|
8
|
+
/**
|
|
9
|
+
* Equal type.
|
|
10
|
+
*/
|
|
11
|
+
Eq: "eq",
|
|
12
|
+
/**
|
|
13
|
+
* Greater than type.
|
|
14
|
+
*/
|
|
15
|
+
Gt: "gt",
|
|
16
|
+
/**
|
|
17
|
+
* Greater than or equal to type.
|
|
18
|
+
*/
|
|
19
|
+
Gteq: "gteq",
|
|
20
|
+
/**
|
|
21
|
+
* Less than type.
|
|
22
|
+
*/
|
|
23
|
+
Lt: "lt",
|
|
24
|
+
/**
|
|
25
|
+
* Less than or equal to type.
|
|
26
|
+
*/
|
|
27
|
+
Lteq: "lteq",
|
|
28
|
+
/**
|
|
29
|
+
* Not equal to type.
|
|
30
|
+
*/
|
|
31
|
+
Neq: "neq",
|
|
32
|
+
/**
|
|
33
|
+
* Is a type.
|
|
34
|
+
*/
|
|
35
|
+
IsA: "isA",
|
|
36
|
+
/**
|
|
37
|
+
* Has part type.
|
|
38
|
+
*/
|
|
39
|
+
HasPart: "hasPart",
|
|
40
|
+
/**
|
|
41
|
+
* Is part of type.
|
|
42
|
+
*/
|
|
43
|
+
IsPartOf: "isPartOf",
|
|
44
|
+
/**
|
|
45
|
+
* Is all of type.
|
|
46
|
+
*/
|
|
47
|
+
IsAllOf: "isAllOf",
|
|
48
|
+
/**
|
|
49
|
+
* Is any of type.
|
|
50
|
+
*/
|
|
51
|
+
IsAnyOf: "isAnyOf",
|
|
52
|
+
/**
|
|
53
|
+
* Is none of type.
|
|
54
|
+
*/
|
|
55
|
+
IsNoneOf: "isNoneOf",
|
|
56
|
+
/**
|
|
57
|
+
* Location time equal to type.
|
|
58
|
+
*/
|
|
59
|
+
LocTimeEq: "locTimeEq",
|
|
60
|
+
/**
|
|
61
|
+
* Location time greater than or equal to type.
|
|
62
|
+
*/
|
|
63
|
+
LocTimeGteq: "locTimeGteq"
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=operatorType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operatorType.js","sourceRoot":"","sources":["../../../../src/models/types/operatorType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,YAAY,GAAG;IAC3B;;OAEG;IACH,EAAE,EAAE,IAAI;IAER;;OAEG;IACH,EAAE,EAAE,IAAI;IAER;;OAEG;IACH,IAAI,EAAE,MAAM;IAEZ;;OAEG;IACH,EAAE,EAAE,IAAI;IAER;;OAEG;IACH,IAAI,EAAE,MAAM;IAEZ;;OAEG;IACH,GAAG,EAAE,KAAK;IAEV;;OAEG;IACH,GAAG,EAAE,KAAK;IAEV;;OAEG;IACH,OAAO,EAAE,SAAS;IAElB;;OAEG;IACH,QAAQ,EAAE,UAAU;IAEpB;;OAEG;IACH,OAAO,EAAE,SAAS;IAElB;;OAEG;IACH,OAAO,EAAE,SAAS;IAElB;;OAEG;IACH,QAAQ,EAAE,UAAU;IAEpB;;OAEG;IACH,SAAS,EAAE,WAAW;IAEtB;;OAEG;IACH,WAAW,EAAE,aAAa;CACjB,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The types for ODRL Operators.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const OperatorType = {\n\t/**\n\t * Equal type.\n\t */\n\tEq: \"eq\",\n\n\t/**\n\t * Greater than type.\n\t */\n\tGt: \"gt\",\n\n\t/**\n\t * Greater than or equal to type.\n\t */\n\tGteq: \"gteq\",\n\n\t/**\n\t * Less than type.\n\t */\n\tLt: \"lt\",\n\n\t/**\n\t * Less than or equal to type.\n\t */\n\tLteq: \"lteq\",\n\n\t/**\n\t * Not equal to type.\n\t */\n\tNeq: \"neq\",\n\n\t/**\n\t * Is a type.\n\t */\n\tIsA: \"isA\",\n\n\t/**\n\t * Has part type.\n\t */\n\tHasPart: \"hasPart\",\n\n\t/**\n\t * Is part of type.\n\t */\n\tIsPartOf: \"isPartOf\",\n\n\t/**\n\t * Is all of type.\n\t */\n\tIsAllOf: \"isAllOf\",\n\n\t/**\n\t * Is any of type.\n\t */\n\tIsAnyOf: \"isAnyOf\",\n\n\t/**\n\t * Is none of type.\n\t */\n\tIsNoneOf: \"isNoneOf\",\n\n\t/**\n\t * Location time equal to type.\n\t */\n\tLocTimeEq: \"locTimeEq\",\n\n\t/**\n\t * Location time greater than or equal to type.\n\t */\n\tLocTimeGteq: \"locTimeGteq\"\n} as const;\n\n/**\n * The types for ODRL Operators.\n */\nexport type OperatorType = (typeof OperatorType)[keyof typeof OperatorType];\n"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Copyright 2024 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
/**
|
|
4
|
+
* The types for ODRL Policies.
|
|
5
|
+
*/
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
|
+
export const PolicyType = {
|
|
8
|
+
/**
|
|
9
|
+
* Policy type.
|
|
10
|
+
*/
|
|
11
|
+
Policy: "Policy",
|
|
12
|
+
/**
|
|
13
|
+
* Set type.
|
|
14
|
+
*/
|
|
15
|
+
Set: "Set",
|
|
16
|
+
/**
|
|
17
|
+
* Offer type.
|
|
18
|
+
*/
|
|
19
|
+
Offer: "Offer",
|
|
20
|
+
/**
|
|
21
|
+
* Agreement type.
|
|
22
|
+
*/
|
|
23
|
+
Agreement: "Agreement"
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=policyType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"policyType.js","sourceRoot":"","sources":["../../../../src/models/types/policyType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,UAAU,GAAG;IACzB;;OAEG;IACH,MAAM,EAAE,QAAQ;IAEhB;;OAEG;IACH,GAAG,EAAE,KAAK;IAEV;;OAEG;IACH,KAAK,EAAE,OAAO;IAEd;;OAEG;IACH,SAAS,EAAE,WAAW;CACb,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The types for ODRL Policies.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const PolicyType = {\n\t/**\n\t * Policy type.\n\t */\n\tPolicy: \"Policy\",\n\n\t/**\n\t * Set type.\n\t */\n\tSet: \"Set\",\n\n\t/**\n\t * Offer type.\n\t */\n\tOffer: \"Offer\",\n\n\t/**\n\t * Agreement type.\n\t */\n\tAgreement: \"Agreement\"\n} as const;\n\n/**\n * The types for ODRL Policies.\n */\nexport type PolicyType = (typeof PolicyType)[keyof typeof PolicyType];\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Copyright 2024 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
/**
|
|
4
|
+
* Right operand types for ODRL constraints
|
|
5
|
+
*/
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
|
+
export const RightOperandType = {
|
|
8
|
+
/**
|
|
9
|
+
* Reference to policy usage events
|
|
10
|
+
*/
|
|
11
|
+
PolicyUsage: "odrl:policyUsage"
|
|
12
|
+
// ... other right operand types ...
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=rightOperandType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rightOperandType.js","sourceRoot":"","sources":["../../../../src/models/types/rightOperandType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC/B;;OAEG;IACH,WAAW,EAAE,kBAAkB;IAE/B,oCAAoC;CAC3B,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Right operand types for ODRL constraints\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const RightOperandType = {\n\t/**\n\t * Reference to policy usage events\n\t */\n\tPolicyUsage: \"odrl:policyUsage\"\n\n\t// ... other right operand types ...\n} as const;\n\n/**\n * The types for ODRL Right Operand Types.\n */\nexport type RightOperandType = (typeof RightOperandType)[keyof typeof RightOperandType];\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Copyright 2024 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
/**
|
|
4
|
+
* The types for ODRL Rules.
|
|
5
|
+
*/
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
|
+
export const RuleType = {
|
|
8
|
+
/**
|
|
9
|
+
* Permission type.
|
|
10
|
+
*/
|
|
11
|
+
Permission: "Permission",
|
|
12
|
+
/**
|
|
13
|
+
* Prohibition type.
|
|
14
|
+
*/
|
|
15
|
+
Prohibition: "Prohibition",
|
|
16
|
+
/**
|
|
17
|
+
* Duty type.
|
|
18
|
+
*/
|
|
19
|
+
Duty: "Duty"
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=ruleType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ruleType.js","sourceRoot":"","sources":["../../../../src/models/types/ruleType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,QAAQ,GAAG;IACvB;;OAEG;IACH,UAAU,EAAE,YAAY;IAExB;;OAEG;IACH,WAAW,EAAE,aAAa;IAE1B;;OAEG;IACH,IAAI,EAAE,MAAM;CACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The types for ODRL Rules.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const RuleType = {\n\t/**\n\t * Permission type.\n\t */\n\tPermission: \"Permission\",\n\n\t/**\n\t * Prohibition type.\n\t */\n\tProhibition: \"Prohibition\",\n\n\t/**\n\t * Duty type.\n\t */\n\tDuty: \"Duty\"\n} as const;\n\n/**\n * The types for ODRL Rules.\n */\nexport type RuleType = (typeof RuleType)[keyof typeof RuleType];\n"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Copyright 2024 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
/**
|
|
4
|
+
* The types for ODRL Status.
|
|
5
|
+
*/
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
|
+
export const StatusType = {
|
|
8
|
+
/**
|
|
9
|
+
* Active type.
|
|
10
|
+
*/
|
|
11
|
+
Active: "active",
|
|
12
|
+
/**
|
|
13
|
+
* Inactive type.
|
|
14
|
+
*/
|
|
15
|
+
Inactive: "inactive",
|
|
16
|
+
/**
|
|
17
|
+
* Pending type.
|
|
18
|
+
*/
|
|
19
|
+
Pending: "pending",
|
|
20
|
+
/**
|
|
21
|
+
* Revoked type.
|
|
22
|
+
*/
|
|
23
|
+
Revoked: "revoked"
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=statusType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"statusType.js","sourceRoot":"","sources":["../../../../src/models/types/statusType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,UAAU,GAAG;IACzB;;OAEG;IACH,MAAM,EAAE,QAAQ;IAEhB;;OAEG;IACH,QAAQ,EAAE,UAAU;IAEpB;;OAEG;IACH,OAAO,EAAE,SAAS;IAElB;;OAEG;IACH,OAAO,EAAE,SAAS;CACT,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The types for ODRL Status.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const StatusType = {\n\t/**\n\t * Active type.\n\t */\n\tActive: \"active\",\n\n\t/**\n\t * Inactive type.\n\t */\n\tInactive: \"inactive\",\n\n\t/**\n\t * Pending type.\n\t */\n\tPending: \"pending\",\n\n\t/**\n\t * Revoked type.\n\t */\n\tRevoked: \"revoked\"\n} as const;\n\n/**\n * The types for ODRL Status.\n */\nexport type StatusType = (typeof StatusType)[keyof typeof StatusType];\n"]}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.twindev.org/w3c-odrl/OdrlAction",
|
|
4
|
+
"description": "Interface for ODRL Actions. https://www.w3.org/TR/odrl-model/#action",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"@context": {
|
|
8
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionRoot"
|
|
9
|
+
},
|
|
10
|
+
"@id": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "Direct action identifier. Used in simple action references."
|
|
13
|
+
},
|
|
14
|
+
"@included": {
|
|
15
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
|
|
16
|
+
},
|
|
17
|
+
"@graph": {
|
|
18
|
+
"anyOf": [
|
|
19
|
+
{
|
|
20
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"type": "array",
|
|
24
|
+
"items": {
|
|
25
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
"@nest": {
|
|
31
|
+
"anyOf": [
|
|
32
|
+
{
|
|
33
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdJsonObject"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"type": "array",
|
|
37
|
+
"items": {
|
|
38
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdJsonObject"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
"@type": {
|
|
44
|
+
"anyOf": [
|
|
45
|
+
{
|
|
46
|
+
"type": "string"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"type": "array",
|
|
50
|
+
"items": {
|
|
51
|
+
"type": "string"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
"@reverse": {
|
|
57
|
+
"type": "object",
|
|
58
|
+
"additionalProperties": {
|
|
59
|
+
"type": "string"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"@index": {
|
|
63
|
+
"type": "string"
|
|
64
|
+
},
|
|
65
|
+
"rdf:value": {
|
|
66
|
+
"type": "object",
|
|
67
|
+
"properties": {
|
|
68
|
+
"@id": {
|
|
69
|
+
"type": "string"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"required": [
|
|
73
|
+
"@id"
|
|
74
|
+
],
|
|
75
|
+
"additionalProperties": false,
|
|
76
|
+
"description": "The value/identifier of the action. Used in complex action definitions."
|
|
77
|
+
},
|
|
78
|
+
"refinement": {
|
|
79
|
+
"anyOf": [
|
|
80
|
+
{
|
|
81
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlConstraint"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlLogicalConstraint"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"type": "array",
|
|
88
|
+
"items": {
|
|
89
|
+
"anyOf": [
|
|
90
|
+
{
|
|
91
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlConstraint"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlLogicalConstraint"
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
"description": "Refinements applied to the action."
|
|
101
|
+
},
|
|
102
|
+
"includedIn": {
|
|
103
|
+
"anyOf": [
|
|
104
|
+
{
|
|
105
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/ActionType"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"type": "string"
|
|
109
|
+
}
|
|
110
|
+
],
|
|
111
|
+
"description": "Reference to the action this action is included in."
|
|
112
|
+
},
|
|
113
|
+
"implies": {
|
|
114
|
+
"type": "array",
|
|
115
|
+
"items": {
|
|
116
|
+
"anyOf": [
|
|
117
|
+
{
|
|
118
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/ActionType"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"type": "string"
|
|
122
|
+
}
|
|
123
|
+
]
|
|
124
|
+
},
|
|
125
|
+
"description": "References to actions this action implies."
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"additionalProperties": {
|
|
129
|
+
"anyOf": [
|
|
130
|
+
{
|
|
131
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdIndexMap"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdIdMap"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdTypeMap"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"type": "array"
|
|
150
|
+
}
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
}
|