import type { SyncRepository } from '../db/repositories/sync-repository.js'; import type { UsageRepository } from '../db/repositories/usage-repository.js'; import type { ClientId, StoreInfo, UsageCollector } from '../models/usage-record.js'; export interface SyncOptions { since?: Date; until?: Date; /** Read every detected store, not only the one the client itself uses. */ allStores?: boolean; /** Restrict to specific clients. */ clients?: ClientId[]; /** Ignore saved cursors and re-read everything. */ full?: boolean; } export interface CollectorSyncResult { collector: string; client: ClientId; available: boolean; reason?: string; recordsWritten: number; notes: string[]; stores: StoreInfo[]; durationMs: number; } export interface SyncReport { results: CollectorSyncResult[]; totalRecords: number; startedAt: string; durationMs: number; /** Stored rows that were unpriced and have now been priced. Absent when there were none. */ repriced?: { models: string[]; records: number; }; } export declare class SyncService { private readonly usageRepo; private readonly syncRepo; private readonly collectors; constructor(usageRepo: UsageRepository, syncRepo: SyncRepository, collectors: UsageCollector[]); sync(options?: SyncOptions): Promise; }