diff --git a/pyproject.toml b/pyproject.toml index 6a115d7..6f60434 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "pipedream" [tool.poetry] name = "pipedream" -version = "1.0.6" +version = "1.0.7" description = "" readme = "README.md" authors = [] diff --git a/src/pipedream/actions/client.py b/src/pipedream/actions/client.py index a7a44f6..20db8b9 100644 --- a/src/pipedream/actions/client.py +++ b/src/pipedream/actions/client.py @@ -7,7 +7,6 @@ from ..core.request_options import RequestOptions from ..types.component import Component from ..types.configure_prop_response import ConfigurePropResponse -from ..types.configured_props import ConfiguredProps from ..types.reload_props_response import ReloadPropsResponse from ..types.run_action_opts_stash_id import RunActionOptsStashId from ..types.run_action_response import RunActionResponse @@ -132,7 +131,7 @@ def configure_prop( external_user_id: str, prop_name: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[ConfiguredProps] = OMIT, + configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, page: typing.Optional[float] = OMIT, prev_context: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, @@ -156,7 +155,8 @@ def configure_prop( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[ConfiguredProps] + configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + The configured properties for the component dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -214,7 +214,7 @@ def reload_props( id: str, external_user_id: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[ConfiguredProps] = OMIT, + configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> ReloadPropsResponse: @@ -232,7 +232,8 @@ def reload_props( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[ConfiguredProps] + configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + The configured properties for the component dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -275,7 +276,7 @@ def run( *, id: str, external_user_id: str, - configured_props: typing.Optional[ConfiguredProps] = OMIT, + configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, stash_id: typing.Optional[RunActionOptsStashId] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -291,7 +292,8 @@ def run( external_user_id : str The external user ID - configured_props : typing.Optional[ConfiguredProps] + configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + The configured properties for the action dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -466,7 +468,7 @@ async def configure_prop( external_user_id: str, prop_name: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[ConfiguredProps] = OMIT, + configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, page: typing.Optional[float] = OMIT, prev_context: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, @@ -490,7 +492,8 @@ async def configure_prop( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[ConfiguredProps] + configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + The configured properties for the component dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -556,7 +559,7 @@ async def reload_props( id: str, external_user_id: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[ConfiguredProps] = OMIT, + configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> ReloadPropsResponse: @@ -574,7 +577,8 @@ async def reload_props( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[ConfiguredProps] + configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + The configured properties for the component dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -625,7 +629,7 @@ async def run( *, id: str, external_user_id: str, - configured_props: typing.Optional[ConfiguredProps] = OMIT, + configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, stash_id: typing.Optional[RunActionOptsStashId] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -641,7 +645,8 @@ async def run( external_user_id : str The external user ID - configured_props : typing.Optional[ConfiguredProps] + configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + The configured properties for the action dynamic_props_id : typing.Optional[str] The ID for dynamic props diff --git a/src/pipedream/actions/raw_client.py b/src/pipedream/actions/raw_client.py index 026d20d..5efb6a8 100644 --- a/src/pipedream/actions/raw_client.py +++ b/src/pipedream/actions/raw_client.py @@ -13,7 +13,6 @@ from ..core.serialization import convert_and_respect_annotation_metadata from ..types.component import Component from ..types.configure_prop_response import ConfigurePropResponse -from ..types.configured_props import ConfiguredProps from ..types.get_component_response import GetComponentResponse from ..types.get_components_response import GetComponentsResponse from ..types.reload_props_response import ReloadPropsResponse @@ -156,7 +155,7 @@ def configure_prop( external_user_id: str, prop_name: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[ConfiguredProps] = OMIT, + configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, page: typing.Optional[float] = OMIT, prev_context: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, @@ -180,7 +179,8 @@ def configure_prop( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[ConfiguredProps] + configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + The configured properties for the component dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -210,9 +210,7 @@ def configure_prop( "external_user_id": external_user_id, "prop_name": prop_name, "blocking": blocking, - "configured_props": convert_and_respect_annotation_metadata( - object_=configured_props, annotation=ConfiguredProps, direction="write" - ), + "configured_props": configured_props, "dynamic_props_id": dynamic_props_id, "page": page, "prev_context": prev_context, @@ -245,7 +243,7 @@ def reload_props( id: str, external_user_id: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[ConfiguredProps] = OMIT, + configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[ReloadPropsResponse]: @@ -263,7 +261,8 @@ def reload_props( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[ConfiguredProps] + configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + The configured properties for the component dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -283,9 +282,7 @@ def reload_props( "id": id, "external_user_id": external_user_id, "blocking": blocking, - "configured_props": convert_and_respect_annotation_metadata( - object_=configured_props, annotation=ConfiguredProps, direction="write" - ), + "configured_props": configured_props, "dynamic_props_id": dynamic_props_id, }, headers={ @@ -314,7 +311,7 @@ def run( *, id: str, external_user_id: str, - configured_props: typing.Optional[ConfiguredProps] = OMIT, + configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, stash_id: typing.Optional[RunActionOptsStashId] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -330,7 +327,8 @@ def run( external_user_id : str The external user ID - configured_props : typing.Optional[ConfiguredProps] + configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + The configured properties for the action dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -351,9 +349,7 @@ def run( json={ "id": id, "external_user_id": external_user_id, - "configured_props": convert_and_respect_annotation_metadata( - object_=configured_props, annotation=ConfiguredProps, direction="write" - ), + "configured_props": configured_props, "dynamic_props_id": dynamic_props_id, "stash_id": convert_and_respect_annotation_metadata( object_=stash_id, annotation=RunActionOptsStashId, direction="write" @@ -516,7 +512,7 @@ async def configure_prop( external_user_id: str, prop_name: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[ConfiguredProps] = OMIT, + configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, page: typing.Optional[float] = OMIT, prev_context: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, @@ -540,7 +536,8 @@ async def configure_prop( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[ConfiguredProps] + configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + The configured properties for the component dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -570,9 +567,7 @@ async def configure_prop( "external_user_id": external_user_id, "prop_name": prop_name, "blocking": blocking, - "configured_props": convert_and_respect_annotation_metadata( - object_=configured_props, annotation=ConfiguredProps, direction="write" - ), + "configured_props": configured_props, "dynamic_props_id": dynamic_props_id, "page": page, "prev_context": prev_context, @@ -605,7 +600,7 @@ async def reload_props( id: str, external_user_id: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[ConfiguredProps] = OMIT, + configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[ReloadPropsResponse]: @@ -623,7 +618,8 @@ async def reload_props( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[ConfiguredProps] + configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + The configured properties for the component dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -643,9 +639,7 @@ async def reload_props( "id": id, "external_user_id": external_user_id, "blocking": blocking, - "configured_props": convert_and_respect_annotation_metadata( - object_=configured_props, annotation=ConfiguredProps, direction="write" - ), + "configured_props": configured_props, "dynamic_props_id": dynamic_props_id, }, headers={ @@ -674,7 +668,7 @@ async def run( *, id: str, external_user_id: str, - configured_props: typing.Optional[ConfiguredProps] = OMIT, + configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, stash_id: typing.Optional[RunActionOptsStashId] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -690,7 +684,8 @@ async def run( external_user_id : str The external user ID - configured_props : typing.Optional[ConfiguredProps] + configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + The configured properties for the action dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -711,9 +706,7 @@ async def run( json={ "id": id, "external_user_id": external_user_id, - "configured_props": convert_and_respect_annotation_metadata( - object_=configured_props, annotation=ConfiguredProps, direction="write" - ), + "configured_props": configured_props, "dynamic_props_id": dynamic_props_id, "stash_id": convert_and_respect_annotation_metadata( object_=stash_id, annotation=RunActionOptsStashId, direction="write" diff --git a/src/pipedream/apps/__init__.py b/src/pipedream/apps/__init__.py index 28a82cb..66417f3 100644 --- a/src/pipedream/apps/__init__.py +++ b/src/pipedream/apps/__init__.py @@ -2,31 +2,6 @@ # isort: skip_file -import typing -from importlib import import_module - -if typing.TYPE_CHECKING: - from .types import AppsListRequestSortDirection, AppsListRequestSortKey -_dynamic_imports: typing.Dict[str, str] = {"AppsListRequestSortDirection": ".types", "AppsListRequestSortKey": ".types"} - - -def __getattr__(attr_name: str) -> typing.Any: - module_name = _dynamic_imports.get(attr_name) - if module_name is None: - raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") - try: - module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result - except ImportError as e: - raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e - except AttributeError as e: - raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e - - -def __dir__(): - lazy_attrs = list(_dynamic_imports.keys()) - return sorted(lazy_attrs) - +from .types import AppsListRequestSortDirection, AppsListRequestSortKey __all__ = ["AppsListRequestSortDirection", "AppsListRequestSortKey"] diff --git a/src/pipedream/apps/types/__init__.py b/src/pipedream/apps/types/__init__.py index a6c7583..87ed3b2 100644 --- a/src/pipedream/apps/types/__init__.py +++ b/src/pipedream/apps/types/__init__.py @@ -2,35 +2,7 @@ # isort: skip_file -import typing -from importlib import import_module - -if typing.TYPE_CHECKING: - from .apps_list_request_sort_direction import AppsListRequestSortDirection - from .apps_list_request_sort_key import AppsListRequestSortKey -_dynamic_imports: typing.Dict[str, str] = { - "AppsListRequestSortDirection": ".apps_list_request_sort_direction", - "AppsListRequestSortKey": ".apps_list_request_sort_key", -} - - -def __getattr__(attr_name: str) -> typing.Any: - module_name = _dynamic_imports.get(attr_name) - if module_name is None: - raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") - try: - module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result - except ImportError as e: - raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e - except AttributeError as e: - raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e - - -def __dir__(): - lazy_attrs = list(_dynamic_imports.keys()) - return sorted(lazy_attrs) - +from .apps_list_request_sort_direction import AppsListRequestSortDirection +from .apps_list_request_sort_key import AppsListRequestSortKey __all__ = ["AppsListRequestSortDirection", "AppsListRequestSortKey"] diff --git a/src/pipedream/client.py b/src/pipedream/client.py index 7fbf529..05f4186 100644 --- a/src/pipedream/client.py +++ b/src/pipedream/client.py @@ -1,30 +1,26 @@ # This file was auto-generated by Fern from our API Definition. -from __future__ import annotations - import os import typing import httpx -from .types.project_environment import ProjectEnvironment +from ._.types.project_environment import ProjectEnvironment +from .accounts.client import AccountsClient, AsyncAccountsClient +from .actions.client import ActionsClient, AsyncActionsClient +from .app_categories.client import AppCategoriesClient, AsyncAppCategoriesClient +from .apps.client import AppsClient, AsyncAppsClient +from .components.client import AsyncComponentsClient, ComponentsClient from .core.api_error import ApiError from .core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from .core.oauth_token_provider import OAuthTokenProvider +from .deployed_triggers.client import AsyncDeployedTriggersClient, DeployedTriggersClient from .environment import PipedreamEnvironment - -if typing.TYPE_CHECKING: - from .accounts.client import AccountsClient, AsyncAccountsClient - from .actions.client import ActionsClient, AsyncActionsClient - from .app_categories.client import AppCategoriesClient, AsyncAppCategoriesClient - from .apps.client import AppsClient, AsyncAppsClient - from .components.client import AsyncComponentsClient, ComponentsClient - from .deployed_triggers.client import AsyncDeployedTriggersClient, DeployedTriggersClient - from .oauth_tokens.client import AsyncOauthTokensClient, OauthTokensClient - from .projects.client import AsyncProjectsClient, ProjectsClient - from .proxy.client import AsyncProxyClient, ProxyClient - from .tokens.client import AsyncTokensClient, TokensClient - from .triggers.client import AsyncTriggersClient, TriggersClient - from .users.client import AsyncUsersClient, UsersClient +from .oauth_tokens.client import AsyncOauthTokensClient, OauthTokensClient +from .projects.client import AsyncProjectsClient, ProjectsClient +from .proxy.client import AsyncProxyClient, ProxyClient +from .tokens.client import AsyncTokensClient, TokensClient +from .triggers.client import AsyncTriggersClient, TriggersClient +from .users.client import AsyncUsersClient, UsersClient class Client: @@ -121,114 +117,18 @@ def __init__( else httpx.Client(timeout=_defaulted_timeout), timeout=_defaulted_timeout, ) - self._app_categories: typing.Optional[AppCategoriesClient] = None - self._apps: typing.Optional[AppsClient] = None - self._accounts: typing.Optional[AccountsClient] = None - self._users: typing.Optional[UsersClient] = None - self._components: typing.Optional[ComponentsClient] = None - self._actions: typing.Optional[ActionsClient] = None - self._triggers: typing.Optional[TriggersClient] = None - self._deployed_triggers: typing.Optional[DeployedTriggersClient] = None - self._projects: typing.Optional[ProjectsClient] = None - self._proxy: typing.Optional[ProxyClient] = None - self._tokens: typing.Optional[TokensClient] = None - self._oauth_tokens: typing.Optional[OauthTokensClient] = None - - @property - def app_categories(self): - if self._app_categories is None: - from .app_categories.client import AppCategoriesClient # noqa: E402 - - self._app_categories = AppCategoriesClient(client_wrapper=self._client_wrapper) - return self._app_categories - - @property - def apps(self): - if self._apps is None: - from .apps.client import AppsClient # noqa: E402 - - self._apps = AppsClient(client_wrapper=self._client_wrapper) - return self._apps - - @property - def accounts(self): - if self._accounts is None: - from .accounts.client import AccountsClient # noqa: E402 - - self._accounts = AccountsClient(client_wrapper=self._client_wrapper) - return self._accounts - - @property - def users(self): - if self._users is None: - from .users.client import UsersClient # noqa: E402 - - self._users = UsersClient(client_wrapper=self._client_wrapper) - return self._users - - @property - def components(self): - if self._components is None: - from .components.client import ComponentsClient # noqa: E402 - - self._components = ComponentsClient(client_wrapper=self._client_wrapper) - return self._components - - @property - def actions(self): - if self._actions is None: - from .actions.client import ActionsClient # noqa: E402 - - self._actions = ActionsClient(client_wrapper=self._client_wrapper) - return self._actions - - @property - def triggers(self): - if self._triggers is None: - from .triggers.client import TriggersClient # noqa: E402 - - self._triggers = TriggersClient(client_wrapper=self._client_wrapper) - return self._triggers - - @property - def deployed_triggers(self): - if self._deployed_triggers is None: - from .deployed_triggers.client import DeployedTriggersClient # noqa: E402 - - self._deployed_triggers = DeployedTriggersClient(client_wrapper=self._client_wrapper) - return self._deployed_triggers - - @property - def projects(self): - if self._projects is None: - from .projects.client import ProjectsClient # noqa: E402 - - self._projects = ProjectsClient(client_wrapper=self._client_wrapper) - return self._projects - - @property - def proxy(self): - if self._proxy is None: - from .proxy.client import ProxyClient # noqa: E402 - - self._proxy = ProxyClient(client_wrapper=self._client_wrapper) - return self._proxy - - @property - def tokens(self): - if self._tokens is None: - from .tokens.client import TokensClient # noqa: E402 - - self._tokens = TokensClient(client_wrapper=self._client_wrapper) - return self._tokens - - @property - def oauth_tokens(self): - if self._oauth_tokens is None: - from .oauth_tokens.client import OauthTokensClient # noqa: E402 - - self._oauth_tokens = OauthTokensClient(client_wrapper=self._client_wrapper) - return self._oauth_tokens + self.app_categories = AppCategoriesClient(client_wrapper=self._client_wrapper) + self.apps = AppsClient(client_wrapper=self._client_wrapper) + self.accounts = AccountsClient(client_wrapper=self._client_wrapper) + self.users = UsersClient(client_wrapper=self._client_wrapper) + self.components = ComponentsClient(client_wrapper=self._client_wrapper) + self.actions = ActionsClient(client_wrapper=self._client_wrapper) + self.triggers = TriggersClient(client_wrapper=self._client_wrapper) + self.deployed_triggers = DeployedTriggersClient(client_wrapper=self._client_wrapper) + self.projects = ProjectsClient(client_wrapper=self._client_wrapper) + self.proxy = ProxyClient(client_wrapper=self._client_wrapper) + self.tokens = TokensClient(client_wrapper=self._client_wrapper) + self.oauth_tokens = OauthTokensClient(client_wrapper=self._client_wrapper) class AsyncClient: @@ -325,114 +225,18 @@ def __init__( else httpx.AsyncClient(timeout=_defaulted_timeout), timeout=_defaulted_timeout, ) - self._app_categories: typing.Optional[AsyncAppCategoriesClient] = None - self._apps: typing.Optional[AsyncAppsClient] = None - self._accounts: typing.Optional[AsyncAccountsClient] = None - self._users: typing.Optional[AsyncUsersClient] = None - self._components: typing.Optional[AsyncComponentsClient] = None - self._actions: typing.Optional[AsyncActionsClient] = None - self._triggers: typing.Optional[AsyncTriggersClient] = None - self._deployed_triggers: typing.Optional[AsyncDeployedTriggersClient] = None - self._projects: typing.Optional[AsyncProjectsClient] = None - self._proxy: typing.Optional[AsyncProxyClient] = None - self._tokens: typing.Optional[AsyncTokensClient] = None - self._oauth_tokens: typing.Optional[AsyncOauthTokensClient] = None - - @property - def app_categories(self): - if self._app_categories is None: - from .app_categories.client import AsyncAppCategoriesClient # noqa: E402 - - self._app_categories = AsyncAppCategoriesClient(client_wrapper=self._client_wrapper) - return self._app_categories - - @property - def apps(self): - if self._apps is None: - from .apps.client import AsyncAppsClient # noqa: E402 - - self._apps = AsyncAppsClient(client_wrapper=self._client_wrapper) - return self._apps - - @property - def accounts(self): - if self._accounts is None: - from .accounts.client import AsyncAccountsClient # noqa: E402 - - self._accounts = AsyncAccountsClient(client_wrapper=self._client_wrapper) - return self._accounts - - @property - def users(self): - if self._users is None: - from .users.client import AsyncUsersClient # noqa: E402 - - self._users = AsyncUsersClient(client_wrapper=self._client_wrapper) - return self._users - - @property - def components(self): - if self._components is None: - from .components.client import AsyncComponentsClient # noqa: E402 - - self._components = AsyncComponentsClient(client_wrapper=self._client_wrapper) - return self._components - - @property - def actions(self): - if self._actions is None: - from .actions.client import AsyncActionsClient # noqa: E402 - - self._actions = AsyncActionsClient(client_wrapper=self._client_wrapper) - return self._actions - - @property - def triggers(self): - if self._triggers is None: - from .triggers.client import AsyncTriggersClient # noqa: E402 - - self._triggers = AsyncTriggersClient(client_wrapper=self._client_wrapper) - return self._triggers - - @property - def deployed_triggers(self): - if self._deployed_triggers is None: - from .deployed_triggers.client import AsyncDeployedTriggersClient # noqa: E402 - - self._deployed_triggers = AsyncDeployedTriggersClient(client_wrapper=self._client_wrapper) - return self._deployed_triggers - - @property - def projects(self): - if self._projects is None: - from .projects.client import AsyncProjectsClient # noqa: E402 - - self._projects = AsyncProjectsClient(client_wrapper=self._client_wrapper) - return self._projects - - @property - def proxy(self): - if self._proxy is None: - from .proxy.client import AsyncProxyClient # noqa: E402 - - self._proxy = AsyncProxyClient(client_wrapper=self._client_wrapper) - return self._proxy - - @property - def tokens(self): - if self._tokens is None: - from .tokens.client import AsyncTokensClient # noqa: E402 - - self._tokens = AsyncTokensClient(client_wrapper=self._client_wrapper) - return self._tokens - - @property - def oauth_tokens(self): - if self._oauth_tokens is None: - from .oauth_tokens.client import AsyncOauthTokensClient # noqa: E402 - - self._oauth_tokens = AsyncOauthTokensClient(client_wrapper=self._client_wrapper) - return self._oauth_tokens + self.app_categories = AsyncAppCategoriesClient(client_wrapper=self._client_wrapper) + self.apps = AsyncAppsClient(client_wrapper=self._client_wrapper) + self.accounts = AsyncAccountsClient(client_wrapper=self._client_wrapper) + self.users = AsyncUsersClient(client_wrapper=self._client_wrapper) + self.components = AsyncComponentsClient(client_wrapper=self._client_wrapper) + self.actions = AsyncActionsClient(client_wrapper=self._client_wrapper) + self.triggers = AsyncTriggersClient(client_wrapper=self._client_wrapper) + self.deployed_triggers = AsyncDeployedTriggersClient(client_wrapper=self._client_wrapper) + self.projects = AsyncProjectsClient(client_wrapper=self._client_wrapper) + self.proxy = AsyncProxyClient(client_wrapper=self._client_wrapper) + self.tokens = AsyncTokensClient(client_wrapper=self._client_wrapper) + self.oauth_tokens = AsyncOauthTokensClient(client_wrapper=self._client_wrapper) def _get_base_url(*, base_url: typing.Optional[str] = None, environment: PipedreamEnvironment) -> str: diff --git a/src/pipedream/components/client.py b/src/pipedream/components/client.py index cb6a9c5..24f78d8 100644 --- a/src/pipedream/components/client.py +++ b/src/pipedream/components/client.py @@ -6,9 +6,7 @@ from ..core.pagination import AsyncPager, SyncPager from ..core.request_options import RequestOptions from ..types.component import Component -from ..types.component_type import ComponentType from ..types.configure_prop_response import ConfigurePropResponse -from ..types.configured_props import ConfiguredProps from ..types.reload_props_response import ReloadPropsResponse from .raw_client import AsyncRawComponentsClient, RawComponentsClient @@ -39,7 +37,6 @@ def list( limit: typing.Optional[int] = None, q: typing.Optional[str] = None, app: typing.Optional[str] = None, - component_type: typing.Optional[ComponentType] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[Component]: """ @@ -62,9 +59,6 @@ def list( app : typing.Optional[str] The ID or name slug of the app to filter the components - component_type : typing.Optional[ComponentType] - The type of the component to filter the components - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -91,13 +85,7 @@ def list( yield page """ return self._raw_client.list( - after=after, - before=before, - limit=limit, - q=q, - app=app, - component_type=component_type, - request_options=request_options, + after=after, before=before, limit=limit, q=q, app=app, request_options=request_options ) def retrieve(self, component_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Component: @@ -141,7 +129,7 @@ def configure_prop( external_user_id: str, prop_name: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[ConfiguredProps] = OMIT, + configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, page: typing.Optional[float] = OMIT, prev_context: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, @@ -165,7 +153,8 @@ def configure_prop( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[ConfiguredProps] + configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + The configured properties for the component dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -223,7 +212,7 @@ def reload_props( id: str, external_user_id: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[ConfiguredProps] = OMIT, + configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> ReloadPropsResponse: @@ -241,7 +230,8 @@ def reload_props( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[ConfiguredProps] + configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + The configured properties for the component dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -303,7 +293,6 @@ async def list( limit: typing.Optional[int] = None, q: typing.Optional[str] = None, app: typing.Optional[str] = None, - component_type: typing.Optional[ComponentType] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[Component]: """ @@ -326,9 +315,6 @@ async def list( app : typing.Optional[str] The ID or name slug of the app to filter the components - component_type : typing.Optional[ComponentType] - The type of the component to filter the components - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -364,13 +350,7 @@ async def main() -> None: asyncio.run(main()) """ return await self._raw_client.list( - after=after, - before=before, - limit=limit, - q=q, - app=app, - component_type=component_type, - request_options=request_options, + after=after, before=before, limit=limit, q=q, app=app, request_options=request_options ) async def retrieve( @@ -424,7 +404,7 @@ async def configure_prop( external_user_id: str, prop_name: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[ConfiguredProps] = OMIT, + configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, page: typing.Optional[float] = OMIT, prev_context: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, @@ -448,7 +428,8 @@ async def configure_prop( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[ConfiguredProps] + configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + The configured properties for the component dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -514,7 +495,7 @@ async def reload_props( id: str, external_user_id: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[ConfiguredProps] = OMIT, + configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> ReloadPropsResponse: @@ -532,7 +513,8 @@ async def reload_props( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[ConfiguredProps] + configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + The configured properties for the component dynamic_props_id : typing.Optional[str] The ID for dynamic props diff --git a/src/pipedream/components/raw_client.py b/src/pipedream/components/raw_client.py index b3cf1b2..e64f04d 100644 --- a/src/pipedream/components/raw_client.py +++ b/src/pipedream/components/raw_client.py @@ -10,11 +10,8 @@ from ..core.pagination import AsyncPager, BaseHttpResponse, SyncPager 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.component import Component -from ..types.component_type import ComponentType from ..types.configure_prop_response import ConfigurePropResponse -from ..types.configured_props import ConfiguredProps from ..types.get_component_response import GetComponentResponse from ..types.get_components_response import GetComponentsResponse from ..types.reload_props_response import ReloadPropsResponse @@ -35,7 +32,6 @@ def list( limit: typing.Optional[int] = None, q: typing.Optional[str] = None, app: typing.Optional[str] = None, - component_type: typing.Optional[ComponentType] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[Component]: """ @@ -58,9 +54,6 @@ def list( app : typing.Optional[str] The ID or name slug of the app to filter the components - component_type : typing.Optional[ComponentType] - The type of the component to filter the components - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -78,7 +71,6 @@ def list( "limit": limit, "q": q, "app": app, - "component_type": component_type, }, request_options=request_options, ) @@ -103,7 +95,6 @@ def list( limit=limit, q=q, app=app, - component_type=component_type, request_options=request_options, ) return SyncPager( @@ -161,7 +152,7 @@ def configure_prop( external_user_id: str, prop_name: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[ConfiguredProps] = OMIT, + configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, page: typing.Optional[float] = OMIT, prev_context: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, @@ -185,7 +176,8 @@ def configure_prop( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[ConfiguredProps] + configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + The configured properties for the component dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -215,9 +207,7 @@ def configure_prop( "external_user_id": external_user_id, "prop_name": prop_name, "blocking": blocking, - "configured_props": convert_and_respect_annotation_metadata( - object_=configured_props, annotation=ConfiguredProps, direction="write" - ), + "configured_props": configured_props, "dynamic_props_id": dynamic_props_id, "page": page, "prev_context": prev_context, @@ -250,7 +240,7 @@ def reload_props( id: str, external_user_id: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[ConfiguredProps] = OMIT, + configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[ReloadPropsResponse]: @@ -268,7 +258,8 @@ def reload_props( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[ConfiguredProps] + configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + The configured properties for the component dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -288,9 +279,7 @@ def reload_props( "id": id, "external_user_id": external_user_id, "blocking": blocking, - "configured_props": convert_and_respect_annotation_metadata( - object_=configured_props, annotation=ConfiguredProps, direction="write" - ), + "configured_props": configured_props, "dynamic_props_id": dynamic_props_id, }, headers={ @@ -327,7 +316,6 @@ async def list( limit: typing.Optional[int] = None, q: typing.Optional[str] = None, app: typing.Optional[str] = None, - component_type: typing.Optional[ComponentType] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[Component]: """ @@ -350,9 +338,6 @@ async def list( app : typing.Optional[str] The ID or name slug of the app to filter the components - component_type : typing.Optional[ComponentType] - The type of the component to filter the components - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -370,7 +355,6 @@ async def list( "limit": limit, "q": q, "app": app, - "component_type": component_type, }, request_options=request_options, ) @@ -397,7 +381,6 @@ async def _get_next(): limit=limit, q=q, app=app, - component_type=component_type, request_options=request_options, ) @@ -456,7 +439,7 @@ async def configure_prop( external_user_id: str, prop_name: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[ConfiguredProps] = OMIT, + configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, page: typing.Optional[float] = OMIT, prev_context: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, @@ -480,7 +463,8 @@ async def configure_prop( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[ConfiguredProps] + configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + The configured properties for the component dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -510,9 +494,7 @@ async def configure_prop( "external_user_id": external_user_id, "prop_name": prop_name, "blocking": blocking, - "configured_props": convert_and_respect_annotation_metadata( - object_=configured_props, annotation=ConfiguredProps, direction="write" - ), + "configured_props": configured_props, "dynamic_props_id": dynamic_props_id, "page": page, "prev_context": prev_context, @@ -545,7 +527,7 @@ async def reload_props( id: str, external_user_id: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[ConfiguredProps] = OMIT, + configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[ReloadPropsResponse]: @@ -563,7 +545,8 @@ async def reload_props( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[ConfiguredProps] + configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + The configured properties for the component dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -583,9 +566,7 @@ async def reload_props( "id": id, "external_user_id": external_user_id, "blocking": blocking, - "configured_props": convert_and_respect_annotation_metadata( - object_=configured_props, annotation=ConfiguredProps, direction="write" - ), + "configured_props": configured_props, "dynamic_props_id": dynamic_props_id, }, headers={ diff --git a/src/pipedream/core/__init__.py b/src/pipedream/core/__init__.py index f20f6b0..d1461de 100644 --- a/src/pipedream/core/__init__.py +++ b/src/pipedream/core/__init__.py @@ -2,80 +2,27 @@ # isort: skip_file -import typing -from importlib import import_module - -if typing.TYPE_CHECKING: - from .api_error import ApiError - from .client_wrapper import AsyncClientWrapper, BaseClientWrapper, SyncClientWrapper - from .datetime_utils import serialize_datetime - from .file import File, convert_file_dict_to_httpx_tuples, with_content_type - from .http_client import AsyncHttpClient, HttpClient - from .http_response import AsyncHttpResponse, HttpResponse - from .jsonable_encoder import jsonable_encoder - from .pagination import AsyncPager, SyncPager - from .pydantic_utilities import ( - IS_PYDANTIC_V2, - UniversalBaseModel, - UniversalRootModel, - parse_obj_as, - universal_field_validator, - universal_root_validator, - update_forward_refs, - ) - from .query_encoder import encode_query - from .remove_none_from_dict import remove_none_from_dict - from .request_options import RequestOptions - from .serialization import FieldMetadata, convert_and_respect_annotation_metadata -_dynamic_imports: typing.Dict[str, str] = { - "ApiError": ".api_error", - "AsyncClientWrapper": ".client_wrapper", - "AsyncHttpClient": ".http_client", - "AsyncHttpResponse": ".http_response", - "AsyncPager": ".pagination", - "BaseClientWrapper": ".client_wrapper", - "FieldMetadata": ".serialization", - "File": ".file", - "HttpClient": ".http_client", - "HttpResponse": ".http_response", - "IS_PYDANTIC_V2": ".pydantic_utilities", - "RequestOptions": ".request_options", - "SyncClientWrapper": ".client_wrapper", - "SyncPager": ".pagination", - "UniversalBaseModel": ".pydantic_utilities", - "UniversalRootModel": ".pydantic_utilities", - "convert_and_respect_annotation_metadata": ".serialization", - "convert_file_dict_to_httpx_tuples": ".file", - "encode_query": ".query_encoder", - "jsonable_encoder": ".jsonable_encoder", - "parse_obj_as": ".pydantic_utilities", - "remove_none_from_dict": ".remove_none_from_dict", - "serialize_datetime": ".datetime_utils", - "universal_field_validator": ".pydantic_utilities", - "universal_root_validator": ".pydantic_utilities", - "update_forward_refs": ".pydantic_utilities", - "with_content_type": ".file", -} - - -def __getattr__(attr_name: str) -> typing.Any: - module_name = _dynamic_imports.get(attr_name) - if module_name is None: - raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") - try: - module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result - except ImportError as e: - raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e - except AttributeError as e: - raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e - - -def __dir__(): - lazy_attrs = list(_dynamic_imports.keys()) - return sorted(lazy_attrs) - +from .api_error import ApiError +from .client_wrapper import AsyncClientWrapper, BaseClientWrapper, SyncClientWrapper +from .datetime_utils import serialize_datetime +from .file import File, convert_file_dict_to_httpx_tuples, with_content_type +from .http_client import AsyncHttpClient, HttpClient +from .http_response import AsyncHttpResponse, HttpResponse +from .jsonable_encoder import jsonable_encoder +from .pagination import AsyncPager, SyncPager +from .pydantic_utilities import ( + IS_PYDANTIC_V2, + UniversalBaseModel, + UniversalRootModel, + parse_obj_as, + universal_field_validator, + universal_root_validator, + update_forward_refs, +) +from .query_encoder import encode_query +from .remove_none_from_dict import remove_none_from_dict +from .request_options import RequestOptions +from .serialization import FieldMetadata, convert_and_respect_annotation_metadata __all__ = [ "ApiError", diff --git a/src/pipedream/core/client_wrapper.py b/src/pipedream/core/client_wrapper.py index ceedd88..834c9b6 100644 --- a/src/pipedream/core/client_wrapper.py +++ b/src/pipedream/core/client_wrapper.py @@ -3,7 +3,7 @@ import typing import httpx -from ..types.project_environment import ProjectEnvironment +from .._.types.project_environment import ProjectEnvironment from .http_client import AsyncHttpClient, HttpClient @@ -27,10 +27,10 @@ def __init__( def get_headers(self) -> typing.Dict[str, str]: headers: typing.Dict[str, str] = { - "User-Agent": "pipedream/1.0.6", + "User-Agent": "pipedream/1.0.7", "X-Fern-Language": "Python", "X-Fern-SDK-Name": "pipedream", - "X-Fern-SDK-Version": "1.0.6", + "X-Fern-SDK-Version": "1.0.7", **(self.get_custom_headers() or {}), } if self._project_environment is not None: diff --git a/src/pipedream/core/force_multipart.py b/src/pipedream/core/force_multipart.py index 5440913..ae24ccf 100644 --- a/src/pipedream/core/force_multipart.py +++ b/src/pipedream/core/force_multipart.py @@ -1,9 +1,7 @@ # This file was auto-generated by Fern from our API Definition. -from typing import Any, Dict - -class ForceMultipartDict(Dict[str, Any]): +class ForceMultipartDict(dict): """ A dictionary subclass that always evaluates to True in boolean contexts. @@ -11,7 +9,7 @@ class ForceMultipartDict(Dict[str, Any]): the dictionary is empty, which would normally evaluate to False. """ - def __bool__(self) -> bool: + def __bool__(self): return True diff --git a/src/pipedream/core/http_response.py b/src/pipedream/core/http_response.py index 2479747..48a1798 100644 --- a/src/pipedream/core/http_response.py +++ b/src/pipedream/core/http_response.py @@ -4,8 +4,8 @@ import httpx -# Generic to represent the underlying type of the data wrapped by the HTTP response. T = TypeVar("T") +"""Generic to represent the underlying type of the data wrapped by the HTTP response.""" class BaseHttpResponse: diff --git a/src/pipedream/core/pagination.py b/src/pipedream/core/pagination.py index 97bcb64..209a1ff 100644 --- a/src/pipedream/core/pagination.py +++ b/src/pipedream/core/pagination.py @@ -7,8 +7,8 @@ from .http_response import BaseHttpResponse -# Generic to represent the underlying type of the results within a page T = TypeVar("T") +"""Generic to represent the underlying type of the results within a page""" # SDKs implement a Page ABC per-pagination request, the endpoint then returns a pager that wraps this type diff --git a/src/pipedream/core/pydantic_utilities.py b/src/pipedream/core/pydantic_utilities.py index dd7d89f..7db2950 100644 --- a/src/pipedream/core/pydantic_utilities.py +++ b/src/pipedream/core/pydantic_utilities.py @@ -61,7 +61,7 @@ class UniversalBaseModel(pydantic.BaseModel): @pydantic.model_serializer(mode="plain", when_used="json") # type: ignore[attr-defined] def serialize_model(self) -> Any: # type: ignore[name-defined] - serialized = self.model_dump() # type: ignore[attr-defined] + serialized = self.model_dump() data = {k: serialize_datetime(v) if isinstance(v, dt.datetime) else v for k, v in serialized.items()} return data @@ -147,10 +147,7 @@ def dict(self, **kwargs: Any) -> Dict[str, Any]: dict_dump = super().dict(**kwargs_with_defaults_exclude_unset_include_fields) - return cast( - Dict[str, Any], - convert_and_respect_annotation_metadata(object_=dict_dump, annotation=self.__class__, direction="write"), - ) + return convert_and_respect_annotation_metadata(object_=dict_dump, annotation=self.__class__, direction="write") def _union_list_of_pydantic_dicts(source: List[Any], destination: List[Any]) -> List[Any]: diff --git a/src/pipedream/deployed_triggers/client.py b/src/pipedream/deployed_triggers/client.py index 9493eef..f2f5a7d 100644 --- a/src/pipedream/deployed_triggers/client.py +++ b/src/pipedream/deployed_triggers/client.py @@ -5,7 +5,6 @@ from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ..core.pagination import AsyncPager, SyncPager from ..core.request_options import RequestOptions -from ..types.configured_props import ConfiguredProps from ..types.deployed_component import DeployedComponent from ..types.emitted_event import EmittedEvent from ..types.get_trigger_webhooks_response import GetTriggerWebhooksResponse @@ -135,7 +134,7 @@ def update( *, external_user_id: str, active: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[ConfiguredProps] = OMIT, + configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, name: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> DeployedComponent: @@ -152,7 +151,8 @@ def update( active : typing.Optional[bool] Whether the trigger should be active - configured_props : typing.Optional[ConfiguredProps] + configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + The configured properties for the trigger name : typing.Optional[str] The name of the trigger @@ -609,7 +609,7 @@ async def update( *, external_user_id: str, active: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[ConfiguredProps] = OMIT, + configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, name: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> DeployedComponent: @@ -626,7 +626,8 @@ async def update( active : typing.Optional[bool] Whether the trigger should be active - configured_props : typing.Optional[ConfiguredProps] + configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + The configured properties for the trigger name : typing.Optional[str] The name of the trigger diff --git a/src/pipedream/deployed_triggers/raw_client.py b/src/pipedream/deployed_triggers/raw_client.py index 9ff533b..d1ef703 100644 --- a/src/pipedream/deployed_triggers/raw_client.py +++ b/src/pipedream/deployed_triggers/raw_client.py @@ -10,8 +10,6 @@ from ..core.pagination import AsyncPager, BaseHttpResponse, SyncPager 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.configured_props import ConfiguredProps from ..types.deployed_component import DeployedComponent from ..types.emitted_event import EmittedEvent from ..types.get_trigger_events_response import GetTriggerEventsResponse @@ -154,7 +152,7 @@ def update( *, external_user_id: str, active: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[ConfiguredProps] = OMIT, + configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, name: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[DeployedComponent]: @@ -171,7 +169,8 @@ def update( active : typing.Optional[bool] Whether the trigger should be active - configured_props : typing.Optional[ConfiguredProps] + configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + The configured properties for the trigger name : typing.Optional[str] The name of the trigger @@ -192,9 +191,7 @@ def update( }, json={ "active": active, - "configured_props": convert_and_respect_annotation_metadata( - object_=configured_props, annotation=ConfiguredProps, direction="write" - ), + "configured_props": configured_props, "name": name, }, headers={ @@ -658,7 +655,7 @@ async def update( *, external_user_id: str, active: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[ConfiguredProps] = OMIT, + configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, name: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[DeployedComponent]: @@ -675,7 +672,8 @@ async def update( active : typing.Optional[bool] Whether the trigger should be active - configured_props : typing.Optional[ConfiguredProps] + configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + The configured properties for the trigger name : typing.Optional[str] The name of the trigger @@ -696,9 +694,7 @@ async def update( }, json={ "active": active, - "configured_props": convert_and_respect_annotation_metadata( - object_=configured_props, annotation=ConfiguredProps, direction="write" - ), + "configured_props": configured_props, "name": name, }, headers={ diff --git a/src/pipedream/triggers/client.py b/src/pipedream/triggers/client.py index 32bf25d..ecefa64 100644 --- a/src/pipedream/triggers/client.py +++ b/src/pipedream/triggers/client.py @@ -7,7 +7,6 @@ from ..core.request_options import RequestOptions from ..types.component import Component from ..types.configure_prop_response import ConfigurePropResponse -from ..types.configured_props import ConfiguredProps from ..types.deployed_component import DeployedComponent from ..types.reload_props_response import ReloadPropsResponse from .raw_client import AsyncRawTriggersClient, RawTriggersClient @@ -131,7 +130,7 @@ def configure_prop( external_user_id: str, prop_name: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[ConfiguredProps] = OMIT, + configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, page: typing.Optional[float] = OMIT, prev_context: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, @@ -155,7 +154,8 @@ def configure_prop( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[ConfiguredProps] + configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + The configured properties for the component dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -213,7 +213,7 @@ def reload_props( id: str, external_user_id: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[ConfiguredProps] = OMIT, + configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> ReloadPropsResponse: @@ -231,7 +231,8 @@ def reload_props( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[ConfiguredProps] + configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + The configured properties for the component dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -274,7 +275,7 @@ def deploy( *, id: str, external_user_id: str, - configured_props: typing.Optional[ConfiguredProps] = OMIT, + configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, webhook_url: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -290,7 +291,8 @@ def deploy( external_user_id : str The external user ID - configured_props : typing.Optional[ConfiguredProps] + configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + The configured properties for the trigger dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -466,7 +468,7 @@ async def configure_prop( external_user_id: str, prop_name: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[ConfiguredProps] = OMIT, + configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, page: typing.Optional[float] = OMIT, prev_context: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, @@ -490,7 +492,8 @@ async def configure_prop( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[ConfiguredProps] + configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + The configured properties for the component dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -556,7 +559,7 @@ async def reload_props( id: str, external_user_id: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[ConfiguredProps] = OMIT, + configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> ReloadPropsResponse: @@ -574,7 +577,8 @@ async def reload_props( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[ConfiguredProps] + configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + The configured properties for the component dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -625,7 +629,7 @@ async def deploy( *, id: str, external_user_id: str, - configured_props: typing.Optional[ConfiguredProps] = OMIT, + configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, webhook_url: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -641,7 +645,8 @@ async def deploy( external_user_id : str The external user ID - configured_props : typing.Optional[ConfiguredProps] + configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + The configured properties for the trigger dynamic_props_id : typing.Optional[str] The ID for dynamic props diff --git a/src/pipedream/triggers/raw_client.py b/src/pipedream/triggers/raw_client.py index e86b621..a83eb6f 100644 --- a/src/pipedream/triggers/raw_client.py +++ b/src/pipedream/triggers/raw_client.py @@ -10,10 +10,8 @@ from ..core.pagination import AsyncPager, BaseHttpResponse, SyncPager 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.component import Component from ..types.configure_prop_response import ConfigurePropResponse -from ..types.configured_props import ConfiguredProps from ..types.deploy_trigger_response import DeployTriggerResponse from ..types.deployed_component import DeployedComponent from ..types.get_component_response import GetComponentResponse @@ -156,7 +154,7 @@ def configure_prop( external_user_id: str, prop_name: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[ConfiguredProps] = OMIT, + configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, page: typing.Optional[float] = OMIT, prev_context: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, @@ -180,7 +178,8 @@ def configure_prop( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[ConfiguredProps] + configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + The configured properties for the component dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -210,9 +209,7 @@ def configure_prop( "external_user_id": external_user_id, "prop_name": prop_name, "blocking": blocking, - "configured_props": convert_and_respect_annotation_metadata( - object_=configured_props, annotation=ConfiguredProps, direction="write" - ), + "configured_props": configured_props, "dynamic_props_id": dynamic_props_id, "page": page, "prev_context": prev_context, @@ -245,7 +242,7 @@ def reload_props( id: str, external_user_id: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[ConfiguredProps] = OMIT, + configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[ReloadPropsResponse]: @@ -263,7 +260,8 @@ def reload_props( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[ConfiguredProps] + configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + The configured properties for the component dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -283,9 +281,7 @@ def reload_props( "id": id, "external_user_id": external_user_id, "blocking": blocking, - "configured_props": convert_and_respect_annotation_metadata( - object_=configured_props, annotation=ConfiguredProps, direction="write" - ), + "configured_props": configured_props, "dynamic_props_id": dynamic_props_id, }, headers={ @@ -314,7 +310,7 @@ def deploy( *, id: str, external_user_id: str, - configured_props: typing.Optional[ConfiguredProps] = OMIT, + configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, webhook_url: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -330,7 +326,8 @@ def deploy( external_user_id : str The external user ID - configured_props : typing.Optional[ConfiguredProps] + configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + The configured properties for the trigger dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -352,9 +349,7 @@ def deploy( json={ "id": id, "external_user_id": external_user_id, - "configured_props": convert_and_respect_annotation_metadata( - object_=configured_props, annotation=ConfiguredProps, direction="write" - ), + "configured_props": configured_props, "dynamic_props_id": dynamic_props_id, "webhook_url": webhook_url, }, @@ -516,7 +511,7 @@ async def configure_prop( external_user_id: str, prop_name: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[ConfiguredProps] = OMIT, + configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, page: typing.Optional[float] = OMIT, prev_context: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, @@ -540,7 +535,8 @@ async def configure_prop( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[ConfiguredProps] + configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + The configured properties for the component dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -570,9 +566,7 @@ async def configure_prop( "external_user_id": external_user_id, "prop_name": prop_name, "blocking": blocking, - "configured_props": convert_and_respect_annotation_metadata( - object_=configured_props, annotation=ConfiguredProps, direction="write" - ), + "configured_props": configured_props, "dynamic_props_id": dynamic_props_id, "page": page, "prev_context": prev_context, @@ -605,7 +599,7 @@ async def reload_props( id: str, external_user_id: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[ConfiguredProps] = OMIT, + configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[ReloadPropsResponse]: @@ -623,7 +617,8 @@ async def reload_props( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[ConfiguredProps] + configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + The configured properties for the component dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -643,9 +638,7 @@ async def reload_props( "id": id, "external_user_id": external_user_id, "blocking": blocking, - "configured_props": convert_and_respect_annotation_metadata( - object_=configured_props, annotation=ConfiguredProps, direction="write" - ), + "configured_props": configured_props, "dynamic_props_id": dynamic_props_id, }, headers={ @@ -674,7 +667,7 @@ async def deploy( *, id: str, external_user_id: str, - configured_props: typing.Optional[ConfiguredProps] = OMIT, + configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, webhook_url: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -690,7 +683,8 @@ async def deploy( external_user_id : str The external user ID - configured_props : typing.Optional[ConfiguredProps] + configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + The configured properties for the trigger dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -712,9 +706,7 @@ async def deploy( json={ "id": id, "external_user_id": external_user_id, - "configured_props": convert_and_respect_annotation_metadata( - object_=configured_props, annotation=ConfiguredProps, direction="write" - ), + "configured_props": configured_props, "dynamic_props_id": dynamic_props_id, "webhook_url": webhook_url, }, diff --git a/src/pipedream/types/__init__.py b/src/pipedream/types/__init__.py index 795559c..44d94d6 100644 --- a/src/pipedream/types/__init__.py +++ b/src/pipedream/types/__init__.py @@ -2,222 +2,84 @@ # isort: skip_file -import typing -from importlib import import_module - -if typing.TYPE_CHECKING: - from .account import Account - from .account_id import AccountId - from .app import App - from .app_auth_type import AppAuthType - from .app_category import AppCategory - from .backend_client_opts import BackendClientOpts - from .client_opts import ClientOpts - from .component import Component - from .component_stash import ComponentStash - from .component_type import ComponentType - from .configurable_prop import ConfigurableProp - from .configurable_prop_airtable_base_id import ConfigurablePropAirtableBaseId - from .configurable_prop_airtable_field_id import ConfigurablePropAirtableFieldId - from .configurable_prop_airtable_table_id import ConfigurablePropAirtableTableId - from .configurable_prop_airtable_view_id import ConfigurablePropAirtableViewId - from .configurable_prop_alert import ConfigurablePropAlert - from .configurable_prop_alert_type import ConfigurablePropAlertType - from .configurable_prop_any import ConfigurablePropAny - from .configurable_prop_app import ConfigurablePropApp - from .configurable_prop_apphook import ConfigurablePropApphook - from .configurable_prop_boolean import ConfigurablePropBoolean - from .configurable_prop_db import ConfigurablePropDb - from .configurable_prop_discord import ConfigurablePropDiscord - from .configurable_prop_discord_channel import ConfigurablePropDiscordChannel - from .configurable_prop_discord_channel_array import ConfigurablePropDiscordChannelArray - from .configurable_prop_http import ConfigurablePropHttp - from .configurable_prop_integer import ConfigurablePropInteger - from .configurable_prop_integer_array import ConfigurablePropIntegerArray - from .configurable_prop_object import ConfigurablePropObject - from .configurable_prop_sql import ConfigurablePropSql - from .configurable_prop_sql_auth import ConfigurablePropSqlAuth - from .configurable_prop_string import ConfigurablePropString - from .configurable_prop_string_array import ConfigurablePropStringArray - from .configurable_prop_timer import ConfigurablePropTimer - from .configurable_prop_timer_default import ConfigurablePropTimerDefault - from .configurable_prop_timer_option import ConfigurablePropTimerOption - from .configurable_prop_timer_static import ConfigurablePropTimerStatic - from .configurable_prop_type import ConfigurablePropType - from .configure_prop_options import ConfigurePropOptions - from .configure_prop_options_item import ConfigurePropOptionsItem - from .configure_prop_opts import ConfigurePropOpts - from .configure_prop_response import ConfigurePropResponse - from .configured_prop_value import ConfiguredPropValue - from .configured_prop_value_any import ConfiguredPropValueAny - from .configured_prop_value_app import ConfiguredPropValueApp - from .configured_prop_value_boolean import ConfiguredPropValueBoolean - from .configured_prop_value_integer import ConfiguredPropValueInteger - from .configured_prop_value_object import ConfiguredPropValueObject - from .configured_prop_value_sql import ConfiguredPropValueSql - from .configured_prop_value_string import ConfiguredPropValueString - from .configured_prop_value_string_array import ConfiguredPropValueStringArray - from .configured_props import ConfiguredProps - 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 - from .deploy_trigger_response import DeployTriggerResponse - from .deployed_component import DeployedComponent - from .dynamic_props import DynamicProps - from .emitted_event import EmittedEvent - from .error_response import ErrorResponse - from .get_accounts_response import GetAccountsResponse - from .get_app_category_response import GetAppCategoryResponse - from .get_app_response import GetAppResponse - from .get_apps_response import GetAppsResponse - from .get_component_response import GetComponentResponse - from .get_components_response import GetComponentsResponse - from .get_trigger_events_response import GetTriggerEventsResponse - from .get_trigger_response import GetTriggerResponse - from .get_trigger_webhooks_response import GetTriggerWebhooksResponse - from .get_trigger_workflows_response import GetTriggerWorkflowsResponse - from .get_triggers_response import GetTriggersResponse - from .list_accounts_response import ListAccountsResponse - from .list_app_categories_response import ListAppCategoriesResponse - from .list_apps_response import ListAppsResponse - from .observation import Observation - from .observation_error import ObservationError - from .page_info import PageInfo - from .project_environment import ProjectEnvironment - from .project_info_response import ProjectInfoResponse - from .project_info_response_app import ProjectInfoResponseApp - from .prop_option import PropOption - from .prop_option_nested import PropOptionNested - 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 .timer_cron import TimerCron - from .timer_interval import TimerInterval - from .validate_token_response import ValidateTokenResponse -_dynamic_imports: typing.Dict[str, str] = { - "Account": ".account", - "AccountId": ".account_id", - "App": ".app", - "AppAuthType": ".app_auth_type", - "AppCategory": ".app_category", - "BackendClientOpts": ".backend_client_opts", - "ClientOpts": ".client_opts", - "Component": ".component", - "ComponentStash": ".component_stash", - "ComponentType": ".component_type", - "ConfigurableProp": ".configurable_prop", - "ConfigurablePropAirtableBaseId": ".configurable_prop_airtable_base_id", - "ConfigurablePropAirtableFieldId": ".configurable_prop_airtable_field_id", - "ConfigurablePropAirtableTableId": ".configurable_prop_airtable_table_id", - "ConfigurablePropAirtableViewId": ".configurable_prop_airtable_view_id", - "ConfigurablePropAlert": ".configurable_prop_alert", - "ConfigurablePropAlertType": ".configurable_prop_alert_type", - "ConfigurablePropAny": ".configurable_prop_any", - "ConfigurablePropApp": ".configurable_prop_app", - "ConfigurablePropApphook": ".configurable_prop_apphook", - "ConfigurablePropBoolean": ".configurable_prop_boolean", - "ConfigurablePropDb": ".configurable_prop_db", - "ConfigurablePropDiscord": ".configurable_prop_discord", - "ConfigurablePropDiscordChannel": ".configurable_prop_discord_channel", - "ConfigurablePropDiscordChannelArray": ".configurable_prop_discord_channel_array", - "ConfigurablePropHttp": ".configurable_prop_http", - "ConfigurablePropInteger": ".configurable_prop_integer", - "ConfigurablePropIntegerArray": ".configurable_prop_integer_array", - "ConfigurablePropObject": ".configurable_prop_object", - "ConfigurablePropSql": ".configurable_prop_sql", - "ConfigurablePropSqlAuth": ".configurable_prop_sql_auth", - "ConfigurablePropString": ".configurable_prop_string", - "ConfigurablePropStringArray": ".configurable_prop_string_array", - "ConfigurablePropTimer": ".configurable_prop_timer", - "ConfigurablePropTimerDefault": ".configurable_prop_timer_default", - "ConfigurablePropTimerOption": ".configurable_prop_timer_option", - "ConfigurablePropTimerStatic": ".configurable_prop_timer_static", - "ConfigurablePropType": ".configurable_prop_type", - "ConfigurePropOptions": ".configure_prop_options", - "ConfigurePropOptionsItem": ".configure_prop_options_item", - "ConfigurePropOpts": ".configure_prop_opts", - "ConfigurePropResponse": ".configure_prop_response", - "ConfiguredPropValue": ".configured_prop_value", - "ConfiguredPropValueAny": ".configured_prop_value_any", - "ConfiguredPropValueApp": ".configured_prop_value_app", - "ConfiguredPropValueBoolean": ".configured_prop_value_boolean", - "ConfiguredPropValueInteger": ".configured_prop_value_integer", - "ConfiguredPropValueObject": ".configured_prop_value_object", - "ConfiguredPropValueSql": ".configured_prop_value_sql", - "ConfiguredPropValueString": ".configured_prop_value_string", - "ConfiguredPropValueStringArray": ".configured_prop_value_string_array", - "ConfiguredProps": ".configured_props", - "ConnectToken": ".connect_token", - "CreateOAuthTokenResponse": ".create_o_auth_token_response", - "CreateTokenResponse": ".create_token_response", - "DeleteTriggerOpts": ".delete_trigger_opts", - "DeployTriggerResponse": ".deploy_trigger_response", - "DeployedComponent": ".deployed_component", - "DynamicProps": ".dynamic_props", - "EmittedEvent": ".emitted_event", - "ErrorResponse": ".error_response", - "GetAccountsResponse": ".get_accounts_response", - "GetAppCategoryResponse": ".get_app_category_response", - "GetAppResponse": ".get_app_response", - "GetAppsResponse": ".get_apps_response", - "GetComponentResponse": ".get_component_response", - "GetComponentsResponse": ".get_components_response", - "GetTriggerEventsResponse": ".get_trigger_events_response", - "GetTriggerResponse": ".get_trigger_response", - "GetTriggerWebhooksResponse": ".get_trigger_webhooks_response", - "GetTriggerWorkflowsResponse": ".get_trigger_workflows_response", - "GetTriggersResponse": ".get_triggers_response", - "ListAccountsResponse": ".list_accounts_response", - "ListAppCategoriesResponse": ".list_app_categories_response", - "ListAppsResponse": ".list_apps_response", - "Observation": ".observation", - "ObservationError": ".observation_error", - "PageInfo": ".page_info", - "ProjectEnvironment": ".project_environment", - "ProjectInfoResponse": ".project_info_response", - "ProjectInfoResponseApp": ".project_info_response_app", - "PropOption": ".prop_option", - "PropOptionNested": ".prop_option_nested", - "ProxyResponse": ".proxy_response", - "ReloadPropsOpts": ".reload_props_opts", - "ReloadPropsResponse": ".reload_props_response", - "RunActionOptsStashId": ".run_action_opts_stash_id", - "RunActionResponse": ".run_action_response", - "StartConnectOpts": ".start_connect_opts", - "StashId": ".stash_id", - "TimerCron": ".timer_cron", - "TimerInterval": ".timer_interval", - "ValidateTokenResponse": ".validate_token_response", -} - - -def __getattr__(attr_name: str) -> typing.Any: - module_name = _dynamic_imports.get(attr_name) - if module_name is None: - raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") - try: - module = import_module(module_name, __package__) - result = getattr(module, attr_name) - return result - except ImportError as e: - raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e - except AttributeError as e: - raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e - - -def __dir__(): - lazy_attrs = list(_dynamic_imports.keys()) - return sorted(lazy_attrs) - +from .account import Account +from .app import App +from .app_auth_type import AppAuthType +from .app_category import AppCategory +from .backend_client_opts import BackendClientOpts +from .client_opts import ClientOpts +from .component import Component +from .component_stash import ComponentStash +from .configurable_prop import ConfigurableProp +from .configurable_prop_airtable_base_id import ConfigurablePropAirtableBaseId +from .configurable_prop_airtable_field_id import ConfigurablePropAirtableFieldId +from .configurable_prop_airtable_table_id import ConfigurablePropAirtableTableId +from .configurable_prop_airtable_view_id import ConfigurablePropAirtableViewId +from .configurable_prop_alert import ConfigurablePropAlert +from .configurable_prop_alert_type import ConfigurablePropAlertType +from .configurable_prop_any import ConfigurablePropAny +from .configurable_prop_app import ConfigurablePropApp +from .configurable_prop_apphook import ConfigurablePropApphook +from .configurable_prop_boolean import ConfigurablePropBoolean +from .configurable_prop_db import ConfigurablePropDb +from .configurable_prop_discord import ConfigurablePropDiscord +from .configurable_prop_discord_channel import ConfigurablePropDiscordChannel +from .configurable_prop_discord_channel_array import ConfigurablePropDiscordChannelArray +from .configurable_prop_http import ConfigurablePropHttp +from .configurable_prop_integer import ConfigurablePropInteger +from .configurable_prop_integer_array import ConfigurablePropIntegerArray +from .configurable_prop_object import ConfigurablePropObject +from .configurable_prop_sql import ConfigurablePropSql +from .configurable_prop_sql_auth import ConfigurablePropSqlAuth +from .configurable_prop_string import ConfigurablePropString +from .configurable_prop_string_array import ConfigurablePropStringArray +from .configurable_prop_timer import ConfigurablePropTimer +from .configurable_prop_timer_default import ConfigurablePropTimerDefault +from .configurable_prop_timer_option import ConfigurablePropTimerOption +from .configurable_prop_timer_static import ConfigurablePropTimerStatic +from .configure_prop_opts import ConfigurePropOpts +from .configure_prop_response import ConfigurePropResponse +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 +from .deploy_trigger_response import DeployTriggerResponse +from .deployed_component import DeployedComponent +from .dynamic_props import DynamicProps +from .emitted_event import EmittedEvent +from .error_response import ErrorResponse +from .get_accounts_response import GetAccountsResponse +from .get_app_category_response import GetAppCategoryResponse +from .get_app_response import GetAppResponse +from .get_apps_response import GetAppsResponse +from .get_component_response import GetComponentResponse +from .get_components_response import GetComponentsResponse +from .get_trigger_events_response import GetTriggerEventsResponse +from .get_trigger_response import GetTriggerResponse +from .get_trigger_webhooks_response import GetTriggerWebhooksResponse +from .get_trigger_workflows_response import GetTriggerWorkflowsResponse +from .get_triggers_response import GetTriggersResponse +from .list_accounts_response import ListAccountsResponse +from .list_app_categories_response import ListAppCategoriesResponse +from .list_apps_response import ListAppsResponse +from .page_info import PageInfo +from .project_environment import ProjectEnvironment +from .project_info_response import ProjectInfoResponse +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 .timer_cron import TimerCron +from .timer_interval import TimerInterval +from .validate_token_response import ValidateTokenResponse __all__ = [ "Account", - "AccountId", "App", "AppAuthType", "AppCategory", @@ -225,7 +87,6 @@ def __dir__(): "ClientOpts", "Component", "ComponentStash", - "ComponentType", "ConfigurableProp", "ConfigurablePropAirtableBaseId", "ConfigurablePropAirtableFieldId", @@ -253,21 +114,8 @@ def __dir__(): "ConfigurablePropTimerDefault", "ConfigurablePropTimerOption", "ConfigurablePropTimerStatic", - "ConfigurablePropType", - "ConfigurePropOptions", - "ConfigurePropOptionsItem", "ConfigurePropOpts", "ConfigurePropResponse", - "ConfiguredPropValue", - "ConfiguredPropValueAny", - "ConfiguredPropValueApp", - "ConfiguredPropValueBoolean", - "ConfiguredPropValueInteger", - "ConfiguredPropValueObject", - "ConfiguredPropValueSql", - "ConfiguredPropValueString", - "ConfiguredPropValueStringArray", - "ConfiguredProps", "ConnectToken", "CreateOAuthTokenResponse", "CreateTokenResponse", @@ -291,14 +139,11 @@ def __dir__(): "ListAccountsResponse", "ListAppCategoriesResponse", "ListAppsResponse", - "Observation", - "ObservationError", "PageInfo", "ProjectEnvironment", "ProjectInfoResponse", "ProjectInfoResponseApp", "PropOption", - "PropOptionNested", "ProxyResponse", "ReloadPropsOpts", "ReloadPropsResponse", diff --git a/src/pipedream/types/account.py b/src/pipedream/types/account.py index 2627d08..7d1dd3f 100644 --- a/src/pipedream/types/account.py +++ b/src/pipedream/types/account.py @@ -5,7 +5,6 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .account_id import AccountId from .app import App @@ -14,7 +13,11 @@ class Account(UniversalBaseModel): End user account data, returned from the API. """ - id: AccountId + id: str = pydantic.Field() + """ + The unique ID of the account. + """ + name: typing.Optional[str] = pydantic.Field(default=None) """ The custom name of the account if set. diff --git a/src/pipedream/types/account_id.py b/src/pipedream/types/account_id.py deleted file mode 100644 index 6a6390c..0000000 --- a/src/pipedream/types/account_id.py +++ /dev/null @@ -1,3 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -AccountId = str diff --git a/src/pipedream/types/component_type.py b/src/pipedream/types/component_type.py deleted file mode 100644 index 18ad740..0000000 --- a/src/pipedream/types/component_type.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -ComponentType = typing.Union[typing.Literal["trigger", "action"], typing.Any] diff --git a/src/pipedream/types/configurable_prop.py b/src/pipedream/types/configurable_prop.py index 5f5308b..37d4394 100644 --- a/src/pipedream/types/configurable_prop.py +++ b/src/pipedream/types/configurable_prop.py @@ -6,7 +6,6 @@ import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from ..core.serialization import FieldMetadata -from .configurable_prop_type import ConfigurablePropType class ConfigurableProp(UniversalBaseModel): @@ -19,7 +18,7 @@ class ConfigurableProp(UniversalBaseModel): When building `configuredProps`, make sure to use this field as the key when setting the prop value """ - type: ConfigurablePropType + type: typing.Optional[str] = None label: typing.Optional[str] = pydantic.Field(default=None) """ Value to use as an input label. In cases where `type` is "app", should load the app via `getApp`, etc. and show `app.name` instead. diff --git a/src/pipedream/types/configurable_prop_airtable_base_id.py b/src/pipedream/types/configurable_prop_airtable_base_id.py index 45340cd..f4dca84 100644 --- a/src/pipedream/types/configurable_prop_airtable_base_id.py +++ b/src/pipedream/types/configurable_prop_airtable_base_id.py @@ -9,8 +9,10 @@ class ConfigurablePropAirtableBaseId(UniversalBaseModel): - type: typing.Literal["$.airtable.baseId"] = "$.airtable.baseId" - app_prop: typing_extensions.Annotated[str, FieldMetadata(alias="appProp")] = pydantic.Field() + type: typing.Optional[typing.Literal["$.airtable.baseId"]] = None + app_prop: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="appProp")] = pydantic.Field( + default=None + ) """ The name of the app prop that provides Airtable authentication """ diff --git a/src/pipedream/types/configurable_prop_airtable_field_id.py b/src/pipedream/types/configurable_prop_airtable_field_id.py index f9bc3a3..51844f5 100644 --- a/src/pipedream/types/configurable_prop_airtable_field_id.py +++ b/src/pipedream/types/configurable_prop_airtable_field_id.py @@ -9,8 +9,10 @@ class ConfigurablePropAirtableFieldId(UniversalBaseModel): - type: typing.Literal["$.airtable.fieldId"] = "$.airtable.fieldId" - table_id_prop: typing_extensions.Annotated[str, FieldMetadata(alias="tableIdProp")] = pydantic.Field() + type: typing.Optional[typing.Literal["$.airtable.fieldId"]] = None + table_id_prop: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="tableIdProp")] = ( + pydantic.Field(default=None) + ) """ The name of the prop that provides the Airtable table ID """ diff --git a/src/pipedream/types/configurable_prop_airtable_table_id.py b/src/pipedream/types/configurable_prop_airtable_table_id.py index 4124a1e..819a13c 100644 --- a/src/pipedream/types/configurable_prop_airtable_table_id.py +++ b/src/pipedream/types/configurable_prop_airtable_table_id.py @@ -9,8 +9,10 @@ class ConfigurablePropAirtableTableId(UniversalBaseModel): - type: typing.Literal["$.airtable.tableId"] = "$.airtable.tableId" - base_id_prop: typing_extensions.Annotated[str, FieldMetadata(alias="baseIdProp")] = pydantic.Field() + type: typing.Optional[typing.Literal["$.airtable.tableId"]] = None + base_id_prop: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="baseIdProp")] = pydantic.Field( + default=None + ) """ The name of the prop that provides the Airtable base ID """ diff --git a/src/pipedream/types/configurable_prop_airtable_view_id.py b/src/pipedream/types/configurable_prop_airtable_view_id.py index 02bf679..af771e3 100644 --- a/src/pipedream/types/configurable_prop_airtable_view_id.py +++ b/src/pipedream/types/configurable_prop_airtable_view_id.py @@ -9,8 +9,10 @@ class ConfigurablePropAirtableViewId(UniversalBaseModel): - type: typing.Literal["$.airtable.viewId"] = "$.airtable.viewId" - table_id_prop: typing_extensions.Annotated[str, FieldMetadata(alias="tableIdProp")] = pydantic.Field() + type: typing.Optional[typing.Literal["$.airtable.viewId"]] = None + table_id_prop: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="tableIdProp")] = ( + pydantic.Field(default=None) + ) """ The name of the prop that provides the Airtable table ID """ diff --git a/src/pipedream/types/configurable_prop_alert.py b/src/pipedream/types/configurable_prop_alert.py index f0eff88..acd7ea7 100644 --- a/src/pipedream/types/configurable_prop_alert.py +++ b/src/pipedream/types/configurable_prop_alert.py @@ -10,11 +10,11 @@ class ConfigurablePropAlert(UniversalBaseModel): - type: typing.Literal["alert"] = "alert" + type: typing.Optional[typing.Literal["alert"]] = None alert_type: typing_extensions.Annotated[ typing.Optional[ConfigurablePropAlertType], FieldMetadata(alias="alertType") ] = None - content: str = pydantic.Field() + 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_any.py b/src/pipedream/types/configurable_prop_any.py index 2b1fe36..aed6dd5 100644 --- a/src/pipedream/types/configurable_prop_any.py +++ b/src/pipedream/types/configurable_prop_any.py @@ -9,7 +9,7 @@ class ConfigurablePropAny(UniversalBaseModel): - type: typing.Literal["any"] = "any" + type: typing.Optional[typing.Literal["any"]] = None name: str = pydantic.Field() """ When building `configuredProps`, make sure to use this field as the key when setting the prop value diff --git a/src/pipedream/types/configurable_prop_app.py b/src/pipedream/types/configurable_prop_app.py index 514dbfa..8c1d154 100644 --- a/src/pipedream/types/configurable_prop_app.py +++ b/src/pipedream/types/configurable_prop_app.py @@ -9,8 +9,8 @@ class ConfigurablePropApp(UniversalBaseModel): - type: typing.Literal["app"] = "app" - app: str = pydantic.Field() + type: typing.Optional[typing.Literal["app"]] = None + app: typing.Optional[str] = pydantic.Field(default=None) """ The name slug of the app, e.g. 'github', 'slack', etc. This is used to identify the app for which the account is being configured. """ diff --git a/src/pipedream/types/configurable_prop_apphook.py b/src/pipedream/types/configurable_prop_apphook.py index a2688c2..8dedabf 100644 --- a/src/pipedream/types/configurable_prop_apphook.py +++ b/src/pipedream/types/configurable_prop_apphook.py @@ -9,8 +9,10 @@ class ConfigurablePropApphook(UniversalBaseModel): - type: typing.Literal["$.interface.apphook"] = "$.interface.apphook" - app_prop: typing_extensions.Annotated[str, FieldMetadata(alias="appProp")] = pydantic.Field() + type: typing.Optional[typing.Literal["$.interface.apphook"]] = None + app_prop: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="appProp")] = pydantic.Field( + default=None + ) """ The name of the app prop that this apphook depends on """ diff --git a/src/pipedream/types/configurable_prop_boolean.py b/src/pipedream/types/configurable_prop_boolean.py index 79c8bc5..eda5c42 100644 --- a/src/pipedream/types/configurable_prop_boolean.py +++ b/src/pipedream/types/configurable_prop_boolean.py @@ -9,12 +9,7 @@ class ConfigurablePropBoolean(UniversalBaseModel): - type: typing.Literal["boolean"] = "boolean" - default: typing.Optional[bool] = pydantic.Field(default=None) - """ - The default value for this prop - """ - + type: typing.Optional[typing.Literal["boolean"]] = None name: str = pydantic.Field() """ When building `configuredProps`, make sure to use this field as the key when setting the prop value diff --git a/src/pipedream/types/configurable_prop_db.py b/src/pipedream/types/configurable_prop_db.py index 63bbf57..0f28108 100644 --- a/src/pipedream/types/configurable_prop_db.py +++ b/src/pipedream/types/configurable_prop_db.py @@ -9,7 +9,7 @@ class ConfigurablePropDb(UniversalBaseModel): - type: typing.Literal["$.service.db"] = "$.service.db" + type: typing.Optional[typing.Literal["$.service.db"]] = None name: str = pydantic.Field() """ When building `configuredProps`, make sure to use this field as the key when setting the prop value diff --git a/src/pipedream/types/configurable_prop_discord.py b/src/pipedream/types/configurable_prop_discord.py index a8e26a6..a1a8fb2 100644 --- a/src/pipedream/types/configurable_prop_discord.py +++ b/src/pipedream/types/configurable_prop_discord.py @@ -9,7 +9,7 @@ class ConfigurablePropDiscord(UniversalBaseModel): - type: typing.Literal["$.discord.channel"] = "$.discord.channel" + type: typing.Optional[typing.Literal["$.discord.channel"]] = None name: str = pydantic.Field() """ When building `configuredProps`, make sure to use this field as the key when setting the prop value diff --git a/src/pipedream/types/configurable_prop_discord_channel.py b/src/pipedream/types/configurable_prop_discord_channel.py index 358f0a7..8da21a2 100644 --- a/src/pipedream/types/configurable_prop_discord_channel.py +++ b/src/pipedream/types/configurable_prop_discord_channel.py @@ -9,8 +9,10 @@ class ConfigurablePropDiscordChannel(UniversalBaseModel): - type: typing.Literal["$.discord.channel"] = "$.discord.channel" - app_prop: typing_extensions.Annotated[str, FieldMetadata(alias="appProp")] = pydantic.Field() + type: typing.Optional[typing.Literal["$.discord.channel"]] = None + app_prop: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="appProp")] = pydantic.Field( + default=None + ) """ The name of the app prop that provides Discord authentication """ diff --git a/src/pipedream/types/configurable_prop_discord_channel_array.py b/src/pipedream/types/configurable_prop_discord_channel_array.py index 3e3cb64..b67a467 100644 --- a/src/pipedream/types/configurable_prop_discord_channel_array.py +++ b/src/pipedream/types/configurable_prop_discord_channel_array.py @@ -9,7 +9,7 @@ class ConfigurablePropDiscordChannelArray(UniversalBaseModel): - type: typing.Literal["$.discord.channel[]"] = "$.discord.channel[]" + type: typing.Optional[typing.Literal["$.discord.channel[]"]] = None app_prop: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="appProp")] = pydantic.Field( default=None ) diff --git a/src/pipedream/types/configurable_prop_http.py b/src/pipedream/types/configurable_prop_http.py index 18eb86d..37e98dd 100644 --- a/src/pipedream/types/configurable_prop_http.py +++ b/src/pipedream/types/configurable_prop_http.py @@ -9,7 +9,7 @@ class ConfigurablePropHttp(UniversalBaseModel): - type: typing.Literal["$.interface.http"] = "$.interface.http" + type: typing.Optional[typing.Literal["$.interface.http"]] = None custom_response: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="customResponse")] = ( pydantic.Field(default=None) ) diff --git a/src/pipedream/types/configurable_prop_integer.py b/src/pipedream/types/configurable_prop_integer.py index 557a182..8ffdd1b 100644 --- a/src/pipedream/types/configurable_prop_integer.py +++ b/src/pipedream/types/configurable_prop_integer.py @@ -9,7 +9,7 @@ class ConfigurablePropInteger(UniversalBaseModel): - type: typing.Literal["integer"] = "integer" + type: typing.Optional[typing.Literal["integer"]] = None min: typing.Optional[int] = pydantic.Field(default=None) """ The minimum value for this integer prop. diff --git a/src/pipedream/types/configurable_prop_integer_array.py b/src/pipedream/types/configurable_prop_integer_array.py index d06dd4a..a50d899 100644 --- a/src/pipedream/types/configurable_prop_integer_array.py +++ b/src/pipedream/types/configurable_prop_integer_array.py @@ -9,7 +9,7 @@ class ConfigurablePropIntegerArray(UniversalBaseModel): - type: typing.Literal["integer[]"] = "integer[]" + type: typing.Optional[typing.Literal["integer[]"]] = None min: typing.Optional[int] = pydantic.Field(default=None) """ The minimum value for integers in this array diff --git a/src/pipedream/types/configurable_prop_object.py b/src/pipedream/types/configurable_prop_object.py index f4c6cb2..0bc4e66 100644 --- a/src/pipedream/types/configurable_prop_object.py +++ b/src/pipedream/types/configurable_prop_object.py @@ -9,7 +9,7 @@ class ConfigurablePropObject(UniversalBaseModel): - type: typing.Literal["object"] = "object" + type: typing.Optional[typing.Literal["object"]] = None name: str = pydantic.Field() """ When building `configuredProps`, make sure to use this field as the key when setting the prop value diff --git a/src/pipedream/types/configurable_prop_sql.py b/src/pipedream/types/configurable_prop_sql.py index 1537845..f41481d 100644 --- a/src/pipedream/types/configurable_prop_sql.py +++ b/src/pipedream/types/configurable_prop_sql.py @@ -10,7 +10,7 @@ class ConfigurablePropSql(UniversalBaseModel): - type: typing.Literal["sql"] = "sql" + type: typing.Optional[typing.Literal["sql"]] = None auth: typing.Optional[ConfigurablePropSqlAuth] = None default: typing.Optional[str] = pydantic.Field(default=None) """ diff --git a/src/pipedream/types/configurable_prop_string.py b/src/pipedream/types/configurable_prop_string.py index 2aa20b3..1b8fc0d 100644 --- a/src/pipedream/types/configurable_prop_string.py +++ b/src/pipedream/types/configurable_prop_string.py @@ -9,12 +9,7 @@ class ConfigurablePropString(UniversalBaseModel): - type: typing.Literal["string"] = "string" - default: typing.Optional[str] = pydantic.Field(default=None) - """ - The default value for this prop - """ - + type: typing.Optional[typing.Literal["string"]] = None secret: typing.Optional[bool] = pydantic.Field(default=None) """ If true, this prop is a secret and should not be displayed in plain text. diff --git a/src/pipedream/types/configurable_prop_string_array.py b/src/pipedream/types/configurable_prop_string_array.py index ecc8766..558ec33 100644 --- a/src/pipedream/types/configurable_prop_string_array.py +++ b/src/pipedream/types/configurable_prop_string_array.py @@ -9,12 +9,7 @@ class ConfigurablePropStringArray(UniversalBaseModel): - type: typing.Literal["string[]"] = "string[]" - default: typing.Optional[typing.List[str]] = pydantic.Field(default=None) - """ - The default value for this prop - """ - + type: typing.Optional[typing.Literal["string[]"]] = None secret: typing.Optional[bool] = pydantic.Field(default=None) """ If true, this prop is a secret and should not be displayed in plain text. diff --git a/src/pipedream/types/configurable_prop_timer.py b/src/pipedream/types/configurable_prop_timer.py index 34da42c..7d472bf 100644 --- a/src/pipedream/types/configurable_prop_timer.py +++ b/src/pipedream/types/configurable_prop_timer.py @@ -12,7 +12,7 @@ class ConfigurablePropTimer(UniversalBaseModel): - type: typing.Literal["$.interface.timer"] = "$.interface.timer" + type: typing.Optional[typing.Literal["$.interface.timer"]] = None static: typing.Optional[ConfigurablePropTimerStatic] = None default: typing.Optional[ConfigurablePropTimerDefault] = None options: typing.Optional[typing.List[typing.Optional[ConfigurablePropTimerOption]]] = pydantic.Field(default=None) diff --git a/src/pipedream/types/configurable_prop_type.py b/src/pipedream/types/configurable_prop_type.py deleted file mode 100644 index f87ec6d..0000000 --- a/src/pipedream/types/configurable_prop_type.py +++ /dev/null @@ -1,29 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -ConfigurablePropType = typing.Union[ - typing.Literal[ - "$.airtable.baseId", - "$.airtable.fieldId", - "$.airtable.tableId", - "$.airtable.viewId", - "$.discord.channel", - "$.interface.apphook", - "$.interface.http", - "$.interface.timer", - "$.service.db", - "alert", - "any", - "app", - "boolean", - "data_store", - "dir", - "http_request", - "integer", - "object", - "sql", - "string", - ], - typing.Any, -] diff --git a/src/pipedream/types/configure_prop_options.py b/src/pipedream/types/configure_prop_options.py deleted file mode 100644 index 2200a16..0000000 --- a/src/pipedream/types/configure_prop_options.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -from .configure_prop_options_item import ConfigurePropOptionsItem - -ConfigurePropOptions = typing.Optional[typing.List[ConfigurePropOptionsItem]] diff --git a/src/pipedream/types/configure_prop_options_item.py b/src/pipedream/types/configure_prop_options_item.py deleted file mode 100644 index c413487..0000000 --- a/src/pipedream/types/configure_prop_options_item.py +++ /dev/null @@ -1,8 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -from .prop_option import PropOption -from .prop_option_nested import PropOptionNested - -ConfigurePropOptionsItem = typing.Union[PropOption, PropOptionNested] diff --git a/src/pipedream/types/configure_prop_opts.py b/src/pipedream/types/configure_prop_opts.py index 2566173..f24a4e0 100644 --- a/src/pipedream/types/configure_prop_opts.py +++ b/src/pipedream/types/configure_prop_opts.py @@ -4,7 +4,6 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .configured_props import ConfiguredProps class ConfigurePropOpts(UniversalBaseModel): @@ -32,7 +31,11 @@ class ConfigurePropOpts(UniversalBaseModel): Whether this operation should block until completion """ - configured_props: typing.Optional[ConfiguredProps] = None + configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None) + """ + The configured properties for the component + """ + dynamic_props_id: typing.Optional[str] = pydantic.Field(default=None) """ The ID for dynamic props diff --git a/src/pipedream/types/configure_prop_response.py b/src/pipedream/types/configure_prop_response.py index 188645d..c2423d9 100644 --- a/src/pipedream/types/configure_prop_response.py +++ b/src/pipedream/types/configure_prop_response.py @@ -4,8 +4,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .configure_prop_options import ConfigurePropOptions -from .observation import Observation +from .prop_option import PropOption class ConfigurePropResponse(UniversalBaseModel): @@ -13,13 +12,21 @@ class ConfigurePropResponse(UniversalBaseModel): Response received after configuring a component's prop """ - options: typing.Optional[ConfigurePropOptions] = None + 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.List[Observation]] = None + observations: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None) + """ + Any logs produced during the configuration of the prop + """ + context: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None) """ New context after configuring the prop diff --git a/src/pipedream/types/configured_prop_value.py b/src/pipedream/types/configured_prop_value.py deleted file mode 100644 index 0266ac2..0000000 --- a/src/pipedream/types/configured_prop_value.py +++ /dev/null @@ -1,23 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -from .configured_prop_value_any import ConfiguredPropValueAny -from .configured_prop_value_app import ConfiguredPropValueApp -from .configured_prop_value_boolean import ConfiguredPropValueBoolean -from .configured_prop_value_integer import ConfiguredPropValueInteger -from .configured_prop_value_object import ConfiguredPropValueObject -from .configured_prop_value_sql import ConfiguredPropValueSql -from .configured_prop_value_string import ConfiguredPropValueString -from .configured_prop_value_string_array import ConfiguredPropValueStringArray - -ConfiguredPropValue = typing.Union[ - ConfiguredPropValueAny, - ConfiguredPropValueApp, - ConfiguredPropValueBoolean, - ConfiguredPropValueInteger, - ConfiguredPropValueObject, - ConfiguredPropValueSql, - ConfiguredPropValueString, - ConfiguredPropValueStringArray, -] diff --git a/src/pipedream/types/configured_prop_value_any.py b/src/pipedream/types/configured_prop_value_any.py deleted file mode 100644 index 98361e0..0000000 --- a/src/pipedream/types/configured_prop_value_any.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -ConfiguredPropValueAny = typing.Optional[typing.Any] diff --git a/src/pipedream/types/configured_prop_value_app.py b/src/pipedream/types/configured_prop_value_app.py deleted file mode 100644 index acafb83..0000000 --- a/src/pipedream/types/configured_prop_value_app.py +++ /dev/null @@ -1,22 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -import typing_extensions -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from ..core.serialization import FieldMetadata -from .account_id import AccountId - - -class ConfiguredPropValueApp(UniversalBaseModel): - auth_provision_id: typing_extensions.Annotated[AccountId, FieldMetadata(alias="authProvisionId")] - - 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/configured_prop_value_boolean.py b/src/pipedream/types/configured_prop_value_boolean.py deleted file mode 100644 index 9d6f6e1..0000000 --- a/src/pipedream/types/configured_prop_value_boolean.py +++ /dev/null @@ -1,3 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -ConfiguredPropValueBoolean = bool diff --git a/src/pipedream/types/configured_prop_value_integer.py b/src/pipedream/types/configured_prop_value_integer.py deleted file mode 100644 index 600d5e2..0000000 --- a/src/pipedream/types/configured_prop_value_integer.py +++ /dev/null @@ -1,3 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -ConfiguredPropValueInteger = float diff --git a/src/pipedream/types/configured_prop_value_object.py b/src/pipedream/types/configured_prop_value_object.py deleted file mode 100644 index 3cab1eb..0000000 --- a/src/pipedream/types/configured_prop_value_object.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -ConfiguredPropValueObject = typing.Dict[str, typing.Optional[typing.Any]] diff --git a/src/pipedream/types/configured_prop_value_sql.py b/src/pipedream/types/configured_prop_value_sql.py deleted file mode 100644 index 81eb9ad..0000000 --- a/src/pipedream/types/configured_prop_value_sql.py +++ /dev/null @@ -1,41 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -import typing_extensions -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from ..core.serialization import FieldMetadata - - -class ConfiguredPropValueSql(UniversalBaseModel): - value: str = pydantic.Field() - """ - The raw SQL query, as provided by the user - """ - - query: str = pydantic.Field() - """ - The SQL query to execute - """ - - params: typing.List[str] = pydantic.Field() - """ - The list of parameters for the prepared statement - """ - - use_prepared_statements: typing_extensions.Annotated[bool, FieldMetadata(alias="usePreparedStatements")] = ( - pydantic.Field() - ) - """ - Whether to use prepared statements for the query or not - """ - - 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/configured_prop_value_string.py b/src/pipedream/types/configured_prop_value_string.py deleted file mode 100644 index 1bbe935..0000000 --- a/src/pipedream/types/configured_prop_value_string.py +++ /dev/null @@ -1,3 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -ConfiguredPropValueString = str diff --git a/src/pipedream/types/configured_prop_value_string_array.py b/src/pipedream/types/configured_prop_value_string_array.py deleted file mode 100644 index 45af143..0000000 --- a/src/pipedream/types/configured_prop_value_string_array.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -ConfiguredPropValueStringArray = typing.List[str] diff --git a/src/pipedream/types/configured_props.py b/src/pipedream/types/configured_props.py deleted file mode 100644 index 230b292..0000000 --- a/src/pipedream/types/configured_props.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -from .configured_prop_value import ConfiguredPropValue - -ConfiguredProps = typing.Dict[str, ConfiguredPropValue] diff --git a/src/pipedream/types/deployed_component.py b/src/pipedream/types/deployed_component.py index 9cbbe8a..7413f3f 100644 --- a/src/pipedream/types/deployed_component.py +++ b/src/pipedream/types/deployed_component.py @@ -5,7 +5,6 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from .configurable_prop import ConfigurableProp -from .configured_props import ConfiguredProps class DeployedComponent(UniversalBaseModel): @@ -33,7 +32,11 @@ class DeployedComponent(UniversalBaseModel): The configurable properties of the component """ - configured_props: ConfiguredProps + configured_props: typing.Dict[str, typing.Optional[typing.Any]] = pydantic.Field() + """ + The configured properties of the component + """ + active: bool = pydantic.Field() """ Whether the deployed component is active diff --git a/src/pipedream/types/observation.py b/src/pipedream/types/observation.py deleted file mode 100644 index 83235d3..0000000 --- a/src/pipedream/types/observation.py +++ /dev/null @@ -1,38 +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 -from .observation_error import ObservationError - - -class Observation(UniversalBaseModel): - """ - Any logs produced during the configuration of the prop - """ - - err: typing.Optional[ObservationError] = None - k: str = pydantic.Field() - """ - The source of the log (e.g. `console.log`) - """ - - msg: typing.Optional[str] = pydantic.Field(default=None) - """ - The log message - """ - - ts: float = pydantic.Field() - """ - The time at which the log was produced, as milliseconds since the epoch - """ - - 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/observation_error.py b/src/pipedream/types/observation_error.py deleted file mode 100644 index 11ada30..0000000 --- a/src/pipedream/types/observation_error.py +++ /dev/null @@ -1,36 +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 ObservationError(UniversalBaseModel): - """ - Details about an observed error message - """ - - name: typing.Optional[str] = pydantic.Field(default=None) - """ - The name of the error/exception - """ - - message: typing.Optional[str] = pydantic.Field(default=None) - """ - The error message - """ - - stack: typing.Optional[str] = pydantic.Field(default=None) - """ - The stack trace of the error - """ - - 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/prop_option_nested.py b/src/pipedream/types/prop_option_nested.py deleted file mode 100644 index 806bf7c..0000000 --- a/src/pipedream/types/prop_option_nested.py +++ /dev/null @@ -1,26 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -import typing_extensions -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from ..core.serialization import FieldMetadata -from .prop_option import PropOption - - -class PropOptionNested(UniversalBaseModel): - """ - A configuration option for a component's prop (nested under `__lv`) - """ - - lv: typing_extensions.Annotated[PropOption, FieldMetadata(alias="__lv")] - - 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/reload_props_opts.py b/src/pipedream/types/reload_props_opts.py index 124eb34..909833f 100644 --- a/src/pipedream/types/reload_props_opts.py +++ b/src/pipedream/types/reload_props_opts.py @@ -4,7 +4,6 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .configured_props import ConfiguredProps class ReloadPropsOpts(UniversalBaseModel): @@ -27,7 +26,11 @@ class ReloadPropsOpts(UniversalBaseModel): Whether this operation should block until completion """ - configured_props: typing.Optional[ConfiguredProps] = None + configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None) + """ + The configured properties for the component + """ + dynamic_props_id: typing.Optional[str] = pydantic.Field(default=None) """ The ID for dynamic props diff --git a/src/pipedream/types/reload_props_response.py b/src/pipedream/types/reload_props_response.py index 6a138c5..bb7e53c 100644 --- a/src/pipedream/types/reload_props_response.py +++ b/src/pipedream/types/reload_props_response.py @@ -7,7 +7,6 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from ..core.serialization import FieldMetadata from .dynamic_props import DynamicProps -from .observation import Observation class ReloadPropsResponse(UniversalBaseModel): @@ -15,7 +14,11 @@ class ReloadPropsResponse(UniversalBaseModel): Response from reloading component props """ - observations: typing.Optional[typing.List[Observation]] = None + observations: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None) + """ + Any logs produced during the configuration of the prop + """ + errors: typing.Optional[typing.List[str]] = pydantic.Field(default=None) """ Any errors that occurred during configuration