import type http from 'http'; export interface ProblemDetail { type: string; title: string; status: number; detail?: string; instance?: string; } /** * Send an RFC 9457 Problem Details JSON response. */ export declare function problemResponse(res: http.ServerResponse, status: number, title: string, detail?: string, instance?: string): void; /** 400 Bad Request */ export declare function badRequest(res: http.ServerResponse, detail: string, instance?: string): void; /** 404 Not Found */ export declare function notFound(res: http.ServerResponse, detail: string, instance?: string): void; /** 405 Method Not Allowed */ export declare function methodNotAllowed(res: http.ServerResponse, allowed: string[], instance?: string): void; /** 409 Conflict */ export declare function conflict(res: http.ServerResponse, detail: string, instance?: string): void; /** 422 Unprocessable Entity (validation errors) */ export declare function unprocessable(res: http.ServerResponse, detail: string, instance?: string): void; /** 500 Internal Server Error */ export declare function serverError(res: http.ServerResponse, detail?: string, instance?: string): void; /** Send a JSON success response. */ export declare function jsonResponse(res: http.ServerResponse, status: number, data: unknown): void; /** Read the request body as a string. */ export declare function readBody(req: http.IncomingMessage): Promise; /** Parse JSON body, returning null on failure. */ export declare function parseJsonBody(req: http.IncomingMessage): Promise | null>; //# sourceMappingURL=problem-details.d.ts.map