// Backend types come from the Wails-generated models (wailsjs/go/models.ts, // regenerated by `wails dev` / `wails build`). This file only adds what Go // cannot say: string unions, and `| null` for slices Go may send as nil. import { app, config, driver, host, installer, opencore, plugin, reims, runtime, version } from '../wailsjs/go/models' /** A generated class as a plain data shape (no convertValues helper). */ type Model = Omit export type BuiltinLocale = 'zh-CN' | 'en-US' export type Locale = BuiltinLocale | (string & {}) export type Config = Model & { locale: Locale runtime_channel?: 'stable' | 'alpha' | '' } export type DisplayInfo = host.DisplayInfo export type DisplayPreset = host.DisplayPreset export type LogicalCPUInfo = host.LogicalCPUInfo type GPUCompat = 'supported' | 'warn' | 'unsupported' | 'unknown' export type GPUInfo = Omit, 'compat'> & { kind: 'discrete' | 'integrated' | 'virtual' | 'unknown' compat?: GPUCompat } export type OptimizationStatus = 'recommended' | 'available' | 'experimental' | 'auto' | 'unavailable' export type Optimization = Model & { id: 'pcore_pin' | 'kernel_irqchip' | 'cold_reboot' | 'discrete_gpu' | string status: OptimizationStatus } export type HostReport = Omit, 'gpus' | 'recommended_gpu'> & { whpx: 'ready' | 'hypervisor_off' | 'no_hypervisor' | 'missing' | 'unsupported' pending_hypervisor_boot?: 'auto' | 'off' | '' gpus: GPUInfo[] recommended_gpu?: GPUInfo } export type InstalledRuntime = Model export type RemoteRuntime = Model & { channel: 'stable' | 'alpha' } type VMState = 'running' | 'stopped' | 'suspended' | 'broken' | 'driver_unavailable' type VMPhase = 'normal' | 'installer' | 'recovery' type GuestOSInfo = Model export type VMEndpoint = Model & { kind: 'ssh' | 'wsl' | 'rdp' | 'vmconnect' | 'adb' | (string & {}) } export type VMListItem = Omit, 'guest_os' | 'phase' | 'endpoints'> & { driver_id?: string state: VMState guest_os?: GuestOSInfo phase?: VMPhase | (string & {}) endpoints?: VMEndpoint[] } /** The cross-driver VM model (GetVMInfo); the only detail a non-macOS VM has. */ export type VMInfo = Omit, 'guest_os' | 'phase' | 'endpoints'> & { guest_os?: GuestOSInfo phase?: VMPhase | (string & {}) endpoints?: VMEndpoint[] } export type PendingChange = app.PendingChange export type AppState = Omit, 'config' | 'host' | 'optimizations' | 'runtimes' | 'active_runtime' | 'vms'> & { config: Config host: HostReport optimizations?: Optimization[] runtimes: InstalledRuntime[] | null active_runtime?: InstalledRuntime vms: VMListItem[] | null vm_list_error?: string } export type AppUpdateInfo = version.UpdateInfo export type VMDetail = reims.VMDetail export type SMBIOSIdentity = opencore.SMBIOSIdentity export type VMStats = app.VMStats export type VMNetworkSettings = Model export type VMNetworkPlan = Model export type DriveShareSettings = Model export type SharedFolderInfo = Model export type SharedFolderSettings = Model export type SharedFolderMode = 'disabled' | 'ro' | 'rw' export type VMAffinityMode = 'auto' | 'all' | 'pcores' | 'non_lpe' | 'custom' export type VMAffinityUpdate = { mode: VMAffinityMode cpus?: number[] disable_eco_qos: boolean } export type VMAffinityStatus = Omit, 'mode' | 'effective_mode'> & { mode: VMAffinityMode effective_mode: VMAffinityMode } /** One frame of a VM's screen (internal/app/thumbnail_flow.go). Empty data_url: none yet. */ export type VMThumbnail = app.VMThumbnail export type ValidationIssue = reims.ValidationIssue export type DiskResizeResult = driver.DiskResizeResult export type DiskCompactResult = driver.DiskCompactResult export type DiskSnapshot = driver.DiskSnapshot export type StorageBreakdown = Model export type SetOpts = reims.SetOpts export type CreateOpts = Model & { network_mode?: 'off' | 'nat' | 'bridge' uplink_guid?: string source_mode?: 'offline' | 'apple' | 'installer' | 'disk' disk_mode?: 'copy' | 'in-place' disk_controller?: 'nvme' | 'ahci' | 'virtio' graphics: 'reims-vgpu' | 'vmware-svga' cpus: number memory: string gpu: string resolution: string displays: number } type TaskStatus = 'running' | 'done' | 'failed' | 'canceled' export type InstallerKind = 'offline' | 'online' export type InstallerPhase = 'queued' | 'downloading' /** A tracked long-running job pushed as "reims:task" (internal/app/tasks.go). */ export type Task = Model & { kind: 'installer-download' | 'recovery-download' | 'vm-create' | 'runtime-install' | 'app-update' | string installer_kind?: InstallerKind | '' installer_phase?: InstallerPhase | '' status: TaskStatus } /** An offline installer Apple offers (`reims-util offline-installer list`). */ export type Release = installer.Release /** A file kept in the installers directory. */ export type CachedInstaller = Model & { kind: 'offline' | 'online' | 'ipsw' | 'other' } export type DataRootChoice = app.DataRootChoice export type DataRootCheck = app.DataRootCheck export type LocalizedText = plugin.LocalizedText export type PermissionSpec = plugin.PermissionSpec export type SettingProperty = plugin.SettingProperty export type SettingsSchema = plugin.SettingsSchema export type PluginInfo = plugin.PluginInfo export type ScanReport = plugin.ScanReport export type MarketCatalogItem = plugin.MarketCatalogItem export type MarketBrowseResult = plugin.MarketBrowseResult export type TokenDeriveRule = plugin.TokenDeriveRule export type ThemeDecoration = plugin.ThemeDecoration export type ThemeDecorationState = plugin.ThemeDecorationState export type CustomThemeScheme = plugin.CustomThemeScheme export type ActiveThemePayload = plugin.ActiveThemePayload interface ResolvedLocaleFont { family: string url: string weight?: string style?: string unicodeRange?: string } export type ResolvedLocalePack = Model & { has_ui_messages?: boolean plugin_messages?: Record> fonts?: ResolvedLocaleFont[] } export type PanelContribution = plugin.PanelContribution export type ViewContribution = plugin.ViewContribution export type ImageSourceContribution = plugin.ImageSourceContribution export type PluginUIContributions = app.PluginUIContributions export type DriverSummary = driver.DriverSummary /** A "reims:log" event (internal/app/app.go emitLog); not a Go struct, so not generated. */ export type VMAction = | 'start' | 'suspend' | 'resume' | 'discardSuspend' | 'stop' | 'forceStop' | 'restart' | 'focus' | 'fullscreen' | 'screenshot' | 'eject' | 'finishInstall' | 'enterRecovery' | 'attachInstaller' | 'attachGuestTools' | 'detachGuestTools' | 'openSharedFolder' | 'upgradeNVMe' | 'exportDiagnostics' | 'cloneVM' | 'type' | 'sendText' | 'delete' | 'openFolder' export type VMBusyAction = VMAction | 'pluginCommand' export interface LogEntry { ts: string source: string line: string } export type VMKeymapPreset = 'off' | 'win_to_cmd' | 'swap_alt_win' | 'custom' export type VMKeymapHostModifier = 'lwin' | 'rwin' | 'lalt' | 'ralt' | 'lctrl' | 'rctrl' | 'capslock' export type VMKeymapGuestModifier = 'default' | 'lcmd' | 'rcmd' | 'lopt' | 'ropt' | 'lctrl' | 'rctrl' | 'esc' | 'disabled' export interface VMKeymapUpdate { preset: VMKeymapPreset bindings: Partial> capture_host_shortcuts?: boolean } export interface VMKeymapStatus extends VMKeymapUpdate { capture_host_shortcuts: boolean needs_guest_tools: boolean guest_connected: boolean guest_agent_version?: number required_agent_version: number input_service_available: boolean guest_keymap_active: boolean hook_active: boolean running: boolean }