/** * SessionUtils * A utility class that helps with session-related operations */ export default class SessionUtils { /** * Calculates the sliding window indices for moving averages, standard deviations, etc., * based on the session start times (`sessionStartedAt` timestamps). * * Each session is identified by its `sessionStartedAt` timestamp. This function determines * the indices for the sliding windows that are used in subsequent calculations. Sessions * with identical `sessionStartedAt` timestamps will be assigned the same indices. * It assumes that the `sessionStartedAt` timestamps are sorted and non-overlapping, as * each session ends before a new one starts, and once a sessions stops it cannot be resumed. */ static calculateWindowIndicesForSessions(sessionCreatedAts: string[]): number[][]; /** * Calculates the session titles for the given indices. * * Each session is identified by its `sessionStartedAt` timestamp. This function determines * the session titles for the sessions that correspond to the given indices. * It takes the first index in each array of indices and uses it to pull the session title. * Ends up with an array of session titles that correspond to the given indices. */ static calculateSessionTitlesGivenIndices(sessionTitles: string[], indices: number[][]): string[]; /** * Calculates the session start times for the given indices. * Same as above description but for sessionCreatedAts */ static calculatesessionCreatedAtsGivenIndices(sessionCreatedAts: string[], indices: number[][]): string[]; }