/** * @returns getNextTimePoint function that makes a date from a given {@link Delay} * - note that Delay must not be negative */ export declare function delayFactory(schedule: Schedule): (delay: Delay) => Date; /** * Query over an object that follows {@link Schedule} interface */ export declare class ScheduleQuery { private schedule; constructor(schedule: Schedule); /** * Find next closest date after specified delay within the schedule */ nextValidDate(delay: Delay): Date; /** * Finds next closest date that follows a specified date within the schedule */ nextValidDate(date: Date): Date; /** Returns next date the schedule starting from _now_ */ next(): Date; /** * Checks if a specified date is within the schedule, * if no date provided, checks if _now_ is within the schedule */ isValid(date: Date): boolean; } export declare function createScheduleQuery(schedule: Schedule): ScheduleQuery; type Delay = [number, 'minutes' | 'hours' | 'days'] | [number, 'hours', number, 'minutes'] | [number, 'days', number, 'hours'] | [number, 'days', number, 'hours', number, 'minutes']; type singleInt = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9; type hours = `${0 | 1}${singleInt}` | '20' | '21' | '22' | '23'; type Time = `${hours}:${0 | 1 | 2 | 3 | 4 | 5}${singleInt}`; type WeekDays = 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday'; type Year = 2024 | 2025 | 2026 | 2027 | 2028 | 2029 | 2030; type Month = '01' | '02' | '03' | '04' | '05' | '06' | '07' | '08' | '09' | '10' | '11' | '12'; type DateFmt = `${Year}-${Month}-${0 | 1 | 2 | 3}${singleInt}`; interface TimeRange { days: WeekDays[]; from: Time; to: Time; } export interface Schedule { timeZone: string; workingHours?: TimeRange[]; holidays?: DateFmt[]; } export {}; //# sourceMappingURL=schedule.d.ts.map