import type { ControllerCrudOptions, RouteMiddleware } from './crud';
export type ControllerSide = 'admin' | 'app';
/** @Controller() 装饰器选项 */
export type ControllerOptions = {
    /** 路由前缀，如 `/auth`；也可用字符串参数简写 */
    prefix?: string;
    side?: ControllerSide;
    module?: string;
    /** EPS / OpenAPI 描述 */
    description?: string;
    /** 控制器级中间件 */
    middleware?: RouteMiddleware | RouteMiddleware[];
} & ControllerCrudOptions;
export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
export type RouteParamSource = 'body' | 'query' | 'params';
/** handler 参数装饰器元数据（@Body / @Query / @Param） */
export type RouteParamMeta = {
    index: number;
    source: RouteParamSource;
    schema?: unknown;
};
/** 路由元数据 */
export type ControllerRouteMeta = {
    method: HttpMethod;
    path: string;
    handler: string;
    body?: unknown;
    query?: unknown;
    routeParams?: unknown;
    params?: RouteParamMeta[];
    public?: boolean;
    summary?: string;
    /** 单路由中间件 */
    middleware?: RouteMiddleware[];
    /** 权限码（任一即可）；未设且非 IgnorePerms 时由路由自动推导 */
    perms?: string[];
    /** 跳过权限码校验（仍可要求登录） */
    ignorePerms?: boolean;
    /** 框架自动 CRUD 路由 */
    autoCrud?: boolean;
};
/** 控制器元数据 */
export type ControllerMeta = {
    token: new (...args: unknown[]) => unknown;
    module: string;
    side: ControllerSide;
    prefix: string;
    /** OpenAPI / EPS 描述 */
    description?: string;
    file?: string;
    routes: ControllerRouteMeta[];
    /** 控制器级中间件（该 plugin 下全部路由） */
    middleware?: RouteMiddleware[];
    /** 快速 CRUD 配置 */
    crud?: ControllerCrudOptions;
};
