import type { ScheduleState } from '../types.ts'; /** * The recurrence cadence of a schedule, decoded from persisted state into a * single discriminated value so occurrence computation never has to inspect * both `cronExpression` and `intervalMs` at every call site. */ export type ScheduleCadence = { kind: 'cron'; cronExpression: string; } | { kind: 'interval'; intervalMs: number; anchor: number; }; type CadenceSource = Pick; /** * Resolve the cadence of a schedule from its persisted state. Interval schedules * are anchored at `createdAt`. Throws if the state carries neither a cron * expression nor an interval, which should never happen for a record that passed * decode validation. */ export declare function resolveScheduleCadence(state: CadenceSource): ScheduleCadence; /** * Compute the next occurrence strictly after `afterTimestamp` for a schedule, * dispatching on cadence kind. Cron schedules defer to the cron engine; interval * schedules step forward one period anchored at creation time. */ export declare function getNextScheduleOccurrence(state: CadenceSource, afterTimestamp: number): number; /** * Collect every occurrence in the inclusive window `[firstDueAt, throughTimestamp]` * for a schedule, dispatching on cadence kind. `maxOccurrences` bounds the result * so a long backfill window cannot produce an unbounded list. */ export declare function collectDueScheduleOccurrences(state: CadenceSource, firstDueAt: number, throughTimestamp: number, maxOccurrences: number): number[]; export {};