import { type ValidationError } from "@todu/core"; export type ScheduleValidationCode = "invalid-rrule" | "unsupported-rrule"; export interface NormalizedScheduleRule { rule: string; parts: Readonly>; changed: boolean; } export interface ScheduleValidationIssue { code: ScheduleValidationCode; field: "schedule"; message: string; cause?: ValidationError; } export type NormalizeScheduleRuleResult = { ok: true; value: NormalizedScheduleRule; } | { ok: false; error: ScheduleValidationIssue; }; declare const validateAndNormalizeScheduleRule: (rule: string) => NormalizeScheduleRuleResult; declare const parseScheduleRuleParts: (rule: string) => { ok: true; value: { entries: Array<[string, string]>; }; } | { ok: false; error: ScheduleValidationIssue; }; declare const normalizeSchedulePartValue: (key: string, value: string) => string; declare const formatNormalizedRule: (entries: ReadonlyArray) => string; declare const mapScheduleValidationError: (error: ValidationError) => ScheduleValidationIssue; declare const createScheduleValidationIssue: (code: ScheduleValidationCode, message: string, cause?: ValidationError) => ScheduleValidationIssue; export { createScheduleValidationIssue, formatNormalizedRule, mapScheduleValidationError, normalizeSchedulePartValue, parseScheduleRuleParts, validateAndNormalizeScheduleRule, };