import typing as t

from .datastructures import UploadFile
from .decorators import (
    Controller,
    Module,
    UseGuards,
    UseInterceptors,
    Version,
    exception_handler,
    extra_args,
    file,
    middleware,
    render,
    serializer_filter,
    set_metadata,
    template_context,
    template_filter,
    template_global,
)
from .exceptions import (
    APIException,
    AuthenticationFailed,
    HTTPException,
    MethodNotAllowed,
    NotAcceptable,
    NotAuthenticated,
    NotFound,
    PermissionDenied,
    UnsupportedMediaType,
    WebSocketException,
)
from .interfaces import (
    IApplicationReady,
    IApplicationShutdown,
    IApplicationStartup,
    IExceptionHandler,
    IExceptionMiddlewareService,
    IExecutionContext,
    IExecutionContextFactory,
    IGuardsConsumer,
    IHostContext,
    IHostContextFactory,
    IHTTPConnectionContextFactory,
    IHTTPHostContext,
    IIdentitySchemes,
    IInterceptorsConsumer,
    IModuleSetup,
    IModuleTemplateLoader,
    IResponseModel,
    IWebSocketContextFactory,
    IWebSocketHostContext,
)
from .models import (
    AnonymousIdentity,
    ControllerBase,
    ControllerType,
    EllarInterceptor,
    GuardCanActivate,
    Identity,
)
from .operations import (
    ModuleRouter,
    delete,
    get,
    head,
    http_route,
    options,
    patch,
    post,
    put,
    trace,
    ws_route,
)
from .params.decorators import (
    Body,
    Cookie,
    File,
    Form,
    Header,
    Inject,
    Path,
    Query,
    WsBody,
)
from .params.params import ParamFieldInfo as Param
from .params.params import ParamTypes
from .responses import (
    FileResponse,
    HTMLResponse,
    JSONResponse,
    ORJSONResponse,
    PlainTextResponse,
    RedirectResponse,
    Response,
    StreamingResponse,
    UJSONResponse,
)
from .serializer import Serializer, serialize_object
from .templating import TemplateResponse, render_template, render_template_string

__all__ = [
    "AnonymousIdentity",
    "ControllerBase",
    "serialize_object",
    "ControllerType",
    "GuardCanActivate",
    "Serializer",
    "WebSocketException",
    "APIException",
    "AuthenticationFailed",
    "NotAuthenticated",
    "NotFound",
    "NotAcceptable",
    "PermissionDenied",
    "HTTPException",
    "UnsupportedMediaType",
    "MethodNotAllowed",
    "render_template",
    "render_template_string",
    "ModuleRouter",
    "render",
    "Module",
    "Inject",
    "UseGuards",
    "Param",
    "ParamTypes",
    "set_metadata",
    "Controller",
    "Version",
    "delete",
    "get",
    "head",
    "http_route",
    "options",
    "patch",
    "post",
    "put",
    "trace",
    "ws_route",
    "Body",
    "Cookie",
    "File",
    "Form",
    "Header",
    "Path",
    "Query",
    "WsBody",
    "middleware",
    "exception_handler",
    "serializer_filter",
    "template_filter",
    "template_global",
    "template_context",
    "UploadFile",
    "file",
    "extra_args",
    "JSONResponse",
    "UJSONResponse",
    "ORJSONResponse",
    "StreamingResponse",
    "HTMLResponse",
    "FileResponse",
    "PlainTextResponse",
    "RedirectResponse",
    "TemplateResponse",
    "Response",
    "Identity",
    "IHostContext",
    "IExecutionContextFactory",
    "IExecutionContext",
    "IHostContextFactory",
    "IHTTPHostContext",
    "IWebSocketContextFactory",
    "IWebSocketHostContext",
    "IHTTPConnectionContextFactory",
    "IExceptionMiddlewareService",
    "IExceptionHandler",
    "IModuleSetup",
    "IResponseModel",
    "IModuleTemplateLoader",
    "IInterceptorsConsumer",
    "IGuardsConsumer",
    "EllarInterceptor",
    "UseInterceptors",
    "IApplicationStartup",
    "IApplicationShutdown",
    "IIdentitySchemes",
    "IApplicationReady",
]


def __dir__() -> t.List[str]:
    return sorted(__all__)  # pragma: no cover
