import http from "node:http";
export declare function json(res: http.ServerResponse, status: number, payload: unknown, headers?: Record<string, string>): void;
export declare function text(res: http.ServerResponse, status: number, body: string, headers?: Record<string, string>): void;
export declare function clampNumber(value: number, min: number, max: number): number;
export declare function isTrustedOrigin(origin: string): boolean;
export declare function corsHeaders(origin: string | null): Record<string, string>;
export declare function readCorsHeaders(req: http.IncomingMessage): Record<string, string>;
export declare function readBearerToken(req: http.IncomingMessage): string | null;
export declare function readJsonBody(req: http.IncomingMessage, maxBytes: number): Promise<unknown>;
export declare function wantsJsonResponse(req: http.IncomingMessage, url: URL): boolean;
