events updated
This commit is contained in:
@@ -3,6 +3,10 @@ from typing import Union
|
||||
from fastapi.exceptions import HTTPException
|
||||
from fastapi.responses import JSONResponse
|
||||
|
||||
from api_validations.validations_response.address import (
|
||||
ListAddressResponse,
|
||||
AddressPostCodeResponse,
|
||||
)
|
||||
from databases import (
|
||||
AddressPostcode,
|
||||
Addresses,
|
||||
@@ -33,6 +37,10 @@ class AddressListEventMethods(MethodToEvent):
|
||||
"9c251d7d-da70-4d63-a72c-e69c26270442": "address_list_super_user",
|
||||
"52afe375-dd95-4f4b-aaa2-4ec61bc6de52": "address_list_employee",
|
||||
}
|
||||
__event_validation__ = {
|
||||
"9c251d7d-da70-4d63-a72c-e69c26270442": ListAddressResponse,
|
||||
"52afe375-dd95-4f4b-aaa2-4ec61bc6de52": ListAddressResponse,
|
||||
}
|
||||
|
||||
@classmethod
|
||||
def address_list_super_user(
|
||||
@@ -100,6 +108,9 @@ class AddressCreateEventMethods(MethodToEvent):
|
||||
__event_keys__ = {
|
||||
"ffdc445f-da10-4ce4-9531-d2bdb9a198ae": "create_address",
|
||||
}
|
||||
__event_validation__ = {
|
||||
"ffdc445f-da10-4ce4-9531-d2bdb9a198ae": InsertAddress,
|
||||
}
|
||||
|
||||
@classmethod
|
||||
def create_address(
|
||||
@@ -143,6 +154,9 @@ class AddressSearchEventMethods(MethodToEvent):
|
||||
__event_keys__ = {
|
||||
"e0ac1269-e9a7-4806-9962-219ac224b0d0": "search_address",
|
||||
}
|
||||
__event_validation__ = {
|
||||
"e0ac1269-e9a7-4806-9962-219ac224b0d0": SearchAddress,
|
||||
}
|
||||
|
||||
@classmethod
|
||||
def search_address(
|
||||
@@ -218,6 +232,9 @@ class AddressUpdateEventMethods(MethodToEvent):
|
||||
__event_keys__ = {
|
||||
"1f9c3a9c-e5bd-4dcd-9b9a-3742d7e03a27": "update_address",
|
||||
}
|
||||
__event_validation__ = {
|
||||
"1f9c3a9c-e5bd-4dcd-9b9a-3742d7e03a27": UpdateAddress,
|
||||
}
|
||||
|
||||
@classmethod
|
||||
def update_address(
|
||||
@@ -263,6 +280,9 @@ class AddressPatchEventMethods(MethodToEvent):
|
||||
__event_keys__ = {
|
||||
"b0e55a7e-af81-468c-b46c-a6b3a6b68d5d": "patch_address",
|
||||
}
|
||||
__event_validation__ = {
|
||||
"b0e55a7e-af81-468c-b46c-a6b3a6b68d5d": None,
|
||||
}
|
||||
|
||||
@classmethod
|
||||
def patch_address(
|
||||
@@ -307,6 +327,9 @@ class AddressPostCodeCreateEventMethods(MethodToEvent):
|
||||
__event_keys__ = {
|
||||
"6f1406ac-577d-4f2c-8077-71fff2252c5f": "create_post_code_address",
|
||||
}
|
||||
__event_validation__ = {
|
||||
"6f1406ac-577d-4f2c-8077-71fff2252c5f": InsertPostCode,
|
||||
}
|
||||
|
||||
@classmethod
|
||||
def create_post_code_address(
|
||||
@@ -357,6 +380,9 @@ class AddressPostCodeUpdateEventMethods(MethodToEvent):
|
||||
__event_keys__ = {
|
||||
"df18e489-a63c-477f-984c-aa52d30640ad": "update_post_code_address",
|
||||
}
|
||||
__event_validation__ = {
|
||||
"df18e489-a63c-477f-984c-aa52d30640ad": UpdatePostCode,
|
||||
}
|
||||
|
||||
@classmethod
|
||||
def update_post_code_address(
|
||||
@@ -413,6 +439,9 @@ class AddressPostCodeListEventMethods(MethodToEvent):
|
||||
__event_keys__ = {
|
||||
"88d37b78-1ac4-4513-9d25-090ac3a24f31": "list_post_code_address",
|
||||
}
|
||||
__event_validation__ = {
|
||||
"88d37b78-1ac4-4513-9d25-090ac3a24f31": AddressPostCodeResponse,
|
||||
}
|
||||
|
||||
@classmethod
|
||||
def list_post_code_address(
|
||||
|
||||
Reference in New Issue
Block a user