import { type JobsOptions } from 'bullmq'; import type { RAGSyncJob, RAGSyncResult, QueueStats, EnqueueOptions } from './types'; /** * Redis connection configuration */ export interface RedisConfig { host?: string; port?: number; password?: string; db?: number; } /** * RAGQueue configuration options */ export interface RAGQueueConfig { /** Name of the queue (default: 'rag-sync') */ queueName?: string; /** Redis connection configuration */ redis: RedisConfig; /** Default job options */ defaultJobOptions?: Partial; } /** * Queue for managing RAG sync jobs with BullMQ and Redis */ export declare class RAGQueue { private queue; private queueEvents; private redisConnection; private eventsConnection; /** * Create a new RAGQueue instance */ constructor(config: RAGQueueConfig); /** * Add a job to the queue * @param job The RAG sync job data * @param options Optional job options (priority, delay, attempts) * @returns Job ID */ enqueue(job: RAGSyncJob, options?: EnqueueOptions): Promise; /** * Get queue statistics * @returns Current queue statistics */ getStats(): Promise; /** * Register a callback for when jobs complete successfully * @param callback Function to call when a job completes */ onCompleted(callback: (jobId: string, result: RAGSyncResult) => void | Promise): void; /** * Register a callback for when jobs fail * @param callback Function to call when a job fails */ onFailed(callback: (jobId: string, error: Error) => void | Promise): void; /** * Close the queue and all connections gracefully */ close(): Promise; } //# sourceMappingURL=rag-queue.d.ts.map