o
    `g}                     @  s   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 de	Z
G dd deZG d	d
 d
e
ZG dd de
ZG dd de
ZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZdS )    )annotations)ListLiteralOptional)	TypedDict)A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_verifierc                   @     e Zd Zd
ddZd	S )	AuthErrormessagestrcode	ErrorCodereturnNonec                 C  s"   t | | || _d| _|| _d S )NrI   )	Exception__init__rJ   namerL   )selfrJ   rL    rT   H/var/www/html/propose/venv/lib/python3.10/site-packages/gotrue/errors.pyrQ   M   s   
zAuthError.__init__N)rJ   rK   rL   rM   rN   rO   __name__
__module____qualname__rQ   rT   rT   rT   rU   rI   L       rI   c                   @  s.   e Zd ZU ded< ded< ded< ded< dS )	AuthApiErrorDictrK   rR   rJ   intstatusrM   rL   NrW   rX   rY   __annotations__rT   rT   rT   rU   r[   T   s
   
 r[   c                   @      e Zd Zdd	d
ZdddZdS )AuthApiErrorrJ   rK   r]   r\   rL   rM   rN   rO   c                 C  s$   t | || d| _|| _|| _d S )Nra   )rI   rQ   rR   r]   rL   )rS   rJ   r]   rL   rT   rT   rU   rQ   \   s   
zAuthApiError.__init__r[   c                 C     | j | j| j| jdS )NrR   rJ   r]   rL   rc   rS   rT   rT   rU   to_dictb   
   zAuthApiError.to_dictN)rJ   rK   r]   r\   rL   rM   rN   rO   rN   r[   rW   rX   rY   rQ   re   rT   rT   rT   rU   ra   [   s    
ra   c                   @  rH   )AuthUnknownErrorrJ   rK   original_errorrP   rN   rO   c                 C  s   t | |d  d| _|| _d S )Nri   )rI   rQ   rR   rj   )rS   rJ   rj   rT   rT   rU   rQ   l      
zAuthUnknownError.__init__N)rJ   rK   rj   rP   rN   rO   rV   rT   rT   rT   rU   ri   k   rZ   ri   c                   @  s    e Zd Zdd
dZdddZdS )CustomAuthErrorrJ   rK   rR   r]   r\   rL   rM   rN   rO   c                 C  s   t | || || _|| _d S N)rI   rQ   rR   r]   )rS   rJ   rR   r]   rL   rT   rT   rU   rQ   s   rk   zCustomAuthError.__init__r[   c                 C  s   | j | j| jdS )NrR   rJ   r]   rn   rd   rT   rT   rU   re   x   s   zCustomAuthError.to_dictN)
rJ   rK   rR   rK   r]   r\   rL   rM   rN   rO   rg   rh   rT   rT   rT   rU   rl   r   s    
rl   c                   @  s   e Zd ZdddZdS )AuthSessionMissingErrorrN   rO   c                 C  s   t | dddd  d S )NzAuth session missing!ro     rl   rQ   rd   rT   rT   rU   rQ         z AuthSessionMissingError.__init__N)rN   rO   rV   rT   rT   rT   rU   ro      rZ   ro   c                   @  s   e Zd ZdddZdS )	AuthInvalidCredentialsErrorrJ   rK   rN   rO   c                 C  s   t | |ddd  d S )Nrs   rp   rq   )rS   rJ   rT   rT   rU   rQ      rr   z$AuthInvalidCredentialsError.__init__N)rJ   rK   rN   rO   rV   rT   rT   rT   rU   rs      rZ   rs   c                   @  s   e Zd ZU ded< ded< dS )%AuthImplicitGrantRedirectErrorDetailsrK   errorrL   Nr^   rT   rT   rT   rU   rt      s   
 rt   c                   @  s   e Zd ZU ded< dS )"AuthImplicitGrantRedirectErrorDict/Optional[AuthImplicitGrantRedirectErrorDetails]detailsNr^   rT   rT   rT   rU   rv      s   
 rv   c                   @  s$   e Zd Z	dddd	ZdddZdS )AuthImplicitGrantRedirectErrorNrJ   rK   rx   rw   rN   rO   c                 C  s   t | |ddd  || _d S )Nry   i  )rl   rQ   rx   )rS   rJ   rx   rT   rT   rU   rQ      s   
z'AuthImplicitGrantRedirectError.__init__rv   c                 C  rb   )NrR   rJ   r]   rx   rz   rd   rT   rT   rU   re      rf   z&AuthImplicitGrantRedirectError.to_dictrm   )rJ   rK   rx   rw   rN   rO   )rN   rv   rh   rT   rT   rT   rU   ry      s    ry   c                   @  rH   )AuthRetryableErrorrJ   rK   r]   r\   rN   rO   c                 C  s   t | |d|d  d S )Nr{   rq   )rS   rJ   r]   rT   rT   rU   rQ      rr   zAuthRetryableError.__init__N)rJ   rK   r]   r\   rN   rO   rV   rT   rT   rT   rU   r{      rZ   r{   c                   @  r`   )AuthWeakPasswordErrorrJ   rK   r]   r\   reasons	List[str]rN   rO   c                 C  s   t | |d|d || _d S )Nr|   rC   )rl   rQ   r}   )rS   rJ   r]   r}   rT   rT   rU   rQ      s   
zAuthWeakPasswordError.__init__r[   c                 C  rb   )NrR   rJ   r]   r}   r   rd   rT   rT   rU   re      rf   zAuthWeakPasswordError.to_dictN)rJ   rK   r]   r\   r}   r~   rN   rO   rg   rh   rT   rT   rT   rU   r|      s    

r|   N)
__future__r   typingr   r   r   typing_extensionsr   rM   rP   rI   r[   ra   ri   rl   ro   rs   rt   rv   ry   r{   r|   rT   rT   rT   rU   <module>   s$    E