from Events.Engine.abstract_class import Event from ApiLayers.LanguageModels.Request import ( LoginRequestLanguageModel, SelectRequestLanguageModel, ) from .models import AuthenticationRequestModels, AuthenticationResponseModels from .function_handlers import AuthenticationFunctions # Auth Login authentication_login_super_user_event = Event( name="authentication_login_super_user_event", key="a5d2d0d1-3e9b-4b0f-8c7d-6d4a4b4c4d4e", request_validator=AuthenticationRequestModels.LoginSuperUserRequestModel, language_models=[LoginRequestLanguageModel], response_validation_static="LOGIN_SUCCESS", description="Login super user", ) authentication_login_super_user_event.endpoint_callable = ( AuthenticationFunctions.authentication_login_with_domain_and_creds ) # Auth Select Company or Occupant Type authentication_select_super_user_event = Event( name="authentication_select_super_user_event", key="f951ae1a-7950-4eab-ae2d-5bd9c2d21173", request_validator=AuthenticationRequestModels.SelectCompanyOrOccupantTypeSuperUserRequestModel, language_models=[SelectRequestLanguageModel], response_validation_static="LOGIN_SELECT", description="Select company or occupant type super user", ) authentication_select_super_user_event.endpoint_callable = ( AuthenticationFunctions.authentication_select_company_or_occupant_type ) # Check Token Validity authentication_check_token_event = Event( name="authentication_check_token_event", key="b6e3d1e2-4f9c-5c1g-9d8e-7e5f6f5e5d5f", request_validator=None, # TODO: Add request validator language_models=[], # response_validator=None, # TODO: Add response validator description="Check if token is valid", ) authentication_check_token_event.endpoint_callable = ( AuthenticationFunctions.authentication_check_token_is_valid ) # Refresh User Info authentication_refresh_user_info_event = Event( name="authentication_refresh_user_info_event", key="c7f4e2f3-5g0d-6d2h-0e9f-8f6g7g6f6e6g", request_validator=None, # TODO: Add request validator language_models=[], # response_validator=None, # TODO: Add response validator description="Refresh user information", ) authentication_refresh_user_info_event.endpoint_callable = ( AuthenticationFunctions.authentication_access_token_user_info ) # Change Password authentication_change_password_event = Event( name="authentication_change_password_event", key="d8g5f3g4-6h1e-7e3i-1f0g-9g7h8h7g7f7h", request_validator=None, # TODO: Add request validator language_models=[], # response_validator=None, # TODO: Add response validator description="Change user password", ) authentication_change_password_event.endpoint_callable = ( AuthenticationFunctions.authentication_change_password ) # Create Password authentication_create_password_event = Event( name="authentication_create_password_event", key="e9h6g4h5-7i2f-8f4j-2g1h-0h8i9i8h8g8i", request_validator=None, # TODO: Add request validator language_models=[], # response_validator=None, # TODO: Add response validator description="Create new password", ) authentication_create_password_event.endpoint_callable = ( AuthenticationFunctions.authentication_create_password ) # Disconnect User authentication_disconnect_user_event = Event( name="authentication_disconnect_user_event", key="f0i7h5i6-8j3g-9g5k-3h2i-1i9j0j9i9h9j", request_validator=None, # TODO: Add request validator language_models=[], # response_validator=None, # TODO: Add response validator description="Disconnect all user sessions", ) authentication_disconnect_user_event.endpoint_callable = ( AuthenticationFunctions.authentication_disconnect_user ) # Logout User authentication_logout_user_event = Event( name="authentication_logout_user_event", key="g1j8i6j7-9k4h-0h6l-4i3j-2j0k1k0j0i0k", request_validator=AuthenticationRequestModels.LogoutRequestModel, language_models=[], # response_validator=None, # TODO: Add response validator description="Logout user session", ) authentication_logout_user_event.endpoint_callable = ( AuthenticationFunctions.authentication_logout_user ) # Refresh Token authentication_refresher_token_event = Event( name="authentication_refresher_token_event", key="h2k9j7k8-0l5i-1i7m-5j4k-3k1l2l1k1j1l", request_validator=AuthenticationRequestModels.RefresherRequestModel, # TODO: Add request validator language_models=[], # response_validator=None, description="Refresh authentication token", ) authentication_refresher_token_event.endpoint_callable = ( AuthenticationFunctions.authentication_refresher_token ) # Forgot Password authentication_forgot_password_event = Event( name="authentication_forgot_password_event", key="i3l0k8l9-1m6j-2j8n-6k5l-4l2m3m2l2k2m", request_validator=None, # TODO: Add request validator language_models=[], # response_validator=None, # TODO: Add response validator description="Request password reset", ) authentication_forgot_password_event.endpoint_callable = ( AuthenticationFunctions.authentication_forgot_password ) # Reset Password authentication_reset_password_event = Event( name="authentication_reset_password_event", key="j4m1l9m0-2n7k-3k9o-7l6m-5m3n4n3m3l3n", request_validator=None, # TODO: Add request validator language_models=[], # response_validator=None, # TODO: Add response validator description="Reset user password", ) authentication_reset_password_event.endpoint_callable = ( AuthenticationFunctions.authentication_reset_password ) # Download Avatar authentication_download_avatar_event = Event( name="authentication_download_avatar_event", key="k5n2m0n1-3o8l-4l0p-8m7n-6n4o5o4n4m4o", request_validator=None, # TODO: Add request validator language_models=[], # response_validator=None, # TODO: Add response validator description="Download user avatar and profile info", ) authentication_download_avatar_event.endpoint_callable = ( AuthenticationFunctions.authentication_download_avatar )