type FetchOptions = { method?: string; body?: object; magicToken?: string; headers?: Record; }; /** Error thrown for non-OK API responses. Carries the parsed response body and HTTP status. */ export declare class ApiError extends Error { status: number; body: Record; constructor(message: string, status: number, body: Record); } export declare function api(path: string, opts?: FetchOptions, _retried?: boolean): Promise; /** * The one-line error text an ApiError carries: the machine code first, as it * always was (scripts and copy matches key on it), with the human message * appended after it on the same line when the server sent one. */ export declare function apiErrorMessage(data: Record, status: number): string; export {}; //# sourceMappingURL=api.d.ts.map