My App
CourseKitType Reference

Scheduling Types

Types for materialized occurrences, date ranges, queries, and free slots

MaterializedOccurrence

The result of expanding a recurring event for a date range. Not stored — computed at query time by RecurrenceService.materialize().

interface MaterializedOccurrence {
    eventId: string;
    occurrenceDate: Date;
    startTime: Date;
    durationMin: number;
    roomId: string | null;
    metadata: Record<string, unknown> | null;
    isException: boolean;
    exceptionType: 'cancelled' | 'modified' | 'added' | null;
    originalEvent: TimetableEvent;
}
FieldDescription
eventIdID of the parent TimetableEvent
occurrenceDateThe date this occurrence was generated for
startTimeActual start time (may differ from occurrenceDate if modified)
durationMinDuration in minutes (may be overridden by exception)
roomIdRoom ID (may be overridden by exception)
isExceptiontrue if this occurrence was modified or added
exceptionTypeThe type of exception applied, or null for normal occurrences
originalEventReference to the parent event

DateRange

interface DateRange {
    start: Date;
    end: Date;
}

ScheduleQuery

Query parameters for fetching events. All filter fields are optional.

interface ScheduleQuery {
    dateRange: DateRange;
    instructorIds?: string[];
    roomIds?: string[];
    groupIds?: string[];
    courseIds?: string[];
    periodId?: string;
    tags?: Record<string, unknown>;
}

FreeSlotQuery

Query for finding time slots where all specified entities are free.

interface FreeSlotQuery {
    dateRange: DateRange;
    durationMin: number;
    entityIds: Array<{ type: 'instructor' | 'room' | 'group'; id: string }>;
}

FreeSlot

A gap between occupied intervals.

interface FreeSlot {
    start: Date;
    end: Date;
    durationMin: number;
}

Availability Helper Types

type AvailabilityEntityType = 'instructor' | 'room';
type AvailabilityType = 'available' | 'blocked' | 'preferred';
type AvailabilityHardness = 'hard' | 'soft';

On this page