Skip to content

Commit 6de5a2f

Browse files
authored
feat: add general access enum to consts (#34)
Context in apify/apify-shared-js#507
1 parent a917313 commit 6de5a2f

File tree

3 files changed

+34
-4
lines changed

3 files changed

+34
-4
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## [1.4.0](../../releases/tag/v1.4.0) - 2025-04-7
4+
5+
### Added
6+
7+
- Added general access enums to consts
8+
39
## [1.3.2](../../releases/tag/v1.3.2) - 2025-03-20
410

511
### Added

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "apify_shared"
3-
version = "1.3.2"
3+
version = "1.4.0"
44
description = "Tools and constants shared across Apify projects."
55
readme = "README.md"
66
license = { text = "Apache Software License" }

src/apify_shared/consts.py

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -371,10 +371,34 @@ class MetaOrigin(str, Enum):
371371

372372
STRING_ENV_VARS: list[STRING_ENV_VARS_TYPE] = list(get_args(STRING_ENV_VARS_TYPE))
373373

374-
COMMA_SEPARATED_LIST_ENV_VARS_TYPE = Literal[
375-
ActorEnvVars.BUILD_TAGS,
376-
]
374+
COMMA_SEPARATED_LIST_ENV_VARS_TYPE = Literal[ActorEnvVars.BUILD_TAGS,]
377375

378376
COMMA_SEPARATED_LIST_ENV_VARS: list[COMMA_SEPARATED_LIST_ENV_VARS_TYPE] = list(
379377
get_args(COMMA_SEPARATED_LIST_ENV_VARS_TYPE)
380378
)
379+
380+
381+
class StorageGeneralAccess(str, Enum):
382+
"""Storage setting determining how others can access the storage.
383+
384+
This setting overrides the user setting of the storage owner.
385+
"""
386+
387+
#: Only signed-in users with explicit access can read this storage.
388+
RESTRICTED = 'RESTRICTED'
389+
#: Anyone with a link or the unique storage ID can read this storage.
390+
ANYONE_WITH_ID_CAN_READ = 'ANYONE_WITH_ID_CAN_READ'
391+
#: Anyone with a link, ID, or storage name can read this storage.
392+
ANYONE_WITH_NAME_CAN_READ = 'ANYONE_WITH_NAME_CAN_READ'
393+
394+
395+
class RunGeneralAccess(str, Enum):
396+
"""Run setting determining how others can access the run.
397+
398+
This setting overrides the user setting of the run owner.
399+
"""
400+
401+
#: Only signed-in users with explicit access can read this run.
402+
RESTRICTED = 'RESTRICTED'
403+
#: Anyone with a link or the unique run ID can read this run.
404+
ANYONE_WITH_ID_CAN_READ = 'ANYONE_WITH_ID_CAN_READ'

0 commit comments

Comments
 (0)