import type { IncomingMessage, ServerResponse } from "node:http"; import { type RouteEntry, type RouteMatch } from "@termfleet/core/internal/http-route-table.js"; export type { RouteEntry, RouteMatch, RoutePath } from "@termfleet/core/internal/http-route-table.js"; export { pathHasRoute } from "@termfleet/core/internal/http-route-table.js"; export type NodeRouteMatch = RouteMatch & { url: URL; }; export type NodeRouteHandler = (request: IncomingMessage, response: ServerResponse, match: NodeRouteMatch) => Promise | void; export declare function dispatchRoute(routes: RouteEntry[], request: IncomingMessage, response: ServerResponse, url: URL): Promise; export type CorsOptions = { additionalOrigins?: () => Set; allowMethods: string; originEnvNames: string[]; }; export declare function writeCorsHeaders(request: IncomingMessage, response: ServerResponse, options: CorsOptions): boolean; export type CorsOutcome = "continue" | "handled"; export declare function applyCors(request: IncomingMessage, response: ServerResponse, options: CorsOptions): CorsOutcome; export declare function writeKnownRequestError(response: ServerResponse, error: unknown): boolean; export declare function handleWithHttpErrorMapping(request: IncomingMessage, response: ServerResponse, component: string, run: () => Promise): Promise;