
    _jJ                       S SK Jr  S SKJr  S SKJr  S SKrSSKJr  SSK	J
r
JrJrJrJrJr  SS	KJrJrJrJrJrJrJr  SS
KJrJrJrJr  SSKJr  SSKJ r J!r!  SSK"J#r#J$r$  SSK%J&r&J'r'  SSK(J)r)J*r*  SSK+J,r,  SSK-J.r.  SSK/J0r0  SS/r1 " S S\ 5      r2 " S S\!5      r3 " S S5      r4 " S S5      r5 " S S5      r6 " S S5      r7g)    )annotations)List)chainN   )_legacy_response   )EventsAsyncEventsEventsWithRawResponseAsyncEventsWithRawResponseEventsWithStreamingResponse AsyncEventsWithStreamingResponse)BodyOmitQueryHeadersNotGivenomit	not_given)is_givenpath_templatemaybe_transformstrip_not_given)cached_property)SyncAPIResourceAsyncAPIResource)to_streamed_response_wrapper"async_to_streamed_response_wrapper)SyncPageCursorAsyncPageCursor)AsyncPaginatormake_request_options)thread_list_params)AnthropicBetaParam)BetaManagedAgentsSessionThreadThreadsAsyncThreadsc                      \ rS rSr\SS j5       r\SS j5       r\SS j5       r\SSS\	S.               SS jjr
\\\SSS\	S.                 SS	 jjr\SSS\	S.               SS
 jjrSrg)r&   !   c                ,    [        U R                  5      $ N)r	   _clientselfs    f/home/rurouni/.local/lib/python3.13/site-packages/anthropic/resources/beta/sessions/threads/threads.pyeventsThreads.events"   s    dll##    c                    [        U 5      $ z
This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.

For more information, see https://www.github.com/anthropics/anthropic-sdk-python#accessing-raw-response-data-eg-headers
)ThreadsWithRawResponser-   s    r/   with_raw_responseThreads.with_raw_response&   s     &d++r2   c                    [        U 5      $ z
An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/anthropics/anthropic-sdk-python#with_streaming_response
)ThreadsWithStreamingResponser-   s    r/   with_streaming_responseThreads.with_streaming_response0   s     ,D11r2   Nbetasextra_headersextra_query
extra_bodytimeoutc          
     d   U(       d  [        SU< 35      eU(       d  [        SU< 35      e0 [        S[        U5      (       a#  SR                  [	        S U 5       S/5      5      O[
        05      EU=(       d    0 EnSS0U=(       d    0 EnU R                  [        SX!S9[        XEXgS	9[        S
9$ )X  
Get Session Thread

Args:
  betas: Optional header to specify the beta version(s) you want to use.

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds
9Expected a non-empty value for `session_id` but received 8Expected a non-empty value for `thread_id` but received anthropic-beta,c              3  8   #    U  H  n[        U5      v   M     g 7fr+   str.0es     r/   	<genexpr>#Threads.retrieve.<locals>.<genexpr>[        5Lec!ffe   managed-agents-2026-04-017/v1/sessions/{session_id}/threads/{thread_id}?beta=true
session_id	thread_idr?   r@   rA   rB   optionscast_to

ValueErrorr   r   joinr   r   _getr   r"   r%   r.   rW   rV   r>   r?   r@   rA   rB   s           r/   retrieveThreads.retrieve9   s    6 XYcXfghhWXaWdeff	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`yyIV` )+Q[ 3  
 	
r2   limitpager>   r?   r@   rA   rB   c                  U(       d  [        SU< 35      e0 [        S[        U5      (       a#  SR                  [	        S U 5       S/5      5      O[
        05      EU=(       d    0 EnSS0U=(       d    0 EnU R                  [        SUS9[        [           [        UUUU[        UUS.[        R                  5      S	9[        S
9$ )  List Session Threads

Args:
  limit: Maximum results per page.

Defaults to 1000.

  page: Opaque pagination cursor from a previous response's next_page. Forward-only.

  betas: Optional header to specify the beta version(s) you want to use.

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds
rE   rG   rH   c              3  8   #    U  H  n[        U5      v   M     g 7fr+   rJ   rL   s     r/   rO   Threads.list.<locals>.<genexpr>   rQ   rR   rS   +/v1/sessions/{session_id}/threads?beta=truerV   rd   re   r?   r@   rA   rB   queryre   rZ   model)r]   r   r   r^   r   r   _get_api_listr   r   r%   r"   r   r#   ThreadListParams	r.   rV   rd   re   r>   r?   r@   rA   rB   s	            r/   listThreads.listm   s    B XYcXfghh	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`!!GT^_ >?(+'%%!& $ '77 1! " 
 	
r2   c          
     f   U(       d  [        SU< 35      eU(       d  [        SU< 35      e0 [        S[        U5      (       a#  SR                  [	        S U 5       S/5      5      O[
        05      EU=(       d    0 EnSS0U=(       d    0 EnU R                  [        SUUS9[        XEXgS	9[        S
9$ )\  
Archive Session Thread

Args:
  betas: Optional header to specify the beta version(s) you want to use.

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds
rE   rF   rG   rH   c              3  8   #    U  H  n[        U5      v   M     g 7fr+   rJ   rL   s     r/   rO   "Threads.archive.<locals>.<genexpr>   rQ   rR   rS   ?/v1/sessions/{session_id}/threads/{thread_id}/archive?beta=truerU   rX   rY   
r]   r   r   r^   r   r   _postr   r"   r%   r`   s           r/   archiveThreads.archive   s    6 XYcXfghhWXaWdeff	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`zzQ%#
 )+Q[ 3  

 
	
r2    )returnr	   )r   r5   )r   r:   rW   rK   rV   rK   r>   List[AnthropicBetaParam] | Omitr?   Headers | Noner@   Query | NonerA   Body | NonerB   'float | httpx.Timeout | None | NotGivenr   r%   )rV   rK   rd   
int | Omitre   
str | Omitr>   r   r?   r   r@   r   rA   r   rB   r   r   z.SyncPageCursor[BetaManagedAgentsSessionThread]__name__
__module____qualname____firstlineno__r   r0   r6   r;   r   r   ra   rt   r}   __static_attributes__r   r2   r/   r&   r&   !   s   $ $ , , 2 2 26 )-$("&;D2
2
 	2

 /2
 &2
 "2
  2
 92
 
(2
p !15 )-$("&;D?
?
 	?

 ?
 /?
 &?
 "?
  ?
 9?
 
8?
L 26 )-$("&;D4
4
 	4

 /4
 &4
 "4
  4
 94
 
(4
 4
r2   c                      \ rS rSr\SS j5       r\SS j5       r\SS j5       r\SSS\	S.               SS jjr
\\\SSS\	S.                 SS	 jjr\SSS\	S.               SS
 jjrSrg)r'      c                ,    [        U R                  5      $ r+   )r
   r,   r-   s    r/   r0   AsyncThreads.events   s    4<<((r2   c                    [        U 5      $ r4   )AsyncThreadsWithRawResponser-   s    r/   r6   AsyncThreads.with_raw_response   s     +400r2   c                    [        U 5      $ r9   )!AsyncThreadsWithStreamingResponser-   s    r/   r;   $AsyncThreads.with_streaming_response   s     166r2   Nr=   c          
       #    U(       d  [        SU< 35      eU(       d  [        SU< 35      e0 [        S[        U5      (       a#  SR                  [	        S U 5       S/5      5      O[
        05      EU=(       d    0 EnSS0U=(       d    0 EnU R                  [        SX!S9[        XEXgS	9[        S
9I Sh  vN $  N7f)rD   rE   rF   rG   rH   c              3  8   #    U  H  n[        U5      v   M     g 7fr+   rJ   rL   s     r/   rO   (AsyncThreads.retrieve.<locals>.<genexpr>  rQ   rR   rS   rT   rU   rX   rY   Nr\   r`   s           r/   ra   AsyncThreads.retrieve   s     6 XYcXfghhWXaWdeff	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`YYIV` )+Q[ 3  
 
 	
 
s   B5B>7B<8B>rc   c                  U(       d  [        SU< 35      e0 [        S[        U5      (       a#  SR                  [	        S U 5       S/5      5      O[
        05      EU=(       d    0 EnSS0U=(       d    0 EnU R                  [        SUS9[        [           [        UUUU[        UUS.[        R                  5      S	9[        S
9$ )rg   rE   rG   rH   c              3  8   #    U  H  n[        U5      v   M     g 7fr+   rJ   rL   s     r/   rO   $AsyncThreads.list.<locals>.<genexpr>W  rQ   rR   rS   rj   rk   rl   rm   ro   )r]   r   r   r^   r   r   rq   r   r    r%   r"   r   r#   rr   rs   s	            r/   rt   AsyncThreads.list1  s    B XYcXfghh	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`!!GT^_ !?@(+'%%!& $ '77 1! " 
 	
r2   c          
       #    U(       d  [        SU< 35      eU(       d  [        SU< 35      e0 [        S[        U5      (       a#  SR                  [	        S U 5       S/5      5      O[
        05      EU=(       d    0 EnSS0U=(       d    0 EnU R                  [        SUUS9[        XEXgS	9[        S
9I Sh  vN $  N7f)rw   rE   rF   rG   rH   c              3  8   #    U  H  n[        U5      v   M     g 7fr+   rJ   rL   s     r/   rO   'AsyncThreads.archive.<locals>.<genexpr>  rQ   rR   rS   rz   rU   rX   rY   Nr{   r`   s           r/   r}   AsyncThreads.archiver  s     6 XYcXfghhWXaWdeff	
$ '*hhu5Le5LOjNk/l&m"	
 "	
 *+F`=K^\^`ZZQ%#
 )+Q[ 3   

 

 
	
 

s   B6B?8B=9B?r   )r   r
   )r   r   )r   r   r   )rV   rK   rd   r   re   r   r>   r   r?   r   r@   r   rA   r   rB   r   r   z_AsyncPaginator[BetaManagedAgentsSessionThread, AsyncPageCursor[BetaManagedAgentsSessionThread]]r   r   r2   r/   r'   r'      s   ) ) 1 1 7 7 26 )-$("&;D2
2
 	2

 /2
 &2
 "2
  2
 92
 
(2
p !15 )-$("&;D?
?
 	?

 ?
 /?
 &?
 "?
  ?
 9?
 
i?
L 26 )-$("&;D4
4
 	4

 /4
 &4
 "4
  4
 94
 
(4
 4
r2   c                  2    \ rS rSrSS jr\SS j5       rSrg)r5   i  c                    Xl         [        R                  " UR                  5      U l        [        R                  " UR                  5      U l        [        R                  " UR
                  5      U l        g r+   )_threadsr   to_raw_response_wrapperra   rt   r}   r.   threadss     r/   __init__ThreadsWithRawResponse.__init__  sX    (@@
 %<<LL
	 (??OO
r2   c                @    [        U R                  R                  5      $ r+   )r   r   r0   r-   s    r/   r0   ThreadsWithRawResponse.events  s    $T]]%9%9::r2   r   r}   rt   ra   Nr   r&   r   None)r   r   r   r   r   r   r   r   r0   r   r   r2   r/   r5   r5     s    
 ; ;r2   r5   c                  2    \ rS rSrSS jr\SS j5       rSrg)r   i  c                    Xl         [        R                  " UR                  5      U l        [        R                  " UR                  5      U l        [        R                  " UR
                  5      U l        g r+   )r   r   async_to_raw_response_wrapperra   rt   r}   r   s     r/   r   $AsyncThreadsWithRawResponse.__init__  sX    (FF
 %BBLL
	 (EEOO
r2   c                @    [        U R                  R                  5      $ r+   )r   r   r0   r-   s    r/   r0   "AsyncThreadsWithRawResponse.events  s    )$--*>*>??r2   r   Nr   r'   r   r   )r   r   r   r   r2   r/   r   r     s    
 @ @r2   r   c                  2    \ rS rSrSS jr\SS j5       rSrg)r:   i  c                    Xl         [        UR                  5      U l        [        UR                  5      U l        [        UR                  5      U l        g r+   )r   r   ra   rt   r}   r   s     r/   r   %ThreadsWithStreamingResponse.__init__  sF    4
 1LL
	 4OO
r2   c                @    [        U R                  R                  5      $ r+   )r   r   r0   r-   s    r/   r0   #ThreadsWithStreamingResponse.events  s    *4==+?+?@@r2   r   Nr   )r   r   r   r   r2   r/   r:   r:     s    
 A Ar2   r:   c                  2    \ rS rSrSS jr\SS j5       rSrg)r   i  c                    Xl         [        UR                  5      U l        [        UR                  5      U l        [        UR                  5      U l        g r+   )r   r   ra   rt   r}   r   s     r/   r   *AsyncThreadsWithStreamingResponse.__init__  sF    :
 7LL
	 :OO
r2   c                @    [        U R                  R                  5      $ r+   )r   r   r0   r-   s    r/   r0   (AsyncThreadsWithStreamingResponse.events  s    /0D0DEEr2   r   Nr   )r   r   r   r   r2   r/   r   r     s    
 F Fr2   r   )8
__future__r   typingr   	itertoolsr   httpx r   r0   r	   r
   r   r   r   r   _typesr   r   r   r   r   r   r   _utilsr   r   r   r   _compatr   	_resourcer   r   	_responser   r   
paginationr   r    _base_clientr!   r"   types.beta.sessionsr#   types.anthropic_beta_paramr$   6types.beta.sessions.beta_managed_agents_session_threadr%   __all__r&   r'   r5   r   r:   r   r   r2   r/   <module>r      s    #    "  N M M Q Q ( < [ ; B 7 > fn
%A
o A
HA
# A
H; ;&@ @&A A&F Fr2   