import axios, { AxiosInstance, AxiosError, AxiosRequestConfig, AxiosDefaults } from 'axios';
export type RetryConfig = {
    currentRetryAttempt: number;
    retry: number;
    retryDelay: number;
    instance: AxiosInstance;
    httpMethodsToRetry: Array<string>;
    noResponseRetries: number;
    retryRanges?: Array<Array<number>>;
    statusCodesToRetry: Array<Array<number>>;
    shouldRetry?: (err: SDKAxiosError) => boolean;
    onRetryAttempt: (err: SDKAxiosError) => void;
};
export type SDKAxiosDefaults<D = any> = {
    retryConfig: RetryConfig | Partial<RetryConfig>;
} & AxiosDefaults<D>;
export interface SDKAxiosRequestConfig extends AxiosRequestConfig {
    retryConfig: RetryConfig | Partial<RetryConfig>;
}
export interface SDKAxiosError extends AxiosError {
    config: SDKAxiosRequestConfig;
}
export interface SDKAxiosInstance extends Omit<AxiosInstance, 'defaults'> {
    defaults: SDKAxiosDefaults;
}
/**
 * Eject the Axios interceptor that is providing retry capabilities.
 * @param interceptorId The interceptorId provided in the config.
 * @param instance The axios instance using this interceptor.
 */
export declare const detach: (interceptorId: number, instance: typeof axios) => void;
/**
 * Attach the interceptor to the Axios instance.
 * @param instance The optional Axios instance on which to attach the
 * interceptor.
 * @returns The id of the interceptor attached to the axios instance.
 */
export declare const attach: (instance: AxiosInstance) => number | null;
/**
 * Acquire the retryConfig object from an AxiosError if available.
 * @param err The Axios error with a config object.
 */
export declare const getConfig: (err: SDKAxiosError) => RetryConfig | Partial<RetryConfig> | null;
