import { ApiServiceConfig, ApiResponse, ApiError, RequestOptions, RequestInterceptor, ResponseInterceptor, ErrorHandler } from './types.js';
/**
 * ApiService - Complete API Service Layer
 *
 * A comprehensive API service providing:
 * - Type-safe HTTP client with OpenAPI integration
 * - Advanced error handling and retry mechanisms
 * - Intelligent caching with cache invalidation
 * - Rate limiting and throttling
 * - Request/response interceptors
 * - Authentication and token management
 * - Real-time WebSocket integration
 * - Performance monitoring and analytics
 * - React hooks for seamless integration
 * - Offline support and queue management
 * - Request deduplication and cancellation
 */
export declare class ApiService {
    private baseURL;
    private config;
    private cache;
    private requestQueue;
    private interceptors;
    private authToken;
    private refreshTokenPromise;
    private rateLimiters;
    private offlineQueue;
    private isOnline;
    constructor(config: ApiServiceConfig);
    get<T = any>(url: string, options?: RequestOptions): Promise<ApiResponse<T>>;
    post<T = any>(url: string, data?: any, options?: RequestOptions): Promise<ApiResponse<T>>;
    put<T = any>(url: string, data?: any, options?: RequestOptions): Promise<ApiResponse<T>>;
    patch<T = any>(url: string, data?: any, options?: RequestOptions): Promise<ApiResponse<T>>;
    delete<T = any>(url: string, options?: RequestOptions): Promise<ApiResponse<T>>;
    private request;
    private executeRequest;
    private executeWithRetry;
    authenticate(credentials: any): Promise<void>;
    refreshAccessToken(): Promise<string>;
    private performTokenRefresh;
    logout(): void;
    private getCachedResponse;
    private cacheResponse;
    invalidateCache(pattern?: string): void;
    private isRateLimited;
    private updateRateLimit;
    addRequestInterceptor(interceptor: RequestInterceptor): void;
    addResponseInterceptor(interceptor: ResponseInterceptor): void;
    addErrorHandler(handler: ErrorHandler): void;
    private handleOfflineRequest;
    private processOfflineQueue;
    private buildUrl;
    private buildHeaders;
    private generateRequestKey;
    private parseResponse;
    private shouldRetry;
    private isRetryableError;
    private extractEndpoint;
    private sleep;
    private setupEventListeners;
    private setupPeriodicCacheCleanup;
    getStats(): {
        cacheSize: number;
        queueSize: number;
        offlineQueueSize: number;
        isOnline: boolean;
        isAuthenticated: boolean;
    };
    clearAll(): void;
}
export declare function useApi(config: ApiServiceConfig): ApiService;
export declare function useApiRequest<T = any>(endpoint: string, options?: RequestOptions): {
    data: T | null;
    loading: boolean;
    error: ApiError | null;
    refetch: () => Promise<void>;
};
export declare function useApiMutation<TData = any, TVariables = any>(endpoint: string, method?: 'POST' | 'PUT' | 'PATCH' | 'DELETE'): {
    mutate: (variables: TVariables) => Promise<TData>;
    loading: boolean;
    error: ApiError | null;
    data: TData | null;
};
export declare const apiService: ApiService;
export default ApiService;
//# sourceMappingURL=ApiService.d.ts.map