import { ValidationErrorInfo } from "./types"; export type ResponseHandler = (response: Response) => Promise; type ApiErrorArgs = { message: string; status: number; body?: any; }; export declare class ApiError extends Error { readonly status: number; readonly body: Body; constructor({ message, status, body }: ApiErrorArgs); } type ValidationErrorBody = { detail: ValidationErrorInfo[]; }; export declare class ValidationError extends ApiError { constructor(args: ApiErrorArgs); get fieldErrors(): ValidationErrorInfo[]; getFieldErrors(field: string): ValidationErrorInfo[]; } export declare function defaultResponseHandler(response: Response): Promise; export {};