My App
RoomKitType Reference

Entity Types

Core entity interfaces used across the RoomKit library

LocationNode

Represents a node in the location hierarchy tree.

interface LocationNode {
    id: string;
    parentId: string | null;
    type: LocationNodeType;
    displayName: string;
    path: string;
    aliases: string[];
    isActive: boolean;
    metadata: string | null;
    createdAt: Date;
    updatedAt: Date;
}
FieldTypeDescription
idstringUnique identifier
parentIdstring | nullParent node ID (null for root nodes)
typeLocationNodeTypeNode type in the hierarchy
displayNamestringHuman-readable name
pathstringUnique slug path (e.g., "hfu/campus-a/building-1")
aliasesstring[]Alternative names for alias resolution
isActivebooleanWhether the node is active
metadatastring | nullArbitrary JSON metadata

Room

Represents a bookable room linked to a location node.

interface Room {
    id: string;
    locationNodeId: string;
    seatedCapacity: number;
    examCapacity: number;
    standingCapacity: number;
    setupBufferMinutes: number;
    teardownBufferMinutes: number;
    isActive: boolean;
    metadata: string | null;
    createdAt: Date;
    updatedAt: Date;
}
FieldTypeDescription
locationNodeIdstringThe location node this room belongs to
seatedCapacitynumberStandard seated capacity
examCapacitynumberCapacity for exam layout (every-other-seat)
standingCapacitynumberStanding-room capacity
setupBufferMinutesnumberBuffer time before bookings
teardownBufferMinutesnumberBuffer time after bookings

RoomEquipment

interface RoomEquipment {
    id: string;
    roomId: string;
    tag: string;  // e.g., "projector", "whiteboard", "microphone"
}

RoomAccessibility

interface RoomAccessibility {
    id: string;
    roomId: string;
    attribute: string;  // e.g., "wheelchair", "hearing_loop"
}

RoomPartition

Represents a parent/child relationship between rooms (divisible spaces).

interface RoomPartition {
    id: string;
    parentRoomId: string;
    childRoomId: string;
}

OperatingHours

interface OperatingHours {
    id: string;
    locationNodeId: string;
    dayOfWeek: number;  // 0 = Sunday, 1 = Monday, ..., 6 = Saturday
    opensAt: string;    // "HH:MM" format
    closesAt: string;   // "HH:MM" format
}

Booking

Represents a room booking with lifecycle state management.

interface Booking {
    id: string;
    roomId: string;
    requesterId: string;
    onBehalfOfId: string | null;
    title: string;
    description: string | null;
    startsAt: Date;
    endsAt: Date;
    status: BookingStatus;
    priority: number;
    purposeType: string;
    version: number;
    idempotencyKey: string | null;
    recurrenceRuleId: string | null;
    recurrenceModType: RecurrenceModType | null;
    metadata: string | null;
    createdAt: Date;
    updatedAt: Date;
}
FieldTypeDescription
requesterIdstringWho requested the booking
onBehalfOfIdstring | nullDelegate — the actual user
statusBookingStatusCurrent lifecycle state
prioritynumberPriority weight (higher = more important)
purposeTypestringPurpose type (e.g., "LECTURE", "SEMINAR")
versionnumberOptimistic concurrency version
idempotencyKeystring | nullDeduplication key
recurrenceRuleIdstring | nullLinked recurrence series
recurrenceModTypeRecurrenceModType | nulloriginal, modified, or detached

BookingStateTransition

Audit record of a booking status change.

interface BookingStateTransition {
    id: string;
    bookingId: string;
    fromStatus: BookingStatus | null;
    toStatus: BookingStatus;
    triggeredBy: string;
    reason: string | null;
    timestamp: Date;
}

RecurrenceRule

Defines a recurrence pattern for recurring bookings.

interface RecurrenceRule {
    id: string;
    frequency: RecurrenceFrequency;
    daysOfWeek: number[];
    calendarWeeks: number[] | null;
    seriesStartsAt: Date;
    seriesEndsAt: Date;
    exceptionDates: Date[];
    createdAt: Date;
    updatedAt: Date;
}
FieldTypeDescription
frequencyRecurrenceFrequencyweekly, biweekly, or custom
daysOfWeeknumber[]Days (0=Sunday, 1=Monday, ..., 6=Saturday)
calendarWeeksnumber[] | nullISO calendar week numbers (for custom frequency)
exceptionDatesDate[]Dates excluded from the series

BlackoutWindow

A time block where bookings are not allowed at a location scope.

interface BlackoutWindow {
    id: string;
    locationNodeId: string;
    scope: BlackoutScope;
    title: string;
    reason: string | null;
    startsAt: Date;
    endsAt: Date;
    isRecurring: boolean;
    recurrenceRuleId: string | null;
    createdAt: Date;
}

ConflictRecord

Records a conflict between two bookings and its resolution.

interface ConflictRecord {
    id: string;
    bookingAId: string;
    bookingBId: string;
    resolutionType: ConflictResolutionType;
    resolvedBy: string | null;
    resolvedAt: Date | null;
    createdAt: Date;
}

ConfigEntry

A configuration key-value pair scoped to a location node.

interface ConfigEntry {
    id: string;
    locationNodeId: string | null;
    key: string;
    value: string;
    inheritFromParent: boolean;
    createdAt: Date;
    updatedAt: Date;
}

PriorityTier

interface PriorityTier {
    id: string;
    name: string;
    weight: number;
    createdAt: Date;
}

ExamSession

interface ExamSession {
    id: string;
    bookingId: string;
    cohortId: string;
    layoutType: ExamLayoutType;
    requiredCapacity: number;
    supervisorIds: string[];
    metadata: string | null;
    createdAt: Date;
}

BulkOperation

interface BulkOperation {
    id: string;
    type: BulkOperationType;
    status: BulkOperationStatus;
    totalItems: number;
    processedItems: number;
    conflictsDetected: number;
    resultSummary: string | null;
    triggeredBy: string;
    createdAt: Date;
    completedAt: Date | null;
}

EventMetadata

Included with all events emitted by the EventBus.

interface EventMetadata {
    triggeredBy: string;
    correlationId?: string;
    timestamp: Date;
}

On this page