
    i?1i                        d dl mZ d dlmZmZ d dlmZmZ d dlm	Z	m
Z
 erd dlmZ d dlmZ  G d de	      Z G d	 d
e
      Zy)    )annotations)TYPE_CHECKINGAny)ignore_docsmaybe_extract_enum_member_value)ResourceCollectionClientResourceCollectionClientAsync)ActorJobStatus)ListPagec                  X     e Zd ZdZed fd       Zddddd	 	 	 	 	 	 	 	 	 	 	 ddZ xZS )RunCollectionClientz"Sub-client for listing actor runs.c                L    |j                  dd      }t        |   |d|i| y)z#Initialize the RunCollectionClient.resource_path
actor-runsNpopsuper__init__selfargskwargsr   	__class__s       ~/home/www/therecruiter.miabetepe.com/venv/lib/python3.12/site-packages/apify_client/clients/resource_clients/run_collection.pyr   zRunCollectionClient.__init__   ,     

?LA$FmFvF    Nlimitoffsetdescstatusc               >    | j                  |||t        |            S )  List all actor runs (either of a single actor, or all user's actors, depending on where this client was initialized from).

        https://docs.apify.com/api/v2#/reference/actors/run-collection/get-list-of-runs

        https://docs.apify.com/api/v2#/reference/actor-runs/run-collection/get-user-runs-list

        Args:
            limit (int, optional): How many runs to retrieve
            offset (int, optional): What run to include as first when retrieving the list
            desc (bool, optional): Whether to sort the runs in descending order based on their start date
            status (ActorJobStatus, optional): Retrieve only runs with the provided status

        Returns:
            ListPage: The retrieved actor runs
        r   _listr   r   r   r   r    r!   s        r   listzRunCollectionClient.list   s+    . zz26:	  
 	
r   )r   r   r   r   r   r   returnNone)r   r   r   
int | Noner   r*   r    bool | Noner!   ActorJobStatus | Noner(   ListPage[dict]__name__
__module____qualname____doc__r   r   r'   __classcell__r   s   @r   r   r      sg    ,G G !! (,
!
 
 	

 
 &
 

r   r   c                  X     e Zd ZdZed fd       Zddddd	 	 	 	 	 	 	 	 	 	 	 ddZ xZS )RunCollectionClientAsyncz(Async sub-client for listing actor runs.c                L    |j                  dd      }t        |   |d|i| y)z(Initialize the RunCollectionClientAsync.r   r   Nr   r   s       r   r   z!RunCollectionClientAsync.__init__9   r   r   Nr   c               Z   K   | j                  |||t        |             d{   S 7 w)r#   r   Nr$   r&   s        r   r'   zRunCollectionClientAsync.list?   s9     . ZZ26:	   
 
 	
 
s   "+)+)r   r6   r   r   r   r   r(   r)   )r   r6   r   r*   r   r*   r    r+   r!   r,   r(   r-   r.   r4   s   @r   r6   r6   6   sg    2G G !! (,
&
 
 	

 
 &
 

r   r6   N)
__future__r   typingr   r   apify_shared.utilsr   r   apify_client.clients.baser   r	   apify_shared.constsr
   apify_shared.modelsr   r   r6    r   r   <module>r@      s5    " % K ]2,%
2 %
P%
< %
r   