/** * Upload Utility Functions */ import type { UploadProgressEvent, UploadState } from '@plyaz/types/api'; /** * Resolve URL with baseURL if provided */ export declare function resolveUrl(url: string, baseURL?: string): string; /** * Convert data to Buffer (Node.js) or ensure it's usable */ export declare function normalizeData(data: Buffer | Blob | ArrayBuffer | Uint8Array): Buffer | Uint8Array; /** * Create initial upload state */ export declare function createUploadState(totalSize: number): UploadState; /** * Calculate progress metrics */ export declare function calculateProgress(state: UploadState): UploadProgressEvent; /** * Emit final progress event */ export declare function emitFinalProgress(onProgress: ((event: UploadProgressEvent) => void) | undefined, totalSize: number, startTime: number): void; /** * Check if progress should be emitted based on throttling */ export declare function shouldEmitProgress(state: UploadState, totalSize: number, throttleMs: number): boolean; /** * Parse response headers from Node.js response */ export declare function parseNodeHeaders(headers: Record): Record; //# sourceMappingURL=utils.d.ts.map