/** * Network Manager for handling HTTP requests with retry logic and error handling */ import { ConversionIQConfig, NetworkRequest, NetworkResponse } from '../types/index'; import { ErrorHandler } from './ErrorHandler'; export declare class NetworkManager { private config; private errorHandler; constructor(config: ConversionIQConfig, errorHandler: ErrorHandler); /** * Send a network request with retry logic */ request(request: NetworkRequest): Promise>; /** * Send events in batch */ sendBatch(events: any[]): Promise; /** * Send a single event */ sendEvent(event: any): Promise; /** * Check if the SDK can connect to the API */ ping(): Promise; /** * Make the actual HTTP request */ private makeRequest; /** * Parse response body */ private parseResponse; /** * Parse response headers */ private parseHeaders; /** * Sleep for specified milliseconds */ private sleep; /** * Check if the current network connection supports sending data */ canSendData(): boolean; /** * Use sendBeacon for critical events when page is unloading */ sendBeacon(event: any): boolean; /** * Send event using image beacon (CORS-free method) * This works across all domains without CORS restrictions */ sendImageBeacon(event: any): Promise; /** * Send event with automatic fallback strategy * 1. Try XHR/fetch (best for rich data) * 2. Fall back to sendBeacon (reliable, no CORS) * 3. Fall back to image beacon (works everywhere) */ sendWithFallback(event: any): Promise; /** * Compress event data for URL transmission (used by image beacon) * Removes large fields and keeps only essential data */ private compressEventForBeacon; /** * Compress metadata to fit in URL */ private compressMetadata; /** * Make request with CORS credentials if configured */ requestWithCredentials(request: NetworkRequest): Promise>; } //# sourceMappingURL=NetworkManager.d.ts.map