export interface DocumentFile { file_name: string; file_type: string; file_size_bytes: number; status: | 'processing' | 'summarized' | 'ready' | 'pushed' | 'failed' | 'unknown'; summary?: string; batch_id?: string; pushed_to_rag: boolean; processed_at?: string; download_url?: string; summary_length?: number; /** * ``"manual"`` for merchant uploads; ``"auto"`` for documents the * RAG-build pipeline writes itself (crawled site pages, the Gemini * brand profile, shop metadata). The UI shows a ``Generated by * system`` badge for the latter. */ source?: 'manual' | 'auto'; } export interface FileStatusResult { file_name: string; status: string; summary_length?: number; error?: string; } export interface BatchUploadResponse { batch_id: string; job_id: string; status: string; files: string[]; } export interface BatchStatus { batch_id: string; job_id: string; state: 'PENDING' | 'PROGRESS' | 'SUCCESS' | 'FAILURE'; progress: number; files_processed: number; files_total: number; current_file?: string; results?: FileStatusResult[]; error?: string; } export interface BatchPreviewFile { name: string; original_size: number; summary: string; summary_length: number; } export interface BatchPreview { batch_id: string; files: BatchPreviewFile[]; } export interface DocumentList { documents: DocumentFile[]; total: number; } export interface TextEntryRequest { title: string; description: string; } export interface TextEntryResponse { file_name: string; title: string; description_length: number; pushed_to_rag: boolean; }