export type ConnectorLearningMode = 'bootstrap' | 'incremental'; export type ConnectorLearningStatus = 'queued' | 'running' | 'completed' | 'failed' | 'paused'; export type ConnectorLearningPhase = 'queued' | 'fetching' | 'indexing' | 'deriving' | 'completed'; export type ConnectorLearningJob = { id: string; idempotencyKey: string; connectorId: string; accountId: string; connectionId: string; sourceInstanceId: string; agentId: string; mode: ConnectorLearningMode; status: ConnectorLearningStatus; phase: ConnectorLearningPhase; itemsDiscovered: number; itemsIndexed: number; candidatesCreated: number; attemptCount: number; error?: string; nextRunAt?: string; startedAt?: string; finishedAt?: string; createdAt: string; updatedAt: string; }; export declare function enqueueConnectorLearningJob(input: { connectorId: string; accountId: string; connectionId: string; sourceInstanceId: string; agentId: string; mode: ConnectorLearningMode; idempotencyKey: string; nextRunAt?: number; nowMs?: number; }): ConnectorLearningJob; export declare function claimNextConnectorLearningJob(nowMs?: number): ConnectorLearningJob | null; export declare function recoverStaleConnectorLearningJobs(staleBeforeMs: number, nowMs?: number): number; export declare function setConnectorLearningPaused(accountId: string, paused: boolean, nowMs?: number): number; export declare function updateConnectorLearningJob(id: string, patch: Partial> & { nextRunAt?: number | null; finished?: boolean; nowMs?: number; }): ConnectorLearningJob; export declare function listConnectorLearningJobs(options?: { sourceInstanceId?: string; accountId?: string; connectionId?: string; limit?: number; }): ConnectorLearningJob[];