From c3db944dac3f5aa7163a7aad49a0bacbcdea2a6e Mon Sep 17 00:00:00 2001 From: stlc-bot Date: Thu, 22 Oct 2026 22:15:14 +0000 Subject: [PATCH 1/2] fix(sdks): honor Python request option defaults Source: RetellAI/docs@29ff5f94951d71ecd7afb1f070a34dd904f11702 Release-As: 6.2.11 Stainless-Generated-From: 4be536e7f8453255c18b690473ed27a5594b2470 --- src/retell/_base_client.py | 4 + src/retell/resources/agent.py | 80 +++++++- src/retell/resources/app.py | 82 ++++++++- src/retell/resources/asset.py | 14 +- src/retell/resources/batch_call.py | 18 +- src/retell/resources/call.py | 172 +++++++++++++++--- src/retell/resources/chat.py | 130 +++++++++++-- src/retell/resources/chat_agent.py | 72 +++++++- src/retell/resources/concurrency.py | 14 +- src/retell/resources/contact.py | 158 +++++++++++++--- src/retell/resources/conversation_flow.py | 30 ++- .../resources/conversation_flow_component.py | 60 +++++- src/retell/resources/crm.py | 60 +++++- src/retell/resources/export_request.py | 4 + src/retell/resources/identity.py | 14 +- src/retell/resources/knowledge_base.py | 84 +++++++-- src/retell/resources/llm.py | 30 ++- src/retell/resources/mcp_tool.py | 4 + src/retell/resources/phone_number.py | 74 +++++++- src/retell/resources/playground.py | 4 + src/retell/resources/tests.py | 110 +++++++++-- src/retell/resources/voice.py | 70 ++++++- 22 files changed, 1124 insertions(+), 164 deletions(-) diff --git a/src/retell/_base_client.py b/src/retell/_base_client.py index 67362364..f787db91 100644 --- a/src/retell/_base_client.py +++ b/src/retell/_base_client.py @@ -1949,6 +1949,7 @@ def make_request_options( extra_body: Body | None = None, idempotency_key: str | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, post_parser: PostParser | NotGiven = not_given, ) -> RequestOptions: """Create a dict of type RequestOptions without keys of NotGiven values.""" @@ -1968,6 +1969,9 @@ def make_request_options( if not isinstance(timeout, NotGiven): options["timeout"] = timeout + if is_given(max_retries): + options["max_retries"] = max_retries + if idempotency_key is not None: options["idempotency_key"] = idempotency_key diff --git a/src/retell/resources/agent.py b/src/retell/resources/agent.py index a39cfb27..8b33a92f 100644 --- a/src/retell/resources/agent.py +++ b/src/retell/resources/agent.py @@ -355,6 +355,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> AgentResponse: """ Create a new agent @@ -696,7 +697,11 @@ def create( agent_create_params.AgentCreateParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=AgentResponse, ) @@ -712,6 +717,7 @@ def retrieve( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> AgentResponse: """ Retrieve details of a specific agent @@ -737,6 +743,7 @@ def retrieve( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=maybe_transform({"version": version}, agent_retrieve_params.AgentRetrieveParams), ), cast_to=AgentResponse, @@ -1040,6 +1047,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> AgentResponse: """ Update an existing agent's latest draft version @@ -1383,6 +1391,7 @@ def update( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=maybe_transform({"version": version}, agent_update_params.AgentUpdateParams), ), cast_to=AgentResponse, @@ -1401,6 +1410,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> AgentListResponse: """ List unique agents with pagination. @@ -1430,6 +1440,7 @@ def list( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=maybe_transform( { "limit": limit, @@ -1452,6 +1463,7 @@ def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> None: """ Delete an existing agent @@ -1471,7 +1483,11 @@ def delete( return self._delete( path_template("/delete-agent/{agent_id}", agent_id=agent_id), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=NoneType, ) @@ -1487,6 +1503,7 @@ def create_version( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> AgentCreateVersionResponse: """ Create a new draft agent version from a base version. @@ -1512,7 +1529,11 @@ def create_version( {"base_version": base_version}, agent_create_version_params.AgentCreateVersionParams ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=cast( Any, AgentCreateVersionResponse @@ -1531,6 +1552,7 @@ def delete_version( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> None: """ Delete a specific agent version. @@ -1556,6 +1578,7 @@ def delete_version( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=maybe_transform({"version": version}, agent_delete_version_params.AgentDeleteVersionParams), ), cast_to=NoneType, @@ -1574,6 +1597,7 @@ def list_versions( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> AgentListVersionsResponse: """ List stored versions of a voice or chat agent with pagination. @@ -1602,6 +1626,7 @@ def list_versions( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=maybe_transform( { "limit": limit, @@ -1627,6 +1652,7 @@ def publish( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> None: """ Publish an existing draft version in place. @@ -1656,7 +1682,11 @@ def publish( agent_publish_params.AgentPublishParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=NoneType, ) @@ -1672,6 +1702,7 @@ def repair( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> AgentRepairResponse: """ Remove references to resources that no longer exist in your workspace from an @@ -1705,6 +1736,7 @@ def repair( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=maybe_transform({"version": version}, agent_repair_params.AgentRepairParams), ), cast_to=cast( @@ -2031,6 +2063,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> AgentResponse: """ Create a new agent @@ -2372,7 +2405,11 @@ async def create( agent_create_params.AgentCreateParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=AgentResponse, ) @@ -2388,6 +2425,7 @@ async def retrieve( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> AgentResponse: """ Retrieve details of a specific agent @@ -2413,6 +2451,7 @@ async def retrieve( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=await async_maybe_transform({"version": version}, agent_retrieve_params.AgentRetrieveParams), ), cast_to=AgentResponse, @@ -2716,6 +2755,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> AgentResponse: """ Update an existing agent's latest draft version @@ -3059,6 +3099,7 @@ async def update( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=await async_maybe_transform({"version": version}, agent_update_params.AgentUpdateParams), ), cast_to=AgentResponse, @@ -3077,6 +3118,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> AgentListResponse: """ List unique agents with pagination. @@ -3106,6 +3148,7 @@ async def list( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=await async_maybe_transform( { "limit": limit, @@ -3128,6 +3171,7 @@ async def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> None: """ Delete an existing agent @@ -3147,7 +3191,11 @@ async def delete( return await self._delete( path_template("/delete-agent/{agent_id}", agent_id=agent_id), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=NoneType, ) @@ -3163,6 +3211,7 @@ async def create_version( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> AgentCreateVersionResponse: """ Create a new draft agent version from a base version. @@ -3188,7 +3237,11 @@ async def create_version( {"base_version": base_version}, agent_create_version_params.AgentCreateVersionParams ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=cast( Any, AgentCreateVersionResponse @@ -3207,6 +3260,7 @@ async def delete_version( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> None: """ Delete a specific agent version. @@ -3232,6 +3286,7 @@ async def delete_version( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=await async_maybe_transform( {"version": version}, agent_delete_version_params.AgentDeleteVersionParams ), @@ -3252,6 +3307,7 @@ async def list_versions( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> AgentListVersionsResponse: """ List stored versions of a voice or chat agent with pagination. @@ -3280,6 +3336,7 @@ async def list_versions( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=await async_maybe_transform( { "limit": limit, @@ -3305,6 +3362,7 @@ async def publish( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> None: """ Publish an existing draft version in place. @@ -3334,7 +3392,11 @@ async def publish( agent_publish_params.AgentPublishParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=NoneType, ) @@ -3350,6 +3412,7 @@ async def repair( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> AgentRepairResponse: """ Remove references to resources that no longer exist in your workspace from an @@ -3383,6 +3446,7 @@ async def repair( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=await async_maybe_transform({"version": version}, agent_repair_params.AgentRepairParams), ), cast_to=cast( diff --git a/src/retell/resources/app.py b/src/retell/resources/app.py index a9aa7185..723f500a 100644 --- a/src/retell/resources/app.py +++ b/src/retell/resources/app.py @@ -71,6 +71,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> AppResponse: """ Create an App: the connection to one external system (a CRM, calendar, support @@ -119,7 +120,11 @@ def create( app_create_params.AppCreateParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=AppResponse, ) @@ -139,6 +144,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> AppResponse: """Partially update an App. @@ -179,7 +185,11 @@ def update( app_update_params.AppUpdateParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=AppResponse, ) @@ -196,6 +206,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> AppListResponse: """ List Apps in the organization (paginated). @@ -222,6 +233,7 @@ def list( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=maybe_transform( { "limit": limit, @@ -245,6 +257,7 @@ def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> None: """Delete an App. @@ -272,6 +285,7 @@ def delete( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=maybe_transform({"force_delete": force_delete}, app_delete_params.AppDeleteParams), ), cast_to=NoneType, @@ -287,6 +301,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> AppResponse: """ Get an App by id. @@ -305,7 +320,11 @@ def get( return self._get( path_template("/get-app/{app_id}", app_id=app_id), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=AppResponse, ) @@ -322,6 +341,7 @@ def get_tool_schema( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> AppGetToolSchemaResponse: """ One round of multi-step schema resolution for an app tool template against a @@ -361,7 +381,11 @@ def get_tool_schema( app_get_tool_schema_params.AppGetToolSchemaParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=AppGetToolSchemaResponse, ) @@ -379,6 +403,7 @@ def list_usages( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> AppListUsagesResponse: """ List the agents and knowledge bases referencing an App, most recently configured @@ -408,6 +433,7 @@ def list_usages( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=maybe_transform( { "limit": limit, @@ -430,6 +456,7 @@ def test_auth( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> AppTestAuthResponse: """ Probe the App's stored credentials by making a minimal authenticated call to the @@ -450,7 +477,11 @@ def test_auth( return self._post( path_template("/test-app-auth/{app_id}", app_id=app_id), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=AppTestAuthResponse, ) @@ -492,6 +523,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> AppResponse: """ Create an App: the connection to one external system (a CRM, calendar, support @@ -540,7 +572,11 @@ async def create( app_create_params.AppCreateParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=AppResponse, ) @@ -560,6 +596,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> AppResponse: """Partially update an App. @@ -600,7 +637,11 @@ async def update( app_update_params.AppUpdateParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=AppResponse, ) @@ -617,6 +658,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> AppListResponse: """ List Apps in the organization (paginated). @@ -643,6 +685,7 @@ async def list( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=await async_maybe_transform( { "limit": limit, @@ -666,6 +709,7 @@ async def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> None: """Delete an App. @@ -693,6 +737,7 @@ async def delete( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=await async_maybe_transform({"force_delete": force_delete}, app_delete_params.AppDeleteParams), ), cast_to=NoneType, @@ -708,6 +753,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> AppResponse: """ Get an App by id. @@ -726,7 +772,11 @@ async def get( return await self._get( path_template("/get-app/{app_id}", app_id=app_id), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=AppResponse, ) @@ -743,6 +793,7 @@ async def get_tool_schema( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> AppGetToolSchemaResponse: """ One round of multi-step schema resolution for an app tool template against a @@ -782,7 +833,11 @@ async def get_tool_schema( app_get_tool_schema_params.AppGetToolSchemaParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=AppGetToolSchemaResponse, ) @@ -800,6 +855,7 @@ async def list_usages( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> AppListUsagesResponse: """ List the agents and knowledge bases referencing an App, most recently configured @@ -829,6 +885,7 @@ async def list_usages( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=await async_maybe_transform( { "limit": limit, @@ -851,6 +908,7 @@ async def test_auth( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> AppTestAuthResponse: """ Probe the App's stored credentials by making a minimal authenticated call to the @@ -871,7 +929,11 @@ async def test_auth( return await self._post( path_template("/test-app-auth/{app_id}", app_id=app_id), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=AppTestAuthResponse, ) diff --git a/src/retell/resources/asset.py b/src/retell/resources/asset.py index 925624af..a23a9c14 100644 --- a/src/retell/resources/asset.py +++ b/src/retell/resources/asset.py @@ -54,6 +54,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> AssetCreateResponse: """Upload an image or audio asset. @@ -87,7 +88,11 @@ def create( body=maybe_transform(body, asset_create_params.AssetCreateParams), files=files, options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=AssetCreateResponse, ) @@ -123,6 +128,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> AssetCreateResponse: """Upload an image or audio asset. @@ -156,7 +162,11 @@ async def create( body=await async_maybe_transform(body, asset_create_params.AssetCreateParams), files=files, options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=AssetCreateResponse, ) diff --git a/src/retell/resources/batch_call.py b/src/retell/resources/batch_call.py index e2773315..0367cdc6 100644 --- a/src/retell/resources/batch_call.py +++ b/src/retell/resources/batch_call.py @@ -59,6 +59,7 @@ def create_batch_call( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> BatchCallResponse: """Create a batch call @@ -94,6 +95,8 @@ def create_batch_call( timeout: Override the client-level default timeout for this request, in seconds """ + if not is_given(max_retries): + max_retries = 0 if not is_given(timeout) and self._client.timeout == DEFAULT_TIMEOUT: timeout = 300 return self._post( @@ -110,7 +113,11 @@ def create_batch_call( batch_call_create_batch_call_params.BatchCallCreateBatchCallParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=BatchCallResponse, ) @@ -151,6 +158,7 @@ async def create_batch_call( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> BatchCallResponse: """Create a batch call @@ -186,6 +194,8 @@ async def create_batch_call( timeout: Override the client-level default timeout for this request, in seconds """ + if not is_given(max_retries): + max_retries = 0 if not is_given(timeout) and self._client.timeout == DEFAULT_TIMEOUT: timeout = 300 return await self._post( @@ -202,7 +212,11 @@ async def create_batch_call( batch_call_create_batch_call_params.BatchCallCreateBatchCallParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=BatchCallResponse, ) diff --git a/src/retell/resources/call.py b/src/retell/resources/call.py index 8956451e..d1da1b42 100644 --- a/src/retell/resources/call.py +++ b/src/retell/resources/call.py @@ -69,6 +69,7 @@ def retrieve( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> CallResponse: """ Retrieve details of a specific call @@ -89,7 +90,11 @@ def retrieve( self._get( path_template("/v2/get-call/{call_id}", call_id=call_id), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=cast(Any, CallResponse), # Union types cannot be passed in as arguments in the type system ), @@ -108,6 +113,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> CallResponse: """ Update metadata and sensitive data storage settings for an existing call. @@ -152,7 +158,11 @@ def update( call_update_params.CallUpdateParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=cast(Any, CallResponse), # Union types cannot be passed in as arguments in the type system ), @@ -173,6 +183,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> CallListResponse: """ List calls with unified cursor pagination response. @@ -217,7 +228,11 @@ def list( call_list_params.CallListParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=CallListResponse, ) @@ -232,6 +247,7 @@ def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> None: """ Delete a specific call and its associated data @@ -251,7 +267,11 @@ def delete( return self._delete( path_template("/v2/delete-call/{call_id}", call_id=call_id), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=NoneType, ) @@ -276,6 +296,7 @@ def create_phone_call( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> PhoneCallResponse: """ Create a new outbound phone call. @@ -327,6 +348,8 @@ def create_phone_call( timeout: Override the client-level default timeout for this request, in seconds """ + if not is_given(max_retries): + max_retries = 0 if not is_given(timeout) and self._client.timeout == DEFAULT_TIMEOUT: timeout = 120 return self._post( @@ -348,7 +371,11 @@ def create_phone_call( call_create_phone_call_params.CallCreatePhoneCallParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=PhoneCallResponse, ) @@ -369,6 +396,7 @@ def create_web_call( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> CreateWebCallResponse: """ Create a new web call and return browser connection details. @@ -422,7 +450,11 @@ def create_web_call( call_create_web_call_params.CallCreateWebCallParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=CreateWebCallResponse, ) @@ -437,6 +469,7 @@ def listen_live( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> CallListenLiveResponse: """ Mint a subscribe-only access token for an in-progress call so a client can @@ -457,7 +490,11 @@ def listen_live( return self._post( path_template("/v2/listen-live-call/{call_id}", call_id=call_id), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=CallListenLiveResponse, ) @@ -479,6 +516,7 @@ def register_phone_call( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> PhoneCallResponse: """ Register a new phone call for custom telephony @@ -530,7 +568,11 @@ def register_phone_call( call_register_phone_call_params.CallRegisterPhoneCallParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=PhoneCallResponse, ) @@ -545,6 +587,7 @@ def rerun_analysis( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> CallResponse: """Rerun post-call analysis for a specific call. @@ -566,7 +609,11 @@ def rerun_analysis( self._put( path_template("/rerun-call-analysis/{call_id}", call_id=call_id), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=cast(Any, CallResponse), # Union types cannot be passed in as arguments in the type system ), @@ -582,6 +629,7 @@ def stop( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> None: """ Stop an ongoing call. @@ -601,7 +649,11 @@ def stop( return self._post( path_template("/v2/stop-call/{call_id}", call_id=call_id), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=NoneType, ) @@ -617,6 +669,7 @@ def take_over_live( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> CallTakeOverLiveResponse: """Take over an in-progress call from the AI agent. @@ -643,7 +696,11 @@ def take_over_live( path_template("/v2/take-over-live-call/{call_id}", call_id=call_id), body=maybe_transform({"participant_id": participant_id}, call_take_over_live_params.CallTakeOverLiveParams), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=CallTakeOverLiveResponse, ) @@ -660,6 +717,7 @@ def update_live( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> CallUpdateLiveResponse: """Update an ongoing call at runtime. @@ -697,7 +755,11 @@ def update_live( call_update_live_params.CallUpdateLiveParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=CallUpdateLiveResponse, ) @@ -733,6 +795,7 @@ async def retrieve( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> CallResponse: """ Retrieve details of a specific call @@ -753,7 +816,11 @@ async def retrieve( await self._get( path_template("/v2/get-call/{call_id}", call_id=call_id), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=cast(Any, CallResponse), # Union types cannot be passed in as arguments in the type system ), @@ -772,6 +839,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> CallResponse: """ Update metadata and sensitive data storage settings for an existing call. @@ -816,7 +884,11 @@ async def update( call_update_params.CallUpdateParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=cast(Any, CallResponse), # Union types cannot be passed in as arguments in the type system ), @@ -837,6 +909,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> CallListResponse: """ List calls with unified cursor pagination response. @@ -881,7 +954,11 @@ async def list( call_list_params.CallListParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=CallListResponse, ) @@ -896,6 +973,7 @@ async def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> None: """ Delete a specific call and its associated data @@ -915,7 +993,11 @@ async def delete( return await self._delete( path_template("/v2/delete-call/{call_id}", call_id=call_id), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=NoneType, ) @@ -940,6 +1022,7 @@ async def create_phone_call( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> PhoneCallResponse: """ Create a new outbound phone call. @@ -991,6 +1074,8 @@ async def create_phone_call( timeout: Override the client-level default timeout for this request, in seconds """ + if not is_given(max_retries): + max_retries = 0 if not is_given(timeout) and self._client.timeout == DEFAULT_TIMEOUT: timeout = 120 return await self._post( @@ -1012,7 +1097,11 @@ async def create_phone_call( call_create_phone_call_params.CallCreatePhoneCallParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=PhoneCallResponse, ) @@ -1033,6 +1122,7 @@ async def create_web_call( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> CreateWebCallResponse: """ Create a new web call and return browser connection details. @@ -1086,7 +1176,11 @@ async def create_web_call( call_create_web_call_params.CallCreateWebCallParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=CreateWebCallResponse, ) @@ -1101,6 +1195,7 @@ async def listen_live( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> CallListenLiveResponse: """ Mint a subscribe-only access token for an in-progress call so a client can @@ -1121,7 +1216,11 @@ async def listen_live( return await self._post( path_template("/v2/listen-live-call/{call_id}", call_id=call_id), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=CallListenLiveResponse, ) @@ -1143,6 +1242,7 @@ async def register_phone_call( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> PhoneCallResponse: """ Register a new phone call for custom telephony @@ -1194,7 +1294,11 @@ async def register_phone_call( call_register_phone_call_params.CallRegisterPhoneCallParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=PhoneCallResponse, ) @@ -1209,6 +1313,7 @@ async def rerun_analysis( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> CallResponse: """Rerun post-call analysis for a specific call. @@ -1230,7 +1335,11 @@ async def rerun_analysis( await self._put( path_template("/rerun-call-analysis/{call_id}", call_id=call_id), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=cast(Any, CallResponse), # Union types cannot be passed in as arguments in the type system ), @@ -1246,6 +1355,7 @@ async def stop( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> None: """ Stop an ongoing call. @@ -1265,7 +1375,11 @@ async def stop( return await self._post( path_template("/v2/stop-call/{call_id}", call_id=call_id), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=NoneType, ) @@ -1281,6 +1395,7 @@ async def take_over_live( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> CallTakeOverLiveResponse: """Take over an in-progress call from the AI agent. @@ -1309,7 +1424,11 @@ async def take_over_live( {"participant_id": participant_id}, call_take_over_live_params.CallTakeOverLiveParams ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=CallTakeOverLiveResponse, ) @@ -1326,6 +1445,7 @@ async def update_live( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> CallUpdateLiveResponse: """Update an ongoing call at runtime. @@ -1363,7 +1483,11 @@ async def update_live( call_update_live_params.CallUpdateLiveParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=CallUpdateLiveResponse, ) diff --git a/src/retell/resources/chat.py b/src/retell/resources/chat.py index 9c47713a..fbf6256f 100644 --- a/src/retell/resources/chat.py +++ b/src/retell/resources/chat.py @@ -66,6 +66,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ChatResponse: """ Create a chat session @@ -104,7 +105,11 @@ def create( chat_create_params.ChatCreateParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ChatResponse, ) @@ -119,6 +124,7 @@ def retrieve( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ChatResponse: """ Retrieve details of a specific chat @@ -137,7 +143,11 @@ def retrieve( return self._get( path_template("/get-chat/{chat_id}", chat_id=chat_id), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ChatResponse, ) @@ -156,6 +166,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ChatResponse: """ Update metadata and sensitive data storage settings for an existing chat. @@ -204,7 +215,11 @@ def update( chat_update_params.ChatUpdateParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ChatResponse, ) @@ -224,6 +239,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ChatListResponse: """ List chats with unified cursor pagination response. @@ -268,7 +284,11 @@ def list( chat_list_params.ChatListParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ChatListResponse, ) @@ -283,6 +303,7 @@ def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> None: """ Delete an existing chat @@ -302,7 +323,11 @@ def delete( return self._delete( path_template("/delete-chat/{chat_id}", chat_id=chat_id), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=NoneType, ) @@ -318,6 +343,7 @@ def create_chat_completion( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ChatCreateChatCompletionResponse: """ Create a chat completion message @@ -347,7 +373,11 @@ def create_chat_completion( chat_create_chat_completion_params.ChatCreateChatCompletionParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ChatCreateChatCompletionResponse, ) @@ -368,6 +398,7 @@ def create_sms_chat( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ChatResponse: """ Start an outbound SMS chat conversation with a phone number using the specified @@ -406,6 +437,8 @@ def create_sms_chat( timeout: Override the client-level default timeout for this request, in seconds """ + if not is_given(max_retries): + max_retries = 0 return self._post( "/create-sms-chat", body=maybe_transform( @@ -421,7 +454,11 @@ def create_sms_chat( chat_create_sms_chat_params.ChatCreateSMSChatParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ChatResponse, ) @@ -436,6 +473,7 @@ def end( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> None: """ End an ongoing chat @@ -455,7 +493,11 @@ def end( return self._patch( path_template("/end-chat/{chat_id}", chat_id=chat_id), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=NoneType, ) @@ -470,6 +512,7 @@ def rerun_analysis( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ChatResponse: """Rerun post-chat analysis for a specific chat. @@ -489,7 +532,11 @@ def rerun_analysis( return self._put( path_template("/rerun-chat-analysis/{chat_id}", chat_id=chat_id), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ChatResponse, ) @@ -528,6 +575,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ChatResponse: """ Create a chat session @@ -566,7 +614,11 @@ async def create( chat_create_params.ChatCreateParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ChatResponse, ) @@ -581,6 +633,7 @@ async def retrieve( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ChatResponse: """ Retrieve details of a specific chat @@ -599,7 +652,11 @@ async def retrieve( return await self._get( path_template("/get-chat/{chat_id}", chat_id=chat_id), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ChatResponse, ) @@ -618,6 +675,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ChatResponse: """ Update metadata and sensitive data storage settings for an existing chat. @@ -666,7 +724,11 @@ async def update( chat_update_params.ChatUpdateParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ChatResponse, ) @@ -686,6 +748,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ChatListResponse: """ List chats with unified cursor pagination response. @@ -730,7 +793,11 @@ async def list( chat_list_params.ChatListParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ChatListResponse, ) @@ -745,6 +812,7 @@ async def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> None: """ Delete an existing chat @@ -764,7 +832,11 @@ async def delete( return await self._delete( path_template("/delete-chat/{chat_id}", chat_id=chat_id), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=NoneType, ) @@ -780,6 +852,7 @@ async def create_chat_completion( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ChatCreateChatCompletionResponse: """ Create a chat completion message @@ -809,7 +882,11 @@ async def create_chat_completion( chat_create_chat_completion_params.ChatCreateChatCompletionParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ChatCreateChatCompletionResponse, ) @@ -830,6 +907,7 @@ async def create_sms_chat( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ChatResponse: """ Start an outbound SMS chat conversation with a phone number using the specified @@ -868,6 +946,8 @@ async def create_sms_chat( timeout: Override the client-level default timeout for this request, in seconds """ + if not is_given(max_retries): + max_retries = 0 return await self._post( "/create-sms-chat", body=await async_maybe_transform( @@ -883,7 +963,11 @@ async def create_sms_chat( chat_create_sms_chat_params.ChatCreateSMSChatParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ChatResponse, ) @@ -898,6 +982,7 @@ async def end( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> None: """ End an ongoing chat @@ -917,7 +1002,11 @@ async def end( return await self._patch( path_template("/end-chat/{chat_id}", chat_id=chat_id), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=NoneType, ) @@ -932,6 +1021,7 @@ async def rerun_analysis( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ChatResponse: """Rerun post-chat analysis for a specific chat. @@ -951,7 +1041,11 @@ async def rerun_analysis( return await self._put( path_template("/rerun-chat-analysis/{chat_id}", chat_id=chat_id), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ChatResponse, ) diff --git a/src/retell/resources/chat_agent.py b/src/retell/resources/chat_agent.py index ba399bbb..e4a77e8f 100644 --- a/src/retell/resources/chat_agent.py +++ b/src/retell/resources/chat_agent.py @@ -257,6 +257,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ChatAgentResponse: """ Create a new chat agent @@ -374,7 +375,11 @@ def create( chat_agent_create_params.ChatAgentCreateParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ChatAgentResponse, ) @@ -390,6 +395,7 @@ def retrieve( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ChatAgentResponse: """ Retrieve details of a specific chat agent @@ -415,6 +421,7 @@ def retrieve( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=maybe_transform({"version": version}, chat_agent_retrieve_params.ChatAgentRetrieveParams), ), cast_to=ChatAgentResponse, @@ -625,6 +632,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ChatAgentResponse: """ Update an existing chat agent @@ -750,6 +758,7 @@ def update( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=maybe_transform({"version": version}, chat_agent_update_params.ChatAgentUpdateParams), ), cast_to=ChatAgentResponse, @@ -768,6 +777,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ChatAgentListResponse: """ List unique agents with pagination. @@ -797,6 +807,7 @@ def list( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=maybe_transform( { "limit": limit, @@ -819,6 +830,7 @@ def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> None: """ Delete an existing chat agent @@ -838,7 +850,11 @@ def delete( return self._delete( path_template("/delete-chat-agent/{agent_id}", agent_id=agent_id), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=NoneType, ) @@ -854,6 +870,7 @@ def create_version( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ChatAgentCreateVersionResponse: """ Create a new draft agent version from a base version. @@ -879,7 +896,11 @@ def create_version( {"base_version": base_version}, chat_agent_create_version_params.ChatAgentCreateVersionParams ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=cast( Any, ChatAgentCreateVersionResponse @@ -898,6 +919,7 @@ def delete_version( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> None: """ Delete a specific agent version. @@ -923,6 +945,7 @@ def delete_version( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=maybe_transform( {"version": version}, chat_agent_delete_version_params.ChatAgentDeleteVersionParams ), @@ -943,6 +966,7 @@ def publish( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> None: """ Publish an existing draft version in place. @@ -972,7 +996,11 @@ def publish( chat_agent_publish_params.ChatAgentPublishParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=NoneType, ) @@ -1201,6 +1229,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ChatAgentResponse: """ Create a new chat agent @@ -1318,7 +1347,11 @@ async def create( chat_agent_create_params.ChatAgentCreateParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ChatAgentResponse, ) @@ -1334,6 +1367,7 @@ async def retrieve( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ChatAgentResponse: """ Retrieve details of a specific chat agent @@ -1359,6 +1393,7 @@ async def retrieve( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=await async_maybe_transform( {"version": version}, chat_agent_retrieve_params.ChatAgentRetrieveParams ), @@ -1571,6 +1606,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ChatAgentResponse: """ Update an existing chat agent @@ -1696,6 +1732,7 @@ async def update( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=await async_maybe_transform({"version": version}, chat_agent_update_params.ChatAgentUpdateParams), ), cast_to=ChatAgentResponse, @@ -1714,6 +1751,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ChatAgentListResponse: """ List unique agents with pagination. @@ -1745,6 +1783,7 @@ async def list( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=await async_maybe_transform( { "limit": limit, @@ -1767,6 +1806,7 @@ async def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> None: """ Delete an existing chat agent @@ -1786,7 +1826,11 @@ async def delete( return await self._delete( path_template("/delete-chat-agent/{agent_id}", agent_id=agent_id), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=NoneType, ) @@ -1802,6 +1846,7 @@ async def create_version( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ChatAgentCreateVersionResponse: """ Create a new draft agent version from a base version. @@ -1827,7 +1872,11 @@ async def create_version( {"base_version": base_version}, chat_agent_create_version_params.ChatAgentCreateVersionParams ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=cast( Any, ChatAgentCreateVersionResponse @@ -1846,6 +1895,7 @@ async def delete_version( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> None: """ Delete a specific agent version. @@ -1871,6 +1921,7 @@ async def delete_version( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=await async_maybe_transform( {"version": version}, chat_agent_delete_version_params.ChatAgentDeleteVersionParams ), @@ -1891,6 +1942,7 @@ async def publish( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> None: """ Publish an existing draft version in place. @@ -1920,7 +1972,11 @@ async def publish( chat_agent_publish_params.ChatAgentPublishParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=NoneType, ) diff --git a/src/retell/resources/concurrency.py b/src/retell/resources/concurrency.py index 6b199154..39f25741 100644 --- a/src/retell/resources/concurrency.py +++ b/src/retell/resources/concurrency.py @@ -48,12 +48,17 @@ def retrieve( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ConcurrencyRetrieveResponse: """Get the current concurrency and concurrency limit of the org""" return self._get( "/get-concurrency", options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ConcurrencyRetrieveResponse, ) @@ -88,12 +93,17 @@ async def retrieve( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ConcurrencyRetrieveResponse: """Get the current concurrency and concurrency limit of the org""" return await self._get( "/get-concurrency", options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ConcurrencyRetrieveResponse, ) diff --git a/src/retell/resources/contact.py b/src/retell/resources/contact.py index 99811177..30a663c5 100644 --- a/src/retell/resources/contact.py +++ b/src/retell/resources/contact.py @@ -76,6 +76,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ContactResponse: """ Create a new contact. @@ -117,7 +118,11 @@ def create( contact_create_params.ContactCreateParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ContactResponse, ) @@ -138,6 +143,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ContactResponse: """Update an existing contact. @@ -179,7 +185,11 @@ def update( contact_update_params.ContactUpdateParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ContactResponse, ) @@ -200,6 +210,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ContactListResponse: """ List contacts, newest created first by default, with the total count of matches @@ -250,7 +261,11 @@ def list( contact_list_params.ContactListParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ContactListResponse, ) @@ -265,6 +280,7 @@ def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> None: """Delete a contact. @@ -287,7 +303,11 @@ def delete( return self._delete( path_template("/delete-contact/{contact_id}", contact_id=contact_id), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=NoneType, ) @@ -303,6 +323,7 @@ def backfill_analysis_data( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ContactBackfillAnalysisDataResponse: """ Trigger a backfill job that re-applies analysis data mappings to contacts using @@ -344,7 +365,11 @@ def backfill_analysis_data( contact_backfill_analysis_data_params.ContactBackfillAnalysisDataParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ContactBackfillAnalysisDataResponse, ) @@ -362,6 +387,7 @@ def create_import( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ContactCreateImportResponse: """ Start an incremental contact import from an uploaded CSV: creates new contacts @@ -402,7 +428,11 @@ def create_import( contact_create_import_params.ContactCreateImportParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ContactCreateImportResponse, ) @@ -417,6 +447,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ContactResponse: """ Retrieve a contact by ID. @@ -435,7 +466,11 @@ def get( return self._get( path_template("/get-contact/{contact_id}", contact_id=contact_id), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ContactResponse, ) @@ -449,12 +484,17 @@ def get_backfill_job_status( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ContactGetBackfillJobStatusResponse: """Get the status of the contact analysis data backfill job.""" return self._get( "/get-backfill-contact-job-status", options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ContactGetBackfillJobStatusResponse, ) @@ -469,6 +509,7 @@ def get_by_phone( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ContactResponse: """Retrieve a contact by phone number. @@ -489,7 +530,11 @@ def get_by_phone( return self._get( path_template("/get-contact-by-phone/{phone_number}", phone_number=phone_number), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ContactResponse, ) @@ -503,12 +548,17 @@ def get_import( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ContactGetImportResponse: """Status and counts for the org's current or latest contact import.""" return self._get( "/get-contact-import", options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ContactGetImportResponse, ) @@ -525,6 +575,7 @@ def list_conversations( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ContactListConversationsResponse: """ List a contact's conversations (inbound calls, outbound calls, and chats) merged @@ -553,6 +604,7 @@ def list_conversations( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=maybe_transform( { "limit": limit, @@ -574,6 +626,7 @@ def upload_import_file( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ContactUploadImportFileResponse: """Upload a CSV file for a contact import. @@ -600,7 +653,11 @@ def upload_import_file( body=maybe_transform(body, contact_upload_import_file_params.ContactUploadImportFileParams), files=files, options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ContactUploadImportFileResponse, ) @@ -642,6 +699,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ContactResponse: """ Create a new contact. @@ -683,7 +741,11 @@ async def create( contact_create_params.ContactCreateParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ContactResponse, ) @@ -704,6 +766,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ContactResponse: """Update an existing contact. @@ -745,7 +808,11 @@ async def update( contact_update_params.ContactUpdateParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ContactResponse, ) @@ -766,6 +833,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ContactListResponse: """ List contacts, newest created first by default, with the total count of matches @@ -816,7 +884,11 @@ async def list( contact_list_params.ContactListParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ContactListResponse, ) @@ -831,6 +903,7 @@ async def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> None: """Delete a contact. @@ -853,7 +926,11 @@ async def delete( return await self._delete( path_template("/delete-contact/{contact_id}", contact_id=contact_id), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=NoneType, ) @@ -869,6 +946,7 @@ async def backfill_analysis_data( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ContactBackfillAnalysisDataResponse: """ Trigger a backfill job that re-applies analysis data mappings to contacts using @@ -910,7 +988,11 @@ async def backfill_analysis_data( contact_backfill_analysis_data_params.ContactBackfillAnalysisDataParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ContactBackfillAnalysisDataResponse, ) @@ -928,6 +1010,7 @@ async def create_import( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ContactCreateImportResponse: """ Start an incremental contact import from an uploaded CSV: creates new contacts @@ -968,7 +1051,11 @@ async def create_import( contact_create_import_params.ContactCreateImportParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ContactCreateImportResponse, ) @@ -983,6 +1070,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ContactResponse: """ Retrieve a contact by ID. @@ -1001,7 +1089,11 @@ async def get( return await self._get( path_template("/get-contact/{contact_id}", contact_id=contact_id), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ContactResponse, ) @@ -1015,12 +1107,17 @@ async def get_backfill_job_status( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ContactGetBackfillJobStatusResponse: """Get the status of the contact analysis data backfill job.""" return await self._get( "/get-backfill-contact-job-status", options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ContactGetBackfillJobStatusResponse, ) @@ -1035,6 +1132,7 @@ async def get_by_phone( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ContactResponse: """Retrieve a contact by phone number. @@ -1055,7 +1153,11 @@ async def get_by_phone( return await self._get( path_template("/get-contact-by-phone/{phone_number}", phone_number=phone_number), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ContactResponse, ) @@ -1069,12 +1171,17 @@ async def get_import( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ContactGetImportResponse: """Status and counts for the org's current or latest contact import.""" return await self._get( "/get-contact-import", options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ContactGetImportResponse, ) @@ -1091,6 +1198,7 @@ async def list_conversations( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ContactListConversationsResponse: """ List a contact's conversations (inbound calls, outbound calls, and chats) merged @@ -1119,6 +1227,7 @@ async def list_conversations( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=await async_maybe_transform( { "limit": limit, @@ -1140,6 +1249,7 @@ async def upload_import_file( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ContactUploadImportFileResponse: """Upload a CSV file for a contact import. @@ -1166,7 +1276,11 @@ async def upload_import_file( body=await async_maybe_transform(body, contact_upload_import_file_params.ContactUploadImportFileParams), files=files, options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ContactUploadImportFileResponse, ) diff --git a/src/retell/resources/conversation_flow.py b/src/retell/resources/conversation_flow.py index 8d0a630c..11ae2f15 100644 --- a/src/retell/resources/conversation_flow.py +++ b/src/retell/resources/conversation_flow.py @@ -79,6 +79,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ConversationFlowResponse: """Create a new Conversation Flow that can be attached to an agent. @@ -170,7 +171,11 @@ def create( conversation_flow_create_params.ConversationFlowCreateParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ConversationFlowResponse, ) @@ -186,6 +191,7 @@ def retrieve( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ConversationFlowResponse: """ Retrieve details of a specific Conversation Flow @@ -213,6 +219,7 @@ def retrieve( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=maybe_transform( {"version": version}, conversation_flow_retrieve_params.ConversationFlowRetrieveParams ), @@ -250,6 +257,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ConversationFlowResponse: """ Update an existing conversation flow @@ -351,6 +359,7 @@ def update( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=maybe_transform( {"version": version}, conversation_flow_update_params.ConversationFlowUpdateParams ), @@ -370,6 +379,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ConversationFlowListResponse: """ List conversation flows with pagination @@ -396,6 +406,7 @@ def list( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=maybe_transform( { "limit": limit, @@ -419,6 +430,7 @@ def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> None: """ Delete a conversation flow and all its versions @@ -450,6 +462,7 @@ def delete( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=maybe_transform( {"force_delete": force_delete}, conversation_flow_delete_params.ConversationFlowDeleteParams ), @@ -506,6 +519,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ConversationFlowResponse: """Create a new Conversation Flow that can be attached to an agent. @@ -597,7 +611,11 @@ async def create( conversation_flow_create_params.ConversationFlowCreateParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ConversationFlowResponse, ) @@ -613,6 +631,7 @@ async def retrieve( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ConversationFlowResponse: """ Retrieve details of a specific Conversation Flow @@ -640,6 +659,7 @@ async def retrieve( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=await async_maybe_transform( {"version": version}, conversation_flow_retrieve_params.ConversationFlowRetrieveParams ), @@ -677,6 +697,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ConversationFlowResponse: """ Update an existing conversation flow @@ -778,6 +799,7 @@ async def update( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=await async_maybe_transform( {"version": version}, conversation_flow_update_params.ConversationFlowUpdateParams ), @@ -797,6 +819,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ConversationFlowListResponse: """ List conversation flows with pagination @@ -823,6 +846,7 @@ async def list( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=await async_maybe_transform( { "limit": limit, @@ -846,6 +870,7 @@ async def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> None: """ Delete a conversation flow and all its versions @@ -877,6 +902,7 @@ async def delete( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=await async_maybe_transform( {"force_delete": force_delete}, conversation_flow_delete_params.ConversationFlowDeleteParams ), diff --git a/src/retell/resources/conversation_flow_component.py b/src/retell/resources/conversation_flow_component.py index 3f146afe..ff7e7071 100644 --- a/src/retell/resources/conversation_flow_component.py +++ b/src/retell/resources/conversation_flow_component.py @@ -67,6 +67,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ConversationFlowComponentResponse: """ Create a new shared conversation flow component @@ -112,7 +113,11 @@ def create( conversation_flow_component_create_params.ConversationFlowComponentCreateParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ConversationFlowComponentResponse, ) @@ -127,6 +132,7 @@ def retrieve( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ConversationFlowComponentResponse: """ Get a shared conversation flow component @@ -150,7 +156,11 @@ def retrieve( conversation_flow_component_id=conversation_flow_component_id, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ConversationFlowComponentResponse, ) @@ -174,6 +184,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ConversationFlowComponentResponse: """ Update an existing shared conversation flow component @@ -226,7 +237,11 @@ def update( conversation_flow_component_update_params.ConversationFlowComponentUpdateParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ConversationFlowComponentResponse, ) @@ -243,6 +258,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ConversationFlowComponentListResponse: """ List shared conversation flow components with pagination @@ -269,6 +285,7 @@ def list( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=maybe_transform( { "limit": limit, @@ -291,6 +308,7 @@ def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> None: """Delete a shared conversation flow component. @@ -317,7 +335,11 @@ def delete( conversation_flow_component_id=conversation_flow_component_id, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=NoneType, ) @@ -361,6 +383,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ConversationFlowComponentResponse: """ Create a new shared conversation flow component @@ -406,7 +429,11 @@ async def create( conversation_flow_component_create_params.ConversationFlowComponentCreateParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ConversationFlowComponentResponse, ) @@ -421,6 +448,7 @@ async def retrieve( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ConversationFlowComponentResponse: """ Get a shared conversation flow component @@ -444,7 +472,11 @@ async def retrieve( conversation_flow_component_id=conversation_flow_component_id, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ConversationFlowComponentResponse, ) @@ -468,6 +500,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ConversationFlowComponentResponse: """ Update an existing shared conversation flow component @@ -520,7 +553,11 @@ async def update( conversation_flow_component_update_params.ConversationFlowComponentUpdateParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=ConversationFlowComponentResponse, ) @@ -537,6 +574,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ConversationFlowComponentListResponse: """ List shared conversation flow components with pagination @@ -563,6 +601,7 @@ async def list( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=await async_maybe_transform( { "limit": limit, @@ -585,6 +624,7 @@ async def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> None: """Delete a shared conversation flow component. @@ -611,7 +651,11 @@ async def delete( conversation_flow_component_id=conversation_flow_component_id, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=NoneType, ) diff --git a/src/retell/resources/crm.py b/src/retell/resources/crm.py index 351e6f9c..b80d5e3c 100644 --- a/src/retell/resources/crm.py +++ b/src/retell/resources/crm.py @@ -55,6 +55,7 @@ def get_config( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> CRMConfig: """ Get the organization's CRM configuration: which CRM app is linked, the custom @@ -64,7 +65,11 @@ def get_config( return self._get( "/get-crm-config", options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=CRMConfig, ) @@ -79,6 +84,7 @@ def get_schema( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> CRMGetSchemaResponse: """ Get the contact schema of the connected CRM: the fields available on its contact @@ -104,6 +110,7 @@ def get_schema( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=maybe_transform({"app_id": app_id}, crm_get_schema_params.CRMGetSchemaParams), ), cast_to=CRMGetSchemaResponse, @@ -118,6 +125,7 @@ def get_sync_job_status( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> CRMGetSyncJobStatusResponse: """ Get the status of the organization's contact sync, whether it was started @@ -126,7 +134,11 @@ def get_sync_job_status( return self._get( "/get-sync-job-status", options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=CRMGetSyncJobStatusResponse, ) @@ -140,6 +152,7 @@ def run_sync_job( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> CRMRunSyncJobResponse: """ Start a contact sync with the linked CRM app immediately, instead of waiting for @@ -149,7 +162,11 @@ def run_sync_job( return self._post( "/run-sync-job", options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=CRMRunSyncJobResponse, ) @@ -169,6 +186,7 @@ def update_config( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> CRMConfig: """Update the organization's CRM configuration. @@ -221,7 +239,11 @@ def update_config( crm_update_config_params.CRMUpdateConfigParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=CRMConfig, ) @@ -256,6 +278,7 @@ async def get_config( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> CRMConfig: """ Get the organization's CRM configuration: which CRM app is linked, the custom @@ -265,7 +288,11 @@ async def get_config( return await self._get( "/get-crm-config", options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=CRMConfig, ) @@ -280,6 +307,7 @@ async def get_schema( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> CRMGetSchemaResponse: """ Get the contact schema of the connected CRM: the fields available on its contact @@ -305,6 +333,7 @@ async def get_schema( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=await async_maybe_transform({"app_id": app_id}, crm_get_schema_params.CRMGetSchemaParams), ), cast_to=CRMGetSchemaResponse, @@ -319,6 +348,7 @@ async def get_sync_job_status( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> CRMGetSyncJobStatusResponse: """ Get the status of the organization's contact sync, whether it was started @@ -327,7 +357,11 @@ async def get_sync_job_status( return await self._get( "/get-sync-job-status", options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=CRMGetSyncJobStatusResponse, ) @@ -341,6 +375,7 @@ async def run_sync_job( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> CRMRunSyncJobResponse: """ Start a contact sync with the linked CRM app immediately, instead of waiting for @@ -350,7 +385,11 @@ async def run_sync_job( return await self._post( "/run-sync-job", options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=CRMRunSyncJobResponse, ) @@ -370,6 +409,7 @@ async def update_config( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> CRMConfig: """Update the organization's CRM configuration. @@ -422,7 +462,11 @@ async def update_config( crm_update_config_params.CRMUpdateConfigParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=CRMConfig, ) diff --git a/src/retell/resources/export_request.py b/src/retell/resources/export_request.py index 887f5784..524e1280 100644 --- a/src/retell/resources/export_request.py +++ b/src/retell/resources/export_request.py @@ -55,6 +55,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ExportRequestListResponse: """ List export requests with pagination @@ -81,6 +82,7 @@ def list( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=maybe_transform( { "limit": limit, @@ -126,6 +128,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> ExportRequestListResponse: """ List export requests with pagination @@ -152,6 +155,7 @@ async def list( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=await async_maybe_transform( { "limit": limit, diff --git a/src/retell/resources/identity.py b/src/retell/resources/identity.py index 58b673b4..6e228480 100644 --- a/src/retell/resources/identity.py +++ b/src/retell/resources/identity.py @@ -48,12 +48,17 @@ def retrieve( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> IdentityRetrieveResponse: """Get info about the API key used to authenticate, and the org that owns it.""" return self._get( "/get-api-key-info", options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=IdentityRetrieveResponse, ) @@ -88,12 +93,17 @@ async def retrieve( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> IdentityRetrieveResponse: """Get info about the API key used to authenticate, and the org that owns it.""" return await self._get( "/get-api-key-info", options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=IdentityRetrieveResponse, ) diff --git a/src/retell/resources/knowledge_base.py b/src/retell/resources/knowledge_base.py index 446e3d76..4c2b06d3 100644 --- a/src/retell/resources/knowledge_base.py +++ b/src/retell/resources/knowledge_base.py @@ -61,6 +61,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> KnowledgeBaseResponse: """ Create a new knowledge base @@ -115,7 +116,11 @@ def create( body=maybe_transform(body, knowledge_base_create_params.KnowledgeBaseCreateParams), files=files, options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=KnowledgeBaseResponse, ) @@ -130,6 +135,7 @@ def retrieve( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> KnowledgeBaseResponse: """ Retrieve details of a specific knowledge base @@ -148,7 +154,11 @@ def retrieve( return self._get( path_template("/get-knowledge-base/{knowledge_base_id}", knowledge_base_id=knowledge_base_id), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=KnowledgeBaseResponse, ) @@ -162,12 +172,17 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> KnowledgeBaseListResponse: """List all knowledge bases""" return self._get( "/list-knowledge-bases", options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=KnowledgeBaseListResponse, ) @@ -182,6 +197,7 @@ def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> None: """ Delete an existing knowledge base @@ -201,7 +217,11 @@ def delete( return self._delete( path_template("/delete-knowledge-base/{knowledge_base_id}", knowledge_base_id=knowledge_base_id), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=NoneType, ) @@ -219,6 +239,7 @@ def add_sources( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> KnowledgeBaseResponse: """ Add sources to a knowledge base @@ -259,7 +280,11 @@ def add_sources( body=maybe_transform(body, knowledge_base_add_sources_params.KnowledgeBaseAddSourcesParams), files=files, options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=KnowledgeBaseResponse, ) @@ -275,6 +300,7 @@ def delete_source( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> KnowledgeBaseResponse: """ Delete an existing source from knowledge base @@ -299,7 +325,11 @@ def delete_source( source_id=source_id, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=KnowledgeBaseResponse, ) @@ -341,6 +371,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> KnowledgeBaseResponse: """ Create a new knowledge base @@ -395,7 +426,11 @@ async def create( body=await async_maybe_transform(body, knowledge_base_create_params.KnowledgeBaseCreateParams), files=files, options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=KnowledgeBaseResponse, ) @@ -410,6 +445,7 @@ async def retrieve( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> KnowledgeBaseResponse: """ Retrieve details of a specific knowledge base @@ -428,7 +464,11 @@ async def retrieve( return await self._get( path_template("/get-knowledge-base/{knowledge_base_id}", knowledge_base_id=knowledge_base_id), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=KnowledgeBaseResponse, ) @@ -442,12 +482,17 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> KnowledgeBaseListResponse: """List all knowledge bases""" return await self._get( "/list-knowledge-bases", options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=KnowledgeBaseListResponse, ) @@ -462,6 +507,7 @@ async def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> None: """ Delete an existing knowledge base @@ -481,7 +527,11 @@ async def delete( return await self._delete( path_template("/delete-knowledge-base/{knowledge_base_id}", knowledge_base_id=knowledge_base_id), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=NoneType, ) @@ -499,6 +549,7 @@ async def add_sources( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> KnowledgeBaseResponse: """ Add sources to a knowledge base @@ -539,7 +590,11 @@ async def add_sources( body=await async_maybe_transform(body, knowledge_base_add_sources_params.KnowledgeBaseAddSourcesParams), files=files, options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=KnowledgeBaseResponse, ) @@ -555,6 +610,7 @@ async def delete_source( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> KnowledgeBaseResponse: """ Delete an existing source from knowledge base @@ -579,7 +635,11 @@ async def delete_source( source_id=source_id, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=KnowledgeBaseResponse, ) diff --git a/src/retell/resources/llm.py b/src/retell/resources/llm.py index 71a34690..06b473c5 100644 --- a/src/retell/resources/llm.py +++ b/src/retell/resources/llm.py @@ -120,6 +120,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> LlmResponse: """Create a new Retell LLM Response Engine that can be attached to an agent. @@ -227,7 +228,11 @@ def create( llm_create_params.LlmCreateParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=LlmResponse, ) @@ -243,6 +248,7 @@ def retrieve( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> LlmResponse: """ Retrieve details of a specific Retell LLM Response Engine @@ -267,6 +273,7 @@ def retrieve( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=maybe_transform({"version": version}, llm_retrieve_params.LlmRetrieveParams), ), cast_to=LlmResponse, @@ -349,6 +356,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> LlmResponse: """ Update an existing Retell LLM Response Engine @@ -462,6 +470,7 @@ def update( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=maybe_transform({"version": version}, llm_update_params.LlmUpdateParams), ), cast_to=LlmResponse, @@ -479,6 +488,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> LlmListResponse: """ List Retell LLM Response Engines with pagination @@ -505,6 +515,7 @@ def list( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=maybe_transform( { "limit": limit, @@ -528,6 +539,7 @@ def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> None: """ Delete an existing Retell LLM Response Engine @@ -555,6 +567,7 @@ def delete( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=maybe_transform({"force_delete": force_delete}, llm_delete_params.LlmDeleteParams), ), cast_to=NoneType, @@ -656,6 +669,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> LlmResponse: """Create a new Retell LLM Response Engine that can be attached to an agent. @@ -763,7 +777,11 @@ async def create( llm_create_params.LlmCreateParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=LlmResponse, ) @@ -779,6 +797,7 @@ async def retrieve( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> LlmResponse: """ Retrieve details of a specific Retell LLM Response Engine @@ -803,6 +822,7 @@ async def retrieve( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=await async_maybe_transform({"version": version}, llm_retrieve_params.LlmRetrieveParams), ), cast_to=LlmResponse, @@ -885,6 +905,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> LlmResponse: """ Update an existing Retell LLM Response Engine @@ -998,6 +1019,7 @@ async def update( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=await async_maybe_transform({"version": version}, llm_update_params.LlmUpdateParams), ), cast_to=LlmResponse, @@ -1015,6 +1037,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> LlmListResponse: """ List Retell LLM Response Engines with pagination @@ -1041,6 +1064,7 @@ async def list( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=await async_maybe_transform( { "limit": limit, @@ -1064,6 +1088,7 @@ async def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> None: """ Delete an existing Retell LLM Response Engine @@ -1091,6 +1116,7 @@ async def delete( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=await async_maybe_transform({"force_delete": force_delete}, llm_delete_params.LlmDeleteParams), ), cast_to=NoneType, diff --git a/src/retell/resources/mcp_tool.py b/src/retell/resources/mcp_tool.py index b4461577..fa2c6b7a 100644 --- a/src/retell/resources/mcp_tool.py +++ b/src/retell/resources/mcp_tool.py @@ -56,6 +56,7 @@ def get_mcp_tools( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> McpToolGetMcpToolsResponse: """ Get MCP tools for a specific agent @@ -85,6 +86,7 @@ def get_mcp_tools( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=maybe_transform( { "mcp_id": mcp_id, @@ -131,6 +133,7 @@ async def get_mcp_tools( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> McpToolGetMcpToolsResponse: """ Get MCP tools for a specific agent @@ -160,6 +163,7 @@ async def get_mcp_tools( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=await async_maybe_transform( { "mcp_id": mcp_id, diff --git a/src/retell/resources/phone_number.py b/src/retell/resources/phone_number.py index b82cd0a6..66046b94 100644 --- a/src/retell/resources/phone_number.py +++ b/src/retell/resources/phone_number.py @@ -72,6 +72,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> PhoneNumberResponse: """ Buy a new phone number & Bind agents @@ -149,7 +150,11 @@ def create( phone_number_create_params.PhoneNumberCreateParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=PhoneNumberResponse, ) @@ -164,6 +169,7 @@ def retrieve( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> PhoneNumberResponse: """ Retrieve details of a specific phone number @@ -182,7 +188,11 @@ def retrieve( return self._get( path_template("/get-phone-number/{phone_number}", phone_number=phone_number), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=PhoneNumberResponse, ) @@ -212,6 +222,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> PhoneNumberResponse: """Update settings for a phone number. @@ -309,7 +320,11 @@ def update( phone_number_update_params.PhoneNumberUpdateParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=PhoneNumberResponse, ) @@ -326,6 +341,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> PhoneNumberListResponse: """ List phone numbers with pagination @@ -352,6 +368,7 @@ def list( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=maybe_transform( { "limit": limit, @@ -374,6 +391,7 @@ def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> None: """ Delete an existing phone number @@ -393,7 +411,11 @@ def delete( return self._delete( path_template("/delete-phone-number/{phone_number}", phone_number=phone_number), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=NoneType, ) @@ -420,6 +442,7 @@ def import_( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> PhoneNumberResponse: """ Import a phone number from custom telephony & Bind agents @@ -500,7 +523,11 @@ def import_( phone_number_import_params.PhoneNumberImportParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=PhoneNumberResponse, ) @@ -548,6 +575,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> PhoneNumberResponse: """ Buy a new phone number & Bind agents @@ -625,7 +653,11 @@ async def create( phone_number_create_params.PhoneNumberCreateParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=PhoneNumberResponse, ) @@ -640,6 +672,7 @@ async def retrieve( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> PhoneNumberResponse: """ Retrieve details of a specific phone number @@ -658,7 +691,11 @@ async def retrieve( return await self._get( path_template("/get-phone-number/{phone_number}", phone_number=phone_number), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=PhoneNumberResponse, ) @@ -688,6 +725,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> PhoneNumberResponse: """Update settings for a phone number. @@ -785,7 +823,11 @@ async def update( phone_number_update_params.PhoneNumberUpdateParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=PhoneNumberResponse, ) @@ -802,6 +844,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> PhoneNumberListResponse: """ List phone numbers with pagination @@ -828,6 +871,7 @@ async def list( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=await async_maybe_transform( { "limit": limit, @@ -850,6 +894,7 @@ async def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> None: """ Delete an existing phone number @@ -869,7 +914,11 @@ async def delete( return await self._delete( path_template("/delete-phone-number/{phone_number}", phone_number=phone_number), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=NoneType, ) @@ -896,6 +945,7 @@ async def import_( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> PhoneNumberResponse: """ Import a phone number from custom telephony & Bind agents @@ -976,7 +1026,11 @@ async def import_( phone_number_import_params.PhoneNumberImportParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=PhoneNumberResponse, ) diff --git a/src/retell/resources/playground.py b/src/retell/resources/playground.py index 6231e634..1fb62fbe 100644 --- a/src/retell/resources/playground.py +++ b/src/retell/resources/playground.py @@ -61,6 +61,7 @@ def completion( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> PlaygroundCompletionResponse: """Stateless playground completion. @@ -117,6 +118,7 @@ def completion( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=maybe_transform({"version": version}, playground_completion_params.PlaygroundCompletionParams), ), cast_to=PlaygroundCompletionResponse, @@ -160,6 +162,7 @@ async def completion( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> PlaygroundCompletionResponse: """Stateless playground completion. @@ -216,6 +219,7 @@ async def completion( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=await async_maybe_transform( {"version": version}, playground_completion_params.PlaygroundCompletionParams ), diff --git a/src/retell/resources/tests.py b/src/retell/resources/tests.py index 9cbe699b..3eaf8121 100644 --- a/src/retell/resources/tests.py +++ b/src/retell/resources/tests.py @@ -69,6 +69,7 @@ def create_batch_test( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> BatchTestResponse: """ Create a batch test to run multiple test cases @@ -96,7 +97,11 @@ def create_batch_test( test_create_batch_test_params.TestCreateBatchTestParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=BatchTestResponse, ) @@ -151,6 +156,7 @@ def create_test_case_definition( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> TestCaseDefinitionResponse: """ Create a new test case definition @@ -193,7 +199,11 @@ def create_test_case_definition( test_create_test_case_definition_params.TestCreateTestCaseDefinitionParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=TestCaseDefinitionResponse, ) @@ -208,6 +218,7 @@ def delete_test_case_definition( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> None: """ Delete a test case definition @@ -232,7 +243,11 @@ def delete_test_case_definition( test_case_definition_id=test_case_definition_id, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=NoneType, ) @@ -247,6 +262,7 @@ def get_batch_test( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> BatchTestResponse: """ Get a batch test job by ID @@ -267,7 +283,11 @@ def get_batch_test( return self._get( path_template("/get-batch-test/{test_case_batch_job_id}", test_case_batch_job_id=test_case_batch_job_id), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=BatchTestResponse, ) @@ -282,6 +302,7 @@ def get_test_case_definition( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> TestCaseDefinitionResponse: """ Get a test case definition by ID @@ -304,7 +325,11 @@ def get_test_case_definition( "/get-test-case-definition/{test_case_definition_id}", test_case_definition_id=test_case_definition_id ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=TestCaseDefinitionResponse, ) @@ -319,6 +344,7 @@ def get_test_run( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> TestCaseJobResponse: """ Get a test case job (test run) by ID @@ -337,7 +363,11 @@ def get_test_run( return self._get( path_template("/get-test-run/{test_case_job_id}", test_case_job_id=test_case_job_id), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=TestCaseJobResponse, ) @@ -357,6 +387,7 @@ def list_batch_tests( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> TestListBatchTestsResponse: """ List batch test jobs with pagination @@ -389,6 +420,7 @@ def list_batch_tests( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=maybe_transform( { "type": type, @@ -418,6 +450,7 @@ def list_test_case_definitions( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> TestListTestCaseDefinitionsResponse: """ List test case definitions with pagination @@ -448,6 +481,7 @@ def list_test_case_definitions( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=maybe_transform( { "type": type, @@ -474,6 +508,7 @@ def list_test_runs( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> TestListTestRunsResponse: """ List test case jobs (test runs) for a batch test job with pagination @@ -502,6 +537,7 @@ def list_test_runs( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=maybe_transform( { "limit": limit, @@ -564,6 +600,7 @@ def update_test_case_definition( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> TestCaseDefinitionResponse: """ Update a test case definition @@ -613,7 +650,11 @@ def update_test_case_definition( test_update_test_case_definition_params.TestUpdateTestCaseDefinitionParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=TestCaseDefinitionResponse, ) @@ -650,6 +691,7 @@ async def create_batch_test( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> BatchTestResponse: """ Create a batch test to run multiple test cases @@ -677,7 +719,11 @@ async def create_batch_test( test_create_batch_test_params.TestCreateBatchTestParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=BatchTestResponse, ) @@ -732,6 +778,7 @@ async def create_test_case_definition( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> TestCaseDefinitionResponse: """ Create a new test case definition @@ -774,7 +821,11 @@ async def create_test_case_definition( test_create_test_case_definition_params.TestCreateTestCaseDefinitionParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=TestCaseDefinitionResponse, ) @@ -789,6 +840,7 @@ async def delete_test_case_definition( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> None: """ Delete a test case definition @@ -813,7 +865,11 @@ async def delete_test_case_definition( test_case_definition_id=test_case_definition_id, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=NoneType, ) @@ -828,6 +884,7 @@ async def get_batch_test( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> BatchTestResponse: """ Get a batch test job by ID @@ -848,7 +905,11 @@ async def get_batch_test( return await self._get( path_template("/get-batch-test/{test_case_batch_job_id}", test_case_batch_job_id=test_case_batch_job_id), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=BatchTestResponse, ) @@ -863,6 +924,7 @@ async def get_test_case_definition( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> TestCaseDefinitionResponse: """ Get a test case definition by ID @@ -885,7 +947,11 @@ async def get_test_case_definition( "/get-test-case-definition/{test_case_definition_id}", test_case_definition_id=test_case_definition_id ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=TestCaseDefinitionResponse, ) @@ -900,6 +966,7 @@ async def get_test_run( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> TestCaseJobResponse: """ Get a test case job (test run) by ID @@ -918,7 +985,11 @@ async def get_test_run( return await self._get( path_template("/get-test-run/{test_case_job_id}", test_case_job_id=test_case_job_id), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=TestCaseJobResponse, ) @@ -938,6 +1009,7 @@ async def list_batch_tests( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> TestListBatchTestsResponse: """ List batch test jobs with pagination @@ -970,6 +1042,7 @@ async def list_batch_tests( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=await async_maybe_transform( { "type": type, @@ -999,6 +1072,7 @@ async def list_test_case_definitions( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> TestListTestCaseDefinitionsResponse: """ List test case definitions with pagination @@ -1029,6 +1103,7 @@ async def list_test_case_definitions( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=await async_maybe_transform( { "type": type, @@ -1055,6 +1130,7 @@ async def list_test_runs( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> TestListTestRunsResponse: """ List test case jobs (test runs) for a batch test job with pagination @@ -1083,6 +1159,7 @@ async def list_test_runs( extra_query=extra_query, extra_body=extra_body, timeout=timeout, + max_retries=max_retries, query=await async_maybe_transform( { "limit": limit, @@ -1145,6 +1222,7 @@ async def update_test_case_definition( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> TestCaseDefinitionResponse: """ Update a test case definition @@ -1194,7 +1272,11 @@ async def update_test_case_definition( test_update_test_case_definition_params.TestUpdateTestCaseDefinitionParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=TestCaseDefinitionResponse, ) diff --git a/src/retell/resources/voice.py b/src/retell/resources/voice.py index 9c1d3750..63919de2 100644 --- a/src/retell/resources/voice.py +++ b/src/retell/resources/voice.py @@ -57,6 +57,7 @@ def retrieve( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> VoiceResponse: """ Retrieve details of a specific voice @@ -75,7 +76,11 @@ def retrieve( return self._get( path_template("/get-voice/{voice_id}", voice_id=voice_id), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=VoiceResponse, ) @@ -89,12 +94,17 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> VoiceListResponse: """List all voices available to the user""" return self._get( "/list-voices", options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=VoiceListResponse, ) @@ -112,6 +122,7 @@ def add_resource( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> VoiceResponse: """ Add a community voice to the voice library @@ -145,7 +156,11 @@ def add_resource( voice_add_resource_params.VoiceAddResourceParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=VoiceResponse, ) @@ -162,6 +177,7 @@ def clone( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> VoiceResponse: """ Clone a voice from audio files @@ -200,7 +216,11 @@ def clone( body=maybe_transform(body, voice_clone_params.VoiceCloneParams), files=extracted_files, options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=VoiceResponse, ) @@ -216,6 +236,7 @@ def search( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> VoiceSearchResponse: """ Search for community voices from voice providers @@ -243,7 +264,11 @@ def search( voice_search_params.VoiceSearchParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=VoiceSearchResponse, ) @@ -279,6 +304,7 @@ async def retrieve( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> VoiceResponse: """ Retrieve details of a specific voice @@ -297,7 +323,11 @@ async def retrieve( return await self._get( path_template("/get-voice/{voice_id}", voice_id=voice_id), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=VoiceResponse, ) @@ -311,12 +341,17 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> VoiceListResponse: """List all voices available to the user""" return await self._get( "/list-voices", options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=VoiceListResponse, ) @@ -334,6 +369,7 @@ async def add_resource( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> VoiceResponse: """ Add a community voice to the voice library @@ -367,7 +403,11 @@ async def add_resource( voice_add_resource_params.VoiceAddResourceParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=VoiceResponse, ) @@ -384,6 +424,7 @@ async def clone( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> VoiceResponse: """ Clone a voice from audio files @@ -422,7 +463,11 @@ async def clone( body=await async_maybe_transform(body, voice_clone_params.VoiceCloneParams), files=extracted_files, options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=VoiceResponse, ) @@ -438,6 +483,7 @@ async def search( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, + max_retries: int | NotGiven = not_given, ) -> VoiceSearchResponse: """ Search for community voices from voice providers @@ -465,7 +511,11 @@ async def search( voice_search_params.VoiceSearchParams, ), options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + max_retries=max_retries, ), cast_to=VoiceSearchResponse, ) From a0fb8015b90c5ed05b3d66b2c346f04571facdb9 Mon Sep 17 00:00:00 2001 From: stlc-bot Date: Thu, 22 Oct 2026 22:15:32 +0000 Subject: [PATCH 2/2] chore: preserve production workflow files --- .github/workflows/ci.yml | 10 +- .github/workflows/release-doctor.yml | 11 + .github/workflows/release-please.yml | 51 ++- .github/workflows/stlc-auto-merge.yml | 172 +++++++++ .github/workflows/stlc-promote.yml | 183 --------- .release-please-manifest.json | 2 +- CHANGELOG.md | 529 ++++++++++++++++++++++++++ pyproject.toml | 2 +- src/retell/_version.py | 2 +- 9 files changed, 766 insertions(+), 196 deletions(-) create mode 100644 .github/workflows/stlc-auto-merge.yml delete mode 100644 .github/workflows/stlc-promote.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0b21c8f2..f0dbdd45 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: lint: timeout-minutes: 10 name: lint - runs-on: ${{ github.repository == 'stainless-sdks/retell-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + runs-on: 'ubuntu-latest' if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -44,7 +44,7 @@ jobs: permissions: contents: read id-token: write - runs-on: ${{ github.repository == 'stainless-sdks/retell-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + runs-on: 'ubuntu-latest' steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -64,7 +64,7 @@ jobs: - name: Get GitHub OIDC Token if: |- - github.repository == 'stainless-sdks/retell-python' && + github.repository == 'RetellAI/retell-python-sdk-staging' && !startsWith(github.ref, 'refs/heads/stl/') id: github-oidc uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 @@ -73,7 +73,7 @@ jobs: - name: Upload tarball if: |- - github.repository == 'stainless-sdks/retell-python' && + github.repository == 'RetellAI/retell-python-sdk-staging' && !startsWith(github.ref, 'refs/heads/stl/') env: URL: https://pkg.stainless.com/s @@ -84,7 +84,7 @@ jobs: test: timeout-minutes: 10 name: test - runs-on: ${{ github.repository == 'stainless-sdks/retell-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + runs-on: 'ubuntu-latest' if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index f5472e98..b3231f69 100644 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -12,6 +12,17 @@ jobs: if: github.repository == 'RetellAI/retell-python-sdk' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') steps: + - name: Validate SDK GitHub App access + uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 + with: + client-id: ${{ secrets.DOCS_SYNC_APP_CLIENT_ID }} + private-key: ${{ secrets.DOCS_MANAGER_PVT_KEY }} + owner: ${{ github.repository_owner }} + repositories: retell-python-sdk + permission-contents: write + permission-pull-requests: write + permission-issues: write + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Check release environment diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 16debdb2..6ea68f12 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -1,20 +1,61 @@ name: Release Please + on: push: branches: - main + schedule: + - cron: '7,22,37,52 * * * *' + workflow_dispatch: + +concurrency: + group: sdk-release-please + cancel-in-progress: false -permissions: - contents: write - pull-requests: write +permissions: {} jobs: release-please: - if: github.repository == 'RetellAI/retell-python-sdk' + name: release please runs-on: ubuntu-latest + if: github.repository == 'RetellAI/retell-python-sdk' && github.ref == 'refs/heads/main' && vars.SDK_RELEASES_ENABLED == 'true' + + timeout-minutes: 10 steps: + - name: Mint SDK automation token + id: sdk-token + uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 + with: + client-id: ${{ secrets.DOCS_SYNC_APP_CLIENT_ID }} + private-key: ${{ secrets.DOCS_MANAGER_PVT_KEY }} + owner: ${{ github.repository_owner }} + repositories: | + docs + retell-typescript-sdk + retell-python-sdk + permission-contents: write + permission-pull-requests: write + permission-issues: write + + - name: Checkout shared release policy + uses: actions/checkout@v4 + with: + repository: RetellAI/docs + ref: main + path: .release-policy + token: ${{ steps.sdk-token.outputs.token }} + persist-credentials: false + + - name: Check whether release notes are frozen + id: policy + env: + GH_TOKEN: ${{ steps.sdk-token.outputs.token }} + run: python3 .release-policy/script/sdk_release_policy.py frozen --repo "${{ github.repository }}" + - uses: googleapis/release-please-action@5c625bfb5d1ff62eadeeb3772007f7f66fdcf071 # v4.4.1 id: release + if: steps.policy.outputs.frozen != 'true' with: - token: ${{ secrets.RELEASE_PLEASE_TOKEN }} + token: ${{ steps.sdk-token.outputs.token }} + skip-github-pull-request: ${{ steps.policy.outputs.refresh != 'true' }} diff --git a/.github/workflows/stlc-auto-merge.yml b/.github/workflows/stlc-auto-merge.yml new file mode 100644 index 00000000..54b523b5 --- /dev/null +++ b/.github/workflows/stlc-auto-merge.yml @@ -0,0 +1,172 @@ +name: Auto-merge SDK release PRs + +on: + pull_request_target: + types: [opened, synchronize, reopened, ready_for_review] + branches: [main] + workflow_run: + workflows: ['CI', 'Release Doctor'] + types: [completed] + schedule: + - cron: '*/15 * * * *' + workflow_dispatch: + inputs: + pr_number: + description: 'Optional PR number to evaluate' + required: false + release_now: + description: 'Bypass the 24-hour interval; all checks still apply' + type: boolean + default: false + +concurrency: + group: sdk-auto-merge + cancel-in-progress: false + +permissions: + contents: read + pull-requests: read + checks: read + statuses: read + actions: read + +jobs: + auto-merge: + if: github.repository == 'RetellAI/retell-python-sdk' && github.ref == 'refs/heads/main' && vars.SDK_RELEASES_ENABLED == 'true' + runs-on: ubuntu-latest + timeout-minutes: 10 + env: + GH_TOKEN: ${{ github.token }} + REPO: ${{ github.repository }} + steps: + - name: Mint SDK automation token + id: sdk-token + uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 + with: + client-id: ${{ secrets.DOCS_SYNC_APP_CLIENT_ID }} + private-key: ${{ secrets.DOCS_MANAGER_PVT_KEY }} + owner: ${{ github.repository_owner }} + repositories: | + docs + retell-typescript-sdk + retell-python-sdk + permission-contents: write + permission-pull-requests: write + + - name: Checkout shared release policy + uses: actions/checkout@v4 + with: + repository: RetellAI/docs + ref: main + path: .release-policy + token: ${{ steps.sdk-token.outputs.token }} + persist-credentials: false + + - name: Merge qualifying green PRs + shell: bash + env: + MERGE_TOKEN: ${{ steps.sdk-token.outputs.token }} + EVENT_NAME: ${{ github.event_name }} + EVENT_PR: ${{ github.event.pull_request.number }} + INPUT_PR: ${{ inputs.pr_number }} + RELEASE_NOW: ${{ inputs.release_now || false }} + SDK_ACTIONS_READ_TOKEN: ${{ github.token }} + run: | + set -euo pipefail + + if [ "$EVENT_NAME" = "pull_request_target" ]; then + numbers="$EVENT_PR" + elif [ "$EVENT_NAME" = "workflow_dispatch" ] && [ -n "$INPUT_PR" ]; then + numbers="$INPUT_PR" + else + numbers=$(gh pr list --repo "$REPO" --base main --state open --limit 1000 --json number --jq '.[].number') + fi + + while IFS= read -r pr; do + [ -n "$pr" ] || continue + if [[ ! "$pr" =~ ^[1-9][0-9]*$ ]]; then + echo "::error::Invalid PR number." + exit 1 + fi + echo "Evaluating PR #$pr" + pr_json=$(gh pr view "$pr" --repo "$REPO" --json state,title,isDraft,headRefName,headRefOid,headRepository,isCrossRepository,baseRefName,mergeStateStatus) + title=$(jq -r '.title' <<<"$pr_json") + is_draft=$(jq -r '.isDraft' <<<"$pr_json") + head_ref=$(jq -r '.headRefName' <<<"$pr_json") + head_sha=$(jq -r '.headRefOid' <<<"$pr_json") + head_repo=$(jq -r '.headRepository.nameWithOwner // ""' <<<"$pr_json") + is_cross_repository=$(jq -r '.isCrossRepository' <<<"$pr_json") + base_ref=$(jq -r '.baseRefName' <<<"$pr_json") + + if [ "$(jq -r .state <<<"$pr_json")" != "OPEN" ] || [ "$base_ref" != "main" ] || [ "$is_draft" = "true" ]; then + echo "Skipping PR #$pr: not a ready PR to main." + continue + fi + + if [ "$is_cross_repository" = "true" ] || [ "$head_repo" != "$REPO" ]; then + echo "Skipping PR #$pr: head branch is not in $REPO." + continue + fi + + merge_flag="" + if [ "$head_ref" = "stainless-release" ] && [ "$title" = "Release SDK updates" ]; then + merge_flag="--merge" + elif [[ "$head_ref" == release-please--* ]] && [[ "$title" == release:* ]]; then + merge_flag="--squash" + else + echo "Skipping PR #$pr: not an automated SDK release PR." + continue + fi + + ci_runs=$(gh api "/repos/$REPO/actions/workflows/ci.yml/runs?head_sha=$head_sha&event=push&per_page=1") + if ! jq -e '.workflow_runs[0] | .status == "completed" and .conclusion == "success"' <<<"$ci_runs" >/dev/null; then + echo "Skipping PR #$pr: push CI has not passed for $head_sha." + continue + fi + + check_pages=$(gh api --paginate --slurp "/repos/$REPO/commits/$head_sha/check-runs?filter=latest&per_page=100") + check_runs=$(jq '[.[].check_runs[] | select(.name != "auto-merge" or .app.slug != "github-actions")]' <<<"$check_pages") + check_count=$(jq 'length' <<<"$check_runs") + if [ "$check_count" -eq 0 ]; then + echo "Skipping PR #$pr: no check runs found yet." + continue + fi + + bad_checks=$(jq '[.[] | select(.status != "completed" or (.conclusion != "success" and .conclusion != "skipped"))] | length' <<<"$check_runs") + if [ "$bad_checks" -ne 0 ]; then + echo "Skipping PR #$pr: checks are pending or failed." + continue + fi + + statuses=$(gh api "/repos/$REPO/commits/$head_sha/status") + status_count=$(jq '.total_count' <<<"$statuses") + status_state=$(jq -r '.state' <<<"$statuses") + if [ "$status_count" -gt 0 ] && [ "$status_state" != "success" ]; then + echo "Skipping PR #$pr: commit statuses are $status_state." + continue + fi + + if [ "$merge_flag" = "--merge" ]; then + policy=$(GH_TOKEN="$MERGE_TOKEN" python3 .release-policy/script/sdk_release_policy.py frozen --repo "$REPO") + if grep -qx 'frozen=true' <<< "$policy"; then + echo "Skipping PR #$pr: finish the current version release first." + continue + fi + fi + + if [ "$merge_flag" = "--squash" ]; then + policy_args=(ready --repo "$REPO" --pr "$pr") + if [ "$EVENT_NAME" = "workflow_dispatch" ] && [ "$RELEASE_NOW" = "true" ]; then + policy_args+=(--force) + fi + policy=$(GH_TOKEN="$MERGE_TOKEN" python3 .release-policy/script/sdk_release_policy.py "${policy_args[@]}") + echo "$policy" + if ! grep -qx 'ready=true' <<< "$policy"; then + continue + fi + fi + + echo "Merging PR #$pr with ${merge_flag}." + GH_TOKEN="$MERGE_TOKEN" gh pr merge "$pr" --repo "$REPO" "$merge_flag" --delete-branch --match-head-commit "$head_sha" + echo "Merged PR #$pr." + done <<<"$numbers" diff --git a/.github/workflows/stlc-promote.yml b/.github/workflows/stlc-promote.yml deleted file mode 100644 index ec48c297..00000000 --- a/.github/workflows/stlc-promote.yml +++ /dev/null @@ -1,183 +0,0 @@ -name: Promote SDKs - -on: - push: - branches: [main] - -concurrency: - group: sdk-promotion - cancel-in-progress: false - -permissions: - contents: read - -jobs: - promote: - if: github.repository == 'RetellAI/retell-python-sdk-staging' - runs-on: ubuntu-latest - env: - PRODUCTION_REPO: RetellAI/retell-python-sdk - steps: - - name: Check out staging - uses: actions/checkout@v6 - with: - fetch-depth: 0 - persist-credentials: false - - - name: Mint SDK promotion token - id: sdk-token - uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 - with: - client-id: ${{ secrets.DOCS_SYNC_APP_CLIENT_ID }} - private-key: ${{ secrets.DOCS_MANAGER_PVT_KEY }} - owner: ${{ github.repository_owner }} - repositories: retell-python-sdk - permission-contents: write - permission-pull-requests: write - - - name: Fetch production main - env: - GH_TOKEN: ${{ steps.sdk-token.outputs.token }} - run: | - set -euo pipefail - gh auth setup-git - git remote add production "https://github.com/${PRODUCTION_REPO}.git" - git fetch production main - - - name: Check if production is already in sync - id: diff - run: | - STAGING_SHA=$(git rev-parse origin/main) - PRODUCTION_SHA=$(git rev-parse production/main) - if [ "$STAGING_SHA" = "$PRODUCTION_SHA" ]; then - echo "Production is already at $STAGING_SHA. Nothing to release." - echo "synced=true" >> "$GITHUB_OUTPUT" - else - echo "synced=false" >> "$GITHUB_OUTPUT" - fi - - - name: Preserve production-owned files - if: steps.diff.outputs.synced == 'false' - run: | - git config user.name "stlc-bot" - git config user.email "stlc-bot@users.noreply.github.com" - git switch --force-create stainless-release origin/main - - git rm -r -f --ignore-unmatch .github/workflows - git checkout production/main -- .github/workflows - git rm -f --ignore-unmatch .github/workflows/stlc-promote.yml - - for release_path in \ - .release-please-manifest.json \ - CHANGELOG.md \ - pyproject.toml \ - src/retell/_version.py - do - if git cat-file -e "production/main:${release_path}" 2>/dev/null; then - git checkout production/main -- "${release_path}" - else - git rm -f --ignore-unmatch "${release_path}" - fi - done - - if ! git diff --quiet HEAD -- \ - .github/workflows \ - .release-please-manifest.json \ - CHANGELOG.md \ - pyproject.toml \ - src/retell/_version.py - then - git add \ - .github/workflows \ - .release-please-manifest.json \ - CHANGELOG.md \ - pyproject.toml \ - src/retell/_version.py - git commit -m "chore: preserve production workflow files" - fi - - - name: Check whether promotion is needed - if: steps.diff.outputs.synced == 'false' - id: promotion - run: | - set -euo pipefail - commit_messages=$(git log --format=%B production/main..HEAD) - # Production-only changes survive the merge and must not count as SDK updates. - merged_tree=$(git merge-tree --write-tree production/main HEAD) - if git diff --quiet production/main "$merged_tree" && \ - ! grep -Eq '^Release-As: [0-9]+\.[0-9]+\.[0-9]+([+-][[:alnum:].-]+)?[[:space:]]*$' <<< "$commit_messages" - then - echo "Prepared SDK matches production and has no reserved release; nothing to promote." - echo "needed=false" >> "$GITHUB_OUTPUT" - else - echo "needed=true" >> "$GITHUB_OUTPUT" - fi - - - name: Push release branch on production - if: steps.promotion.outputs.needed == 'true' - env: - GH_TOKEN: ${{ steps.sdk-token.outputs.token }} - run: | - set -euo pipefail - base_sha=$(git rev-parse production/main) - git fetch production main - if [ "$(git rev-parse production/main)" != "$base_sha" ]; then - echo "::error::Production main changed during promotion; rerun against the latest main." - exit 1 - fi - git fetch production "+refs/heads/stainless-release:refs/remotes/production/stainless-release" || true - git push --force-with-lease production HEAD:refs/heads/stainless-release - - - name: Open or update the release PR on production - if: steps.promotion.outputs.needed == 'true' - env: - GH_TOKEN: ${{ steps.sdk-token.outputs.token }} - APP_SLUG: ${{ steps.sdk-token.outputs.app-slug }} - run: | - set -euo pipefail - log_file="$RUNNER_TEMP/sdk-commits.txt" - git log --format=%B production/main..HEAD > "$log_file" - handles=$(sed -n 's/^cc //p' "$log_file" | grep -oE '@[A-Za-z0-9][A-Za-z0-9-]*' | sort -u | head -5 | paste -sd' ' - || true) - body_file="$RUNNER_TEMP/sdk-release-pr.md" - removals=$(awk '/^BREAKING CHANGE:/ { print; while (getline > 0 && NF) print }' "$log_file") - { - printf 'Updates the generated SDK from the coordinated docs build.\n\n' - printf 'Source changes:\n' - git log --format='- %s' production/main..HEAD | sed '/^- chore: preserve production workflow files$/d' - sed -n 's|^Source: RetellAI/docs@\([a-f0-9]\{40\}\)$|- https://github.com/RetellAI/docs/commit/\1|p; /^Backend changes: /p; /^- .*https:\/\/github.com\/RetellAI\/retell-backend\/pull\/[0-9]/p' "$log_file" | sort -u - printf '\nSDK versions reserved by these builds:\n' - sed -n 's/^Release-As: /- /p' "$log_file" | sort -Vu - if [ -n "$removals" ]; then printf '\nRemoved SDK methods:\n%s\n' "$removals"; fi - printf '\nValidation: auto-merge waits for SDK CI and all PR checks on the current commit.\n' - printf 'Promotion workflow: https://github.com/%s/actions/runs/%s\n' "$GITHUB_REPOSITORY" "$GITHUB_RUN_ID" - if [ -n "$handles" ]; then printf '\ncc %s\n' "$handles"; fi - } > "$body_file" - EXISTING_PR=$(gh pr list --repo "$PRODUCTION_REPO" --head stainless-release --state open \ - --json number --jq '.[0].number // empty') - if [ -n "$EXISTING_PR" ]; then - author=$(gh pr view "$EXISTING_PR" --repo "$PRODUCTION_REPO" --json author --jq '.author.login') - if [ "$author" != "${APP_SLUG}[bot]" ] && [ "$author" != "app/${APP_SLUG}" ]; then - gh pr close "$EXISTING_PR" --repo "$PRODUCTION_REPO" \ - --comment "The GitHub App will replace this promotion PR so future updates use the bot identity." - EXISTING_PR="" - fi - fi - if [ -z "$EXISTING_PR" ]; then - gh pr create --repo "$PRODUCTION_REPO" --base main --head stainless-release \ - --title "Release SDK updates" --body-file "$body_file" - else - previous_handles=$(gh pr view "$EXISTING_PR" --repo "$PRODUCTION_REPO" --json body --jq '.body' \ - | grep -oE '@[A-Za-z0-9][A-Za-z0-9-]*' | sort -u | paste -sd' ' - || true) - gh pr edit "$EXISTING_PR" --repo "$PRODUCTION_REPO" --body-file "$body_file" - added="" - for handle in $handles; do - case " $previous_handles " in - *" $handle "*) ;; - *) added="${added:+$added }$handle" ;; - esac - done - if [ -n "$added" ]; then - gh pr comment "$EXISTING_PR" --repo "$PRODUCTION_REPO" \ - --body "$added — this SDK update now also includes your source changes. See the source links in the description." - fi - fi diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e30834d7..906433b0 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "5.43.0" + ".": "6.2.10" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index e37f60a1..f6b6e01e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,534 @@ # Changelog +## [6.2.10](https://github.com/RetellAI/retell-python-sdk/compare/v6.2.9...v6.2.10) (2026-10-22) + + +### Bug Fixes + +* **api:** Add additionalProperties to integration response schemas and document enum_labels and forbid_literal_const for app tool schema resolution. ([a94026d](https://github.com/RetellAI/retell-python-sdk/commit/a94026d6e13adc3a80a18f451aed3532e690b36b)) +* **api:** Add avatar_url to voice objects and update the provider description. ([5051697](https://github.com/RetellAI/retell-python-sdk/commit/50516971c2af899fc92442b30934be9971bceecc)) +* **api:** Add grok-voice-3.0 to S2S model enums and allow xai voice providers. ([5051697](https://github.com/RetellAI/retell-python-sdk/commit/50516971c2af899fc92442b30934be9971bceecc)) +* **api:** Add model_config to agent overrides, Retell LLM overrides, conversation flow overrides, and node definitions. ([4258ce7](https://github.com/RetellAI/retell-python-sdk/commit/4258ce7127f6213d4cdce55790bcbca12ae7ebec)) +* **api:** Add SipCodecList to custom phone number import and update requests, and to phone number responses. ([9944e2a](https://github.com/RetellAI/retell-python-sdk/commit/9944e2a4dcbe2dcd12aa66f5c884cd619abc903c)) +* **api:** Deprecate model_choice, model_temperature, model, s2s_model, model_high_priority, and model_ultrafast in favor of model_config. ([4258ce7](https://github.com/RetellAI/retell-python-sdk/commit/4258ce7127f6213d4cdce55790bcbca12ae7ebec)) +* **api:** Deprecate the states field in the Retell LLM schema. ([635b8a2](https://github.com/RetellAI/retell-python-sdk/commit/635b8a2444d3c49a11e48030c1e42e4028d53a89)) + +## [6.2.9](https://github.com/RetellAI/retell-python-sdk/compare/v6.2.8...v6.2.9) (2026-10-20) + + +### Bug Fixes + +* **api:** Clarify that excluded_contact_ids accepts at most 1,000 contact IDs. ([67e7ac5](https://github.com/RetellAI/retell-python-sdk/commit/67e7ac58388cbe884f3e97c42e61badbc07c1514)) + +## [6.2.8](https://github.com/RetellAI/retell-python-sdk/compare/v6.2.7...v6.2.8) (2026-10-17) + + +### Bug Fixes + +* **api:** Add SMS sender and destination options, plus `speak_after_execution`, to SMS tools and nodes. ([8d6d4ff](https://github.com/RetellAI/retell-python-sdk/commit/8d6d4ff219a02bb7bb516a0305f2a15ae93167f9)) +* **api:** Clarify chart type behavior and revise the live-call takeover description for PCI sessions. ([8d6d4ff](https://github.com/RetellAI/retell-python-sdk/commit/8d6d4ff219a02bb7bb516a0305f2a15ae93167f9)) +* **api:** Remove the deprecated `multi` scalar from agent language fields; use a locale or locale array instead. ([8d6d4ff](https://github.com/RetellAI/retell-python-sdk/commit/8d6d4ff219a02bb7bb516a0305f2a15ae93167f9)) + +## [6.2.7](https://github.com/RetellAI/retell-python-sdk/compare/v6.2.6...v6.2.7) (2026-10-15) + + +### Bug Fixes + +* **api:** Add a 409 Conflict response for takeOverLiveCall when a PCI session is active. ([c383015](https://github.com/RetellAI/retell-python-sdk/commit/c383015b5b211949fe6b77a9d880beb7342689b5)) +* **api:** Add is_transfer_agent to agent create requests, agent responses, and agent list filters. ([c3eaf6d](https://github.com/RetellAI/retell-python-sdk/commit/c3eaf6d20dd3bc2972d08fc418043bc4ea642aed)) +* **api:** Add model_ultrafast and ultrafast override fields to Retell LLM configurations. ([207e06f](https://github.com/RetellAI/retell-python-sdk/commit/207e06fb009116fcaacd4ce708d186271f01769e)) +* **api:** api update ([87bdfdd](https://github.com/RetellAI/retell-python-sdk/commit/87bdfdd67eb16fad3988e5913cd263f40ec5483b)) +* **api:** Clarify that AgentOverrideRequest uses the latest version when no response-engine version is provided. ([747ff86](https://github.com/RetellAI/retell-python-sdk/commit/747ff86e2ec32bdcd164cf1330adead3439226b8)) + +## [6.2.6](https://github.com/RetellAI/retell-python-sdk/compare/v6.2.5...v6.2.6) (2026-10-13) + + +### Bug Fixes + +* **api:** Add the new `type` field to tool call invocation messages and document known values. ([4ce4443](https://github.com/RetellAI/retell-python-sdk/commit/4ce4443a9b473b2d86d34f55d617225f533a5259)) +* **api:** Clarify that `name` contains the configured tool or node name, not the tool kind. ([4ce4443](https://github.com/RetellAI/retell-python-sdk/commit/4ce4443a9b473b2d86d34f55d617225f533a5259)) +* **api:** Remove gpt-4.1-nano and claude-4.5-sonnet from LLM model enums. ([7cdf93e](https://github.com/RetellAI/retell-python-sdk/commit/7cdf93e62c6c783370ba761fb436bb28049918a8)) + +## [6.2.5](https://github.com/RetellAI/retell-python-sdk/compare/v6.2.4...v6.2.5) (2026-10-09) + + +### Bug Fixes + +* **api:** Add name character and length requirements to AppTool and SendSMSTool tool names. ([54eb1fe](https://github.com/RetellAI/retell-python-sdk/commit/54eb1feba6c1892d9e7c2b929958f3d43c94ce71)) + + +### Chores + +* **sdks:** refresh generated assets ([35e68a3](https://github.com/RetellAI/retell-python-sdk/commit/35e68a3a55aaa4c1eee5be6bcb00f5a8d159e557)) + +## [6.2.4](https://github.com/RetellAI/retell-python-sdk/compare/v6.2.3...v6.2.4) (2026-10-08) + + +### Bug Fixes + +* **api:** sync OpenAPI from retell-backend ([97fd5f5](https://github.com/RetellAI/retell-python-sdk/commit/97fd5f58cf4f657e5ab18e69602c0b79f8516bf3)) + + +### Chores + +* preserve production workflow files ([8d1908c](https://github.com/RetellAI/retell-python-sdk/commit/8d1908cb5fe195a08eefa36d568e4b5ca7fd0b4e)) + +## [6.2.3](https://github.com/RetellAI/retell-python-sdk/compare/v6.2.2...v6.2.3) (2026-10-08) + + +### Bug Fixes + +* **api:** sync OpenAPI from retell-backend ([88b031a](https://github.com/RetellAI/retell-python-sdk/commit/88b031a72fb1ccf923203d5a9e7a486f50bf13ed)) + + +### Chores + +* preserve production workflow files ([52266a3](https://github.com/RetellAI/retell-python-sdk/commit/52266a3eda82ec7734137301b44b01118ae66239)) + +## [6.2.2](https://github.com/RetellAI/retell-python-sdk/compare/v6.2.1...v6.2.2) (2026-10-08) + + +### Chores + +* preserve production workflow files ([40532e0](https://github.com/RetellAI/retell-python-sdk/commit/40532e09cf12723db6f3803a22a8d4f6c290c3eb)) + +## [6.2.1](https://github.com/RetellAI/retell-python-sdk/compare/v6.2.0...v6.2.1) (2026-10-07) + + +### Chores + +* preserve production workflow files ([365fbd2](https://github.com/RetellAI/retell-python-sdk/commit/365fbd2fb5610341dc1d35c2e9a9a3082cf903bc)) +* **sdks:** refresh generated assets ([137f031](https://github.com/RetellAI/retell-python-sdk/commit/137f0317220d163256636de41cfd83568b579701)) + +## [6.2.0](https://github.com/RetellAI/retell-python-sdk/compare/v6.1.1...v6.2.0) (2026-10-07) + + +### Features + +* **api:** sync OpenAPI from retell-backend ([745190f](https://github.com/RetellAI/retell-python-sdk/commit/745190fb960f07d4de144b819cd82de336488a01)) + + +### Chores + +* preserve production workflow files ([ceb0bc1](https://github.com/RetellAI/retell-python-sdk/commit/ceb0bc1a7623f7014fc557ff33f61a87db2459f3)) + +## [6.1.1](https://github.com/RetellAI/retell-python-sdk/compare/v6.1.0...v6.1.1) (2026-10-05) + + +### Bug Fixes + +* **sdks:** re-anchor custom-code seals on staging main ([3e38345](https://github.com/RetellAI/retell-python-sdk/commit/3e3834561aa158d32dc62dae2b56376cf0d5cc37)) + + +### Chores + +* preserve production workflow files ([d85dc66](https://github.com/RetellAI/retell-python-sdk/commit/d85dc6654b07a82282fde10248caec09f792c78f)) + +## [6.1.0](https://github.com/RetellAI/retell-python-sdk/compare/v6.0.1...v6.1.0) (2026-10-05) + + +### Features + +* **api:** sync OpenAPI from retell-backend ([a48276a](https://github.com/RetellAI/retell-python-sdk/commit/a48276acfbf6206245e5eba27cdc8cb6a7ac2a80)) + + +### Chores + +* preserve production workflow files ([07833c9](https://github.com/RetellAI/retell-python-sdk/commit/07833c923bd51315dadc70b35b80ae143d52e862)) + +## [6.0.1](https://github.com/RetellAI/retell-python-sdk/compare/v6.0.0...v6.0.1) (2026-09-14) + + +### Chores + +* preserve production workflow files ([af09c02](https://github.com/RetellAI/retell-python-sdk/commit/af09c026fdbd75274bc1985839481b7f5fac6092)) +* **sdks:** refresh generated assets ([fa5a373](https://github.com/RetellAI/retell-python-sdk/commit/fa5a37322af9fc8454f1818e296e8b1568c1b78f)) + +## [6.0.0](https://github.com/RetellAI/retell-python-sdk/compare/v5.66.1...v6.0.0) (2026-09-14) + + +### ⚠ BREAKING CHANGES + +* **api:** sync removed endpoints from retell-backend + +### Features + +* **api:** sync removed endpoints from retell-backend ([0153b25](https://github.com/RetellAI/retell-python-sdk/commit/0153b25666e5409410454d09653d33657ee8af72)) + + +### Chores + +* preserve production workflow files ([3a06229](https://github.com/RetellAI/retell-python-sdk/commit/3a062298434ef62fe88e3c672ab39f335046c40f)) + +## [5.66.1](https://github.com/RetellAI/retell-python-sdk/compare/v5.66.0...v5.66.1) (2026-09-11) + + +### Bug Fixes + +* **types:** update published source module resolution ([545daa6](https://github.com/RetellAI/retell-python-sdk/commit/545daa61e0cac21ee035dbb9b9291ccf30864a98)) + + +### Chores + +* preserve production workflow files ([e0191db](https://github.com/RetellAI/retell-python-sdk/commit/e0191dbcd54278cbb167170fd7846820b1c932e0)) + +## [5.66.0](https://github.com/RetellAI/retell-python-sdk/compare/v5.65.0...v5.66.0) (2026-09-10) + + +### Features + +* **api:** api update ([3471d56](https://github.com/RetellAI/retell-python-sdk/commit/3471d566283e1e3360e7e5c28ba6d3f8409779d2)) + + +### Chores + +* preserve production workflow files ([23f1b1b](https://github.com/RetellAI/retell-python-sdk/commit/23f1b1bd80245d4f6ab9295bd829ee3b8eb901f2)) + +## [5.65.0](https://github.com/RetellAI/retell-python-sdk/compare/v5.64.0...v5.65.0) (2026-09-10) + + +### Features + +* **api:** api update ([baa52dd](https://github.com/RetellAI/retell-python-sdk/commit/baa52ddc907eb44ec3e39c91bf56b34c6e90a9c9)) +* **api:** api update ([fdcf3c4](https://github.com/RetellAI/retell-python-sdk/commit/fdcf3c404dad0bcdf1f68eecda754152d3ecebdd)) +* **api:** api update ([3838870](https://github.com/RetellAI/retell-python-sdk/commit/3838870a600fa938d540adccc456d327f0f1c296)) +* **api:** api update ([e491ec5](https://github.com/RetellAI/retell-python-sdk/commit/e491ec52a39740657baa39c7dc112c8b4128a149)) +* **api:** api update ([97f1623](https://github.com/RetellAI/retell-python-sdk/commit/97f1623a7ecd99b571254a7c361d626dcc970b79)) +* **api:** api update ([16c2274](https://github.com/RetellAI/retell-python-sdk/commit/16c2274134de2f380798476473f037f0bf10275a)) +* **api:** api update ([8d9ee8a](https://github.com/RetellAI/retell-python-sdk/commit/8d9ee8a5ebbedb59ace1ccc9215fb15d25265c56)) +* **api:** release accumulated SDK updates ([#502](https://github.com/RetellAI/retell-python-sdk/issues/502)) ([3877699](https://github.com/RetellAI/retell-python-sdk/commit/38776994e40b240316b99841c03ac669a3c585f9)) + + +### Bug Fixes + +* **ci:** restore SDK releases with the existing GitHub App ([#503](https://github.com/RetellAI/retell-python-sdk/issues/503)) ([9cbfca1](https://github.com/RetellAI/retell-python-sdk/commit/9cbfca10cfc1146c2f1eac265c0303d170168f05)) + + +### Chores + +* preserve production workflow files ([16a64fb](https://github.com/RetellAI/retell-python-sdk/commit/16a64fbb69a1aa45dabc9a8f3c186d9baf909c24)) + + +### Documentation + +* overhaul guide for browser web calls; simplify setup and clarify transcript/audio features ([eb3f0d3](https://github.com/RetellAI/retell-python-sdk/commit/eb3f0d3241547a0b0f127b922afb3609d96b7154)) +* remove `create-web-v3` endpoint from config and map exclusion reasoning ([003036c](https://github.com/RetellAI/retell-python-sdk/commit/003036ccb077a7440b0542a01bcd55e64df625da)) + +## [5.64.0](https://github.com/RetellAI/retell-python-sdk/compare/v5.61.0...v5.64.0) (2026-08-23) + + +### Features + +* **api:** api update ([a7267c3](https://github.com/RetellAI/retell-python-sdk/commit/a7267c36bc6775d469cb3cffd8cd23c75b6a871f)) +* **api:** expose contact, app, and CRM APIs in API reference and SDKs ([a2ade63](https://github.com/RetellAI/retell-python-sdk/commit/a2ade63b58a71fbd0da7e8c542e4ebc73bd29271)) + + +### Chores + +* preserve production workflow files ([ebd7949](https://github.com/RetellAI/retell-python-sdk/commit/ebd794948a9cb7165329da6c458a8883dd25c597)) + +## [5.61.0](https://github.com/RetellAI/retell-python-sdk/compare/v5.60.0...v5.61.0) (2026-08-10) + + +### Features + +* **api:** api update ([4d9257e](https://github.com/RetellAI/retell-python-sdk/commit/4d9257ef02bdc29d5eb44d439988e73f60089148)) + + +### Chores + +* preserve production workflow files ([edc85e4](https://github.com/RetellAI/retell-python-sdk/commit/edc85e4dd308870de5b06171bd4abe99e725c553)) + +## [5.60.0](https://github.com/RetellAI/retell-python-sdk/compare/v5.59.0...v5.60.0) (2026-08-01) + + +### Features + +* **api:** api update ([e66311e](https://github.com/RetellAI/retell-python-sdk/commit/e66311ebe5bb4bc4cc341300afda4ce81153b94b)) + + +### Chores + +* preserve production workflow files ([b6a1838](https://github.com/RetellAI/retell-python-sdk/commit/b6a1838e73af9e12acc8b90fc88be38e272f2bf4)) + +## [5.59.0](https://github.com/RetellAI/retell-python-sdk/compare/v5.58.0...v5.59.0) (2026-07-31) + + +### Features + +* **api:** api update ([8db3f55](https://github.com/RetellAI/retell-python-sdk/commit/8db3f557ba549de9a3c3adb8816ed982761647b1)) + + +### Chores + +* preserve production workflow files ([6064a87](https://github.com/RetellAI/retell-python-sdk/commit/6064a8718916e364934d1d033dc8b9c522612340)) + +## [5.58.0](https://github.com/RetellAI/retell-python-sdk/compare/v5.57.2...v5.58.0) (2026-07-30) + + +### Features + +* **sdks:** expose live updates and analysis reruns ([54996b1](https://github.com/RetellAI/retell-python-sdk/commit/54996b124d05717af5f4d6709994d69d18d9cec6)) + + +### Chores + +* preserve production workflow files ([924da2f](https://github.com/RetellAI/retell-python-sdk/commit/924da2f987e2dc50bef0226e32047ef9627eec81)) + +## [5.57.2](https://github.com/RetellAI/retell-python-sdk/compare/v5.57.1...v5.57.2) (2026-07-30) + + +### Bug Fixes + +* **webhooks:** harden signature verification ([#4](https://github.com/RetellAI/retell-python-sdk/issues/4)) ([6ec8602](https://github.com/RetellAI/retell-python-sdk/commit/6ec8602981e477cf9c4003384c5d9fc9cfb5aa57)) + + +### Chores + +* preserve production workflow files ([2e1ab60](https://github.com/RetellAI/retell-python-sdk/commit/2e1ab60af9a9662454271b3cdf91bec1d387335f)) + +## [5.57.1](https://github.com/RetellAI/retell-python-sdk/compare/v5.57.0...v5.57.1) (2026-07-30) + + +### Bug Fixes + +* **multipart:** use bare file array field names ([481281a](https://github.com/RetellAI/retell-python-sdk/commit/481281a29cfcdacc4935e0b813eb3a75f0def28c)) +* **multipart:** use bare file array field names ([377f072](https://github.com/RetellAI/retell-python-sdk/commit/377f0720ac978819f24e5ec0bf7f89ee34ec1844)) + + +### Chores + +* preserve production workflow files ([b255e7e](https://github.com/RetellAI/retell-python-sdk/commit/b255e7e5b3ad0cb95ad37150b0597b97a93c910f)) + +## [5.57.0](https://github.com/RetellAI/retell-python-sdk/compare/v5.56.1...v5.57.0) (2026-07-28) + + +### Features + +* **api:** api update ([626c03b](https://github.com/RetellAI/retell-python-sdk/commit/626c03be40dbde240f21bbc85512a9a289b13b2d)) + + +### Chores + +* preserve production workflow files ([c7945c6](https://github.com/RetellAI/retell-python-sdk/commit/c7945c6b8e6dd1f0cdc44ca7370f2e59dab695e6)) + +## [5.56.1](https://github.com/RetellAI/retell-python-sdk/compare/v5.56.0...v5.56.1) (2026-07-23) + + +### Chores + +* preserve production workflow files ([a16215b](https://github.com/RetellAI/retell-python-sdk/commit/a16215b2ebc789fcb2510b128c53277e198a425b)) + +## [5.56.0](https://github.com/RetellAI/retell-python-sdk/compare/v5.55.0...v5.56.0) (2026-07-22) + + +### Features + +* **api:** api update ([f73d299](https://github.com/RetellAI/retell-python-sdk/commit/f73d2993321831cc7d41d6b0e2bf0ec338cdd743)) + + +### Chores + +* preserve production workflow files ([325aa95](https://github.com/RetellAI/retell-python-sdk/commit/325aa95896b6c5621340dba412806752fadca5d7)) + +## [5.55.0](https://github.com/RetellAI/retell-python-sdk/compare/v5.54.0...v5.55.0) (2026-07-09) + + +### Features + +* **api:** api update ([831f27d](https://github.com/RetellAI/retell-python-sdk/commit/831f27d873ce6eff926d370d751fdc4c1584d45f)) + + +### Chores + +* preserve production workflow files ([d2ceaf3](https://github.com/RetellAI/retell-python-sdk/commit/d2ceaf3bcadb016214205446c365ee565aac49f9)) + +## [5.54.0](https://github.com/RetellAI/retell-python-sdk/compare/v5.53.0...v5.54.0) (2026-07-08) + + +### Features + +* **api:** api update ([e7e729f](https://github.com/RetellAI/retell-python-sdk/commit/e7e729fc17e4d264a22142eaf26d405cfd6593aa)) +* **api:** api update ([dfce78e](https://github.com/RetellAI/retell-python-sdk/commit/dfce78e5398a5c0ec272b3852598770b40c7204c)) +* **api:** api update ([4dc0a99](https://github.com/RetellAI/retell-python-sdk/commit/4dc0a990089765f8fc19c67bf886a64451fd9fc0)) +* **api:** api update ([a05cffa](https://github.com/RetellAI/retell-python-sdk/commit/a05cffacd3f4159c0cdeb8b02d8ee81b010a7fda)) +* **api:** api update ([9e80f55](https://github.com/RetellAI/retell-python-sdk/commit/9e80f556b2de52668b20bf9d30ced35ea4c9e337)) + + +### Chores + +* preserve production workflow files ([8683b11](https://github.com/RetellAI/retell-python-sdk/commit/8683b11151829ffa2179b286610cfaa4f488f854)) + +## [5.53.0](https://github.com/RetellAI/retell-python-sdk/compare/v5.52.0...v5.53.0) (2026-06-24) + + +### Features + +* **api:** api update ([36d42b3](https://github.com/RetellAI/retell-python-sdk/commit/36d42b3c8e89fe81b753bdfc3a31971febd3e1f4)) + + +### Chores + +* preserve production workflow files ([45d7aed](https://github.com/RetellAI/retell-python-sdk/commit/45d7aed33c6aaea6b9bdf9c152cfbb9270f7097d)) + +## [5.52.0](https://github.com/RetellAI/retell-python-sdk/compare/v5.51.0...v5.52.0) (2026-06-23) + + +### Features + +* **api:** api update ([8ce76d0](https://github.com/RetellAI/retell-python-sdk/commit/8ce76d0de39343ae3e83217f1a8f34dbff60b440)) + + +### Chores + +* preserve production workflow files ([5540212](https://github.com/RetellAI/retell-python-sdk/commit/5540212198562befd780b811a3aa9cb1d22ea0a0)) + +## [5.51.0](https://github.com/RetellAI/retell-python-sdk/compare/v5.50.0...v5.51.0) (2026-06-17) + + +### Features + +* **api:** api update ([73dec56](https://github.com/RetellAI/retell-python-sdk/commit/73dec56f49821452f30a7cd89c303f5505c16c4a)) + + +### Chores + +* preserve production workflow files ([09d57b1](https://github.com/RetellAI/retell-python-sdk/commit/09d57b17aa3af1462458321627f90c5c16410e4c)) + +## [5.50.0](https://github.com/RetellAI/retell-python-sdk/compare/v5.49.0...v5.50.0) (2026-06-16) + + +### Features + +* **api:** api update ([91b673c](https://github.com/RetellAI/retell-python-sdk/commit/91b673c334463c107e36f7a1a5d8cde306a9f82a)) + + +### Chores + +* preserve production workflow files ([94c2f0d](https://github.com/RetellAI/retell-python-sdk/commit/94c2f0d4eb4c8e820676984beb3ac509c3bd60d6)) + +## [5.49.0](https://github.com/RetellAI/retell-python-sdk/compare/v5.48.0...v5.49.0) (2026-06-08) + + +### Features + +* **api:** api update ([0e6c50c](https://github.com/RetellAI/retell-python-sdk/commit/0e6c50c808e8b1d96d95462fac7d9538d22b7bd1)) + + +### Chores + +* preserve production workflow files ([c30cbb5](https://github.com/RetellAI/retell-python-sdk/commit/c30cbb563f3394750695a99381d2fb40cebb19b0)) + +## [5.48.0](https://github.com/RetellAI/retell-python-sdk/compare/v5.47.0...v5.48.0) (2026-06-04) + + +### Features + +* **api:** api update ([0922f59](https://github.com/RetellAI/retell-python-sdk/commit/0922f592d548608dee1f563f927cdcf47b7df267)) + + +### Chores + +* preserve production workflow files ([3453b45](https://github.com/RetellAI/retell-python-sdk/commit/3453b45bf8185d3c293702310357dd38260dff11)) + +## [5.47.0](https://github.com/RetellAI/retell-python-sdk/compare/v5.46.0...v5.47.0) (2026-06-04) + + +### Features + +* **api:** api update ([346634f](https://github.com/RetellAI/retell-python-sdk/commit/346634f3547846366a241260f4585f776bad8cc5)) + + +### Chores + +* preserve production workflow files ([2e271d2](https://github.com/RetellAI/retell-python-sdk/commit/2e271d2bb76823939dc1dcff62a9fa484204bf1a)) + +## [5.46.0](https://github.com/RetellAI/retell-python-sdk/compare/v5.45.3...v5.46.0) (2026-06-03) + + +### Features + +* **api:** api update ([e8599c9](https://github.com/RetellAI/retell-python-sdk/commit/e8599c933355aef8b1ec14e264cc151be3d742fe)) + + +### Chores + +* preserve production workflow files ([02fb027](https://github.com/RetellAI/retell-python-sdk/commit/02fb027422e35b17bc2b849b4f071891ed568240)) + +## [5.45.3](https://github.com/RetellAI/retell-python-sdk/compare/v5.45.2...v5.45.3) (2026-06-01) + + +### Chores + +* preserve production workflow files ([796a30b](https://github.com/RetellAI/retell-python-sdk/commit/796a30b644e349ffd5ca2115e150905c9b16ae06)) + +## [5.45.2](https://github.com/RetellAI/retell-python-sdk/compare/v5.45.1...v5.45.2) (2026-06-01) + + +### Chores + +* preserve production workflow files ([2873729](https://github.com/RetellAI/retell-python-sdk/commit/28737294ed63d5f974ff3dc930db9a7fb2ec50b3)) + + +### Documentation + +* fix OpenAPI phone number description typo ([967f88b](https://github.com/RetellAI/retell-python-sdk/commit/967f88bbb7fd117fc24a8cd9c7c8416eaa6ba51a)) + +## [5.45.1](https://github.com/RetellAI/retell-python-sdk/compare/v5.45.0...v5.45.1) (2026-05-30) + + +### Bug Fixes + +* **api:** clarify inbound webhook description ([9638b62](https://github.com/RetellAI/retell-python-sdk/commit/9638b626e6f5d406423c888bb0395c45327673fb)) + + +### Chores + +* preserve production workflow files ([4bed949](https://github.com/RetellAI/retell-python-sdk/commit/4bed9492d6abaa99b1bb5c45d8ebb2d46cecc8b4)) + +## [5.45.0](https://github.com/RetellAI/retell-python-sdk/compare/v5.44.1...v5.45.0) (2026-05-29) + + +### Features + +* **api:** api update ([2f12990](https://github.com/RetellAI/retell-python-sdk/commit/2f12990411eddc2e1d584266b5787e9a38f54ae1)) + + +### Chores + +* preserve production workflow files ([8e839ba](https://github.com/RetellAI/retell-python-sdk/commit/8e839bae64ec3a2b4e61a196ca772c6695014dfc)) + +## [5.44.1](https://github.com/RetellAI/retell-python-sdk/compare/v5.44.0...v5.44.1) (2026-05-29) + + +### Chores + +* restore stlc auto-merge triggers ([5f38f95](https://github.com/RetellAI/retell-python-sdk/commit/5f38f95c5a65f79aedc16da6277c8800f4d05ffc)) + +## 5.44.0 (2026-05-29) + +Full Changelog: [v5.43.1...v5.44.0](https://github.com/RetellAI/retell-python-sdk/compare/v5.43.1...v5.44.0) + +### Features + +* **api:** api update ([a559d90](https://github.com/RetellAI/retell-python-sdk/commit/a559d9031cc2e111ae02a19ce988b8042c137526)) + + +### Chores + +* disable stlc auto-merge workflow ([83fc966](https://github.com/RetellAI/retell-python-sdk/commit/83fc96699b82d56652355396723f52caeb837842)) + +## 5.43.1 (2026-05-29) + +Full Changelog: [v5.43.0...v5.43.1](https://github.com/RetellAI/retell-python-sdk/compare/v5.43.0...v5.43.1) + +### Chores + +* add release-please workflow ([2ded49b](https://github.com/RetellAI/retell-python-sdk/commit/2ded49be02e1471bef0968f422c1cbf19314119b)) +* add SDK auto-merge workflow ([0966b89](https://github.com/RetellAI/retell-python-sdk/commit/0966b89b08dcb1ab507511b480270961bf8332b0)) +* harden SDK auto-merge workflow ([be57a3f](https://github.com/RetellAI/retell-python-sdk/commit/be57a3f70524d1f4bad69b37b73b383efb4c48d6)) +* restrict SDK auto-merge to same-repo branches ([4644075](https://github.com/RetellAI/retell-python-sdk/commit/4644075b17cc17443e67bc8fafa3ffe8e0e65e85)) + ## 5.43.0 (2026-05-28) Full Changelog: [v5.42.0...v5.43.0](https://github.com/RetellAI/retell-python-sdk/compare/v5.42.0...v5.43.0) diff --git a/pyproject.toml b/pyproject.toml index 0e3f0751..2b7e2b27 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "retell-sdk" -version = "5.43.0" +version = "6.2.10" description = "The official Python library for the retell API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/retell/_version.py b/src/retell/_version.py index a74ec2af..2402bdaf 100644 --- a/src/retell/_version.py +++ b/src/retell/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "retell" -__version__ = "5.43.0" # x-release-please-version +__version__ = "6.2.10" # x-release-please-version