CourseKitType Reference
Entity Types
Core entity types — TimetableEvent, Instructor, Room, Group, Course, and more
TimetableEvent
The core scheduled event or recurring series.
interface TimetableEvent {
id: string;
title: string;
startTime: Date;
durationMin: number;
recurrenceRule: string | null; // RFC 5545 RRULE string
metadata: Record<string, unknown> | null;
courseId: string | null;
roomId: string | null;
periodId: string | null;
version: number; // for optimistic concurrency
createdAt: Date;
updatedAt: Date;
}EventException
An override for a single occurrence of a recurring event.
interface EventException {
id: string;
eventId: string;
originalDate: Date; // which occurrence this overrides
type: 'cancelled' | 'modified' | 'added';
newStartTime: Date | null;
newDurationMin: number | null;
newRoomId: string | null;
metadata: Record<string, unknown> | null;
}EventInstructor
Join record linking an event to an instructor.
interface EventInstructor {
id: string;
eventId: string;
instructorId: string;
role: string; // "primary" | "ta" | "co-lecturer"
}EventGroup
Join record linking an event to a student group.
interface EventGroup {
id: string;
eventId: string;
groupId: string;
}Instructor
interface Instructor {
id: string;
name: string;
email: string | null;
tags: Record<string, unknown> | null;
}Room
interface Room {
id: string;
name: string;
building: string | null;
campus: string | null;
capacity: number;
tags: Record<string, unknown> | null;
}Group
interface Group {
id: string;
name: string;
type: 'fixed' | 'enrollment';
maxCapacity: number | null;
}Student
interface Student {
id: string;
name: string;
email: string | null;
}StudentGroup
Join record linking a student to a group.
interface StudentGroup {
id: string;
studentId: string;
groupId: string;
}Course
Hierarchical course with optional parent-child relationships.
interface Course {
id: string;
name: string;
code: string | null;
parentId: string | null;
metadata: Record<string, unknown> | null;
}AcademicPeriod
Hierarchical time period for academic scheduling.
type PeriodType = 'semester' | 'holiday' | 'exam' | 'break';
interface AcademicPeriod {
id: string;
name: string;
type: PeriodType;
startDate: Date;
endDate: Date;
parentId: string | null;
}Availability
Availability rule for an instructor or room.
type AvailabilityEntityType = 'instructor' | 'room';
type AvailabilityType = 'available' | 'blocked' | 'preferred';
type AvailabilityHardness = 'hard' | 'soft';
interface Availability {
id: string;
entityType: AvailabilityEntityType;
entityId: string;
dayOfWeek: number | null; // 0=Mon, 6=Sun
specificDate: Date | null;
startTime: Date;
endTime: Date;
type: AvailabilityType;
hardness: AvailabilityHardness;
priority: number;
recurrenceRule: string | null;
}LocationDistance
Travel time between campuses.
interface LocationDistance {
id: string;
fromCampus: string;
toCampus: string;
travelMinutes: number;
}