export type ApiDocsOptions = { /** URL prefix for the API docs viewer. Default from config (`docsPath`) / `DAXTA_DOCS_PATH` or `/docs`. */ basePath?: string; }; type LooseRequest = { method?: string; path?: string; url?: string; originalUrl?: string; query?: Record; headers?: Record; body?: unknown; }; type LooseResponse = { statusCode?: number; status?: (code: number) => LooseResponse; type?: (value: string) => LooseResponse; setHeader: (name: string, value: string) => void; send?: (body: string | Buffer | object) => void; end: (body?: string | Buffer) => void; writeHead?: (code: number, headers?: Record) => void; }; export type ApiDocsHandler = (req: LooseRequest, res: LooseResponse, next: (error?: unknown) => void) => void | Promise; /** * Express / Nest handler that serves generated API docs under `/docs` * (or `basePath`), Try-it proxy at `/__proxy`, and env store at `{base}/env.json`. */ export declare function apiDocsHandler(options?: ApiDocsOptions): ApiDocsHandler; /** Docs follow `NODE_ENV`, and stay closed unless it names a known working env. */ export declare function docsEnabled(): boolean; /** * Mount generated API docs on a Nest / Express app (`app.use(...)`). * * Served only when `NODE_ENV` is dev, development, test, sta or staging. * * Path defaults to `/docs`. Override with `DAXTA_DOCS_PATH` or `docsPath` in config. */ export declare function apiDocs(app: { use: (...handlers: unknown[]) => unknown; }, options?: ApiDocsOptions): void; export {};