from fastapi.routing import APIRouter
from fastapi.requests import Request

from api_validations.validations_request import (
    UpdateEndpointAccessList,
    InsertEndpointAccess,
)

from api_services.redis.auth_actions.token import parse_token_object_to_dict


endpoint_restriction_route = APIRouter(prefix="/access", tags=["Endpoint Access"])
endpoint_restriction_route.include_router(
    endpoint_restriction_route, include_in_schema=True
)


@endpoint_restriction_route.post(
    path="/endpoint/restriction/create",
    summary="Add extra restriction to endpoints list",
)
def endpoint_restriction_create(request: Request, data: InsertEndpointAccess):
    token_dict = parse_token_object_to_dict(request=request)
    return


@endpoint_restriction_route.post(
    path="/endpoint/bind/update", summary="Update extra restriction to endpoints list"
)
def endpoint_restriction_update(request: Request, data: UpdateEndpointAccessList):
    token_dict = parse_token_object_to_dict(request=request)
    return


@endpoint_restriction_route.post(
    path="/endpoint/bind/list", summary="List extra restriction to endpoints list"
)
def endpoint_restriction_list(request: Request):
    token_dict = parse_token_object_to_dict(request=request)
    return


@endpoint_restriction_route.patch(
    path="/endpoint/bind/patch", summary="Patch extra restriction to endpoints list"
)
def endpoint_restriction_patch(request: Request):
    token_dict = parse_token_object_to_dict(request=request)
    return
