
    ]jif                         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	m
Z
  e j                  e j                  d      Z G d	 d
      Z G d d      Zy)    N   )AsyncClientWrapperSyncClientWrapper)RequestOptions)MaybeExpandedComment   )AsyncRawCommentsClientRawCommentsClient.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ej                  e
   dej                  e   d	ej                  e
   d
ej                  e   dej                  e   dej                  e   dej                  e   dej                  e   fdZdeeeeeeddd
ej                  e   dej                  e
   dej                  ej$                     d	ej                  e
   dej                  e   dej                  ej$                     dej                  e   dej                  e   defdZdddddddddej                  e
   dej                  e   d	ej                  e
   d
ej                  e   dej                  e   dej                  e   dej                  e   dej(                  e   fdZdddded
ej                  e   dej                  e   defdZdddded
ej                  e   dej                  e   ddfdZdeeeeeeddded
ej                  e   dej                  e
   dej                  ej$                     d	ej                  e
   dej                  e   dej                  ej$                     dej                  e   dej                  e   defdZy)CommentsClientclient_wrapperc                &    t        |      | _        y N)r   )r
   _raw_clientselfr   s     J/root/env/lib/python3.12/site-packages/label_studio_sdk/comments/client.py__init__zCommentsClient.__init__   s    ,NK    returnc                     | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawCommentsClient
        r   r   s    r   with_raw_responsez CommentsClient.with_raw_response        r   N
annotation
annotatorsdraftexpand_created_byorderingprojectsrequest_optionsr   r   r   r    r!   r"   r#   c          	      ^    | j                   j                  |||||||      }|j                  S )a-  
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        List all comments for a specific annotation ID.

        Parameters
        ----------
        annotation : typing.Optional[int]

        annotators : typing.Optional[str]

        draft : typing.Optional[int]

        expand_created_by : typing.Optional[bool]

        ordering : typing.Optional[str]
            Which field to use when ordering the results.

        projects : typing.Optional[str]

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

        Returns
        -------
        typing.List[MaybeExpandedComment]
            List of comments

        Examples
        --------
        from label_studio_sdk import LabelStudio

        client = LabelStudio(
            api_key="YOUR_API_KEY",
        )
        client.comments.list()
        r   r   listdata	r   r   r   r   r    r!   r"   r#   	_responses	            r   r&   zCommentsClient.list   sA    h $$))!!/+ * 
	 ~~r   r    r   classificationsr   is_resolved
region_reftextr#   r+   r,   r-   r.   c          
      `    | j                   j                  ||||||||      }	|	j                  S )aE  
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Create a comment for a specific annotation ID.

        Parameters
        ----------
        expand_created_by : typing.Optional[bool]
            Expand the created_by field

        annotation : typing.Optional[int]

        classifications : typing.Optional[typing.Any]
            Classifications applied by a reviewer or annotator

        draft : typing.Optional[int]

        is_resolved : typing.Optional[bool]
            True if the comment is resolved

        region_ref : typing.Optional[typing.Any]
            Set if this comment is related to a specific part of the annotation. Normally contains region ID and control name.

        text : typing.Optional[str]
            Reviewer or annotator comment

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

        Returns
        -------
        MaybeExpandedComment


        Examples
        --------
        from label_studio_sdk import LabelStudio

        client = LabelStudio(
            api_key="YOUR_API_KEY",
        )
        client.comments.create()
        r*   r   creater'   
r   r    r   r+   r   r,   r-   r.   r#   r)   s
             r   r1   zCommentsClient.create\   sD    v $$++/!+#!+ , 	
	 ~~r   r   r   r   r    r"   tzr#   r4   c          	   #      K   | j                   j                  |||||||      5 }|j                  E d{    ddd       y7 # 1 sw Y   yxY ww)a  
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Export comments to CSV file

        Parameters
        ----------
        annotation : typing.Optional[int]

        annotators : typing.Optional[str]

        draft : typing.Optional[int]

        expand_created_by : typing.Optional[bool]

        projects : typing.Optional[str]

        tz : typing.Optional[str]
            Timezone in which to export the data. Format IANA timezone name, e.g. "America/New_York"

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.

        Returns
        -------
        typing.Iterator[bytes]
            CSV file with comments
        r3   Nr   exportr'   )	r   r   r   r   r    r"   r4   r#   rs	            r   r7   zCommentsClient.export   sh     V $$!!/+ % 
 		 vv		 		 		 		s+   #AAAA	AAA
Ar    r#   idc                V    | j                   j                  |||      }|j                  S )aX  
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Retrieve a specific comment by ID for an annotation.

        Parameters
        ----------
        id : str

        expand_created_by : typing.Optional[bool]
            Expand the created_by field

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

        Returns
        -------
        MaybeExpandedComment


        Examples
        --------
        from label_studio_sdk import LabelStudio

        client = LabelStudio(
            api_key="YOUR_API_KEY",
        )
        client.comments.get(
            id="id",
        )
        r9   r   getr'   r   r:   r    r#   r)   s        r   r=   zCommentsClient.get   s.    T $$((?Pbq(r	~~r   c                V    | j                   j                  |||      }|j                  S )a,  
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Delete a comment by ID

        Parameters
        ----------
        id : str

        expand_created_by : typing.Optional[bool]
            Expand the created_by field

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

        Returns
        -------
        None

        Examples
        --------
        from label_studio_sdk import LabelStudio

        client = LabelStudio(
            api_key="YOUR_API_KEY",
        )
        client.comments.delete(
            id="id",
        )
        r9   r   deleter'   r>   s        r   rA   zCommentsClient.delete  s.    R $$++BBSet+u	~~r   c                b    | j                   j                  |||||||||		      }
|
j                  S )ag  
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Update a specific comment by ID.

        Parameters
        ----------
        id : str

        expand_created_by : typing.Optional[bool]
            Expand the created_by field

        annotation : typing.Optional[int]

        classifications : typing.Optional[typing.Any]
            Classifications applied by a reviewer or annotator

        draft : typing.Optional[int]

        is_resolved : typing.Optional[bool]
            True if the comment is resolved

        region_ref : typing.Optional[typing.Any]
            Set if this comment is related to a specific part of the annotation. Normally contains region ID and control name.

        text : typing.Optional[str]
            Reviewer or annotator comment

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

        Returns
        -------
        MaybeExpandedComment


        Examples
        --------
        from label_studio_sdk import LabelStudio

        client = LabelStudio(
            api_key="YOUR_API_KEY",
        )
        client.comments.update(
            id="id",
        )
        r*   r   updater'   r   r:   r    r   r+   r   r,   r-   r.   r#   r)   s              r   rD   zCommentsClient.update2  sG    @ $$++/!+#!+ , 

	 ~~r   )__name__
__module____qualname__r   r   propertyr
   r   typingOptionalintstrboolr   Listr   r&   OMITAnyr1   Iteratorbytesr7   r=   rA   rD    r   r   r   r      s   L*; L  #4     ,0+/&*37)-)-;?= OOC(= OOC(	=
 s#= "??40= //#&= //#&=  8= 
)	*=D 48+/7;&*-126%);?E "??40E OOC(	E
  4E s#E __T*E OOFJJ/E ooc"E  8E 
ET ,0+/&*37)-#';?4 OOC(4 OOC(	4
 s#4 "??404 //#&4 OOC 4  84 
	4t 48;?++ "??40	+
  8+ 
+b 48;?** "??40	*
  8* 
*` 48+/7;&*-126%);?KK "??40	K
 OOC(K  4K s#K __T*K OOFJJ/K ooc"K  8K 
K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ej                  e
   dej                  e   d	ej                  e
   d
ej                  e   dej                  e   dej                  e   dej                  e   dej                  e   fdZdeeeeeeddd
ej                  e   dej                  e
   dej                  ej$                     d	ej                  e
   dej                  e   dej                  ej$                     dej                  e   dej                  e   defdZdddddddddej                  e
   dej                  e   d	ej                  e
   d
ej                  e   dej                  e   dej                  e   dej                  e   dej(                  e   fdZdddded
ej                  e   dej                  e   defdZdddded
ej                  e   dej                  e   ddfdZdeeeeeeddded
ej                  e   dej                  e
   dej                  ej$                     d	ej                  e
   dej                  e   dej                  ej$                     dej                  e   dej                  e   defdZy)AsyncCommentsClientr   c                &    t        |      | _        y r   )r	   r   r   s     r   r   zAsyncCommentsClient.__init__  s    1Pr   r   c                     | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawCommentsClient
        r   r   s    r   r   z%AsyncCommentsClient.with_raw_response  r   r   Nr   r   r   r   r    r!   r"   r#   c          	      z   K   | j                   j                  |||||||       d{   }|j                  S 7 w)a  
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        List all comments for a specific annotation ID.

        Parameters
        ----------
        annotation : typing.Optional[int]

        annotators : typing.Optional[str]

        draft : typing.Optional[int]

        expand_created_by : typing.Optional[bool]

        ordering : typing.Optional[str]
            Which field to use when ordering the results.

        projects : typing.Optional[str]

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

        Returns
        -------
        typing.List[MaybeExpandedComment]
            List of comments

        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


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


        asyncio.run(main())
        r   Nr%   r(   s	            r   r&   zAsyncCommentsClient.list  sO     x **//!!/+ 0 
 
	 ~~
s   &;9;r*   r+   r,   r-   r.   c          
      |   K   | j                   j                  ||||||||       d{   }	|	j                  S 7 w)a  
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Create a comment for a specific annotation ID.

        Parameters
        ----------
        expand_created_by : typing.Optional[bool]
            Expand the created_by field

        annotation : typing.Optional[int]

        classifications : typing.Optional[typing.Any]
            Classifications applied by a reviewer or annotator

        draft : typing.Optional[int]

        is_resolved : typing.Optional[bool]
            True if the comment is resolved

        region_ref : typing.Optional[typing.Any]
            Set if this comment is related to a specific part of the annotation. Normally contains region ID and control name.

        text : typing.Optional[str]
            Reviewer or annotator comment

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

        Returns
        -------
        MaybeExpandedComment


        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.comments.create()


        asyncio.run(main())
        r*   Nr0   r2   s
             r   r1   zAsyncCommentsClient.create  sR     F **11/!+#!+ 2 	
 	
	 ~~	
s   '<:<r3   r4   c          	        K   | j                   j                  |||||||      4 d{   }|j                  2 3 d{   }	|	 7 7 6 ddd      d{  7   y# 1 d{  7  sw Y   yxY ww)a  
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Export comments to CSV file

        Parameters
        ----------
        annotation : typing.Optional[int]

        annotators : typing.Optional[str]

        draft : typing.Optional[int]

        expand_created_by : typing.Optional[bool]

        projects : typing.Optional[str]

        tz : typing.Optional[str]
            Timezone in which to export the data. Format IANA timezone name, e.g. "America/New_York"

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.

        Returns
        -------
        typing.AsyncIterator[bytes]
            CSV file with comments
        r3   Nr6   )
r   r   r   r   r    r"   r4   r#   r8   _chunks
             r   r7   zAsyncCommentsClient.export%  s     V ##**!!/+ + 
 
	 
	  !  f
	
	 
	 
	 
	 
	se   'A5A	A5A AAAA 	A5AA A5AA5 A2&A)'A2.A5r9   r:   c                r   K   | j                   j                  |||       d{   }|j                  S 7 w)a  
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Retrieve a specific comment by ID for an annotation.

        Parameters
        ----------
        id : str

        expand_created_by : typing.Optional[bool]
            Expand the created_by field

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

        Returns
        -------
        MaybeExpandedComment


        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.comments.get(
                id="id",
            )


        asyncio.run(main())
        r9   Nr<   r>   s        r   r=   zAsyncCommentsClient.get\  s;     d **..rEVhw.xx	~~ y   "757c                r   K   | j                   j                  |||       d{   }|j                  S 7 w)a  
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Delete a comment by ID

        Parameters
        ----------
        id : str

        expand_created_by : typing.Optional[bool]
            Expand the created_by field

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

        Returns
        -------
        None

        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.comments.delete(
                id="id",
            )


        asyncio.run(main())
        r9   Nr@   r>   s        r   rA   zAsyncCommentsClient.delete  sB     b **11"3_ 2 
 
	 ~~
r^   c                ~   K   | j                   j                  |||||||||		       d{   }
|
j                  S 7 w)a  
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Update a specific comment by ID.

        Parameters
        ----------
        id : str

        expand_created_by : typing.Optional[bool]
            Expand the created_by field

        annotation : typing.Optional[int]

        classifications : typing.Optional[typing.Any]
            Classifications applied by a reviewer or annotator

        draft : typing.Optional[int]

        is_resolved : typing.Optional[bool]
            True if the comment is resolved

        region_ref : typing.Optional[typing.Any]
            Set if this comment is related to a specific part of the annotation. Normally contains region ID and control name.

        text : typing.Optional[str]
            Reviewer or annotator comment

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

        Returns
        -------
        MaybeExpandedComment


        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.comments.update(
                id="id",
            )


        asyncio.run(main())
        r*   NrC   rE   s              r   rD   zAsyncCommentsClient.update  sU     P **11/!+#!+ 2 

 

	 ~~

s   (=;=)rF   rG   rH   r   r   rI   r	   r   rJ   rK   rL   rM   rN   r   rO   r   r&   rP   rQ   r1   AsyncIteratorrS   r7   r=   rA   rD   rT   r   r   rV   rV     s   Q*< Q  #9     ,0+/&*37)-)-;?E OOC(E OOC(	E
 s#E "??40E //#&E //#&E  8E 
)	*ET 48+/7;&*-126%);?M "??40M OOC(	M
  4M s#M __T*M OOFJJ/M ooc"M  8M 
Md ,0+/&*37)-#';?5 OOC(5 OOC(	5
 s#5 "??405 //#&5 OOC 5  85 
		e	$5v 48;?33 "??40	3
  83 
3r 48;?44 "??40	4
  84 
4t 48+/7;&*-126%);?SS "??40	S
 OOC(S  4S s#S __T*S OOFJJ/S ooc"S  8S 
Sr   rV   )rJ   core.client_wrapperr   r   core.request_optionsr   types.maybe_expanded_commentr   
raw_clientr	   r
   castrQ   rP   r   rV   rT   r   r   <module>rg      sG     G 1 ? A v{{6::s#o odZ Zr   