
    g                    B   d dl mZ d dlmZmZmZ d dlmZ ed   Z G d de	      Z
 G d de      Z G d	 d
e
      Z G d de
      Z G d de
      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Zy)    )annotations)ListLiteralOptional)	TypedDict)Qunexpected_failurevalidation_failedbad_jsonemail_existsphone_existsbad_jwt	not_adminno_authorizationuser_not_foundsession_not_foundflow_state_not_foundflow_state_expiredsignup_disableduser_banned!provider_email_needs_verificationinvite_not_foundbad_oauth_statebad_oauth_callbackoauth_provider_not_supportedunexpected_audiencesingle_identity_not_deletable%email_conflict_identity_not_deletableidentity_already_existsemail_provider_disabledphone_provider_disabledtoo_many_enrolled_mfa_factorsmfa_factor_name_conflictmfa_factor_not_foundmfa_ip_address_mismatchmfa_challenge_expiredmfa_verification_failedmfa_verification_rejectedinsufficient_aalcaptcha_failedsaml_provider_disabledmanual_linking_disabledsms_send_failedemail_not_confirmedphone_not_confirmedreauth_nonce_missingsaml_relay_state_not_foundsaml_relay_state_expiredsaml_idp_not_foundsaml_assertion_no_user_idsaml_assertion_no_emailuser_already_existssso_provider_not_foundsaml_metadata_fetch_failedsaml_idp_already_existssso_domain_already_existssaml_entity_id_mismatchconflictprovider_disableduser_sso_managedreauthentication_neededsame_passwordreauthentication_not_validotp_expiredotp_disabledidentity_not_foundweak_passwordover_request_rate_limitover_email_send_rate_limitover_sms_send_rate_limitbad_code_verifieranonymous_provider_disabledhook_timeouthook_timeout_after_retryhook_payload_over_size_limit!hook_payload_invalid_content_typerequest_timeoutmfa_phone_enroll_not_enabledmfa_phone_verify_not_enabledmfa_totp_enroll_not_enabledmfa_totp_verify_not_enabledmfa_webauthn_enroll_not_enabledmfa_webauthn_verify_not_enabledmfa_verified_factor_existsinvalid_credentialsemail_address_not_authorizedemail_address_invalidc                      e Zd ZddZy)	AuthErrorc                Z    t         j                  | |       || _        d| _        || _        y )NrZ   )	Exception__init__messagenamecode)selfr^   r`   s      B/var/www/openai/venv/lib/python3.12/site-packages/gotrue/errors.pyr]   zAuthError.__init__]   s'    4)		    N)r^   strr`   	ErrorCodereturnNone__name__
__module____qualname__r]    rc   rb   rZ   rZ   \   s    rc   rZ   c                  6    e Zd ZU ded<   ded<   ded<   ded<   y)	AuthApiErrorDictrd   r_   r^   intstatusre   r`   Nri   rj   rk   __annotations__rl   rc   rb   rn   rn   d   s    
ILK
Orc   rn   c                      e Zd ZddZddZy)AuthApiErrorc                \    t         j                  | ||       d| _        || _        || _        y )Nrt   )rZ   r]   r_   rp   r`   )ra   r^   rp   r`   s       rb   r]   zAuthApiError.__init__l   s)    4$/"		rc   c                `    | j                   | j                  | j                  | j                  dS )Nr_   r^   rp   r`   rw   ra   s    rb   to_dictzAuthApiError.to_dictr   s(    II||kkII	
 	
rc   N)r^   rd   rp   ro   r`   re   rf   rg   rf   rn   ri   rj   rk   r]   ry   rl   rc   rb   rt   rt   k   s    
rc   rt   c                      e Zd ZddZy)AuthUnknownErrorc                N    t         j                  | |d        d| _        || _        y )Nr}   )rZ   r]   r_   original_error)ra   r^   r   s      rb   r]   zAuthUnknownError.__init__|   s#    4$/&	,rc   N)r^   rd   r   r\   rf   rg   rh   rl   rc   rb   r}   r}   {   s    -rc   r}   c                      e Zd ZddZddZy)CustomAuthErrorc                N    t         j                  | ||       || _        || _        y N)rZ   r]   r_   rp   )ra   r^   r_   rp   r`   s        rb   r]   zCustomAuthError.__init__   s"    4$/	rc   c                J    | j                   | j                  | j                  dS )Nr_   r^   rp   r   rx   s    rb   ry   zCustomAuthError.to_dict   s!    II||kk
 	
rc   N)
r^   rd   r_   rd   rp   ro   r`   re   rf   rg   rz   r{   rl   rc   rb   r   r      s    

rc   r   c                      e Zd ZddZy)AuthSessionMissingErrorc                6    t         j                  | dddd        y )NzAuth session missing!r     r   r]   rx   s    rb   r]   z AuthSessionMissingError.__init__   s      #%	
rc   N)rf   rg   rh   rl   rc   rb   r   r          
rc   r   c                      e Zd ZddZy)AuthInvalidCredentialsErrorc                6    t         j                  | |ddd        y )Nr   r   r   )ra   r^   s     rb   r]   z$AuthInvalidCredentialsError.__init__   s      )	
rc   N)r^   rd   rf   rg   rh   rl   rc   rb   r   r      r   rc   r   c                  "    e Zd ZU ded<   ded<   y)%AuthImplicitGrantRedirectErrorDetailsrd   errorr`   Nrq   rl   rc   rb   r   r      s    J
Irc   r   c                      e Zd ZU ded<   y)"AuthImplicitGrantRedirectErrorDict/Optional[AuthImplicitGrantRedirectErrorDetails]detailsNrq   rl   rc   rb   r   r      s    <<rc   r   c                  *    e Zd Z	 d	 	 	 	 	 ddZddZy)AuthImplicitGrantRedirectErrorNc                D    t         j                  | |ddd        || _        y )Nr   i  )r   r]   r   )ra   r^   r   s      rb   r]   z'AuthImplicitGrantRedirectError.__init__   s*    
 	  ,	
 rc   c                `    | j                   | j                  | j                  | j                  dS )Nr_   r^   rp   r   r   rx   s    rb   ry   z&AuthImplicitGrantRedirectError.to_dict   (    II||kk||	
 	
rc   r   )r^   rd   r   r   rf   rg   )rf   r   r{   rl   rc   rb   r   r      s0     DH A 
	
rc   r   c                      e Zd ZddZy)AuthRetryableErrorc                6    t         j                  | |d|d        y )Nr   r   )ra   r^   rp   s      rb   r]   zAuthRetryableError.__init__   s       	
rc   N)r^   rd   rp   ro   rf   rg   rh   rl   rc   rb   r   r      r   rc   r   c                      e Zd ZddZddZy)AuthWeakPasswordErrorc                D    t         j                  | |d|d       || _        y )Nr   rD   )r   r]   reasons)ra   r^   rp   r   s       rb   r]   zAuthWeakPasswordError.__init__   s(      #	
 rc   c                `    | j                   | j                  | j                  | j                  dS )Nr_   r^   rp   r   r   rx   s    rb   ry   zAuthWeakPasswordError.to_dict   r   rc   N)r^   rd   rp   ro   r   z	List[str]rf   rg   rz   r{   rl   rc   rb   r   r      s    
rc   r   N)
__future__r   typingr   r   r   typing_extensionsr   re   r\   rZ   rn   rt   r}   r   r   r   r   r   r   r   r   rl   rc   rb   <module>r      s    " * * 'PR	j	 y 
9 
 -y -
i 

o 

/ 
I 
=)9 =
_ 
0
 

O 
rc   