diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 3bb35cb9..69ec944d 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "5.41.0" + ".": "5.42.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 2046a177..af1a94f5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 78 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/retell/retell-adebb862ab8e9696e1ddf4d31eca1083463b0c0f394beac34fdd68b1eda50692.yml -openapi_spec_hash: 0b21f22e97c2740d2402c697d933dbd7 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/retell/retell-333e5bbb4a130497aa1d6aa11ecc36526bf9a519ac72ec8c8e11b30bae0f37e2.yml +openapi_spec_hash: 82a6ba7edd83f02038df58abfa4a30bf config_hash: c623d861855875b89ec85b087daf7f22 diff --git a/CHANGELOG.md b/CHANGELOG.md index ffc77fc6..7532d114 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 5.42.0 (2026-05-28) + +Full Changelog: [v5.41.0...v5.42.0](https://github.com/RetellAI/retell-python-sdk/compare/v5.41.0...v5.42.0) + +### Features + +* **api:** api update ([613e4a7](https://github.com/RetellAI/retell-python-sdk/commit/613e4a75204e6858e2e609c1b41bac17c512f746)) + ## 5.41.0 (2026-05-21) Full Changelog: [v5.40.0...v5.41.0](https://github.com/RetellAI/retell-python-sdk/compare/v5.40.0...v5.41.0) diff --git a/pyproject.toml b/pyproject.toml index 71adb380..a02b6636 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "retell-sdk" -version = "5.41.0" +version = "5.42.0" 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 f43a4665..07c0adaa 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.41.0" # x-release-please-version +__version__ = "5.42.0" # x-release-please-version diff --git a/src/retell/resources/agent.py b/src/retell/resources/agent.py index 84043b0f..010b1e8f 100644 --- a/src/retell/resources/agent.py +++ b/src/retell/resources/agent.py @@ -391,7 +391,7 @@ def create( boosted_keywords: Provide a customized list of keywords to bias the transcriber model, so that these words are more likely to get transcribed. Commonly used for names, brands, - street, etc. + street, etc. Entries may reference dynamic variables with `{{variable}}` syntax. call_screening_option: If this option is set, the agent prompt will include call screen handling instructions for identity and call purpose questions. Set this to null to @@ -1011,7 +1011,7 @@ def update( boosted_keywords: Provide a customized list of keywords to bias the transcriber model, so that these words are more likely to get transcribed. Commonly used for names, brands, - street, etc. + street, etc. Entries may reference dynamic variables with `{{variable}}` syntax. call_screening_option: If this option is set, the agent prompt will include call screen handling instructions for identity and call purpose questions. Set this to null to @@ -1881,7 +1881,7 @@ async def create( boosted_keywords: Provide a customized list of keywords to bias the transcriber model, so that these words are more likely to get transcribed. Commonly used for names, brands, - street, etc. + street, etc. Entries may reference dynamic variables with `{{variable}}` syntax. call_screening_option: If this option is set, the agent prompt will include call screen handling instructions for identity and call purpose questions. Set this to null to @@ -2501,7 +2501,7 @@ async def update( boosted_keywords: Provide a customized list of keywords to bias the transcriber model, so that these words are more likely to get transcribed. Commonly used for names, brands, - street, etc. + street, etc. Entries may reference dynamic variables with `{{variable}}` syntax. call_screening_option: If this option is set, the agent prompt will include call screen handling instructions for identity and call purpose questions. Set this to null to diff --git a/src/retell/resources/call.py b/src/retell/resources/call.py index 7507c9b8..a6869d38 100644 --- a/src/retell/resources/call.py +++ b/src/retell/resources/call.py @@ -120,7 +120,7 @@ def update( your internal customer id associated with the call. Not used for processing. You can later get this field from the call object. Size limited to 50kB max. - override_dynamic_variables: Override dynamic varaibles represented as key-value pairs of strings. Setting + override_dynamic_variables: Override dynamic variables represented as key-value pairs of strings. Setting this will override or add the dynamic variables set in the agent during the call. Only need to set the delta where you want to override, no need to set the entire dynamic variables object. Setting this to null will remove any existing @@ -610,7 +610,7 @@ async def update( your internal customer id associated with the call. Not used for processing. You can later get this field from the call object. Size limited to 50kB max. - override_dynamic_variables: Override dynamic varaibles represented as key-value pairs of strings. Setting + override_dynamic_variables: Override dynamic variables represented as key-value pairs of strings. Setting this will override or add the dynamic variables set in the agent during the call. Only need to set the delta where you want to override, no need to set the entire dynamic variables object. Setting this to null will remove any existing diff --git a/src/retell/resources/chat.py b/src/retell/resources/chat.py index 6a47d8ce..0e9c59b5 100644 --- a/src/retell/resources/chat.py +++ b/src/retell/resources/chat.py @@ -171,7 +171,7 @@ def update( your internal customer id associated with the chat. Not used for processing. You can later get this field from the chat object. Size limited to 50kB max. - override_dynamic_variables: Override dynamic varaibles represented as key-value pairs of strings. Setting + override_dynamic_variables: Override dynamic variables represented as key-value pairs of strings. Setting this will override or add the dynamic variables set in the agent during the call. Only need to set the delta where you want to override, no need to set the entire dynamic variables object. Setting this to null will remove any existing @@ -207,7 +207,7 @@ def update( def list( self, *, - filter_criteria: object | Omit = omit, + filter_criteria: chat_list_params.FilterCriteria | Omit = omit, include_total: bool | Omit = omit, limit: int | Omit = omit, pagination_key: str | Omit = omit, @@ -589,7 +589,7 @@ async def update( your internal customer id associated with the chat. Not used for processing. You can later get this field from the chat object. Size limited to 50kB max. - override_dynamic_variables: Override dynamic varaibles represented as key-value pairs of strings. Setting + override_dynamic_variables: Override dynamic variables represented as key-value pairs of strings. Setting this will override or add the dynamic variables set in the agent during the call. Only need to set the delta where you want to override, no need to set the entire dynamic variables object. Setting this to null will remove any existing @@ -625,7 +625,7 @@ async def update( async def list( self, *, - filter_criteria: object | Omit = omit, + filter_criteria: chat_list_params.FilterCriteria | Omit = omit, include_total: bool | Omit = omit, limit: int | Omit = omit, pagination_key: str | Omit = omit, diff --git a/src/retell/types/agent_create_params.py b/src/retell/types/agent_create_params.py index a31f7ee4..9d9360e5 100644 --- a/src/retell/types/agent_create_params.py +++ b/src/retell/types/agent_create_params.py @@ -148,7 +148,7 @@ class AgentCreateParams(TypedDict, total=False): """ Provide a customized list of keywords to bias the transcriber model, so that these words are more likely to get transcribed. Commonly used for names, brands, - street, etc. + street, etc. Entries may reference dynamic variables with `{{variable}}` syntax. """ call_screening_option: Optional[CallScreeningOption] diff --git a/src/retell/types/agent_response.py b/src/retell/types/agent_response.py index d5629678..fabc7772 100644 --- a/src/retell/types/agent_response.py +++ b/src/retell/types/agent_response.py @@ -571,7 +571,7 @@ class AgentResponse(BaseModel): """ Provide a customized list of keywords to bias the transcriber model, so that these words are more likely to get transcribed. Commonly used for names, brands, - street, etc. + street, etc. Entries may reference dynamic variables with `{{variable}}` syntax. """ call_screening_option: Optional[CallScreeningOption] = None diff --git a/src/retell/types/agent_update_params.py b/src/retell/types/agent_update_params.py index 3a29af56..b54567ee 100644 --- a/src/retell/types/agent_update_params.py +++ b/src/retell/types/agent_update_params.py @@ -138,7 +138,7 @@ class AgentUpdateParams(TypedDict, total=False): """ Provide a customized list of keywords to bias the transcriber model, so that these words are more likely to get transcribed. Commonly used for names, brands, - street, etc. + street, etc. Entries may reference dynamic variables with `{{variable}}` syntax. """ call_screening_option: Optional[CallScreeningOption] diff --git a/src/retell/types/batch_call_create_batch_call_params.py b/src/retell/types/batch_call_create_batch_call_params.py index 81c9e84a..af6d3c35 100644 --- a/src/retell/types/batch_call_create_batch_call_params.py +++ b/src/retell/types/batch_call_create_batch_call_params.py @@ -598,7 +598,7 @@ class TaskAgentOverrideAgent(TypedDict, total=False): """ Provide a customized list of keywords to bias the transcriber model, so that these words are more likely to get transcribed. Commonly used for names, brands, - street, etc. + street, etc. Entries may reference dynamic variables with `{{variable}}` syntax. """ call_screening_option: Optional[TaskAgentOverrideAgentCallScreeningOption] diff --git a/src/retell/types/call_create_phone_call_params.py b/src/retell/types/call_create_phone_call_params.py index ed5105c5..6950b6b0 100644 --- a/src/retell/types/call_create_phone_call_params.py +++ b/src/retell/types/call_create_phone_call_params.py @@ -617,7 +617,7 @@ class AgentOverrideAgent(TypedDict, total=False): """ Provide a customized list of keywords to bias the transcriber model, so that these words are more likely to get transcribed. Commonly used for names, brands, - street, etc. + street, etc. Entries may reference dynamic variables with `{{variable}}` syntax. """ call_screening_option: Optional[AgentOverrideAgentCallScreeningOption] diff --git a/src/retell/types/call_create_web_call_params.py b/src/retell/types/call_create_web_call_params.py index 1266733c..e56134a0 100644 --- a/src/retell/types/call_create_web_call_params.py +++ b/src/retell/types/call_create_web_call_params.py @@ -604,7 +604,7 @@ class AgentOverrideAgent(TypedDict, total=False): """ Provide a customized list of keywords to bias the transcriber model, so that these words are more likely to get transcribed. Commonly used for names, brands, - street, etc. + street, etc. Entries may reference dynamic variables with `{{variable}}` syntax. """ call_screening_option: Optional[AgentOverrideAgentCallScreeningOption] diff --git a/src/retell/types/call_list_params.py b/src/retell/types/call_list_params.py index 6872f919..936afa01 100644 --- a/src/retell/types/call_list_params.py +++ b/src/retell/types/call_list_params.py @@ -379,6 +379,7 @@ class FilterCriteriaDisconnectionReason(TypedDict, total=False): "inactivity", "max_duration_reached", "concurrency_limit_reached", + "no_concurrency_fallback", "no_valid_payment", "scam_detected", "dial_busy", diff --git a/src/retell/types/call_list_response.py b/src/retell/types/call_list_response.py index 6362fec8..d19cf894 100644 --- a/src/retell/types/call_list_response.py +++ b/src/retell/types/call_list_response.py @@ -444,6 +444,7 @@ class ItemV3WebCallResponse(BaseModel): "inactivity", "max_duration_reached", "concurrency_limit_reached", + "no_concurrency_fallback", "no_valid_payment", "scam_detected", "dial_busy", @@ -996,6 +997,7 @@ class ItemV3PhoneCallResponse(BaseModel): "inactivity", "max_duration_reached", "concurrency_limit_reached", + "no_concurrency_fallback", "no_valid_payment", "scam_detected", "dial_busy", diff --git a/src/retell/types/call_register_phone_call_params.py b/src/retell/types/call_register_phone_call_params.py index f7596761..ae387df0 100644 --- a/src/retell/types/call_register_phone_call_params.py +++ b/src/retell/types/call_register_phone_call_params.py @@ -595,7 +595,7 @@ class AgentOverrideAgent(TypedDict, total=False): """ Provide a customized list of keywords to bias the transcriber model, so that these words are more likely to get transcribed. Commonly used for names, brands, - street, etc. + street, etc. Entries may reference dynamic variables with `{{variable}}` syntax. """ call_screening_option: Optional[AgentOverrideAgentCallScreeningOption] diff --git a/src/retell/types/call_update_params.py b/src/retell/types/call_update_params.py index 3372d149..b7520a72 100644 --- a/src/retell/types/call_update_params.py +++ b/src/retell/types/call_update_params.py @@ -30,7 +30,7 @@ class CallUpdateParams(TypedDict, total=False): """ override_dynamic_variables: Optional[Dict[str, str]] - """Override dynamic varaibles represented as key-value pairs of strings. + """Override dynamic variables represented as key-value pairs of strings. Setting this will override or add the dynamic variables set in the agent during the call. Only need to set the delta where you want to override, no need to set diff --git a/src/retell/types/chat_list_params.py b/src/retell/types/chat_list_params.py index 51bb22b3..72f71eaa 100644 --- a/src/retell/types/chat_list_params.py +++ b/src/retell/types/chat_list_params.py @@ -2,13 +2,51 @@ from __future__ import annotations -from typing_extensions import Literal, TypedDict +from typing import List, Union, Iterable +from typing_extensions import Literal, Required, TypeAlias, TypedDict -__all__ = ["ChatListParams"] +from .._types import SequenceNotStr + +__all__ = [ + "ChatListParams", + "FilterCriteria", + "FilterCriteriaAgent", + "FilterCriteriaChatID", + "FilterCriteriaChatStatus", + "FilterCriteriaChatSuccessful", + "FilterCriteriaCombinedCost", + "FilterCriteriaCombinedCostNumberFilter", + "FilterCriteriaCombinedCostRangeFilter", + "FilterCriteriaCustomAnalysisData", + "FilterCriteriaCustomAnalysisDataStringFilter", + "FilterCriteriaCustomAnalysisDataNumberFilter", + "FilterCriteriaCustomAnalysisDataBooleanFilter", + "FilterCriteriaCustomAnalysisDataRangeFilter", + "FilterCriteriaCustomAnalysisDataEnumFilter", + "FilterCriteriaCustomAnalysisDataPresentFilter", + "FilterCriteriaCustomAttribute", + "FilterCriteriaCustomAttributeStringFilter", + "FilterCriteriaCustomAttributeNumberFilter", + "FilterCriteriaCustomAttributeBooleanFilter", + "FilterCriteriaCustomAttributeRangeFilter", + "FilterCriteriaCustomAttributeEnumFilter", + "FilterCriteriaCustomAttributePresentFilter", + "FilterCriteriaDisconnectionReason", + "FilterCriteriaDurationMs", + "FilterCriteriaDurationMsNumberFilter", + "FilterCriteriaDurationMsRangeFilter", + "FilterCriteriaEndTimestamp", + "FilterCriteriaEndTimestampNumberFilter", + "FilterCriteriaEndTimestampRangeFilter", + "FilterCriteriaStartTimestamp", + "FilterCriteriaStartTimestampNumberFilter", + "FilterCriteriaStartTimestampRangeFilter", + "FilterCriteriaUserSentiment", +] class ChatListParams(TypedDict, total=False): - filter_criteria: object + filter_criteria: FilterCriteria """Filter criteria for chats to retrieve.""" include_total: bool @@ -30,3 +68,406 @@ class ChatListParams(TypedDict, total=False): sort_order: Literal["ascending", "descending"] """Sort chats by `start_timestamp` in ascending or descending order.""" + + +class FilterCriteriaAgent(TypedDict, total=False): + agent_id: Required[str] + """The agent ID to filter on.""" + + version: Iterable[float] + """Specific versions to filter on. If not provided, all versions are included.""" + + +class FilterCriteriaChatID(TypedDict, total=False): + """Filter by chat ID.""" + + op: Required[Literal["eq", "ne", "sw", "ew", "co"]] + """eq: equal, ne: not equal, sw: starts with, ew: ends with, co: contains""" + + type: Required[Literal["string"]] + + value: Required[str] + + +class FilterCriteriaChatStatus(TypedDict, total=False): + op: Required[Literal["in"]] + """in: value is one of the listed values""" + + type: Required[Literal["enum"]] + + value: Required[List[Literal["ongoing", "ended", "error"]]] + + +class FilterCriteriaChatSuccessful(TypedDict, total=False): + """Filter by whether the chat was successful.""" + + op: Required[Literal["eq"]] + + type: Required[Literal["boolean"]] + + value: Required[bool] + + +class FilterCriteriaCombinedCostNumberFilter(TypedDict, total=False): + op: Required[Literal["eq", "ne", "gt", "ge", "lt", "le"]] + """ + eq: equal, ne: not equal, gt: greater than, ge: greater than or equal, lt: less + than, le: less than or equal + """ + + type: Required[Literal["number"]] + + value: Required[float] + + +class FilterCriteriaCombinedCostRangeFilter(TypedDict, total=False): + op: Required[Literal["bt"]] + """bt: between""" + + type: Required[Literal["range"]] + + value: Required[Iterable[float]] + """[lower_bound, upper_bound]""" + + +FilterCriteriaCombinedCost: TypeAlias = Union[ + FilterCriteriaCombinedCostNumberFilter, FilterCriteriaCombinedCostRangeFilter +] + + +class FilterCriteriaCustomAnalysisDataStringFilter(TypedDict, total=False): + op: Required[Literal["eq", "ne", "sw", "ew", "co"]] + """eq: equal, ne: not equal, sw: starts with, ew: ends with, co: contains""" + + type: Required[Literal["string"]] + + value: Required[str] + + key: str + """The field name to filter on.""" + + +class FilterCriteriaCustomAnalysisDataNumberFilter(TypedDict, total=False): + op: Required[Literal["eq", "ne", "gt", "ge", "lt", "le"]] + """ + eq: equal, ne: not equal, gt: greater than, ge: greater than or equal, lt: less + than, le: less than or equal + """ + + type: Required[Literal["number"]] + + value: Required[float] + + key: str + """The field name to filter on.""" + + +class FilterCriteriaCustomAnalysisDataBooleanFilter(TypedDict, total=False): + op: Required[Literal["eq"]] + + type: Required[Literal["boolean"]] + + value: Required[bool] + + key: str + """The field name to filter on.""" + + +class FilterCriteriaCustomAnalysisDataRangeFilter(TypedDict, total=False): + op: Required[Literal["bt"]] + """bt: between""" + + type: Required[Literal["range"]] + + value: Required[Iterable[float]] + """[lower_bound, upper_bound]""" + + key: str + """The field name to filter on.""" + + +class FilterCriteriaCustomAnalysisDataEnumFilter(TypedDict, total=False): + op: Required[Literal["in"]] + """in: value is one of the listed values""" + + type: Required[Literal["enum"]] + + value: Required[SequenceNotStr[str]] + + key: str + """The field name to filter on.""" + + +class FilterCriteriaCustomAnalysisDataPresentFilter(TypedDict, total=False): + op: Required[Literal["pr", "np"]] + """pr: present (has value), np: not present""" + + type: Required[Literal["present"]] + + key: str + """The field name to filter on.""" + + +FilterCriteriaCustomAnalysisData: TypeAlias = Union[ + FilterCriteriaCustomAnalysisDataStringFilter, + FilterCriteriaCustomAnalysisDataNumberFilter, + FilterCriteriaCustomAnalysisDataBooleanFilter, + FilterCriteriaCustomAnalysisDataRangeFilter, + FilterCriteriaCustomAnalysisDataEnumFilter, + FilterCriteriaCustomAnalysisDataPresentFilter, +] + + +class FilterCriteriaCustomAttributeStringFilter(TypedDict, total=False): + op: Required[Literal["eq", "ne", "sw", "ew", "co"]] + """eq: equal, ne: not equal, sw: starts with, ew: ends with, co: contains""" + + type: Required[Literal["string"]] + + value: Required[str] + + key: str + """The field name to filter on.""" + + +class FilterCriteriaCustomAttributeNumberFilter(TypedDict, total=False): + op: Required[Literal["eq", "ne", "gt", "ge", "lt", "le"]] + """ + eq: equal, ne: not equal, gt: greater than, ge: greater than or equal, lt: less + than, le: less than or equal + """ + + type: Required[Literal["number"]] + + value: Required[float] + + key: str + """The field name to filter on.""" + + +class FilterCriteriaCustomAttributeBooleanFilter(TypedDict, total=False): + op: Required[Literal["eq"]] + + type: Required[Literal["boolean"]] + + value: Required[bool] + + key: str + """The field name to filter on.""" + + +class FilterCriteriaCustomAttributeRangeFilter(TypedDict, total=False): + op: Required[Literal["bt"]] + """bt: between""" + + type: Required[Literal["range"]] + + value: Required[Iterable[float]] + """[lower_bound, upper_bound]""" + + key: str + """The field name to filter on.""" + + +class FilterCriteriaCustomAttributeEnumFilter(TypedDict, total=False): + op: Required[Literal["in"]] + """in: value is one of the listed values""" + + type: Required[Literal["enum"]] + + value: Required[SequenceNotStr[str]] + + key: str + """The field name to filter on.""" + + +class FilterCriteriaCustomAttributePresentFilter(TypedDict, total=False): + op: Required[Literal["pr", "np"]] + """pr: present (has value), np: not present""" + + type: Required[Literal["present"]] + + key: str + """The field name to filter on.""" + + +FilterCriteriaCustomAttribute: TypeAlias = Union[ + FilterCriteriaCustomAttributeStringFilter, + FilterCriteriaCustomAttributeNumberFilter, + FilterCriteriaCustomAttributeBooleanFilter, + FilterCriteriaCustomAttributeRangeFilter, + FilterCriteriaCustomAttributeEnumFilter, + FilterCriteriaCustomAttributePresentFilter, +] + + +class FilterCriteriaDisconnectionReason(TypedDict, total=False): + op: Required[Literal["in"]] + """in: value is one of the listed values""" + + type: Required[Literal["enum"]] + + value: Required[ + List[ + Literal[ + "user_hangup", + "agent_hangup", + "call_transfer", + "voicemail_reached", + "ivr_reached", + "inactivity", + "max_duration_reached", + "concurrency_limit_reached", + "no_concurrency_fallback", + "no_valid_payment", + "scam_detected", + "dial_busy", + "dial_failed", + "dial_no_answer", + "invalid_destination", + "telephony_provider_permission_denied", + "telephony_provider_unavailable", + "sip_routing_error", + "marked_as_spam", + "user_declined", + "error_llm_websocket_open", + "error_llm_websocket_lost_connection", + "error_llm_websocket_runtime", + "error_llm_websocket_corrupt_payload", + "error_no_audio_received", + "error_asr", + "error_retell", + "error_unknown", + "error_user_not_joined", + "registered_call_timeout", + "transfer_bridged", + "transfer_cancelled", + "manual_stopped", + ] + ] + ] + + +class FilterCriteriaDurationMsNumberFilter(TypedDict, total=False): + op: Required[Literal["eq", "ne", "gt", "ge", "lt", "le"]] + """ + eq: equal, ne: not equal, gt: greater than, ge: greater than or equal, lt: less + than, le: less than or equal + """ + + type: Required[Literal["number"]] + + value: Required[float] + + +class FilterCriteriaDurationMsRangeFilter(TypedDict, total=False): + op: Required[Literal["bt"]] + """bt: between""" + + type: Required[Literal["range"]] + + value: Required[Iterable[float]] + """[lower_bound, upper_bound]""" + + +FilterCriteriaDurationMs: TypeAlias = Union[FilterCriteriaDurationMsNumberFilter, FilterCriteriaDurationMsRangeFilter] + + +class FilterCriteriaEndTimestampNumberFilter(TypedDict, total=False): + op: Required[Literal["eq", "ne", "gt", "ge", "lt", "le"]] + """ + eq: equal, ne: not equal, gt: greater than, ge: greater than or equal, lt: less + than, le: less than or equal + """ + + type: Required[Literal["number"]] + + value: Required[float] + + +class FilterCriteriaEndTimestampRangeFilter(TypedDict, total=False): + op: Required[Literal["bt"]] + """bt: between""" + + type: Required[Literal["range"]] + + value: Required[Iterable[float]] + """[lower_bound, upper_bound]""" + + +FilterCriteriaEndTimestamp: TypeAlias = Union[ + FilterCriteriaEndTimestampNumberFilter, FilterCriteriaEndTimestampRangeFilter +] + + +class FilterCriteriaStartTimestampNumberFilter(TypedDict, total=False): + op: Required[Literal["eq", "ne", "gt", "ge", "lt", "le"]] + """ + eq: equal, ne: not equal, gt: greater than, ge: greater than or equal, lt: less + than, le: less than or equal + """ + + type: Required[Literal["number"]] + + value: Required[float] + + +class FilterCriteriaStartTimestampRangeFilter(TypedDict, total=False): + op: Required[Literal["bt"]] + """bt: between""" + + type: Required[Literal["range"]] + + value: Required[Iterable[float]] + """[lower_bound, upper_bound]""" + + +FilterCriteriaStartTimestamp: TypeAlias = Union[ + FilterCriteriaStartTimestampNumberFilter, FilterCriteriaStartTimestampRangeFilter +] + + +class FilterCriteriaUserSentiment(TypedDict, total=False): + op: Required[Literal["in"]] + """in: value is one of the listed values""" + + type: Required[Literal["enum"]] + + value: Required[List[Literal["Negative", "Positive", "Neutral", "Unknown"]]] + + +class FilterCriteria(TypedDict, total=False): + """Filter criteria for chats to retrieve.""" + + agent: Iterable[FilterCriteriaAgent] + """Filter by agent(s). Agent filters are connected by OR.""" + + chat_id: FilterCriteriaChatID + """Filter by chat ID.""" + + chat_status: FilterCriteriaChatStatus + + chat_successful: FilterCriteriaChatSuccessful + """Filter by whether the chat was successful.""" + + combined_cost: FilterCriteriaCombinedCost + """Filter by combined cost of the chat.""" + + custom_analysis_data: Iterable[FilterCriteriaCustomAnalysisData] + """Filter by custom analysis data fields.""" + + custom_attributes: Iterable[FilterCriteriaCustomAttribute] + """Filter by custom attributes fields.""" + + disconnection_reason: FilterCriteriaDisconnectionReason + + duration_ms: FilterCriteriaDurationMs + """Filter by chat duration in milliseconds.""" + + end_timestamp: FilterCriteriaEndTimestamp + """Filter by chat end timestamp (epoch ms).""" + + start_timestamp: FilterCriteriaStartTimestamp + """Filter by chat start timestamp (epoch ms).""" + + user_sentiment: FilterCriteriaUserSentiment diff --git a/src/retell/types/chat_update_params.py b/src/retell/types/chat_update_params.py index f4ca3254..e5e4f667 100644 --- a/src/retell/types/chat_update_params.py +++ b/src/retell/types/chat_update_params.py @@ -29,7 +29,7 @@ class ChatUpdateParams(TypedDict, total=False): """ override_dynamic_variables: Optional[Dict[str, str]] - """Override dynamic varaibles represented as key-value pairs of strings. + """Override dynamic variables represented as key-value pairs of strings. Setting this will override or add the dynamic variables set in the agent during the call. Only need to set the delta where you want to override, no need to set diff --git a/src/retell/types/concurrency_retrieve_response.py b/src/retell/types/concurrency_retrieve_response.py index 5ecef6db..d51838a6 100644 --- a/src/retell/types/concurrency_retrieve_response.py +++ b/src/retell/types/concurrency_retrieve_response.py @@ -46,3 +46,6 @@ class ConcurrencyRetrieveResponse(BaseModel): This is the difference between `concurrency_purchase_limit` and `purchased_concurrency`. """ + + reserved_inbound_concurrency: Optional[int] = None + """Number of normal concurrency slots reserved for inbound calls.""" diff --git a/src/retell/types/conversation_flow_component_create_params.py b/src/retell/types/conversation_flow_component_create_params.py index b691f03c..af2b0c2b 100644 --- a/src/retell/types/conversation_flow_component_create_params.py +++ b/src/retell/types/conversation_flow_component_create_params.py @@ -2483,6 +2483,12 @@ class NodeSubagentNodeToolExtractDynamicVariableTool(TypedDict, total=False): variables: Required[Iterable[NodeSubagentNodeToolExtractDynamicVariableToolVariable]] """The variables to be extracted.""" + enable_typing_sound: bool + """ + If true, play a typing sound on the agent audio track while this tool is + executing. + """ + class NodeSubagentNodeToolBridgeTransferTool(TypedDict, total=False): name: Required[str] @@ -5769,6 +5775,9 @@ class NodeExtractDynamicVariablesNode(TypedDict, total=False): else_edge: NodeExtractDynamicVariablesNodeElseEdge + enable_typing_sound: bool + """If true, play a typing sound while this extract step executes.""" + finetune_transition_examples: Iterable[NodeExtractDynamicVariablesNodeFinetuneTransitionExample] global_node_setting: NodeExtractDynamicVariablesNodeGlobalNodeSetting diff --git a/src/retell/types/conversation_flow_component_response.py b/src/retell/types/conversation_flow_component_response.py index 2b501cc5..6ff9f9e1 100644 --- a/src/retell/types/conversation_flow_component_response.py +++ b/src/retell/types/conversation_flow_component_response.py @@ -2447,6 +2447,12 @@ class NodeSubagentNodeToolExtractDynamicVariableTool(BaseModel): variables: List[NodeSubagentNodeToolExtractDynamicVariableToolVariable] """The variables to be extracted.""" + enable_typing_sound: Optional[bool] = None + """ + If true, play a typing sound on the agent audio track while this tool is + executing. + """ + class NodeSubagentNodeToolBridgeTransferTool(BaseModel): name: str @@ -5679,6 +5685,9 @@ class NodeExtractDynamicVariablesNode(BaseModel): else_edge: Optional[NodeExtractDynamicVariablesNodeElseEdge] = None + enable_typing_sound: Optional[bool] = None + """If true, play a typing sound while this extract step executes.""" + finetune_transition_examples: Optional[List[NodeExtractDynamicVariablesNodeFinetuneTransitionExample]] = None global_node_setting: Optional[NodeExtractDynamicVariablesNodeGlobalNodeSetting] = None diff --git a/src/retell/types/conversation_flow_component_update_params.py b/src/retell/types/conversation_flow_component_update_params.py index 8bb520e4..b9320eff 100644 --- a/src/retell/types/conversation_flow_component_update_params.py +++ b/src/retell/types/conversation_flow_component_update_params.py @@ -2510,6 +2510,12 @@ class NodeSubagentNodeToolExtractDynamicVariableTool(TypedDict, total=False): variables: Required[Iterable[NodeSubagentNodeToolExtractDynamicVariableToolVariable]] """The variables to be extracted.""" + enable_typing_sound: bool + """ + If true, play a typing sound on the agent audio track while this tool is + executing. + """ + class NodeSubagentNodeToolBridgeTransferTool(TypedDict, total=False): name: Required[str] @@ -5796,6 +5802,9 @@ class NodeExtractDynamicVariablesNode(TypedDict, total=False): else_edge: NodeExtractDynamicVariablesNodeElseEdge + enable_typing_sound: bool + """If true, play a typing sound while this extract step executes.""" + finetune_transition_examples: Iterable[NodeExtractDynamicVariablesNodeFinetuneTransitionExample] global_node_setting: NodeExtractDynamicVariablesNodeGlobalNodeSetting diff --git a/src/retell/types/conversation_flow_create_params.py b/src/retell/types/conversation_flow_create_params.py index 381ec70b..f858798e 100644 --- a/src/retell/types/conversation_flow_create_params.py +++ b/src/retell/types/conversation_flow_create_params.py @@ -3148,6 +3148,12 @@ class NodeSubagentNodeToolExtractDynamicVariableTool(TypedDict, total=False): variables: Required[Iterable[NodeSubagentNodeToolExtractDynamicVariableToolVariable]] """The variables to be extracted.""" + enable_typing_sound: bool + """ + If true, play a typing sound on the agent audio track while this tool is + executing. + """ + class NodeSubagentNodeToolBridgeTransferTool(TypedDict, total=False): name: Required[str] @@ -6434,6 +6440,9 @@ class NodeExtractDynamicVariablesNode(TypedDict, total=False): else_edge: NodeExtractDynamicVariablesNodeElseEdge + enable_typing_sound: bool + """If true, play a typing sound while this extract step executes.""" + finetune_transition_examples: Iterable[NodeExtractDynamicVariablesNodeFinetuneTransitionExample] global_node_setting: NodeExtractDynamicVariablesNodeGlobalNodeSetting @@ -9871,6 +9880,12 @@ class ComponentNodeSubagentNodeToolExtractDynamicVariableTool(TypedDict, total=F variables: Required[Iterable[ComponentNodeSubagentNodeToolExtractDynamicVariableToolVariable]] """The variables to be extracted.""" + enable_typing_sound: bool + """ + If true, play a typing sound on the agent audio track while this tool is + executing. + """ + class ComponentNodeSubagentNodeToolBridgeTransferTool(TypedDict, total=False): name: Required[str] @@ -13219,6 +13234,9 @@ class ComponentNodeExtractDynamicVariablesNode(TypedDict, total=False): else_edge: ComponentNodeExtractDynamicVariablesNodeElseEdge + enable_typing_sound: bool + """If true, play a typing sound while this extract step executes.""" + finetune_transition_examples: Iterable[ComponentNodeExtractDynamicVariablesNodeFinetuneTransitionExample] global_node_setting: ComponentNodeExtractDynamicVariablesNodeGlobalNodeSetting diff --git a/src/retell/types/conversation_flow_response.py b/src/retell/types/conversation_flow_response.py index f4595e03..f2f3be50 100644 --- a/src/retell/types/conversation_flow_response.py +++ b/src/retell/types/conversation_flow_response.py @@ -3051,6 +3051,12 @@ class ComponentNodeSubagentNodeToolExtractDynamicVariableTool(BaseModel): variables: List[ComponentNodeSubagentNodeToolExtractDynamicVariableToolVariable] """The variables to be extracted.""" + enable_typing_sound: Optional[bool] = None + """ + If true, play a typing sound on the agent audio track while this tool is + executing. + """ + class ComponentNodeSubagentNodeToolBridgeTransferTool(BaseModel): name: str @@ -6319,6 +6325,9 @@ class ComponentNodeExtractDynamicVariablesNode(BaseModel): else_edge: Optional[ComponentNodeExtractDynamicVariablesNodeElseEdge] = None + enable_typing_sound: Optional[bool] = None + """If true, play a typing sound while this extract step executes.""" + finetune_transition_examples: Optional[List[ComponentNodeExtractDynamicVariablesNodeFinetuneTransitionExample]] = ( None ) @@ -10077,6 +10086,12 @@ class NodeSubagentNodeToolExtractDynamicVariableTool(BaseModel): variables: List[NodeSubagentNodeToolExtractDynamicVariableToolVariable] """The variables to be extracted.""" + enable_typing_sound: Optional[bool] = None + """ + If true, play a typing sound on the agent audio track while this tool is + executing. + """ + class NodeSubagentNodeToolBridgeTransferTool(BaseModel): name: str @@ -13309,6 +13324,9 @@ class NodeExtractDynamicVariablesNode(BaseModel): else_edge: Optional[NodeExtractDynamicVariablesNodeElseEdge] = None + enable_typing_sound: Optional[bool] = None + """If true, play a typing sound while this extract step executes.""" + finetune_transition_examples: Optional[List[NodeExtractDynamicVariablesNodeFinetuneTransitionExample]] = None global_node_setting: Optional[NodeExtractDynamicVariablesNodeGlobalNodeSetting] = None diff --git a/src/retell/types/conversation_flow_update_params.py b/src/retell/types/conversation_flow_update_params.py index 7fb419e5..3046cb7f 100644 --- a/src/retell/types/conversation_flow_update_params.py +++ b/src/retell/types/conversation_flow_update_params.py @@ -3159,6 +3159,12 @@ class ComponentNodeSubagentNodeToolExtractDynamicVariableTool(TypedDict, total=F variables: Required[Iterable[ComponentNodeSubagentNodeToolExtractDynamicVariableToolVariable]] """The variables to be extracted.""" + enable_typing_sound: bool + """ + If true, play a typing sound on the agent audio track while this tool is + executing. + """ + class ComponentNodeSubagentNodeToolBridgeTransferTool(TypedDict, total=False): name: Required[str] @@ -6507,6 +6513,9 @@ class ComponentNodeExtractDynamicVariablesNode(TypedDict, total=False): else_edge: ComponentNodeExtractDynamicVariablesNodeElseEdge + enable_typing_sound: bool + """If true, play a typing sound while this extract step executes.""" + finetune_transition_examples: Iterable[ComponentNodeExtractDynamicVariablesNodeFinetuneTransitionExample] global_node_setting: ComponentNodeExtractDynamicVariablesNodeGlobalNodeSetting @@ -10313,6 +10322,12 @@ class NodeSubagentNodeToolExtractDynamicVariableTool(TypedDict, total=False): variables: Required[Iterable[NodeSubagentNodeToolExtractDynamicVariableToolVariable]] """The variables to be extracted.""" + enable_typing_sound: bool + """ + If true, play a typing sound on the agent audio track while this tool is + executing. + """ + class NodeSubagentNodeToolBridgeTransferTool(TypedDict, total=False): name: Required[str] @@ -13599,6 +13614,9 @@ class NodeExtractDynamicVariablesNode(TypedDict, total=False): else_edge: NodeExtractDynamicVariablesNodeElseEdge + enable_typing_sound: bool + """If true, play a typing sound while this extract step executes.""" + finetune_transition_examples: Iterable[NodeExtractDynamicVariablesNodeFinetuneTransitionExample] global_node_setting: NodeExtractDynamicVariablesNodeGlobalNodeSetting diff --git a/src/retell/types/llm_create_params.py b/src/retell/types/llm_create_params.py index afee632b..73ad1822 100644 --- a/src/retell/types/llm_create_params.py +++ b/src/retell/types/llm_create_params.py @@ -1137,6 +1137,12 @@ class GeneralToolExtractDynamicVariableTool(TypedDict, total=False): variables: Required[Iterable[GeneralToolExtractDynamicVariableToolVariable]] """The variables to be extracted.""" + enable_typing_sound: bool + """ + If true, play a typing sound on the agent audio track while this tool is + executing. + """ + class GeneralToolBridgeTransferTool(TypedDict, total=False): name: Required[str] @@ -2280,6 +2286,12 @@ class StateToolExtractDynamicVariableTool(TypedDict, total=False): variables: Required[Iterable[StateToolExtractDynamicVariableToolVariable]] """The variables to be extracted.""" + enable_typing_sound: bool + """ + If true, play a typing sound on the agent audio track while this tool is + executing. + """ + class StateToolBridgeTransferTool(TypedDict, total=False): name: Required[str] diff --git a/src/retell/types/llm_response.py b/src/retell/types/llm_response.py index 9b710abd..59fae0cf 100644 --- a/src/retell/types/llm_response.py +++ b/src/retell/types/llm_response.py @@ -1021,6 +1021,12 @@ class GeneralToolExtractDynamicVariableTool(BaseModel): variables: List[GeneralToolExtractDynamicVariableToolVariable] """The variables to be extracted.""" + enable_typing_sound: Optional[bool] = None + """ + If true, play a typing sound on the agent audio track while this tool is + executing. + """ + class GeneralToolBridgeTransferTool(BaseModel): name: str @@ -2166,6 +2172,12 @@ class StateToolExtractDynamicVariableTool(BaseModel): variables: List[StateToolExtractDynamicVariableToolVariable] """The variables to be extracted.""" + enable_typing_sound: Optional[bool] = None + """ + If true, play a typing sound on the agent audio track while this tool is + executing. + """ + class StateToolBridgeTransferTool(BaseModel): name: str diff --git a/src/retell/types/llm_update_params.py b/src/retell/types/llm_update_params.py index 5b45191a..cace3dd7 100644 --- a/src/retell/types/llm_update_params.py +++ b/src/retell/types/llm_update_params.py @@ -1140,6 +1140,12 @@ class GeneralToolExtractDynamicVariableTool(TypedDict, total=False): variables: Required[Iterable[GeneralToolExtractDynamicVariableToolVariable]] """The variables to be extracted.""" + enable_typing_sound: bool + """ + If true, play a typing sound on the agent audio track while this tool is + executing. + """ + class GeneralToolBridgeTransferTool(TypedDict, total=False): name: Required[str] @@ -2283,6 +2289,12 @@ class StateToolExtractDynamicVariableTool(TypedDict, total=False): variables: Required[Iterable[StateToolExtractDynamicVariableToolVariable]] """The variables to be extracted.""" + enable_typing_sound: bool + """ + If true, play a typing sound on the agent audio track while this tool is + executing. + """ + class StateToolBridgeTransferTool(TypedDict, total=False): name: Required[str] diff --git a/src/retell/types/phone_call_response.py b/src/retell/types/phone_call_response.py index b1dfefcc..f24d58a4 100644 --- a/src/retell/types/phone_call_response.py +++ b/src/retell/types/phone_call_response.py @@ -28,6 +28,7 @@ "ScrubbedTranscriptWithToolCallDtmfUtterance", "ScrubbedTranscriptWithToolCallSMSUtterance", "ScrubbedTranscriptWithToolCallSMSUtteranceMultimedia", + "ScrubbedTranscriptWithToolCallInjectedUtterance", "TelephonyIdentifier", "TranscriptObject", "TranscriptObjectWord", @@ -40,6 +41,7 @@ "TranscriptWithToolCallDtmfUtterance", "TranscriptWithToolCallSMSUtterance", "TranscriptWithToolCallSMSUtteranceMultimedia", + "TranscriptWithToolCallInjectedUtterance", ] @@ -511,6 +513,20 @@ class ScrubbedTranscriptWithToolCallSMSUtterance(BaseModel): """ +class ScrubbedTranscriptWithToolCallInjectedUtterance(BaseModel): + content: str + """The injected context text.""" + + role: Literal["injected"] + """External context injected into the conversation via the update-live-call API. + + Not spoken by either party. + """ + + time_sec: float + """Time the context was injected, in seconds relative to the start of the call.""" + + ScrubbedTranscriptWithToolCall: TypeAlias = Union[ ScrubbedTranscriptWithToolCallUtterance, ScrubbedTranscriptWithToolCallToolCallInvocationUtterance, @@ -518,6 +534,7 @@ class ScrubbedTranscriptWithToolCallSMSUtterance(BaseModel): ScrubbedTranscriptWithToolCallNodeTransitionUtterance, ScrubbedTranscriptWithToolCallDtmfUtterance, ScrubbedTranscriptWithToolCallSMSUtterance, + ScrubbedTranscriptWithToolCallInjectedUtterance, ] @@ -694,6 +711,20 @@ class TranscriptWithToolCallSMSUtterance(BaseModel): """ +class TranscriptWithToolCallInjectedUtterance(BaseModel): + content: str + """The injected context text.""" + + role: Literal["injected"] + """External context injected into the conversation via the update-live-call API. + + Not spoken by either party. + """ + + time_sec: float + """Time the context was injected, in seconds relative to the start of the call.""" + + TranscriptWithToolCall: TypeAlias = Union[ TranscriptWithToolCallUtterance, TranscriptWithToolCallToolCallInvocationUtterance, @@ -701,6 +732,7 @@ class TranscriptWithToolCallSMSUtterance(BaseModel): TranscriptWithToolCallNodeTransitionUtterance, TranscriptWithToolCallDtmfUtterance, TranscriptWithToolCallSMSUtterance, + TranscriptWithToolCallInjectedUtterance, ] @@ -776,6 +808,7 @@ class PhoneCallResponse(BaseModel): "inactivity", "max_duration_reached", "concurrency_limit_reached", + "no_concurrency_fallback", "no_valid_payment", "scam_detected", "dial_busy", diff --git a/src/retell/types/phone_number_create_params.py b/src/retell/types/phone_number_create_params.py index 923f790e..1d90ec08 100644 --- a/src/retell/types/phone_number_create_params.py +++ b/src/retell/types/phone_number_create_params.py @@ -99,11 +99,13 @@ class InboundAgent(TypedDict, total=False): """Agent version reference. Supports a numeric version (for example 3) or a tag/environment name (for - example "prod"). When a tag is provided, resolution uses that exact tag - assignment (including its dynamic variables). If the tag exists but is currently - unassigned, it resolves to latest. When a numeric version (or latest) is - provided, resolution applies dynamic variables from the preferred tag for that - resolved version (most recently assigned), if any. + example "prod"). The string "latest" resolves to the most recently created + version (the largest version number), and "latest_published" resolves to the + most recently published version. When a tag is provided, resolution uses that + exact tag assignment (including its dynamic variables). If the tag exists but is + currently unassigned, it resolves to latest. When a numeric version, latest, or + latest_published is provided, resolution applies dynamic variables from the + preferred tag for that resolved version (most recently assigned), if any. """ @@ -120,9 +122,11 @@ class OutboundAgent(TypedDict, total=False): """Agent version reference. Supports a numeric version (for example 3) or a tag/environment name (for - example "prod"). When a tag is provided, resolution uses that exact tag - assignment (including its dynamic variables). If the tag exists but is currently - unassigned, it resolves to latest. When a numeric version (or latest) is - provided, resolution applies dynamic variables from the preferred tag for that - resolved version (most recently assigned), if any. + example "prod"). The string "latest" resolves to the most recently created + version (the largest version number), and "latest_published" resolves to the + most recently published version. When a tag is provided, resolution uses that + exact tag assignment (including its dynamic variables). If the tag exists but is + currently unassigned, it resolves to latest. When a numeric version, latest, or + latest_published is provided, resolution applies dynamic variables from the + preferred tag for that resolved version (most recently assigned), if any. """ diff --git a/src/retell/types/phone_number_import_params.py b/src/retell/types/phone_number_import_params.py index e5579e8b..9c076520 100644 --- a/src/retell/types/phone_number_import_params.py +++ b/src/retell/types/phone_number_import_params.py @@ -94,11 +94,13 @@ class InboundAgent(TypedDict, total=False): """Agent version reference. Supports a numeric version (for example 3) or a tag/environment name (for - example "prod"). When a tag is provided, resolution uses that exact tag - assignment (including its dynamic variables). If the tag exists but is currently - unassigned, it resolves to latest. When a numeric version (or latest) is - provided, resolution applies dynamic variables from the preferred tag for that - resolved version (most recently assigned), if any. + example "prod"). The string "latest" resolves to the most recently created + version (the largest version number), and "latest_published" resolves to the + most recently published version. When a tag is provided, resolution uses that + exact tag assignment (including its dynamic variables). If the tag exists but is + currently unassigned, it resolves to latest. When a numeric version, latest, or + latest_published is provided, resolution applies dynamic variables from the + preferred tag for that resolved version (most recently assigned), if any. """ @@ -115,9 +117,11 @@ class OutboundAgent(TypedDict, total=False): """Agent version reference. Supports a numeric version (for example 3) or a tag/environment name (for - example "prod"). When a tag is provided, resolution uses that exact tag - assignment (including its dynamic variables). If the tag exists but is currently - unassigned, it resolves to latest. When a numeric version (or latest) is - provided, resolution applies dynamic variables from the preferred tag for that - resolved version (most recently assigned), if any. + example "prod"). The string "latest" resolves to the most recently created + version (the largest version number), and "latest_published" resolves to the + most recently published version. When a tag is provided, resolution uses that + exact tag assignment (including its dynamic variables). If the tag exists but is + currently unassigned, it resolves to latest. When a numeric version, latest, or + latest_published is provided, resolution applies dynamic variables from the + preferred tag for that resolved version (most recently assigned), if any. """ diff --git a/src/retell/types/phone_number_response.py b/src/retell/types/phone_number_response.py index d2a3828c..046f7d41 100644 --- a/src/retell/types/phone_number_response.py +++ b/src/retell/types/phone_number_response.py @@ -28,11 +28,13 @@ class InboundAgent(BaseModel): """Agent version reference. Supports a numeric version (for example 3) or a tag/environment name (for - example "prod"). When a tag is provided, resolution uses that exact tag - assignment (including its dynamic variables). If the tag exists but is currently - unassigned, it resolves to latest. When a numeric version (or latest) is - provided, resolution applies dynamic variables from the preferred tag for that - resolved version (most recently assigned), if any. + example "prod"). The string "latest" resolves to the most recently created + version (the largest version number), and "latest_published" resolves to the + most recently published version. When a tag is provided, resolution uses that + exact tag assignment (including its dynamic variables). If the tag exists but is + currently unassigned, it resolves to latest. When a numeric version, latest, or + latest_published is provided, resolution applies dynamic variables from the + preferred tag for that resolved version (most recently assigned), if any. """ @@ -49,11 +51,13 @@ class InboundSMSAgent(BaseModel): """Agent version reference. Supports a numeric version (for example 3) or a tag/environment name (for - example "prod"). When a tag is provided, resolution uses that exact tag - assignment (including its dynamic variables). If the tag exists but is currently - unassigned, it resolves to latest. When a numeric version (or latest) is - provided, resolution applies dynamic variables from the preferred tag for that - resolved version (most recently assigned), if any. + example "prod"). The string "latest" resolves to the most recently created + version (the largest version number), and "latest_published" resolves to the + most recently published version. When a tag is provided, resolution uses that + exact tag assignment (including its dynamic variables). If the tag exists but is + currently unassigned, it resolves to latest. When a numeric version, latest, or + latest_published is provided, resolution applies dynamic variables from the + preferred tag for that resolved version (most recently assigned), if any. """ @@ -70,11 +74,13 @@ class OutboundAgent(BaseModel): """Agent version reference. Supports a numeric version (for example 3) or a tag/environment name (for - example "prod"). When a tag is provided, resolution uses that exact tag - assignment (including its dynamic variables). If the tag exists but is currently - unassigned, it resolves to latest. When a numeric version (or latest) is - provided, resolution applies dynamic variables from the preferred tag for that - resolved version (most recently assigned), if any. + example "prod"). The string "latest" resolves to the most recently created + version (the largest version number), and "latest_published" resolves to the + most recently published version. When a tag is provided, resolution uses that + exact tag assignment (including its dynamic variables). If the tag exists but is + currently unassigned, it resolves to latest. When a numeric version, latest, or + latest_published is provided, resolution applies dynamic variables from the + preferred tag for that resolved version (most recently assigned), if any. """ @@ -91,11 +97,13 @@ class OutboundSMSAgent(BaseModel): """Agent version reference. Supports a numeric version (for example 3) or a tag/environment name (for - example "prod"). When a tag is provided, resolution uses that exact tag - assignment (including its dynamic variables). If the tag exists but is currently - unassigned, it resolves to latest. When a numeric version (or latest) is - provided, resolution applies dynamic variables from the preferred tag for that - resolved version (most recently assigned), if any. + example "prod"). The string "latest" resolves to the most recently created + version (the largest version number), and "latest_published" resolves to the + most recently published version. When a tag is provided, resolution uses that + exact tag assignment (including its dynamic variables). If the tag exists but is + currently unassigned, it resolves to latest. When a numeric version, latest, or + latest_published is provided, resolution applies dynamic variables from the + preferred tag for that resolved version (most recently assigned), if any. """ diff --git a/src/retell/types/phone_number_update_params.py b/src/retell/types/phone_number_update_params.py index 1e36a918..8c862fe5 100644 --- a/src/retell/types/phone_number_update_params.py +++ b/src/retell/types/phone_number_update_params.py @@ -115,11 +115,13 @@ class InboundAgent(TypedDict, total=False): """Agent version reference. Supports a numeric version (for example 3) or a tag/environment name (for - example "prod"). When a tag is provided, resolution uses that exact tag - assignment (including its dynamic variables). If the tag exists but is currently - unassigned, it resolves to latest. When a numeric version (or latest) is - provided, resolution applies dynamic variables from the preferred tag for that - resolved version (most recently assigned), if any. + example "prod"). The string "latest" resolves to the most recently created + version (the largest version number), and "latest_published" resolves to the + most recently published version. When a tag is provided, resolution uses that + exact tag assignment (including its dynamic variables). If the tag exists but is + currently unassigned, it resolves to latest. When a numeric version, latest, or + latest_published is provided, resolution applies dynamic variables from the + preferred tag for that resolved version (most recently assigned), if any. """ @@ -136,11 +138,13 @@ class InboundSMSAgent(TypedDict, total=False): """Agent version reference. Supports a numeric version (for example 3) or a tag/environment name (for - example "prod"). When a tag is provided, resolution uses that exact tag - assignment (including its dynamic variables). If the tag exists but is currently - unassigned, it resolves to latest. When a numeric version (or latest) is - provided, resolution applies dynamic variables from the preferred tag for that - resolved version (most recently assigned), if any. + example "prod"). The string "latest" resolves to the most recently created + version (the largest version number), and "latest_published" resolves to the + most recently published version. When a tag is provided, resolution uses that + exact tag assignment (including its dynamic variables). If the tag exists but is + currently unassigned, it resolves to latest. When a numeric version, latest, or + latest_published is provided, resolution applies dynamic variables from the + preferred tag for that resolved version (most recently assigned), if any. """ @@ -157,11 +161,13 @@ class OutboundAgent(TypedDict, total=False): """Agent version reference. Supports a numeric version (for example 3) or a tag/environment name (for - example "prod"). When a tag is provided, resolution uses that exact tag - assignment (including its dynamic variables). If the tag exists but is currently - unassigned, it resolves to latest. When a numeric version (or latest) is - provided, resolution applies dynamic variables from the preferred tag for that - resolved version (most recently assigned), if any. + example "prod"). The string "latest" resolves to the most recently created + version (the largest version number), and "latest_published" resolves to the + most recently published version. When a tag is provided, resolution uses that + exact tag assignment (including its dynamic variables). If the tag exists but is + currently unassigned, it resolves to latest. When a numeric version, latest, or + latest_published is provided, resolution applies dynamic variables from the + preferred tag for that resolved version (most recently assigned), if any. """ @@ -178,9 +184,11 @@ class OutboundSMSAgent(TypedDict, total=False): """Agent version reference. Supports a numeric version (for example 3) or a tag/environment name (for - example "prod"). When a tag is provided, resolution uses that exact tag - assignment (including its dynamic variables). If the tag exists but is currently - unassigned, it resolves to latest. When a numeric version (or latest) is - provided, resolution applies dynamic variables from the preferred tag for that - resolved version (most recently assigned), if any. + example "prod"). The string "latest" resolves to the most recently created + version (the largest version number), and "latest_published" resolves to the + most recently published version. When a tag is provided, resolution uses that + exact tag assignment (including its dynamic variables). If the tag exists but is + currently unassigned, it resolves to latest. When a numeric version, latest, or + latest_published is provided, resolution applies dynamic variables from the + preferred tag for that resolved version (most recently assigned), if any. """ diff --git a/src/retell/types/voice_response.py b/src/retell/types/voice_response.py index d0f6ef8e..3a053105 100644 --- a/src/retell/types/voice_response.py +++ b/src/retell/types/voice_response.py @@ -12,7 +12,7 @@ class VoiceResponse(BaseModel): gender: Literal["male", "female"] """Gender of voice.""" - provider: Literal["elevenlabs", "openai", "deepgram", "cartesia", "minimax", "fish_audio", "platform"] + provider: Literal["elevenlabs", "openai", "cartesia", "minimax", "fish_audio", "platform"] """Indicates the provider of voice.""" voice_id: str diff --git a/src/retell/types/web_call_response.py b/src/retell/types/web_call_response.py index e932f439..42b13d31 100644 --- a/src/retell/types/web_call_response.py +++ b/src/retell/types/web_call_response.py @@ -28,6 +28,7 @@ "ScrubbedTranscriptWithToolCallDtmfUtterance", "ScrubbedTranscriptWithToolCallSMSUtterance", "ScrubbedTranscriptWithToolCallSMSUtteranceMultimedia", + "ScrubbedTranscriptWithToolCallInjectedUtterance", "TranscriptObject", "TranscriptObjectWord", "TranscriptWithToolCall", @@ -39,6 +40,7 @@ "TranscriptWithToolCallDtmfUtterance", "TranscriptWithToolCallSMSUtterance", "TranscriptWithToolCallSMSUtteranceMultimedia", + "TranscriptWithToolCallInjectedUtterance", ] @@ -510,6 +512,20 @@ class ScrubbedTranscriptWithToolCallSMSUtterance(BaseModel): """ +class ScrubbedTranscriptWithToolCallInjectedUtterance(BaseModel): + content: str + """The injected context text.""" + + role: Literal["injected"] + """External context injected into the conversation via the update-live-call API. + + Not spoken by either party. + """ + + time_sec: float + """Time the context was injected, in seconds relative to the start of the call.""" + + ScrubbedTranscriptWithToolCall: TypeAlias = Union[ ScrubbedTranscriptWithToolCallUtterance, ScrubbedTranscriptWithToolCallToolCallInvocationUtterance, @@ -517,6 +533,7 @@ class ScrubbedTranscriptWithToolCallSMSUtterance(BaseModel): ScrubbedTranscriptWithToolCallNodeTransitionUtterance, ScrubbedTranscriptWithToolCallDtmfUtterance, ScrubbedTranscriptWithToolCallSMSUtterance, + ScrubbedTranscriptWithToolCallInjectedUtterance, ] @@ -683,6 +700,20 @@ class TranscriptWithToolCallSMSUtterance(BaseModel): """ +class TranscriptWithToolCallInjectedUtterance(BaseModel): + content: str + """The injected context text.""" + + role: Literal["injected"] + """External context injected into the conversation via the update-live-call API. + + Not spoken by either party. + """ + + time_sec: float + """Time the context was injected, in seconds relative to the start of the call.""" + + TranscriptWithToolCall: TypeAlias = Union[ TranscriptWithToolCallUtterance, TranscriptWithToolCallToolCallInvocationUtterance, @@ -690,6 +721,7 @@ class TranscriptWithToolCallSMSUtterance(BaseModel): TranscriptWithToolCallNodeTransitionUtterance, TranscriptWithToolCallDtmfUtterance, TranscriptWithToolCallSMSUtterance, + TranscriptWithToolCallInjectedUtterance, ] @@ -762,6 +794,7 @@ class WebCallResponse(BaseModel): "inactivity", "max_duration_reached", "concurrency_limit_reached", + "no_concurrency_fallback", "no_valid_payment", "scam_detected", "dial_busy", diff --git a/tests/api_resources/test_chat.py b/tests/api_resources/test_chat.py index cefde6e1..24db3423 100644 --- a/tests/api_resources/test_chat.py +++ b/tests/api_resources/test_chat.py @@ -178,7 +178,75 @@ def test_method_list(self, client: Retell) -> None: @parametrize def test_method_list_with_all_params(self, client: Retell) -> None: chat = client.chat.list( - filter_criteria={}, + filter_criteria={ + "agent": [ + { + "agent_id": "x", + "version": [0], + } + ], + "chat_id": { + "op": "eq", + "type": "string", + "value": "value", + }, + "chat_status": { + "op": "in", + "type": "enum", + "value": ["ongoing"], + }, + "chat_successful": { + "op": "eq", + "type": "boolean", + "value": True, + }, + "combined_cost": { + "op": "eq", + "type": "number", + "value": 0, + }, + "custom_analysis_data": [ + { + "op": "eq", + "type": "string", + "value": "value", + "key": "key", + } + ], + "custom_attributes": [ + { + "op": "eq", + "type": "string", + "value": "value", + "key": "key", + } + ], + "disconnection_reason": { + "op": "in", + "type": "enum", + "value": ["user_hangup"], + }, + "duration_ms": { + "op": "eq", + "type": "number", + "value": 0, + }, + "end_timestamp": { + "op": "eq", + "type": "number", + "value": 0, + }, + "start_timestamp": { + "op": "eq", + "type": "number", + "value": 0, + }, + "user_sentiment": { + "op": "in", + "type": "enum", + "value": ["Negative"], + }, + }, include_total=True, limit=1000, pagination_key="pagination_key", @@ -543,7 +611,75 @@ async def test_method_list(self, async_client: AsyncRetell) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncRetell) -> None: chat = await async_client.chat.list( - filter_criteria={}, + filter_criteria={ + "agent": [ + { + "agent_id": "x", + "version": [0], + } + ], + "chat_id": { + "op": "eq", + "type": "string", + "value": "value", + }, + "chat_status": { + "op": "in", + "type": "enum", + "value": ["ongoing"], + }, + "chat_successful": { + "op": "eq", + "type": "boolean", + "value": True, + }, + "combined_cost": { + "op": "eq", + "type": "number", + "value": 0, + }, + "custom_analysis_data": [ + { + "op": "eq", + "type": "string", + "value": "value", + "key": "key", + } + ], + "custom_attributes": [ + { + "op": "eq", + "type": "string", + "value": "value", + "key": "key", + } + ], + "disconnection_reason": { + "op": "in", + "type": "enum", + "value": ["user_hangup"], + }, + "duration_ms": { + "op": "eq", + "type": "number", + "value": 0, + }, + "end_timestamp": { + "op": "eq", + "type": "number", + "value": 0, + }, + "start_timestamp": { + "op": "eq", + "type": "number", + "value": 0, + }, + "user_sentiment": { + "op": "in", + "type": "enum", + "value": ["Negative"], + }, + }, include_total=True, limit=1000, pagination_key="pagination_key",