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;
}| Field | Description |
|---|---|
eventId | ID of the parent TimetableEvent |
occurrenceDate | The date this occurrence was generated for |
startTime | Actual start time (may differ from occurrenceDate if modified) |
durationMin | Duration in minutes (may be overridden by exception) |
roomId | Room ID (may be overridden by exception) |
isException | true if this occurrence was modified or added |
exceptionType | The type of exception applied, or null for normal occurrences |
originalEvent | Reference 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';