export interface ApiResponse { status: number; body: any; raw: string; } /** A failed request, carrying no stack the user would ever want to read. */ export declare class ApiError extends Error { status: number | null; body: unknown; constructor(message: string, { status, body }?: { status?: number | null; body?: unknown; }); } /** * One request, one answer: { status, body, raw }. A non-2xx is DATA, not an * exception — RFC 8628 spends 400 on `authorization_pending`, a normal step of * a healthy login. Only transport failures reject. */ export declare function request(url: string, { method, token, body, timeoutMs }?: { method?: string; token?: string | null; body?: unknown; timeoutMs?: number; }): Promise; export declare function postJson(url: string, body?: unknown, opts?: { token?: string | null; timeoutMs?: number; }): Promise; export declare function getJson(url: string, opts?: { token?: string | null; timeoutMs?: number; }): Promise;