
    b6i*                         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mZ  e j&                  e j(                  d      Z G d d      Z G d d      Zy)    N   )AsyncClientWrapperSyncClientWrapper)RequestOptions)#DeleteWorkspaceWebhookResponseModel)"PatchWorkspaceWebhookResponseModel)WebhookHmacSettings)#WorkspaceCreateWebhookResponseModel)!WorkspaceWebhookListResponseModel   )AsyncRawWebhooksClientRawWebhooksClient.c                   "   e Zd ZdefdZedefd       Zddd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
dedej                  e   def
dZy)WebhooksClientclient_wrapperc                &    t        |      | _        y N)r   )r   _raw_clientselfr   s     e/root/.openclaw/workspace/visionaryfx/venv/lib/python3.12/site-packages/elevenlabs/webhooks/client.py__init__zWebhooksClient.__init__   s    ,NK    returnc                     | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawWebhooksClient
        r   r   s    r   with_raw_responsez WebhooksClient.with_raw_response        r   Ninclude_usagesrequest_optionsr!   r"   c                T    | j                   j                  ||      }|j                  S )a  
        List all webhooks for a workspace

        Parameters
        ----------
        include_usages : typing.Optional[bool]
            Whether to include active usages of the webhook, only usable by admins

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

        Returns
        -------
        WorkspaceWebhookListResponseModel
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.webhooks.list(
            include_usages=False,
        )
        r    r   listdatar   r!   r"   	_responses       r   r%   zWebhooksClient.list!   s*    < $$))Yh)i	~~r   r"   settingsc                T    | j                   j                  ||      }|j                  S )a4  
        Create a new webhook for the workspace with the specified authentication type.

        Parameters
        ----------
        settings : WebhookHmacSettings
            Webhook settings object containing auth_type and corresponding configuration

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

        Returns
        -------
        WorkspaceCreateWebhookResponseModel
            Successful Response

        Examples
        --------
        from elevenlabs import ElevenLabs, WebhookHmacSettings

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.webhooks.create(
            settings=WebhookHmacSettings(
                name="name",
                webhook_url="webhook_url",
            ),
        )
        r*   r"   r   creater&   r   r*   r"   r(   s       r   r.   zWebhooksClient.createB   s*    B $$++X+_	~~r   
webhook_idc                T    | j                   j                  ||      }|j                  S )ap  
        Delete the specified workspace webhook

        Parameters
        ----------
        webhook_id : str
            The unique ID for the webhook

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

        Returns
        -------
        DeleteWorkspaceWebhookResponseModel
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.webhooks.delete(
            webhook_id="G007vmtq9uWYl7SUW9zGS8GZZa1K",
        )
        r)   r   deleter&   r   r0   r"   r(   s       r   r3   zWebhooksClient.deletef   s)    < $$++J+X	~~r   is_disablednamec                X    | j                   j                  ||||      }|j                  S )ah  
        Update the specified workspace webhook

        Parameters
        ----------
        webhook_id : str
            The unique ID for the webhook

        is_disabled : bool
            Whether to disable or enable the webhook

        name : str
            The display name of the webhook (used for display purposes only).

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

        Returns
        -------
        PatchWorkspaceWebhookResponseModel
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.webhooks.update(
            webhook_id="G007vmtq9uWYl7SUW9zGS8GZZa1K",
            is_disabled=True,
            name="My Callback Webhook",
        )
        r5   r6   r"   r   updater&   r   r0   r5   r6   r"   r(   s         r   r:   zWebhooksClient.update   s5    L $$++KdO , 
	 ~~r   )__name__
__module____qualname__r   r   propertyr   r   typingOptionalboolr   r   r%   r	   r
   r.   strr   r3   r   r:    r   r   r   r      s   L*; L  #4     :>rv!'!6PVP_P_`nPo	*D dh"."AGQ_A`"	,"J VZ39??>3R	,D tx))/3);>)QWQ`Q`aoQp)	+)r   r   c                   "   e Zd ZdefdZedefd       Zddd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
dedej                  e   def
dZy)AsyncWebhooksClientr   c                &    t        |      | _        y r   )r   r   r   s     r   r   zAsyncWebhooksClient.__init__   s    1Pr   r   c                     | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawWebhooksClient
        r   r   s    r   r   z%AsyncWebhooksClient.with_raw_response   r   r   Nr    r!   r"   c                p   K   | j                   j                  ||       d{   }|j                  S 7 w)a  
        List all webhooks for a workspace

        Parameters
        ----------
        include_usages : typing.Optional[bool]
            Whether to include active usages of the webhook, only usable by admins

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

        Returns
        -------
        WorkspaceWebhookListResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.webhooks.list(
                include_usages=False,
            )


        asyncio.run(main())
        r    Nr$   r'   s       r   r%   zAsyncWebhooksClient.list   s8     L **//~_n/oo	~~ p   !646r)   r*   c                p   K   | j                   j                  ||       d{   }|j                  S 7 w)a  
        Create a new webhook for the workspace with the specified authentication type.

        Parameters
        ----------
        settings : WebhookHmacSettings
            Webhook settings object containing auth_type and corresponding configuration

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

        Returns
        -------
        WorkspaceCreateWebhookResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs, WebhookHmacSettings

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.webhooks.create(
                settings=WebhookHmacSettings(
                    name="name",
                    webhook_url="webhook_url",
                ),
            )


        asyncio.run(main())
        r,   Nr-   r/   s       r   r.   zAsyncWebhooksClient.create   s8     R **118Ud1ee	~~ frJ   r0   c                p   K   | j                   j                  ||       d{   }|j                  S 7 w)a  
        Delete the specified workspace webhook

        Parameters
        ----------
        webhook_id : str
            The unique ID for the webhook

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

        Returns
        -------
        DeleteWorkspaceWebhookResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.webhooks.delete(
                webhook_id="G007vmtq9uWYl7SUW9zGS8GZZa1K",
            )


        asyncio.run(main())
        r)   Nr2   r4   s       r   r3   zAsyncWebhooksClient.delete  s7     L **11*o1^^	~~ _rJ   r5   r6   c                t   K   | j                   j                  ||||       d{   }|j                  S 7 w)a  
        Update the specified workspace webhook

        Parameters
        ----------
        webhook_id : str
            The unique ID for the webhook

        is_disabled : bool
            Whether to disable or enable the webhook

        name : str
            The display name of the webhook (used for display purposes only).

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

        Returns
        -------
        PatchWorkspaceWebhookResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.webhooks.update(
                webhook_id="G007vmtq9uWYl7SUW9zGS8GZZa1K",
                is_disabled=True,
                name="My Callback Webhook",
            )


        asyncio.run(main())
        r8   Nr9   r;   s         r   r:   zAsyncWebhooksClient.update@  sC     \ **11KdO 2 
 
	 ~~
s   #868)r<   r=   r>   r   r   r?   r   r   r@   rA   rB   r   r   r%   r	   r
   r.   rC   r   r3   r   r:   rD   r   r   rF   rF      s   Q*< Q  #9     :>rv'!'!6'PVP_P_`nPo'	*'T dh*.*AGQ_A`*	,*Z VZ''39??>3R'	,'T tx11/31;>1QWQ`Q`aoQp1	+1r   rF   )r@   core.client_wrapperr   r   core.request_optionsr   -types.delete_workspace_webhook_response_modelr   ,types.patch_workspace_webhook_response_modelr   types.webhook_hmac_settingsr	   -types.workspace_create_webhook_response_modelr
   +types.workspace_webhook_list_response_modelr   
raw_clientr   r   castAnyOMITr   rF   rD   r   r   <module>rY      sS     G 1 _ ] = _ [ A v{{6::s#^ ^B~ ~r   