instructions and validations tested
This commit is contained in:
@@ -21,8 +21,8 @@ from .function_handlers import (
|
||||
|
||||
# Auth Login
|
||||
account_list_super_user_event = Event(
|
||||
name="account_insert_super_user_event",
|
||||
key="36a165fe-a2f3-437b-80ee-1ee44670fe70",
|
||||
name="account_list_super_user_event",
|
||||
key="7192c2aa-5352-4e36-98b3-dafb7d036a3d",
|
||||
request_validator=AccountRequestValidators.ListAccountRecord,
|
||||
# response_validator=SelectResponseAccount,
|
||||
# language_models=[AccountRecords.__language_model__],
|
||||
@@ -39,7 +39,7 @@ account_list_super_user_event.endpoint_callable = (
|
||||
|
||||
account_insert_super_user_event = Event(
|
||||
name="account_insert_super_user_event",
|
||||
key="3aa46155-72bc-4370-b4e7-b937b0f9b893",
|
||||
key="31f4f32f-0cd4-4995-8a6a-f9f56335848a",
|
||||
request_validator=AccountRequestValidators.InsertAccountRecord,
|
||||
# response_validator=SelectResponseAccount,
|
||||
# language_models=[AccountRecords.__language_model__],
|
||||
@@ -56,7 +56,7 @@ account_insert_super_user_event.endpoint_callable = (
|
||||
|
||||
account_update_super_user_event = Event(
|
||||
name="account_insert_super_user_event",
|
||||
key="204d3b21-1da6-4739-9f45-36492636c770",
|
||||
key="208e6273-17ef-44f0-814a-8098f816b63a",
|
||||
request_validator=AccountRequestValidators.UpdateAccountRecord,
|
||||
# response_validator=SelectResponseAccount,
|
||||
# language_models=[AccountRecords.__language_model__],
|
||||
@@ -65,6 +65,7 @@ account_update_super_user_event = Event(
|
||||
description="Update a specific account by validation list options and queries.",
|
||||
)
|
||||
|
||||
|
||||
account_update_super_user_event.endpoint_callable = (
|
||||
AccountUpdateEventMethods.account_records_update
|
||||
)
|
||||
|
||||
@@ -5,13 +5,9 @@ from .account_records import (
|
||||
AccountRecordsListEventMethods,
|
||||
)
|
||||
|
||||
cluster_name = "AccountCluster"
|
||||
page_type=f"/dashboard?site={cluster_name}"
|
||||
|
||||
cluster_name = "AccountCluster"
|
||||
prefix = "/accounts"
|
||||
create_key = f"{prefix}{AccountRecordsCreateEventMethods.URL}"
|
||||
update_key = f"{prefix}{AccountRecordsUpdateEventMethods.URL}"
|
||||
list_key = f"{prefix}{AccountRecordsListEventMethods.URL}"
|
||||
|
||||
|
||||
class LanguageModels:
|
||||
@@ -19,91 +15,135 @@ class LanguageModels:
|
||||
COMPONENT: str = "Table"
|
||||
PREFIX_URL: str = ""
|
||||
PAGE_INFO: dict
|
||||
STATIC_PATH: str = "events"
|
||||
|
||||
def as_dict(self):
|
||||
return {
|
||||
"SITE_URL": self.SITE_URL,
|
||||
"SITE_URL": f"/{self.STATIC_PATH}{self.SITE_URL}",
|
||||
"COMPONENT": self.COMPONENT,
|
||||
"PREFIX_URL": self.PREFIX_URL,
|
||||
"PAGE_INFO": self.PAGE_INFO,
|
||||
}
|
||||
|
||||
|
||||
create_key = f"{prefix}{AccountRecordsCreateEventMethods.URL}"
|
||||
update_key = f"{prefix}{AccountRecordsUpdateEventMethods.URL}"
|
||||
list_key = f"{prefix}{AccountRecordsListEventMethods.URL}"
|
||||
|
||||
|
||||
account_language_update_models = LanguageModels()
|
||||
account_language_update_models.COMPONENT = "Link"
|
||||
account_language_update_models.SITE_URL=f"/update?site={cluster_name}"
|
||||
account_language_update_models.PREFIX_URL=f"{prefix}{AccountRecordsUpdateEventMethods.URL}"
|
||||
account_language_update_models.SITE_URL = f"/update?site={cluster_name}"
|
||||
account_language_update_models.PREFIX_URL = (
|
||||
update_key
|
||||
)
|
||||
account_language_update_models.PAGE_INFO = {
|
||||
"en": {"page": "Update Account Records",},
|
||||
"tr": {"page": "Hesap Kayıdı Güncelle",},
|
||||
}
|
||||
"en": {
|
||||
"page": "Update Account Records",
|
||||
},
|
||||
"tr": {
|
||||
"page": "Hesap Kayıdı Güncelle",
|
||||
},
|
||||
}
|
||||
account_language_model_as_dict = account_language_update_models.as_dict()
|
||||
|
||||
|
||||
account_language_created_models = LanguageModels()
|
||||
account_language_created_models.COMPONENT = "Link"
|
||||
account_language_created_models.SITE_URL=f"/create?site={cluster_name}"
|
||||
account_language_created_models.PREFIX_URL=f"{prefix}{AccountRecordsCreateEventMethods.URL}"
|
||||
account_language_created_models.SITE_URL = f"/create?site={cluster_name}"
|
||||
account_language_created_models.PREFIX_URL = (
|
||||
create_key
|
||||
)
|
||||
account_language_created_models.PAGE_INFO = {
|
||||
"en": {"page": "Create Account Records",},
|
||||
"tr": {"page": "Hesap Kayıdı Oluştur"},
|
||||
}
|
||||
"en": {
|
||||
"page": "Create Account Records",
|
||||
},
|
||||
"tr": {"page": "Hesap Kayıdı Oluştur"},
|
||||
}
|
||||
account_language_created_models_as_dict = account_language_created_models.as_dict()
|
||||
|
||||
account_language_list_models = LanguageModels()
|
||||
account_language_list_models.COMPONENT = "Table"
|
||||
account_language_list_models.SITE_URL = f"/list?site={cluster_name}"
|
||||
account_language_list_models.PREFIX_URL = f"{prefix}{AccountRecordsListEventMethods.URL}"
|
||||
account_language_list_models.SITE_URL = f"/dashboard?site={cluster_name}"
|
||||
account_language_list_models.PREFIX_URL = (
|
||||
list_key
|
||||
)
|
||||
account_language_list_models.PAGE_INFO = {
|
||||
"en": {"page": "List Account Records",},
|
||||
"tr": {"page": "Hesap Kayıtlarını Listele",},
|
||||
}
|
||||
"en": {
|
||||
"page": "List Account Records",
|
||||
},
|
||||
"tr": {
|
||||
"page": "Hesap Kayıtlarını Listele",
|
||||
},
|
||||
}
|
||||
|
||||
account_language_list_models_as_dict = account_language_list_models.as_dict()
|
||||
|
||||
account_language_create_models = LanguageModels()
|
||||
account_language_create_models.COMPONENT = "Form"
|
||||
account_language_create_models.SITE_URL = f"/create?site={cluster_name}"
|
||||
account_language_create_models.PREFIX_URL = f"{prefix}{AccountRecordsListEventMethods.URL}"
|
||||
account_language_create_models.PREFIX_URL = (
|
||||
create_key
|
||||
)
|
||||
account_language_create_models.PAGE_INFO = {
|
||||
"en": {"page": "List Account Records", "button:": "Create"},
|
||||
"tr": {"page": "Hesap Kayıtlarını Listele", "button:": "Oluştur"},
|
||||
}
|
||||
"en": {"page": "List Account Records", "button:": "Create"},
|
||||
"tr": {"page": "Hesap Kayıtlarını Listele", "button:": "Oluştur"},
|
||||
}
|
||||
|
||||
account_language_create_models_as_dict = account_language_create_models.as_dict()
|
||||
|
||||
account_language_update_form_models = LanguageModels()
|
||||
account_language_update_form_models.COMPONENT = "Form"
|
||||
account_language_update_form_models.SITE_URL=f"/update?site={cluster_name}"
|
||||
account_language_update_form_models.PREFIX_URL=f"{prefix}{AccountRecordsUpdateEventMethods.URL}"
|
||||
account_language_update_form_models.SITE_URL = f"/update?site={cluster_name}"
|
||||
account_language_update_form_models.PREFIX_URL = (
|
||||
update_key
|
||||
)
|
||||
account_language_update_form_models.PAGE_INFO = {
|
||||
"en": {"page": "Update Account Records", "button:": "Update"},
|
||||
"tr": {"page": "Hesap Kayıdı Güncelle", "button:": "Güncelle"},
|
||||
}
|
||||
account_language_update_form_models_as_dict = account_language_update_form_models.as_dict()
|
||||
"en": {"page": "Update Account Records", "button:": "Update"},
|
||||
"tr": {"page": "Hesap Kayıdı Güncelle", "button:": "Güncelle"},
|
||||
}
|
||||
account_language_update_form_models_as_dict = (
|
||||
account_language_update_form_models.as_dict()
|
||||
)
|
||||
|
||||
|
||||
dashboard_page_info = PageInfo(
|
||||
name=f"{cluster_name}",
|
||||
url=f"/dashboard?site={cluster_name}",
|
||||
icon="Building",
|
||||
instructions={
|
||||
"headers": {
|
||||
"store": True, "url": "/validations/header", "data": {"event_code": f"/accounts/list", "asked_field": "headers"},
|
||||
}
|
||||
},
|
||||
page_info={
|
||||
"page": {
|
||||
"en": "Account Records for reaching user all types account information",
|
||||
"tr": "Kullanıcı tüm hesap bilgilerine ulaşmak için Hesap Kayıtları",
|
||||
"en": {
|
||||
"page": "Account Records for reaching user all types account information",
|
||||
},
|
||||
"tr": {
|
||||
"page": "Kullanıcı tüm hesap bilgilerine ulaşmak için Hesap Kayıtları",
|
||||
},
|
||||
},
|
||||
instructions={
|
||||
str(list_key): {
|
||||
"headers": {
|
||||
"store": True,
|
||||
"url": "/validations/header",
|
||||
"data": {"event_code": f"{prefix}/list", "asked_field": "headers"},
|
||||
},
|
||||
"data": {
|
||||
"store": True,
|
||||
"url": f"{prefix}/list",
|
||||
"data": dict(page=1, limit=1),
|
||||
},
|
||||
},
|
||||
},
|
||||
endpoints={
|
||||
str(update_key): AccountRecordsUpdateEventMethods.retrieve_all_event_keys(),
|
||||
str(create_key): AccountRecordsCreateEventMethods.retrieve_all_event_keys(),
|
||||
str(list_key): AccountRecordsListEventMethods.retrieve_all_event_keys(),
|
||||
},
|
||||
language_models={
|
||||
account_language_update_models.PREFIX_URL: account_language_model_as_dict,
|
||||
account_language_created_models.PREFIX_URL: account_language_created_models_as_dict,
|
||||
account_language_list_models.PREFIX_URL: account_language_list_models_as_dict,
|
||||
str(list_key): {
|
||||
str(update_key): account_language_model_as_dict,
|
||||
str(create_key): account_language_created_models_as_dict,
|
||||
str(list_key): account_language_list_models_as_dict,
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
@@ -112,24 +152,32 @@ create_page_info = PageInfo(
|
||||
url=f"/create?site={cluster_name}",
|
||||
icon="Building",
|
||||
instructions={
|
||||
"validation": {
|
||||
"store": True, "url": "/validations/validation", "data": {"event_code": f"/accounts/create", "asked_field": "validation"},
|
||||
},
|
||||
"headers": {
|
||||
"store": True, "url": "/validations/header", "data": {"event_code": f"/accounts/create", "asked_field": "headers"},
|
||||
}
|
||||
},
|
||||
page_info={
|
||||
"page": {
|
||||
"en": "Account Records creating for user all types account information",
|
||||
"tr": "Kullanıcı tüm hesap bilgilerine ulaşmak için Hesap Kayıtları oluştur",
|
||||
str(create_key): {
|
||||
"validation": {
|
||||
"store": True,
|
||||
"url": "/validations/validation",
|
||||
"data": {"event_code": f"{prefix}/create", "asked_field": "validation"},
|
||||
},
|
||||
"headers": {
|
||||
"store": True,
|
||||
"url": "/validations/header",
|
||||
"data": {"event_code": f"{prefix}/create", "asked_field": "headers"},
|
||||
},
|
||||
},
|
||||
},
|
||||
page_info={
|
||||
"en": {
|
||||
"page": "Create Account Records for reaching user all types account information",
|
||||
},
|
||||
"tr": {
|
||||
"page": "Kullanıcı tüm hesap bilgilerine ulaşmak için Hesap Kayıt Oluştur",
|
||||
},
|
||||
},
|
||||
endpoints={
|
||||
str(create_key): AccountRecordsCreateEventMethods.retrieve_all_event_keys(),
|
||||
},
|
||||
language_models={
|
||||
account_language_create_models.PREFIX_URL: account_language_create_models_as_dict,
|
||||
str(create_key): account_language_create_models_as_dict,
|
||||
},
|
||||
)
|
||||
|
||||
@@ -138,32 +186,38 @@ update_page_info = PageInfo(
|
||||
url=f"/update?site={cluster_name}",
|
||||
icon="Building",
|
||||
instructions={
|
||||
"validation": {
|
||||
"store": True, "url": "/validations/validation", "data": {"event_code": f"/accounts/update", "asked_field": "validation"},
|
||||
},
|
||||
"headers": {
|
||||
"store": True, "url": "/validations/header", "data": {"event_code": f"/accounts/update", "asked_field": "headers"},
|
||||
},
|
||||
"data": {
|
||||
"store": True, "url": f"{prefix}/list", "data": dict(page= 1, limit= 1),
|
||||
}
|
||||
},
|
||||
page_info={
|
||||
"page": {
|
||||
"en": "Account Records updating for user all types account information",
|
||||
"tr": "Kullanıcı tüm hesap bilgilerine ulaşmak için Hesap Kayıtları güncelle",
|
||||
str(update_key): {
|
||||
"validation": {
|
||||
"store": True,
|
||||
"url": "/validations/validation",
|
||||
"data": {"event_code": f"{prefix}/update", "asked_field": "validation"},
|
||||
},
|
||||
"headers": {
|
||||
"store": True,
|
||||
"url": "/validations/header",
|
||||
"data": {"event_code": f"{prefix}/update", "asked_field": "headers"},
|
||||
},
|
||||
},
|
||||
},
|
||||
page_info={
|
||||
"en": {
|
||||
"page": "Update Account Records via all types account information",
|
||||
},
|
||||
"tr": {
|
||||
"page": "Tüm hesap bilgileri aracılığıyla Hesap Kayıtlarını Güncelle",
|
||||
},
|
||||
},
|
||||
endpoints={
|
||||
str(update_key): AccountRecordsUpdateEventMethods.retrieve_all_event_keys(),
|
||||
},
|
||||
language_models={
|
||||
account_language_update_form_models.PREFIX_URL: account_language_update_form_models_as_dict,
|
||||
str(update_key): account_language_update_form_models_as_dict,
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
account_page_info = {
|
||||
f"/dashboard?site={cluster_name}" : dashboard_page_info,
|
||||
f"/dashboard?site={cluster_name}": dashboard_page_info,
|
||||
f"/create?site={cluster_name}": create_page_info,
|
||||
f"/update?site={cluster_name}": update_page_info,
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ address_page_info = PageInfo(
|
||||
},
|
||||
language_models={
|
||||
"page_info": {
|
||||
"key": "pair", # key: pair, value: dict
|
||||
"key": "pair", # key: pair, value: dict
|
||||
"description": {
|
||||
"en": "Account Records for reaching user all types account information",
|
||||
"tr": "Kullanıcı tüm hesap bilgilerine ulaşmak için Hesap Kayıtları",
|
||||
@@ -74,4 +74,4 @@ address_page_info = PageInfo(
|
||||
},
|
||||
},
|
||||
},
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user