/**
 * Unified HTTP Service
 *
 * Consolidates HttpClient + RequestManager into a single efficient class.
 * Uses native fetch instead of axios for smaller bundle size.
 *
 * Handles:
 * - Authentication (token management, auto-refresh)
 * - Caching (TTL-based)
 * - Deduplication (concurrent requests)
 * - Retry logic
 * - Error handling
 * - Request queuing
 */
import type { OxyConfig } from '../models/interfaces';
export interface RequestOptions {
    cache?: boolean;
    cacheTTL?: number;
    deduplicate?: boolean;
    retry?: boolean;
    maxRetries?: number;
    timeout?: number;
    signal?: AbortSignal;
}
interface RequestConfig extends RequestOptions {
    method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
    url: string;
    data?: unknown;
    params?: Record<string, unknown>;
}
/**
 * Unified HTTP Service
 *
 * Consolidates HttpClient + RequestManager into a single efficient class.
 * Uses native fetch instead of axios for smaller bundle size.
 */
export declare class HttpService {
    private baseURL;
    private tokenStore;
    private cache;
    private deduplicator;
    private requestQueue;
    private logger;
    private config;
    private requestMetrics;
    constructor(config: OxyConfig);
    /**
     * Main request method - handles everything in one place
     */
    request<T = unknown>(config: RequestConfig): Promise<T>;
    /**
     * Generate cache key efficiently
     * Uses simple hash for large objects to avoid expensive JSON.stringify
     */
    private generateCacheKey;
    /**
     * Build full URL with query params
     */
    private buildURL;
    /**
     * Get auth header with automatic token refresh
     */
    private getAuthHeader;
    /**
     * Unwrap standardized API response format
     */
    private unwrapResponse;
    /**
     * Update request metrics
     */
    private updateMetrics;
    get<T = unknown>(url: string, config?: Omit<RequestConfig, 'method' | 'url'>): Promise<{
        data: T;
    }>;
    post<T = unknown>(url: string, data?: unknown, config?: Omit<RequestConfig, 'method' | 'url' | 'data'>): Promise<{
        data: T;
    }>;
    put<T = unknown>(url: string, data?: unknown, config?: Omit<RequestConfig, 'method' | 'url' | 'data'>): Promise<{
        data: T;
    }>;
    patch<T = unknown>(url: string, data?: unknown, config?: Omit<RequestConfig, 'method' | 'url' | 'data'>): Promise<{
        data: T;
    }>;
    delete<T = unknown>(url: string, config?: Omit<RequestConfig, 'method' | 'url'>): Promise<{
        data: T;
    }>;
    setTokens(accessToken: string, refreshToken?: string): void;
    clearTokens(): void;
    getAccessToken(): string | null;
    hasAccessToken(): boolean;
    getBaseURL(): string;
    clearCache(): void;
    clearCacheEntry(key: string): void;
    getCacheStats(): {
        size: number;
        hits: number;
        misses: number;
        hitRate: number;
    };
    getMetrics(): {
        totalRequests: number;
        successfulRequests: number;
        failedRequests: number;
        cacheHits: number;
        cacheMisses: number;
        averageResponseTime: number;
    };
    static __resetTokensForTests(): void;
}
export {};
//# sourceMappingURL=HttpService.d.ts.map