/** * @license * SPDX-License-Identifier: Apache-2.0 */ // Known presets plus any custom class the user defines. // The `(string & {})` keeps literal autocomplete while allowing arbitrary values. export type DeviceType = 'Switch' | 'Access-Point' | 'Firewall' | 'Controller' | (string & {}); export interface Device { id: string; hostname: string; ip: string; location: string; notes: string; type: DeviceType; status: 'online' | 'offline' | 'unknown'; emergencySheet: string; // Markdown text cmkHostname?: string; lastCheckedAt?: string; } export interface TopologyLink { fromDevice: string; toDevice: string; type: string; // e.g. "LACP-Trunk", "Uplink", "OOB-Management", "VLAN-Core" } export interface LabTemplate { id: string; name: string; description: string; contactPerson: string; location: string; deviceIds: string[]; topology: TopologyLink[]; semaphoreSetupTemplateId?: string; semaphoreTeardownTemplateId?: string; } export interface Booking { id: string; labId: string; userId: string; startDateTime: string; endDateTime: string; notes: string; status: 'active' | 'upcoming' | 'completed' | 'cancelled'; notified: boolean; emailSent?: boolean; ansibleSetupTriggered?: boolean; ansibleTeardownTriggered?: boolean; ansibleSetupJobId?: string; ansibleTeardownJobId?: string; } export interface LogEntry { id: string; timestamp: string; type: 'maintenance' | 'booking' | 'status' | 'system'; message: string; deviceId?: string; userId?: string; } export interface User { id: string; name: string; role: string; email: string; } export interface QuickLink { id: string; title: string; url: string; description: string; category: string; color: string; // accent key, e.g. 'emerald' | 'cyan' | 'amber' | ... createdBy?: string; createdAt: string; }