
    b6ieK                    "   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 ej2                  rddlmZmZ  ej:                  ej<                  d      Z G d d      Z  G d d      Z!y)    )annotationsN   )AsyncClientWrapperSyncClientWrapper)RequestOptions)AddChapterResponseModel)ChapterContentInputModel)ChapterWithContentResponseModel)ConvertChapterResponseModel)DeleteChapterResponseModel)EditChapterResponseModel)GetChaptersResponse   )AsyncRawChaptersClientRawChaptersClient)AsyncSnapshotsClientSnapshotsClient.c                      e Zd ZddZedd       ZddddZedd	 	 	 	 	 	 	 	 	 ddZdd	 	 	 	 	 	 	 ddZ	eedd		 	 	 	 	 	 	 	 	 	 	 dd
Z
dd	 	 	 	 	 	 	 ddZdd	 	 	 	 	 	 	 ddZed        Zy)ChaptersClientc               B    t        |      | _        || _        d | _        y Nclient_wrapper)r   _raw_client_client_wrapper
_snapshotsselfr   s     u/root/.openclaw/workspace/visionaryfx/venv/lib/python3.12/site-packages/elevenlabs/studio/projects/chapters/client.py__init__zChaptersClient.__init__   s    ,NK-<@    c                    | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawChaptersClient
        r   r   s    r   with_raw_responsez ChaptersClient.with_raw_response        r!   Nrequest_optionsc               T    | j                   j                  ||      }|j                  S )an  
        Returns a list of a Studio project's chapters.

        Parameters
        ----------
        project_id : str
            The ID of the Studio project.

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

        Returns
        -------
        GetChaptersResponse
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.studio.projects.chapters.list(
            project_id="21m00Tcm4TlvDq8ikWAM",
        )
        r'   r   listdatar   
project_idr(   	_responses       r   r+   zChaptersClient.list)   s)    8 $$))*o)V	~~r!   from_urlr(   c               X    | j                   j                  ||||      }|j                  S )a)  
        Creates a new chapter either as blank or from a URL.

        Parameters
        ----------
        project_id : str
            The ID of the Studio project.

        name : str
            The name of the chapter, used for identification only.

        from_url : typing.Optional[str]
            An optional URL from which we will extract content to initialize the Studio project. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank.

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

        Returns
        -------
        AddChapterResponseModel
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.studio.projects.chapters.create(
            project_id="21m00Tcm4TlvDq8ikWAM",
            name="Chapter 1",
        )
        namer1   r(   r   creater,   r   r.   r4   r1   r(   r/   s         r   r6   zChaptersClient.createH   s/    T $$++JTHfu+v	~~r!   c               V    | j                   j                  |||      }|j                  S )a  
        Returns information about a specific chapter.

        Parameters
        ----------
        project_id : str
            The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects.

        chapter_id : str
            The ID of the chapter to be used. You can use the [List project chapters](/docs/api-reference/studio/get-chapters) endpoint to list all the available chapters.

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

        Returns
        -------
        ChapterWithContentResponseModel
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.studio.projects.chapters.get(
            project_id="21m00Tcm4TlvDq8ikWAM",
            chapter_id="21m00Tcm4TlvDq8ikWAM",
        )
        r'   r   getr,   r   r.   
chapter_idr(   r/   s        r   r:   zChaptersClient.getu   s-    D $$((ZQ`(a	~~r!   r4   contentr(   c               Z    | j                   j                  |||||      }|j                  S )a  
        Updates a chapter.

        Parameters
        ----------
        project_id : str
            The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects.

        chapter_id : str
            The ID of the chapter to be used. You can use the [List project chapters](/docs/api-reference/studio/get-chapters) endpoint to list all the available chapters.

        name : typing.Optional[str]
            The name of the chapter, used for identification only.

        content : typing.Optional[ChapterContentInputModel]
            The chapter content to use.

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

        Returns
        -------
        EditChapterResponseModel
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.studio.projects.chapters.update(
            project_id="21m00Tcm4TlvDq8ikWAM",
            chapter_id="21m00Tcm4TlvDq8ikWAM",
        )
        r=   r   updater,   r   r.   r<   r4   r>   r(   r/   s          r   rA   zChaptersClient.update   s8    \ $$++
wP_ , 
	 ~~r!   c               V    | j                   j                  |||      }|j                  S )a  
        Deletes a chapter.

        Parameters
        ----------
        project_id : str
            The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects.

        chapter_id : str
            The ID of the chapter to be used. You can use the [List project chapters](/docs/api-reference/studio/get-chapters) endpoint to list all the available chapters.

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

        Returns
        -------
        DeleteChapterResponseModel
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.studio.projects.chapters.delete(
            project_id="21m00Tcm4TlvDq8ikWAM",
            chapter_id="21m00Tcm4TlvDq8ikWAM",
        )
        r'   r   deleter,   r;   s        r   rE   zChaptersClient.delete   s-    D $$++J
Tc+d	~~r!   c               V    | j                   j                  |||      }|j                  S )a  
        Starts conversion of a specific chapter.

        Parameters
        ----------
        project_id : str
            The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects.

        chapter_id : str
            The ID of the chapter to be used. You can use the [List project chapters](/docs/api-reference/studio/get-chapters) endpoint to list all the available chapters.

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

        Returns
        -------
        ConvertChapterResponseModel
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.studio.projects.chapters.convert(
            project_id="21m00Tcm4TlvDq8ikWAM",
            chapter_id="21m00Tcm4TlvDq8ikWAM",
        )
        r'   r   convertr,   r;   s        r   rH   zChaptersClient.convert   s-    D $$,,ZUd,e	~~r!   c                n    | j                   ddlm}  || j                        | _         | j                   S )Nr   )r   r   )r   snapshots.clientr   r   )r   r   s     r   	snapshotszChaptersClient.snapshots  s+    ??"9-T=Q=QRDOr!   )r   r   )returnr   r.   strr(   typing.Optional[RequestOptions]rL   r   
r.   rN   r4   rN   r1   typing.Optional[str]r(   rO   rL   r   r.   rN   r<   rN   r(   rO   rL   r
   r.   rN   r<   rN   r4   rQ   r>   z)typing.Optional[ChapterContentInputModel]r(   rO   rL   r   r.   rN   r<   rN   r(   rO   rL   r   r.   rN   r<   rN   r(   rO   rL   r   __name__
__module____qualname__r    propertyr%   r+   OMITr6   r:   rA   rE   rH   rK    r!   r   r   r      sM   A
     [_ H *.;?++ 	+
 '+ 9+ 
!+\ gk##+.#Dc#	(#T &*=A;?11 1
 #1 ;1 91 
"1h gk##+.#Dc#	##L gk##+.#Dc#	$#J  r!   r   c                      e Zd ZddZedd       Zdd	 	 	 	 	 ddZedd	 	 	 	 	 	 	 	 	 ddZdd	 	 	 	 	 	 	 ddZ	eedd		 	 	 	 	 	 	 	 	 	 	 dd
Z
dd	 	 	 	 	 	 	 ddZdd	 	 	 	 	 	 	 ddZed        Zy)AsyncChaptersClientc               B    t        |      | _        || _        d | _        y r   )r   r   r   r   r   s     r   r    zAsyncChaptersClient.__init__!  s    1P-AEr!   c                    | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawChaptersClient
        r#   r$   s    r   r%   z%AsyncChaptersClient.with_raw_response&  r&   r!   Nr'   c               p   K   | j                   j                  ||       d{   }|j                  S 7 w)a  
        Returns a list of a Studio project's chapters.

        Parameters
        ----------
        project_id : str
            The ID of the Studio project.

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

        Returns
        -------
        GetChaptersResponse
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.studio.projects.chapters.list(
                project_id="21m00Tcm4TlvDq8ikWAM",
            )


        asyncio.run(main())
        r'   Nr*   r-   s       r   r+   zAsyncChaptersClient.list1  s7     L **//
O/\\	~~ ]s   !646r0   c               t   K   | j                   j                  ||||       d{   }|j                  S 7 w)a  
        Creates a new chapter either as blank or from a URL.

        Parameters
        ----------
        project_id : str
            The ID of the Studio project.

        name : str
            The name of the chapter, used for identification only.

        from_url : typing.Optional[str]
            An optional URL from which we will extract content to initialize the Studio project. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank.

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

        Returns
        -------
        AddChapterResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.studio.projects.chapters.create(
                project_id="21m00Tcm4TlvDq8ikWAM",
                name="Chapter 1",
            )


        asyncio.run(main())
        r3   Nr5   r7   s         r   r6   zAsyncChaptersClient.createZ  sC     d **11THo 2 
 
	 ~~
s   #868c               r   K   | j                   j                  |||       d{   }|j                  S 7 w)aa  
        Returns information about a specific chapter.

        Parameters
        ----------
        project_id : str
            The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects.

        chapter_id : str
            The ID of the chapter to be used. You can use the [List project chapters](/docs/api-reference/studio/get-chapters) endpoint to list all the available chapters.

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

        Returns
        -------
        ChapterWithContentResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.studio.projects.chapters.get(
                project_id="21m00Tcm4TlvDq8ikWAM",
                chapter_id="21m00Tcm4TlvDq8ikWAM",
            )


        asyncio.run(main())
        r'   Nr9   r;   s        r   r:   zAsyncChaptersClient.get  s:     T **..z:Wf.gg	~~ h   "757r=   c               v   K   | j                   j                  |||||       d{   }|j                  S 7 w)a  
        Updates a chapter.

        Parameters
        ----------
        project_id : str
            The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects.

        chapter_id : str
            The ID of the chapter to be used. You can use the [List project chapters](/docs/api-reference/studio/get-chapters) endpoint to list all the available chapters.

        name : typing.Optional[str]
            The name of the chapter, used for identification only.

        content : typing.Optional[ChapterContentInputModel]
            The chapter content to use.

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

        Returns
        -------
        EditChapterResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.studio.projects.chapters.update(
                project_id="21m00Tcm4TlvDq8ikWAM",
                chapter_id="21m00Tcm4TlvDq8ikWAM",
            )


        asyncio.run(main())
        r=   Nr@   rB   s          r   rA   zAsyncChaptersClient.update  sF     l **11
wP_ 2 
 
	 ~~
s   $979c               r   K   | j                   j                  |||       d{   }|j                  S 7 w)aD  
        Deletes a chapter.

        Parameters
        ----------
        project_id : str
            The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects.

        chapter_id : str
            The ID of the chapter to be used. You can use the [List project chapters](/docs/api-reference/studio/get-chapters) endpoint to list all the available chapters.

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

        Returns
        -------
        DeleteChapterResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.studio.projects.chapters.delete(
                project_id="21m00Tcm4TlvDq8ikWAM",
                chapter_id="21m00Tcm4TlvDq8ikWAM",
            )


        asyncio.run(main())
        r'   NrD   r;   s        r   rE   zAsyncChaptersClient.delete  s:     T **11*jZi1jj	~~ krd   c               r   K   | j                   j                  |||       d{   }|j                  S 7 w)a\  
        Starts conversion of a specific chapter.

        Parameters
        ----------
        project_id : str
            The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects.

        chapter_id : str
            The ID of the chapter to be used. You can use the [List project chapters](/docs/api-reference/studio/get-chapters) endpoint to list all the available chapters.

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

        Returns
        -------
        ConvertChapterResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.studio.projects.chapters.convert(
                project_id="21m00Tcm4TlvDq8ikWAM",
                chapter_id="21m00Tcm4TlvDq8ikWAM",
            )


        asyncio.run(main())
        r'   NrG   r;   s        r   rH   zAsyncChaptersClient.convert&  s:     T **22:z[j2kk	~~ lrd   c                n    | j                   ddlm}  || j                        | _         | j                   S )Nr   )r   r   )r   rJ   r   r   )r   r   s     r   rK   zAsyncChaptersClient.snapshotsS  s+    ??">2$BVBVWDOr!   )r   r   )rL   r   rM   rP   rR   rS   rT   rU   rV   r\   r!   r   r^   r^      se   F
     VZ''3R'	'\ *.;?55 	5
 '5 95 
!5p gk+++.+Dc+	(+d &*=A;?99 9
 #9 ;9 99 
"9x gk+++.+Dc+	#+\ gk+++.+Dc+	$+Z  r!   r^   )"
__future__r   typingcore.client_wrapperr   r   core.request_optionsr    types.add_chapter_response_modelr   !types.chapter_content_input_modelr	   )types.chapter_with_content_response_modelr
   $types.convert_chapter_response_modelr   #types.delete_chapter_response_modelr   !types.edit_chapter_response_modelr   types.get_chapters_responser   
raw_clientr   r   TYPE_CHECKINGrJ   r   r   castAnyr[   r   r^   r\   r!   r   <module>rx      sf    #  I 3 H J Y P N J ? A	Gv{{6::s#E EPy yr!   