
    b6iK                    ^   d dl mZ d dlZddlmZmZ ddlmZ ddlm	Z	 ddl
mZ ddlmZ dd	lmZ dd
lmZ ddlmZ ddlmZ ddlmZmZ ddlmZ ej6                  r ddlmZmZ ddlm Z m!Z! ddl"m#Z#m$Z$ ddl%m&Z&m'Z'  ejP                  ejR                  d      Z* G d d      Z+ G d d      Z,y)    )annotationsN   )AsyncClientWrapperSyncClientWrapper)RequestOptions)McpApprovalPolicy)McpServerConfigInput)McpServerResponseModel)McpServersResponseModel)ToolCallSoundBehavior)ToolCallSoundType)ToolExecutionMode   )AsyncRawMcpServersClientRawMcpServersClient)4McpServerConfigUpdateRequestModelRequestHeadersValue)ApprovalPolicyClientAsyncApprovalPolicyClient)AsyncToolApprovalsClientToolApprovalsClient)AsyncToolConfigsClientToolConfigsClient)AsyncToolsClientToolsClient.c            
          e Zd ZddZedd       ZddddZdd	 	 	 	 	 ddZdd	 	 	 	 	 ddZddddZ	e
e
e
e
e
e
e
e
dd			 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd
Zed        Zed        Zed        Zed        Zy)McpServersClientc               l    t        |      | _        || _        d | _        d | _        d | _        d | _        y Nclient_wrapper)r   _raw_client_client_wrapper_tools_approval_policy_tool_approvals_tool_configsselfr    s     z/root/.openclaw/workspace/visionaryfx/venv/lib/python3.12/site-packages/elevenlabs/conversational_ai/mcp_servers/client.py__init__zMcpServersClient.__init__   s6    .nM-48GKEIAE    c                    | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawMcpServersClient
        r!   r(   s    r)   with_raw_responsez"McpServersClient.with_raw_response'        r+   Nrequest_optionsc               R    | j                   j                  |      }|j                  S )a  
        Retrieve all MCP server configurations available in the workspace.

        Parameters
        ----------
        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        McpServersResponseModel
            Successful Response

        Examples
        --------
        from elevenlabs import ElevenLabs

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.conversational_ai.mcp_servers.list()
        r1   r!   listdatar(   r2   	_responses      r)   r5   zMcpServersClient.list2   s'    . $$))/)J	~~r+   c               T    | j                   j                  ||      }|j                  S )a  
        Create a new MCP server configuration in the workspace.

        Parameters
        ----------
        config : McpServerConfigInput
            Configuration details for the MCP Server.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        McpServerResponseModel
            Successful Response

        Examples
        --------
        from elevenlabs import ElevenLabs, McpServerConfigInput

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.conversational_ai.mcp_servers.create(
            config=McpServerConfigInput(
                url="url",
                name="name",
            ),
        )
        configr2   r!   creater6   r(   r;   r2   r8   s       r)   r=   zMcpServersClient.createL   s*    B $$++6?+[	~~r+   c               T    | j                   j                  ||      }|j                  S )a~  
        Retrieve a specific MCP server configuration from the workspace.

        Parameters
        ----------
        mcp_server_id : str
            ID of the MCP Server.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        McpServerResponseModel
            Successful Response

        Examples
        --------
        from elevenlabs import ElevenLabs

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.conversational_ai.mcp_servers.get(
            mcp_server_id="mcp_server_id",
        )
        r1   r!   getr6   r(   mcp_server_idr2   r8   s       r)   rA   zMcpServersClient.getp   s)    < $$(((X	~~r+   c               T    | j                   j                  ||      }|j                  S )as  
        Delete a specific MCP server configuration from the workspace.

        Parameters
        ----------
        mcp_server_id : str
            ID of the MCP Server.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        typing.Any
            Successful Response

        Examples
        --------
        from elevenlabs import ElevenLabs

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.conversational_ai.mcp_servers.delete(
            mcp_server_id="mcp_server_id",
        )
        r1   r!   deleter6   rB   s       r)   rF   zMcpServersClient.delete   s)    8 $$++M?+[	~~r+   	approval_policyforce_pre_tool_speechdisable_interruptionstool_call_soundtool_call_sound_behaviorexecution_moderequest_headersdisable_compressionr2   c       	        d    | j                   j                  |||||||||	|

      }|j                  S )a'  
        Update the configuration settings for an MCP server.

        Parameters
        ----------
        mcp_server_id : str
            ID of the MCP Server.

        approval_policy : typing.Optional[McpApprovalPolicy]
            The approval mode to set for the MCP server

        force_pre_tool_speech : typing.Optional[bool]
            If set, overrides the server's force_pre_tool_speech setting for this tool

        disable_interruptions : typing.Optional[bool]
            If set, overrides the server's disable_interruptions setting for this tool

        tool_call_sound : typing.Optional[ToolCallSoundType]
            Predefined tool call sound type to play during tool execution for all tools from this MCP server

        tool_call_sound_behavior : typing.Optional[ToolCallSoundBehavior]
            Determines when the tool call sound should play for all tools from this MCP server

        execution_mode : typing.Optional[ToolExecutionMode]
            If set, overrides the server's execution_mode setting for this tool

        request_headers : typing.Optional[typing.Dict[str, typing.Optional[McpServerConfigUpdateRequestModelRequestHeadersValue]]]
            The headers to include in requests to the MCP server

        disable_compression : typing.Optional[bool]
            Whether to disable HTTP compression for this MCP server

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        McpServerResponseModel
            Successful Response

        Examples
        --------
        from elevenlabs import ElevenLabs

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.conversational_ai.mcp_servers.update(
            mcp_server_id="mcp_server_id",
        )
        rG   r!   updater6   r(   rC   rH   rI   rJ   rK   rL   rM   rN   rO   r2   r8   s               r)   rR   zMcpServersClient.update   sJ    F $$+++"7"7+%=)+ 3+ , 
	 ~~r+   c                n    | j                   ddlm}  || j                        | _         | j                   S )Nr   )r   r   )r#   tools.clientr   r"   )r(   r   s     r)   toolszMcpServersClient.tools  s+    ;;1%T5I5IJDK{{r+   c                n    | j                   ddlm}  || j                        | _         | j                   S )Nr   )r   r   )r$   approval_policy.clientr   r"   )r(   r   s     r)   rH   z McpServersClient.approval_policy	  s0      (D$8H\H\$]D!$$$r+   c                n    | j                   ddlm}  || j                        | _         | j                   S )Nr   )r   r   )r%   tool_approvals.clientr   r"   )r(   r   s     r)   tool_approvalszMcpServersClient.tool_approvals  s0    'B#6dFZFZ#[D ###r+   c                n    | j                   ddlm}  || j                        | _         | j                   S )Nr   )r   r   )r&   tool_configs.clientr   r"   )r(   r   s     r)   tool_configszMcpServersClient.tool_configs  s0    %>!2$BVBV!WD!!!r+   )r    r   )returnr   r2   typing.Optional[RequestOptions]r_   r   r;   r	   r2   ra   r_   r
   rC   strr2   ra   r_   r
   rC   rd   r2   ra   r_   z
typing.AnyrC   rd   rH   z"typing.Optional[McpApprovalPolicy]rI   typing.Optional[bool]rJ   rg   rK   z"typing.Optional[ToolCallSoundType]rL   z&typing.Optional[ToolCallSoundBehavior]rM   z"typing.Optional[ToolExecutionMode]rN   zhtyping.Optional[typing.Dict[str, typing.Optional[McpServerConfigUpdateRequestModelRequestHeadersValue]]]rO   rg   r2   ra   r_   r
   __name__
__module____qualname__r*   propertyr/   r5   r=   rA   rF   OMITrR   rV   rH   r[   r^    r+   r)   r   r      sn   F     JN 6 cg"-"@_"	"J Y] 6U	B `d F ?C7;7;>BKO=A 59;?OO <	O
  5O  5O <O #IO ;O
O 3O 9O 
 Ob   % % $ $ " "r+   r   c            
         e Zd ZddZedd       ZddddZdd	 	 	 	 	 ddZdd	 	 	 	 	 ddZdd	 	 	 	 	 ddZ	e
e
e
e
e
e
e
e
dd			 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd
Zed        Zed        Zed        Zed        Zy)AsyncMcpServersClientc               l    t        |      | _        || _        d | _        d | _        d | _        d | _        y r   )r   r!   r"   r#   r$   r%   r&   r'   s     r)   r*   zAsyncMcpServersClient.__init__#  s6    3>R-9=LPJNFJr+   c                    | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawMcpServersClient
        r-   r.   s    r)   r/   z'AsyncMcpServersClient.with_raw_response+  r0   r+   Nr1   c               n   K   | j                   j                  |       d{   }|j                  S 7 w)a}  
        Retrieve all MCP server configurations available in the workspace.

        Parameters
        ----------
        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        McpServersResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.conversational_ai.mcp_servers.list()


        asyncio.run(main())
        r1   Nr4   r7   s      r)   r5   zAsyncMcpServersClient.list6  s4     > **///PP	~~ Qs    535c               p   K   | j                   j                  ||       d{   }|j                  S 7 w)as  
        Create a new MCP server configuration in the workspace.

        Parameters
        ----------
        config : McpServerConfigInput
            Configuration details for the MCP Server.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        McpServerResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs, McpServerConfigInput

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.conversational_ai.mcp_servers.create(
                config=McpServerConfigInput(
                    url="url",
                    name="name",
                ),
            )


        asyncio.run(main())
        r:   Nr<   r>   s       r)   r=   zAsyncMcpServersClient.createX  s8     R **11Q`1aa	~~ b   !646c               p   K   | j                   j                  ||       d{   }|j                  S 7 w)a  
        Retrieve a specific MCP server configuration from the workspace.

        Parameters
        ----------
        mcp_server_id : str
            ID of the MCP Server.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        McpServerResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.conversational_ai.mcp_servers.get(
                mcp_server_id="mcp_server_id",
            )


        asyncio.run(main())
        r1   Nr@   rB   s       r)   rA   zAsyncMcpServersClient.get  s7     L **..}o.^^	~~ _ru   c               p   K   | j                   j                  ||       d{   }|j                  S 7 w)a  
        Delete a specific MCP server configuration from the workspace.

        Parameters
        ----------
        mcp_server_id : str
            ID of the MCP Server.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        typing.Any
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.conversational_ai.mcp_servers.delete(
                mcp_server_id="mcp_server_id",
            )


        asyncio.run(main())
        r1   NrE   rB   s       r)   rF   zAsyncMcpServersClient.delete  s8     L **11-Q`1aa	~~ bru   rG   c       	           K   | j                   j                  |||||||||	|

       d{   }|j                  S 7 w)a  
        Update the configuration settings for an MCP server.

        Parameters
        ----------
        mcp_server_id : str
            ID of the MCP Server.

        approval_policy : typing.Optional[McpApprovalPolicy]
            The approval mode to set for the MCP server

        force_pre_tool_speech : typing.Optional[bool]
            If set, overrides the server's force_pre_tool_speech setting for this tool

        disable_interruptions : typing.Optional[bool]
            If set, overrides the server's disable_interruptions setting for this tool

        tool_call_sound : typing.Optional[ToolCallSoundType]
            Predefined tool call sound type to play during tool execution for all tools from this MCP server

        tool_call_sound_behavior : typing.Optional[ToolCallSoundBehavior]
            Determines when the tool call sound should play for all tools from this MCP server

        execution_mode : typing.Optional[ToolExecutionMode]
            If set, overrides the server's execution_mode setting for this tool

        request_headers : typing.Optional[typing.Dict[str, typing.Optional[McpServerConfigUpdateRequestModelRequestHeadersValue]]]
            The headers to include in requests to the MCP server

        disable_compression : typing.Optional[bool]
            Whether to disable HTTP compression for this MCP server

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        McpServerResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.conversational_ai.mcp_servers.update(
                mcp_server_id="mcp_server_id",
            )


        asyncio.run(main())
        rG   NrQ   rS   s               r)   rR   zAsyncMcpServersClient.update  sX     V **11+"7"7+%=)+ 3+ 2 
 
	 ~~
s   )><>c                n    | j                   ddlm}  || j                        | _         | j                   S )Nr   )r   r   )r#   rU   r   r"   )r(   r   s     r)   rV   zAsyncMcpServersClient.tools/  s+    ;;6*$:N:NODK{{r+   c                n    | j                   ddlm}  || j                        | _         | j                   S )Nr   )r   r   )r$   rX   r   r"   )r(   r   s     r)   rH   z%AsyncMcpServersClient.approval_policy7  s0      (I$=TMaMa$bD!$$$r+   c                n    | j                   ddlm}  || j                        | _         | j                   S )Nr   )r   r   )r%   rZ   r   r"   )r(   r   s     r)   r[   z$AsyncMcpServersClient.tool_approvals?  s0    'G#;4K_K_#`D ###r+   c                n    | j                   ddlm}  || j                        | _         | j                   S )Nr   )r   r   )r&   r]   r   r"   )r(   r   s     r)   r^   z"AsyncMcpServersClient.tool_configsG  s0    %C!7tG[G[!\D!!!r+   )r    r   )r_   r   r`   rb   rc   re   rf   rh   rn   r+   r)   rp   rp   "  s   K     PT  F cg*-*@_*	*Z Y]' '6U'	'T Y]' '6U'	'Z ?C7;7;>BKO=A 59;?WW <	W
  5W  5W <W #IW ;W
W 3W 9W 
 Wr   % % $ $ " "r+   rp   )-
__future__r   typingcore.client_wrapperr   r   core.request_optionsr   types.mcp_approval_policyr   types.mcp_server_config_inputr	   types.mcp_server_response_modelr
    types.mcp_servers_response_modelr   types.tool_call_sound_behaviorr   types.tool_call_sound_typer   types.tool_execution_moder   
raw_clientr   r   Btypes.mcp_server_config_update_request_model_request_headers_valuer   TYPE_CHECKINGrX   r   r   rZ   r   r   r]   r   r   rU   r   r   castAnyrm   r   rp   rn   r+   r)   <module>r      sv    #  H 2 : A E G C ; : E 
WTN;v{{6::s#A" A"Hk" k"r+   