import { HttpBindings } from '@hono/node-server'; import { ServeStaticOptions } from '@hono/node-server/serve-static'; import { RequestMethod } from '@nestjs/common'; import { ErrorHandler, NestApplicationOptions, RequestHandler } from '@nestjs/common/interfaces'; import { AbstractHttpAdapter } from '@nestjs/core/adapters/http-adapter'; import { Context, Hono } from 'hono'; import { RedirectStatusCode, StatusCode } from 'hono/utils/http-status'; import * as http from 'http'; import http2 from 'http2'; import { HonoRequest, TypeBodyParser } from '../interfaces'; type HonoHandler = RequestHandler; type ServerType = http.Server | http2.Http2Server | http2.Http2SecureServer; type Ctx = Context | (() => Promise); export declare class HonoAdapter extends AbstractHttpAdapter { private _isParserRegistered; protected readonly instance: Hono<{ Bindings: HttpBindings; }>; constructor(); get isParserRegistered(): boolean; private getRouteAndHandler; private createRouteHandler; private normalizeContext; private getBody; private registerRoute; all(pathOrHandler: string | HonoHandler, handler?: HonoHandler): void; get(pathOrHandler: string | HonoHandler, handler?: HonoHandler): void; post(pathOrHandler: string | HonoHandler, handler?: HonoHandler): void; put(pathOrHandler: string | HonoHandler, handler?: HonoHandler): void; delete(pathOrHandler: string | HonoHandler, handler?: HonoHandler): void; use(pathOrHandler: string | HonoHandler, handler?: HonoHandler): void; patch(pathOrHandler: string | HonoHandler, handler?: HonoHandler): void; options(pathOrHandler: string | HonoHandler, handler?: HonoHandler): void; reply(ctx: Ctx, body: any, statusCode?: StatusCode): Promise; status(ctx: Ctx, statusCode: StatusCode): Promise; end(): Promise; render(): void; redirect(ctx: Ctx, statusCode: RedirectStatusCode, url: string): Promise; setErrorHandler(handler: ErrorHandler): void; setNotFoundHandler(handler: RequestHandler): void; useStaticAssets(path: string, options: ServeStaticOptions): void; setViewEngine(): void; isHeadersSent(ctx: Ctx): Promise; getHeader(ctx: Ctx, name: string): Promise; setHeader(ctx: Ctx, name: string, value: string): Promise; appendHeader(ctx: Ctx, name: string, value: string): Promise; getRequestHostname(ctx: Ctx): Promise; getRequestMethod(request: HonoRequest): string; getRequestUrl(request: HonoRequest): string; enableCors(options: { origin: string | string[] | ((origin: string, c: Context) => string | undefined | null); allowMethods?: string[]; allowHeaders?: string[]; maxAge?: number; credentials?: boolean; exposeHeaders?: string[]; }): void; useBodyParser(type: TypeBodyParser, rawBody?: boolean, bodyLimit?: number): void; close(): Promise; private extractClientIp; private parseRequestBody; initHttpServer(options: NestApplicationOptions): void; getType(): string; registerParserMiddleware(_prefix?: string, rawBody?: boolean): void; createMiddlewareFactory(requestMethod: RequestMethod): Promise<(path: string, callback: Function) => void>; applyVersionFilter(): () => () => unknown; listen(port: string | number, ...args: any[]): ServerType; bodyLimit(maxSize: number): import("hono").MiddlewareHandler; } export {};