import type { CorsConfig } from '#adapter/features/cors/index'; import type { BodyParserOptions, SecurityHook } from '#adapter/core/request/body/index'; import type { NestHandler, NestRequest } from '#adapter/core/request/request'; import type { NestContext } from '#adapter/core/context'; import type { NestExceptionHandler } from '#adapter/core/route/handler-bridge'; import { HonoLifecycle } from './hono-lifecycle.ts'; import type { TransportChoiceOptions } from './server-options.ts'; import type { StaticAssetsOptions } from '#adapter/features/static-assets/index'; import type { EngineConfig, ViewOptions } from '#adapter/features/views/index'; interface ServerAdapterOptions extends TransportChoiceOptions { readonly views?: ViewOptions; } declare class ServerAdapter extends HonoLifecycle { private readonly writer; private readonly views; constructor(options?: ServerAdapterOptions); status(response: NestContext, statusCode: number): void; reply(response: NestContext, body: unknown, statusCode?: number): void; end(response: NestContext, message?: string): void; redirect(response: NestContext, statusCode: number, url: string): void; setHeader(response: NestContext, name: string, value: string): void; getHeader(response: NestContext, name: string): string | undefined; appendHeader(response: NestContext, name: string, value: string): void; isHeadersSent(response: NestContext): boolean; render(response: NestContext, view: string, options: unknown): Promise; setViewEngine(engine: EngineConfig): this; engine(extension: string, engine: unknown): this; setBaseViewsDir(directory: string | readonly string[]): this; useStaticAssets(path: StaticAssetsOptions | string | readonly string[], options?: StaticAssetsOptions): this; enableCors(options?: CorsConfig): void; getRequestMethod(request: NestRequest): string; getRequestUrl(request: NestRequest): string; getRequestHostname(request: NestRequest): string; registerParserMiddleware(_prefix?: string, rawBody?: boolean): void; useBodyParser(type?: string, rawBody?: boolean, options?: BodyParserOptions): void; private installSecurityHook; private installMapException; init(): Promise; setNotFoundHandler(handler: NestHandler): void; setErrorHandler(handler: NestExceptionHandler): void; protected register(method: string, path: string, handler: NestHandler): void; protected mount(path: string, handler: NestHandler): void; private get bridgeOptions(); private applyLimit; private effectiveBodyLimit; setLocal(key: string, value: unknown): this; set(name: string, value: unknown): this; enable(name: string): this; disable(name: string): this; } interface ServerAdapter { mapException: (error: unknown) => unknown; registerSecurityHook: (hook: SecurityHook) => void; } export { ServerAdapter }; export type { ServerAdapterOptions }; //# sourceMappingURL=server-adapter.d.ts.map