/**
 * FormFileAttachment - File attachment type for hazo_files integration.
 *
 * Replaces the legacy FileData interface with a reference-tracking model.
 * Each attachment stores a file_id (the hazo_files record) and a ref_id
 * (the unique reference from an entity to that file), enabling multiple
 * fields to reference the same physical file without duplication.
 */
import type { FileData } from '../components/hazo_collab_form_base.js';
/** Status of a tracked file in hazo_files */
export type FileStatus = 'active' | 'orphaned' | 'soft_deleted' | 'missing';
/**
 * A file attachment stored in form_data at __files_ / __private_files_ keys.
 *
 * Contains cached display fields (file_name, file_size, mime_type) so the UI
 * can render without additional API calls.
 */
export interface FormFileAttachment {
    /** hazo_files record ID */
    file_id: string;
    /** Unique reference ID (matches file_refs[].ref_id in hazo_files) */
    ref_id: string;
    /** Cached original filename for display */
    file_name: string;
    /** Cached file size in bytes */
    file_size: number;
    /** Cached MIME type (e.g. 'application/pdf') */
    mime_type: string;
    /** Visibility level */
    visibility: 'public' | 'private';
    /** ISO timestamp when this attachment was created */
    attached_at: string;
    /** User ID who attached the file */
    attached_by?: string;
    /** File status from hazo_files (only populated when show_file_status is true) */
    status?: FileStatus;
    /** Server file path (for download fallback when get_download_url is unavailable) */
    file_path?: string;
    /** Content tag classifying the document type (set by LLM via hazo_files content tagging) */
    content_tag?: string | null;
}
/**
 * Type guard: checks whether an object is a FormFileAttachment (vs legacy FileData).
 * FormFileAttachment has ref_id + mime_type; FileData has file_type + uploaded_at.
 */
export declare function is_form_file_attachment(item: unknown): item is FormFileAttachment;
/**
 * Convert a FormFileAttachment back to the legacy FileData shape.
 * Useful for consumers that still depend on FileData during migration.
 */
export declare function attachment_to_file_data(attachment: FormFileAttachment): FileData;
/**
 * Convert a legacy FileData to a FormFileAttachment.
 * A ref_id is required; if not provided, one will be generated.
 */
export declare function file_data_to_attachment(file_data: FileData, ref_id?: string): FormFileAttachment;
//# sourceMappingURL=file_attachment.d.ts.map