o
    lWi)                     @   s   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mZ dd	lmZ e e jd
ZG dd dZG dd dZdS )    N   )AsyncClientWrapperSyncClientWrapper)RequestOptions)AddWorkspaceInviteResponseModel)"DeleteWorkspaceInviteResponseModel   )AsyncRawInvitesClientRawInvitesClient):BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission.c                   @      e Zd ZdefddZedefddZeeddd	e	d
e
je
je	  de
je de
je def
ddZeddde
je	 d
e
je
je	  de
je defddZddd	e	de
je defddZdS )InvitesClientclient_wrapperc                C      t |d| _d S N)r   )r
   _raw_clientselfr    r   g/var/www/html/asistente-voz-ia/venv/lib/python3.10/site-packages/elevenlabs/workspace/invites/client.py__init__      zInvitesClient.__init__returnc                 C      | j S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawInvitesClient
        r   r   r   r   r   with_raw_response      	zInvitesClient.with_raw_responseN	group_idsworkspace_permissionrequest_optionsemailr   r    r!   c                C   s   | j j||||d}|jS )a  
        Sends an email invitation to join your workspace to the provided email. If the user doesn't have an account they will be prompted to create one. If the user accepts this invite they will be added as a user to your workspace and your subscription using one of your seats. This endpoint may only be called by workspace administrators. If the user is already in the workspace a 400 error will be returned.

        Parameters
        ----------
        email : str
            The email of the customer

        group_ids : typing.Optional[typing.Sequence[str]]
            The group ids of the user

        workspace_permission : typing.Optional[BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission]
            The workspace permission of the user

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

        Returns
        -------
        AddWorkspaceInviteResponseModel
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.workspace.invites.create(
            email="john.doe@testmail.com",
        )
        r"   r   r    r!   r   createdatar   r"   r   r    r!   	_responser   r   r   r%   !   s   )zInvitesClient.creater   r!   emailsc                C   s   | j j|||d}|jS )a0  
        Sends email invitations to join your workspace to the provided emails. Requires all email addresses to be part of a verified domain. If the users don't have an account they will be prompted to create one. If the users accept these invites they will be added as users to your workspace and your subscription using one of your seats. This endpoint may only be called by workspace administrators.

        Parameters
        ----------
        emails : typing.Sequence[str]
            The email of the customer

        group_ids : typing.Optional[typing.Sequence[str]]
            The group ids of the user

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

        Returns
        -------
        AddWorkspaceInviteResponseModel
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.workspace.invites.create_batch(
            emails=["emails"],
        )
        r*   r   r!   r   create_batchr&   r   r*   r   r!   r(   r   r   r   r-   O   s   %zInvitesClient.create_batchr!   c                C   s   | j j||d}|jS )a!  
        Invalidates an existing email invitation. The invitation will still show up in the inbox it has been delivered to, but activating it to join the workspace won't work. This endpoint may only be called by workspace administrators.

        Parameters
        ----------
        email : str
            The email of the customer

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

        Returns
        -------
        DeleteWorkspaceInviteResponseModel
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.workspace.invites.delete(
            email="john.doe@testmail.com",
        )
        r"   r!   r   deleter&   r   r"   r!   r(   r   r   r   r2   w   s   zInvitesClient.delete)__name__
__module____qualname__r   r   propertyr
   r   OMITstrtypingOptionalSequencer   r   r   r%   r-   r   r2   r   r   r   r   r      sJ    
2
)r   c                   @   r   )AsyncInvitesClientr   c                C   r   r   )r	   r   r   r   r   r   r      r   zAsyncInvitesClient.__init__r   c                 C   r   )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawInvitesClient
        r   r   r   r   r   r      r   z$AsyncInvitesClient.with_raw_responseNr   r"   r   r    r!   c                   s"   | j j||||dI dH }|jS )a@  
        Sends an email invitation to join your workspace to the provided email. If the user doesn't have an account they will be prompted to create one. If the user accepts this invite they will be added as a user to your workspace and your subscription using one of your seats. This endpoint may only be called by workspace administrators. If the user is already in the workspace a 400 error will be returned.

        Parameters
        ----------
        email : str
            The email of the customer

        group_ids : typing.Optional[typing.Sequence[str]]
            The group ids of the user

        workspace_permission : typing.Optional[BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission]
            The workspace permission of the user

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

        Returns
        -------
        AddWorkspaceInviteResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.workspace.invites.create(
                email="john.doe@testmail.com",
            )


        asyncio.run(main())
        r#   Nr$   r'   r   r   r   r%      s
   1zAsyncInvitesClient.creater)   r*   c                   s    | j j|||dI dH }|jS )a  
        Sends email invitations to join your workspace to the provided emails. Requires all email addresses to be part of a verified domain. If the users don't have an account they will be prompted to create one. If the users accept these invites they will be added as users to your workspace and your subscription using one of your seats. This endpoint may only be called by workspace administrators.

        Parameters
        ----------
        emails : typing.Sequence[str]
            The email of the customer

        group_ids : typing.Optional[typing.Sequence[str]]
            The group ids of the user

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

        Returns
        -------
        AddWorkspaceInviteResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.workspace.invites.create_batch(
                emails=["emails"],
            )


        asyncio.run(main())
        r+   Nr,   r.   r   r   r   r-      s
   -zAsyncInvitesClient.create_batchr/   c                   s   | j j||dI dH }|jS )a  
        Invalidates an existing email invitation. The invitation will still show up in the inbox it has been delivered to, but activating it to join the workspace won't work. This endpoint may only be called by workspace administrators.

        Parameters
        ----------
        email : str
            The email of the customer

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

        Returns
        -------
        DeleteWorkspaceInviteResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.workspace.invites.delete(
                email="john.doe@testmail.com",
            )


        asyncio.run(main())
        r0   Nr1   r3   r   r   r   r2     s   &zAsyncInvitesClient.delete)r4   r5   r6   r   r   r7   r	   r   r8   r9   r:   r;   r<   r   r   r   r%   r-   r   r2   r   r   r   r   r=      sJ    
:
3r=   )r:   core.client_wrapperr   r   core.request_optionsr   )types.add_workspace_invite_response_modelr   ,types.delete_workspace_invite_response_modelr   
raw_clientr	   r
   Jtypes.body_invite_user_v_1_workspace_invites_add_post_workspace_permissionr   castAnyr8   r   r=   r   r   r   r   <module>   s    