/** * Owns model-facing schedule intent and materializes it against the trusted * server clock into the canonical schedule persisted by the scheduler. */ import { z } from "zod"; import type { ScheduledTaskSchedule } from "./types"; export declare const scheduleIntentSchema: z.ZodUnion; timezone: z.ZodOptional>; timing: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"after">; value: z.ZodNumber; unit: z.ZodEnum<{ day: "day"; hour: "hour"; minute: "minute"; second: "second"; week: "week"; }>; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"at">; date: z.ZodString; time: z.ZodString; }, z.core.$strict>], "type">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"recurring">; frequency: z.ZodEnum<{ daily: "daily"; weekly: "weekly"; monthly: "monthly"; yearly: "yearly"; }>; interval: z.ZodOptional>; time: z.ZodString; weekdays: z.ZodOptional>>>; day_of_month: z.ZodOptional>; month: z.ZodOptional>; start_date: z.ZodOptional>; timezone: z.ZodOptional>; }, z.core.$strict>]>; export type ScheduleIntent = z.infer; export interface CompiledScheduleIntent { nextRunAtMs: number; schedule: ScheduledTaskSchedule; } export declare class ScheduleIntentError extends Error { } /** Materialize model-interpreted schedule intent against the trusted server clock. */ export declare function compileScheduleIntent(args: { defaultTimezone: string; intent: ScheduleIntent; nowMs: number; }): CompiledScheduleIntent;