diff --git a/pyproject.toml b/pyproject.toml index 0a5b353..d3d3731 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "pipedream" [tool.poetry] name = "pipedream" -version = "1.0.4" +version = "1.0.5" description = "" readme = "README.md" authors = [] diff --git a/src/pipedream/__init__.py b/src/pipedream/__init__.py index 0821076..ad88e48 100644 --- a/src/pipedream/__init__.py +++ b/src/pipedream/__init__.py @@ -13,7 +13,7 @@ ComponentStash, ConfigurableProp, ConfigurablePropAlert, - ConfigurablePropAlertAlertType, + ConfigurablePropAlertType, ConfigurablePropAny, ConfigurablePropApp, ConfigurablePropBoolean, @@ -24,9 +24,7 @@ ConfigurablePropStringArray, ConfigurePropOpts, ConfigurePropResponse, - ConnectTokenCreateOpts, - ConnectTokenResponse, - CreateBrowserClientOpts, + ConnectToken, CreateOAuthTokenResponse, CreateTokenResponse, DeleteTriggerOpts, @@ -51,12 +49,14 @@ PageInfo, ProjectEnvironment, ProjectInfoResponse, - ProjectInfoResponseAppsItem, + ProjectInfoResponseApp, PropOption, ProxyResponse, ReloadPropsOpts, ReloadPropsResponse, RunActionResponse, + RunActionOptsStashId, + StashId, StartConnectOpts, ValidateTokenParams, ValidateTokenResponse, @@ -95,7 +95,7 @@ "ComponentStash", "ConfigurableProp", "ConfigurablePropAlert", - "ConfigurablePropAlertAlertType", + "ConfigurablePropAlertType", "ConfigurablePropAny", "ConfigurablePropApp", "ConfigurablePropBoolean", @@ -106,9 +106,7 @@ "ConfigurablePropStringArray", "ConfigurePropOpts", "ConfigurePropResponse", - "ConnectTokenCreateOpts", - "ConnectTokenResponse", - "CreateBrowserClientOpts", + "ConnectToken", "CreateOAuthTokenResponse", "CreateTokenResponse", "DeleteTriggerOpts", @@ -135,12 +133,14 @@ "PipedreamEnvironment", "ProjectEnvironment", "ProjectInfoResponse", - "ProjectInfoResponseAppsItem", + "ProjectInfoResponseApp", "PropOption", "ProxyResponse", "ReloadPropsOpts", "ReloadPropsResponse", "RunActionResponse", + "RunActionOptsStashId", + "StashId", "StartConnectOpts", "ValidateTokenParams", "ValidateTokenResponse", diff --git a/src/pipedream/actions/__init__.py b/src/pipedream/actions/__init__.py index ad121b7..5cde020 100644 --- a/src/pipedream/actions/__init__.py +++ b/src/pipedream/actions/__init__.py @@ -2,6 +2,3 @@ # isort: skip_file -from .types import RunActionOptsStashId - -__all__ = ["RunActionOptsStashId"] diff --git a/src/pipedream/actions/client.py b/src/pipedream/actions/client.py index 3a58b56..eb5d39e 100644 --- a/src/pipedream/actions/client.py +++ b/src/pipedream/actions/client.py @@ -8,9 +8,9 @@ from ..types.component import Component from ..types.configure_prop_response import ConfigurePropResponse from ..types.reload_props_response import ReloadPropsResponse +from ..types.run_action_opts_stash_id import RunActionOptsStashId from ..types.run_action_response import RunActionResponse from .raw_client import AsyncRawActionsClient, RawActionsClient -from .types.run_action_opts_stash_id import RunActionOptsStashId # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -310,7 +310,6 @@ def run( The ID for dynamic props stash_id : typing.Optional[RunActionOptsStashId] - The ID of the File Stash to use for syncing the action's /tmp directory request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -676,7 +675,6 @@ async def run( The ID for dynamic props stash_id : typing.Optional[RunActionOptsStashId] - The ID of the File Stash to use for syncing the action's /tmp directory request_options : typing.Optional[RequestOptions] Request-specific configuration. diff --git a/src/pipedream/actions/raw_client.py b/src/pipedream/actions/raw_client.py index 7360b4b..12212d8 100644 --- a/src/pipedream/actions/raw_client.py +++ b/src/pipedream/actions/raw_client.py @@ -16,8 +16,8 @@ from ..types.get_component_response import GetComponentResponse from ..types.get_components_response import GetComponentsResponse from ..types.reload_props_response import ReloadPropsResponse +from ..types.run_action_opts_stash_id import RunActionOptsStashId from ..types.run_action_response import RunActionResponse -from .types.run_action_opts_stash_id import RunActionOptsStashId # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -345,7 +345,6 @@ def run( The ID for dynamic props stash_id : typing.Optional[RunActionOptsStashId] - The ID of the File Stash to use for syncing the action's /tmp directory request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -715,7 +714,6 @@ async def run( The ID for dynamic props stash_id : typing.Optional[RunActionOptsStashId] - The ID of the File Stash to use for syncing the action's /tmp directory request_options : typing.Optional[RequestOptions] Request-specific configuration. diff --git a/src/pipedream/actions/types/__init__.py b/src/pipedream/actions/types/__init__.py deleted file mode 100644 index 52a8a91..0000000 --- a/src/pipedream/actions/types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -# isort: skip_file - -from .run_action_opts_stash_id import RunActionOptsStashId - -__all__ = ["RunActionOptsStashId"] diff --git a/src/pipedream/core/client_wrapper.py b/src/pipedream/core/client_wrapper.py index 2f40735..6a68ab4 100644 --- a/src/pipedream/core/client_wrapper.py +++ b/src/pipedream/core/client_wrapper.py @@ -27,10 +27,10 @@ def __init__( def get_headers(self) -> typing.Dict[str, str]: headers: typing.Dict[str, str] = { - "User-Agent": "pipedream/1.0.4", + "User-Agent": "pipedream/1.0.5", "X-Fern-Language": "Python", "X-Fern-SDK-Name": "pipedream", - "X-Fern-SDK-Version": "1.0.4", + "X-Fern-SDK-Version": "1.0.5", **(self.get_custom_headers() or {}), } if self._project_environment is not None: diff --git a/src/pipedream/tokens/client.py b/src/pipedream/tokens/client.py index c13ff6c..2cf58c8 100644 --- a/src/pipedream/tokens/client.py +++ b/src/pipedream/tokens/client.py @@ -4,6 +4,7 @@ from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ..core.request_options import RequestOptions +from ..types.connect_token import ConnectToken from ..types.create_token_response import CreateTokenResponse from ..types.validate_token_params import ValidateTokenParams from ..types.validate_token_response import ValidateTokenResponse @@ -90,7 +91,7 @@ def create( def validate( self, - ctok: str, + ctok: ConnectToken, *, params: typing.Optional[ValidateTokenParams] = None, request_options: typing.Optional[RequestOptions] = None, @@ -98,7 +99,7 @@ def validate( """ Parameters ---------- - ctok : str + ctok : ConnectToken params : typing.Optional[ValidateTokenParams] @@ -213,7 +214,7 @@ async def main() -> None: async def validate( self, - ctok: str, + ctok: ConnectToken, *, params: typing.Optional[ValidateTokenParams] = None, request_options: typing.Optional[RequestOptions] = None, @@ -221,7 +222,7 @@ async def validate( """ Parameters ---------- - ctok : str + ctok : ConnectToken params : typing.Optional[ValidateTokenParams] diff --git a/src/pipedream/tokens/raw_client.py b/src/pipedream/tokens/raw_client.py index 0d85a22..36aefbc 100644 --- a/src/pipedream/tokens/raw_client.py +++ b/src/pipedream/tokens/raw_client.py @@ -10,6 +10,7 @@ from ..core.pydantic_utilities import parse_obj_as from ..core.request_options import RequestOptions from ..core.serialization import convert_and_respect_annotation_metadata +from ..types.connect_token import ConnectToken from ..types.create_token_response import CreateTokenResponse from ..types.validate_token_params import ValidateTokenParams from ..types.validate_token_response import ValidateTokenResponse @@ -91,7 +92,7 @@ def create( def validate( self, - ctok: str, + ctok: ConnectToken, *, params: typing.Optional[ValidateTokenParams] = None, request_options: typing.Optional[RequestOptions] = None, @@ -99,7 +100,7 @@ def validate( """ Parameters ---------- - ctok : str + ctok : ConnectToken params : typing.Optional[ValidateTokenParams] @@ -112,7 +113,7 @@ def validate( connect token validated """ _response = self._client_wrapper.httpx_client.request( - f"v1/connect/{jsonable_encoder(self._client_wrapper._project_id)}/tokens/{jsonable_encoder(ctok)}/validate", + f"v1/connect/tokens/{jsonable_encoder(ctok)}/validate", method="GET", params={ "params": convert_and_respect_annotation_metadata( @@ -210,7 +211,7 @@ async def create( async def validate( self, - ctok: str, + ctok: ConnectToken, *, params: typing.Optional[ValidateTokenParams] = None, request_options: typing.Optional[RequestOptions] = None, @@ -218,7 +219,7 @@ async def validate( """ Parameters ---------- - ctok : str + ctok : ConnectToken params : typing.Optional[ValidateTokenParams] @@ -231,7 +232,7 @@ async def validate( connect token validated """ _response = await self._client_wrapper.httpx_client.request( - f"v1/connect/{jsonable_encoder(self._client_wrapper._project_id)}/tokens/{jsonable_encoder(ctok)}/validate", + f"v1/connect/tokens/{jsonable_encoder(ctok)}/validate", method="GET", params={ "params": convert_and_respect_annotation_metadata( diff --git a/src/pipedream/types/__init__.py b/src/pipedream/types/__init__.py index fc63eed..8ec8f33 100644 --- a/src/pipedream/types/__init__.py +++ b/src/pipedream/types/__init__.py @@ -12,7 +12,7 @@ from .component_stash import ComponentStash from .configurable_prop import ConfigurableProp from .configurable_prop_alert import ConfigurablePropAlert -from .configurable_prop_alert_alert_type import ConfigurablePropAlertAlertType +from .configurable_prop_alert_type import ConfigurablePropAlertType from .configurable_prop_any import ConfigurablePropAny from .configurable_prop_app import ConfigurablePropApp from .configurable_prop_boolean import ConfigurablePropBoolean @@ -23,9 +23,7 @@ from .configurable_prop_string_array import ConfigurablePropStringArray from .configure_prop_opts import ConfigurePropOpts from .configure_prop_response import ConfigurePropResponse -from .connect_token_create_opts import ConnectTokenCreateOpts -from .connect_token_response import ConnectTokenResponse -from .create_browser_client_opts import CreateBrowserClientOpts +from .connect_token import ConnectToken from .create_o_auth_token_response import CreateOAuthTokenResponse from .create_token_response import CreateTokenResponse from .delete_trigger_opts import DeleteTriggerOpts @@ -50,13 +48,15 @@ from .page_info import PageInfo from .project_environment import ProjectEnvironment from .project_info_response import ProjectInfoResponse -from .project_info_response_apps_item import ProjectInfoResponseAppsItem +from .project_info_response_app import ProjectInfoResponseApp from .prop_option import PropOption from .proxy_response import ProxyResponse from .reload_props_opts import ReloadPropsOpts from .reload_props_response import ReloadPropsResponse +from .run_action_opts_stash_id import RunActionOptsStashId from .run_action_response import RunActionResponse from .start_connect_opts import StartConnectOpts +from .stash_id import StashId from .validate_token_params import ValidateTokenParams from .validate_token_response import ValidateTokenResponse @@ -71,7 +71,7 @@ "ComponentStash", "ConfigurableProp", "ConfigurablePropAlert", - "ConfigurablePropAlertAlertType", + "ConfigurablePropAlertType", "ConfigurablePropAny", "ConfigurablePropApp", "ConfigurablePropBoolean", @@ -82,9 +82,7 @@ "ConfigurablePropStringArray", "ConfigurePropOpts", "ConfigurePropResponse", - "ConnectTokenCreateOpts", - "ConnectTokenResponse", - "CreateBrowserClientOpts", + "ConnectToken", "CreateOAuthTokenResponse", "CreateTokenResponse", "DeleteTriggerOpts", @@ -109,13 +107,15 @@ "PageInfo", "ProjectEnvironment", "ProjectInfoResponse", - "ProjectInfoResponseAppsItem", + "ProjectInfoResponseApp", "PropOption", "ProxyResponse", "ReloadPropsOpts", "ReloadPropsResponse", + "RunActionOptsStashId", "RunActionResponse", "StartConnectOpts", + "StashId", "ValidateTokenParams", "ValidateTokenResponse", ] diff --git a/src/pipedream/types/app.py b/src/pipedream/types/app.py index 9389fe4..10042cf 100644 --- a/src/pipedream/types/app.py +++ b/src/pipedream/types/app.py @@ -27,11 +27,7 @@ class App(UniversalBaseModel): The human-readable name of the app """ - auth_type: typing.Optional[AppAuthType] = pydantic.Field(default=None) - """ - The authentication type used by the app - """ - + auth_type: typing.Optional[AppAuthType] = None description: typing.Optional[str] = pydantic.Field(default=None) """ A short description of the app diff --git a/src/pipedream/types/component.py b/src/pipedream/types/component.py index 5d27cbd..5ea1ff2 100644 --- a/src/pipedream/types/component.py +++ b/src/pipedream/types/component.py @@ -35,10 +35,7 @@ class Component(UniversalBaseModel): The type of component (trigger or action) """ - stash: typing.Optional[ComponentStash] = pydantic.Field(default=None) - """ - Indicates if a File Stash ID is optional or required to run the component - """ + stash: typing.Optional[ComponentStash] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/pipedream/types/configurable_prop_alert.py b/src/pipedream/types/configurable_prop_alert.py index 0cd7b5d..acd7ea7 100644 --- a/src/pipedream/types/configurable_prop_alert.py +++ b/src/pipedream/types/configurable_prop_alert.py @@ -6,18 +6,14 @@ import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from ..core.serialization import FieldMetadata -from .configurable_prop_alert_alert_type import ConfigurablePropAlertAlertType +from .configurable_prop_alert_type import ConfigurablePropAlertType class ConfigurablePropAlert(UniversalBaseModel): type: typing.Optional[typing.Literal["alert"]] = None alert_type: typing_extensions.Annotated[ - typing.Optional[ConfigurablePropAlertAlertType], FieldMetadata(alias="alertType") - ] = pydantic.Field(default=None) - """ - The severity level of the alert. - """ - + typing.Optional[ConfigurablePropAlertType], FieldMetadata(alias="alertType") + ] = None content: typing.Optional[str] = pydantic.Field(default=None) """ The content of the alert, which can include HTML or plain text. diff --git a/src/pipedream/types/configurable_prop_alert_alert_type.py b/src/pipedream/types/configurable_prop_alert_alert_type.py deleted file mode 100644 index 2fd84e6..0000000 --- a/src/pipedream/types/configurable_prop_alert_alert_type.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -ConfigurablePropAlertAlertType = typing.Union[typing.Literal["info", "neutral", "warning", "error"], typing.Any] diff --git a/src/pipedream/types/configurable_prop_alert_type.py b/src/pipedream/types/configurable_prop_alert_type.py new file mode 100644 index 0000000..5223c58 --- /dev/null +++ b/src/pipedream/types/configurable_prop_alert_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ConfigurablePropAlertType = typing.Union[typing.Literal["info", "neutral", "warning", "error"], typing.Any] diff --git a/src/pipedream/types/configure_prop_response.py b/src/pipedream/types/configure_prop_response.py index 44f7086..6ed721f 100644 --- a/src/pipedream/types/configure_prop_response.py +++ b/src/pipedream/types/configure_prop_response.py @@ -14,9 +14,29 @@ class ConfigurePropResponse(UniversalBaseModel): options: typing.Optional[typing.List[PropOption]] = pydantic.Field(default=None) """ + Available options (with labels) for the configured prop + """ + + string_options: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ Available options for the configured prop """ + observations: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None) + """ + Any logs produced during the configuration of the prop + """ + + async_handle: typing.Optional[str] = pydantic.Field(default=None) + """ + Handle for async operations + """ + + context: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None) + """ + New context after configuring the prop + """ + errors: typing.Optional[typing.List[str]] = pydantic.Field(default=None) """ Any errors that occurred during configuration diff --git a/src/pipedream/types/connect_token.py b/src/pipedream/types/connect_token.py new file mode 100644 index 0000000..2be0ae5 --- /dev/null +++ b/src/pipedream/types/connect_token.py @@ -0,0 +1,3 @@ +# This file was auto-generated by Fern from our API Definition. + +ConnectToken = str diff --git a/src/pipedream/types/connect_token_create_opts.py b/src/pipedream/types/connect_token_create_opts.py deleted file mode 100644 index 2940955..0000000 --- a/src/pipedream/types/connect_token_create_opts.py +++ /dev/null @@ -1,46 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel - - -class ConnectTokenCreateOpts(UniversalBaseModel): - """ - Options for creating a Connect token - """ - - external_user_id: str = pydantic.Field() - """ - Your end user ID, for whom you're creating the token - """ - - allowed_origins: typing.Optional[typing.List[str]] = pydantic.Field(default=None) - """ - List of allowed origins for CORS - """ - - error_redirect_uri: typing.Optional[str] = pydantic.Field(default=None) - """ - URI to redirect to on error - """ - - success_redirect_uri: typing.Optional[str] = pydantic.Field(default=None) - """ - URI to redirect to on success - """ - - webhook_uri: typing.Optional[str] = pydantic.Field(default=None) - """ - Webhook URI for notifications - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/pipedream/types/connect_token_response.py b/src/pipedream/types/connect_token_response.py deleted file mode 100644 index c0f4cea..0000000 --- a/src/pipedream/types/connect_token_response.py +++ /dev/null @@ -1,37 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel - - -class ConnectTokenResponse(UniversalBaseModel): - """ - Response received after creating a connect token - """ - - connect_link_url: str = pydantic.Field() - """ - The Connect Link URL - """ - - expires_at: dt.datetime = pydantic.Field() - """ - The expiration time of the token in ISO 8601 format - """ - - token: str = pydantic.Field() - """ - The generated token - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/pipedream/types/create_browser_client_opts.py b/src/pipedream/types/create_browser_client_opts.py deleted file mode 100644 index 50400a4..0000000 --- a/src/pipedream/types/create_browser_client_opts.py +++ /dev/null @@ -1,26 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel - - -class CreateBrowserClientOpts(UniversalBaseModel): - """ - Options for creating a browser-side client - """ - - api_url: typing.Optional[str] = pydantic.Field(default=None) - """ - The API URL to use - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/pipedream/types/create_token_response.py b/src/pipedream/types/create_token_response.py index 738ce83..7d33485 100644 --- a/src/pipedream/types/create_token_response.py +++ b/src/pipedream/types/create_token_response.py @@ -5,6 +5,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .connect_token import ConnectToken class CreateTokenResponse(UniversalBaseModel): @@ -22,10 +23,7 @@ class CreateTokenResponse(UniversalBaseModel): The expiration time of the token in ISO 8601 format """ - token: str = pydantic.Field() - """ - The generated token - """ + token: ConnectToken if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/pipedream/types/project_info_response.py b/src/pipedream/types/project_info_response.py index 24c1c65..11a0016 100644 --- a/src/pipedream/types/project_info_response.py +++ b/src/pipedream/types/project_info_response.py @@ -4,7 +4,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .project_info_response_apps_item import ProjectInfoResponseAppsItem +from .project_info_response_app import ProjectInfoResponseApp class ProjectInfoResponse(UniversalBaseModel): @@ -12,7 +12,7 @@ class ProjectInfoResponse(UniversalBaseModel): Response received when retrieving project info """ - apps: typing.List[ProjectInfoResponseAppsItem] + apps: typing.List[ProjectInfoResponseApp] if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/pipedream/types/project_info_response_apps_item.py b/src/pipedream/types/project_info_response_app.py similarity index 84% rename from src/pipedream/types/project_info_response_apps_item.py rename to src/pipedream/types/project_info_response_app.py index e8b0f61..57f4b61 100644 --- a/src/pipedream/types/project_info_response_apps_item.py +++ b/src/pipedream/types/project_info_response_app.py @@ -6,13 +6,13 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -class ProjectInfoResponseAppsItem(UniversalBaseModel): +class ProjectInfoResponseApp(UniversalBaseModel): id: typing.Optional[str] = pydantic.Field(default=None) """ ID of the app. Only applies for OAuth apps. """ - name_slug: str = pydantic.Field() + name_slug: typing.Optional[str] = pydantic.Field(default=None) """ The name slug of the target app """ diff --git a/src/pipedream/types/run_action_opts_stash_id.py b/src/pipedream/types/run_action_opts_stash_id.py new file mode 100644 index 0000000..39ea056 --- /dev/null +++ b/src/pipedream/types/run_action_opts_stash_id.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .stash_id import StashId + +RunActionOptsStashId = typing.Union[typing.Optional[StashId], typing.Literal["NEW"], bool] diff --git a/src/pipedream/types/run_action_response.py b/src/pipedream/types/run_action_response.py index 337017d..bfa834c 100644 --- a/src/pipedream/types/run_action_response.py +++ b/src/pipedream/types/run_action_response.py @@ -4,6 +4,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .stash_id import StashId class RunActionResponse(UniversalBaseModel): @@ -14,10 +15,7 @@ class RunActionResponse(UniversalBaseModel): exports: typing.Optional[typing.Optional[typing.Any]] = None os: typing.Optional[typing.Optional[typing.Any]] = None ret: typing.Optional[typing.Optional[typing.Any]] = None - stash_id: typing.Optional[str] = pydantic.Field(default=None) - """ - The ID of the File Stash that was used to sync the action's /tmp directory - """ + stash_id: typing.Optional[StashId] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/pipedream/actions/types/run_action_opts_stash_id.py b/src/pipedream/types/stash_id.py similarity index 62% rename from src/pipedream/actions/types/run_action_opts_stash_id.py rename to src/pipedream/types/stash_id.py index ff5baae..776db73 100644 --- a/src/pipedream/actions/types/run_action_opts_stash_id.py +++ b/src/pipedream/types/stash_id.py @@ -2,4 +2,4 @@ import typing -RunActionOptsStashId = typing.Union[str, bool] +StashId = typing.Optional[str]