+
    3j                     ~    ^ RI t ^ RIHt ^ RIHt ^ RIHt ] P                  ! ]4      tRR R llt	R R lt
R	 R
 ltR# )    N)Optional)Union)
BaseClientc                ~    V ^8  d   QhR\         \        \        \        3,          ,          R\         \        ,          /# )   
ssl_verifyreturn)r   r   boolstrlist)formats   "8lib/python3.14/site-packages/anaconda_auth/env_logger.py__annotate__r   
   s-      8E$),<#= RV     c                     / pV e   WR&   \        R/ VB pVP                  R4      pVP                  4        VP                  4       P                  R4      ;'       g    . #   \         d     R# i ; i)z*Fetch organization features from userinfo.Nr   z/api/auth/oauth2/userinfoorganization_features )r   getraise_for_statusjson	Exception)r   kwargsclientresps   &   r   fetch_org_featuresr   
   sr    	!#-< %f%zz56yy{67==2= s   AA! A! !A0/A0c                0    V ^8  d   QhR\         R\        /# )r   tokenr	   )r   r
   )r   s   "r   r   r      s      S T r   c                     \        4       pVP                  RRV /R7      pVP                  ^8H  #   \         d     R# i ; i)zCheck if a client token is already mapped to a user.

Uses the read-only client-token-status endpoint.  A 200 response means
the token is already registered; any other outcome is treated as
"not registered".
z%/api/environments/client-token-statusclient_token)paramsF)r   r   status_coder   )r   r   r   s   &  r   check_client_token_statusr"      sQ    zz3"E*  
 3&& s   -0 ??c                F    V ^8  d   QhR\         R\         \        ,          /# )r   org_featuresr	   )r   r   )r   s   "r   r   r   *   s      4 DI r   c                p    V  Uu. uF%  pRVP                  R. 4      9   g   K  VR,          NK'  	  up# u upi )zReturn org names that have the env_logger feature enabled.

Returns an empty list for community users since they do not
belong to any organization with the environments feature.
environmentsfeaturesorg)r   )r$   r(   s   & r   get_orgs_with_env_loggerr)   *   s@     +*sn
TV@W.W
E

l  s   33)N)loggingtypingr   r   anaconda_auth.clientr   	getLogger__name__loggerr   r"   r)   r   r   r   <module>r0      s0       +			8	$$r   