import { UserSummary } from './platform'; export type NumberNotation = 'auto' | 'scientific' | 'engineering' | 'compact'; export interface UnitOption { value: string; label: string; factor?: number; group?: string; } export interface WizardStep { id: string; label: string; description?: string; icon?: string; optional?: boolean; } export type WizardStepState = 'pending' | 'active' | 'completed' | 'disabled'; export type AuditEntryType = 'create' | 'update' | 'delete' | 'system'; export interface AuditEntry { id: string; type: AuditEntryType; action: string; detail?: string; user?: string; timestamp: Date | string; metadata?: Record; } export type BatchItemStatus = 'pending' | 'processing' | 'completed' | 'error' | 'skipped'; export interface BatchItem { id: string; label: string; status: BatchItemStatus; progress?: number; message?: string; } export interface BatchSummary { total: number; completed: number; processing: number; error: number; pending: number; skipped: number; percent: number; } export type TimePickerFormat = '12h' | '24h'; /** * Marks a time slot ("HH:mm") unavailable. Return `false`/nothing for an * available slot, `true` to disable it, or a string to disable it and show * that string inline as the reason (e.g. "Booked · HPLC-02"). */ export type TimeSlotDisabledFn = (time: string) => boolean | string | null | undefined; export interface TimeRange { start: string; end: string; } export type ScheduleView = 'day' | 'week' | 'month'; export type ScheduleEventStatus = 'confirmed' | 'pending' | 'cancelled' | 'in-progress'; export interface ScheduleEvent { id: string; start: string; end: string; title: string; color?: string; status?: ScheduleEventStatus; draggable?: boolean; resizable?: boolean; metadata?: Record; } export interface ScheduleBlockedSlot { start: string; end: string; label?: string; } export interface ScheduleSlotContext { date: Date; hour: number; minute: number; } export interface ScheduleEventCreateContext { start: Date; end: Date; } export interface ScheduleEventUpdateContext { event: ScheduleEvent; newStart: Date; newEnd: Date; } export interface SummarySectionItem { label: string; metadata?: Record; item_count: number; item_key: string; columns: string[]; rows: Record[]; } export interface SummarySection { key: string; label: string; type: 'table' | 'group'; /** Group sections: list of group items with embedded tables */ items?: SummarySectionItem[]; /** Table sections: flat table columns and rows */ columns?: string[]; rows?: Record[]; row_count?: number; } export interface SummaryData { metadata: Record; sections: SummarySection[]; } export type ResourceStatus = 'available' | 'in-use' | 'maintenance' | 'offline'; export interface ResourceSpec { label: string; value: string; } export type ExperimentStatus = 'planned' | 'ongoing' | 'completed' | 'cancelled'; export type DatePreset = 'last_7_days' | 'last_30_days' | 'last_90_days'; export type ExperimentSortField = 'created_at' | 'updated_at' | 'name' | 'status'; export interface ExperimentTypeOption { value: string; label: string; color?: string; } export interface ExperimentSummary { id: number; experiment_code?: string; name: string; status: ExperimentStatus; experiment_type: string; project?: string; project_id?: number; project_name?: string; notes?: string; tags?: Record; created_at: string; updated_at: string; created_by?: number; created_by_user?: UserSummary; has_design_data: boolean; } export interface ExperimentListResponse { experiments: ExperimentSummary[]; total: number; } export interface ExperimentFilters { search?: string; status?: ExperimentStatus | null; project?: string | null; experimentType?: string | null; datePreset?: DatePreset | null; } export type FitState = 'idle' | 'running' | 'completed' | 'error'; export interface FitResultSummary { label: string; value: string | number; /** Icon of a verdict row: success = check, warning = triangle, error = filled circle. Values are never colored. */ variant?: 'default' | 'success' | 'warning' | 'error'; /** Show the result as a verdict (icon + "label value") below the parameter table instead of as a table row. */ verdict?: boolean; /** Unit shown in mono after the parameter name, never transformed (e.g. `'nM'`). */ unit?: string; /** Preformatted 95% confidence interval (e.g. `'512 – 778'`). The CI column shows when any row has one. */ ci?: string; } /** One fitted series in a multi-series FitPanel. */ export interface FitSeries { label: string; /** Group color token, `var(--mint-sample-1)` … `var(--mint-sample-8)`. Defaults to the series' position in that palette. */ color?: string; results: FitResultSummary[]; } /** Header labels of the FitPanel parameter table. */ export interface FitColumnLabels { parameter?: string; value?: string; ci?: string; }