| 1 |
|
| 2 |
|
| 3 |
import datetime as dt |
| 4 |
import typing |
| 5 |
|
| 6 |
import pydantic |
| 7 |
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel |
| 8 |
from .action_base import ActionBase |
| 9 |
from .action_error import ActionError |
| 10 |
from .action_module_reference import ActionModuleReference |
| 11 |
from .action_secret_response import ActionSecretResponse |
| 12 |
from .action_trigger import ActionTrigger |
| 13 |
from .action_version_build_status_enum import ActionVersionBuildStatusEnum |
| 14 |
from .action_version_dependency import ActionVersionDependency |
| 15 |
|
| 16 |
|
| 17 |
class ActionVersion(UniversalBaseModel): |
| 18 |
id: typing.Optional[str] = pydantic.Field(default=None) |
| 19 |
""" |
| 20 |
The unique id of an action version. |
| 21 |
""" |
| 22 |
|
| 23 |
action_id: typing.Optional[str] = pydantic.Field(default=None) |
| 24 |
""" |
| 25 |
The id of the action to which this version belongs. |
| 26 |
""" |
| 27 |
|
| 28 |
code: typing.Optional[str] = pydantic.Field(default=None) |
| 29 |
""" |
| 30 |
The source code of this specific version of the action. |
| 31 |
""" |
| 32 |
|
| 33 |
dependencies: typing.Optional[typing.List[ActionVersionDependency]] = pydantic.Field(default=None) |
| 34 |
""" |
| 35 |
The list of third party npm modules, and their versions, that this specific version depends on. |
| 36 |
""" |
| 37 |
|
| 38 |
deployed: typing.Optional[bool] = pydantic.Field(default=None) |
| 39 |
""" |
| 40 |
Indicates if this specific version is the currently one deployed. |
| 41 |
""" |
| 42 |
|
| 43 |
runtime: typing.Optional[str] = pydantic.Field(default=None) |
| 44 |
""" |
| 45 |
The Node runtime. For example: `node22` |
| 46 |
""" |
| 47 |
|
| 48 |
secrets: typing.Optional[typing.List[ActionSecretResponse]] = pydantic.Field(default=None) |
| 49 |
""" |
| 50 |
The list of secrets that are included in an action or a version of an action. |
| 51 |
""" |
| 52 |
|
| 53 |
status: typing.Optional[ActionVersionBuildStatusEnum] = None |
| 54 |
number: typing.Optional[float] = pydantic.Field(default=None) |
| 55 |
""" |
| 56 |
The index of this version in list of versions for the action. |
| 57 |
""" |
| 58 |
|
| 59 |
errors: typing.Optional[typing.List[ActionError]] = pydantic.Field(default=None) |
| 60 |
""" |
| 61 |
Any errors that occurred while the version was being built. |
| 62 |
""" |
| 63 |
|
| 64 |
action: typing.Optional[ActionBase] = None |
| 65 |
built_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) |
| 66 |
""" |
| 67 |
The time when this version was built successfully. |
| 68 |
""" |
| 69 |
|
| 70 |
created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) |
| 71 |
""" |
| 72 |
The time when this version was created. |
| 73 |
""" |
| 74 |
|
| 75 |
updated_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) |
| 76 |
""" |
| 77 |
The time when a version was updated. Versions are never updated externally. Only Auth0 will update an action version as it is being built. |
| 78 |
""" |
| 79 |
|
| 80 |
supported_triggers: typing.Optional[typing.List[ActionTrigger]] = pydantic.Field(default=None) |
| 81 |
""" |
| 82 |
The list of triggers that this version supports. At this time, a version can only target a single trigger at a time. |
| 83 |
""" |
| 84 |
|
| 85 |
modules: typing.Optional[typing.List[ActionModuleReference]] = pydantic.Field(default=None) |
| 86 |
""" |
| 87 |
The list of action modules and their versions used by this action version. |
| 88 |
""" |
| 89 |
|
| 90 |
if IS_PYDANTIC_V2: |
| 91 |
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) |
| 92 |
else: |
| 93 |
|
| 94 |
class Config: |
| 95 |
frozen = True |
| 96 |
smart_union = True |
| 97 |
extra = pydantic.Extra.allow |