From 615fe96131df6b372cfd35c82744def8e8c83e76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobi=C3=A1=C5=A1=20Poto=C4=8Dek?= Date: Mon, 7 Apr 2025 11:35:56 +0200 Subject: [PATCH 1/2] feat: add general access enum to consts --- src/apify_shared/consts.py | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) 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' From 37ac0c006841124491a8a6f3a3f03b0f592d9143 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobi=C3=A1=C5=A1=20Poto=C4=8Dek?= Date: Mon, 7 Apr 2025 11:46:30 +0200 Subject: [PATCH 2/2] fix: bump version + populate CHANGELOG --- CHANGELOG.md | 6 ++++++ pyproject.toml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) 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" }