diff --git a/pyproject.toml b/pyproject.toml index 121e3b7..69392a3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "pipedream" [tool.poetry] name = "pipedream" -version = "1.0.8" +version = "1.0.9" description = "" readme = "README.md" authors = [] diff --git a/src/pipedream/accounts/client.py b/src/pipedream/accounts/client.py index 854b919..4c97f9d 100644 --- a/src/pipedream/accounts/client.py +++ b/src/pipedream/accounts/client.py @@ -30,12 +30,12 @@ def with_raw_response(self) -> RawAccountsClient: def list( self, *, - app_id: typing.Optional[str] = None, external_user_id: typing.Optional[str] = None, oauth_app_id: typing.Optional[str] = None, after: typing.Optional[str] = None, before: typing.Optional[str] = None, limit: typing.Optional[int] = None, + app: typing.Optional[str] = None, include_credentials: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[Account]: @@ -44,9 +44,6 @@ def list( Parameters ---------- - app_id : typing.Optional[str] - The app slug or ID to filter accounts by. - external_user_id : typing.Optional[str] oauth_app_id : typing.Optional[str] @@ -61,6 +58,9 @@ def list( limit : typing.Optional[int] The maximum number of results to return + app : typing.Optional[str] + The app slug or ID to filter accounts by. + include_credentials : typing.Optional[bool] Whether to retrieve the account's credentials or not @@ -90,12 +90,12 @@ def list( yield page """ return self._raw_client.list( - app_id=app_id, external_user_id=external_user_id, oauth_app_id=oauth_app_id, after=after, before=before, limit=limit, + app=app, include_credentials=include_credentials, request_options=request_options, ) @@ -106,7 +106,6 @@ def create( app_slug: str, cfmap_json: str, connect_token: str, - app_id: typing.Optional[str] = None, external_user_id: typing.Optional[str] = None, oauth_app_id: typing.Optional[str] = None, name: typing.Optional[str] = OMIT, @@ -126,9 +125,6 @@ def create( connect_token : str The connect token for authentication - app_id : typing.Optional[str] - The app slug or ID to filter accounts by. - external_user_id : typing.Optional[str] oauth_app_id : typing.Optional[str] @@ -165,7 +161,6 @@ def create( app_slug=app_slug, cfmap_json=cfmap_json, connect_token=connect_token, - app_id=app_id, external_user_id=external_user_id, oauth_app_id=oauth_app_id, name=name, @@ -300,12 +295,12 @@ def with_raw_response(self) -> AsyncRawAccountsClient: async def list( self, *, - app_id: typing.Optional[str] = None, external_user_id: typing.Optional[str] = None, oauth_app_id: typing.Optional[str] = None, after: typing.Optional[str] = None, before: typing.Optional[str] = None, limit: typing.Optional[int] = None, + app: typing.Optional[str] = None, include_credentials: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[Account]: @@ -314,9 +309,6 @@ async def list( Parameters ---------- - app_id : typing.Optional[str] - The app slug or ID to filter accounts by. - external_user_id : typing.Optional[str] oauth_app_id : typing.Optional[str] @@ -331,6 +323,9 @@ async def list( limit : typing.Optional[int] The maximum number of results to return + app : typing.Optional[str] + The app slug or ID to filter accounts by. + include_credentials : typing.Optional[bool] Whether to retrieve the account's credentials or not @@ -369,12 +364,12 @@ async def main() -> None: asyncio.run(main()) """ return await self._raw_client.list( - app_id=app_id, external_user_id=external_user_id, oauth_app_id=oauth_app_id, after=after, before=before, limit=limit, + app=app, include_credentials=include_credentials, request_options=request_options, ) @@ -385,7 +380,6 @@ async def create( app_slug: str, cfmap_json: str, connect_token: str, - app_id: typing.Optional[str] = None, external_user_id: typing.Optional[str] = None, oauth_app_id: typing.Optional[str] = None, name: typing.Optional[str] = OMIT, @@ -405,9 +399,6 @@ async def create( connect_token : str The connect token for authentication - app_id : typing.Optional[str] - The app slug or ID to filter accounts by. - external_user_id : typing.Optional[str] oauth_app_id : typing.Optional[str] @@ -452,7 +443,6 @@ async def main() -> None: app_slug=app_slug, cfmap_json=cfmap_json, connect_token=connect_token, - app_id=app_id, external_user_id=external_user_id, oauth_app_id=oauth_app_id, name=name, diff --git a/src/pipedream/accounts/raw_client.py b/src/pipedream/accounts/raw_client.py index 7fffbeb..ac44791 100644 --- a/src/pipedream/accounts/raw_client.py +++ b/src/pipedream/accounts/raw_client.py @@ -25,12 +25,12 @@ def __init__(self, *, client_wrapper: SyncClientWrapper): def list( self, *, - app_id: typing.Optional[str] = None, external_user_id: typing.Optional[str] = None, oauth_app_id: typing.Optional[str] = None, after: typing.Optional[str] = None, before: typing.Optional[str] = None, limit: typing.Optional[int] = None, + app: typing.Optional[str] = None, include_credentials: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[Account]: @@ -39,9 +39,6 @@ def list( Parameters ---------- - app_id : typing.Optional[str] - The app slug or ID to filter accounts by. - external_user_id : typing.Optional[str] oauth_app_id : typing.Optional[str] @@ -56,6 +53,9 @@ def list( limit : typing.Optional[int] The maximum number of results to return + app : typing.Optional[str] + The app slug or ID to filter accounts by. + include_credentials : typing.Optional[bool] Whether to retrieve the account's credentials or not @@ -71,12 +71,12 @@ def list( f"v1/connect/{jsonable_encoder(self._client_wrapper._project_id)}/accounts", method="GET", params={ - "app_id": app_id, "external_user_id": external_user_id, "oauth_app_id": oauth_app_id, "after": after, "before": before, "limit": limit, + "app": app, "include_credentials": include_credentials, }, request_options=request_options, @@ -97,12 +97,12 @@ def list( _parsed_next = _parsed_response.page_info.end_cursor _has_next = _parsed_next is not None and _parsed_next != "" _get_next = lambda: self.list( - app_id=app_id, external_user_id=external_user_id, oauth_app_id=oauth_app_id, after=_parsed_next, before=before, limit=limit, + app=app, include_credentials=include_credentials, request_options=request_options, ) @@ -131,7 +131,6 @@ def create( app_slug: str, cfmap_json: str, connect_token: str, - app_id: typing.Optional[str] = None, external_user_id: typing.Optional[str] = None, oauth_app_id: typing.Optional[str] = None, name: typing.Optional[str] = OMIT, @@ -151,9 +150,6 @@ def create( connect_token : str The connect token for authentication - app_id : typing.Optional[str] - The app slug or ID to filter accounts by. - external_user_id : typing.Optional[str] oauth_app_id : typing.Optional[str] @@ -174,7 +170,6 @@ def create( f"v1/connect/{jsonable_encoder(self._client_wrapper._project_id)}/accounts", method="POST", params={ - "app_id": app_id, "external_user_id": external_user_id, "oauth_app_id": oauth_app_id, }, @@ -363,12 +358,12 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper): async def list( self, *, - app_id: typing.Optional[str] = None, external_user_id: typing.Optional[str] = None, oauth_app_id: typing.Optional[str] = None, after: typing.Optional[str] = None, before: typing.Optional[str] = None, limit: typing.Optional[int] = None, + app: typing.Optional[str] = None, include_credentials: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[Account]: @@ -377,9 +372,6 @@ async def list( Parameters ---------- - app_id : typing.Optional[str] - The app slug or ID to filter accounts by. - external_user_id : typing.Optional[str] oauth_app_id : typing.Optional[str] @@ -394,6 +386,9 @@ async def list( limit : typing.Optional[int] The maximum number of results to return + app : typing.Optional[str] + The app slug or ID to filter accounts by. + include_credentials : typing.Optional[bool] Whether to retrieve the account's credentials or not @@ -409,12 +404,12 @@ async def list( f"v1/connect/{jsonable_encoder(self._client_wrapper._project_id)}/accounts", method="GET", params={ - "app_id": app_id, "external_user_id": external_user_id, "oauth_app_id": oauth_app_id, "after": after, "before": before, "limit": limit, + "app": app, "include_credentials": include_credentials, }, request_options=request_options, @@ -437,12 +432,12 @@ async def list( async def _get_next(): return await self.list( - app_id=app_id, external_user_id=external_user_id, oauth_app_id=oauth_app_id, after=_parsed_next, before=before, limit=limit, + app=app, include_credentials=include_credentials, request_options=request_options, ) @@ -472,7 +467,6 @@ async def create( app_slug: str, cfmap_json: str, connect_token: str, - app_id: typing.Optional[str] = None, external_user_id: typing.Optional[str] = None, oauth_app_id: typing.Optional[str] = None, name: typing.Optional[str] = OMIT, @@ -492,9 +486,6 @@ async def create( connect_token : str The connect token for authentication - app_id : typing.Optional[str] - The app slug or ID to filter accounts by. - external_user_id : typing.Optional[str] oauth_app_id : typing.Optional[str] @@ -515,7 +506,6 @@ async def create( f"v1/connect/{jsonable_encoder(self._client_wrapper._project_id)}/accounts", method="POST", params={ - "app_id": app_id, "external_user_id": external_user_id, "oauth_app_id": oauth_app_id, }, 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 2c7dc4b..6e8af2d 100644 --- a/src/pipedream/actions/raw_client.py +++ b/src/pipedream/actions/raw_client.py @@ -14,7 +14,6 @@ from ..errors.too_many_requests_error import TooManyRequestsError 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 @@ -179,7 +178,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, @@ -203,7 +202,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 @@ -233,9 +233,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, @@ -279,7 +277,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]: @@ -297,7 +295,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 @@ -317,9 +316,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={ @@ -359,7 +356,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, @@ -375,7 +372,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 @@ -396,9 +394,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" @@ -594,7 +590,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, @@ -618,7 +614,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 @@ -648,9 +645,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, @@ -694,7 +689,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]: @@ -712,7 +707,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 @@ -732,9 +728,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={ @@ -774,7 +768,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, @@ -790,7 +784,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 @@ -811,9 +806,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/client.py b/src/pipedream/client.py index 6f4accc..cfb7782 100644 --- a/src/pipedream/client.py +++ b/src/pipedream/client.py @@ -6,7 +6,7 @@ import typing import httpx -from .types.project_environment import ProjectEnvironment +from ._.types.project_environment import ProjectEnvironment from .core.api_error import ApiError from .core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from .core.oauth_token_provider import OAuthTokenProvider 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 10f69c9..f9967a3 100644 --- a/src/pipedream/components/raw_client.py +++ b/src/pipedream/components/raw_client.py @@ -10,12 +10,9 @@ 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 ..errors.too_many_requests_error import TooManyRequestsError 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 @@ -36,7 +33,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]: """ @@ -59,9 +55,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. @@ -79,7 +72,6 @@ def list( "limit": limit, "q": q, "app": app, - "component_type": component_type, }, request_options=request_options, ) @@ -104,7 +96,6 @@ def list( limit=limit, q=q, app=app, - component_type=component_type, request_options=request_options, ) return SyncPager( @@ -184,7 +175,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, @@ -208,7 +199,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 @@ -238,9 +230,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, @@ -284,7 +274,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]: @@ -302,7 +292,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 @@ -322,9 +313,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={ @@ -372,7 +361,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]: """ @@ -395,9 +383,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. @@ -415,7 +400,6 @@ async def list( "limit": limit, "q": q, "app": app, - "component_type": component_type, }, request_options=request_options, ) @@ -442,7 +426,6 @@ async def _get_next(): limit=limit, q=q, app=app, - component_type=component_type, request_options=request_options, ) @@ -523,7 +506,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, @@ -547,7 +530,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 @@ -577,9 +561,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, @@ -623,7 +605,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]: @@ -641,7 +623,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 @@ -661,9 +644,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/client_wrapper.py b/src/pipedream/core/client_wrapper.py index 72d55cd..554e659 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.8", + "User-Agent": "pipedream/1.0.9", "X-Fern-Language": "Python", "X-Fern-SDK-Name": "pipedream", - "X-Fern-SDK-Version": "1.0.8", + "X-Fern-SDK-Version": "1.0.9", **(self.get_custom_headers() or {}), } if self._project_environment is not None: 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 8934c6e..203558f 100644 --- a/src/pipedream/deployed_triggers/raw_client.py +++ b/src/pipedream/deployed_triggers/raw_client.py @@ -10,9 +10,7 @@ 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 ..errors.too_many_requests_error import TooManyRequestsError -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 @@ -177,7 +175,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]: @@ -194,7 +192,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 @@ -215,9 +214,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={ @@ -780,7 +777,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]: @@ -797,7 +794,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 @@ -818,9 +816,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..fb3371e 100644 --- a/src/pipedream/triggers/client.py +++ b/src/pipedream/triggers/client.py @@ -7,8 +7,7 @@ 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.deploy_trigger_response_data import DeployTriggerResponseData 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,11 +275,11 @@ 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, - ) -> DeployedComponent: + ) -> DeployTriggerResponseData: """ Deploy a trigger to listen for and emit events @@ -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 @@ -303,7 +305,7 @@ def deploy( Returns ------- - DeployedComponent + DeployTriggerResponseData trigger deployed Examples @@ -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,11 +629,11 @@ 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, - ) -> DeployedComponent: + ) -> DeployTriggerResponseData: """ Deploy a trigger to listen for and emit events @@ -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 @@ -654,7 +659,7 @@ async def deploy( Returns ------- - DeployedComponent + DeployTriggerResponseData trigger deployed Examples diff --git a/src/pipedream/triggers/raw_client.py b/src/pipedream/triggers/raw_client.py index faf7bee..bfe240a 100644 --- a/src/pipedream/triggers/raw_client.py +++ b/src/pipedream/triggers/raw_client.py @@ -10,13 +10,11 @@ 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 ..errors.too_many_requests_error import TooManyRequestsError 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.deploy_trigger_response_data import DeployTriggerResponseData from ..types.get_component_response import GetComponentResponse from ..types.get_components_response import GetComponentsResponse from ..types.reload_props_response import ReloadPropsResponse @@ -179,7 +177,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, @@ -203,7 +201,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 @@ -233,9 +232,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, @@ -279,7 +276,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]: @@ -297,7 +294,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 @@ -317,9 +315,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={ @@ -359,11 +355,11 @@ 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, - ) -> HttpResponse[DeployedComponent]: + ) -> HttpResponse[DeployTriggerResponseData]: """ Deploy a trigger to listen for and emit events @@ -375,7 +371,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 @@ -388,7 +385,7 @@ def deploy( Returns ------- - HttpResponse[DeployedComponent] + HttpResponse[DeployTriggerResponseData] trigger deployed """ _response = self._client_wrapper.httpx_client.request( @@ -397,9 +394,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, }, @@ -594,7 +589,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, @@ -618,7 +613,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 @@ -648,9 +644,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, @@ -694,7 +688,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]: @@ -712,7 +706,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 @@ -732,9 +727,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={ @@ -774,11 +767,11 @@ 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, - ) -> AsyncHttpResponse[DeployedComponent]: + ) -> AsyncHttpResponse[DeployTriggerResponseData]: """ Deploy a trigger to listen for and emit events @@ -790,7 +783,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 @@ -803,7 +797,7 @@ async def deploy( Returns ------- - AsyncHttpResponse[DeployedComponent] + AsyncHttpResponse[DeployTriggerResponseData] trigger deployed """ _response = await self._client_wrapper.httpx_client.request( @@ -812,9 +806,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 535fbf0..c3495ad 100644 --- a/src/pipedream/types/__init__.py +++ b/src/pipedream/types/__init__.py @@ -7,7 +7,6 @@ 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 @@ -15,7 +14,6 @@ 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 @@ -43,26 +41,14 @@ 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 .deploy_trigger_response_data import DeployTriggerResponseData from .deployed_component import DeployedComponent from .dynamic_props import DynamicProps from .emitted_event import EmittedEvent @@ -78,18 +64,15 @@ from .get_trigger_webhooks_response import GetTriggerWebhooksResponse from .get_trigger_workflows_response import GetTriggerWorkflowsResponse from .get_triggers_response import GetTriggersResponse + from .http_interface import HttpInterface 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 .prop_option_value import PropOptionValue from .proxy_response import ProxyResponse from .reload_props_opts import ReloadPropsOpts from .reload_props_response import ReloadPropsResponse @@ -98,12 +81,13 @@ from .start_connect_opts import StartConnectOpts from .stash_id import StashId from .timer_cron import TimerCron + from .timer_interface import TimerInterface from .timer_interval import TimerInterval from .too_many_requests_error_body import TooManyRequestsErrorBody + from .tool_annotations import ToolAnnotations 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", @@ -111,7 +95,6 @@ "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", @@ -139,26 +122,14 @@ "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", + "DeployTriggerResponseData": ".deploy_trigger_response_data", "DeployedComponent": ".deployed_component", "DynamicProps": ".dynamic_props", "EmittedEvent": ".emitted_event", @@ -174,18 +145,15 @@ "GetTriggerWebhooksResponse": ".get_trigger_webhooks_response", "GetTriggerWorkflowsResponse": ".get_trigger_workflows_response", "GetTriggersResponse": ".get_triggers_response", + "HttpInterface": ".http_interface", "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", - "PropOptionValue": ".prop_option_value", "ProxyResponse": ".proxy_response", "ReloadPropsOpts": ".reload_props_opts", "ReloadPropsResponse": ".reload_props_response", @@ -194,8 +162,10 @@ "StartConnectOpts": ".start_connect_opts", "StashId": ".stash_id", "TimerCron": ".timer_cron", + "TimerInterface": ".timer_interface", "TimerInterval": ".timer_interval", "TooManyRequestsErrorBody": ".too_many_requests_error_body", + "ToolAnnotations": ".tool_annotations", "ValidateTokenResponse": ".validate_token_response", } @@ -221,7 +191,6 @@ def __dir__(): __all__ = [ "Account", - "AccountId", "App", "AppAuthType", "AppCategory", @@ -229,7 +198,6 @@ def __dir__(): "ClientOpts", "Component", "ComponentStash", - "ComponentType", "ConfigurableProp", "ConfigurablePropAirtableBaseId", "ConfigurablePropAirtableFieldId", @@ -257,26 +225,14 @@ def __dir__(): "ConfigurablePropTimerDefault", "ConfigurablePropTimerOption", "ConfigurablePropTimerStatic", - "ConfigurablePropType", - "ConfigurePropOptions", - "ConfigurePropOptionsItem", "ConfigurePropOpts", "ConfigurePropResponse", - "ConfiguredPropValue", - "ConfiguredPropValueAny", - "ConfiguredPropValueApp", - "ConfiguredPropValueBoolean", - "ConfiguredPropValueInteger", - "ConfiguredPropValueObject", - "ConfiguredPropValueSql", - "ConfiguredPropValueString", - "ConfiguredPropValueStringArray", - "ConfiguredProps", "ConnectToken", "CreateOAuthTokenResponse", "CreateTokenResponse", "DeleteTriggerOpts", "DeployTriggerResponse", + "DeployTriggerResponseData", "DeployedComponent", "DynamicProps", "EmittedEvent", @@ -292,18 +248,15 @@ def __dir__(): "GetTriggerWebhooksResponse", "GetTriggerWorkflowsResponse", "GetTriggersResponse", + "HttpInterface", "ListAccountsResponse", "ListAppCategoriesResponse", "ListAppsResponse", - "Observation", - "ObservationError", "PageInfo", "ProjectEnvironment", "ProjectInfoResponse", "ProjectInfoResponseApp", "PropOption", - "PropOptionNested", - "PropOptionValue", "ProxyResponse", "ReloadPropsOpts", "ReloadPropsResponse", @@ -312,7 +265,9 @@ def __dir__(): "StartConnectOpts", "StashId", "TimerCron", + "TimerInterface", "TimerInterval", "TooManyRequestsErrorBody", + "ToolAnnotations", "ValidateTokenResponse", ] 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.py b/src/pipedream/types/component.py index 5ea1ff2..d707695 100644 --- a/src/pipedream/types/component.py +++ b/src/pipedream/types/component.py @@ -6,6 +6,7 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from .component_stash import ComponentStash from .configurable_prop import ConfigurableProp +from .tool_annotations import ToolAnnotations class Component(UniversalBaseModel): @@ -36,6 +37,7 @@ class Component(UniversalBaseModel): """ stash: typing.Optional[ComponentStash] = None + annotations: typing.Optional[ToolAnnotations] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/pipedream/types/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 408276a..0000000 --- a/src/pipedream/types/configurable_prop_type.py +++ /dev/null @@ -1,32 +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", - "$.discord.channel[]", - "$.interface.apphook", - "$.interface.http", - "$.interface.timer", - "$.service.db", - "alert", - "any", - "app", - "boolean", - "data_store", - "dir", - "http_request", - "integer", - "integer[]", - "object", - "sql", - "string", - "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/deploy_trigger_response.py b/src/pipedream/types/deploy_trigger_response.py index bdb7143..3ef2b0b 100644 --- a/src/pipedream/types/deploy_trigger_response.py +++ b/src/pipedream/types/deploy_trigger_response.py @@ -4,7 +4,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .deployed_component import DeployedComponent +from .deploy_trigger_response_data import DeployTriggerResponseData class DeployTriggerResponse(UniversalBaseModel): @@ -12,7 +12,7 @@ class DeployTriggerResponse(UniversalBaseModel): Response received after deploying a trigger """ - data: DeployedComponent + data: DeployTriggerResponseData if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/pipedream/types/deploy_trigger_response_data.py b/src/pipedream/types/deploy_trigger_response_data.py new file mode 100644 index 0000000..3a175e2 --- /dev/null +++ b/src/pipedream/types/deploy_trigger_response_data.py @@ -0,0 +1,9 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .deployed_component import DeployedComponent +from .http_interface import HttpInterface +from .timer_interface import TimerInterface + +DeployTriggerResponseData = typing.Union[DeployedComponent, HttpInterface, TimerInterface] 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_error.py b/src/pipedream/types/http_interface.py similarity index 53% rename from src/pipedream/types/observation_error.py rename to src/pipedream/types/http_interface.py index 11ada30..7c32c5f 100644 --- a/src/pipedream/types/observation_error.py +++ b/src/pipedream/types/http_interface.py @@ -6,24 +6,27 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -class ObservationError(UniversalBaseModel): +class HttpInterface(UniversalBaseModel): """ - Details about an observed error message + An HTTP interface instance """ - name: typing.Optional[str] = pydantic.Field(default=None) + id: str = pydantic.Field() """ - The name of the error/exception + The unique ID of the HTTP interface """ - message: typing.Optional[str] = pydantic.Field(default=None) + key: str + endpoint_url: str + custom_response: bool + created_at: int = pydantic.Field() """ - The error message + The timestamp when the HTTP interface was created (epoch milliseconds) """ - stack: typing.Optional[str] = pydantic.Field(default=None) + updated_at: typing.Optional[int] = pydantic.Field(default=None) """ - The stack trace of the error + The timestamp when the HTTP interface was last updated (epoch milliseconds) """ if IS_PYDANTIC_V2: 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/prop_option.py b/src/pipedream/types/prop_option.py index 254d83e..652f746 100644 --- a/src/pipedream/types/prop_option.py +++ b/src/pipedream/types/prop_option.py @@ -4,7 +4,6 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .prop_option_value import PropOptionValue class PropOption(UniversalBaseModel): @@ -17,7 +16,7 @@ class PropOption(UniversalBaseModel): The human-readable label for the option """ - value: typing.Optional[PropOptionValue] = None + value: typing.Optional[typing.Any] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/pipedream/types/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/prop_option_value.py b/src/pipedream/types/prop_option_value.py deleted file mode 100644 index cad0133..0000000 --- a/src/pipedream/types/prop_option_value.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -PropOptionValue = typing.Union[str, int, bool] 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 diff --git a/src/pipedream/types/timer_interface.py b/src/pipedream/types/timer_interface.py new file mode 100644 index 0000000..ee2a0f8 --- /dev/null +++ b/src/pipedream/types/timer_interface.py @@ -0,0 +1,40 @@ +# 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 TimerInterface(UniversalBaseModel): + """ + A timer interface instance + """ + + id: str = pydantic.Field() + """ + The unique ID of the timer interface + """ + + interval_seconds: typing.Optional[float] = None + cron: typing.Optional[str] = None + timezone: str + schedule_changed_at: int + created_at: int = pydantic.Field() + """ + The timestamp when the timer interface was created (epoch milliseconds) + """ + + updated_at: typing.Optional[int] = pydantic.Field(default=None) + """ + The timestamp when the timer interface was last updated (epoch milliseconds) + """ + + 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/tool_annotations.py b/src/pipedream/types/tool_annotations.py new file mode 100644 index 0000000..a66f513 --- /dev/null +++ b/src/pipedream/types/tool_annotations.py @@ -0,0 +1,56 @@ +# 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 ToolAnnotations(UniversalBaseModel): + """ + Optional properties describing component behavior + """ + + destructive_hint: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="destructiveHint")] = ( + pydantic.Field(default=None) + ) + """ + If true, the component may perform destructive updates to its environment. If false, the component performs only additive updates. + """ + + idempotent_hint: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="idempotentHint")] = ( + pydantic.Field(default=None) + ) + """ + If true, calling the component repeatedly with the same arguments will have no additional effect on the its environment. + """ + + open_world_hint: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="openWorldHint")] = ( + pydantic.Field(default=None) + ) + """ + If true, this component may interact with an “open world” of external entities. If false, the component's domain of interaction is closed. For example, the world of a web search component is open, whereas that of a memory component is not. + """ + + read_only_hint: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="readOnlyHint")] = ( + pydantic.Field(default=None) + ) + """ + If true, the component does not modify its environment. + """ + + title: typing.Optional[str] = pydantic.Field(default=None) + """ + A human-readable title for the component. + """ + + 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