export interface ScheduleEvent { name: string, id: string, crew?: boolean, host?: string, cancelled?: boolean, description?: string, interested?: number, slots: TimeSlot[], } export interface ScheduleLocation { name: string, id: string, description?: string, } export interface TimeSlot { id: string, start: string, end: string, locations: string[], interested?: number, } export interface Shift { name: string, id: string, role: string, description?: string, slots: ShiftSlot[], } export interface Role { name: string, id: string, description?: string, } export interface ShiftSlot { id: string, start: string, end: string, } export interface Schedule { locations: ScheduleLocation[], events: ScheduleEvent[], roles?: Role[], rota?: Shift[], } export type ChangeRecord = | { op: "set", data: T } | { op: "del", data: { id: string }} ; export interface SchedulePatch { locations?: ChangeRecord[], events?: ChangeRecord[], roles?: ChangeRecord[], rota?: ChangeRecord[], }