remove ducjdb extension from postgres
This commit is contained in:
@@ -24,6 +24,14 @@ class KeyValidations:
|
||||
data = "data"
|
||||
validation = "validations"
|
||||
|
||||
# Keys for Validation TYPES
|
||||
class KeyTypeValidations:
|
||||
HEADERS = "HEADERS"
|
||||
DATA = "DATA"
|
||||
MODIFY = "MODIFY"
|
||||
VALIDATION = "VALIDATION"
|
||||
BOTH = "BOTH"
|
||||
|
||||
# Types of keys
|
||||
class KeyTypes:
|
||||
REQUEST = "REQUEST"
|
||||
@@ -37,16 +45,17 @@ class KeyURLs:
|
||||
|
||||
# "data": {"event_code": f"{KeyBases.list_key}", "asked_field": KeyValidations.headers, "type": KeyTypes.RESPONSE},
|
||||
class ValidationRequest:
|
||||
event_code: str
|
||||
asked_field: str
|
||||
type: Optional[str] = "REQUEST"
|
||||
|
||||
@classmethod
|
||||
def dump(cls) -> Dict[str, Any]:
|
||||
def __init__(self, event_code: str, asked_field: str, type_: Optional[str] = "REQUEST"):
|
||||
self.event_code = event_code
|
||||
self.asked_field = asked_field
|
||||
self.type = type_
|
||||
|
||||
def dump(self) -> Dict[str, Any]:
|
||||
return {
|
||||
"event_code": cls.event_code,
|
||||
"asked_field": cls.asked_field,
|
||||
"type": cls.type,
|
||||
"event_code": self.event_code,
|
||||
"asked_field": self.asked_field,
|
||||
"type": self.type,
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ AccountCluster = CategoryCluster(
|
||||
},
|
||||
mapping=page_2_keys,
|
||||
include_in_schema=True,
|
||||
template_ui="LCU",
|
||||
sub_category=[],
|
||||
is_client=True,
|
||||
)
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
from Events.Engine.abstract_class import PageInfo
|
||||
from .bases import Components, KeyTypes, ValidationRequest, icon, cluster_name
|
||||
from .bases import KeyValidations, KeyBases, PageBases, KeyURLs
|
||||
from Events.base_request_model import AUTH_URL_EXTENSION, EVENTS_URL_EXTENSION, VALID_URL_EXTENSION
|
||||
from .account_records import (
|
||||
AccountRecordsUpdateEventMethods,
|
||||
AccountRecordsCreateEventMethods,
|
||||
AccountRecordsListEventMethods,
|
||||
)
|
||||
from .bases import Components, KeyTypeValidations, KeyTypes, ValidationRequest, icon, cluster_name
|
||||
from .bases import KeyValidations, KeyBases, PageBases, KeyURLs
|
||||
from .lang_models import (
|
||||
account_language_list_models_as_dict,
|
||||
account_language_create_form_models_as_dict,
|
||||
@@ -84,10 +85,11 @@ RedisValidation = dict(
|
||||
class ClustersPageInfo:
|
||||
|
||||
# Cluster Page Infos that are available for the client
|
||||
dashboard_page_info = PageInfo(
|
||||
DASHBOARD = PageInfo(
|
||||
name=f"{cluster_name}",
|
||||
url=PageBases.DASHBOARD,
|
||||
icon=icon,
|
||||
template_ui="LCU",
|
||||
info={
|
||||
"en": {
|
||||
"page": "Account Records for reaching user all types account information",
|
||||
@@ -124,18 +126,18 @@ class ClustersPageInfo:
|
||||
"ENDPOINTS": AccountRecordsListEventMethods.retrieve_all_event_keys(),
|
||||
"LANGUAGE_MODELS": account_language_list_models_as_dict,
|
||||
"INSTRUCTIONS": {
|
||||
"HEADERS": {
|
||||
KeyTypeValidations.HEADERS: {
|
||||
"store": True,
|
||||
"url": KeyURLs.validations,
|
||||
"url": f"{VALID_URL_EXTENSION}{KeyURLs.validations}",
|
||||
"data": ValidationRequest(
|
||||
event_code=f"{KeyBases.list_key}",
|
||||
asked_field=KeyValidations.headers,
|
||||
type=KeyTypes.RESPONSE
|
||||
type_=KeyTypes.RESPONSE
|
||||
).dump(),
|
||||
},
|
||||
"DATA": {
|
||||
KeyTypeValidations.DATA: {
|
||||
"store": True,
|
||||
"url": f"{KeyBases.list_key}",
|
||||
"url": f"{EVENTS_URL_EXTENSION}{KeyBases.list_key}",
|
||||
"params": None,
|
||||
"data": dict(page=1, limit=1, order_by="uu_id", order_type="desc", query=None),
|
||||
},
|
||||
@@ -144,10 +146,11 @@ class ClustersPageInfo:
|
||||
},
|
||||
)
|
||||
|
||||
create_page_info = PageInfo(
|
||||
CREATE = PageInfo(
|
||||
name=f"{cluster_name}",
|
||||
url=PageBases.CREATE,
|
||||
icon=icon,
|
||||
template_ui="LCU",
|
||||
info={
|
||||
"en": {
|
||||
"page": "Create Account Records for reaching user all types account information",
|
||||
@@ -168,33 +171,40 @@ class ClustersPageInfo:
|
||||
"ENDPOINTS": AccountRecordsCreateEventMethods.retrieve_all_event_keys(),
|
||||
"LANGUAGE_MODELS": account_language_create_form_models_as_dict,
|
||||
"INSTRUCTIONS": {
|
||||
"VALIDATION": {
|
||||
KeyTypeValidations.VALIDATION: {
|
||||
"store": True,
|
||||
"url": KeyURLs.validations,
|
||||
"url": f"{VALID_URL_EXTENSION}{KeyURLs.validations}",
|
||||
"data": ValidationRequest(
|
||||
event_code=f"{KeyBases.create_key}",
|
||||
asked_field=KeyValidations.validation,
|
||||
type=KeyTypes.REQUEST
|
||||
).dump(),
|
||||
type_=KeyTypes.REQUEST
|
||||
).dump(),
|
||||
},
|
||||
"HEADERS": {
|
||||
KeyTypeValidations.HEADERS: {
|
||||
"store": True,
|
||||
"url": KeyURLs.validations,
|
||||
"url": f"{VALID_URL_EXTENSION}{KeyURLs.validations}",
|
||||
"data": ValidationRequest(
|
||||
event_code=f"{KeyBases.create_key}",
|
||||
asked_field=KeyValidations.headers,
|
||||
type=KeyTypes.REQUEST
|
||||
type_=KeyTypes.REQUEST
|
||||
).dump(),
|
||||
},
|
||||
KeyTypeValidations.MODIFY: {
|
||||
"store": False,
|
||||
"url": f"{EVENTS_URL_EXTENSION}{KeyBases.create_key}",
|
||||
"params": None,
|
||||
"data": None,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
)
|
||||
|
||||
update_page_info = PageInfo(
|
||||
UPDATE = PageInfo(
|
||||
name=f"{cluster_name}",
|
||||
url=PageBases.UPDATE,
|
||||
icon=icon,
|
||||
template_ui="LCU",
|
||||
info={
|
||||
"en": {
|
||||
"page": "Update Account Records via all types account information",
|
||||
@@ -215,29 +225,29 @@ class ClustersPageInfo:
|
||||
"ENDPOINTS": AccountRecordsUpdateEventMethods.retrieve_all_event_keys(),
|
||||
"LANGUAGE_MODELS": account_language_update_form_models_as_dict,
|
||||
"INSTRUCTIONS": {
|
||||
"VALIDATION": {
|
||||
KeyTypeValidations.VALIDATION: {
|
||||
"store": True,
|
||||
"url": KeyURLs.validations,
|
||||
"url": f"{VALID_URL_EXTENSION}{KeyURLs.validations}",
|
||||
"data": ValidationRequest(
|
||||
event_code=f"{KeyBases.update_key}",
|
||||
asked_field=KeyValidations.validation,
|
||||
type=KeyTypes.REQUEST
|
||||
type_=KeyTypes.REQUEST
|
||||
).dump(),
|
||||
},
|
||||
"HEADERS": {
|
||||
KeyTypeValidations.HEADERS: {
|
||||
"store": True,
|
||||
"url": KeyURLs.validations,
|
||||
"url": f"{VALID_URL_EXTENSION}{KeyURLs.validations}",
|
||||
"data": ValidationRequest(
|
||||
event_code=f"{KeyBases.update_key}",
|
||||
asked_field=KeyValidations.headers,
|
||||
type=KeyTypes.REQUEST
|
||||
type_=KeyTypes.REQUEST
|
||||
).dump(),
|
||||
},
|
||||
"DATA": {
|
||||
"store": True,
|
||||
"url": f"{KeyBases.list_key}",
|
||||
"params": {"uu_id": "SomeUUID"},
|
||||
"data": dict(page=1, size=1, limit=1, order_by="uu_id", order_type="desc", query={"uu_id": "SomeUUID"}),
|
||||
KeyTypeValidations.MODIFY: {
|
||||
"store": False,
|
||||
"url": f"{EVENTS_URL_EXTENSION}{KeyBases.update_key}",
|
||||
"params": None,
|
||||
"data": None,
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -246,9 +256,9 @@ class ClustersPageInfo:
|
||||
|
||||
# Page Variations of the cluster
|
||||
page_infos = {
|
||||
ClustersPageInfo.dashboard_page_info.URL: ClustersPageInfo.dashboard_page_info,
|
||||
ClustersPageInfo.create_page_info.URL: ClustersPageInfo.create_page_info,
|
||||
ClustersPageInfo.update_page_info.URL: ClustersPageInfo.update_page_info,
|
||||
ClustersPageInfo.DASHBOARD.URL: ClustersPageInfo.DASHBOARD,
|
||||
ClustersPageInfo.CREATE.URL: ClustersPageInfo.CREATE,
|
||||
ClustersPageInfo.UPDATE.URL: ClustersPageInfo.UPDATE,
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user