import type { RemitClient } from "@remit/backend/client"; import { type CalendarFeedFetcher } from "@remit/calendar-service"; import type { ICalendarCollectionRepository, ICalendarStore } from "@remit/data-ports"; import type { Logger } from "@remit/logger"; import type { CalendarSubscriptionTally } from "./run-tick.js"; export interface CalendarSubscriptionRefreshDeps { calendarCollection: Pick; calendarStore: ICalendarStore; log: Logger; fetcher?: CalendarFeedFetcher; } /** * Re-reads every enabled subscription whose last fetch is at least * `intervalMs` old. A disabled subscription is never listed, which is what * stops its refresh while leaving its events in place. * * One feed's failure is recorded on its own collection and counted here; it * never stops the others. The log names the calendar and the reason, never the * URL, which for a Google secret address is the whole credential. */ export declare const refreshDueCalendarSubscriptions: (deps: CalendarSubscriptionRefreshDeps, now: number, intervalMs: number) => Promise; export declare const buildCalendarSubscriptionRefresh: (client: Pick, log: Logger) => ((now: number, intervalMs: number) => Promise);