diff --git a/README.md b/README.md index 971a101..d2405c2 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2FPipedreamHQ%2Fpipedream-sdk-python) [![pypi](https://img.shields.io/pypi/v/pipedream)](https://pypi.python.org/pypi/pipedream) -The Pipedream Python library provides convenient access to the Pipedream API from Python. +The Pipedream Python library provides convenient access to the Pipedream APIs from Python. ## Installation diff --git a/pyproject.toml b/pyproject.toml index d3d3731..6a115d7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "pipedream" [tool.poetry] name = "pipedream" -version = "1.0.5" +version = "1.0.6" description = "" readme = "README.md" authors = [] diff --git a/src/pipedream/actions/client.py b/src/pipedream/actions/client.py index 20db8b9..a7a44f6 100644 --- a/src/pipedream/actions/client.py +++ b/src/pipedream/actions/client.py @@ -7,6 +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.reload_props_response import ReloadPropsResponse from ..types.run_action_opts_stash_id import RunActionOptsStashId from ..types.run_action_response import RunActionResponse @@ -131,7 +132,7 @@ def configure_prop( external_user_id: str, prop_name: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + configured_props: typing.Optional[ConfiguredProps] = 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,8 +156,7 @@ def configure_prop( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - The configured properties for the component + configured_props : typing.Optional[ConfiguredProps] 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[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + configured_props: typing.Optional[ConfiguredProps] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> ReloadPropsResponse: @@ -232,8 +232,7 @@ def reload_props( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - The configured properties for the component + configured_props : typing.Optional[ConfiguredProps] dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -276,7 +275,7 @@ def run( *, id: str, external_user_id: str, - configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + configured_props: typing.Optional[ConfiguredProps] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, stash_id: typing.Optional[RunActionOptsStashId] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -292,8 +291,7 @@ def run( external_user_id : str The external user ID - configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - The configured properties for the action + configured_props : typing.Optional[ConfiguredProps] dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -468,7 +466,7 @@ async def configure_prop( external_user_id: str, prop_name: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + configured_props: typing.Optional[ConfiguredProps] = 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, @@ -492,8 +490,7 @@ async def configure_prop( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - The configured properties for the component + configured_props : typing.Optional[ConfiguredProps] dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -559,7 +556,7 @@ async def reload_props( id: str, external_user_id: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + configured_props: typing.Optional[ConfiguredProps] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> ReloadPropsResponse: @@ -577,8 +574,7 @@ async def reload_props( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - The configured properties for the component + configured_props : typing.Optional[ConfiguredProps] dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -629,7 +625,7 @@ async def run( *, id: str, external_user_id: str, - configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + configured_props: typing.Optional[ConfiguredProps] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, stash_id: typing.Optional[RunActionOptsStashId] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -645,8 +641,7 @@ async def run( external_user_id : str The external user ID - configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - The configured properties for the action + configured_props : typing.Optional[ConfiguredProps] 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 5efb6a8..026d20d 100644 --- a/src/pipedream/actions/raw_client.py +++ b/src/pipedream/actions/raw_client.py @@ -13,6 +13,7 @@ from ..core.serialization import convert_and_respect_annotation_metadata from ..types.component import Component from ..types.configure_prop_response import ConfigurePropResponse +from ..types.configured_props import ConfiguredProps from ..types.get_component_response import GetComponentResponse from ..types.get_components_response import GetComponentsResponse from ..types.reload_props_response import ReloadPropsResponse @@ -155,7 +156,7 @@ def configure_prop( external_user_id: str, prop_name: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + configured_props: typing.Optional[ConfiguredProps] = 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, @@ -179,8 +180,7 @@ def configure_prop( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - The configured properties for the component + configured_props : typing.Optional[ConfiguredProps] dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -210,7 +210,9 @@ def configure_prop( "external_user_id": external_user_id, "prop_name": prop_name, "blocking": blocking, - "configured_props": configured_props, + "configured_props": convert_and_respect_annotation_metadata( + object_=configured_props, annotation=ConfiguredProps, direction="write" + ), "dynamic_props_id": dynamic_props_id, "page": page, "prev_context": prev_context, @@ -243,7 +245,7 @@ def reload_props( id: str, external_user_id: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + configured_props: typing.Optional[ConfiguredProps] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[ReloadPropsResponse]: @@ -261,8 +263,7 @@ def reload_props( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - The configured properties for the component + configured_props : typing.Optional[ConfiguredProps] dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -282,7 +283,9 @@ def reload_props( "id": id, "external_user_id": external_user_id, "blocking": blocking, - "configured_props": configured_props, + "configured_props": convert_and_respect_annotation_metadata( + object_=configured_props, annotation=ConfiguredProps, direction="write" + ), "dynamic_props_id": dynamic_props_id, }, headers={ @@ -311,7 +314,7 @@ def run( *, id: str, external_user_id: str, - configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + configured_props: typing.Optional[ConfiguredProps] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, stash_id: typing.Optional[RunActionOptsStashId] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -327,8 +330,7 @@ def run( external_user_id : str The external user ID - configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - The configured properties for the action + configured_props : typing.Optional[ConfiguredProps] dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -349,7 +351,9 @@ def run( json={ "id": id, "external_user_id": external_user_id, - "configured_props": configured_props, + "configured_props": convert_and_respect_annotation_metadata( + object_=configured_props, annotation=ConfiguredProps, direction="write" + ), "dynamic_props_id": dynamic_props_id, "stash_id": convert_and_respect_annotation_metadata( object_=stash_id, annotation=RunActionOptsStashId, direction="write" @@ -512,7 +516,7 @@ async def configure_prop( external_user_id: str, prop_name: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + configured_props: typing.Optional[ConfiguredProps] = 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, @@ -536,8 +540,7 @@ async def configure_prop( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - The configured properties for the component + configured_props : typing.Optional[ConfiguredProps] dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -567,7 +570,9 @@ async def configure_prop( "external_user_id": external_user_id, "prop_name": prop_name, "blocking": blocking, - "configured_props": configured_props, + "configured_props": convert_and_respect_annotation_metadata( + object_=configured_props, annotation=ConfiguredProps, direction="write" + ), "dynamic_props_id": dynamic_props_id, "page": page, "prev_context": prev_context, @@ -600,7 +605,7 @@ async def reload_props( id: str, external_user_id: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + configured_props: typing.Optional[ConfiguredProps] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[ReloadPropsResponse]: @@ -618,8 +623,7 @@ async def reload_props( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - The configured properties for the component + configured_props : typing.Optional[ConfiguredProps] dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -639,7 +643,9 @@ async def reload_props( "id": id, "external_user_id": external_user_id, "blocking": blocking, - "configured_props": configured_props, + "configured_props": convert_and_respect_annotation_metadata( + object_=configured_props, annotation=ConfiguredProps, direction="write" + ), "dynamic_props_id": dynamic_props_id, }, headers={ @@ -668,7 +674,7 @@ async def run( *, id: str, external_user_id: str, - configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + configured_props: typing.Optional[ConfiguredProps] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, stash_id: typing.Optional[RunActionOptsStashId] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -684,8 +690,7 @@ async def run( external_user_id : str The external user ID - configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - The configured properties for the action + configured_props : typing.Optional[ConfiguredProps] dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -706,7 +711,9 @@ async def run( json={ "id": id, "external_user_id": external_user_id, - "configured_props": configured_props, + "configured_props": convert_and_respect_annotation_metadata( + object_=configured_props, annotation=ConfiguredProps, direction="write" + ), "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 24d3539..05f4186 100644 --- a/src/pipedream/client.py +++ b/src/pipedream/client.py @@ -4,7 +4,7 @@ import typing import httpx -from .types.project_environment import ProjectEnvironment +from ._.types.project_environment import ProjectEnvironment from .accounts.client import AccountsClient, AsyncAccountsClient from .actions.client import ActionsClient, AsyncActionsClient from .app_categories.client import AppCategoriesClient, AsyncAppCategoriesClient diff --git a/src/pipedream/components/client.py b/src/pipedream/components/client.py index 24f78d8..c23cc5c 100644 --- a/src/pipedream/components/client.py +++ b/src/pipedream/components/client.py @@ -7,6 +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.reload_props_response import ReloadPropsResponse from .raw_client import AsyncRawComponentsClient, RawComponentsClient @@ -129,7 +130,7 @@ def configure_prop( external_user_id: str, prop_name: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + configured_props: typing.Optional[ConfiguredProps] = 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, @@ -153,8 +154,7 @@ def configure_prop( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - The configured properties for the component + configured_props : typing.Optional[ConfiguredProps] dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -212,7 +212,7 @@ def reload_props( id: str, external_user_id: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + configured_props: typing.Optional[ConfiguredProps] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> ReloadPropsResponse: @@ -230,8 +230,7 @@ def reload_props( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - The configured properties for the component + configured_props : typing.Optional[ConfiguredProps] dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -404,7 +403,7 @@ async def configure_prop( external_user_id: str, prop_name: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + configured_props: typing.Optional[ConfiguredProps] = 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, @@ -428,8 +427,7 @@ async def configure_prop( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - The configured properties for the component + configured_props : typing.Optional[ConfiguredProps] dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -495,7 +493,7 @@ async def reload_props( id: str, external_user_id: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + configured_props: typing.Optional[ConfiguredProps] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> ReloadPropsResponse: @@ -513,8 +511,7 @@ async def reload_props( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - The configured properties for the component + configured_props : typing.Optional[ConfiguredProps] 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 e64f04d..5065e8d 100644 --- a/src/pipedream/components/raw_client.py +++ b/src/pipedream/components/raw_client.py @@ -10,8 +10,10 @@ from ..core.pagination import AsyncPager, BaseHttpResponse, SyncPager from ..core.pydantic_utilities import parse_obj_as from ..core.request_options import RequestOptions +from ..core.serialization import convert_and_respect_annotation_metadata from ..types.component import Component from ..types.configure_prop_response import ConfigurePropResponse +from ..types.configured_props import ConfiguredProps from ..types.get_component_response import GetComponentResponse from ..types.get_components_response import GetComponentsResponse from ..types.reload_props_response import ReloadPropsResponse @@ -152,7 +154,7 @@ def configure_prop( external_user_id: str, prop_name: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + configured_props: typing.Optional[ConfiguredProps] = 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, @@ -176,8 +178,7 @@ def configure_prop( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - The configured properties for the component + configured_props : typing.Optional[ConfiguredProps] dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -207,7 +208,9 @@ def configure_prop( "external_user_id": external_user_id, "prop_name": prop_name, "blocking": blocking, - "configured_props": configured_props, + "configured_props": convert_and_respect_annotation_metadata( + object_=configured_props, annotation=ConfiguredProps, direction="write" + ), "dynamic_props_id": dynamic_props_id, "page": page, "prev_context": prev_context, @@ -240,7 +243,7 @@ def reload_props( id: str, external_user_id: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + configured_props: typing.Optional[ConfiguredProps] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[ReloadPropsResponse]: @@ -258,8 +261,7 @@ def reload_props( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - The configured properties for the component + configured_props : typing.Optional[ConfiguredProps] dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -279,7 +281,9 @@ def reload_props( "id": id, "external_user_id": external_user_id, "blocking": blocking, - "configured_props": configured_props, + "configured_props": convert_and_respect_annotation_metadata( + object_=configured_props, annotation=ConfiguredProps, direction="write" + ), "dynamic_props_id": dynamic_props_id, }, headers={ @@ -439,7 +443,7 @@ async def configure_prop( external_user_id: str, prop_name: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + configured_props: typing.Optional[ConfiguredProps] = 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, @@ -463,8 +467,7 @@ async def configure_prop( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - The configured properties for the component + configured_props : typing.Optional[ConfiguredProps] dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -494,7 +497,9 @@ async def configure_prop( "external_user_id": external_user_id, "prop_name": prop_name, "blocking": blocking, - "configured_props": configured_props, + "configured_props": convert_and_respect_annotation_metadata( + object_=configured_props, annotation=ConfiguredProps, direction="write" + ), "dynamic_props_id": dynamic_props_id, "page": page, "prev_context": prev_context, @@ -527,7 +532,7 @@ async def reload_props( id: str, external_user_id: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + configured_props: typing.Optional[ConfiguredProps] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[ReloadPropsResponse]: @@ -545,8 +550,7 @@ async def reload_props( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - The configured properties for the component + configured_props : typing.Optional[ConfiguredProps] dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -566,7 +570,9 @@ async def reload_props( "id": id, "external_user_id": external_user_id, "blocking": blocking, - "configured_props": configured_props, + "configured_props": convert_and_respect_annotation_metadata( + object_=configured_props, annotation=ConfiguredProps, direction="write" + ), "dynamic_props_id": dynamic_props_id, }, headers={ diff --git a/src/pipedream/core/client_wrapper.py b/src/pipedream/core/client_wrapper.py index 6a68ab4..28625de 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.5", + "User-Agent": "pipedream/1.0.6", "X-Fern-Language": "Python", "X-Fern-SDK-Name": "pipedream", - "X-Fern-SDK-Version": "1.0.5", + "X-Fern-SDK-Version": "1.0.6", **(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 f2f5a7d..9493eef 100644 --- a/src/pipedream/deployed_triggers/client.py +++ b/src/pipedream/deployed_triggers/client.py @@ -5,6 +5,7 @@ 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 @@ -134,7 +135,7 @@ def update( *, external_user_id: str, active: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + configured_props: typing.Optional[ConfiguredProps] = OMIT, name: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> DeployedComponent: @@ -151,8 +152,7 @@ def update( active : typing.Optional[bool] Whether the trigger should be active - configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - The configured properties for the trigger + configured_props : typing.Optional[ConfiguredProps] 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[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + configured_props: typing.Optional[ConfiguredProps] = OMIT, name: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> DeployedComponent: @@ -626,8 +626,7 @@ async def update( active : typing.Optional[bool] Whether the trigger should be active - configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - The configured properties for the trigger + configured_props : typing.Optional[ConfiguredProps] 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 d1ef703..9ff533b 100644 --- a/src/pipedream/deployed_triggers/raw_client.py +++ b/src/pipedream/deployed_triggers/raw_client.py @@ -10,6 +10,8 @@ from ..core.pagination import AsyncPager, BaseHttpResponse, SyncPager from ..core.pydantic_utilities import parse_obj_as from ..core.request_options import RequestOptions +from ..core.serialization import convert_and_respect_annotation_metadata +from ..types.configured_props import ConfiguredProps from ..types.deployed_component import DeployedComponent from ..types.emitted_event import EmittedEvent from ..types.get_trigger_events_response import GetTriggerEventsResponse @@ -152,7 +154,7 @@ def update( *, external_user_id: str, active: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + configured_props: typing.Optional[ConfiguredProps] = OMIT, name: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[DeployedComponent]: @@ -169,8 +171,7 @@ def update( active : typing.Optional[bool] Whether the trigger should be active - configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - The configured properties for the trigger + configured_props : typing.Optional[ConfiguredProps] name : typing.Optional[str] The name of the trigger @@ -191,7 +192,9 @@ def update( }, json={ "active": active, - "configured_props": configured_props, + "configured_props": convert_and_respect_annotation_metadata( + object_=configured_props, annotation=ConfiguredProps, direction="write" + ), "name": name, }, headers={ @@ -655,7 +658,7 @@ async def update( *, external_user_id: str, active: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + configured_props: typing.Optional[ConfiguredProps] = OMIT, name: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[DeployedComponent]: @@ -672,8 +675,7 @@ async def update( active : typing.Optional[bool] Whether the trigger should be active - configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - The configured properties for the trigger + configured_props : typing.Optional[ConfiguredProps] name : typing.Optional[str] The name of the trigger @@ -694,7 +696,9 @@ async def update( }, json={ "active": active, - "configured_props": configured_props, + "configured_props": convert_and_respect_annotation_metadata( + object_=configured_props, annotation=ConfiguredProps, direction="write" + ), "name": name, }, headers={ diff --git a/src/pipedream/triggers/client.py b/src/pipedream/triggers/client.py index ecefa64..32bf25d 100644 --- a/src/pipedream/triggers/client.py +++ b/src/pipedream/triggers/client.py @@ -7,6 +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.reload_props_response import ReloadPropsResponse from .raw_client import AsyncRawTriggersClient, RawTriggersClient @@ -130,7 +131,7 @@ def configure_prop( external_user_id: str, prop_name: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + configured_props: typing.Optional[ConfiguredProps] = 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, @@ -154,8 +155,7 @@ def configure_prop( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - The configured properties for the component + configured_props : typing.Optional[ConfiguredProps] 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[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + configured_props: typing.Optional[ConfiguredProps] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> ReloadPropsResponse: @@ -231,8 +231,7 @@ def reload_props( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - The configured properties for the component + configured_props : typing.Optional[ConfiguredProps] dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -275,7 +274,7 @@ def deploy( *, id: str, external_user_id: str, - configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + configured_props: typing.Optional[ConfiguredProps] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, webhook_url: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -291,8 +290,7 @@ def deploy( external_user_id : str The external user ID - configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - The configured properties for the trigger + configured_props : typing.Optional[ConfiguredProps] dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -468,7 +466,7 @@ async def configure_prop( external_user_id: str, prop_name: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + configured_props: typing.Optional[ConfiguredProps] = 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, @@ -492,8 +490,7 @@ async def configure_prop( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - The configured properties for the component + configured_props : typing.Optional[ConfiguredProps] dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -559,7 +556,7 @@ async def reload_props( id: str, external_user_id: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + configured_props: typing.Optional[ConfiguredProps] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> ReloadPropsResponse: @@ -577,8 +574,7 @@ async def reload_props( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - The configured properties for the component + configured_props : typing.Optional[ConfiguredProps] dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -629,7 +625,7 @@ async def deploy( *, id: str, external_user_id: str, - configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + configured_props: typing.Optional[ConfiguredProps] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, webhook_url: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -645,8 +641,7 @@ async def deploy( external_user_id : str The external user ID - configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - The configured properties for the trigger + configured_props : typing.Optional[ConfiguredProps] dynamic_props_id : typing.Optional[str] The ID for dynamic props diff --git a/src/pipedream/triggers/raw_client.py b/src/pipedream/triggers/raw_client.py index a83eb6f..e86b621 100644 --- a/src/pipedream/triggers/raw_client.py +++ b/src/pipedream/triggers/raw_client.py @@ -10,8 +10,10 @@ from ..core.pagination import AsyncPager, BaseHttpResponse, SyncPager from ..core.pydantic_utilities import parse_obj_as from ..core.request_options import RequestOptions +from ..core.serialization import convert_and_respect_annotation_metadata from ..types.component import Component from ..types.configure_prop_response import ConfigurePropResponse +from ..types.configured_props import ConfiguredProps from ..types.deploy_trigger_response import DeployTriggerResponse from ..types.deployed_component import DeployedComponent from ..types.get_component_response import GetComponentResponse @@ -154,7 +156,7 @@ def configure_prop( external_user_id: str, prop_name: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + configured_props: typing.Optional[ConfiguredProps] = 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, @@ -178,8 +180,7 @@ def configure_prop( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - The configured properties for the component + configured_props : typing.Optional[ConfiguredProps] dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -209,7 +210,9 @@ def configure_prop( "external_user_id": external_user_id, "prop_name": prop_name, "blocking": blocking, - "configured_props": configured_props, + "configured_props": convert_and_respect_annotation_metadata( + object_=configured_props, annotation=ConfiguredProps, direction="write" + ), "dynamic_props_id": dynamic_props_id, "page": page, "prev_context": prev_context, @@ -242,7 +245,7 @@ def reload_props( id: str, external_user_id: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + configured_props: typing.Optional[ConfiguredProps] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[ReloadPropsResponse]: @@ -260,8 +263,7 @@ def reload_props( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - The configured properties for the component + configured_props : typing.Optional[ConfiguredProps] dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -281,7 +283,9 @@ def reload_props( "id": id, "external_user_id": external_user_id, "blocking": blocking, - "configured_props": configured_props, + "configured_props": convert_and_respect_annotation_metadata( + object_=configured_props, annotation=ConfiguredProps, direction="write" + ), "dynamic_props_id": dynamic_props_id, }, headers={ @@ -310,7 +314,7 @@ def deploy( *, id: str, external_user_id: str, - configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + configured_props: typing.Optional[ConfiguredProps] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, webhook_url: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -326,8 +330,7 @@ def deploy( external_user_id : str The external user ID - configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - The configured properties for the trigger + configured_props : typing.Optional[ConfiguredProps] dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -349,7 +352,9 @@ def deploy( json={ "id": id, "external_user_id": external_user_id, - "configured_props": configured_props, + "configured_props": convert_and_respect_annotation_metadata( + object_=configured_props, annotation=ConfiguredProps, direction="write" + ), "dynamic_props_id": dynamic_props_id, "webhook_url": webhook_url, }, @@ -511,7 +516,7 @@ async def configure_prop( external_user_id: str, prop_name: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + configured_props: typing.Optional[ConfiguredProps] = 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, @@ -535,8 +540,7 @@ async def configure_prop( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - The configured properties for the component + configured_props : typing.Optional[ConfiguredProps] dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -566,7 +570,9 @@ async def configure_prop( "external_user_id": external_user_id, "prop_name": prop_name, "blocking": blocking, - "configured_props": configured_props, + "configured_props": convert_and_respect_annotation_metadata( + object_=configured_props, annotation=ConfiguredProps, direction="write" + ), "dynamic_props_id": dynamic_props_id, "page": page, "prev_context": prev_context, @@ -599,7 +605,7 @@ async def reload_props( id: str, external_user_id: str, blocking: typing.Optional[bool] = OMIT, - configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + configured_props: typing.Optional[ConfiguredProps] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[ReloadPropsResponse]: @@ -617,8 +623,7 @@ async def reload_props( blocking : typing.Optional[bool] Whether this operation should block until completion - configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - The configured properties for the component + configured_props : typing.Optional[ConfiguredProps] dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -638,7 +643,9 @@ async def reload_props( "id": id, "external_user_id": external_user_id, "blocking": blocking, - "configured_props": configured_props, + "configured_props": convert_and_respect_annotation_metadata( + object_=configured_props, annotation=ConfiguredProps, direction="write" + ), "dynamic_props_id": dynamic_props_id, }, headers={ @@ -667,7 +674,7 @@ async def deploy( *, id: str, external_user_id: str, - configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + configured_props: typing.Optional[ConfiguredProps] = OMIT, dynamic_props_id: typing.Optional[str] = OMIT, webhook_url: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -683,8 +690,7 @@ async def deploy( external_user_id : str The external user ID - configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - The configured properties for the trigger + configured_props : typing.Optional[ConfiguredProps] dynamic_props_id : typing.Optional[str] The ID for dynamic props @@ -706,7 +712,9 @@ async def deploy( json={ "id": id, "external_user_id": external_user_id, - "configured_props": configured_props, + "configured_props": convert_and_respect_annotation_metadata( + object_=configured_props, annotation=ConfiguredProps, direction="write" + ), "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 44d94d6..253ca69 100644 --- a/src/pipedream/types/__init__.py +++ b/src/pipedream/types/__init__.py @@ -3,6 +3,7 @@ # isort: skip_file from .account import Account +from .account_id import AccountId from .app import App from .app_auth_type import AppAuthType from .app_category import AppCategory @@ -37,8 +38,21 @@ 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 @@ -62,11 +76,14 @@ from .list_accounts_response import ListAccountsResponse from .list_app_categories_response import ListAppCategoriesResponse from .list_apps_response import ListAppsResponse +from .observation import Observation +from .observation_error import ObservationError from .page_info import PageInfo from .project_environment import ProjectEnvironment from .project_info_response import ProjectInfoResponse from .project_info_response_app import ProjectInfoResponseApp from .prop_option import PropOption +from .prop_option_nested import PropOptionNested from .proxy_response import ProxyResponse from .reload_props_opts import ReloadPropsOpts from .reload_props_response import ReloadPropsResponse @@ -80,6 +97,7 @@ __all__ = [ "Account", + "AccountId", "App", "AppAuthType", "AppCategory", @@ -114,8 +132,21 @@ "ConfigurablePropTimerDefault", "ConfigurablePropTimerOption", "ConfigurablePropTimerStatic", + "ConfigurablePropType", + "ConfigurePropOptions", + "ConfigurePropOptionsItem", "ConfigurePropOpts", "ConfigurePropResponse", + "ConfiguredPropValue", + "ConfiguredPropValueAny", + "ConfiguredPropValueApp", + "ConfiguredPropValueBoolean", + "ConfiguredPropValueInteger", + "ConfiguredPropValueObject", + "ConfiguredPropValueSql", + "ConfiguredPropValueString", + "ConfiguredPropValueStringArray", + "ConfiguredProps", "ConnectToken", "CreateOAuthTokenResponse", "CreateTokenResponse", @@ -139,11 +170,14 @@ "ListAccountsResponse", "ListAppCategoriesResponse", "ListAppsResponse", + "Observation", + "ObservationError", "PageInfo", "ProjectEnvironment", "ProjectInfoResponse", "ProjectInfoResponseApp", "PropOption", + "PropOptionNested", "ProxyResponse", "ReloadPropsOpts", "ReloadPropsResponse", diff --git a/src/pipedream/types/account.py b/src/pipedream/types/account.py index 7d1dd3f..2627d08 100644 --- a/src/pipedream/types/account.py +++ b/src/pipedream/types/account.py @@ -5,6 +5,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .account_id import AccountId from .app import App @@ -13,11 +14,7 @@ class Account(UniversalBaseModel): End user account data, returned from the API. """ - id: str = pydantic.Field() - """ - The unique ID of the account. - """ - + id: AccountId 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 new file mode 100644 index 0000000..6a6390c --- /dev/null +++ b/src/pipedream/types/account_id.py @@ -0,0 +1,3 @@ +# This file was auto-generated by Fern from our API Definition. + +AccountId = str diff --git a/src/pipedream/types/configurable_prop.py b/src/pipedream/types/configurable_prop.py index 37d4394..5f5308b 100644 --- a/src/pipedream/types/configurable_prop.py +++ b/src/pipedream/types/configurable_prop.py @@ -6,6 +6,7 @@ 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): @@ -18,7 +19,7 @@ class ConfigurableProp(UniversalBaseModel): When building `configuredProps`, make sure to use this field as the key when setting the prop value """ - type: typing.Optional[str] = None + type: ConfigurablePropType 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_type.py b/src/pipedream/types/configurable_prop_type.py new file mode 100644 index 0000000..21828b8 --- /dev/null +++ b/src/pipedream/types/configurable_prop_type.py @@ -0,0 +1,29 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ConfigurablePropType = typing.Union[ + typing.Literal[ + "app", + "$.interface.apphook", + "$.interface.http", + "$.interface.timer", + "data_store", + "$.service.db", + "boolean", + "integer", + "object", + "any", + "string", + "$.airtable.baseId", + "$.airtable.tableId", + "$.airtable.viewId", + "$.airtable.fieldId", + "$.discord.channel", + "http_request", + "sql", + "alert", + "dir", + ], + typing.Any, +] diff --git a/src/pipedream/types/configure_prop_options.py b/src/pipedream/types/configure_prop_options.py new file mode 100644 index 0000000..2200a16 --- /dev/null +++ b/src/pipedream/types/configure_prop_options.py @@ -0,0 +1,7 @@ +# 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 new file mode 100644 index 0000000..c413487 --- /dev/null +++ b/src/pipedream/types/configure_prop_options_item.py @@ -0,0 +1,8 @@ +# 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 f24a4e0..2566173 100644 --- a/src/pipedream/types/configure_prop_opts.py +++ b/src/pipedream/types/configure_prop_opts.py @@ -4,6 +4,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .configured_props import ConfiguredProps class ConfigurePropOpts(UniversalBaseModel): @@ -31,11 +32,7 @@ class ConfigurePropOpts(UniversalBaseModel): Whether this operation should block until completion """ - configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None) - """ - The configured properties for the component - """ - + configured_props: typing.Optional[ConfiguredProps] = None 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 c2423d9..188645d 100644 --- a/src/pipedream/types/configure_prop_response.py +++ b/src/pipedream/types/configure_prop_response.py @@ -4,7 +4,8 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .prop_option import PropOption +from .configure_prop_options import ConfigurePropOptions +from .observation import Observation class ConfigurePropResponse(UniversalBaseModel): @@ -12,21 +13,13 @@ class ConfigurePropResponse(UniversalBaseModel): Response received after configuring a component's prop """ - options: typing.Optional[typing.List[PropOption]] = pydantic.Field(default=None) - """ - Available options (with labels) for the configured prop - """ - + options: typing.Optional[ConfigurePropOptions] = None string_options: typing.Optional[typing.List[str]] = pydantic.Field(default=None) """ Available options for the configured prop """ - observations: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None) - """ - Any logs produced during the configuration of the prop - """ - + observations: typing.Optional[typing.List[Observation]] = None 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 new file mode 100644 index 0000000..0266ac2 --- /dev/null +++ b/src/pipedream/types/configured_prop_value.py @@ -0,0 +1,23 @@ +# 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 new file mode 100644 index 0000000..98361e0 --- /dev/null +++ b/src/pipedream/types/configured_prop_value_any.py @@ -0,0 +1,5 @@ +# 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 new file mode 100644 index 0000000..acafb83 --- /dev/null +++ b/src/pipedream/types/configured_prop_value_app.py @@ -0,0 +1,22 @@ +# 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 new file mode 100644 index 0000000..9d6f6e1 --- /dev/null +++ b/src/pipedream/types/configured_prop_value_boolean.py @@ -0,0 +1,3 @@ +# 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 new file mode 100644 index 0000000..600d5e2 --- /dev/null +++ b/src/pipedream/types/configured_prop_value_integer.py @@ -0,0 +1,3 @@ +# 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 new file mode 100644 index 0000000..3cab1eb --- /dev/null +++ b/src/pipedream/types/configured_prop_value_object.py @@ -0,0 +1,5 @@ +# 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 new file mode 100644 index 0000000..81eb9ad --- /dev/null +++ b/src/pipedream/types/configured_prop_value_sql.py @@ -0,0 +1,41 @@ +# 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 new file mode 100644 index 0000000..1bbe935 --- /dev/null +++ b/src/pipedream/types/configured_prop_value_string.py @@ -0,0 +1,3 @@ +# 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 new file mode 100644 index 0000000..45af143 --- /dev/null +++ b/src/pipedream/types/configured_prop_value_string_array.py @@ -0,0 +1,5 @@ +# 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 new file mode 100644 index 0000000..230b292 --- /dev/null +++ b/src/pipedream/types/configured_props.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .configured_prop_value import ConfiguredPropValue + +ConfiguredProps = typing.Dict[str, ConfiguredPropValue] diff --git a/src/pipedream/types/deployed_component.py b/src/pipedream/types/deployed_component.py index 7413f3f..9cbbe8a 100644 --- a/src/pipedream/types/deployed_component.py +++ b/src/pipedream/types/deployed_component.py @@ -5,6 +5,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from .configurable_prop import ConfigurableProp +from .configured_props import ConfiguredProps class DeployedComponent(UniversalBaseModel): @@ -32,11 +33,7 @@ class DeployedComponent(UniversalBaseModel): The configurable properties of the component """ - configured_props: typing.Dict[str, typing.Optional[typing.Any]] = pydantic.Field() - """ - The configured properties of the component - """ - + configured_props: ConfiguredProps active: bool = pydantic.Field() """ Whether the deployed component is active diff --git a/src/pipedream/types/observation.py b/src/pipedream/types/observation.py new file mode 100644 index 0000000..83235d3 --- /dev/null +++ b/src/pipedream/types/observation.py @@ -0,0 +1,38 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .observation_error import ObservationError + + +class Observation(UniversalBaseModel): + """ + Any logs produced during the configuration of the prop + """ + + err: typing.Optional[ObservationError] = None + k: str = pydantic.Field() + """ + The source of the log (e.g. `console.log`) + """ + + msg: typing.Optional[str] = pydantic.Field(default=None) + """ + The log message + """ + + ts: float = pydantic.Field() + """ + The time at which the log was produced, as milliseconds since the epoch + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/pipedream/types/observation_error.py b/src/pipedream/types/observation_error.py new file mode 100644 index 0000000..11ada30 --- /dev/null +++ b/src/pipedream/types/observation_error.py @@ -0,0 +1,36 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel + + +class ObservationError(UniversalBaseModel): + """ + Details about an observed error message + """ + + name: typing.Optional[str] = pydantic.Field(default=None) + """ + The name of the error/exception + """ + + message: typing.Optional[str] = pydantic.Field(default=None) + """ + The error message + """ + + stack: typing.Optional[str] = pydantic.Field(default=None) + """ + The stack trace of the error + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/pipedream/types/prop_option_nested.py b/src/pipedream/types/prop_option_nested.py new file mode 100644 index 0000000..806bf7c --- /dev/null +++ b/src/pipedream/types/prop_option_nested.py @@ -0,0 +1,26 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from ..core.serialization import FieldMetadata +from .prop_option import PropOption + + +class PropOptionNested(UniversalBaseModel): + """ + A configuration option for a component's prop (nested under `__lv`) + """ + + lv: typing_extensions.Annotated[PropOption, FieldMetadata(alias="__lv")] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/pipedream/types/reload_props_opts.py b/src/pipedream/types/reload_props_opts.py index 909833f..124eb34 100644 --- a/src/pipedream/types/reload_props_opts.py +++ b/src/pipedream/types/reload_props_opts.py @@ -4,6 +4,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .configured_props import ConfiguredProps class ReloadPropsOpts(UniversalBaseModel): @@ -26,11 +27,7 @@ class ReloadPropsOpts(UniversalBaseModel): Whether this operation should block until completion """ - configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None) - """ - The configured properties for the component - """ - + configured_props: typing.Optional[ConfiguredProps] = None 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 bb7e53c..6a138c5 100644 --- a/src/pipedream/types/reload_props_response.py +++ b/src/pipedream/types/reload_props_response.py @@ -7,6 +7,7 @@ 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): @@ -14,11 +15,7 @@ class ReloadPropsResponse(UniversalBaseModel): Response from reloading component props """ - observations: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None) - """ - Any logs produced during the configuration of the prop - """ - + observations: typing.Optional[typing.List[Observation]] = None errors: typing.Optional[typing.List[str]] = pydantic.Field(default=None) """ Any errors that occurred during configuration