more services added
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
from api_initializer.event_clusters import EventCluster, RouterCluster
|
||||
from index import endpoints_index
|
||||
from .supers_events import (
|
||||
SuperLivingSpaceListEvent,
|
||||
SuperLivingSpaceCreateEvent,
|
||||
SuperLivingSpaceUpdateEvent,
|
||||
SuperLivingSpaceDeleteEvent,
|
||||
)
|
||||
|
||||
LivingSpaceRouterCluster = RouterCluster(name="LivingSpaceRouterCluster")
|
||||
|
||||
LivingSpaceListEventCluster = EventCluster(name="LivingSpaceListEventCluster", endpoint_uu_id=endpoints_index["LivingSpaceList"])
|
||||
LivingSpaceListEventCluster.add_event(SuperLivingSpaceListEvent)
|
||||
|
||||
LivingSpaceCreateEventCluster = EventCluster(name="LivingSpaceCreateEventCluster", endpoint_uu_id=endpoints_index["LivingSpaceCreate"])
|
||||
LivingSpaceCreateEventCluster.add_event(SuperLivingSpaceCreateEvent)
|
||||
|
||||
LivingSpaceUpdateEventCluster = EventCluster(name="LivingSpaceUpdateEventCluster", endpoint_uu_id=endpoints_index["LivingSpaceUpdate"])
|
||||
LivingSpaceUpdateEventCluster.add_event(SuperLivingSpaceUpdateEvent)
|
||||
|
||||
LivingSpaceDeleteEventCluster = EventCluster(name="LivingSpaceDeleteEventCluster", endpoint_uu_id=endpoints_index["LivingSpaceDelete"])
|
||||
LivingSpaceDeleteEventCluster.add_event(SuperLivingSpaceDeleteEvent)
|
||||
|
||||
LivingSpaceRouterCluster.set_event_cluster(LivingSpaceListEventCluster)
|
||||
LivingSpaceRouterCluster.set_event_cluster(LivingSpaceCreateEventCluster)
|
||||
LivingSpaceRouterCluster.set_event_cluster(LivingSpaceUpdateEventCluster)
|
||||
LivingSpaceRouterCluster.set_event_cluster(LivingSpaceDeleteEventCluster)
|
||||
@@ -0,0 +1,95 @@
|
||||
from typing import Any
|
||||
|
||||
from api_initializer.event_clusters import Event
|
||||
from api_validations.response import (
|
||||
PaginateOnly,
|
||||
Pagination,
|
||||
PaginationResult,
|
||||
PostgresResponseSingle,
|
||||
PostgresResponse,
|
||||
EndpointResponse
|
||||
)
|
||||
from schemas import (
|
||||
Build,
|
||||
BuildParts,
|
||||
AccountRecords,
|
||||
)
|
||||
from api_validations.defaults.validations import CommonHeaders
|
||||
|
||||
|
||||
# List all endpoint FL-REP
|
||||
SuperLivingSpaceListEvent = Event(
|
||||
name="super_living_space_list",
|
||||
key="e3eced11-c464-4893-8b49-d2858c160ed0",
|
||||
request_validator=None, # TODO: Add request validator
|
||||
response_validator=None, # TODO: Add response validator
|
||||
description="Super Living Space List all endpoint",
|
||||
)
|
||||
|
||||
SuperLivingSpaceCreateEvent = Event(
|
||||
name="super_living_space_create",
|
||||
key="9e26f770-3475-4831-9da9-4684119b13ae",
|
||||
request_validator=None, # TODO: Add request validator
|
||||
response_validator=None, # TODO: Add response validator
|
||||
description="Super Living Space Create endpoint",
|
||||
)
|
||||
|
||||
SuperLivingSpaceUpdateEvent = Event(
|
||||
name="super_living_space_update",
|
||||
key="ecd15d27-e5e8-4bd1-972b-9b4508cfac77",
|
||||
request_validator=None, # TODO: Add request validator
|
||||
response_validator=None, # TODO: Add response validator
|
||||
description="Super Living Space Update endpoint",
|
||||
)
|
||||
|
||||
SuperLivingSpaceDeleteEvent = Event(
|
||||
name="super_living_space_delete",
|
||||
key="4fcadb8c-2e26-4af3-acb5-bcbf87cae0c0",
|
||||
request_validator=None, # TODO: Add request validator
|
||||
response_validator=None, # TODO: Add response validator
|
||||
description="Super Living Space Delete endpoint",
|
||||
)
|
||||
|
||||
|
||||
def super_living_space_list_callable(list_options: PaginateOnly, headers: CommonHeaders):
|
||||
return {
|
||||
"message": "MSG0003-LIST",
|
||||
"data": None,
|
||||
"completed": True,
|
||||
}
|
||||
|
||||
|
||||
SuperLivingSpaceListEvent.event_callable = super_living_space_list_callable
|
||||
|
||||
|
||||
def super_living_space_create_callable(data, headers: CommonHeaders):
|
||||
return {
|
||||
"message": "MSG0001-INSERT",
|
||||
"data": None,
|
||||
"completed": True,
|
||||
}
|
||||
|
||||
|
||||
SuperLivingSpaceCreateEvent.event_callable = super_living_space_create_callable
|
||||
|
||||
|
||||
def super_living_space_update_callable(data, headers: CommonHeaders):
|
||||
return {
|
||||
"message": "MSG0002-UPDATE",
|
||||
"data": None,
|
||||
"completed": True,
|
||||
}
|
||||
|
||||
|
||||
SuperLivingSpaceUpdateEvent.event_callable = super_living_space_update_callable
|
||||
|
||||
|
||||
def super_living_space_delete_callable(uu_id: str, headers: CommonHeaders):
|
||||
return {
|
||||
"message": "MSG0003-DELETE",
|
||||
"data": None,
|
||||
"completed": True,
|
||||
}
|
||||
|
||||
|
||||
SuperLivingSpaceDeleteEvent.event_callable = super_living_space_delete_callable
|
||||
Reference in New Issue
Block a user