import { useApiStore } from '@/stores/api';
export interface HttpClient {
    withBaseUrl(url: string): Omit<HttpClient, 'withBaseUrl'>;
    get<ResponseBody = any>(url: string): Promise<ResponseBody>;
    post<ResponseBody = any>(url: string, body?: any, signal?: AbortSignal): Promise<ResponseBody>;
    put<ResponseBody = any>(url: string, body?: any): Promise<ResponseBody>;
    patch<ResponseBody = any>(url: string, body?: any): Promise<ResponseBody>;
    delete<ResponseBody = any>(url: string, body?: any): Promise<ResponseBody>;
    errorHandler: (error: any) => Promise<void>;
    onError: (handler: (error: any) => Promise<void>) => void;
}
export declare const HTTP_TIMEOUT = 30000;
/**
 * Deprecates all Axios usage using built-in fetch method.
 * Provides retry capability with 401.
 * with JSON serialization
 */
export declare function defineApi<Fn>(factory: (urls: ReturnType<typeof useApiStore>['backendUrls'], client: HttpClient) => Fn): () => Fn;
