import { z } from "zod/v4"; export declare const MAX_ABSOLUTE_SCHEDULE_WINDOW_SECONDS: number; export type NormalizedScheduleWindow = { type: "duration"; durationSeconds: number; } | { type: "percentage"; percentage: number; }; type Digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"; type DigitsBelow = { "0": never; "1": "0"; "2": "0" | "1"; "3": "0" | "1" | "2"; "4": "0" | "1" | "2" | "3"; "5": "0" | "1" | "2" | "3" | "4"; "6": "0" | "1" | "2" | "3" | "4" | "5"; "7": "0" | "1" | "2" | "3" | "4" | "5" | "6"; "8": "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7"; "9": "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8"; }; type DigitLength = Value extends `${Digit}${infer Rest}` ? DigitLength : Result; type CompareEqualLength = A extends `${infer ADigit extends Digit}${infer ARest}` ? B extends `${infer BDigit extends Digit}${infer BRest}` ? ADigit extends BDigit ? CompareEqualLength : ADigit extends DigitsBelow[BDigit] ? "lt" : "gt" : "eq" : "eq"; type DecimalStringLTE = DigitLength extends DigitLength ? CompareEqualLength extends "gt" ? false : true : DigitLength extends [...DigitLength, ...0[]] ? true : false; type IsCanonicalUnsignedInteger = Value extends `${bigint}` ? Value extends `-${string}` ? false : true : false; /** The literal validation error for a configured schedule window, or `never` when valid. */ export type ScheduleWindowError = string extends Window ? never : Window extends `${infer Amount}m` ? IsCanonicalUnsignedInteger extends false ? "⛔ window must be a whole non-negative number" : DecimalStringLTE extends true ? never : "⛔ window duration cannot exceed 24 hours" : Window extends `${infer Amount}h` ? IsCanonicalUnsignedInteger extends false ? "⛔ window must be a whole non-negative number" : DecimalStringLTE extends true ? never : "⛔ window duration cannot exceed 24 hours" : Window extends `${infer Amount}%` ? IsCanonicalUnsignedInteger extends false ? "⛔ percentage must be a whole non-negative number" : DecimalStringLTE extends true ? never : "⛔ percentage cannot exceed 100%" : '⛔ window must look like "30m", "2h", or "50%"'; /** * Preserves valid schedule-window literals and replaces invalid literals with a descriptive type * error. Wide `string` values pass through for authoritative runtime validation. */ export type ValidatedScheduleWindow = Window extends string ? [ScheduleWindowError] extends [never] ? Window : ScheduleWindowError : Window; /** Parses and normalizes the public schedule-window syntax. */ export declare function parseScheduleWindow(value: string): NormalizedScheduleWindow; /** Runtime authority for public schedule-window values. */ export declare const ScheduleWindow: z.ZodString; export {};