/** * useFileUpload Hook * * Provides file upload functionality with progress tracking and state management. * Handles the complete upload flow: initiate → upload to storage → complete. */ import type { AgUiClient, AttachmentDoc, Id } from '../types'; import { type UploadProgress } from '../services/uploadToPresignedUrl'; export interface UseFileUploadConfig { client: AgUiClient; conversationId?: string; fileUploadApiUrl: string; getAuthHeaders?: () => Promise> | Record; onProgress?: (fileId: Id, progress: UploadProgress) => void; onComplete?: (attachment: AttachmentDoc) => void; onError?: (fileId: Id, error: Error) => void; } export interface FileUploadState { fileId: Id; file: File; progress: UploadProgress; status: 'pending' | 'uploading' | 'completed' | 'failed'; error?: Error; contentId?: string; } /** * Hook for uploading files to external storage service */ export declare function useFileUpload(config: UseFileUploadConfig): { uploads: import("solid-js").Accessor>; uploadFile: (file: File) => Promise; uploadFiles: (files: File[]) => Promise; cancelUpload: (fileId: Id) => void; clearUploads: () => void; }; //# sourceMappingURL=useFileUpload.d.ts.map