import { Period } from "./Period.js"; /** * Utility class for managing periods. * WebUntis returns lessons matching the school's timegrid, * if you want to get the weekly lesson schedules instead of every occurance or combine lessons into double lessons, you can use this class. */ export declare class Timetable implements Iterable { private periods; constructor(periods: Period[]); /** * Creates a new Timetale from an array of periods. Equal to {@link Timetable.constructor()}. * @param periods periods in the timetable * @returns a new timetable */ static from(periods: Period[]): Timetable; [Symbol.iterator](): { next: () => { value: Period; done: boolean; }; }; /** * Returns all periods in the timetable. * @returns the periods, sorted by their date and start time */ getPeriods: () => Period[]; /** * Amount of periods in the timetable. */ get size(): number; /** * Filters the periods by whether they meet the condition in the callback function. * @param callbackfn function that filters the periods * @returns a new timetable containing only the periods that matched met the condition */ filterPeriods: (callbackfn: (period: Period, index: number, array: Period[]) => boolean) => Timetable; /** * Applies a function to every period. * @param callbackfn function that is applied to every period * @returns an array containing the results */ mapPeriods: (callbackfn: (period: Period, index: number, array: Period[]) => T) => T[]; /** * Applies a function to every period. * @param callbackfn function that is applied to every period */ forEach: (callbackfn: (period: Period, index: number, array: Period[]) => void) => void; /** * Combines sequential periods into longer periods. * Periods are sequential if {@link Period.canBeCombinedWith()} is true * @returns a new timetable */ combinePeriods: () => Timetable; /** * Groups all periods into their schedule. * Schedules are determined by a period's lessonNumber, weekday, start-, and enddate * @returns a 2-dimensional array of periods. All periods in an array belong to the same schedule */ groupBySchedule: () => Period[][]; }