///
import type { AxiosResponse, AxiosRequestConfig, AxiosInstance } from "axios";
import type AsyncRetry from "async-retry";
export type ApiConfig = {
url: URL;
timeout?: number;
logging?: boolean;
logger?: (msg: string) => void;
headers?: Record;
withCredentials?: boolean;
retry?: AsyncRetry.Options;
};
export type ApiRequestConfig = {
retry?: AsyncRetry.Options;
} & AxiosRequestConfig;
export declare class Api {
protected _instance?: AxiosInstance;
cookieMap: Map;
config: ApiConfig;
constructor(config?: ApiConfig);
applyConfig(config: ApiConfig): void;
getConfig(): ApiConfig;
private requestInterceptor;
private responseInterceptor;
private mergeDefaults;
get(path: string, config?: ApiRequestConfig): Promise>;
post(path: string, body: Buffer | string | object | null, config?: ApiRequestConfig): Promise>;
get instance(): AxiosInstance;
request(path: string, config?: ApiRequestConfig): Promise>;
}
export default Api;