My App
RoomKitType Reference

Result Types

Domain result types returned by RoomKit services

AvailabilityResult

Returned by AvailabilityService.search().

interface AvailabilityResult {
    items: AvailabilityResultItem[];
    nextCursor?: string;
    totalMatching: number;
}

interface AvailabilityResultItem {
    room: Room & { equipment: RoomEquipment[]; accessibility: RoomAccessibility[] };
    score: number;
    availableSlots?: TimeSlot[];
}
FieldTypeDescription
itemsAvailabilityResultItem[]Scored rooms matching the search
nextCursorstring?Cursor for the next page
totalMatchingnumberTotal number of matching rooms
roomRoom & { equipment, accessibility }Room with equipment and accessibility
scorenumberMatch score (higher is better)
availableSlotsTimeSlot[]?Open time slots within the search window

ConflictCheckResult

Returned by ConflictService.checkConflicts().

interface ConflictCheckResult {
    hasConflict: boolean;
    directConflicts: Booking[];
    partitionConflicts: { roomId: string; booking: Booking }[];
}
FieldTypeDescription
hasConflictbooleantrue if any conflicts were found
directConflictsBooking[]Overlapping bookings in the same room
partitionConflicts{ roomId, booking }[]Overlapping bookings in partition-related rooms

AlternativeSuggestion

Returned by ConflictService.suggestAlternatives().

interface AlternativeSuggestion {
    type: "same_room_different_time" | "different_room_same_time";
    room: Room | null;
    startsAt: Date;
    endsAt: Date;
    score: number;
}
FieldTypeDescription
typestringEither same room at a different time, or different room at the same time
roomRoom | nullThe alternative room (null for same-room suggestions)
startsAtDateSuggested start time
endsAtDateSuggested end time
scorenumberRelevance score (1.0 = same room, 0.5-0.9 = different room)

ConflictResolution

Returned by ConflictService.resolveByPriority().

interface ConflictResolution {
    winner: "existing" | "new";
    action: "reject_new" | "displace_existing";
    alternatives: AlternativeSuggestion[];
}

TravelTimeValidationResult

Returned by TravelTimeService.validatePersonSchedule().

interface TravelTimeValidationResult {
    valid: boolean;
    violations: TravelTimeViolation[];
}

interface TravelTimeViolation {
    fromCampus: string;
    toCampus: string;
    requiredMinutes: number;
    availableMinutes: number;
    conflictingBookingId: string;
}
FieldTypeDescription
validbooleantrue if no travel time violations
violationsTravelTimeViolation[]Details of each violation
fromCampusstringCampus display name of the preceding booking
toCampusstringCampus display name of the next booking
requiredMinutesnumberMinimum travel time from matrix
availableMinutesnumberActual gap between bookings
conflictingBookingIdstringID of the conflicting existing booking

TimeSlot

A time range used in availability results and scheduling.

interface TimeSlot {
    startsAt: Date;
    endsAt: Date;
}

SemesterImportPayload

Input for BulkOperationService.semesterImport().

interface SemesterImportPayload {
    entries: {
        roomId: string;
        startsAt: Date;
        endsAt: Date;
        requesterId: string;
        purposeType: string;
        title: string;
        recurrence?: Omit<RecurrenceRule, 'id' | 'createdAt' | 'updatedAt'>;
    }[];
}

Pagination

Cursor-based pagination parameters.

interface Pagination {
    cursor?: string;
    limit: number;
}

interface PaginatedResult<T> {
    items: T[];
    nextCursor?: string;
}

ApiResponse

Standard API response wrapper.

type ApiResponse<T> = {
    data: T;
    error?: string;
};

On this page