from Events.Engine.abstract_class import Event from .models import AccountRequestValidators from .function_handlers import ( AccountListEventMethods, AccountCreateEventMethods, AccountUpdateEventMethods, ) # class SelectResponseAccount(BaseModel): # """ # Response model for account list. # """ # neighborhood_code: str # neighborhood_name: str # type_code: str # type_description: str # # Auth Login account_list_super_user_event = Event( name="account_insert_super_user_event", key="36a165fe-a2f3-437b-80ee-1ee44670fe70", request_validator=AccountRequestValidators.ListAccountRecord, # response_validator=SelectResponseAccount, # language_models=[AccountRecords.__language_model__], language_models=[], statics="ACCOUNTS_LIST", description="List all types of accounts by validation list options and queries.", ) account_list_super_user_event.endpoint_callable = ( AccountListEventMethods.account_records_list ) account_insert_super_user_event = Event( name="account_insert_super_user_event", key="3aa46155-72bc-4370-b4e7-b937b0f9b893", request_validator=AccountRequestValidators.InsertAccountRecord, # response_validator=SelectResponseAccount, # language_models=[AccountRecords.__language_model__], language_models=[], statics="ACCOUNT_CREATED", description="Create a new account by validation list options and queries.", ) account_insert_super_user_event.endpoint_callable = ( AccountCreateEventMethods.account_records_create ) account_update_super_user_event = Event( name="account_insert_super_user_event", key="3aa46155-72bc-4370-b4e7-b937b0f9b893", request_validator=AccountRequestValidators.UpdateAccountRecord, # response_validator=SelectResponseAccount, # language_models=[AccountRecords.__language_model__], language_models=[], statics="ACCOUNT_UPDATED", description="Update a specific account by validation list options and queries.", ) account_update_super_user_event.endpoint_callable = ( AccountUpdateEventMethods.account_records_update ) class SuperUserAccountEvents: SuperUserListEvent = account_list_super_user_event SuperUserCreateEvent = account_insert_super_user_event SuperUserUpdateEvent = account_update_super_user_event