
    b6i=I                         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  e j.                  e j0                  d      Z G d d      Z G d d      Zy)    N   )AsyncClientWrapperSyncClientWrapper)RequestOptions)#GetToolDependentAgentsResponseModel)SortDirection)ToolRequestModel)ToolResponseModel)
ToolSortBy)ToolTypeFilter)ToolsResponseModel   )AsyncRawToolsClientRawToolsClient.c                      e Zd ZdefdZedefd       Zddddddddddej                  e
   dej                  e   d	ej                  e   d
ej                  ej                  eej                  e   f      dej                  e   dej                  e   dej                  e
   dej                  e   defdZdddedej                  e   defdZddde
dej                  e   defdZddde
dej                  e   dej2                  fdZddde
dedej                  e   defdZddddde
dej                  e
   dej                  e   dej                  e   def
dZy)ToolsClientclient_wrapperc                &    t        |      | _        y N)r   )r   _raw_clientselfr   s     t/root/.openclaw/workspace/visionaryfx/venv/lib/python3.12/site-packages/elevenlabs/conversational_ai/tools/client.py__init__zToolsClient.__init__   s    )H    returnc                     | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawToolsClient
        r   r   s    r   with_raw_responsezToolsClient.with_raw_response        r   Nsearch	page_sizeshow_only_owned_documentstypessort_directionsort_bycursorrequest_optionsr#   r$   r%   r&   r'   r(   r)   r*   c          
      `    | j                   j                  ||||||||      }	|	j                  S )aM  
        Get all available tools in the workspace.

        Parameters
        ----------
        search : typing.Optional[str]
            If specified, the endpoint returns only tools whose names start with this string.

        page_size : typing.Optional[int]
            How many documents to return at maximum. Can not exceed 100, defaults to 30.

        show_only_owned_documents : typing.Optional[bool]
            If set to true, the endpoint will return only tools owned by you (and not shared from somebody else).

        types : typing.Optional[typing.Union[ToolTypeFilter, typing.Sequence[ToolTypeFilter]]]
            If present, the endpoint will return only tools of the given types.

        sort_direction : typing.Optional[SortDirection]
            The direction to sort the results

        sort_by : typing.Optional[ToolSortBy]
            The field to sort the results by

        cursor : typing.Optional[str]
            Used for fetching next page. Cursor is returned in the response.

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

        Returns
        -------
        ToolsResponseModel
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.conversational_ai.tools.list(
            search="search",
            page_size=1,
            show_only_owned_documents=True,
            sort_direction="asc",
            sort_by="name",
            cursor="cursor",
        )
        r"   r   listdata
r   r#   r$   r%   r&   r'   r(   r)   r*   	_responses
             r   r-   zToolsClient.list#   sD    | $$))&?)+ * 	
	 ~~r   r*   requestc                T    | j                   j                  ||      }|j                  S )a  
        Add a new tool to the available tools in the workspace.

        Parameters
        ----------
        request : ToolRequestModel

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

        Returns
        -------
        ToolResponseModel
            Successful Response

        Examples
        --------
        from elevenlabs import (
            ElevenLabs,
            ToolRequestModel,
            ToolRequestModelToolConfig_Client,
        )

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.conversational_ai.tools.create(
            request=ToolRequestModel(
                tool_config=ToolRequestModelToolConfig_Client(
                    name="name",
                    description="description",
                    expects_response=False,
                ),
            ),
        )
        r2   r*   r   creater.   r   r2   r*   r0   s       r   r6   zToolsClient.createm   s*    N $$++G_+]	~~r   tool_idc                T    | j                   j                  ||      }|j                  S )aQ  
        Get tool that is available in the workspace.

        Parameters
        ----------
        tool_id : str
            ID of the requested tool.

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

        Returns
        -------
        ToolResponseModel
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.conversational_ai.tools.get(
            tool_id="tool_id",
        )
        r1   r   getr.   r   r8   r*   r0   s       r   r;   zToolsClient.get   s)    8 $$((/(R	~~r   c                T    | j                   j                  ||      }|j                  S )a@  
        Delete tool from the workspace.

        Parameters
        ----------
        tool_id : str
            ID of the requested tool.

        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.tools.delete(
            tool_id="tool_id",
        )
        r1   r   deleter.   r<   s       r   r?   zToolsClient.delete   s)    8 $$++G_+U	~~r   c                V    | j                   j                  |||      }|j                  S )a  
        Update tool that is available in the workspace.

        Parameters
        ----------
        tool_id : str
            ID of the requested tool.

        request : ToolRequestModel

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

        Returns
        -------
        ToolResponseModel
            Successful Response

        Examples
        --------
        from elevenlabs import (
            ElevenLabs,
            ToolRequestModel,
            ToolRequestModelToolConfig_Client,
        )

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.conversational_ai.tools.update(
            tool_id="tool_id",
            request=ToolRequestModel(
                tool_config=ToolRequestModelToolConfig_Client(
                    name="name",
                    description="description",
                    expects_response=False,
                ),
            ),
        )
        r4   r   updater.   r   r8   r2   r*   r0   s        r   rB   zToolsClient.update   s-    V $$++GWVe+f	~~r   r)   r$   r*   c                X    | j                   j                  ||||      }|j                  S )a  
        Get a list of agents depending on this tool

        Parameters
        ----------
        tool_id : str
            ID of the requested tool.

        cursor : typing.Optional[str]
            Used for fetching next page. Cursor is returned in the response.

        page_size : typing.Optional[int]
            How many documents to return at maximum. Can not exceed 100, defaults to 30.

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

        Returns
        -------
        GetToolDependentAgentsResponseModel
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.conversational_ai.tools.get_dependent_agents(
            tool_id="tool_id",
            cursor="cursor",
            page_size=1,
        )
        rD   r   get_dependent_agentsr.   r   r8   r)   r$   r*   r0   s         r   rG   z ToolsClient.get_dependent_agents  s5    V $$99Fi : 
	 ~~r   )__name__
__module____qualname__r   r   propertyr   r    typingOptionalstrintboolUnionr   Sequencer   r   r   r   r-   r	   r
   r6   r;   Anyr?   rB   r   rG    r   r   r   r      s,   I*; I  >     (,*.;?`d9=/3'+;?H $H ??3'	H
 $*??4#8H v||NFOON<[,[\]H 6H ,H $H  8H 
HV `d(*(=C__^=\(	(T W[ 3 FOON4S _p > Z^ c v~7V bhblbl @ nr,,(8,KQ??[iKj,	,d (,*.;?.. $	.
 ??3'.  8. 
-.r   r   c                      e Zd ZdefdZedefd       Zddddddddddej                  e
   dej                  e   d	ej                  e   d
ej                  ej                  eej                  e   f      dej                  e   dej                  e   dej                  e
   dej                  e   defdZdddedej                  e   defdZddde
dej                  e   defdZddde
dej                  e   dej2                  fdZddde
dedej                  e   defdZddddde
dej                  e
   dej                  e   dej                  e   def
dZy)AsyncToolsClientr   c                &    t        |      | _        y r   )r   r   r   s     r   r   zAsyncToolsClient.__init__5  s    .nMr   r   c                     | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawToolsClient
        r   r   s    r   r    z"AsyncToolsClient.with_raw_response8  r!   r   Nr"   r#   r$   r%   r&   r'   r(   r)   r*   c          
      |   K   | j                   j                  ||||||||       d{   }	|	j                  S 7 w)a  
        Get all available tools in the workspace.

        Parameters
        ----------
        search : typing.Optional[str]
            If specified, the endpoint returns only tools whose names start with this string.

        page_size : typing.Optional[int]
            How many documents to return at maximum. Can not exceed 100, defaults to 30.

        show_only_owned_documents : typing.Optional[bool]
            If set to true, the endpoint will return only tools owned by you (and not shared from somebody else).

        types : typing.Optional[typing.Union[ToolTypeFilter, typing.Sequence[ToolTypeFilter]]]
            If present, the endpoint will return only tools of the given types.

        sort_direction : typing.Optional[SortDirection]
            The direction to sort the results

        sort_by : typing.Optional[ToolSortBy]
            The field to sort the results by

        cursor : typing.Optional[str]
            Used for fetching next page. Cursor is returned in the response.

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

        Returns
        -------
        ToolsResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.conversational_ai.tools.list(
                search="search",
                page_size=1,
                show_only_owned_documents=True,
                sort_direction="asc",
                sort_by="name",
                cursor="cursor",
            )


        asyncio.run(main())
        r"   Nr,   r/   s
             r   r-   zAsyncToolsClient.listC  sR     L **//&?)+ 0 	
 	
	 ~~	
s   '<:<r1   r2   c                p   K   | j                   j                  ||       d{   }|j                  S 7 w)a  
        Add a new tool to the available tools in the workspace.

        Parameters
        ----------
        request : ToolRequestModel

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

        Returns
        -------
        ToolResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import (
            AsyncElevenLabs,
            ToolRequestModel,
            ToolRequestModelToolConfig_Client,
        )

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.conversational_ai.tools.create(
                request=ToolRequestModel(
                    tool_config=ToolRequestModelToolConfig_Client(
                        name="name",
                        description="description",
                        expects_response=False,
                    ),
                ),
            )


        asyncio.run(main())
        r4   Nr5   r7   s       r   r6   zAsyncToolsClient.create  s8     ^ **11'Sb1cc	~~ d   !646r8   c                p   K   | j                   j                  ||       d{   }|j                  S 7 w)a  
        Get tool that is available in the workspace.

        Parameters
        ----------
        tool_id : str
            ID of the requested tool.

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

        Returns
        -------
        ToolResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


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


        asyncio.run(main())
        r1   Nr:   r<   s       r   r;   zAsyncToolsClient.get  s7     H **..w.XX	~~ Yr\   c                p   K   | j                   j                  ||       d{   }|j                  S 7 w)a  
        Delete tool from the workspace.

        Parameters
        ----------
        tool_id : str
            ID of the requested tool.

        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.tools.delete(
                tool_id="tool_id",
            )


        asyncio.run(main())
        r1   Nr>   r<   s       r   r?   zAsyncToolsClient.delete  s7     H **11'?1[[	~~ \r\   c                r   K   | j                   j                  |||       d{   }|j                  S 7 w)av  
        Update tool that is available in the workspace.

        Parameters
        ----------
        tool_id : str
            ID of the requested tool.

        request : ToolRequestModel

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

        Returns
        -------
        ToolResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import (
            AsyncElevenLabs,
            ToolRequestModel,
            ToolRequestModelToolConfig_Client,
        )

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.conversational_ai.tools.update(
                tool_id="tool_id",
                request=ToolRequestModel(
                    tool_config=ToolRequestModelToolConfig_Client(
                        name="name",
                        description="description",
                        expects_response=False,
                    ),
                ),
            )


        asyncio.run(main())
        r4   NrA   rC   s        r   rB   zAsyncToolsClient.update  s:     f **11'7\k1ll	~~ ms   "757rD   c                t   K   | j                   j                  ||||       d{   }|j                  S 7 w)a  
        Get a list of agents depending on this tool

        Parameters
        ----------
        tool_id : str
            ID of the requested tool.

        cursor : typing.Optional[str]
            Used for fetching next page. Cursor is returned in the response.

        page_size : typing.Optional[int]
            How many documents to return at maximum. Can not exceed 100, defaults to 30.

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

        Returns
        -------
        GetToolDependentAgentsResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.conversational_ai.tools.get_dependent_agents(
                tool_id="tool_id",
                cursor="cursor",
                page_size=1,
            )


        asyncio.run(main())
        rD   NrF   rH   s         r   rG   z%AsyncToolsClient.get_dependent_agentsK  sD     f **??Fi @ 
 
	 ~~
s   #868)rI   rJ   rK   r   r   rL   r   r    rM   rN   rO   rP   rQ   rR   r   rS   r   r   r   r   r-   r	   r
   r6   r;   rT   r?   rB   r   rG   rU   r   r   rW   rW   4  s.   N*< N  #6     (,*.;?`d9=/3'+;?P $P ??3'	P
 $*??4#8P v||NFOON<[,[\]P 6P ,P $P  8P 
Pf `d0*0=C__^=\0	0d ]a % %&//.:Y %ev %N `d %C %V__^=\ %hnhrhr %P nr44(84KQ??[iKj4	4t (,*.;?66 $	6
 ??3'6  86 
-6r   rW   )rM   core.client_wrapperr   r   core.request_optionsr   .types.get_tool_dependent_agents_response_modelr   types.sort_directionr   types.tool_request_modelr	   types.tool_response_modelr
   types.tool_sort_byr   types.tool_type_filterr   types.tools_response_modelr   
raw_clientr   r   castrT   OMITr   rW   rU   r   r   <module>rm      sY     H 2 a 1 8 : , 4 < ; v{{6::s#] ]@	M Mr   