import { type AxiosInstance, type AxiosRequestConfig } from 'axios'; import type { MoteurAuth, MoteurClientConfig } from './types.js'; /** Thrown when the API returns a non-2xx response (after axios). Check `status` and `response`. */ export declare class MoteurApiError extends Error { readonly status?: number; readonly response?: unknown; /** The JSON body the API answered with, if any. */ readonly data?: Record; /** A machine-readable reason from the body (`code`, else a snake_case `error`), e.g. `insufficient_credits`. */ readonly code?: string; constructor(message: string, options?: { status?: number; response?: unknown; }); /** Seconds the server asked to wait (429 `Retry-After`), if it said. */ get retryAfter(): number | undefined; } export declare function createRequestClient(config: MoteurClientConfig): AxiosInstance; export declare function createMoteurClientInternal(config: MoteurClientConfig): { readonly baseURL: string; readonly auth: MoteurAuth | undefined; setAuth(auth: MoteurAuth | undefined): void; request(options: AxiosRequestConfig): Promise; get(url: string, params?: Record): Promise; post(url: string, data?: unknown): Promise; put(url: string, data?: unknown): Promise; patch(url: string, data?: unknown): Promise; delete(url: string): Promise; /** Low-level axios instance (e.g. multipart upload). Not covered by semver as strictly as high-level methods. */ _raw: AxiosInstance; }; export type MoteurClient = ReturnType; //# sourceMappingURL=client.d.ts.map