import type { IncomingMessage } from "http"; import { NextRequest, NextResponse } from "next/server.js"; import type { NextApiRequest } from "next/types.js"; /** * Normalize a Request or NextRequest to a NextRequest instance. * Ensures consistent behavior across Next.js 15 (Edge) and 16 (Node Proxy). * @internal */ export declare function toNextRequest(input: Request | NextRequest): NextRequest; /** * Normalize a Response or NextResponse to a NextResponse instance. * Converts plain Fetch Response objects into NextResponse while preserving * headers, body, status, and statusText. * * Required for environments where plain Responses lack Next.js cookie helpers. * @internal */ export declare function toNextResponse(res: Response | NextResponse): NextResponse; type PagesRouterLikeRequest = IncomingMessage | NextApiRequest; /** * Convert IncomingMessage/NextApiRequest headers to a web-standard Headers object. * @internal */ export declare function toHeadersFromIncomingMessage(req: PagesRouterLikeRequest): Headers; /** * Construct a URL from a Pages Router request (IncomingMessage). * Uses the Host header and x-forwarded-proto to build a full URL. * Returns undefined if Host header is missing or URL construction fails. * @internal */ export declare function toUrlFromPagesRouter(req: PagesRouterLikeRequest): URL | undefined; export {};