import type { ScheduleFilter, ScheduleOverlapPolicy, ScheduleRevisionPolicy, ScheduleSpec, ScheduleState, ScheduleStatus } from '../../types.ts'; export { normalizeScheduleOptions, normalizeScheduleUpdateOptions, SCHEDULE_OVERLAP_POLICIES, SCHEDULE_REVISION_POLICIES, } from './schedule-options.ts'; export { rejectInvalidScheduleRecord } from './schedule-warnings.ts'; export declare const SCHEDULE_STATUSES: Set; export declare function isValidScheduleTimestamp(value: unknown): value is number; export declare function isValidScheduleStatus(value: unknown): value is ScheduleStatus; export declare function isValidScheduleOverlapPolicy(value: unknown): value is ScheduleOverlapPolicy; export declare function isValidScheduleRevisionPolicy(value: unknown): value is ScheduleRevisionPolicy; /** * Whether `value` is a schedule-related workflow id that decoded persisted * data may still carry. Deliberately reuses the pre-WFT-95 decode predicate * (not the fresh-admission `.`/`..` rejection), because every caller of this * function — `decodeScheduleIdentityFields`, `decodeScheduleRunMetadata`, * and the persisted `currentWorkflowId`/`queuedRuns[].workflowId` fields in * this module — reads already-persisted data. A schedule created before * WFT-95 with `id: '.'` or `'..'` must remain decodable and keep firing * after upgrade. */ export declare function isValidScheduleIdentifier(value: unknown): value is string; /** * Coerce a caller-supplied `scheduleId` used to look up or control an * already-persisted schedule — `getSchedule`, `pauseSchedule`, * `resumeSchedule`, `cancelSchedule`, and `updateSchedule` all call this, * never schedule creation (that admission path is * `normalizeScheduleOptions`'s direct `coerceStartWorkflowId(options.id, …)` * call, which keeps the strict `.`/`..` rejection). Deliberately uses the * decode-compatible `assertDecodableWorkflowId`, not the admission-only * `.`/`..` rejection (WFT-95 review): a schedule created before that * rejection landed may already carry `id: '.'` or `'..'`, and callers must * still be able to inspect, pause, resume, cancel, or update it instead of * having every control operation reject a schedule they can't otherwise * reach. */ export declare function coerceScheduleId(scheduleId: unknown, fieldName: string): string; /** * A recurrence specification normalized into the discriminated cadence the * engine persists. Interval periods are resolved to whole milliseconds. */ export type NormalizedScheduleSpec = { kind: 'cron'; cronExpression: string; } | { kind: 'interval'; intervalMs: number; }; /** * Normalize a schedule recurrence specification into the persisted cadence. A * bare string is treated as a cron expression (preserving the original * cron-only API). An object must supply exactly one of `cron` or `every`. */ export declare function normalizeScheduleSpec(spec: string | ScheduleSpec): NormalizedScheduleSpec; export declare function normalizeScheduleFilter(filter: ScheduleFilter | undefined): ScheduleFilter | undefined; export declare function decodeScheduleIdentityFields(decoded: Record): (Pick & { cronExpression?: string; intervalMs?: number; }) | null; type ScheduleRuntimeFields = Pick; export declare function decodeScheduleRuntimeFields(decoded: Record, scheduleId: string): ScheduleRuntimeFields | null; export declare function decodeScheduleState(bytes: Uint8Array): ScheduleState | null;