
    j^R                         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mZ  e j"                  e j$                  d      Z G d d      Z G d d      Zy)    N   )AsyncClientWrapperSyncClientWrapper)RequestOptions)AnnotationQueuePagePublic)AnnotationQueuePublic)AnnotationQueueWrite)AnnotationQueueWriteScope   )AsyncRawAnnotationQueuesClientRawAnnotationQueuesClient.c                   V   e Zd ZdefdZedefd       Zdddede	j                  e   d	e	j                  e   ddfd
Z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fdZeeeeedddededede	j                  e   de	j                  e   de	j                  e   de	j                  e   de	j                  e	j                  e      d	e	j                  e   ddfdZddde	j                  e   d	e	j                  e   ddfdZddde	j                  e   d	e	j                  e   ddfdZddded	e	j                  e   defdZeeeeedddede	j                  e   de	j                  e   de	j                  e   de	j                  e   de	j                  e	j                  e      d	e	j                  e   ddfdZdddede	j                  e   d	e	j                  e   ddfd Zy)!AnnotationQueuesClientclient_wrapperc                &    t        |      | _        y N)r   )r   _raw_clientselfr   s     /Users/manta/Documents/Projects/TheRoad-I1/backend/.venv/lib/python3.12/site-packages/opik/rest_api/annotation_queues/client.py__init__zAnnotationQueuesClient.__init__   s    4NS    returnc                     | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawAnnotationQueuesClient
        r   r   s    r   with_raw_responsez(AnnotationQueuesClient.with_raw_response        r   Nrequest_optionsididsr    c                V    | j                   j                  |||      }|j                  S )a   
        Add traces or threads to annotation queue

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

        ids : typing.Sequence[str]

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

        Returns
        -------
        None

        Examples
        --------
        from Opik import OpikApi
        client = OpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        client.annotation_queues.add_items_to_annotation_queue(id='id', ids=['ids'], )
        r"   r    r   add_items_to_annotation_queuedatar   r!   r"   r    	_responses        r   r&   z4AnnotationQueuesClient.add_items_to_annotation_queue    s,    2 $$BB23`oBp	~~r   pagesizenamefilterssortingr    r+   r,   r-   r.   r/   c                \    | j                   j                  ||||||      }|j                  S )a  
        Find annotation queues with filtering and sorting

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

        size : typing.Optional[int]

        name : typing.Optional[str]

        filters : typing.Optional[str]

        sorting : typing.Optional[str]

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

        Returns
        -------
        AnnotationQueuePagePublic
            Annotation queues page

        Examples
        --------
        from Opik import OpikApi
        client = OpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        client.annotation_queues.find_annotation_queues()
        r*   r   find_annotation_queuesr'   r   r+   r,   r-   r.   r/   r    r)   s           r   r2   z-AnnotationQueuesClient.find_annotation_queues<   s:    N $$;;DtWg_n < 
	 ~~r   r!   descriptioninstructionscomments_enabledfeedback_definition_namesr    
project_idscoper5   r6   r7   r8   c       	         b    | j                   j                  |||||||||		      }
|
j                  S )ab  
        Create annotation queue for human annotation workflows

        Parameters
        ----------
        project_id : str

        name : str

        scope : AnnotationQueueWriteScope

        id : typing.Optional[str]

        description : typing.Optional[str]

        instructions : typing.Optional[str]

        comments_enabled : typing.Optional[bool]

        feedback_definition_names : typing.Optional[typing.Sequence[str]]

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

        Returns
        -------
        None

        Examples
        --------
        from Opik import OpikApi
        client = OpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        client.annotation_queues.create_annotation_queue(project_id='project_id', name='name', scope="trace", )
        	r9   r-   r:   r!   r5   r6   r7   r8   r    r   create_annotation_queuer'   r   r9   r-   r:   r!   r5   r6   r7   r8   r    r)   s              r   r>   z.AnnotationQueuesClient.create_annotation_queueh   sG    ^ $$<<!#%-&?+ = 

	 ~~r   annotation_queuesc                T    | j                   j                  ||      }|j                  S )a  
        Create multiple annotation queues for human annotation workflows

        Parameters
        ----------
        annotation_queues : typing.Sequence[AnnotationQueueWrite]
            List of annotation queues to create

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

        Returns
        -------
        None

        Examples
        --------
        from Opik import OpikApi
        from Opik import AnnotationQueueWrite
        client = OpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        client.annotation_queues.create_annotation_queue_batch(annotation_queues=[AnnotationQueueWrite(project_id='project_id', name='name', scope="trace", )], )
        r@   r    r   create_annotation_queue_batchr'   r   r@   r    r)   s       r   rD   z4AnnotationQueuesClient.create_annotation_queue_batch   s1    8 $$BB/ C 
	 ~~r   c                T    | j                   j                  ||      }|j                  S )a
  
        Delete multiple annotation queues by their IDs

        Parameters
        ----------
        ids : typing.Sequence[str]

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

        Returns
        -------
        None

        Examples
        --------
        from Opik import OpikApi
        client = OpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        client.annotation_queues.delete_annotation_queue_batch(ids=['ids'], )
        r$   r   delete_annotation_queue_batchr'   r   r"   r    r)   s       r   rH   z4AnnotationQueuesClient.delete_annotation_queue_batch   s*    . $$BBs\kBl	~~r   c                T    | j                   j                  ||      }|j                  S )a  
        Get annotation queue by id

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

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

        Returns
        -------
        AnnotationQueuePublic
            Annotation queue resource

        Examples
        --------
        from Opik import OpikApi
        client = OpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        client.annotation_queues.get_annotation_queue_by_id(id='id', )
        r   r   get_annotation_queue_by_idr'   r   r!   r    r)   s       r   rL   z1AnnotationQueuesClient.get_annotation_queue_by_id   s*    0 $$??Tc?d	~~r   r-   r5   r6   r7   r8   r    c          	      ^    | j                   j                  |||||||      }|j                  S )a  
        Update annotation queue by id

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

        name : typing.Optional[str]

        description : typing.Optional[str]

        instructions : typing.Optional[str]

        comments_enabled : typing.Optional[bool]

        feedback_definition_names : typing.Optional[typing.Sequence[str]]

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

        Returns
        -------
        None

        Examples
        --------
        from Opik import OpikApi
        client = OpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        client.annotation_queues.update_annotation_queue(id='id', )
        rN   r   update_annotation_queuer'   	r   r!   r-   r5   r6   r7   r8   r    r)   s	            r   rQ   z.AnnotationQueuesClient.update_annotation_queue   sA    R $$<<#%-&?+ = 
	 ~~r   c                V    | j                   j                  |||      }|j                  S )a  
        Remove items from annotation queue

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

        ids : typing.Sequence[str]

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

        Returns
        -------
        None

        Examples
        --------
        from Opik import OpikApi
        client = OpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        client.annotation_queues.remove_items_from_annotation_queue(id='id', ids=['ids'], )
        r$   r   "remove_items_from_annotation_queuer'   r(   s        r   rU   z9AnnotationQueuesClient.remove_items_from_annotation_queue.  s-    2 $$GGPSetGu	~~r   )__name__
__module____qualname__r   r   propertyr   r   strtypingSequenceOptionalr   r&   intr   r2   OMITr
   boolr>   r	   rD   rH   r   rL   rQ   rU    r   r   r   r      sE   T*; T  #<     im%s3FLooVdFe	> &*%)%)(,(,;?* ooc"* ooc"	*
 ooc"* %* %*  8* 
#*d $(,0-126KO;?: : 	:
 ): OOC : __S): ooc*: !//$/: $*??6??33G#H:  8: 
:@ <@	 "??+?@  8	
 
D `dooc*=C__^=\	6 NR+1??>+J	> &*,0-126KO;?22 ooc"	2
 __S)2 ooc*2 !//$/2 $*??6??33G#H2  82 
2j im%s3FLooVdFe	r   r   c                   V   e Zd ZdefdZedefd       Zdddede	j                  e   d	e	j                  e   ddfd
Z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fdZeeeeedddededede	j                  e   de	j                  e   de	j                  e   de	j                  e   de	j                  e	j                  e      d	e	j                  e   ddfdZddde	j                  e   d	e	j                  e   ddfdZddde	j                  e   d	e	j                  e   ddfdZddded	e	j                  e   defdZeeeeedddede	j                  e   de	j                  e   de	j                  e   de	j                  e   de	j                  e	j                  e      d	e	j                  e   ddfdZdddede	j                  e   d	e	j                  e   ddfd Zy)!AsyncAnnotationQueuesClientr   c                &    t        |      | _        y r   )r   r   r   s     r   r   z$AsyncAnnotationQueuesClient.__init__L  s    9Xr   r   c                     | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawAnnotationQueuesClient
        r   r   s    r   r   z-AsyncAnnotationQueuesClient.with_raw_responseO  r   r   Nr   r!   r"   r    c                r   K   | j                   j                  |||       d{   }|j                  S 7 w)a  
        Add traces or threads to annotation queue

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

        ids : typing.Sequence[str]

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

        Returns
        -------
        None

        Examples
        --------
        from Opik import AsyncOpikApi
        import asyncio
        client = AsyncOpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        async def main() -> None:
            await client.annotation_queues.add_items_to_annotation_queue(id='id', ids=['ids'], )
        asyncio.run(main())
        r$   Nr%   r(   s        r   r&   z9AsyncAnnotationQueuesClient.add_items_to_annotation_queueZ  s:     8 **HHQTfuHvv	~~ w   "757r*   r+   r,   r-   r.   r/   c                x   K   | j                   j                  ||||||       d{   }|j                  S 7 w)a5  
        Find annotation queues with filtering and sorting

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

        size : typing.Optional[int]

        name : typing.Optional[str]

        filters : typing.Optional[str]

        sorting : typing.Optional[str]

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

        Returns
        -------
        AnnotationQueuePagePublic
            Annotation queues page

        Examples
        --------
        from Opik import AsyncOpikApi
        import asyncio
        client = AsyncOpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        async def main() -> None:
            await client.annotation_queues.find_annotation_queues()
        asyncio.run(main())
        r*   Nr1   r3   s           r   r2   z2AsyncAnnotationQueuesClient.find_annotation_queuesy  sI     T **AADtWg_n B 
 
	 ~~
s   %:8:r4   r9   r:   r5   r6   r7   r8   c       	         ~   K   | j                   j                  |||||||||		       d{   }
|
j                  S 7 w)a  
        Create annotation queue for human annotation workflows

        Parameters
        ----------
        project_id : str

        name : str

        scope : AnnotationQueueWriteScope

        id : typing.Optional[str]

        description : typing.Optional[str]

        instructions : typing.Optional[str]

        comments_enabled : typing.Optional[bool]

        feedback_definition_names : typing.Optional[typing.Sequence[str]]

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

        Returns
        -------
        None

        Examples
        --------
        from Opik import AsyncOpikApi
        import asyncio
        client = AsyncOpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        async def main() -> None:
            await client.annotation_queues.create_annotation_queue(project_id='project_id', name='name', scope="trace", )
        asyncio.run(main())
        r<   Nr=   r?   s              r   r>   z3AsyncAnnotationQueuesClient.create_annotation_queue  sV     d **BB!#%-&?+ C 

 

	 ~~

s   (=;=r@   c                p   K   | j                   j                  ||       d{   }|j                  S 7 w)aV  
        Create multiple annotation queues for human annotation workflows

        Parameters
        ----------
        annotation_queues : typing.Sequence[AnnotationQueueWrite]
            List of annotation queues to create

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

        Returns
        -------
        None

        Examples
        --------
        from Opik import AsyncOpikApi
        from Opik import AnnotationQueueWrite
        import asyncio
        client = AsyncOpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        async def main() -> None:
            await client.annotation_queues.create_annotation_queue_batch(annotation_queues=[AnnotationQueueWrite(project_id='project_id', name='name', scope="trace", )], )
        asyncio.run(main())
        rB   NrC   rE   s       r   rD   z9AsyncAnnotationQueuesClient.create_annotation_queue_batch  s?     > **HH/ I 
 
	 ~~
   !646c                p   K   | j                   j                  ||       d{   }|j                  S 7 w)as  
        Delete multiple annotation queues by their IDs

        Parameters
        ----------
        ids : typing.Sequence[str]

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

        Returns
        -------
        None

        Examples
        --------
        from Opik import AsyncOpikApi
        import asyncio
        client = AsyncOpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        async def main() -> None:
            await client.annotation_queues.delete_annotation_queue_batch(ids=['ids'], )
        asyncio.run(main())
        r$   NrG   rI   s       r   rH   z9AsyncAnnotationQueuesClient.delete_annotation_queue_batch  s7     4 **HHSbqHrr	~~ srk   c                p   K   | j                   j                  ||       d{   }|j                  S 7 w)a}  
        Get annotation queue by id

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

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

        Returns
        -------
        AnnotationQueuePublic
            Annotation queue resource

        Examples
        --------
        from Opik import AsyncOpikApi
        import asyncio
        client = AsyncOpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        async def main() -> None:
            await client.annotation_queues.get_annotation_queue_by_id(id='id', )
        asyncio.run(main())
        r   NrK   rM   s       r   rL   z6AsyncAnnotationQueuesClient.get_annotation_queue_by_id(  s7     6 **EEbZiEjj	~~ krk   rN   c          	      z   K   | j                   j                  |||||||       d{   }|j                  S 7 w)aA  
        Update annotation queue by id

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

        name : typing.Optional[str]

        description : typing.Optional[str]

        instructions : typing.Optional[str]

        comments_enabled : typing.Optional[bool]

        feedback_definition_names : typing.Optional[typing.Sequence[str]]

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

        Returns
        -------
        None

        Examples
        --------
        from Opik import AsyncOpikApi
        import asyncio
        client = AsyncOpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        async def main() -> None:
            await client.annotation_queues.update_annotation_queue(id='id', )
        asyncio.run(main())
        rN   NrP   rR   s	            r   rQ   z3AsyncAnnotationQueuesClient.update_annotation_queueF  sP     X **BB#%-&?+ C 
 
	 ~~
s   &;9;c                r   K   | j                   j                  |||       d{   }|j                  S 7 w)a  
        Remove items from annotation queue

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

        ids : typing.Sequence[str]

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

        Returns
        -------
        None

        Examples
        --------
        from Opik import AsyncOpikApi
        import asyncio
        client = AsyncOpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        async def main() -> None:
            await client.annotation_queues.remove_items_from_annotation_queue(id='id', ids=['ids'], )
        asyncio.run(main())
        r$   NrT   r(   s        r   rU   z>AsyncAnnotationQueuesClient.remove_items_from_annotation_queue}  sA     8 **MMC N 
 
	 ~~
rg   )rV   rW   rX   r   r   rY   r   r   rZ   r[   r\   r]   r   r&   r^   r   r2   r_   r
   r`   r>   r	   rD   rH   r   rL   rQ   rU   ra   r   r   rc   rc   K  sG   Y*< Y  #A     im%s3FLooVdFe	D &*%)%)(,(,;?- ooc"- ooc"	-
 ooc"- %- %-  8- 
#-j $(,0-126KO;?= = 	=
 )= OOC = __S)= ooc*= !//$/= $*??6??33G#H=  8= 
=F <@	" "??+?@"  8	"
 
"J `dooc*=C__^=\	< NR+1??>+J	D &*,0-126KO;?55 ooc"	5
 __S)5 ooc*5 !//$/5 $*??6??33G#H5  85 
5p im%s3FLooVdFe	r   rc   )r[   core.client_wrapperr   r   core.request_optionsr   "types.annotation_queue_page_publicr   types.annotation_queue_publicr   types.annotation_queue_writer	   "types.annotation_queue_write_scoper
   
raw_clientr   r   castAnyr_   r   rc   ra   r   r   <module>ry      sP     G 1 J A ? J Q v{{6::s#w wt	Q Qr   