import type { MiddlewareHandler } from 'hono'; import type { NestContext, NestEnv } from '#adapter/core/context'; import type { NestRequest, TrustProxy } from '#adapter/core/request/request'; interface HookResponse { removeHeader: (name: string) => unknown; setHeader: (name: string, value: string) => unknown; } type OnRequestHook = (request: NestRequest, response: HookResponse, done: () => void) => unknown; type OnResponseHook = (request: NestRequest, response: HookResponse) => unknown; interface HookArgs { readonly request: NestRequest; readonly response: HookResponse; } interface InstrumentationState { readonly onRequest: () => OnRequestHook | undefined; readonly onResponse: () => OnResponseHook | undefined; readonly trustProxy: () => TrustProxy; } interface GuardState { readonly corsEnabled: () => boolean; readonly cors: MiddlewareHandler; readonly closing: () => boolean; } declare const bindingsOf: (context: { readonly env?: NestEnv['Bindings']; }) => NestEnv['Bindings'] | undefined; declare const standInFor: (context: NestContext) => HookResponse; declare const outgoingOf: (context: NestContext) => HookResponse; declare const hookArgsOf: (context: NestContext, trustProxy: TrustProxy) => HookArgs; declare const passed: (run: () => Promise) => Promise; declare const guardStep: (state: GuardState) => MiddlewareHandler; declare const instrumentationStep: (state: InstrumentationState) => MiddlewareHandler; export { bindingsOf, guardStep, hookArgsOf, instrumentationStep, outgoingOf, passed, standInFor }; export type { GuardState, HookArgs, HookResponse, InstrumentationState, OnRequestHook, OnResponseHook, }; //# sourceMappingURL=index.d.ts.map