import * as http from 'http';
import type { RouteHandler } from '../types.js';
export declare class Router {
    private routes;
    get(path: string, handler: RouteHandler): void;
    post(path: string, handler: RouteHandler): void;
    put(path: string, handler: RouteHandler): void;
    patch(path: string, handler: RouteHandler): void;
    delete(path: string, handler: RouteHandler): void;
    private addRoute;
    handle(req: http.IncomingMessage, res: http.ServerResponse): Promise<boolean>;
}
/** Helper: send JSON response. Restricts CORS to localhost origins only. */
export declare function sendJson(res: http.ServerResponse, data: unknown, status?: number, req?: http.IncomingMessage): void;
/** Helper: read JSON body from request (1MB limit, 10s timeout) */
export declare function readBody(req: http.IncomingMessage): Promise<unknown>;
//# sourceMappingURL=router.d.ts.map