diff --git a/.mock/definition/__package__.yml b/.mock/definition/__package__.yml index 42f5f890..05cfc6b2 100644 --- a/.mock/definition/__package__.yml +++ b/.mock/definition/__package__.yml @@ -1228,6 +1228,25 @@ types: include_workspace_metrics is False. source: openapi: openapi.json + BuiltInTools: + properties: + end_call: + type: optional + docs: The end call tool + language_detection: + type: optional + docs: The language detection tool + transfer_to_agent: + type: optional + docs: The transfer to agent tool + transfer_to_number: + type: optional + docs: The transfer to number tool + skip_turn: + type: optional + docs: The skip turn tool + source: + openapi: openapi.json ChapterContentBlockExtendableNodeResponseModel: docs: Not used. Make sure you anticipate new types in the future. properties: {} @@ -1463,10 +1482,11 @@ types: - agent_response - agent_response_correction - client_tool_call + - mcp_tool_call + - agent_tool_response - vad_score - internal_turn_probability - internal_tentative_agent_response - - internal_native_mcp_tool_call source: openapi: openapi.json ClientToolConfigInput: @@ -3490,14 +3510,6 @@ types: docs: The description of the pronunciation dictionary. source: openapi: openapi.json - GetSharedSoundGenerationsResponseModel: - properties: - shared_sound_generations: - type: list - last_sort_id: optional - has_more: boolean - source: - openapi: openapi.json GetSpeechHistoryResponse: properties: history: @@ -3587,6 +3599,12 @@ types: default: '' source: openapi: openapi.json + IntegrationType: + enum: + - mcp_server + - mcp_integration + source: + openapi: openapi.json InvoiceResponse: properties: amount_due_cents: @@ -3595,6 +3613,9 @@ types: discount_percent_off: type: optional docs: The discount applied to the invoice. E.g. [20.0f] for 20% off. + discount_amount_off: + type: optional + docs: The discount applied to the invoice. E.g. [20.0f] for 20% off. next_payment_attempt_unix: type: integer docs: The Unix timestamp of the next payment attempt. @@ -3977,16 +3998,16 @@ types: docs: The constant value of the property source: openapi: openapi.json - McpApprovalRequiredModel: + McpApprovalPolicy: enum: - - user_approval_always_given - - user_approval_never_given - - user_approval_required_per_tool - docs: Defines the approval model for an MCP tool + - auto_approve_all + - require_approval_all + - require_approval_per_tool + docs: Defines the MCP server-level approval policy for tool execution. source: openapi: openapi.json McpToolConfigInput: - docs: A MCP tool is a tool that is used to call a MCP server + docs: An MCP tool configuration that can be used to call MCP servers properties: id: type: optional @@ -4004,24 +4025,34 @@ types: type: optional docs: The maximum time in seconds to wait for the tool call to complete. default: 20 + integration_type: + type: IntegrationType + docs: The type of MCP tool parameters: type: optional docs: Schema for any parameters the LLM needs to provide to the MCP tool. + approval_policy: + type: optional + docs: The approval policy for the MCP tool mcp_tool_name: type: string docs: The name of the MCP tool to call + mcp_tool_description: + type: string + docs: The description of the MCP tool to call mcp_server_id: type: string docs: The id of the MCP server to call - approval_mode: - type: optional - docs: >- - If set to approved, the tool will be pre-approved and not require user - approval before executing + mcp_server_name: + type: string + docs: The name of the MCP server to call + mcp_input_schema: + type: optional> + docs: Original inputSchema dict for consistent hashing (pure MCP format) source: openapi: openapi.json McpToolConfigOutput: - docs: A MCP tool is a tool that is used to call a MCP server + docs: An MCP tool configuration that can be used to call MCP servers properties: id: type: optional @@ -4039,20 +4070,30 @@ types: type: optional docs: The maximum time in seconds to wait for the tool call to complete. default: 20 + integration_type: + type: IntegrationType + docs: The type of MCP tool parameters: type: optional docs: Schema for any parameters the LLM needs to provide to the MCP tool. + approval_policy: + type: optional + docs: The approval policy for the MCP tool mcp_tool_name: type: string docs: The name of the MCP tool to call + mcp_tool_description: + type: string + docs: The description of the MCP tool to call mcp_server_id: type: string docs: The id of the MCP server to call - approval_mode: - type: optional - docs: >- - If set to approved, the tool will be pre-approved and not require user - approval before executing + mcp_server_name: + type: string + docs: The name of the MCP server to call + mcp_input_schema: + type: optional> + docs: Original inputSchema dict for consistent hashing (pure MCP format) source: openapi: openapi.json ManualVerificationFileResponse: @@ -4237,76 +4278,6 @@ types: docs: Whether the user is on the watchlist. source: openapi: openapi.json - NativeMcpToolConfigInput: - docs: A Native MCP tool is a tool that is used to call a Native MCP server - properties: - id: - type: optional - default: '' - name: - type: string - validation: - pattern: ^[a-zA-Z0-9_-]{1,64}$ - minLength: 0 - description: - type: string - validation: - minLength: 0 - response_timeout_secs: - type: optional - docs: The maximum time in seconds to wait for the tool call to complete. - default: 20 - parameters: - type: optional - docs: Schema for any parameters the LLM needs to provide to the MCP tool. - mcp_tool_name: - type: string - docs: The name of the MCP tool to call - mcp_server_id: - type: string - docs: The id of the MCP server to call - approval_mode: - type: optional - docs: >- - If set to always accept, the tool will be pre-approved and not require - user approval before executing - source: - openapi: openapi.json - NativeMcpToolConfigOutput: - docs: A Native MCP tool is a tool that is used to call a Native MCP server - properties: - id: - type: optional - default: '' - name: - type: string - validation: - pattern: ^[a-zA-Z0-9_-]{1,64}$ - minLength: 0 - description: - type: string - validation: - minLength: 0 - response_timeout_secs: - type: optional - docs: The maximum time in seconds to wait for the tool call to complete. - default: 20 - parameters: - type: optional - docs: Schema for any parameters the LLM needs to provide to the MCP tool. - mcp_tool_name: - type: string - docs: The name of the MCP tool to call - mcp_server_id: - type: string - docs: The id of the MCP server to call - approval_mode: - type: optional - docs: >- - If set to always accept, the tool will be pre-approved and not require - user approval before executing - source: - openapi: openapi.json ObjectJsonSchemaPropertyInputPropertiesValue: discriminated: false union: @@ -4913,8 +4884,6 @@ types: type: ClientToolConfigInput mcp: type: McpToolConfigInput - native_mcp: - type: NativeMcpToolConfigInput system: type: SystemToolConfigInput webhook: @@ -4975,8 +4944,6 @@ types: type: ClientToolConfigOutput mcp: type: McpToolConfigOutput - native_mcp: - type: NativeMcpToolConfigOutput system: type: SystemToolConfigOutput webhook: @@ -4992,8 +4959,6 @@ types: type: ClientToolConfigInput mcp: type: McpToolConfigInput - native_mcp: - type: NativeMcpToolConfigInput system: type: SystemToolConfigInput webhook: @@ -5045,6 +5010,8 @@ types: docs: Configuration for RAG knowledge_base_document_ids: type: optional> + built_in_tools: + type: optional source: openapi: openapi.json PromptAgentOverride: @@ -5627,23 +5594,6 @@ types: 'key'). source: openapi: openapi.json - SharedSoundGenerationResponseModel: - properties: - public_user_id: string - history_item_id: string - generation_id: string - text: string - category: string - labels: - type: map - purchased_count: integer - like_count: integer - featured: boolean - preview_url: string - purchased: boolean - icon_url: string - source: - openapi: openapi.json SimilarVoiceCategory: enum: - premade @@ -6179,6 +6129,23 @@ types: type: optional model_family: type: optional + optimize_streaming_latency: + type: optional + stability: + type: optional + validation: + min: 0 + max: 1 + speed: + type: optional + validation: + min: 0.7 + max: 1.2 + similarity_boost: + type: optional + validation: + min: 0 + max: 1 source: openapi: openapi.json SystemToolConfigInputParams: @@ -6421,6 +6388,12 @@ types: properties: transfers: type: list + enable_client_message: + type: optional + docs: >- + Whether to play a message to the client while they wait for transfer. + Defaults to true for backward compatibility. + default: true source: openapi: openapi.json TurnConfig: @@ -7324,6 +7297,9 @@ types: text_contents: type: optional docs: Text contents of the widget + styles: + type: optional + docs: Styles for the widget language_selector: type: optional docs: Whether to show the language selector @@ -7474,6 +7450,9 @@ types: text_contents: type: optional docs: Text contents of the widget + styles: + type: optional + docs: Styles for the widget language: string supported_language_overrides: type: optional> @@ -7537,6 +7516,70 @@ types: name: BottomRight source: openapi: openapi.json + WidgetStyles: + properties: + base: + type: optional + docs: The base background color. + base_hover: + type: optional + docs: The color of the base background when hovered. + base_active: + type: optional + docs: The color of the base background when active (clicked). + base_border: + type: optional + docs: The color of the border against the base background. + base_subtle: + type: optional + docs: The color of subtle text against the base background. + base_primary: + type: optional + docs: The color of primary text against the base background. + base_error: + type: optional + docs: The color of error text against the base background. + accent: + type: optional + docs: The accent background color. + accent_hover: + type: optional + docs: The color of the accent background when hovered. + accent_active: + type: optional + docs: The color of the accent background when active (clicked). + accent_border: + type: optional + docs: The color of the border against the accent background. + accent_subtle: + type: optional + docs: The color of subtle text against the accent background. + accent_primary: + type: optional + docs: The color of primary text against the accent background. + overlay_padding: + type: optional + docs: The padding around the edges of the viewport. + button_radius: + type: optional + docs: The radius of the buttons. + input_radius: + type: optional + docs: The radius of the input fields. + bubble_radius: + type: optional + docs: The radius of the chat bubbles. + sheet_radius: + type: optional + docs: The default radius of sheets. + compact_sheet_radius: + type: optional + docs: The radius of the sheet in compact mode. + dropdown_sheet_radius: + type: optional + docs: The radius of the dropdown sheet. + source: + openapi: openapi.json WidgetTextContents: properties: main_label: @@ -7646,7 +7689,7 @@ types: - convai_secrets - music_latent - convai_phone_numbers - - convai_mcps + - convai_mcp_servers - convai_batch_calls docs: >- Resource types that can be shared in the workspace. The name always need diff --git a/.mock/definition/conversationalAi/agents/widget.yml b/.mock/definition/conversationalAi/agents/widget.yml index 744ae514..8b946255 100644 --- a/.mock/definition/conversationalAi/agents/widget.yml +++ b/.mock/definition/conversationalAi/agents/widget.yml @@ -93,6 +93,27 @@ service: conversation_id: conversation_id error_occurred: error_occurred copy_id: copy_id + styles: + base: base + base_hover: base_hover + base_active: base_active + base_border: base_border + base_subtle: base_subtle + base_primary: base_primary + base_error: base_error + accent: accent + accent_hover: accent_hover + accent_active: accent_active + accent_border: accent_border + accent_subtle: accent_subtle + accent_primary: accent_primary + overlay_padding: 1.1 + button_radius: 1.1 + input_radius: 1.1 + bubble_radius: 1.1 + sheet_radius: 1.1 + compact_sheet_radius: 1.1 + dropdown_sheet_radius: 1.1 language: language supported_language_overrides: - supported_language_overrides diff --git a/.mock/definition/speechToText.yml b/.mock/definition/speechToText.yml index 57d95d44..17e02db2 100644 --- a/.mock/definition/speechToText.yml +++ b/.mock/definition/speechToText.yml @@ -130,9 +130,19 @@ service: Whether to send the transcription result to configured speech-to-text webhooks. If set the request will return early without the transcription, which will be delivered later via - webhook. Webhooks can be created and assigned to a transcription - task in webhook settings page in the UI. + webhook. default: false + temperature: + type: optional + docs: >- + Controls the randomness of the transcription output. Accepts + values between 0.0 and 2.0, where higher values result in more + diverse and less deterministic results. If omitted, we will use + a temperature based on the model you selected which is usually + 0. + validation: + min: 0 + max: 2 content-type: multipart/form-data response: docs: Synchronous transcription result diff --git a/.mock/definition/user/subscription.yml b/.mock/definition/user/subscription.yml index 84f394e7..9f10de25 100644 --- a/.mock/definition/user/subscription.yml +++ b/.mock/definition/user/subscription.yml @@ -44,6 +44,7 @@ service: next_invoice: amount_due_cents: 1000 discount_percent_off: 1.1 + discount_amount_off: 1.1 next_payment_attempt_unix: 1738356858 has_open_invoices: false source: diff --git a/.mock/definition/voices.yml b/.mock/definition/voices.yml index e287b1e6..b49458e5 100644 --- a/.mock/definition/voices.yml +++ b/.mock/definition/voices.yml @@ -194,7 +194,7 @@ service: docs: >- Type of the voice to filter by. One of 'personal', 'community', 'default', 'workspace', 'non-default'. 'non-default' is equal to - 'personal' plus 'community'. + all but 'default'. category: type: optional docs: >- @@ -895,7 +895,7 @@ service: source: openapi: openapi.json display-name: Voices -docs: Access to voices created either by you or us. +docs: Access to voices created either by you or ElevenLabs. types: VoicesGetSharedRequestCategory: enum: diff --git a/.mock/definition/workspace.yml b/.mock/definition/workspace.yml new file mode 100644 index 00000000..c382241c --- /dev/null +++ b/.mock/definition/workspace.yml @@ -0,0 +1,34 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + updateUserAutoProvisioning: + path: /v1/workspace/user-auto-provisioning + method: POST + auth: false + docs: Update user auto provisioning settings for the workspace. + source: + openapi: openapi.json + display-name: Update User Auto Provisioning + request: + name: BodyUpdateUserAutoProvisioningV1WorkspaceUserAutoProvisioningPost + body: + properties: + enabled: boolean + content-type: application/json + response: + docs: Successful Response + type: unknown + status-code: 200 + errors: + - root.UnprocessableEntityError + examples: + - request: + enabled: true + response: + body: + key: value + source: + openapi: openapi.json diff --git a/.mock/fern.config.json b/.mock/fern.config.json index 914e3a96..0fb68ddb 100644 --- a/.mock/fern.config.json +++ b/.mock/fern.config.json @@ -1,4 +1,4 @@ { "organization" : "elevenlabs", - "version" : "0.63.19" + "version" : "0.63.38" } \ No newline at end of file diff --git a/.mock/openapi.json b/.mock/openapi.json index 938237d9..efd8a48c 100644 --- a/.mock/openapi.json +++ b/.mock/openapi.json @@ -2,7 +2,7 @@ "openapi": "3.1.0", "info": { "title": "ElevenLabs API Documentation", - "description": "This is the documentation for the ElevenLabs API. You can use this API to use our service programmatically, this is done by using your xi-api-key.
You can view your xi-api-key using the 'Profile' tab on https://elevenlabs.io. Our API is experimental so all endpoints are subject to change.", + "description": "This is the documentation for the ElevenLabs API. You can use this API to use our service programmatically, this is done by using your API key. You can find your API key in the dashboard at https://elevenlabs.io/app/settings/api-keys.", "version": "1.0" }, "paths": { @@ -661,267 +661,6 @@ "x-fern-streaming": true } }, - "/v1/shared-sound-generations": { - "get": { - "operationId": "Get_shared_sound_effects_v1_shared_sound_generations_get", - "summary": "Get Shared Sound Effects", - "description": "Returns a list of shared sound effects.", - "parameters": [ - { - "name": "page_size", - "in": "query", - "description": "How many sound effects to return at maximum. Can not exceed 100, defaults to 30.", - "required": false, - "schema": { - "description": "How many sound effects to return at maximum. Can not exceed 100, defaults to 30.", - "type": "integer", - "default": 30, - "title": "Page Size" - } - }, - { - "name": "category", - "in": "query", - "description": "Sound effect category used for filtering.", - "required": false, - "schema": { - "description": "Sound effect category used for filtering.", - "anyOf": [ - { - "enum": [ - "restaurant", - "park", - "industrial", - "school", - "office", - "urban", - "ocean", - "nature", - "weather", - "foley", - "fantasy", - "human", - "device", - "sci-fi", - "horror", - "animal", - "boom", - "braam", - "riser", - "whoosh", - "drone", - "impact", - "weapon", - "transport", - "household", - "percussion", - "cymbal", - "synth", - "bass", - "guitar", - "key", - "string", - "brass", - "woodwind", - "ui element", - "sport", - "vehicle", - "misc" - ], - "type": "string" - }, - { - "type": "null" - } - ], - "examples": [ - "Nature" - ], - "title": "Category" - } - }, - { - "name": "search", - "in": "query", - "description": "Search term used for filtering", - "required": false, - "schema": { - "description": "Search term used for filtering", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "examples": [ - "Cold water" - ], - "title": "Search" - } - }, - { - "name": "sort", - "in": "query", - "description": "Sort criteria. Can be one of: created_date, download_count, like_count, trending_score. Defaults to trending_score.", - "required": false, - "schema": { - "description": "Sort criteria. Can be one of: created_date, download_count, like_count, trending_score. Defaults to trending_score.", - "default": "trending_score", - "anyOf": [ - { - "enum": [ - "sharing_date_unix", - "purchased_count", - "like_count", - "trending_score" - ], - "type": "string" - }, - { - "type": "null" - } - ], - "examples": [ - "trending_score" - ], - "title": "Sort" - } - }, - { - "name": "featured", - "in": "query", - "description": "Filter featured sound effects.", - "required": false, - "schema": { - "description": "Filter featured sound effects.", - "type": "boolean", - "default": false, - "examples": [ - true - ], - "title": "Featured" - } - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "default": 0, - "title": "Page" - } - }, - { - "name": "xi-api-key", - "in": "header", - "description": "Your API key. This is required by most endpoints to access our API programatically. You can view your xi-api-key using the 'Profile' tab on the website.", - "required": false, - "schema": { - "description": "Your API key. This is required by most endpoints to access our API programatically. You can view your xi-api-key using the 'Profile' tab on the website.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Xi-Api-Key" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetSharedSoundGenerationsResponseModel" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "tags": [ - "sound-effects-explore" - ] - } - }, - "/v1/shared-sound-generations/{sound_effect_generation_id}/purchase": { - "post": { - "operationId": "Purchases_shared_sound_effect_v1_shared_sound_generations__sound_effect_generation_id__purchase_post", - "summary": "Purchases Shared Sound Effect", - "description": "Purchases shared sound effect and charges user for the purchase.", - "parameters": [ - { - "name": "sound_effect_generation_id", - "in": "path", - "description": "sound_effect_generation_id to be used, you can use GET https://api.elevenlabs.io/v1/sound-effects-history to receive a list of history items and their sound_effect_generation_ids.", - "required": true, - "schema": { - "description": "sound_effect_generation_id to be used, you can use GET https://api.elevenlabs.io/v1/sound-effects-history to receive a list of history items and their sound_effect_generation_ids.", - "type": "string", - "examples": [ - "VW7YKqPnjY4h39yTbx2L" - ], - "title": "Sound Effect Generation Id" - } - }, - { - "name": "xi-api-key", - "in": "header", - "description": "Your API key. This is required by most endpoints to access our API programatically. You can view your xi-api-key using the 'Profile' tab on the website.", - "required": false, - "schema": { - "description": "Your API key. This is required by most endpoints to access our API programatically. You can view your xi-api-key using the 'Profile' tab on the website.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Xi-Api-Key" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "audio/mpeg": {} - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "tags": [ - "sound-effects-explore" - ] - } - }, "/v1/voices/{voice_id}/samples/{sample_id}": { "delete": { "operationId": "Delete_sample_v1_voices__voice_id__samples__sample_id__delete", @@ -1757,8 +1496,7 @@ "text-to-dialogue" ], "x-fern-sdk-group-name": "text_to_dialogue", - "x-fern-sdk-method-name": "convert", - "x-fern-streaming": true + "x-fern-sdk-method-name": "convert" } }, "/v1/text-to-dialogue/stream": { @@ -2747,10 +2485,10 @@ { "name": "voice_type", "in": "query", - "description": "Type of the voice to filter by. One of 'personal', 'community', 'default', 'workspace', 'non-default'. 'non-default' is equal to 'personal' plus 'community'.", + "description": "Type of the voice to filter by. One of 'personal', 'community', 'default', 'workspace', 'non-default'. 'non-default' is equal to all but 'default'.", "required": false, "schema": { - "description": "Type of the voice to filter by. One of 'personal', 'community', 'default', 'workspace', 'non-default'. 'non-default' is equal to 'personal' plus 'community'.", + "description": "Type of the voice to filter by. One of 'personal', 'community', 'default', 'workspace', 'non-default'. 'non-default' is equal to all but 'default'.", "anyOf": [ { "type": "string" @@ -9533,54 +9271,27 @@ "x-fern-sdk-method-name": "list" } }, - "/v1/workspace/groups/search": { - "get": { - "operationId": "Search_user_groups_v1_workspace_groups_search_get", - "summary": "Search User Groups", - "description": "Searches for user groups in the workspace. Multiple or no groups may be returned.", - "parameters": [ - { - "name": "name", - "in": "query", - "description": "Name of the target group.", - "required": true, - "schema": { - "description": "Name of the target group.", - "type": "string", - "title": "Name" - } - }, - { - "name": "xi-api-key", - "in": "header", - "description": "Your API key. This is required by most endpoints to access our API programatically. You can view your xi-api-key using the 'Profile' tab on the website.", - "required": false, - "schema": { - "description": "Your API key. This is required by most endpoints to access our API programatically. You can view your xi-api-key using the 'Profile' tab on the website.", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Xi-Api-Key" + "/v1/workspace/user-auto-provisioning": { + "post": { + "operationId": "update_user_auto_provisioning_v1_workspace_user_auto_provisioning_post", + "summary": "Update User Auto Provisioning", + "description": "Update user auto provisioning settings for the workspace.", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_update_user_auto_provisioning_v1_workspace_user_auto_provisioning_post" + } } } - ], + }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/WorkspaceGroupByNameResponseModel" - }, - "title": "Response Search User Groups V1 Workspace Groups Search Get" - } + "schema": {} } } }, @@ -9596,30 +9307,98 @@ } }, "tags": [ - "workspace" - ], - "x-fern-sdk-group-name": [ "workspace", - "groups" - ], - "x-fern-sdk-method-name": "search" + "workspace" + ] } }, - "/v1/workspace/groups/{group_id}/members/remove": { - "post": { - "operationId": "Delete_member_from_user_group_v1_workspace_groups__group_id__members_remove_post", - "summary": "Delete Member From User Group", - "description": "Removes a member from the specified group. This endpoint may only be called by workspace administrators.", + "/v1/workspace/groups/search": { + "get": { + "operationId": "Search_user_groups_v1_workspace_groups_search_get", + "summary": "Search User Groups", + "description": "Searches for user groups in the workspace. Multiple or no groups may be returned.", "parameters": [ { - "name": "group_id", - "in": "path", - "description": "The ID of the target group.", + "name": "name", + "in": "query", + "description": "Name of the target group.", "required": true, "schema": { - "description": "The ID of the target group.", + "description": "Name of the target group.", "type": "string", - "title": "Group Id" + "title": "Name" + } + }, + { + "name": "xi-api-key", + "in": "header", + "description": "Your API key. This is required by most endpoints to access our API programatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "required": false, + "schema": { + "description": "Your API key. This is required by most endpoints to access our API programatically. You can view your xi-api-key using the 'Profile' tab on the website.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Xi-Api-Key" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkspaceGroupByNameResponseModel" + }, + "title": "Response Search User Groups V1 Workspace Groups Search Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "tags": [ + "workspace" + ], + "x-fern-sdk-group-name": [ + "workspace", + "groups" + ], + "x-fern-sdk-method-name": "search" + } + }, + "/v1/workspace/groups/{group_id}/members/remove": { + "post": { + "operationId": "Delete_member_from_user_group_v1_workspace_groups__group_id__members_remove_post", + "summary": "Delete Member From User Group", + "description": "Removes a member from the specified group. This endpoint may only be called by workspace administrators.", + "parameters": [ + { + "name": "group_id", + "in": "path", + "description": "The ID of the target group.", + "required": true, + "schema": { + "description": "The ID of the target group.", + "type": "string", + "title": "Group Id" } }, { @@ -20970,10 +20749,24 @@ "title": "Cloud Storage Url" }, "webhook": { - "description": "Whether to send the transcription result to configured speech-to-text webhooks. If set the request will return early without the transcription, which will be delivered later via webhook. Webhooks can be created and assigned to a transcription task in webhook settings page in the UI.", + "description": "Whether to send the transcription result to configured speech-to-text webhooks. If set the request will return early without the transcription, which will be delivered later via webhook.", "type": "boolean", "default": false, "title": "Webhook" + }, + "temperature": { + "description": "Controls the randomness of the transcription output. Accepts values between 0.0 and 2.0, where higher values result in more diverse and less deterministic results. If omitted, we will use a temperature based on the model you selected which is usually 0.", + "anyOf": [ + { + "type": "number", + "maximum": 2, + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Temperature" } }, "required": [ @@ -22479,6 +22272,19 @@ ], "title": "Body_Verify_PVC_voice_captcha_v1_voices_pvc__voice_id__captcha_post" }, + "Body_update_user_auto_provisioning_v1_workspace_user_auto_provisioning_post": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Enabled" + } + }, + "required": [ + "enabled" + ], + "title": "Body_update_user_auto_provisioning_v1_workspace_user_auto_provisioning_post" + }, "BreakdownTypes": { "description": "How to break down the information. Cannot be \"user\" or \"api_key\" if include_workspace_metrics is False.", "type": "string", @@ -22497,6 +22303,67 @@ ], "title": "BreakdownTypes" }, + "BuiltInTools": { + "type": "object", + "properties": { + "end_call": { + "description": "The end call tool", + "anyOf": [ + { + "$ref": "#/components/schemas/SystemToolConfig-Input" + }, + { + "type": "null" + } + ] + }, + "language_detection": { + "description": "The language detection tool", + "anyOf": [ + { + "$ref": "#/components/schemas/SystemToolConfig-Input" + }, + { + "type": "null" + } + ] + }, + "transfer_to_agent": { + "description": "The transfer to agent tool", + "anyOf": [ + { + "$ref": "#/components/schemas/SystemToolConfig-Input" + }, + { + "type": "null" + } + ] + }, + "transfer_to_number": { + "description": "The transfer to number tool", + "anyOf": [ + { + "$ref": "#/components/schemas/SystemToolConfig-Input" + }, + { + "type": "null" + } + ] + }, + "skip_turn": { + "description": "The skip turn tool", + "anyOf": [ + { + "$ref": "#/components/schemas/SystemToolConfig-Input" + }, + { + "type": "null" + } + ] + } + }, + "title": "BuiltInTools" + }, "ChapterContentBlockExtendableNodeResponseModel": { "description": "Not used. Make sure you anticipate new types in the future.", "type": "object", @@ -23104,10 +22971,11 @@ "agent_response", "agent_response_correction", "client_tool_call", + "mcp_tool_call", + "agent_tool_response", "vad_score", "internal_turn_probability", - "internal_tentative_agent_response", - "internal_native_mcp_tool_call" + "internal_tentative_agent_response" ], "title": "ClientEvent" }, @@ -27995,39 +27863,6 @@ ], "title": "GetPronunciationDictionaryMetadataResponseModel" }, - "GetSharedSoundGenerationsResponseModel": { - "type": "object", - "properties": { - "shared_sound_generations": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SharedSoundGenerationResponseModel" - }, - "title": "Shared Sound Generations" - }, - "last_sort_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Last Sort Id" - }, - "has_more": { - "type": "boolean", - "title": "Has More" - } - }, - "required": [ - "shared_sound_generations", - "last_sort_id", - "has_more" - ], - "title": "GetSharedSoundGenerationsResponseModel" - }, "GetSpeechHistoryResponseModel": { "type": "object", "properties": { @@ -28437,6 +28272,14 @@ }, "title": "ImageAvatar" }, + "IntegrationType": { + "type": "string", + "enum": [ + "mcp_server", + "mcp_integration" + ], + "title": "IntegrationType" + }, "InvoiceResponseModel": { "type": "object", "properties": { @@ -28457,6 +28300,18 @@ ], "title": "Discount Percent Off" }, + "discount_amount_off": { + "description": "The discount applied to the invoice. E.g. [20.0f] for 20% off.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Discount Amount Off" + }, "next_payment_attempt_unix": { "description": "The Unix timestamp of the next payment attempt.", "type": "integer", @@ -29276,18 +29131,18 @@ ], "title": "LiteralJsonSchemaProperty" }, - "MCPApprovalRequiredModel": { - "description": "Defines the approval model for an MCP tool", + "MCPApprovalPolicy": { + "description": "Defines the MCP server-level approval policy for tool execution.", "type": "string", "enum": [ - "user_approval_always_given", - "user_approval_never_given", - "user_approval_required_per_tool" + "auto_approve_all", + "require_approval_all", + "require_approval_per_tool" ], - "title": "MCPApprovalRequiredModel" + "title": "MCPApprovalPolicy" }, "MCPToolConfig-Input": { - "description": "A MCP tool is a tool that is used to call a MCP server", + "description": "An MCP tool configuration that can be used to call MCP servers", "type": "object", "properties": { "id": { @@ -29313,12 +29168,15 @@ "title": "Response Timeout Secs" }, "type": { - "description": "The type of tool", "type": "string", "default": "mcp", "const": "mcp", "title": "Type" }, + "integration_type": { + "description": "The type of MCP tool", + "$ref": "#/components/schemas/IntegrationType" + }, "parameters": { "description": "Schema for any parameters the LLM needs to provide to the MCP tool.", "anyOf": [ @@ -29330,32 +29188,57 @@ } ] }, + "approval_policy": { + "description": "The approval policy for the MCP tool", + "default": "require_approval_all", + "$ref": "#/components/schemas/MCPApprovalPolicy" + }, "mcp_tool_name": { "description": "The name of the MCP tool to call", "type": "string", "title": "Mcp Tool Name" }, + "mcp_tool_description": { + "description": "The description of the MCP tool to call", + "type": "string", + "title": "Mcp Tool Description" + }, "mcp_server_id": { "description": "The id of the MCP server to call", "type": "string", "title": "Mcp Server Id" }, - "approval_mode": { - "description": "If set to approved, the tool will be pre-approved and not require user approval before executing", - "default": "user_approval_never_given", - "$ref": "#/components/schemas/MCPApprovalRequiredModel" + "mcp_server_name": { + "description": "The name of the MCP server to call", + "type": "string", + "title": "Mcp Server Name" + }, + "mcp_input_schema": { + "description": "Original inputSchema dict for consistent hashing (pure MCP format)", + "anyOf": [ + { + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Mcp Input Schema" } }, "required": [ "name", "description", + "integration_type", "mcp_tool_name", - "mcp_server_id" + "mcp_tool_description", + "mcp_server_id", + "mcp_server_name" ], "title": "MCPToolConfig" }, "MCPToolConfig-Output": { - "description": "A MCP tool is a tool that is used to call a MCP server", + "description": "An MCP tool configuration that can be used to call MCP servers", "type": "object", "properties": { "id": { @@ -29381,12 +29264,15 @@ "title": "Response Timeout Secs" }, "type": { - "description": "The type of tool", "type": "string", "default": "mcp", "const": "mcp", "title": "Type" }, + "integration_type": { + "description": "The type of MCP tool", + "$ref": "#/components/schemas/IntegrationType" + }, "parameters": { "description": "Schema for any parameters the LLM needs to provide to the MCP tool.", "anyOf": [ @@ -29398,27 +29284,52 @@ } ] }, + "approval_policy": { + "description": "The approval policy for the MCP tool", + "default": "require_approval_all", + "$ref": "#/components/schemas/MCPApprovalPolicy" + }, "mcp_tool_name": { "description": "The name of the MCP tool to call", "type": "string", "title": "Mcp Tool Name" }, + "mcp_tool_description": { + "description": "The description of the MCP tool to call", + "type": "string", + "title": "Mcp Tool Description" + }, "mcp_server_id": { "description": "The id of the MCP server to call", "type": "string", "title": "Mcp Server Id" }, - "approval_mode": { - "description": "If set to approved, the tool will be pre-approved and not require user approval before executing", - "default": "user_approval_never_given", - "$ref": "#/components/schemas/MCPApprovalRequiredModel" + "mcp_server_name": { + "description": "The name of the MCP server to call", + "type": "string", + "title": "Mcp Server Name" + }, + "mcp_input_schema": { + "description": "Original inputSchema dict for consistent hashing (pure MCP format)", + "anyOf": [ + { + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Mcp Input Schema" } }, "required": [ "name", "description", + "integration_type", "mcp_tool_name", - "mcp_server_id" + "mcp_tool_description", + "mcp_server_id", + "mcp_server_name" ], "title": "MCPToolConfig" }, @@ -29819,142 +29730,6 @@ ], "title": "ModerationStatusResponseModel" }, - "NativeMCPToolConfig-Input": { - "description": "A Native MCP tool is a tool that is used to call a Native MCP server", - "type": "object", - "properties": { - "id": { - "type": "string", - "default": "", - "title": "Id" - }, - "name": { - "type": "string", - "minLength": 0, - "pattern": "^[a-zA-Z0-9_-]{1,64}$", - "title": "Name" - }, - "description": { - "type": "string", - "minLength": 0, - "title": "Description" - }, - "response_timeout_secs": { - "description": "The maximum time in seconds to wait for the tool call to complete.", - "type": "integer", - "default": 20, - "title": "Response Timeout Secs" - }, - "type": { - "description": "The type of tool", - "type": "string", - "default": "native_mcp", - "const": "native_mcp", - "title": "Type" - }, - "parameters": { - "description": "Schema for any parameters the LLM needs to provide to the MCP tool.", - "anyOf": [ - { - "$ref": "#/components/schemas/ObjectJsonSchemaProperty-Input" - }, - { - "type": "null" - } - ] - }, - "mcp_tool_name": { - "description": "The name of the MCP tool to call", - "type": "string", - "title": "Mcp Tool Name" - }, - "mcp_server_id": { - "description": "The id of the MCP server to call", - "type": "string", - "title": "Mcp Server Id" - }, - "approval_mode": { - "description": "If set to always accept, the tool will be pre-approved and not require user approval before executing", - "default": "user_approval_never_given", - "$ref": "#/components/schemas/MCPApprovalRequiredModel" - } - }, - "required": [ - "name", - "description", - "mcp_tool_name", - "mcp_server_id" - ], - "title": "NativeMCPToolConfig" - }, - "NativeMCPToolConfig-Output": { - "description": "A Native MCP tool is a tool that is used to call a Native MCP server", - "type": "object", - "properties": { - "id": { - "type": "string", - "default": "", - "title": "Id" - }, - "name": { - "type": "string", - "minLength": 0, - "pattern": "^[a-zA-Z0-9_-]{1,64}$", - "title": "Name" - }, - "description": { - "type": "string", - "minLength": 0, - "title": "Description" - }, - "response_timeout_secs": { - "description": "The maximum time in seconds to wait for the tool call to complete.", - "type": "integer", - "default": 20, - "title": "Response Timeout Secs" - }, - "type": { - "description": "The type of tool", - "type": "string", - "default": "native_mcp", - "const": "native_mcp", - "title": "Type" - }, - "parameters": { - "description": "Schema for any parameters the LLM needs to provide to the MCP tool.", - "anyOf": [ - { - "$ref": "#/components/schemas/ObjectJsonSchemaProperty-Output" - }, - { - "type": "null" - } - ] - }, - "mcp_tool_name": { - "description": "The name of the MCP tool to call", - "type": "string", - "title": "Mcp Tool Name" - }, - "mcp_server_id": { - "description": "The id of the MCP server to call", - "type": "string", - "title": "Mcp Server Id" - }, - "approval_mode": { - "description": "If set to always accept, the tool will be pre-approved and not require user approval before executing", - "default": "user_approval_never_given", - "$ref": "#/components/schemas/MCPApprovalRequiredModel" - } - }, - "required": [ - "name", - "description", - "mcp_tool_name", - "mcp_server_id" - ], - "title": "NativeMCPToolConfig" - }, "ObjectJsonSchemaProperty-Input": { "type": "object", "properties": { @@ -31603,9 +31378,6 @@ }, { "$ref": "#/components/schemas/MCPToolConfig-Input" - }, - { - "$ref": "#/components/schemas/NativeMCPToolConfig-Input" } ], "description": "The type of tool", @@ -31614,7 +31386,6 @@ "mapping": { "client": "#/components/schemas/ClientToolConfig-Input", "mcp": "#/components/schemas/MCPToolConfig-Input", - "native_mcp": "#/components/schemas/NativeMCPToolConfig-Input", "system": "#/components/schemas/SystemToolConfig-Input", "webhook": "#/components/schemas/WebhookToolConfig-Input" } @@ -31739,9 +31510,6 @@ }, { "$ref": "#/components/schemas/MCPToolConfig-Output" - }, - { - "$ref": "#/components/schemas/NativeMCPToolConfig-Output" } ], "description": "The type of tool", @@ -31750,7 +31518,6 @@ "mapping": { "client": "#/components/schemas/ClientToolConfig-Output", "mcp": "#/components/schemas/MCPToolConfig-Output", - "native_mcp": "#/components/schemas/NativeMCPToolConfig-Output", "system": "#/components/schemas/SystemToolConfig-Output", "webhook": "#/components/schemas/WebhookToolConfig-Output" } @@ -31875,9 +31642,6 @@ }, { "$ref": "#/components/schemas/MCPToolConfig-Input" - }, - { - "$ref": "#/components/schemas/NativeMCPToolConfig-Input" } ], "description": "The type of tool", @@ -31886,7 +31650,6 @@ "mapping": { "client": "#/components/schemas/ClientToolConfig-Input", "mcp": "#/components/schemas/MCPToolConfig-Input", - "native_mcp": "#/components/schemas/NativeMCPToolConfig-Input", "system": "#/components/schemas/SystemToolConfig-Input", "webhook": "#/components/schemas/WebhookToolConfig-Input" } @@ -31962,6 +31725,9 @@ "type": "string" }, "title": "Knowledge Base Document Ids" + }, + "built_in_tools": { + "$ref": "#/components/schemas/BuiltInTools" } }, "example": { @@ -33473,77 +33239,6 @@ ], "title": "ShareOptionResponseModel" }, - "SharedSoundGenerationResponseModel": { - "type": "object", - "properties": { - "public_user_id": { - "type": "string", - "title": "Public User Id" - }, - "history_item_id": { - "type": "string", - "title": "History Item Id" - }, - "generation_id": { - "type": "string", - "title": "Generation Id" - }, - "text": { - "type": "string", - "title": "Text" - }, - "category": { - "type": "string", - "title": "Category" - }, - "labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "title": "Labels" - }, - "purchased_count": { - "type": "integer", - "title": "Purchased Count" - }, - "like_count": { - "type": "integer", - "title": "Like Count" - }, - "featured": { - "type": "boolean", - "title": "Featured" - }, - "preview_url": { - "type": "string", - "title": "Preview Url" - }, - "purchased": { - "type": "boolean", - "title": "Purchased" - }, - "icon_url": { - "type": "string", - "title": "Icon Url" - } - }, - "required": [ - "public_user_id", - "history_item_id", - "generation_id", - "text", - "category", - "labels", - "purchased_count", - "like_count", - "featured", - "preview_url", - "purchased", - "icon_url" - ], - "title": "SharedSoundGenerationResponseModel" - }, "SimilarVoice": { "type": "object", "properties": { @@ -34954,6 +34649,55 @@ "type": "null" } ] + }, + "optimize_streaming_latency": { + "anyOf": [ + { + "$ref": "#/components/schemas/TTSOptimizeStreamingLatency" + }, + { + "type": "null" + } + ] + }, + "stability": { + "anyOf": [ + { + "type": "number", + "maximum": 1, + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Stability" + }, + "speed": { + "anyOf": [ + { + "type": "number", + "maximum": 1.2, + "minimum": 0.7 + }, + { + "type": "null" + } + ], + "title": "Speed" + }, + "similarity_boost": { + "anyOf": [ + { + "type": "number", + "maximum": 1, + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Similarity Boost" } }, "required": [ @@ -35409,6 +35153,12 @@ "$ref": "#/components/schemas/PhoneNumberTransfer" }, "title": "Transfers" + }, + "enable_client_message": { + "description": "Whether to play a message to the client while they wait for transfer. Defaults to true for backward compatibility.", + "type": "boolean", + "default": true, + "title": "Enable Client Message" } }, "required": [ @@ -38002,6 +37752,10 @@ "description": "Text contents of the widget", "$ref": "#/components/schemas/WidgetTextContents" }, + "styles": { + "description": "Styles for the widget", + "$ref": "#/components/schemas/WidgetStyles" + }, "language_selector": { "description": "Whether to show the language selector", "type": "boolean", @@ -38318,6 +38072,10 @@ "description": "Text contents of the widget", "$ref": "#/components/schemas/WidgetTextContents" }, + "styles": { + "description": "Styles for the widget", + "$ref": "#/components/schemas/WidgetStyles" + }, "language_selector": { "description": "Whether to show the language selector", "type": "boolean", @@ -38634,6 +38392,10 @@ "description": "Text contents of the widget", "$ref": "#/components/schemas/WidgetTextContents" }, + "styles": { + "description": "Styles for the widget", + "$ref": "#/components/schemas/WidgetStyles" + }, "language": { "type": "string", "title": "Language" @@ -38791,6 +38553,252 @@ ], "title": "WidgetPlacement" }, + "WidgetStyles": { + "type": "object", + "properties": { + "base": { + "description": "The base background color.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Base" + }, + "base_hover": { + "description": "The color of the base background when hovered.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Base Hover" + }, + "base_active": { + "description": "The color of the base background when active (clicked).", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Base Active" + }, + "base_border": { + "description": "The color of the border against the base background.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Base Border" + }, + "base_subtle": { + "description": "The color of subtle text against the base background.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Base Subtle" + }, + "base_primary": { + "description": "The color of primary text against the base background.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Base Primary" + }, + "base_error": { + "description": "The color of error text against the base background.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Base Error" + }, + "accent": { + "description": "The accent background color.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Accent" + }, + "accent_hover": { + "description": "The color of the accent background when hovered.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Accent Hover" + }, + "accent_active": { + "description": "The color of the accent background when active (clicked).", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Accent Active" + }, + "accent_border": { + "description": "The color of the border against the accent background.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Accent Border" + }, + "accent_subtle": { + "description": "The color of subtle text against the accent background.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Accent Subtle" + }, + "accent_primary": { + "description": "The color of primary text against the accent background.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Accent Primary" + }, + "overlay_padding": { + "description": "The padding around the edges of the viewport.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Overlay Padding" + }, + "button_radius": { + "description": "The radius of the buttons.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Button Radius" + }, + "input_radius": { + "description": "The radius of the input fields.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Input Radius" + }, + "bubble_radius": { + "description": "The radius of the chat bubbles.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Bubble Radius" + }, + "sheet_radius": { + "description": "The default radius of sheets.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Sheet Radius" + }, + "compact_sheet_radius": { + "description": "The radius of the sheet in compact mode.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Compact Sheet Radius" + }, + "dropdown_sheet_radius": { + "description": "The radius of the dropdown sheet.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Dropdown Sheet Radius" + } + }, + "title": "WidgetStyles" + }, "WidgetTextContents": { "type": "object", "properties": { @@ -39136,7 +39144,7 @@ "convai_secrets", "music_latent", "convai_phone_numbers", - "convai_mcps", + "convai_mcp_servers", "convai_batch_calls" ], "title": "WorkspaceResourceType" @@ -39154,7 +39162,7 @@ }, { "name": "speech-to-text", - "description": "Transcribe your audio files with detailed speaker annotations and precise timestamps using our cutting-edge model. Speech-to-text is currently in alpha and available to a select group of users. We plan to roll it out more broadly soon." + "description": "Transcribe your audio files with detailed speaker annotations and precise timestamps using our cutting-edge model." }, { "name": "forced-alignment", @@ -39166,7 +39174,7 @@ }, { "name": "voices", - "description": "Access to voices created either by you or us." + "description": "Access to voices created either by you or ElevenLabs." }, { "name": "samples", @@ -39177,8 +39185,8 @@ "description": "Accesses your speech history. Your speech history is a list of all your created audio including its metadata using our text-to-speech and speech-to-speech models." }, { - "name": "projects", - "description": "Access, create and convert Projects programmatically, only specifically whitelisted accounts can access the Projects API. If you need access please contact our sales team." + "name": "studios", + "description": "Access, create and convert Studio Projects programmatically, only specifically whitelisted accounts can access the Projects API. If you need access please contact our sales team." } ] } \ No newline at end of file diff --git a/poetry.lock b/poetry.lock index f9668e89..b5b8add7 100644 --- a/poetry.lock +++ b/poetry.lock @@ -560,18 +560,18 @@ six = ">=1.5" [[package]] name = "requests" -version = "2.32.3" +version = "2.32.4" description = "Python HTTP for Humans." optional = false python-versions = ">=3.8" files = [ - {file = "requests-2.32.3-py3-none-any.whl", hash = "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6"}, - {file = "requests-2.32.3.tar.gz", hash = "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760"}, + {file = "requests-2.32.4-py3-none-any.whl", hash = "sha256:27babd3cda2a6d50b30443204ee89830707d396671944c998b5975b031ac2b2c"}, + {file = "requests-2.32.4.tar.gz", hash = "sha256:27d0316682c8a29834d3264820024b62a36942083d52caf2f14c0591336d3422"}, ] [package.dependencies] certifi = ">=2017.4.17" -charset-normalizer = ">=2,<4" +charset_normalizer = ">=2,<4" idna = ">=2.5,<4" urllib3 = ">=1.21.1,<3" diff --git a/pyproject.toml b/pyproject.toml index deeaeb4b..693641c8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "elevenlabs" [tool.poetry] name = "elevenlabs" -version = "v2.3.0" +version = "v2.4.0" description = "" readme = "README.md" authors = [] diff --git a/reference.md b/reference.md index 06a20977..e35662f4 100644 --- a/reference.md +++ b/reference.md @@ -2264,7 +2264,7 @@ client.voices.search(
-**voice_type:** `typing.Optional[str]` — Type of the voice to filter by. One of 'personal', 'community', 'default', 'workspace', 'non-default'. 'non-default' is equal to 'personal' plus 'community'. +**voice_type:** `typing.Optional[str]` — Type of the voice to filter by. One of 'personal', 'community', 'default', 'workspace', 'non-default'. 'non-default' is equal to all but 'default'.
@@ -4331,6 +4331,77 @@ client.pronunciation_dictionaries.list() + + + + +## Workspace +
client.workspace.update_user_auto_provisioning(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update user auto provisioning settings for the workspace. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from elevenlabs import ElevenLabs + +client = ElevenLabs( + api_key="YOUR_API_KEY", +) +client.workspace.update_user_auto_provisioning( + enabled=True, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**enabled:** `bool` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
@@ -4476,7 +4547,15 @@ typing.Optional[core.File]` — See core.File for more documentation
-**webhook:** `typing.Optional[bool]` — Whether to send the transcription result to configured speech-to-text webhooks. If set the request will return early without the transcription, which will be delivered later via webhook. Webhooks can be created and assigned to a transcription task in webhook settings page in the UI. +**webhook:** `typing.Optional[bool]` — Whether to send the transcription result to configured speech-to-text webhooks. If set the request will return early without the transcription, which will be delivered later via webhook. + +
+
+ +
+
+ +**temperature:** `typing.Optional[float]` — Controls the randomness of the transcription output. Accepts values between 0.0 and 2.0, where higher values result in more diverse and less deterministic results. If omitted, we will use a temperature based on the model you selected which is usually 0.
diff --git a/src/elevenlabs/__init__.py b/src/elevenlabs/__init__.py index d511cd1c..35863e29 100644 --- a/src/elevenlabs/__init__.py +++ b/src/elevenlabs/__init__.py @@ -80,6 +80,7 @@ BodyStreamChapterAudioV1ProjectsProjectIdChaptersChapterIdSnapshotsChapterSnapshotIdStreamPost, BodyStreamProjectAudioV1ProjectsProjectIdSnapshotsProjectSnapshotIdStreamPost, BreakdownTypes, + BuiltInTools, ChapterContentBlockExtendableNodeResponseModel, ChapterContentBlockInputModel, ChapterContentBlockInputModelSubType, @@ -316,7 +317,6 @@ GetPronunciationDictionaryMetadataResponse, GetPronunciationDictionaryMetadataResponseModelPermissionOnResource, GetPronunciationDictionaryResponse, - GetSharedSoundGenerationsResponseModel, GetSpeechHistoryResponse, GetVoicesResponse, GetVoicesV2Response, @@ -330,6 +330,7 @@ InitialiseContext, InitializeConnection, InitializeConnectionMulti, + IntegrationType, InvoiceResponse, KeepContextAlive, KnowledgeBaseDocumentChunkResponseModel, @@ -357,7 +358,7 @@ LlmUsageOutput, ManualVerificationFileResponse, ManualVerificationResponse, - McpApprovalRequiredModel, + McpApprovalPolicy, McpToolConfigInput, McpToolConfigOutput, MetricRecord, @@ -369,8 +370,6 @@ ModerationStatusResponseModel, ModerationStatusResponseModelSafetyStatus, ModerationStatusResponseModelWarningStatus, - NativeMcpToolConfigInput, - NativeMcpToolConfigOutput, NormalizedAlignment, ObjectJsonSchemaPropertyInput, ObjectJsonSchemaPropertyInputPropertiesValue, @@ -417,19 +416,16 @@ PromptAgentDbModelToolsItem, PromptAgentDbModelToolsItem_Client, PromptAgentDbModelToolsItem_Mcp, - PromptAgentDbModelToolsItem_NativeMcp, PromptAgentDbModelToolsItem_System, PromptAgentDbModelToolsItem_Webhook, PromptAgentInputToolsItem, PromptAgentInputToolsItem_Client, PromptAgentInputToolsItem_Mcp, - PromptAgentInputToolsItem_NativeMcp, PromptAgentInputToolsItem_System, PromptAgentInputToolsItem_Webhook, PromptAgentOutputToolsItem, PromptAgentOutputToolsItem_Client, PromptAgentOutputToolsItem_Mcp, - PromptAgentOutputToolsItem_NativeMcp, PromptAgentOutputToolsItem_System, PromptAgentOutputToolsItem_Webhook, PromptAgentOverride, @@ -483,7 +479,6 @@ SendTextMulti, ShareOptionResponseModel, ShareOptionResponseModelType, - SharedSoundGenerationResponseModel, SimilarVoice, SimilarVoiceCategory, SimilarVoicesForSpeakerResponse, @@ -615,6 +610,7 @@ WidgetLanguagePreset, WidgetLanguagePresetResponse, WidgetPlacement, + WidgetStyles, WidgetTextContents, WorkspaceBatchCallsResponse, WorkspaceGroupByNameResponseModel, @@ -793,6 +789,7 @@ "BodyTextToSpeechV1TextToSpeechVoiceIdPostApplyTextNormalization", "BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPostApplyTextNormalization", "BreakdownTypes", + "BuiltInTools", "ChapterContentBlockExtendableNodeResponseModel", "ChapterContentBlockInputModel", "ChapterContentBlockInputModelSubType", @@ -1032,7 +1029,6 @@ "GetPronunciationDictionaryMetadataResponse", "GetPronunciationDictionaryMetadataResponseModelPermissionOnResource", "GetPronunciationDictionaryResponse", - "GetSharedSoundGenerationsResponseModel", "GetSpeechHistoryResponse", "GetVoicesResponse", "GetVoicesV2Response", @@ -1047,6 +1043,7 @@ "InitialiseContext", "InitializeConnection", "InitializeConnectionMulti", + "IntegrationType", "InvoiceResponse", "KeepContextAlive", "KnowledgeBaseDocumentChunkResponseModel", @@ -1074,7 +1071,7 @@ "LlmUsageOutput", "ManualVerificationFileResponse", "ManualVerificationResponse", - "McpApprovalRequiredModel", + "McpApprovalPolicy", "McpToolConfigInput", "McpToolConfigOutput", "MetricRecord", @@ -1086,8 +1083,6 @@ "ModerationStatusResponseModel", "ModerationStatusResponseModelSafetyStatus", "ModerationStatusResponseModelWarningStatus", - "NativeMcpToolConfigInput", - "NativeMcpToolConfigOutput", "NormalizedAlignment", "NotFoundError", "ObjectJsonSchemaPropertyInput", @@ -1135,19 +1130,16 @@ "PromptAgentDbModelToolsItem", "PromptAgentDbModelToolsItem_Client", "PromptAgentDbModelToolsItem_Mcp", - "PromptAgentDbModelToolsItem_NativeMcp", "PromptAgentDbModelToolsItem_System", "PromptAgentDbModelToolsItem_Webhook", "PromptAgentInputToolsItem", "PromptAgentInputToolsItem_Client", "PromptAgentInputToolsItem_Mcp", - "PromptAgentInputToolsItem_NativeMcp", "PromptAgentInputToolsItem_System", "PromptAgentInputToolsItem_Webhook", "PromptAgentOutputToolsItem", "PromptAgentOutputToolsItem_Client", "PromptAgentOutputToolsItem_Mcp", - "PromptAgentOutputToolsItem_NativeMcp", "PromptAgentOutputToolsItem_System", "PromptAgentOutputToolsItem_Webhook", "PromptAgentOverride", @@ -1207,7 +1199,6 @@ "SendTextMulti", "ShareOptionResponseModel", "ShareOptionResponseModelType", - "SharedSoundGenerationResponseModel", "SimilarVoice", "SimilarVoiceCategory", "SimilarVoicesForSpeakerResponse", @@ -1356,6 +1347,7 @@ "WidgetLanguagePreset", "WidgetLanguagePresetResponse", "WidgetPlacement", + "WidgetStyles", "WidgetTextContents", "WorkspaceBatchCallsResponse", "WorkspaceGroupByNameResponseModel", diff --git a/src/elevenlabs/base_client.py b/src/elevenlabs/base_client.py index d23fb6ef..50e2f1cf 100644 --- a/src/elevenlabs/base_client.py +++ b/src/elevenlabs/base_client.py @@ -100,10 +100,10 @@ def __init__( self.audio_native = AudioNativeClient(client_wrapper=self._client_wrapper) self.usage = UsageClient(client_wrapper=self._client_wrapper) self.pronunciation_dictionaries = PronunciationDictionariesClient(client_wrapper=self._client_wrapper) + self.workspace = WorkspaceClient(client_wrapper=self._client_wrapper) self.speech_to_text = SpeechToTextClient(client_wrapper=self._client_wrapper) self.forced_alignment = ForcedAlignmentClient(client_wrapper=self._client_wrapper) self.conversational_ai = ConversationalAiClient(client_wrapper=self._client_wrapper) - self.workspace = WorkspaceClient(client_wrapper=self._client_wrapper) class AsyncBaseElevenLabs: @@ -178,7 +178,7 @@ def __init__( self.audio_native = AsyncAudioNativeClient(client_wrapper=self._client_wrapper) self.usage = AsyncUsageClient(client_wrapper=self._client_wrapper) self.pronunciation_dictionaries = AsyncPronunciationDictionariesClient(client_wrapper=self._client_wrapper) + self.workspace = AsyncWorkspaceClient(client_wrapper=self._client_wrapper) self.speech_to_text = AsyncSpeechToTextClient(client_wrapper=self._client_wrapper) self.forced_alignment = AsyncForcedAlignmentClient(client_wrapper=self._client_wrapper) self.conversational_ai = AsyncConversationalAiClient(client_wrapper=self._client_wrapper) - self.workspace = AsyncWorkspaceClient(client_wrapper=self._client_wrapper) diff --git a/src/elevenlabs/conversational_ai/conversations/feedback/raw_client.py b/src/elevenlabs/conversational_ai/conversations/feedback/raw_client.py index 468b674a..6746144c 100644 --- a/src/elevenlabs/conversational_ai/conversations/feedback/raw_client.py +++ b/src/elevenlabs/conversational_ai/conversations/feedback/raw_client.py @@ -61,6 +61,8 @@ def create( omit=OMIT, ) try: + if _response is None or not _response.text.strip(): + return HttpResponse(response=_response, data=None) if 200 <= _response.status_code < 300: _data = typing.cast( typing.Optional[typing.Any], @@ -131,6 +133,8 @@ async def create( omit=OMIT, ) try: + if _response is None or not _response.text.strip(): + return AsyncHttpResponse(response=_response, data=None) if 200 <= _response.status_code < 300: _data = typing.cast( typing.Optional[typing.Any], diff --git a/src/elevenlabs/conversational_ai/conversations/raw_client.py b/src/elevenlabs/conversational_ai/conversations/raw_client.py index 4f54ced7..96b57143 100644 --- a/src/elevenlabs/conversational_ai/conversations/raw_client.py +++ b/src/elevenlabs/conversational_ai/conversations/raw_client.py @@ -234,6 +234,8 @@ def delete( request_options=request_options, ) try: + if _response is None or not _response.text.strip(): + return HttpResponse(response=_response, data=None) if 200 <= _response.status_code < 300: _data = typing.cast( typing.Optional[typing.Any], @@ -477,6 +479,8 @@ async def delete( request_options=request_options, ) try: + if _response is None or not _response.text.strip(): + return AsyncHttpResponse(response=_response, data=None) if 200 <= _response.status_code < 300: _data = typing.cast( typing.Optional[typing.Any], diff --git a/src/elevenlabs/conversational_ai/knowledge_base/documents/raw_client.py b/src/elevenlabs/conversational_ai/knowledge_base/documents/raw_client.py index 7df64c6d..a2acdb40 100644 --- a/src/elevenlabs/conversational_ai/knowledge_base/documents/raw_client.py +++ b/src/elevenlabs/conversational_ai/knowledge_base/documents/raw_client.py @@ -302,6 +302,8 @@ def delete( request_options=request_options, ) try: + if _response is None or not _response.text.strip(): + return HttpResponse(response=_response, data=None) if 200 <= _response.status_code < 300: _data = typing.cast( typing.Optional[typing.Any], @@ -779,6 +781,8 @@ async def delete( request_options=request_options, ) try: + if _response is None or not _response.text.strip(): + return AsyncHttpResponse(response=_response, data=None) if 200 <= _response.status_code < 300: _data = typing.cast( typing.Optional[typing.Any], diff --git a/src/elevenlabs/conversational_ai/phone_numbers/raw_client.py b/src/elevenlabs/conversational_ai/phone_numbers/raw_client.py index 7f3c8187..b5e028bc 100644 --- a/src/elevenlabs/conversational_ai/phone_numbers/raw_client.py +++ b/src/elevenlabs/conversational_ai/phone_numbers/raw_client.py @@ -160,6 +160,8 @@ def delete( request_options=request_options, ) try: + if _response is None or not _response.text.strip(): + return HttpResponse(response=_response, data=None) if 200 <= _response.status_code < 300: _data = typing.cast( typing.Optional[typing.Any], @@ -436,6 +438,8 @@ async def delete( request_options=request_options, ) try: + if _response is None or not _response.text.strip(): + return AsyncHttpResponse(response=_response, data=None) if 200 <= _response.status_code < 300: _data = typing.cast( typing.Optional[typing.Any], diff --git a/src/elevenlabs/core/client_wrapper.py b/src/elevenlabs/core/client_wrapper.py index 87a73714..24bbfe41 100644 --- a/src/elevenlabs/core/client_wrapper.py +++ b/src/elevenlabs/core/client_wrapper.py @@ -21,10 +21,10 @@ def __init__( def get_headers(self) -> typing.Dict[str, str]: headers: typing.Dict[str, str] = { - "User-Agent": "elevenlabs/v2.3.0", + "User-Agent": "elevenlabs/v2.4.0", "X-Fern-Language": "Python", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "v2.3.0", + "X-Fern-SDK-Version": "v2.4.0", } if self._api_key is not None: headers["xi-api-key"] = self._api_key diff --git a/src/elevenlabs/speech_to_text/client.py b/src/elevenlabs/speech_to_text/client.py index c2367d48..577c69b8 100644 --- a/src/elevenlabs/speech_to_text/client.py +++ b/src/elevenlabs/speech_to_text/client.py @@ -45,6 +45,7 @@ def convert( file_format: typing.Optional[SpeechToTextConvertRequestFileFormat] = OMIT, cloud_storage_url: typing.Optional[str] = OMIT, webhook: typing.Optional[bool] = OMIT, + temperature: typing.Optional[float] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> SpeechToTextChunkResponseModel: """ @@ -86,7 +87,10 @@ def convert( The valid AWS S3, Cloudflare R2 or Google Cloud Storage URL of the file to transcribe. Exactly one of the file or cloud_storage_url parameters must be provided. The file must be a valid publicly accessible cloud storage URL. The file size must be less than 2GB. URL can be pre-signed. webhook : typing.Optional[bool] - Whether to send the transcription result to configured speech-to-text webhooks. If set the request will return early without the transcription, which will be delivered later via webhook. Webhooks can be created and assigned to a transcription task in webhook settings page in the UI. + Whether to send the transcription result to configured speech-to-text webhooks. If set the request will return early without the transcription, which will be delivered later via webhook. + + temperature : typing.Optional[float] + Controls the randomness of the transcription output. Accepts values between 0.0 and 2.0, where higher values result in more diverse and less deterministic results. If omitted, we will use a temperature based on the model you selected which is usually 0. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -120,6 +124,7 @@ def convert( file_format=file_format, cloud_storage_url=cloud_storage_url, webhook=webhook, + temperature=temperature, request_options=request_options, ) return _response.data @@ -155,6 +160,7 @@ async def convert( file_format: typing.Optional[SpeechToTextConvertRequestFileFormat] = OMIT, cloud_storage_url: typing.Optional[str] = OMIT, webhook: typing.Optional[bool] = OMIT, + temperature: typing.Optional[float] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> SpeechToTextChunkResponseModel: """ @@ -196,7 +202,10 @@ async def convert( The valid AWS S3, Cloudflare R2 or Google Cloud Storage URL of the file to transcribe. Exactly one of the file or cloud_storage_url parameters must be provided. The file must be a valid publicly accessible cloud storage URL. The file size must be less than 2GB. URL can be pre-signed. webhook : typing.Optional[bool] - Whether to send the transcription result to configured speech-to-text webhooks. If set the request will return early without the transcription, which will be delivered later via webhook. Webhooks can be created and assigned to a transcription task in webhook settings page in the UI. + Whether to send the transcription result to configured speech-to-text webhooks. If set the request will return early without the transcription, which will be delivered later via webhook. + + temperature : typing.Optional[float] + Controls the randomness of the transcription output. Accepts values between 0.0 and 2.0, where higher values result in more diverse and less deterministic results. If omitted, we will use a temperature based on the model you selected which is usually 0. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -238,6 +247,7 @@ async def main() -> None: file_format=file_format, cloud_storage_url=cloud_storage_url, webhook=webhook, + temperature=temperature, request_options=request_options, ) return _response.data diff --git a/src/elevenlabs/speech_to_text/raw_client.py b/src/elevenlabs/speech_to_text/raw_client.py index 68285916..3aa08f7c 100644 --- a/src/elevenlabs/speech_to_text/raw_client.py +++ b/src/elevenlabs/speech_to_text/raw_client.py @@ -39,6 +39,7 @@ def convert( file_format: typing.Optional[SpeechToTextConvertRequestFileFormat] = OMIT, cloud_storage_url: typing.Optional[str] = OMIT, webhook: typing.Optional[bool] = OMIT, + temperature: typing.Optional[float] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[SpeechToTextChunkResponseModel]: """ @@ -80,7 +81,10 @@ def convert( The valid AWS S3, Cloudflare R2 or Google Cloud Storage URL of the file to transcribe. Exactly one of the file or cloud_storage_url parameters must be provided. The file must be a valid publicly accessible cloud storage URL. The file size must be less than 2GB. URL can be pre-signed. webhook : typing.Optional[bool] - Whether to send the transcription result to configured speech-to-text webhooks. If set the request will return early without the transcription, which will be delivered later via webhook. Webhooks can be created and assigned to a transcription task in webhook settings page in the UI. + Whether to send the transcription result to configured speech-to-text webhooks. If set the request will return early without the transcription, which will be delivered later via webhook. + + temperature : typing.Optional[float] + Controls the randomness of the transcription output. Accepts values between 0.0 and 2.0, where higher values result in more diverse and less deterministic results. If omitted, we will use a temperature based on the model you selected which is usually 0. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -108,6 +112,7 @@ def convert( "file_format": file_format, "cloud_storage_url": cloud_storage_url, "webhook": webhook, + "temperature": temperature, }, files={ **({"file": file} if file is not None else {}), @@ -162,6 +167,7 @@ async def convert( file_format: typing.Optional[SpeechToTextConvertRequestFileFormat] = OMIT, cloud_storage_url: typing.Optional[str] = OMIT, webhook: typing.Optional[bool] = OMIT, + temperature: typing.Optional[float] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[SpeechToTextChunkResponseModel]: """ @@ -203,7 +209,10 @@ async def convert( The valid AWS S3, Cloudflare R2 or Google Cloud Storage URL of the file to transcribe. Exactly one of the file or cloud_storage_url parameters must be provided. The file must be a valid publicly accessible cloud storage URL. The file size must be less than 2GB. URL can be pre-signed. webhook : typing.Optional[bool] - Whether to send the transcription result to configured speech-to-text webhooks. If set the request will return early without the transcription, which will be delivered later via webhook. Webhooks can be created and assigned to a transcription task in webhook settings page in the UI. + Whether to send the transcription result to configured speech-to-text webhooks. If set the request will return early without the transcription, which will be delivered later via webhook. + + temperature : typing.Optional[float] + Controls the randomness of the transcription output. Accepts values between 0.0 and 2.0, where higher values result in more diverse and less deterministic results. If omitted, we will use a temperature based on the model you selected which is usually 0. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -231,6 +240,7 @@ async def convert( "file_format": file_format, "cloud_storage_url": cloud_storage_url, "webhook": webhook, + "temperature": temperature, }, files={ **({"file": file} if file is not None else {}), diff --git a/src/elevenlabs/types/__init__.py b/src/elevenlabs/types/__init__.py index 3bfc3ba6..1a0e8cd3 100644 --- a/src/elevenlabs/types/__init__.py +++ b/src/elevenlabs/types/__init__.py @@ -113,6 +113,7 @@ BodyStreamProjectAudioV1ProjectsProjectIdSnapshotsProjectSnapshotIdStreamPost, ) from .breakdown_types import BreakdownTypes +from .built_in_tools import BuiltInTools from .chapter_content_block_extendable_node_response_model import ChapterContentBlockExtendableNodeResponseModel from .chapter_content_block_input_model import ChapterContentBlockInputModel from .chapter_content_block_input_model_sub_type import ChapterContentBlockInputModelSubType @@ -399,7 +400,6 @@ GetPronunciationDictionaryMetadataResponseModelPermissionOnResource, ) from .get_pronunciation_dictionary_response import GetPronunciationDictionaryResponse -from .get_shared_sound_generations_response_model import GetSharedSoundGenerationsResponseModel from .get_speech_history_response import GetSpeechHistoryResponse from .get_voices_response import GetVoicesResponse from .get_voices_v_2_response import GetVoicesV2Response @@ -413,6 +413,7 @@ from .initialise_context import InitialiseContext from .initialize_connection import InitializeConnection from .initialize_connection_multi import InitializeConnectionMulti +from .integration_type import IntegrationType from .invoice_response import InvoiceResponse from .keep_context_alive import KeepContextAlive from .knowledge_base_document_chunk_response_model import KnowledgeBaseDocumentChunkResponseModel @@ -440,7 +441,7 @@ from .llm_usage_output import LlmUsageOutput from .manual_verification_file_response import ManualVerificationFileResponse from .manual_verification_response import ManualVerificationResponse -from .mcp_approval_required_model import McpApprovalRequiredModel +from .mcp_approval_policy import McpApprovalPolicy from .mcp_tool_config_input import McpToolConfigInput from .mcp_tool_config_output import McpToolConfigOutput from .metric_record import MetricRecord @@ -452,8 +453,6 @@ from .moderation_status_response_model import ModerationStatusResponseModel from .moderation_status_response_model_safety_status import ModerationStatusResponseModelSafetyStatus from .moderation_status_response_model_warning_status import ModerationStatusResponseModelWarningStatus -from .native_mcp_tool_config_input import NativeMcpToolConfigInput -from .native_mcp_tool_config_output import NativeMcpToolConfigOutput from .normalized_alignment import NormalizedAlignment from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput from .object_json_schema_property_input_properties_value import ObjectJsonSchemaPropertyInputPropertiesValue @@ -501,7 +500,6 @@ PromptAgentDbModelToolsItem, PromptAgentDbModelToolsItem_Client, PromptAgentDbModelToolsItem_Mcp, - PromptAgentDbModelToolsItem_NativeMcp, PromptAgentDbModelToolsItem_System, PromptAgentDbModelToolsItem_Webhook, ) @@ -509,7 +507,6 @@ PromptAgentInputToolsItem, PromptAgentInputToolsItem_Client, PromptAgentInputToolsItem_Mcp, - PromptAgentInputToolsItem_NativeMcp, PromptAgentInputToolsItem_System, PromptAgentInputToolsItem_Webhook, ) @@ -517,7 +514,6 @@ PromptAgentOutputToolsItem, PromptAgentOutputToolsItem_Client, PromptAgentOutputToolsItem_Mcp, - PromptAgentOutputToolsItem_NativeMcp, PromptAgentOutputToolsItem_System, PromptAgentOutputToolsItem_Webhook, ) @@ -574,7 +570,6 @@ from .send_text_multi import SendTextMulti from .share_option_response_model import ShareOptionResponseModel from .share_option_response_model_type import ShareOptionResponseModelType -from .shared_sound_generation_response_model import SharedSoundGenerationResponseModel from .similar_voice import SimilarVoice from .similar_voice_category import SimilarVoiceCategory from .similar_voices_for_speaker_response import SimilarVoicesForSpeakerResponse @@ -720,6 +715,7 @@ from .widget_language_preset import WidgetLanguagePreset from .widget_language_preset_response import WidgetLanguagePresetResponse from .widget_placement import WidgetPlacement +from .widget_styles import WidgetStyles from .widget_text_contents import WidgetTextContents from .workspace_batch_calls_response import WorkspaceBatchCallsResponse from .workspace_group_by_name_response_model import WorkspaceGroupByNameResponseModel @@ -803,6 +799,7 @@ "BodyStreamChapterAudioV1ProjectsProjectIdChaptersChapterIdSnapshotsChapterSnapshotIdStreamPost", "BodyStreamProjectAudioV1ProjectsProjectIdSnapshotsProjectSnapshotIdStreamPost", "BreakdownTypes", + "BuiltInTools", "ChapterContentBlockExtendableNodeResponseModel", "ChapterContentBlockInputModel", "ChapterContentBlockInputModelSubType", @@ -1039,7 +1036,6 @@ "GetPronunciationDictionaryMetadataResponse", "GetPronunciationDictionaryMetadataResponseModelPermissionOnResource", "GetPronunciationDictionaryResponse", - "GetSharedSoundGenerationsResponseModel", "GetSpeechHistoryResponse", "GetVoicesResponse", "GetVoicesV2Response", @@ -1053,6 +1049,7 @@ "InitialiseContext", "InitializeConnection", "InitializeConnectionMulti", + "IntegrationType", "InvoiceResponse", "KeepContextAlive", "KnowledgeBaseDocumentChunkResponseModel", @@ -1080,7 +1077,7 @@ "LlmUsageOutput", "ManualVerificationFileResponse", "ManualVerificationResponse", - "McpApprovalRequiredModel", + "McpApprovalPolicy", "McpToolConfigInput", "McpToolConfigOutput", "MetricRecord", @@ -1092,8 +1089,6 @@ "ModerationStatusResponseModel", "ModerationStatusResponseModelSafetyStatus", "ModerationStatusResponseModelWarningStatus", - "NativeMcpToolConfigInput", - "NativeMcpToolConfigOutput", "NormalizedAlignment", "ObjectJsonSchemaPropertyInput", "ObjectJsonSchemaPropertyInputPropertiesValue", @@ -1140,19 +1135,16 @@ "PromptAgentDbModelToolsItem", "PromptAgentDbModelToolsItem_Client", "PromptAgentDbModelToolsItem_Mcp", - "PromptAgentDbModelToolsItem_NativeMcp", "PromptAgentDbModelToolsItem_System", "PromptAgentDbModelToolsItem_Webhook", "PromptAgentInputToolsItem", "PromptAgentInputToolsItem_Client", "PromptAgentInputToolsItem_Mcp", - "PromptAgentInputToolsItem_NativeMcp", "PromptAgentInputToolsItem_System", "PromptAgentInputToolsItem_Webhook", "PromptAgentOutputToolsItem", "PromptAgentOutputToolsItem_Client", "PromptAgentOutputToolsItem_Mcp", - "PromptAgentOutputToolsItem_NativeMcp", "PromptAgentOutputToolsItem_System", "PromptAgentOutputToolsItem_Webhook", "PromptAgentOverride", @@ -1206,7 +1198,6 @@ "SendTextMulti", "ShareOptionResponseModel", "ShareOptionResponseModelType", - "SharedSoundGenerationResponseModel", "SimilarVoice", "SimilarVoiceCategory", "SimilarVoicesForSpeakerResponse", @@ -1338,6 +1329,7 @@ "WidgetLanguagePreset", "WidgetLanguagePresetResponse", "WidgetPlacement", + "WidgetStyles", "WidgetTextContents", "WorkspaceBatchCallsResponse", "WorkspaceGroupByNameResponseModel", diff --git a/src/elevenlabs/types/built_in_tools.py b/src/elevenlabs/types/built_in_tools.py new file mode 100644 index 00000000..b5623d99 --- /dev/null +++ b/src/elevenlabs/types/built_in_tools.py @@ -0,0 +1,44 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .system_tool_config_input import SystemToolConfigInput + + +class BuiltInTools(UncheckedBaseModel): + end_call: typing.Optional[SystemToolConfigInput] = pydantic.Field(default=None) + """ + The end call tool + """ + + language_detection: typing.Optional[SystemToolConfigInput] = pydantic.Field(default=None) + """ + The language detection tool + """ + + transfer_to_agent: typing.Optional[SystemToolConfigInput] = pydantic.Field(default=None) + """ + The transfer to agent tool + """ + + transfer_to_number: typing.Optional[SystemToolConfigInput] = pydantic.Field(default=None) + """ + The transfer to number tool + """ + + skip_turn: typing.Optional[SystemToolConfigInput] = pydantic.Field(default=None) + """ + The skip turn tool + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/client_event.py b/src/elevenlabs/types/client_event.py index 76f256dc..f2b66dbe 100644 --- a/src/elevenlabs/types/client_event.py +++ b/src/elevenlabs/types/client_event.py @@ -13,10 +13,11 @@ "agent_response", "agent_response_correction", "client_tool_call", + "mcp_tool_call", + "agent_tool_response", "vad_score", "internal_turn_probability", "internal_tentative_agent_response", - "internal_native_mcp_tool_call", ], typing.Any, ] diff --git a/src/elevenlabs/types/get_shared_sound_generations_response_model.py b/src/elevenlabs/types/get_shared_sound_generations_response_model.py deleted file mode 100644 index 14601877..00000000 --- a/src/elevenlabs/types/get_shared_sound_generations_response_model.py +++ /dev/null @@ -1,23 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.unchecked_base_model import UncheckedBaseModel -from .shared_sound_generation_response_model import SharedSoundGenerationResponseModel - - -class GetSharedSoundGenerationsResponseModel(UncheckedBaseModel): - shared_sound_generations: typing.List[SharedSoundGenerationResponseModel] - last_sort_id: typing.Optional[str] = None - has_more: bool - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/integration_type.py b/src/elevenlabs/types/integration_type.py new file mode 100644 index 00000000..fd262cf8 --- /dev/null +++ b/src/elevenlabs/types/integration_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +IntegrationType = typing.Union[typing.Literal["mcp_server", "mcp_integration"], typing.Any] diff --git a/src/elevenlabs/types/invoice_response.py b/src/elevenlabs/types/invoice_response.py index df98b103..a2e6eecd 100644 --- a/src/elevenlabs/types/invoice_response.py +++ b/src/elevenlabs/types/invoice_response.py @@ -18,6 +18,11 @@ class InvoiceResponse(UncheckedBaseModel): The discount applied to the invoice. E.g. [20.0f] for 20% off. """ + discount_amount_off: typing.Optional[float] = pydantic.Field(default=None) + """ + The discount applied to the invoice. E.g. [20.0f] for 20% off. + """ + next_payment_attempt_unix: int = pydantic.Field() """ The Unix timestamp of the next payment attempt. diff --git a/src/elevenlabs/types/mcp_approval_policy.py b/src/elevenlabs/types/mcp_approval_policy.py new file mode 100644 index 00000000..c5f21ea5 --- /dev/null +++ b/src/elevenlabs/types/mcp_approval_policy.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +McpApprovalPolicy = typing.Union[ + typing.Literal["auto_approve_all", "require_approval_all", "require_approval_per_tool"], typing.Any +] diff --git a/src/elevenlabs/types/mcp_approval_required_model.py b/src/elevenlabs/types/mcp_approval_required_model.py deleted file mode 100644 index 1bbed6aa..00000000 --- a/src/elevenlabs/types/mcp_approval_required_model.py +++ /dev/null @@ -1,8 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -McpApprovalRequiredModel = typing.Union[ - typing.Literal["user_approval_always_given", "user_approval_never_given", "user_approval_required_per_tool"], - typing.Any, -] diff --git a/src/elevenlabs/types/mcp_tool_config_input.py b/src/elevenlabs/types/mcp_tool_config_input.py index 2ec14b5f..5f5e8b24 100644 --- a/src/elevenlabs/types/mcp_tool_config_input.py +++ b/src/elevenlabs/types/mcp_tool_config_input.py @@ -7,12 +7,13 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel -from .mcp_approval_required_model import McpApprovalRequiredModel +from .integration_type import IntegrationType +from .mcp_approval_policy import McpApprovalPolicy class McpToolConfigInput(UncheckedBaseModel): """ - A MCP tool is a tool that is used to call a MCP server + An MCP tool configuration that can be used to call MCP servers """ id: typing.Optional[str] = None @@ -23,24 +24,44 @@ class McpToolConfigInput(UncheckedBaseModel): The maximum time in seconds to wait for the tool call to complete. """ + integration_type: IntegrationType = pydantic.Field() + """ + The type of MCP tool + """ + parameters: typing.Optional["ObjectJsonSchemaPropertyInput"] = pydantic.Field(default=None) """ Schema for any parameters the LLM needs to provide to the MCP tool. """ + approval_policy: typing.Optional[McpApprovalPolicy] = pydantic.Field(default=None) + """ + The approval policy for the MCP tool + """ + mcp_tool_name: str = pydantic.Field() """ The name of the MCP tool to call """ + mcp_tool_description: str = pydantic.Field() + """ + The description of the MCP tool to call + """ + mcp_server_id: str = pydantic.Field() """ The id of the MCP server to call """ - approval_mode: typing.Optional[McpApprovalRequiredModel] = pydantic.Field(default=None) + mcp_server_name: str = pydantic.Field() + """ + The name of the MCP server to call + """ + + mcp_input_schema: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None) """ - If set to approved, the tool will be pre-approved and not require user approval before executing + Original inputSchema dict for consistent hashing (pure MCP format) """ if IS_PYDANTIC_V2: diff --git a/src/elevenlabs/types/mcp_tool_config_output.py b/src/elevenlabs/types/mcp_tool_config_output.py index 34cc0cea..4630f2eb 100644 --- a/src/elevenlabs/types/mcp_tool_config_output.py +++ b/src/elevenlabs/types/mcp_tool_config_output.py @@ -7,12 +7,13 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel -from .mcp_approval_required_model import McpApprovalRequiredModel +from .integration_type import IntegrationType +from .mcp_approval_policy import McpApprovalPolicy class McpToolConfigOutput(UncheckedBaseModel): """ - A MCP tool is a tool that is used to call a MCP server + An MCP tool configuration that can be used to call MCP servers """ id: typing.Optional[str] = None @@ -23,24 +24,44 @@ class McpToolConfigOutput(UncheckedBaseModel): The maximum time in seconds to wait for the tool call to complete. """ + integration_type: IntegrationType = pydantic.Field() + """ + The type of MCP tool + """ + parameters: typing.Optional["ObjectJsonSchemaPropertyOutput"] = pydantic.Field(default=None) """ Schema for any parameters the LLM needs to provide to the MCP tool. """ + approval_policy: typing.Optional[McpApprovalPolicy] = pydantic.Field(default=None) + """ + The approval policy for the MCP tool + """ + mcp_tool_name: str = pydantic.Field() """ The name of the MCP tool to call """ + mcp_tool_description: str = pydantic.Field() + """ + The description of the MCP tool to call + """ + mcp_server_id: str = pydantic.Field() """ The id of the MCP server to call """ - approval_mode: typing.Optional[McpApprovalRequiredModel] = pydantic.Field(default=None) + mcp_server_name: str = pydantic.Field() + """ + The name of the MCP server to call + """ + + mcp_input_schema: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None) """ - If set to approved, the tool will be pre-approved and not require user approval before executing + Original inputSchema dict for consistent hashing (pure MCP format) """ if IS_PYDANTIC_V2: diff --git a/src/elevenlabs/types/native_mcp_tool_config_input.py b/src/elevenlabs/types/native_mcp_tool_config_input.py deleted file mode 100644 index 70e68825..00000000 --- a/src/elevenlabs/types/native_mcp_tool_config_input.py +++ /dev/null @@ -1,59 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs -from ..core.unchecked_base_model import UncheckedBaseModel -from .mcp_approval_required_model import McpApprovalRequiredModel - - -class NativeMcpToolConfigInput(UncheckedBaseModel): - """ - A Native MCP tool is a tool that is used to call a Native MCP server - """ - - id: typing.Optional[str] = None - name: str - description: str - response_timeout_secs: typing.Optional[int] = pydantic.Field(default=None) - """ - The maximum time in seconds to wait for the tool call to complete. - """ - - parameters: typing.Optional["ObjectJsonSchemaPropertyInput"] = pydantic.Field(default=None) - """ - Schema for any parameters the LLM needs to provide to the MCP tool. - """ - - mcp_tool_name: str = pydantic.Field() - """ - The name of the MCP tool to call - """ - - mcp_server_id: str = pydantic.Field() - """ - The id of the MCP server to call - """ - - approval_mode: typing.Optional[McpApprovalRequiredModel] = pydantic.Field(default=None) - """ - If set to always accept, the tool will be pre-approved and not require user approval before executing - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .array_json_schema_property_input import ArrayJsonSchemaPropertyInput # noqa: E402, F401, I001 -from .object_json_schema_property_input import ObjectJsonSchemaPropertyInput # noqa: E402, F401, I001 - -update_forward_refs(NativeMcpToolConfigInput) diff --git a/src/elevenlabs/types/native_mcp_tool_config_output.py b/src/elevenlabs/types/native_mcp_tool_config_output.py deleted file mode 100644 index 309fdbe3..00000000 --- a/src/elevenlabs/types/native_mcp_tool_config_output.py +++ /dev/null @@ -1,59 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs -from ..core.unchecked_base_model import UncheckedBaseModel -from .mcp_approval_required_model import McpApprovalRequiredModel - - -class NativeMcpToolConfigOutput(UncheckedBaseModel): - """ - A Native MCP tool is a tool that is used to call a Native MCP server - """ - - id: typing.Optional[str] = None - name: str - description: str - response_timeout_secs: typing.Optional[int] = pydantic.Field(default=None) - """ - The maximum time in seconds to wait for the tool call to complete. - """ - - parameters: typing.Optional["ObjectJsonSchemaPropertyOutput"] = pydantic.Field(default=None) - """ - Schema for any parameters the LLM needs to provide to the MCP tool. - """ - - mcp_tool_name: str = pydantic.Field() - """ - The name of the MCP tool to call - """ - - mcp_server_id: str = pydantic.Field() - """ - The id of the MCP server to call - """ - - approval_mode: typing.Optional[McpApprovalRequiredModel] = pydantic.Field(default=None) - """ - If set to always accept, the tool will be pre-approved and not require user approval before executing - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -from .array_json_schema_property_output import ArrayJsonSchemaPropertyOutput # noqa: E402, F401, I001 -from .object_json_schema_property_output import ObjectJsonSchemaPropertyOutput # noqa: E402, F401, I001 - -update_forward_refs(NativeMcpToolConfigOutput) diff --git a/src/elevenlabs/types/prompt_agent_db_model.py b/src/elevenlabs/types/prompt_agent_db_model.py index 19f53f17..8f586e2c 100644 --- a/src/elevenlabs/types/prompt_agent_db_model.py +++ b/src/elevenlabs/types/prompt_agent_db_model.py @@ -7,6 +7,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel +from .built_in_tools import BuiltInTools from .custom_llm import CustomLlm from .knowledge_base_locator import KnowledgeBaseLocator from .llm import Llm @@ -76,6 +77,7 @@ class PromptAgentDbModel(UncheckedBaseModel): """ knowledge_base_document_ids: typing.Optional[typing.List[str]] = None + built_in_tools: typing.Optional[BuiltInTools] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/types/prompt_agent_db_model_tools_item.py b/src/elevenlabs/types/prompt_agent_db_model_tools_item.py index 8c54ae18..8072c9c8 100644 --- a/src/elevenlabs/types/prompt_agent_db_model_tools_item.py +++ b/src/elevenlabs/types/prompt_agent_db_model_tools_item.py @@ -9,7 +9,8 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata from .dynamic_variables_config import DynamicVariablesConfig -from .mcp_approval_required_model import McpApprovalRequiredModel +from .integration_type import IntegrationType +from .mcp_approval_policy import McpApprovalPolicy from .system_tool_config_input_params import SystemToolConfigInputParams from .webhook_tool_api_schema_config_input import WebhookToolApiSchemaConfigInput @@ -48,35 +49,14 @@ class PromptAgentDbModelToolsItem_Mcp(UncheckedBaseModel): name: str description: str response_timeout_secs: typing.Optional[int] = None + integration_type: IntegrationType parameters: typing.Optional["ObjectJsonSchemaPropertyInput"] = None + approval_policy: typing.Optional[McpApprovalPolicy] = None mcp_tool_name: str + mcp_tool_description: str mcp_server_id: str - approval_mode: typing.Optional[McpApprovalRequiredModel] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class PromptAgentDbModelToolsItem_NativeMcp(UncheckedBaseModel): - """ - The type of tool - """ - - type: typing.Literal["native_mcp"] = "native_mcp" - id: typing.Optional[str] = None - name: str - description: str - response_timeout_secs: typing.Optional[int] = None - parameters: typing.Optional["ObjectJsonSchemaPropertyInput"] = None - mcp_tool_name: str - mcp_server_id: str - approval_mode: typing.Optional[McpApprovalRequiredModel] = None + mcp_server_name: str + mcp_input_schema: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -140,7 +120,6 @@ class Config: typing.Union[ PromptAgentDbModelToolsItem_Client, PromptAgentDbModelToolsItem_Mcp, - PromptAgentDbModelToolsItem_NativeMcp, PromptAgentDbModelToolsItem_System, PromptAgentDbModelToolsItem_Webhook, ], @@ -148,5 +127,4 @@ class Config: ] update_forward_refs(PromptAgentDbModelToolsItem_Client) update_forward_refs(PromptAgentDbModelToolsItem_Mcp) -update_forward_refs(PromptAgentDbModelToolsItem_NativeMcp) update_forward_refs(PromptAgentDbModelToolsItem_Webhook) diff --git a/src/elevenlabs/types/prompt_agent_input_tools_item.py b/src/elevenlabs/types/prompt_agent_input_tools_item.py index 997e8c1a..263b924c 100644 --- a/src/elevenlabs/types/prompt_agent_input_tools_item.py +++ b/src/elevenlabs/types/prompt_agent_input_tools_item.py @@ -9,7 +9,8 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata from .dynamic_variables_config import DynamicVariablesConfig -from .mcp_approval_required_model import McpApprovalRequiredModel +from .integration_type import IntegrationType +from .mcp_approval_policy import McpApprovalPolicy from .system_tool_config_input_params import SystemToolConfigInputParams from .webhook_tool_api_schema_config_input import WebhookToolApiSchemaConfigInput @@ -48,35 +49,14 @@ class PromptAgentInputToolsItem_Mcp(UncheckedBaseModel): name: str description: str response_timeout_secs: typing.Optional[int] = None + integration_type: IntegrationType parameters: typing.Optional["ObjectJsonSchemaPropertyInput"] = None + approval_policy: typing.Optional[McpApprovalPolicy] = None mcp_tool_name: str + mcp_tool_description: str mcp_server_id: str - approval_mode: typing.Optional[McpApprovalRequiredModel] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class PromptAgentInputToolsItem_NativeMcp(UncheckedBaseModel): - """ - The type of tool - """ - - type: typing.Literal["native_mcp"] = "native_mcp" - id: typing.Optional[str] = None - name: str - description: str - response_timeout_secs: typing.Optional[int] = None - parameters: typing.Optional["ObjectJsonSchemaPropertyInput"] = None - mcp_tool_name: str - mcp_server_id: str - approval_mode: typing.Optional[McpApprovalRequiredModel] = None + mcp_server_name: str + mcp_input_schema: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -140,7 +120,6 @@ class Config: typing.Union[ PromptAgentInputToolsItem_Client, PromptAgentInputToolsItem_Mcp, - PromptAgentInputToolsItem_NativeMcp, PromptAgentInputToolsItem_System, PromptAgentInputToolsItem_Webhook, ], @@ -148,5 +127,4 @@ class Config: ] update_forward_refs(PromptAgentInputToolsItem_Client) update_forward_refs(PromptAgentInputToolsItem_Mcp) -update_forward_refs(PromptAgentInputToolsItem_NativeMcp) update_forward_refs(PromptAgentInputToolsItem_Webhook) diff --git a/src/elevenlabs/types/prompt_agent_output_tools_item.py b/src/elevenlabs/types/prompt_agent_output_tools_item.py index cca8406e..36b420bc 100644 --- a/src/elevenlabs/types/prompt_agent_output_tools_item.py +++ b/src/elevenlabs/types/prompt_agent_output_tools_item.py @@ -9,7 +9,8 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata from .dynamic_variables_config import DynamicVariablesConfig -from .mcp_approval_required_model import McpApprovalRequiredModel +from .integration_type import IntegrationType +from .mcp_approval_policy import McpApprovalPolicy from .system_tool_config_output_params import SystemToolConfigOutputParams from .webhook_tool_api_schema_config_output import WebhookToolApiSchemaConfigOutput @@ -48,35 +49,14 @@ class PromptAgentOutputToolsItem_Mcp(UncheckedBaseModel): name: str description: str response_timeout_secs: typing.Optional[int] = None + integration_type: IntegrationType parameters: typing.Optional["ObjectJsonSchemaPropertyOutput"] = None + approval_policy: typing.Optional[McpApprovalPolicy] = None mcp_tool_name: str + mcp_tool_description: str mcp_server_id: str - approval_mode: typing.Optional[McpApprovalRequiredModel] = None - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class PromptAgentOutputToolsItem_NativeMcp(UncheckedBaseModel): - """ - The type of tool - """ - - type: typing.Literal["native_mcp"] = "native_mcp" - id: typing.Optional[str] = None - name: str - description: str - response_timeout_secs: typing.Optional[int] = None - parameters: typing.Optional["ObjectJsonSchemaPropertyOutput"] = None - mcp_tool_name: str - mcp_server_id: str - approval_mode: typing.Optional[McpApprovalRequiredModel] = None + mcp_server_name: str + mcp_input_schema: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 @@ -140,7 +120,6 @@ class Config: typing.Union[ PromptAgentOutputToolsItem_Client, PromptAgentOutputToolsItem_Mcp, - PromptAgentOutputToolsItem_NativeMcp, PromptAgentOutputToolsItem_System, PromptAgentOutputToolsItem_Webhook, ], @@ -148,5 +127,4 @@ class Config: ] update_forward_refs(PromptAgentOutputToolsItem_Client) update_forward_refs(PromptAgentOutputToolsItem_Mcp) -update_forward_refs(PromptAgentOutputToolsItem_NativeMcp) update_forward_refs(PromptAgentOutputToolsItem_Webhook) diff --git a/src/elevenlabs/types/shared_sound_generation_response_model.py b/src/elevenlabs/types/shared_sound_generation_response_model.py deleted file mode 100644 index 34e9b8c7..00000000 --- a/src/elevenlabs/types/shared_sound_generation_response_model.py +++ /dev/null @@ -1,31 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.unchecked_base_model import UncheckedBaseModel - - -class SharedSoundGenerationResponseModel(UncheckedBaseModel): - public_user_id: str - history_item_id: str - generation_id: str - text: str - category: str - labels: typing.Dict[str, str] - purchased_count: int - like_count: int - featured: bool - preview_url: str - purchased: bool - icon_url: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/supported_voice.py b/src/elevenlabs/types/supported_voice.py index e5003ae6..a10cbbc0 100644 --- a/src/elevenlabs/types/supported_voice.py +++ b/src/elevenlabs/types/supported_voice.py @@ -6,6 +6,7 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel from .tts_model_family import TtsModelFamily +from .tts_optimize_streaming_latency import TtsOptimizeStreamingLatency class SupportedVoice(UncheckedBaseModel): @@ -14,6 +15,10 @@ class SupportedVoice(UncheckedBaseModel): description: typing.Optional[str] = None language: typing.Optional[str] = None model_family: typing.Optional[TtsModelFamily] = None + optimize_streaming_latency: typing.Optional[TtsOptimizeStreamingLatency] = None + stability: typing.Optional[float] = None + speed: typing.Optional[float] = None + similarity_boost: typing.Optional[float] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/types/system_tool_config_input_params.py b/src/elevenlabs/types/system_tool_config_input_params.py index eb15c0ea..10c73c81 100644 --- a/src/elevenlabs/types/system_tool_config_input_params.py +++ b/src/elevenlabs/types/system_tool_config_input_params.py @@ -68,6 +68,7 @@ class Config: class SystemToolConfigInputParams_TransferToNumber(UncheckedBaseModel): system_tool_type: typing.Literal["transfer_to_number"] = "transfer_to_number" transfers: typing.List[PhoneNumberTransfer] + enable_client_message: typing.Optional[bool] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/types/system_tool_config_output_params.py b/src/elevenlabs/types/system_tool_config_output_params.py index e49b07e1..bb7b787b 100644 --- a/src/elevenlabs/types/system_tool_config_output_params.py +++ b/src/elevenlabs/types/system_tool_config_output_params.py @@ -68,6 +68,7 @@ class Config: class SystemToolConfigOutputParams_TransferToNumber(UncheckedBaseModel): system_tool_type: typing.Literal["transfer_to_number"] = "transfer_to_number" transfers: typing.List[PhoneNumberTransfer] + enable_client_message: typing.Optional[bool] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/types/transfer_to_number_tool_config.py b/src/elevenlabs/types/transfer_to_number_tool_config.py index bf61b8ad..542eaf7e 100644 --- a/src/elevenlabs/types/transfer_to_number_tool_config.py +++ b/src/elevenlabs/types/transfer_to_number_tool_config.py @@ -10,6 +10,10 @@ class TransferToNumberToolConfig(UncheckedBaseModel): transfers: typing.List[PhoneNumberTransfer] + enable_client_message: typing.Optional[bool] = pydantic.Field(default=None) + """ + Whether to play a message to the client while they wait for transfer. Defaults to true for backward compatibility. + """ if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/elevenlabs/types/widget_config.py b/src/elevenlabs/types/widget_config.py index 6a694d79..10b45cc7 100644 --- a/src/elevenlabs/types/widget_config.py +++ b/src/elevenlabs/types/widget_config.py @@ -11,6 +11,7 @@ from .widget_feedback_mode import WidgetFeedbackMode from .widget_language_preset import WidgetLanguagePreset from .widget_placement import WidgetPlacement +from .widget_styles import WidgetStyles from .widget_text_contents import WidgetTextContents @@ -170,6 +171,11 @@ class WidgetConfig(UncheckedBaseModel): Text contents of the widget """ + styles: typing.Optional[WidgetStyles] = pydantic.Field(default=None) + """ + Styles for the widget + """ + language_selector: typing.Optional[bool] = pydantic.Field(default=None) """ Whether to show the language selector diff --git a/src/elevenlabs/types/widget_config_response.py b/src/elevenlabs/types/widget_config_response.py index 3a648dab..32200eec 100644 --- a/src/elevenlabs/types/widget_config_response.py +++ b/src/elevenlabs/types/widget_config_response.py @@ -11,6 +11,7 @@ from .widget_feedback_mode import WidgetFeedbackMode from .widget_language_preset_response import WidgetLanguagePresetResponse from .widget_placement import WidgetPlacement +from .widget_styles import WidgetStyles from .widget_text_contents import WidgetTextContents @@ -170,6 +171,11 @@ class WidgetConfigResponse(UncheckedBaseModel): Text contents of the widget """ + styles: typing.Optional[WidgetStyles] = pydantic.Field(default=None) + """ + Styles for the widget + """ + language: str supported_language_overrides: typing.Optional[typing.List[str]] = None language_presets: typing.Optional[typing.Dict[str, WidgetLanguagePresetResponse]] = pydantic.Field(default=None) diff --git a/src/elevenlabs/types/widget_styles.py b/src/elevenlabs/types/widget_styles.py new file mode 100644 index 00000000..43bb358e --- /dev/null +++ b/src/elevenlabs/types/widget_styles.py @@ -0,0 +1,118 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class WidgetStyles(UncheckedBaseModel): + base: typing.Optional[str] = pydantic.Field(default=None) + """ + The base background color. + """ + + base_hover: typing.Optional[str] = pydantic.Field(default=None) + """ + The color of the base background when hovered. + """ + + base_active: typing.Optional[str] = pydantic.Field(default=None) + """ + The color of the base background when active (clicked). + """ + + base_border: typing.Optional[str] = pydantic.Field(default=None) + """ + The color of the border against the base background. + """ + + base_subtle: typing.Optional[str] = pydantic.Field(default=None) + """ + The color of subtle text against the base background. + """ + + base_primary: typing.Optional[str] = pydantic.Field(default=None) + """ + The color of primary text against the base background. + """ + + base_error: typing.Optional[str] = pydantic.Field(default=None) + """ + The color of error text against the base background. + """ + + accent: typing.Optional[str] = pydantic.Field(default=None) + """ + The accent background color. + """ + + accent_hover: typing.Optional[str] = pydantic.Field(default=None) + """ + The color of the accent background when hovered. + """ + + accent_active: typing.Optional[str] = pydantic.Field(default=None) + """ + The color of the accent background when active (clicked). + """ + + accent_border: typing.Optional[str] = pydantic.Field(default=None) + """ + The color of the border against the accent background. + """ + + accent_subtle: typing.Optional[str] = pydantic.Field(default=None) + """ + The color of subtle text against the accent background. + """ + + accent_primary: typing.Optional[str] = pydantic.Field(default=None) + """ + The color of primary text against the accent background. + """ + + overlay_padding: typing.Optional[float] = pydantic.Field(default=None) + """ + The padding around the edges of the viewport. + """ + + button_radius: typing.Optional[float] = pydantic.Field(default=None) + """ + The radius of the buttons. + """ + + input_radius: typing.Optional[float] = pydantic.Field(default=None) + """ + The radius of the input fields. + """ + + bubble_radius: typing.Optional[float] = pydantic.Field(default=None) + """ + The radius of the chat bubbles. + """ + + sheet_radius: typing.Optional[float] = pydantic.Field(default=None) + """ + The default radius of sheets. + """ + + compact_sheet_radius: typing.Optional[float] = pydantic.Field(default=None) + """ + The radius of the sheet in compact mode. + """ + + dropdown_sheet_radius: typing.Optional[float] = pydantic.Field(default=None) + """ + The radius of the dropdown sheet. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/elevenlabs/types/workspace_resource_type.py b/src/elevenlabs/types/workspace_resource_type.py index c79cd089..857bd9eb 100644 --- a/src/elevenlabs/types/workspace_resource_type.py +++ b/src/elevenlabs/types/workspace_resource_type.py @@ -16,7 +16,7 @@ "convai_secrets", "music_latent", "convai_phone_numbers", - "convai_mcps", + "convai_mcp_servers", "convai_batch_calls", ], typing.Any, diff --git a/src/elevenlabs/voices/client.py b/src/elevenlabs/voices/client.py index e9e07273..3a1d9270 100644 --- a/src/elevenlabs/voices/client.py +++ b/src/elevenlabs/voices/client.py @@ -112,7 +112,7 @@ def search( Which direction to sort the voices in. 'asc' or 'desc'. voice_type : typing.Optional[str] - Type of the voice to filter by. One of 'personal', 'community', 'default', 'workspace', 'non-default'. 'non-default' is equal to 'personal' plus 'community'. + Type of the voice to filter by. One of 'personal', 'community', 'default', 'workspace', 'non-default'. 'non-default' is equal to all but 'default'. category : typing.Optional[str] Category of the voice to filter by. One of 'premade', 'cloned', 'generated', 'professional' @@ -613,7 +613,7 @@ async def search( Which direction to sort the voices in. 'asc' or 'desc'. voice_type : typing.Optional[str] - Type of the voice to filter by. One of 'personal', 'community', 'default', 'workspace', 'non-default'. 'non-default' is equal to 'personal' plus 'community'. + Type of the voice to filter by. One of 'personal', 'community', 'default', 'workspace', 'non-default'. 'non-default' is equal to all but 'default'. category : typing.Optional[str] Category of the voice to filter by. One of 'premade', 'cloned', 'generated', 'professional' diff --git a/src/elevenlabs/voices/raw_client.py b/src/elevenlabs/voices/raw_client.py index bf62d192..81558305 100644 --- a/src/elevenlabs/voices/raw_client.py +++ b/src/elevenlabs/voices/raw_client.py @@ -119,7 +119,7 @@ def search( Which direction to sort the voices in. 'asc' or 'desc'. voice_type : typing.Optional[str] - Type of the voice to filter by. One of 'personal', 'community', 'default', 'workspace', 'non-default'. 'non-default' is equal to 'personal' plus 'community'. + Type of the voice to filter by. One of 'personal', 'community', 'default', 'workspace', 'non-default'. 'non-default' is equal to all but 'default'. category : typing.Optional[str] Category of the voice to filter by. One of 'premade', 'cloned', 'generated', 'professional' @@ -758,7 +758,7 @@ async def search( Which direction to sort the voices in. 'asc' or 'desc'. voice_type : typing.Optional[str] - Type of the voice to filter by. One of 'personal', 'community', 'default', 'workspace', 'non-default'. 'non-default' is equal to 'personal' plus 'community'. + Type of the voice to filter by. One of 'personal', 'community', 'default', 'workspace', 'non-default'. 'non-default' is equal to all but 'default'. category : typing.Optional[str] Category of the voice to filter by. One of 'premade', 'cloned', 'generated', 'professional' diff --git a/src/elevenlabs/workspace/client.py b/src/elevenlabs/workspace/client.py index e896af3c..3074232d 100644 --- a/src/elevenlabs/workspace/client.py +++ b/src/elevenlabs/workspace/client.py @@ -1,12 +1,18 @@ # This file was auto-generated by Fern from our API Definition. +import typing + from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.request_options import RequestOptions from .groups.client import AsyncGroupsClient, GroupsClient from .invites.client import AsyncInvitesClient, InvitesClient from .members.client import AsyncMembersClient, MembersClient from .raw_client import AsyncRawWorkspaceClient, RawWorkspaceClient from .resources.client import AsyncResourcesClient, ResourcesClient +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + class WorkspaceClient: def __init__(self, *, client_wrapper: SyncClientWrapper): @@ -30,6 +36,38 @@ def with_raw_response(self) -> RawWorkspaceClient: """ return self._raw_client + def update_user_auto_provisioning( + self, *, enabled: bool, request_options: typing.Optional[RequestOptions] = None + ) -> typing.Optional[typing.Any]: + """ + Update user auto provisioning settings for the workspace. + + Parameters + ---------- + enabled : bool + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.Optional[typing.Any] + Successful Response + + Examples + -------- + from elevenlabs import ElevenLabs + + client = ElevenLabs( + api_key="YOUR_API_KEY", + ) + client.workspace.update_user_auto_provisioning( + enabled=True, + ) + """ + _response = self._raw_client.update_user_auto_provisioning(enabled=enabled, request_options=request_options) + return _response.data + class AsyncWorkspaceClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): @@ -52,3 +90,45 @@ def with_raw_response(self) -> AsyncRawWorkspaceClient: AsyncRawWorkspaceClient """ return self._raw_client + + async def update_user_auto_provisioning( + self, *, enabled: bool, request_options: typing.Optional[RequestOptions] = None + ) -> typing.Optional[typing.Any]: + """ + Update user auto provisioning settings for the workspace. + + Parameters + ---------- + enabled : bool + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.Optional[typing.Any] + Successful Response + + Examples + -------- + import asyncio + + from elevenlabs import AsyncElevenLabs + + client = AsyncElevenLabs( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.workspace.update_user_auto_provisioning( + enabled=True, + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.update_user_auto_provisioning( + enabled=enabled, request_options=request_options + ) + return _response.data diff --git a/src/elevenlabs/workspace/raw_client.py b/src/elevenlabs/workspace/raw_client.py index b33dafd0..3183bf3d 100644 --- a/src/elevenlabs/workspace/raw_client.py +++ b/src/elevenlabs/workspace/raw_client.py @@ -1,13 +1,143 @@ # This file was auto-generated by Fern from our API Definition. +import typing +from json.decoder import JSONDecodeError + +from ..core.api_error import ApiError from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.http_response import AsyncHttpResponse, HttpResponse +from ..core.request_options import RequestOptions +from ..core.unchecked_base_model import construct_type +from ..errors.unprocessable_entity_error import UnprocessableEntityError +from ..types.http_validation_error import HttpValidationError + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) class RawWorkspaceClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._client_wrapper = client_wrapper + def update_user_auto_provisioning( + self, *, enabled: bool, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[typing.Optional[typing.Any]]: + """ + Update user auto provisioning settings for the workspace. + + Parameters + ---------- + enabled : bool + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[typing.Optional[typing.Any]] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + "v1/workspace/user-auto-provisioning", + base_url=self._client_wrapper.get_environment().base, + method="POST", + json={ + "enabled": enabled, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if _response is None or not _response.text.strip(): + return HttpResponse(response=_response, data=None) + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.Optional[typing.Any], + construct_type( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + class AsyncRawWorkspaceClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._client_wrapper = client_wrapper + + async def update_user_auto_provisioning( + self, *, enabled: bool, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: + """ + Update user auto provisioning settings for the workspace. + + Parameters + ---------- + enabled : bool + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[typing.Optional[typing.Any]] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + "v1/workspace/user-auto-provisioning", + base_url=self._client_wrapper.get_environment().base, + method="POST", + json={ + "enabled": enabled, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if _response is None or not _response.text.strip(): + return AsyncHttpResponse(response=_response, data=None) + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.Optional[typing.Any], + construct_type( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + HttpValidationError, + construct_type( + type_=HttpValidationError, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/elevenlabs/workspace/resources/raw_client.py b/src/elevenlabs/workspace/resources/raw_client.py index bc0b7f72..11f2d494 100644 --- a/src/elevenlabs/workspace/resources/raw_client.py +++ b/src/elevenlabs/workspace/resources/raw_client.py @@ -146,6 +146,8 @@ def share( omit=OMIT, ) try: + if _response is None or not _response.text.strip(): + return HttpResponse(response=_response, data=None) if 200 <= _response.status_code < 300: _data = typing.cast( typing.Optional[typing.Any], @@ -226,6 +228,8 @@ def unshare( omit=OMIT, ) try: + if _response is None or not _response.text.strip(): + return HttpResponse(response=_response, data=None) if 200 <= _response.status_code < 300: _data = typing.cast( typing.Optional[typing.Any], @@ -377,6 +381,8 @@ async def share( omit=OMIT, ) try: + if _response is None or not _response.text.strip(): + return AsyncHttpResponse(response=_response, data=None) if 200 <= _response.status_code < 300: _data = typing.cast( typing.Optional[typing.Any], @@ -457,6 +463,8 @@ async def unshare( omit=OMIT, ) try: + if _response is None or not _response.text.strip(): + return AsyncHttpResponse(response=_response, data=None) if 200 <= _response.status_code < 300: _data = typing.cast( typing.Optional[typing.Any],