/**
 * Embedding operations for DatabaseService
 *
 * Handles all CRUD operations for embeddings including batch inserts.
 * Note: Vector data is stored separately in vec_embeddings by VectorService.
 */
import Database from 'better-sqlite3';
import { Embedding } from '../../../models/embedding.js';
/**
 * Insert an embedding (vector stored separately in vec_embeddings by VectorService)
 *
 * @param db - Database connection
 * @param embedding - Embedding data (created_at will be generated, vector excluded)
 * @param updateMetadataCounts - Callback to update metadata counts
 * @returns string - The embedding ID
 */
export declare function insertEmbedding(db: Database.Database, embedding: Omit<Embedding, 'created_at' | 'vector'>, updateMetadataCounts: () => void): string;
/**
 * Insert multiple embeddings in a batch transaction
 *
 * @param db - Database connection
 * @param embeddings - Array of embedding data
 * @param updateMetadataCounts - Callback to update metadata counts
 * @param transaction - Transaction wrapper function
 * @returns string[] - Array of embedding IDs
 */
export declare function insertEmbeddings(db: Database.Database, embeddings: Omit<Embedding, 'created_at' | 'vector'>[], updateMetadataCounts: () => void, transaction: <T>(fn: () => T) => T): string[];
/**
 * Get an embedding by ID (without vector)
 *
 * @param db - Database connection
 * @param id - Embedding ID
 * @returns Omit<Embedding, 'vector'> | null - The embedding or null if not found
 */
export declare function getEmbedding(db: Database.Database, id: string): Omit<Embedding, 'vector'> | null;
/**
 * Get embedding by chunk ID (without vector)
 *
 * @param db - Database connection
 * @param chunkId - Chunk ID
 * @returns Omit<Embedding, 'vector'> | null - The embedding or null if not found
 */
export declare function getEmbeddingByChunkId(db: Database.Database, chunkId: string): Omit<Embedding, 'vector'> | null;
/**
 * Get embedding by extraction ID (without vector)
 *
 * @param db - Database connection
 * @param extractionId - Extraction ID
 * @returns Omit<Embedding, 'vector'> | null
 */
export declare function getEmbeddingByExtractionId(db: Database.Database, extractionId: string): Omit<Embedding, 'vector'> | null;
/**
 * Get all embeddings for a document (without vectors)
 *
 * @param db - Database connection
 * @param documentId - Document ID
 * @returns Omit<Embedding, 'vector'>[] - Array of embeddings
 */
export declare function getEmbeddingsByDocumentId(db: Database.Database, documentId: string, options?: {
    limit?: number;
    offset?: number;
}): Omit<Embedding, 'vector'>[];
/**
 * Filter options for getEmbeddingsFiltered
 */
export interface EmbeddingFilterOptions {
    document_id?: string;
    source_type?: 'chunk' | 'image' | 'extraction';
    model_name?: string;
    limit?: number;
    offset?: number;
}
/**
 * Get embeddings with dynamic filtering by document, source type, model.
 * Does NOT select the vector column (it's huge binary data in vec_embeddings).
 *
 * @param db - Database connection
 * @param filters - Filter options
 * @returns Array of embeddings (without vector) and total count
 */
export declare function getEmbeddingsFiltered(db: Database.Database, filters: EmbeddingFilterOptions): {
    embeddings: Array<Omit<Embedding, 'vector'>>;
    total: number;
};
/**
 * Embedding statistics result
 */
export interface EmbeddingStatsResult {
    total_embeddings: number;
    by_source_type: Record<string, {
        count: number;
        avg_duration_ms: number;
    }>;
    by_device: Record<string, number>;
    unembedded_chunks: number;
    unembedded_images: number;
}
/**
 * Get embedding statistics with optional document-level scoping.
 *
 * @param db - Database connection
 * @param documentId - Optional document ID to scope stats
 * @returns EmbeddingStatsResult
 */
export declare function getEmbeddingStats(db: Database.Database, documentId?: string): EmbeddingStatsResult;
/**
 * Delete all embeddings for a specific chunk
 *
 * @param db - Database connection
 * @param chunkId - Chunk ID
 * @returns number of embeddings deleted
 */
export declare function deleteEmbeddingsByChunkId(db: Database.Database, chunkId: string): number;
/**
 * Delete all embeddings for a specific image
 *
 * @param db - Database connection
 * @param imageId - Image ID
 * @returns number of embeddings deleted
 */
export declare function deleteEmbeddingsByImageId(db: Database.Database, imageId: string): number;
/**
 * Delete all embeddings for a document
 *
 * @param db - Database connection
 * @param documentId - Document ID
 * @returns number of embeddings deleted
 */
export declare function deleteEmbeddingsByDocumentId(db: Database.Database, documentId: string): number;
//# sourceMappingURL=embedding-operations.d.ts.map