diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a0227f..2cc8359 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [1.4.0](../../releases/tag/v1.4.0) - 2025-04-7 + +### Added + +- Added general access enums to consts + ## [1.3.2](../../releases/tag/v1.3.2) - 2025-03-20 ### Added diff --git a/pyproject.toml b/pyproject.toml index 4728488..ba7ec26 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "apify_shared" -version = "1.3.2" +version = "1.4.0" description = "Tools and constants shared across Apify projects." readme = "README.md" license = { text = "Apache Software License" } diff --git a/src/apify_shared/consts.py b/src/apify_shared/consts.py index de80ef8..435a3b6 100644 --- a/src/apify_shared/consts.py +++ b/src/apify_shared/consts.py @@ -371,10 +371,34 @@ class MetaOrigin(str, Enum): STRING_ENV_VARS: list[STRING_ENV_VARS_TYPE] = list(get_args(STRING_ENV_VARS_TYPE)) -COMMA_SEPARATED_LIST_ENV_VARS_TYPE = Literal[ - ActorEnvVars.BUILD_TAGS, -] +COMMA_SEPARATED_LIST_ENV_VARS_TYPE = Literal[ActorEnvVars.BUILD_TAGS,] COMMA_SEPARATED_LIST_ENV_VARS: list[COMMA_SEPARATED_LIST_ENV_VARS_TYPE] = list( get_args(COMMA_SEPARATED_LIST_ENV_VARS_TYPE) ) + + +class StorageGeneralAccess(str, Enum): + """Storage setting determining how others can access the storage. + + This setting overrides the user setting of the storage owner. + """ + + #: Only signed-in users with explicit access can read this storage. + RESTRICTED = 'RESTRICTED' + #: Anyone with a link or the unique storage ID can read this storage. + ANYONE_WITH_ID_CAN_READ = 'ANYONE_WITH_ID_CAN_READ' + #: Anyone with a link, ID, or storage name can read this storage. + ANYONE_WITH_NAME_CAN_READ = 'ANYONE_WITH_NAME_CAN_READ' + + +class RunGeneralAccess(str, Enum): + """Run setting determining how others can access the run. + + This setting overrides the user setting of the run owner. + """ + + #: Only signed-in users with explicit access can read this run. + RESTRICTED = 'RESTRICTED' + #: Anyone with a link or the unique run ID can read this run. + ANYONE_WITH_ID_CAN_READ = 'ANYONE_WITH_ID_CAN_READ'