export type JsonBodyResult = { ok: true; value: unknown; } | { ok: false; error: string; }; export type JsonBodyOptions = { /** Applied to DIAGNOSTIC text only — the raw body snippet, a body-read * exception message, and the displayed final URL — BEFORE whitespace * normalization and truncation, so a sensitive value containing whitespace * or spanning the snippet cutoff cannot survive into an error message. * Never applied to text handed to JSON.parse: protocol data is parsed from * the original response text unchanged. */ sanitizeDiagnostic?: (raw: string) => string; }; export declare function readJsonBody(response: Response, request: { method: string; url: string; }, options?: JsonBodyOptions): Promise;