import { DuckDBInstance } from '@duckdb/node-api'; export type DuckdbInstance = Awaited>; export type EvictionReason = 'idle_ttl' | 'max_age' | 'lru' | 'stale' | 'auth' | 'failures' | 'credentials_updated' | 'shutdown'; export type MotherduckCacheEvent = { type: 'acquire'; result: 'hit' | 'miss'; entryId: string; projectUuid?: string; waitMs: number; instanceCreateMs: number; connectMs: number; } | { type: 'evict'; entryId: string; projectUuid?: string; reason: EvictionReason; ageMs: number; } | { type: 'retry'; entryId: string; outcome: 'recovered' | 'failed'; } | { type: 'size'; entries: number; }; type CacheOptions = { idleTtlMs: number; maxAgeMs: number; maxEntries: number; maxConsecutiveFailures?: number; }; export type MotherduckCacheAcquisitionTiming = { waitMs: number; instanceCreateMs: number; connectMs: number; }; export declare const configure: (nextOptions: CacheOptions) => void; export declare const setObserver: (nextObserver: (event: MotherduckCacheEvent) => void) => void; export declare const withInstance: (connectionString: string, ctx: { projectUuid?: string; }, fn: (instance: DuckdbInstance, entryId: string, timing: MotherduckCacheAcquisitionTiming) => Promise) => Promise; export declare const invalidate: (entryId: string, reason: EvictionReason) => Promise; export declare const invalidateByConnectionString: (connectionString: string, reason: EvictionReason) => void; export declare const closeAll: (reason: EvictionReason) => Promise; export declare const recordRetry: (entryId: string, outcome: 'recovered' | 'failed') => void; export declare const resetForTesting: () => void; export declare const MotherduckInstanceCache: { configure: typeof configure; setObserver: typeof setObserver; withInstance: typeof withInstance; invalidate: typeof invalidate; invalidateByConnectionString: typeof invalidateByConnectionString; recordRetry: typeof recordRetry; closeAll: typeof closeAll; resetForTesting: typeof resetForTesting; }; export {}; //# sourceMappingURL=MotherduckInstanceCache.d.ts.map