/** * Upload with Progress Tracking * * Cross-platform upload helper that provides real-time progress events. * - Node.js: Uses http/https modules with chunked writes * - Browser: Uses XMLHttpRequest with progress events * * Integrates with @plyaz/api global configuration: * - Automatically merges global headers (auth, etc.) * - Uses global timeout, baseURL, retry, onError, withCredentials * - Respects API client configuration */ import type { UploadWithProgressOptions, UploadWithProgressResult } from '@plyaz/types/api'; /** * Upload data to a URL with progress tracking * * Automatically selects the appropriate implementation: * - Node.js: Uses http/https modules with chunked writes * - Browser: Uses XMLHttpRequest with progress events * * @param options - Upload options * @returns Promise resolving to upload result * * @example * ```typescript * const result = await uploadWithProgress({ * url: 'https://storage.example.com/upload', * data: fileBuffer, * contentType: 'application/pdf', * onProgress: (event) => { * console.log(`${event.percentage}% - ${event.speed} bytes/s`); * }, * }); * * if (result.success) { * console.log('Upload complete!'); * } * ``` */ export declare function uploadWithProgress(options: UploadWithProgressOptions): Promise; //# sourceMappingURL=uploadWithProgress.d.ts.map