export type RequestDebugHeaders = Headers | Record | undefined; export interface RequestDebugPayload { method: string; url: string; headers?: RequestDebugHeaders; body?: unknown; bodyText?: string; bodyBase64?: string; bodyUnavailable?: string; protocol?: string; } export interface RequestDebugResponseLog { write(chunk: Uint8Array | string): void; close(): Promise; } export interface RequestDebugSession { readonly id: number; readonly requestPath: string; readonly responsePath: string; openResponseLog(statusLine: string, headers?: RequestDebugHeaders): Promise; wrapResponse(response: Response): Promise; } export declare function isRequestDebugEnabled(): boolean; export declare function createRequestDebugSession(payload: RequestDebugPayload): Promise; /** * Dump a fetch-shaped request to `rr-session-N.json`; the returned session's * `wrapResponse` streams the raw response into `rr-session-N.res.log`. Called * per request by `transportFetch` while `PI_REQ_DEBUG=1`. */ export declare function createFetchRequestDebugSession(input: string | URL | Request, init: RequestInit | undefined): Promise;