import axios, { type AxiosResponse } from 'axios';
import { ZodSchema, z } from '@qaing/schema';
import type { InstanceResponse, QAingRequestObject } from '../types/instance';
type RequestCallback<T extends QAingRequestObject> = (T['body'] extends ZodSchema ? {} extends z.infer<T['body']> ? {
    body?: z.infer<T['body']>;
} : {
    body: z.infer<T['body']>;
} : {
    body?: {};
}) & {
    args?: Array<string>;
};
declare let instanceResponseHandler: ((response: AxiosResponse) => void) | null;
declare let instanceErrorHandler: ((error: any) => void) | null;
declare const instance: axios.AxiosInstance;
export default instance;
export declare const setInstanceConfig: (responseHandler: typeof instanceResponseHandler, errorHandler: typeof instanceErrorHandler) => void;
export declare const request: <Req extends QAingRequestObject>(req: Req, { args, body }: RequestCallback<Req>) => Promise<InstanceResponse<Req['data']>>;
export declare const requestFetch: <Req extends QAingRequestObject>(req: Req, { args, body }: RequestCallback<Req>) => Promise<InstanceResponse<Req['data']>>;
export declare const fetcher: (url: string) => Promise<any>;
export declare const uploadFileToPreSignedUrlFetch: ({ url, fields, }: {
    url: string;
    fields: Record<string, string>;
}, file: File | string) => Promise<File>;
