import type { Middleware } from "./types.js"; import { type EnvironmentConfig } from "../../config/environment-config.js"; /** Options accepted by timeout. */ export interface TimeoutOptions { /** Timeout in milliseconds (default: 75000) */ timeoutMs?: number; /** Custom message for timeout response */ message?: string; /** Paths to exclude from timeout (e.g., health checks) */ exclude?: string[]; } /** * Creates a middleware that enforces request timeouts. * * If a request takes longer than the configured timeout, the middleware * returns a 504 Gateway Timeout response. */ export declare function timeout(options?: TimeoutOptions): Middleware; /** * Gets timeout from environment variable REQUEST_TIMEOUT_MS * * @param env - Optional EnvironmentConfig for test isolation */ export declare function getTimeoutFromEnv(env?: EnvironmentConfig): number; /** * Creates a timeout middleware with configuration from environment */ export declare function timeoutFromEnv(options?: Omit): Middleware; //# sourceMappingURL=timeout.d.ts.map