
    _jN                       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Jr  SS	K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*J+r+  SSK,J-r-  SSK.J/r/  SS/r0 " S S\5      r1 " S S\5      r2 " S S5      r3 " S S5      r4 " S S5      r5 " S S5      r6g)    )annotations)OptionalN   )_legacy_response   )Roles
AsyncRolesRolesWithRawResponseAsyncRolesWithRawResponseRolesWithStreamingResponseAsyncRolesWithStreamingResponse)BodyOmitQueryHeadersNotGivenSequenceNotStromit	not_given)path_templatemaybe_transformasync_maybe_transform)cached_property)SyncAPIResourceAsyncAPIResource)to_streamed_response_wrapper"async_to_streamed_response_wrapper)SyncConversationCursorPageAsyncConversationCursorPage)AsyncPaginatormake_request_options)user_list_paramsuser_update_params)OrganizationUser)UserDeleteResponseUsers
AsyncUsersc            	      .   \ 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SS\S.           SS jjrSrg)r&       c                ,    [        U R                  5      $ N)r   _clientselfs    d/home/rurouni/.local/lib/python3.13/site-packages/openai/resources/admin/organization/users/users.pyrolesUsers.roles!   s    T\\""    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/openai/openai-python#accessing-raw-response-data-eg-headers
)UsersWithRawResponser-   s    r/   with_raw_responseUsers.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/openai/openai-python#with_streaming_response
)UsersWithStreamingResponser-   s    r/   with_streaming_responseUsers.with_streaming_response/   s     *$//r2   Nextra_headersextra_query
extra_bodytimeoutc                   U(       d  [        SU< 35      eU R                  [        SUS9[        UUUUSS0S9[        S9$ )!  
Retrieves a user by their identifier.

Args:
  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
6Expected a non-empty value for `user_id` but received /organization/users/{user_id}user_idadmin_api_key_authTr>   r?   r@   rA   securityoptionscast_to
ValueError_getr   r!   r$   r.   rG   r>   r?   r@   rA   s         r/   retrieveUsers.retrieve8   s^    . UV]U`abbyy97K(+'%.5 %  

 
	
r2   developer_personarolerole_idtechnical_levelr>   r?   r@   rA   c                   U(       d  [        SU< 35      eU R                  [        SUS9[        UUUUS.[        R
                  5      [        UUUU	SS0S9[        S9$ )	  
Modifies a user's role in the organization.

Args:
  developer_persona: Developer persona metadata.

  role: `owner` or `reader`

  role_id: Role ID to assign to the user.

  technical_level: Technical level metadata.

  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
rD   rE   rF   rU   rV   rW   rX   rH   TrI   bodyrL   rM   )rO   _postr   r   r#   UserUpdateParamsr!   r$   
r.   rG   rU   rV   rW   rX   r>   r?   r@   rA   s
             r/   updateUsers.update]   s    F UV]U`abbzz97K ): &'6	 #33 )+'%.5 %%  
 	
r2   afteremailslimitr>   r?   r@   rA   c                   U R                  S[        [           [        UUUU[	        UUUS.[
        R                  5      SS0S9[        S9$ a  
Lists all of the users in the organization.

Args:
  after: A cursor for use in pagination. `after` is an object ID that defines your place
      in the list. For instance, if you make a list request and receive 100 objects,
      ending with obj_foo, your subsequent call can include after=obj_foo in order to
      fetch the next page of the list.

  emails: Filter by the email address of users.

  limit: A limit on the number of objects to be returned. Limit can range between 1 and
      100, and the default is 20.

  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
z/organization/users)rd   re   rf   rH   T)r>   r?   r@   rA   queryrJ   )pagerL   model)_get_api_listr   r$   r!   r   r"   UserListParamsr.   rd   re   rf   r>   r?   r@   rA   s           r/   list
Users.list   sm    F !!!+,<=(+'%%!&"(!&
 %33 /5 #% " 
 	
r2   c                   U(       d  [        SU< 35      eU R                  [        SUS9[        UUUUSS0S9[        S9$ )!  
Deletes a user from the organization.

Args:
  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
rD   rE   rF   rH   TrI   rK   rO   _deleter   r!   r%   rQ   s         r/   deleteUsers.delete   s^    . UV]U`abb||97K(+'%.5 '  

 
	
r2    )returnr   )rx   r5   )rx   r:   rG   strr>   Headers | Noner?   Query | Noner@   Body | NonerA   'float | httpx.Timeout | None | NotGivenrx   r$   rG   rz   rU   Optional[str] | OmitrV   r   rW   r   rX   r   r>   r{   r?   r|   r@   r}   rA   r~   rx   r$   )rd   
str | Omitre   SequenceNotStr[str] | Omitrf   
int | Omitr>   r{   r?   r|   r@   r}   rA   r~   rx   z,SyncConversationCursorPage[OrganizationUser]rG   rz   r>   r{   r?   r|   r@   r}   rA   r~   rx   r%   __name__
__module____qualname____firstlineno__r   r0   r6   r;   r   rR   r   ra   ro   ru   __static_attributes__rw   r2   r/   r&   r&       s   # # * * 0 0 )-$("&;D#
#
 &#
 "#
  #
 9#
 
#
R 37%)(,04 )-$("&;D8
8
 0	8

 #8
 &8
 .8
 &8
 "8
  8
 98
 
8
z !-1  )-$("&;D6
 6
 +	6

 6
 &6
 "6
  6
 96
 
66
| )-$("&;D#
#
 &#
 "#
  #
 9#
 
#
 #
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SS\S.           SS jjrSrg)r'      c                ,    [        U R                  5      $ r+   )r	   r,   r-   s    r/   r0   AsyncUsers.roles   s    $,,''r2   c                    [        U 5      $ r4   )AsyncUsersWithRawResponser-   s    r/   r6   AsyncUsers.with_raw_response   s     )..r2   c                    [        U 5      $ r9   )AsyncUsersWithStreamingResponser-   s    r/   r;   "AsyncUsers.with_streaming_response  s     /t44r2   Nr=   c                  #    U(       d  [        SU< 35      eU R                  [        SUS9[        UUUUSS0S9[        S9I Sh  vN $  N7f)	rC   rD   rE   rF   rH   TrI   rK   NrN   rQ   s         r/   rR   AsyncUsers.retrieve  sk     . UV]U`abbYY97K(+'%.5 %  

 

 
	
 

   AAAArT   c                  #    U(       d  [        SU< 35      eU R                  [        SUS9[        UUUUS.[        R
                  5      I Sh  vN [        UUUU	SS0S9[        S	9I Sh  vN $  N! N7f)
rZ   rD   rE   rF   r[   NrH   TrI   r\   )rO   r^   r   r   r#   r_   r!   r$   r`   s
             r/   ra   AsyncUsers.update2  s     F UV]U`abbZZ97K,): &'6	 #33  )+'%.5 %%   
 
 	

s$   AA5A1
A5,A3-A53A5rc   c                   U R                  S[        [           [        UUUU[	        UUUS.[
        R                  5      SS0S9[        S9$ rh   )rl   r   r$   r!   r   r"   rm   rn   s           r/   ro   AsyncUsers.listl  sm    F !!!,-=>(+'%%!&"(!&
 %33 /5 #% " 
 	
r2   c                  #    U(       d  [        SU< 35      eU R                  [        SUS9[        UUUUSS0S9[        S9I Sh  vN $  N7f)	rr   rD   rE   rF   rH   TrI   rK   Nrs   rQ   s         r/   ru   AsyncUsers.delete  sk     . UV]U`abb\\97K(+'%.5 ' " 

 

 
	
 

r   rw   )rx   r	   )rx   r   )rx   r   ry   r   )rd   r   re   r   rf   r   r>   r{   r?   r|   r@   r}   rA   r~   rx   zOAsyncPaginator[OrganizationUser, AsyncConversationCursorPage[OrganizationUser]]r   r   rw   r2   r/   r'   r'      s   ( ( / / 5 5 )-$("&;D#
#
 &#
 "#
  #
 9#
 
#
R 37%)(,04 )-$("&;D8
8
 0	8

 #8
 &8
 .8
 &8
 "8
  8
 98
 
8
z !-1  )-$("&;D6
 6
 +	6

 6
 &6
 "6
  6
 96
 
Y6
| )-$("&;D#
#
 &#
 "#
  #
 9#
 
#
 #
r2   c                  2    \ rS rSrSS jr\SS j5       rSrg)r5   i  c                8   Xl         [        R                  " UR                  5      U l        [        R                  " UR                  5      U l        [        R                  " UR
                  5      U l        [        R                  " UR                  5      U l        g r+   )_usersr   to_raw_response_wrapperrR   ra   ro   ru   r.   userss     r/   __init__UsersWithRawResponse.__init__  sq    (@@NN
 '>>LL
 %<<JJ
	 '>>LL
r2   c                @    [        U R                  R                  5      $ r+   )r
   r   r0   r-   s    r/   r0   UsersWithRawResponse.roles  s    #DKK$5$566r2   r   ru   ro   rR   ra   Nr   r&   rx   None)rx   r
   r   r   r   r   r   r   r0   r   rw   r2   r/   r5   r5     s    
  7 7r2   r5   c                  2    \ rS rSrSS jr\SS j5       rSrg)r   i  c                8   Xl         [        R                  " UR                  5      U 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_wrapperrR   ra   ro   ru   r   s     r/   r   "AsyncUsersWithRawResponse.__init__  sq    (FFNN
 'DDLL
 %BBJJ
	 'DDLL
r2   c                @    [        U R                  R                  5      $ r+   )r   r   r0   r-   s    r/   r0   AsyncUsersWithRawResponse.roles  s    ():):;;r2   r   Nr   r'   rx   r   )rx   r   r   rw   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        [        UR
                  5      U l        g r+   )r   r   rR   ra   ro   ru   r   s     r/   r   #UsersWithStreamingResponse.__init__  sY    4NN
 3LL
 1JJ
	 3LL
r2   c                @    [        U R                  R                  5      $ r+   )r   r   r0   r-   s    r/   r0    UsersWithStreamingResponse.roles  s    )$++*;*;<<r2   r   Nr   )rx   r   r   rw   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        [        UR
                  5      U l        g r+   )r   r   rR   ra   ro   ru   r   s     r/   r   (AsyncUsersWithStreamingResponse.__init__  sY    :NN
 9LL
 7JJ
	 9LL
r2   c                @    [        U R                  R                  5      $ r+   )r   r   r0   r-   s    r/   r0   %AsyncUsersWithStreamingResponse.roles  s    .t{{/@/@AAr2   r   Nr   )rx   r   r   rw   r2   r/   r   r     s    
  B Br2   r   )7
__future__r   typingr   httpx r   r0   r   r	   r
   r   r   r   _typesr   r   r   r   r   r   r   r   _utilsr   r   r   _compatr   	_resourcer   r   	_responser   r   
paginationr   r   _base_clientr    r!   types.admin.organizationr"   r#   *types.admin.organization.organization_userr$   -types.admin.organization.user_delete_responser%   __all__r&   r'   r5   r   r:   r   rw   r2   r/   <module>r      s    #   "  ^ ] ] M M ( < [ S B N L QL
!R
O R
jR
! R
j7 7,< <,= =,B Br2   