import { Observable } from 'rxjs'; import * as i0 from "@angular/core"; export type LiveReadFetch = () => Observable | Promise; export type LiveReadWatch = () => Observable; export interface LiveReadFallbackOptions { /** * One-time source of truth. Usually an HTTP API read. */ fetch: LiveReadFetch; /** * Realtime source. Usually Firestore watch(). If it errors, polling takes over. */ watch?: LiveReadWatch; /** * Polling interval used when realtime is unavailable or fails. */ pollIntervalMs?: number; /** * Called when the realtime stream fails and the helper switches to polling. */ onRealtimeError?: (error: unknown) => void; /** * Called on individual polling failures. Polling keeps running. */ onPollingError?: (error: unknown) => void; /** * Called when the initial fetch fails. Realtime/polling still starts. */ onInitialFetchError?: (error: unknown) => void; /** * Keep polling even when realtime is active. Useful when the mirror is * best-effort and the API must periodically correct stale data. */ pollWhileWatching?: boolean; } /** * Combines a truth-source fetch with an optional realtime stream and polling * fallback. Use it for public mirrors where Firestore improves UX, but the API * remains the authoritative path. */ export declare class LiveReadFallbackService { watch(options: LiveReadFallbackOptions): Observable; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }