2651 lines
82 KiB
TypeScript
2651 lines
82 KiB
TypeScript
export namespace app {
|
|
|
|
export class AppState {
|
|
config?: config.Config;
|
|
host: host.Report;
|
|
optimizations: host.Optimization[];
|
|
runtimes: runtime.Installed[];
|
|
active_runtime?: runtime.Installed;
|
|
vms: reims.VMListItem[];
|
|
transitions: Record<string, string>;
|
|
pending_changes: Record<string, Array<PendingChange>>;
|
|
active_guides?: string[];
|
|
install_guide_enabled?: boolean;
|
|
needs_setup: boolean;
|
|
app_version: string;
|
|
safe_mode?: boolean;
|
|
plugin_crash_detected?: boolean;
|
|
detected_locale?: string;
|
|
effective_locale?: string;
|
|
missing_font_hint?: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new AppState(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.config = this.convertValues(source["config"], config.Config);
|
|
this.host = this.convertValues(source["host"], host.Report);
|
|
this.optimizations = this.convertValues(source["optimizations"], host.Optimization);
|
|
this.runtimes = this.convertValues(source["runtimes"], runtime.Installed);
|
|
this.active_runtime = this.convertValues(source["active_runtime"], runtime.Installed);
|
|
this.vms = this.convertValues(source["vms"], reims.VMListItem);
|
|
this.transitions = source["transitions"];
|
|
this.pending_changes = this.convertValues(source["pending_changes"], Array<PendingChange>, true);
|
|
this.active_guides = source["active_guides"];
|
|
this.install_guide_enabled = source["install_guide_enabled"];
|
|
this.needs_setup = source["needs_setup"];
|
|
this.app_version = source["app_version"];
|
|
this.safe_mode = source["safe_mode"];
|
|
this.plugin_crash_detected = source["plugin_crash_detected"];
|
|
this.detected_locale = source["detected_locale"];
|
|
this.effective_locale = source["effective_locale"];
|
|
this.missing_font_hint = source["missing_font_hint"];
|
|
}
|
|
|
|
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
|
if (!a) {
|
|
return a;
|
|
}
|
|
if (a.slice && a.map) {
|
|
return (a as any[]).map(elem => this.convertValues(elem, classs));
|
|
} else if ("object" === typeof a) {
|
|
if (asMap) {
|
|
for (const key of Object.keys(a)) {
|
|
a[key] = new classs(a[key]);
|
|
}
|
|
return a;
|
|
}
|
|
return new classs(a);
|
|
}
|
|
return a;
|
|
}
|
|
}
|
|
export class DataRootCheck {
|
|
path: string;
|
|
free_gb: number;
|
|
system: boolean;
|
|
external: boolean;
|
|
has_config: boolean;
|
|
error?: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new DataRootCheck(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.path = source["path"];
|
|
this.free_gb = source["free_gb"];
|
|
this.system = source["system"];
|
|
this.external = source["external"];
|
|
this.has_config = source["has_config"];
|
|
this.error = source["error"];
|
|
}
|
|
}
|
|
export class DataRootChoice {
|
|
path: string;
|
|
free_gb: number;
|
|
system: boolean;
|
|
external: boolean;
|
|
recommended: boolean;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new DataRootChoice(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.path = source["path"];
|
|
this.free_gb = source["free_gb"];
|
|
this.system = source["system"];
|
|
this.external = source["external"];
|
|
this.recommended = source["recommended"];
|
|
}
|
|
}
|
|
export class DriveShareInfo {
|
|
drive: string;
|
|
root: string;
|
|
selected: boolean;
|
|
system: boolean;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new DriveShareInfo(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.drive = source["drive"];
|
|
this.root = source["root"];
|
|
this.selected = source["selected"];
|
|
this.system = source["system"];
|
|
}
|
|
}
|
|
export class DriveShareSettings {
|
|
enabled: boolean;
|
|
read_only: boolean;
|
|
required_agent_version: number;
|
|
drives: DriveShareInfo[];
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new DriveShareSettings(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.enabled = source["enabled"];
|
|
this.read_only = source["read_only"];
|
|
this.required_agent_version = source["required_agent_version"];
|
|
this.drives = this.convertValues(source["drives"], DriveShareInfo);
|
|
}
|
|
|
|
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
|
if (!a) {
|
|
return a;
|
|
}
|
|
if (a.slice && a.map) {
|
|
return (a as any[]).map(elem => this.convertValues(elem, classs));
|
|
} else if ("object" === typeof a) {
|
|
if (asMap) {
|
|
for (const key of Object.keys(a)) {
|
|
a[key] = new classs(a[key]);
|
|
}
|
|
return a;
|
|
}
|
|
return new classs(a);
|
|
}
|
|
return a;
|
|
}
|
|
}
|
|
export class LicenseTexts {
|
|
license: string;
|
|
notice: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new LicenseTexts(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.license = source["license"];
|
|
this.notice = source["notice"];
|
|
}
|
|
}
|
|
export class PendingChange {
|
|
field: string;
|
|
from: string;
|
|
to: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new PendingChange(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.field = source["field"];
|
|
this.from = source["from"];
|
|
this.to = source["to"];
|
|
}
|
|
}
|
|
export class PluginUIContributions {
|
|
safe_mode: boolean;
|
|
crash_detected: boolean;
|
|
menus?: plugin.MenuContribution[];
|
|
vm_cards?: plugin.VMCardContribution[];
|
|
settings_pages?: plugin.SettingsPageContribution[];
|
|
status_items?: plugin.StatusItemContribution[];
|
|
panels?: plugin.PanelContribution[];
|
|
vm_templates?: plugin.VMTemplateContribution[];
|
|
themes?: plugin.ThemeContribution[];
|
|
locales?: plugin.ResolvedLocalePack[];
|
|
runtime_sources?: plugin.RuntimeSourceContribution[];
|
|
runtime_kinds?: runtime.KindSpec[];
|
|
drivers?: driver.DriverSummary[];
|
|
asset_token?: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new PluginUIContributions(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.safe_mode = source["safe_mode"];
|
|
this.crash_detected = source["crash_detected"];
|
|
this.menus = this.convertValues(source["menus"], plugin.MenuContribution);
|
|
this.vm_cards = this.convertValues(source["vm_cards"], plugin.VMCardContribution);
|
|
this.settings_pages = this.convertValues(source["settings_pages"], plugin.SettingsPageContribution);
|
|
this.status_items = this.convertValues(source["status_items"], plugin.StatusItemContribution);
|
|
this.panels = this.convertValues(source["panels"], plugin.PanelContribution);
|
|
this.vm_templates = this.convertValues(source["vm_templates"], plugin.VMTemplateContribution);
|
|
this.themes = this.convertValues(source["themes"], plugin.ThemeContribution);
|
|
this.locales = this.convertValues(source["locales"], plugin.ResolvedLocalePack);
|
|
this.runtime_sources = this.convertValues(source["runtime_sources"], plugin.RuntimeSourceContribution);
|
|
this.runtime_kinds = this.convertValues(source["runtime_kinds"], runtime.KindSpec);
|
|
this.drivers = this.convertValues(source["drivers"], driver.DriverSummary);
|
|
this.asset_token = source["asset_token"];
|
|
}
|
|
|
|
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
|
if (!a) {
|
|
return a;
|
|
}
|
|
if (a.slice && a.map) {
|
|
return (a as any[]).map(elem => this.convertValues(elem, classs));
|
|
} else if ("object" === typeof a) {
|
|
if (asMap) {
|
|
for (const key of Object.keys(a)) {
|
|
a[key] = new classs(a[key]);
|
|
}
|
|
return a;
|
|
}
|
|
return new classs(a);
|
|
}
|
|
return a;
|
|
}
|
|
}
|
|
export class VMStorageItem {
|
|
name: string;
|
|
bytes: number;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new VMStorageItem(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.name = source["name"];
|
|
this.bytes = source["bytes"];
|
|
}
|
|
}
|
|
export class StorageBreakdown {
|
|
vms_bytes: number;
|
|
installers_bytes: number;
|
|
runtimes_bytes: number;
|
|
total_bytes: number;
|
|
vms: VMStorageItem[];
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new StorageBreakdown(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.vms_bytes = source["vms_bytes"];
|
|
this.installers_bytes = source["installers_bytes"];
|
|
this.runtimes_bytes = source["runtimes_bytes"];
|
|
this.total_bytes = source["total_bytes"];
|
|
this.vms = this.convertValues(source["vms"], VMStorageItem);
|
|
}
|
|
|
|
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
|
if (!a) {
|
|
return a;
|
|
}
|
|
if (a.slice && a.map) {
|
|
return (a as any[]).map(elem => this.convertValues(elem, classs));
|
|
} else if ("object" === typeof a) {
|
|
if (asMap) {
|
|
for (const key of Object.keys(a)) {
|
|
a[key] = new classs(a[key]);
|
|
}
|
|
return a;
|
|
}
|
|
return new classs(a);
|
|
}
|
|
return a;
|
|
}
|
|
}
|
|
export class Task {
|
|
id: string;
|
|
kind: string;
|
|
subject: string;
|
|
vm?: string;
|
|
installer_kind?: string;
|
|
installer_version?: string;
|
|
installer_phase?: string;
|
|
step: string;
|
|
done: number;
|
|
total: number;
|
|
percent: number;
|
|
rate: number;
|
|
status: string;
|
|
error?: string;
|
|
result?: string;
|
|
cancelable: boolean;
|
|
started_at: number;
|
|
updated_at: number;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new Task(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.id = source["id"];
|
|
this.kind = source["kind"];
|
|
this.subject = source["subject"];
|
|
this.vm = source["vm"];
|
|
this.installer_kind = source["installer_kind"];
|
|
this.installer_version = source["installer_version"];
|
|
this.installer_phase = source["installer_phase"];
|
|
this.step = source["step"];
|
|
this.done = source["done"];
|
|
this.total = source["total"];
|
|
this.percent = source["percent"];
|
|
this.rate = source["rate"];
|
|
this.status = source["status"];
|
|
this.error = source["error"];
|
|
this.result = source["result"];
|
|
this.cancelable = source["cancelable"];
|
|
this.started_at = source["started_at"];
|
|
this.updated_at = source["updated_at"];
|
|
}
|
|
}
|
|
export class VMAffinityStatus {
|
|
mode: string;
|
|
cpus: number[];
|
|
disable_eco_qos: boolean;
|
|
effective_mode: string;
|
|
effective_cpus: number[];
|
|
effective_mask_hex: string;
|
|
vcpus: number;
|
|
oversubscribed: boolean;
|
|
running: boolean;
|
|
pid?: number;
|
|
live_cpus?: number[];
|
|
live_mask_hex?: string;
|
|
live_read_error?: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new VMAffinityStatus(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.mode = source["mode"];
|
|
this.cpus = source["cpus"];
|
|
this.disable_eco_qos = source["disable_eco_qos"];
|
|
this.effective_mode = source["effective_mode"];
|
|
this.effective_cpus = source["effective_cpus"];
|
|
this.effective_mask_hex = source["effective_mask_hex"];
|
|
this.vcpus = source["vcpus"];
|
|
this.oversubscribed = source["oversubscribed"];
|
|
this.running = source["running"];
|
|
this.pid = source["pid"];
|
|
this.live_cpus = source["live_cpus"];
|
|
this.live_mask_hex = source["live_mask_hex"];
|
|
this.live_read_error = source["live_read_error"];
|
|
}
|
|
}
|
|
export class VMAffinityUpdate {
|
|
mode: string;
|
|
cpus?: number[];
|
|
disable_eco_qos: boolean;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new VMAffinityUpdate(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.mode = source["mode"];
|
|
this.cpus = source["cpus"];
|
|
this.disable_eco_qos = source["disable_eco_qos"];
|
|
}
|
|
}
|
|
export class VMStats {
|
|
name: string;
|
|
running: boolean;
|
|
pid?: number;
|
|
cpu_percent: number;
|
|
memory_rss_bytes: number;
|
|
memory_private_bytes: number;
|
|
disk_actual_bytes: number;
|
|
disk_virtual_bytes: number;
|
|
disk_format?: string;
|
|
disk_backing_depth?: number;
|
|
disk_backing_broken?: boolean;
|
|
disk_backing_depth_warn?: boolean;
|
|
uptime_seconds: number;
|
|
guest_tools_connected: boolean;
|
|
guest_tools_mount_mode?: string;
|
|
guest_tools_sleep_guard: boolean;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new VMStats(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.name = source["name"];
|
|
this.running = source["running"];
|
|
this.pid = source["pid"];
|
|
this.cpu_percent = source["cpu_percent"];
|
|
this.memory_rss_bytes = source["memory_rss_bytes"];
|
|
this.memory_private_bytes = source["memory_private_bytes"];
|
|
this.disk_actual_bytes = source["disk_actual_bytes"];
|
|
this.disk_virtual_bytes = source["disk_virtual_bytes"];
|
|
this.disk_format = source["disk_format"];
|
|
this.disk_backing_depth = source["disk_backing_depth"];
|
|
this.disk_backing_broken = source["disk_backing_broken"];
|
|
this.disk_backing_depth_warn = source["disk_backing_depth_warn"];
|
|
this.uptime_seconds = source["uptime_seconds"];
|
|
this.guest_tools_connected = source["guest_tools_connected"];
|
|
this.guest_tools_mount_mode = source["guest_tools_mount_mode"];
|
|
this.guest_tools_sleep_guard = source["guest_tools_sleep_guard"];
|
|
}
|
|
}
|
|
|
|
export class VMThumbnail {
|
|
data_url: string;
|
|
captured_at: number;
|
|
live: boolean;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new VMThumbnail(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.data_url = source["data_url"];
|
|
this.captured_at = source["captured_at"];
|
|
this.live = source["live"];
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
export namespace config {
|
|
|
|
export class Config {
|
|
data_root: string;
|
|
locale: string;
|
|
active_runtime?: string;
|
|
auto_pin_pcores: boolean;
|
|
default_gpu?: string;
|
|
runtime_channel?: string;
|
|
app_update_channel?: string;
|
|
minimize_to_tray?: boolean;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new Config(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.data_root = source["data_root"];
|
|
this.locale = source["locale"];
|
|
this.active_runtime = source["active_runtime"];
|
|
this.auto_pin_pcores = source["auto_pin_pcores"];
|
|
this.default_gpu = source["default_gpu"];
|
|
this.runtime_channel = source["runtime_channel"];
|
|
this.app_update_channel = source["app_update_channel"];
|
|
this.minimize_to_tray = source["minimize_to_tray"];
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
export namespace driver {
|
|
|
|
export class CreateRequest {
|
|
driver_id: string;
|
|
name: string;
|
|
dir?: string;
|
|
options?: Record<string, any>;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new CreateRequest(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.driver_id = source["driver_id"];
|
|
this.name = source["name"];
|
|
this.dir = source["dir"];
|
|
this.options = source["options"];
|
|
}
|
|
}
|
|
export class DriverSummary {
|
|
id: string;
|
|
name: plugin.LocalizedText;
|
|
runtime_kind: string;
|
|
runtime_api_range?: string;
|
|
capabilities?: string[];
|
|
create_schema?: plugin.SettingsSchema;
|
|
settings_schema?: plugin.SettingsSchema;
|
|
builtin?: boolean;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new DriverSummary(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.id = source["id"];
|
|
this.name = this.convertValues(source["name"], plugin.LocalizedText);
|
|
this.runtime_kind = source["runtime_kind"];
|
|
this.runtime_api_range = source["runtime_api_range"];
|
|
this.capabilities = source["capabilities"];
|
|
this.create_schema = this.convertValues(source["create_schema"], plugin.SettingsSchema);
|
|
this.settings_schema = this.convertValues(source["settings_schema"], plugin.SettingsSchema);
|
|
this.builtin = source["builtin"];
|
|
}
|
|
|
|
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
|
if (!a) {
|
|
return a;
|
|
}
|
|
if (a.slice && a.map) {
|
|
return (a as any[]).map(elem => this.convertValues(elem, classs));
|
|
} else if ("object" === typeof a) {
|
|
if (asMap) {
|
|
for (const key of Object.keys(a)) {
|
|
a[key] = new classs(a[key]);
|
|
}
|
|
return a;
|
|
}
|
|
return new classs(a);
|
|
}
|
|
return a;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
export namespace host {
|
|
|
|
export class AudioInfo {
|
|
output_count: number;
|
|
input_count: number;
|
|
output_devices?: string[];
|
|
input_devices?: string[];
|
|
default_backend?: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new AudioInfo(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.output_count = source["output_count"];
|
|
this.input_count = source["input_count"];
|
|
this.output_devices = source["output_devices"];
|
|
this.input_devices = source["input_devices"];
|
|
this.default_backend = source["default_backend"];
|
|
}
|
|
}
|
|
export class BackingChainIssue {
|
|
vm_name: string;
|
|
path: string;
|
|
depth: number;
|
|
broken?: boolean;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new BackingChainIssue(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.vm_name = source["vm_name"];
|
|
this.path = source["path"];
|
|
this.depth = source["depth"];
|
|
this.broken = source["broken"];
|
|
}
|
|
}
|
|
export class DisplayInfo {
|
|
name?: string;
|
|
width: number;
|
|
height: number;
|
|
scale_pct: number;
|
|
refresh_hz?: number;
|
|
primary: boolean;
|
|
work_width?: number;
|
|
work_height?: number;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new DisplayInfo(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.name = source["name"];
|
|
this.width = source["width"];
|
|
this.height = source["height"];
|
|
this.scale_pct = source["scale_pct"];
|
|
this.refresh_hz = source["refresh_hz"];
|
|
this.primary = source["primary"];
|
|
this.work_width = source["work_width"];
|
|
this.work_height = source["work_height"];
|
|
}
|
|
}
|
|
export class DisplayPreset {
|
|
resolution: string;
|
|
label: string;
|
|
hidpi: boolean;
|
|
recommended?: boolean;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new DisplayPreset(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.resolution = source["resolution"];
|
|
this.label = source["label"];
|
|
this.hidpi = source["hidpi"];
|
|
this.recommended = source["recommended"];
|
|
}
|
|
}
|
|
export class GPUInfo {
|
|
name: string;
|
|
vulkan_icd: string;
|
|
kind: string;
|
|
vendor_id?: string;
|
|
device_id?: string;
|
|
driver_version?: string;
|
|
vulkan_version?: string;
|
|
compat?: string;
|
|
compat_code?: string;
|
|
compat_detail?: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new GPUInfo(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.name = source["name"];
|
|
this.vulkan_icd = source["vulkan_icd"];
|
|
this.kind = source["kind"];
|
|
this.vendor_id = source["vendor_id"];
|
|
this.device_id = source["device_id"];
|
|
this.driver_version = source["driver_version"];
|
|
this.vulkan_version = source["vulkan_version"];
|
|
this.compat = source["compat"];
|
|
this.compat_code = source["compat_code"];
|
|
this.compat_detail = source["compat_detail"];
|
|
}
|
|
}
|
|
export class LogicalCPUInfo {
|
|
index: number;
|
|
core_index: number;
|
|
tier: string;
|
|
smt: boolean;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new LogicalCPUInfo(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.index = source["index"];
|
|
this.core_index = source["core_index"];
|
|
this.tier = source["tier"];
|
|
this.smt = source["smt"];
|
|
}
|
|
}
|
|
export class Optimization {
|
|
id: string;
|
|
status: string;
|
|
supported: boolean;
|
|
recommended: boolean;
|
|
detail?: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new Optimization(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.id = source["id"];
|
|
this.status = source["status"];
|
|
this.supported = source["supported"];
|
|
this.recommended = source["recommended"];
|
|
this.detail = source["detail"];
|
|
}
|
|
}
|
|
export class WHPXCapabilities {
|
|
modern_os: boolean;
|
|
apic_emulation: boolean;
|
|
kernel_irqchip_available: boolean;
|
|
nested_virt_property: boolean;
|
|
nested_virt_probe_error?: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new WHPXCapabilities(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.modern_os = source["modern_os"];
|
|
this.apic_emulation = source["apic_emulation"];
|
|
this.kernel_irqchip_available = source["kernel_irqchip_available"];
|
|
this.nested_virt_property = source["nested_virt_property"];
|
|
this.nested_virt_probe_error = source["nested_virt_probe_error"];
|
|
}
|
|
}
|
|
export class Report {
|
|
os: string;
|
|
arch: string;
|
|
logical_cpus: number;
|
|
physical_cores: number;
|
|
has_hybrid_cores: boolean;
|
|
p_core_count: number;
|
|
e_core_count: number;
|
|
lpe_core_count?: number;
|
|
p_core_mask: number;
|
|
p_core_mask_hex: string;
|
|
p_core_logical_cpus?: number[];
|
|
e_core_logical_cpus?: number[];
|
|
non_lpe_mask?: number;
|
|
non_lpe_mask_hex?: string;
|
|
non_lpe_logical_cpus?: number[];
|
|
cpu_topology?: LogicalCPUInfo[];
|
|
total_ram_gb: number;
|
|
avail_ram_gb: number;
|
|
memory_load_pct: number;
|
|
commit_avail_gb: number;
|
|
commit_limit_gb: number;
|
|
data_root: string;
|
|
data_root_drive_type?: string;
|
|
deep_backing_chains?: BackingChainIssue[];
|
|
free_disk_gb: number;
|
|
whpx: string;
|
|
whpx_caps: WHPXCapabilities;
|
|
needs_cold_reboot_workaround: boolean;
|
|
gpus: GPUInfo[];
|
|
recommended_gpu?: GPUInfo;
|
|
displays?: DisplayInfo[];
|
|
primary_display?: DisplayInfo;
|
|
recommended_resolution?: string;
|
|
display_presets?: DisplayPreset[];
|
|
hidpi_advice?: string;
|
|
fullscreen_hidpi: boolean;
|
|
processor_scheduling?: string;
|
|
audio: AudioInfo;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new Report(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.os = source["os"];
|
|
this.arch = source["arch"];
|
|
this.logical_cpus = source["logical_cpus"];
|
|
this.physical_cores = source["physical_cores"];
|
|
this.has_hybrid_cores = source["has_hybrid_cores"];
|
|
this.p_core_count = source["p_core_count"];
|
|
this.e_core_count = source["e_core_count"];
|
|
this.lpe_core_count = source["lpe_core_count"];
|
|
this.p_core_mask = source["p_core_mask"];
|
|
this.p_core_mask_hex = source["p_core_mask_hex"];
|
|
this.p_core_logical_cpus = source["p_core_logical_cpus"];
|
|
this.e_core_logical_cpus = source["e_core_logical_cpus"];
|
|
this.non_lpe_mask = source["non_lpe_mask"];
|
|
this.non_lpe_mask_hex = source["non_lpe_mask_hex"];
|
|
this.non_lpe_logical_cpus = source["non_lpe_logical_cpus"];
|
|
this.cpu_topology = this.convertValues(source["cpu_topology"], LogicalCPUInfo);
|
|
this.total_ram_gb = source["total_ram_gb"];
|
|
this.avail_ram_gb = source["avail_ram_gb"];
|
|
this.memory_load_pct = source["memory_load_pct"];
|
|
this.commit_avail_gb = source["commit_avail_gb"];
|
|
this.commit_limit_gb = source["commit_limit_gb"];
|
|
this.data_root = source["data_root"];
|
|
this.data_root_drive_type = source["data_root_drive_type"];
|
|
this.deep_backing_chains = this.convertValues(source["deep_backing_chains"], BackingChainIssue);
|
|
this.free_disk_gb = source["free_disk_gb"];
|
|
this.whpx = source["whpx"];
|
|
this.whpx_caps = this.convertValues(source["whpx_caps"], WHPXCapabilities);
|
|
this.needs_cold_reboot_workaround = source["needs_cold_reboot_workaround"];
|
|
this.gpus = this.convertValues(source["gpus"], GPUInfo);
|
|
this.recommended_gpu = this.convertValues(source["recommended_gpu"], GPUInfo);
|
|
this.displays = this.convertValues(source["displays"], DisplayInfo);
|
|
this.primary_display = this.convertValues(source["primary_display"], DisplayInfo);
|
|
this.recommended_resolution = source["recommended_resolution"];
|
|
this.display_presets = this.convertValues(source["display_presets"], DisplayPreset);
|
|
this.hidpi_advice = source["hidpi_advice"];
|
|
this.fullscreen_hidpi = source["fullscreen_hidpi"];
|
|
this.processor_scheduling = source["processor_scheduling"];
|
|
this.audio = this.convertValues(source["audio"], AudioInfo);
|
|
}
|
|
|
|
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
|
if (!a) {
|
|
return a;
|
|
}
|
|
if (a.slice && a.map) {
|
|
return (a as any[]).map(elem => this.convertValues(elem, classs));
|
|
} else if ("object" === typeof a) {
|
|
if (asMap) {
|
|
for (const key of Object.keys(a)) {
|
|
a[key] = new classs(a[key]);
|
|
}
|
|
return a;
|
|
}
|
|
return new classs(a);
|
|
}
|
|
return a;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
export namespace installer {
|
|
|
|
export class Cached {
|
|
name: string;
|
|
path: string;
|
|
bytes: number;
|
|
kind: string;
|
|
partial: boolean;
|
|
title?: string;
|
|
version?: string;
|
|
build?: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new Cached(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.name = source["name"];
|
|
this.path = source["path"];
|
|
this.bytes = source["bytes"];
|
|
this.kind = source["kind"];
|
|
this.partial = source["partial"];
|
|
this.title = source["title"];
|
|
this.version = source["version"];
|
|
this.build = source["build"];
|
|
}
|
|
}
|
|
export class Release {
|
|
product: string;
|
|
title: string;
|
|
version: string;
|
|
build: string;
|
|
posted: string;
|
|
size: number;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new Release(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.product = source["product"];
|
|
this.title = source["title"];
|
|
this.version = source["version"];
|
|
this.build = source["build"];
|
|
this.posted = source["posted"];
|
|
this.size = source["size"];
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
export namespace plugin {
|
|
|
|
export class CustomThemeScheme {
|
|
id: string;
|
|
theme_id: string;
|
|
name: string;
|
|
appearance?: string;
|
|
seeds: Record<string, string>;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new CustomThemeScheme(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.id = source["id"];
|
|
this.theme_id = source["theme_id"];
|
|
this.name = source["name"];
|
|
this.appearance = source["appearance"];
|
|
this.seeds = source["seeds"];
|
|
}
|
|
}
|
|
export class ThemeDecorationState {
|
|
when: string;
|
|
asset?: string;
|
|
frames?: string[];
|
|
fps?: number;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new ThemeDecorationState(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.when = source["when"];
|
|
this.asset = source["asset"];
|
|
this.frames = source["frames"];
|
|
this.fps = source["fps"];
|
|
}
|
|
}
|
|
export class ThemeDecoration {
|
|
id: string;
|
|
slot: string;
|
|
width?: number;
|
|
height?: number;
|
|
alt?: LocalizedText;
|
|
states: ThemeDecorationState[];
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new ThemeDecoration(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.id = source["id"];
|
|
this.slot = source["slot"];
|
|
this.width = source["width"];
|
|
this.height = source["height"];
|
|
this.alt = this.convertValues(source["alt"], LocalizedText);
|
|
this.states = this.convertValues(source["states"], ThemeDecorationState);
|
|
}
|
|
|
|
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
|
if (!a) {
|
|
return a;
|
|
}
|
|
if (a.slice && a.map) {
|
|
return (a as any[]).map(elem => this.convertValues(elem, classs));
|
|
} else if ("object" === typeof a) {
|
|
if (asMap) {
|
|
for (const key of Object.keys(a)) {
|
|
a[key] = new classs(a[key]);
|
|
}
|
|
return a;
|
|
}
|
|
return new classs(a);
|
|
}
|
|
return a;
|
|
}
|
|
}
|
|
export class ThemeFont {
|
|
family: string;
|
|
file: string;
|
|
weight?: string;
|
|
style?: string;
|
|
unicodeRange?: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new ThemeFont(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.family = source["family"];
|
|
this.file = source["file"];
|
|
this.weight = source["weight"];
|
|
this.style = source["style"];
|
|
this.unicodeRange = source["unicodeRange"];
|
|
}
|
|
}
|
|
export class TokenDeriveRule {
|
|
token: string;
|
|
fromSeed: string;
|
|
appearance?: string;
|
|
lightness?: number;
|
|
chroma?: number;
|
|
alpha?: number;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new TokenDeriveRule(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.token = source["token"];
|
|
this.fromSeed = source["fromSeed"];
|
|
this.appearance = source["appearance"];
|
|
this.lightness = source["lightness"];
|
|
this.chroma = source["chroma"];
|
|
this.alpha = source["alpha"];
|
|
}
|
|
}
|
|
export class ThemeScheme {
|
|
id: string;
|
|
name: LocalizedText;
|
|
appearance?: string;
|
|
seeds: Record<string, string>;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new ThemeScheme(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.id = source["id"];
|
|
this.name = this.convertValues(source["name"], LocalizedText);
|
|
this.appearance = source["appearance"];
|
|
this.seeds = source["seeds"];
|
|
}
|
|
|
|
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
|
if (!a) {
|
|
return a;
|
|
}
|
|
if (a.slice && a.map) {
|
|
return (a as any[]).map(elem => this.convertValues(elem, classs));
|
|
} else if ("object" === typeof a) {
|
|
if (asMap) {
|
|
for (const key of Object.keys(a)) {
|
|
a[key] = new classs(a[key]);
|
|
}
|
|
return a;
|
|
}
|
|
return new classs(a);
|
|
}
|
|
return a;
|
|
}
|
|
}
|
|
export class LocalizedText {
|
|
"zh-CN"?: string;
|
|
"en-US"?: string;
|
|
extra?: Record<string, string>;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new LocalizedText(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this["zh-CN"] = source["zh-CN"];
|
|
this["en-US"] = source["en-US"];
|
|
this.extra = source["extra"];
|
|
}
|
|
}
|
|
export class ThemeContribution {
|
|
id: string;
|
|
name: LocalizedText;
|
|
description?: LocalizedText;
|
|
appearance?: string;
|
|
seeds?: Record<string, string>;
|
|
schemes?: ThemeScheme[];
|
|
deriveRules?: TokenDeriveRule[];
|
|
tokens?: Record<string, string>;
|
|
darkTokens?: Record<string, string>;
|
|
fonts?: ThemeFont[];
|
|
icons?: Record<string, string>;
|
|
brandMark?: string;
|
|
background?: string;
|
|
sounds?: Record<string, string>;
|
|
stylesheet?: string;
|
|
decorations?: ThemeDecoration[];
|
|
uiScript?: string;
|
|
pluginId?: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new ThemeContribution(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.id = source["id"];
|
|
this.name = this.convertValues(source["name"], LocalizedText);
|
|
this.description = this.convertValues(source["description"], LocalizedText);
|
|
this.appearance = source["appearance"];
|
|
this.seeds = source["seeds"];
|
|
this.schemes = this.convertValues(source["schemes"], ThemeScheme);
|
|
this.deriveRules = this.convertValues(source["deriveRules"], TokenDeriveRule);
|
|
this.tokens = source["tokens"];
|
|
this.darkTokens = source["darkTokens"];
|
|
this.fonts = this.convertValues(source["fonts"], ThemeFont);
|
|
this.icons = source["icons"];
|
|
this.brandMark = source["brandMark"];
|
|
this.background = source["background"];
|
|
this.sounds = source["sounds"];
|
|
this.stylesheet = source["stylesheet"];
|
|
this.decorations = this.convertValues(source["decorations"], ThemeDecoration);
|
|
this.uiScript = source["uiScript"];
|
|
this.pluginId = source["pluginId"];
|
|
}
|
|
|
|
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
|
if (!a) {
|
|
return a;
|
|
}
|
|
if (a.slice && a.map) {
|
|
return (a as any[]).map(elem => this.convertValues(elem, classs));
|
|
} else if ("object" === typeof a) {
|
|
if (asMap) {
|
|
for (const key of Object.keys(a)) {
|
|
a[key] = new classs(a[key]);
|
|
}
|
|
return a;
|
|
}
|
|
return new classs(a);
|
|
}
|
|
return a;
|
|
}
|
|
}
|
|
export class ActiveThemePayload {
|
|
theme_id: string;
|
|
plugin_id?: string;
|
|
active_scheme?: string;
|
|
theme?: ThemeContribution;
|
|
custom_schemes?: CustomThemeScheme[];
|
|
css?: string;
|
|
asset_base_url?: string;
|
|
ui_script_url?: string;
|
|
ui_script_trust?: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new ActiveThemePayload(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.theme_id = source["theme_id"];
|
|
this.plugin_id = source["plugin_id"];
|
|
this.active_scheme = source["active_scheme"];
|
|
this.theme = this.convertValues(source["theme"], ThemeContribution);
|
|
this.custom_schemes = this.convertValues(source["custom_schemes"], CustomThemeScheme);
|
|
this.css = source["css"];
|
|
this.asset_base_url = source["asset_base_url"];
|
|
this.ui_script_url = source["ui_script_url"];
|
|
this.ui_script_trust = source["ui_script_trust"];
|
|
}
|
|
|
|
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
|
if (!a) {
|
|
return a;
|
|
}
|
|
if (a.slice && a.map) {
|
|
return (a as any[]).map(elem => this.convertValues(elem, classs));
|
|
} else if ("object" === typeof a) {
|
|
if (asMap) {
|
|
for (const key of Object.keys(a)) {
|
|
a[key] = new classs(a[key]);
|
|
}
|
|
return a;
|
|
}
|
|
return new classs(a);
|
|
}
|
|
return a;
|
|
}
|
|
}
|
|
export class CapabilityItem {
|
|
id: string;
|
|
level: string;
|
|
title: LocalizedText;
|
|
summary: LocalizedText;
|
|
examples?: string[];
|
|
extra_count?: number;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new CapabilityItem(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.id = source["id"];
|
|
this.level = source["level"];
|
|
this.title = this.convertValues(source["title"], LocalizedText);
|
|
this.summary = this.convertValues(source["summary"], LocalizedText);
|
|
this.examples = source["examples"];
|
|
this.extra_count = source["extra_count"];
|
|
}
|
|
|
|
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
|
if (!a) {
|
|
return a;
|
|
}
|
|
if (a.slice && a.map) {
|
|
return (a as any[]).map(elem => this.convertValues(elem, classs));
|
|
} else if ("object" === typeof a) {
|
|
if (asMap) {
|
|
for (const key of Object.keys(a)) {
|
|
a[key] = new classs(a[key]);
|
|
}
|
|
return a;
|
|
}
|
|
return new classs(a);
|
|
}
|
|
return a;
|
|
}
|
|
}
|
|
|
|
export class DoctorFinding {
|
|
severity: string;
|
|
check: string;
|
|
message: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new DoctorFinding(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.severity = source["severity"];
|
|
this.check = source["check"];
|
|
this.message = source["message"];
|
|
}
|
|
}
|
|
export class Engines {
|
|
"reims-go"?: string;
|
|
pluginApi?: string;
|
|
uiApi?: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new Engines(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this["reims-go"] = source["reims-go"];
|
|
this.pluginApi = source["pluginApi"];
|
|
this.uiApi = source["uiApi"];
|
|
}
|
|
}
|
|
export class ExecutableFile {
|
|
path: string;
|
|
sha256: string;
|
|
declared: boolean;
|
|
size_bytes: number;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new ExecutableFile(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.path = source["path"];
|
|
this.sha256 = source["sha256"];
|
|
this.declared = source["declared"];
|
|
this.size_bytes = source["size_bytes"];
|
|
}
|
|
}
|
|
|
|
export class MarketWithdrawal {
|
|
id: string;
|
|
reason: LocalizedText;
|
|
instead_id?: string;
|
|
instead_name?: string;
|
|
withdrawn_at?: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new MarketWithdrawal(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.id = source["id"];
|
|
this.reason = this.convertValues(source["reason"], LocalizedText);
|
|
this.instead_id = source["instead_id"];
|
|
this.instead_name = source["instead_name"];
|
|
this.withdrawn_at = source["withdrawn_at"];
|
|
}
|
|
|
|
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
|
if (!a) {
|
|
return a;
|
|
}
|
|
if (a.slice && a.map) {
|
|
return (a as any[]).map(elem => this.convertValues(elem, classs));
|
|
} else if ("object" === typeof a) {
|
|
if (asMap) {
|
|
for (const key of Object.keys(a)) {
|
|
a[key] = new classs(a[key]);
|
|
}
|
|
return a;
|
|
}
|
|
return new classs(a);
|
|
}
|
|
return a;
|
|
}
|
|
}
|
|
export class MarketEntry {
|
|
id: string;
|
|
version: string;
|
|
name: LocalizedText;
|
|
description: LocalizedText;
|
|
publisher: string;
|
|
license: string;
|
|
channel: string;
|
|
trust: string;
|
|
kind?: string;
|
|
tier?: string;
|
|
homepage?: string;
|
|
readme_url?: string;
|
|
engines: Engines;
|
|
platforms?: string[];
|
|
permissions?: string[];
|
|
download_url: string;
|
|
sha256: string;
|
|
size_bytes?: number;
|
|
signer?: string;
|
|
changelog?: LocalizedText;
|
|
tags?: string[];
|
|
updated_at?: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new MarketEntry(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.id = source["id"];
|
|
this.version = source["version"];
|
|
this.name = this.convertValues(source["name"], LocalizedText);
|
|
this.description = this.convertValues(source["description"], LocalizedText);
|
|
this.publisher = source["publisher"];
|
|
this.license = source["license"];
|
|
this.channel = source["channel"];
|
|
this.trust = source["trust"];
|
|
this.kind = source["kind"];
|
|
this.tier = source["tier"];
|
|
this.homepage = source["homepage"];
|
|
this.readme_url = source["readme_url"];
|
|
this.engines = this.convertValues(source["engines"], Engines);
|
|
this.platforms = source["platforms"];
|
|
this.permissions = source["permissions"];
|
|
this.download_url = source["download_url"];
|
|
this.sha256 = source["sha256"];
|
|
this.size_bytes = source["size_bytes"];
|
|
this.signer = source["signer"];
|
|
this.changelog = this.convertValues(source["changelog"], LocalizedText);
|
|
this.tags = source["tags"];
|
|
this.updated_at = source["updated_at"];
|
|
}
|
|
|
|
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
|
if (!a) {
|
|
return a;
|
|
}
|
|
if (a.slice && a.map) {
|
|
return (a as any[]).map(elem => this.convertValues(elem, classs));
|
|
} else if ("object" === typeof a) {
|
|
if (asMap) {
|
|
for (const key of Object.keys(a)) {
|
|
a[key] = new classs(a[key]);
|
|
}
|
|
return a;
|
|
}
|
|
return new classs(a);
|
|
}
|
|
return a;
|
|
}
|
|
}
|
|
export class MarketCatalogItem {
|
|
entry: MarketEntry;
|
|
installed: boolean;
|
|
installed_version?: string;
|
|
update_available: boolean;
|
|
compatible: boolean;
|
|
incompatible_reason?: string;
|
|
withdrawn?: MarketWithdrawal;
|
|
high_risk_permissions?: string[];
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new MarketCatalogItem(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.entry = this.convertValues(source["entry"], MarketEntry);
|
|
this.installed = source["installed"];
|
|
this.installed_version = source["installed_version"];
|
|
this.update_available = source["update_available"];
|
|
this.compatible = source["compatible"];
|
|
this.incompatible_reason = source["incompatible_reason"];
|
|
this.withdrawn = this.convertValues(source["withdrawn"], MarketWithdrawal);
|
|
this.high_risk_permissions = source["high_risk_permissions"];
|
|
}
|
|
|
|
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
|
if (!a) {
|
|
return a;
|
|
}
|
|
if (a.slice && a.map) {
|
|
return (a as any[]).map(elem => this.convertValues(elem, classs));
|
|
} else if ("object" === typeof a) {
|
|
if (asMap) {
|
|
for (const key of Object.keys(a)) {
|
|
a[key] = new classs(a[key]);
|
|
}
|
|
return a;
|
|
}
|
|
return new classs(a);
|
|
}
|
|
return a;
|
|
}
|
|
}
|
|
export class MarketBrowseResult {
|
|
source: string;
|
|
stale: boolean;
|
|
fetch_error?: string;
|
|
updated_at?: string;
|
|
items: MarketCatalogItem[];
|
|
withdrawn_installed?: MarketWithdrawal[];
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new MarketBrowseResult(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.source = source["source"];
|
|
this.stale = source["stale"];
|
|
this.fetch_error = source["fetch_error"];
|
|
this.updated_at = source["updated_at"];
|
|
this.items = this.convertValues(source["items"], MarketCatalogItem);
|
|
this.withdrawn_installed = this.convertValues(source["withdrawn_installed"], MarketWithdrawal);
|
|
}
|
|
|
|
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
|
if (!a) {
|
|
return a;
|
|
}
|
|
if (a.slice && a.map) {
|
|
return (a as any[]).map(elem => this.convertValues(elem, classs));
|
|
} else if ("object" === typeof a) {
|
|
if (asMap) {
|
|
for (const key of Object.keys(a)) {
|
|
a[key] = new classs(a[key]);
|
|
}
|
|
return a;
|
|
}
|
|
return new classs(a);
|
|
}
|
|
return a;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
export class MenuContribution {
|
|
id: string;
|
|
slot: string;
|
|
command: string;
|
|
title: LocalizedText;
|
|
when?: string;
|
|
pluginId?: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new MenuContribution(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.id = source["id"];
|
|
this.slot = source["slot"];
|
|
this.command = source["command"];
|
|
this.title = this.convertValues(source["title"], LocalizedText);
|
|
this.when = source["when"];
|
|
this.pluginId = source["pluginId"];
|
|
}
|
|
|
|
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
|
if (!a) {
|
|
return a;
|
|
}
|
|
if (a.slice && a.map) {
|
|
return (a as any[]).map(elem => this.convertValues(elem, classs));
|
|
} else if ("object" === typeof a) {
|
|
if (asMap) {
|
|
for (const key of Object.keys(a)) {
|
|
a[key] = new classs(a[key]);
|
|
}
|
|
return a;
|
|
}
|
|
return new classs(a);
|
|
}
|
|
return a;
|
|
}
|
|
}
|
|
export class PanelContribution {
|
|
id: string;
|
|
slot: string;
|
|
title: LocalizedText;
|
|
entry: string;
|
|
height?: number;
|
|
pluginId?: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new PanelContribution(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.id = source["id"];
|
|
this.slot = source["slot"];
|
|
this.title = this.convertValues(source["title"], LocalizedText);
|
|
this.entry = source["entry"];
|
|
this.height = source["height"];
|
|
this.pluginId = source["pluginId"];
|
|
}
|
|
|
|
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
|
if (!a) {
|
|
return a;
|
|
}
|
|
if (a.slice && a.map) {
|
|
return (a as any[]).map(elem => this.convertValues(elem, classs));
|
|
} else if ("object" === typeof a) {
|
|
if (asMap) {
|
|
for (const key of Object.keys(a)) {
|
|
a[key] = new classs(a[key]);
|
|
}
|
|
return a;
|
|
}
|
|
return new classs(a);
|
|
}
|
|
return a;
|
|
}
|
|
}
|
|
export class PermissionSpec {
|
|
name: string;
|
|
level: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new PermissionSpec(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.name = source["name"];
|
|
this.level = source["level"];
|
|
}
|
|
}
|
|
export class SettingProperty {
|
|
type: string;
|
|
title: LocalizedText;
|
|
description?: LocalizedText;
|
|
default?: any;
|
|
enum?: string[];
|
|
"x-enumLabels"?: LocalizedText[];
|
|
minimum?: number;
|
|
maximum?: number;
|
|
"x-secret"?: boolean;
|
|
"x-effect"?: string;
|
|
"x-scope"?: string;
|
|
"x-group"?: string;
|
|
required?: boolean;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new SettingProperty(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.type = source["type"];
|
|
this.title = this.convertValues(source["title"], LocalizedText);
|
|
this.description = this.convertValues(source["description"], LocalizedText);
|
|
this.default = source["default"];
|
|
this.enum = source["enum"];
|
|
this["x-enumLabels"] = this.convertValues(source["x-enumLabels"], LocalizedText);
|
|
this.minimum = source["minimum"];
|
|
this.maximum = source["maximum"];
|
|
this["x-secret"] = source["x-secret"];
|
|
this["x-effect"] = source["x-effect"];
|
|
this["x-scope"] = source["x-scope"];
|
|
this["x-group"] = source["x-group"];
|
|
this.required = source["required"];
|
|
}
|
|
|
|
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
|
if (!a) {
|
|
return a;
|
|
}
|
|
if (a.slice && a.map) {
|
|
return (a as any[]).map(elem => this.convertValues(elem, classs));
|
|
} else if ("object" === typeof a) {
|
|
if (asMap) {
|
|
for (const key of Object.keys(a)) {
|
|
a[key] = new classs(a[key]);
|
|
}
|
|
return a;
|
|
}
|
|
return new classs(a);
|
|
}
|
|
return a;
|
|
}
|
|
}
|
|
export class SettingsSchema {
|
|
title?: LocalizedText;
|
|
"x-group"?: string;
|
|
"x-scope"?: string;
|
|
properties: Record<string, SettingProperty>;
|
|
"x-order"?: string[];
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new SettingsSchema(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.title = this.convertValues(source["title"], LocalizedText);
|
|
this["x-group"] = source["x-group"];
|
|
this["x-scope"] = source["x-scope"];
|
|
this.properties = this.convertValues(source["properties"], SettingProperty, true);
|
|
this["x-order"] = source["x-order"];
|
|
}
|
|
|
|
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
|
if (!a) {
|
|
return a;
|
|
}
|
|
if (a.slice && a.map) {
|
|
return (a as any[]).map(elem => this.convertValues(elem, classs));
|
|
} else if ("object" === typeof a) {
|
|
if (asMap) {
|
|
for (const key of Object.keys(a)) {
|
|
a[key] = new classs(a[key]);
|
|
}
|
|
return a;
|
|
}
|
|
return new classs(a);
|
|
}
|
|
return a;
|
|
}
|
|
}
|
|
export class PluginInfo {
|
|
id: string;
|
|
version: string;
|
|
name: LocalizedText;
|
|
description: LocalizedText;
|
|
publisher?: string;
|
|
license?: string;
|
|
homepage?: string;
|
|
source: string;
|
|
trust: string;
|
|
tier: string;
|
|
state: string;
|
|
enabled: boolean;
|
|
removable: boolean;
|
|
system?: boolean;
|
|
in_use: boolean;
|
|
error?: string;
|
|
degraded_reason?: string;
|
|
permissions?: PermissionSpec[];
|
|
approved_permissions?: string[];
|
|
needs_approval: boolean;
|
|
requires?: string[];
|
|
provides?: string[];
|
|
settings?: SettingsSchema;
|
|
install_dir?: string;
|
|
entry_hash?: string;
|
|
entry_path?: string;
|
|
log_path?: string;
|
|
// Go type: time
|
|
updated_at?: any;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new PluginInfo(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.id = source["id"];
|
|
this.version = source["version"];
|
|
this.name = this.convertValues(source["name"], LocalizedText);
|
|
this.description = this.convertValues(source["description"], LocalizedText);
|
|
this.publisher = source["publisher"];
|
|
this.license = source["license"];
|
|
this.homepage = source["homepage"];
|
|
this.source = source["source"];
|
|
this.trust = source["trust"];
|
|
this.tier = source["tier"];
|
|
this.state = source["state"];
|
|
this.enabled = source["enabled"];
|
|
this.removable = source["removable"];
|
|
this.system = source["system"];
|
|
this.in_use = source["in_use"];
|
|
this.error = source["error"];
|
|
this.degraded_reason = source["degraded_reason"];
|
|
this.permissions = this.convertValues(source["permissions"], PermissionSpec);
|
|
this.approved_permissions = source["approved_permissions"];
|
|
this.needs_approval = source["needs_approval"];
|
|
this.requires = source["requires"];
|
|
this.provides = source["provides"];
|
|
this.settings = this.convertValues(source["settings"], SettingsSchema);
|
|
this.install_dir = source["install_dir"];
|
|
this.entry_hash = source["entry_hash"];
|
|
this.entry_path = source["entry_path"];
|
|
this.log_path = source["log_path"];
|
|
this.updated_at = this.convertValues(source["updated_at"], null);
|
|
}
|
|
|
|
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
|
if (!a) {
|
|
return a;
|
|
}
|
|
if (a.slice && a.map) {
|
|
return (a as any[]).map(elem => this.convertValues(elem, classs));
|
|
} else if ("object" === typeof a) {
|
|
if (asMap) {
|
|
for (const key of Object.keys(a)) {
|
|
a[key] = new classs(a[key]);
|
|
}
|
|
return a;
|
|
}
|
|
return new classs(a);
|
|
}
|
|
return a;
|
|
}
|
|
}
|
|
export class ResolvedLocaleFont {
|
|
family: string;
|
|
url: string;
|
|
weight?: string;
|
|
style?: string;
|
|
unicodeRange?: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new ResolvedLocaleFont(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.family = source["family"];
|
|
this.url = source["url"];
|
|
this.weight = source["weight"];
|
|
this.style = source["style"];
|
|
this.unicodeRange = source["unicodeRange"];
|
|
}
|
|
}
|
|
export class ResolvedLocalePack {
|
|
locale: string;
|
|
label: string;
|
|
fallback?: string;
|
|
has_ui_messages?: boolean;
|
|
messages?: Record<string, string>;
|
|
plugin_messages?: Record<string, any>;
|
|
fonts?: ResolvedLocaleFont[];
|
|
pluginIds?: string[];
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new ResolvedLocalePack(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.locale = source["locale"];
|
|
this.label = source["label"];
|
|
this.fallback = source["fallback"];
|
|
this.has_ui_messages = source["has_ui_messages"];
|
|
this.messages = source["messages"];
|
|
this.plugin_messages = source["plugin_messages"];
|
|
this.fonts = this.convertValues(source["fonts"], ResolvedLocaleFont);
|
|
this.pluginIds = source["pluginIds"];
|
|
}
|
|
|
|
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
|
if (!a) {
|
|
return a;
|
|
}
|
|
if (a.slice && a.map) {
|
|
return (a as any[]).map(elem => this.convertValues(elem, classs));
|
|
} else if ("object" === typeof a) {
|
|
if (asMap) {
|
|
for (const key of Object.keys(a)) {
|
|
a[key] = new classs(a[key]);
|
|
}
|
|
return a;
|
|
}
|
|
return new classs(a);
|
|
}
|
|
return a;
|
|
}
|
|
}
|
|
export class RuntimeSourceContribution {
|
|
id: string;
|
|
kind: string;
|
|
name: LocalizedText;
|
|
indexUrl: string;
|
|
channel?: string;
|
|
license?: string;
|
|
publisher?: string;
|
|
pluginId?: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new RuntimeSourceContribution(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.id = source["id"];
|
|
this.kind = source["kind"];
|
|
this.name = this.convertValues(source["name"], LocalizedText);
|
|
this.indexUrl = source["indexUrl"];
|
|
this.channel = source["channel"];
|
|
this.license = source["license"];
|
|
this.publisher = source["publisher"];
|
|
this.pluginId = source["pluginId"];
|
|
}
|
|
|
|
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
|
if (!a) {
|
|
return a;
|
|
}
|
|
if (a.slice && a.map) {
|
|
return (a as any[]).map(elem => this.convertValues(elem, classs));
|
|
} else if ("object" === typeof a) {
|
|
if (asMap) {
|
|
for (const key of Object.keys(a)) {
|
|
a[key] = new classs(a[key]);
|
|
}
|
|
return a;
|
|
}
|
|
return new classs(a);
|
|
}
|
|
return a;
|
|
}
|
|
}
|
|
export class ScanFinding {
|
|
severity: string;
|
|
check: string;
|
|
target?: string;
|
|
message: string;
|
|
localized?: LocalizedText;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new ScanFinding(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.severity = source["severity"];
|
|
this.check = source["check"];
|
|
this.target = source["target"];
|
|
this.message = source["message"];
|
|
this.localized = this.convertValues(source["localized"], LocalizedText);
|
|
}
|
|
|
|
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
|
if (!a) {
|
|
return a;
|
|
}
|
|
if (a.slice && a.map) {
|
|
return (a as any[]).map(elem => this.convertValues(elem, classs));
|
|
} else if ("object" === typeof a) {
|
|
if (asMap) {
|
|
for (const key of Object.keys(a)) {
|
|
a[key] = new classs(a[key]);
|
|
}
|
|
return a;
|
|
}
|
|
return new classs(a);
|
|
}
|
|
return a;
|
|
}
|
|
}
|
|
export class ScanReport {
|
|
plugin_id?: string;
|
|
version?: string;
|
|
name?: LocalizedText;
|
|
tier?: string;
|
|
trust?: string;
|
|
publisher?: string;
|
|
license?: string;
|
|
passed: boolean;
|
|
hard_blocked: boolean;
|
|
needs_approval: boolean;
|
|
headline: LocalizedText;
|
|
native_exec_notice?: LocalizedText;
|
|
hard_findings?: ScanFinding[];
|
|
capabilities?: CapabilityItem[];
|
|
pending_findings?: ScanFinding[];
|
|
executables?: ExecutableFile[];
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new ScanReport(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.plugin_id = source["plugin_id"];
|
|
this.version = source["version"];
|
|
this.name = this.convertValues(source["name"], LocalizedText);
|
|
this.tier = source["tier"];
|
|
this.trust = source["trust"];
|
|
this.publisher = source["publisher"];
|
|
this.license = source["license"];
|
|
this.passed = source["passed"];
|
|
this.hard_blocked = source["hard_blocked"];
|
|
this.needs_approval = source["needs_approval"];
|
|
this.headline = this.convertValues(source["headline"], LocalizedText);
|
|
this.native_exec_notice = this.convertValues(source["native_exec_notice"], LocalizedText);
|
|
this.hard_findings = this.convertValues(source["hard_findings"], ScanFinding);
|
|
this.capabilities = this.convertValues(source["capabilities"], CapabilityItem);
|
|
this.pending_findings = this.convertValues(source["pending_findings"], ScanFinding);
|
|
this.executables = this.convertValues(source["executables"], ExecutableFile);
|
|
}
|
|
|
|
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
|
if (!a) {
|
|
return a;
|
|
}
|
|
if (a.slice && a.map) {
|
|
return (a as any[]).map(elem => this.convertValues(elem, classs));
|
|
} else if ("object" === typeof a) {
|
|
if (asMap) {
|
|
for (const key of Object.keys(a)) {
|
|
a[key] = new classs(a[key]);
|
|
}
|
|
return a;
|
|
}
|
|
return new classs(a);
|
|
}
|
|
return a;
|
|
}
|
|
}
|
|
|
|
export class SettingsPageContribution {
|
|
id: string;
|
|
title: LocalizedText;
|
|
group?: string;
|
|
scope?: string;
|
|
pluginId?: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new SettingsPageContribution(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.id = source["id"];
|
|
this.title = this.convertValues(source["title"], LocalizedText);
|
|
this.group = source["group"];
|
|
this.scope = source["scope"];
|
|
this.pluginId = source["pluginId"];
|
|
}
|
|
|
|
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
|
if (!a) {
|
|
return a;
|
|
}
|
|
if (a.slice && a.map) {
|
|
return (a as any[]).map(elem => this.convertValues(elem, classs));
|
|
} else if ("object" === typeof a) {
|
|
if (asMap) {
|
|
for (const key of Object.keys(a)) {
|
|
a[key] = new classs(a[key]);
|
|
}
|
|
return a;
|
|
}
|
|
return new classs(a);
|
|
}
|
|
return a;
|
|
}
|
|
}
|
|
|
|
export class StatusItemContribution {
|
|
id: string;
|
|
slot: string;
|
|
text: LocalizedText;
|
|
tooltip?: LocalizedText;
|
|
command?: string;
|
|
pluginId?: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new StatusItemContribution(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.id = source["id"];
|
|
this.slot = source["slot"];
|
|
this.text = this.convertValues(source["text"], LocalizedText);
|
|
this.tooltip = this.convertValues(source["tooltip"], LocalizedText);
|
|
this.command = source["command"];
|
|
this.pluginId = source["pluginId"];
|
|
}
|
|
|
|
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
|
if (!a) {
|
|
return a;
|
|
}
|
|
if (a.slice && a.map) {
|
|
return (a as any[]).map(elem => this.convertValues(elem, classs));
|
|
} else if ("object" === typeof a) {
|
|
if (asMap) {
|
|
for (const key of Object.keys(a)) {
|
|
a[key] = new classs(a[key]);
|
|
}
|
|
return a;
|
|
}
|
|
return new classs(a);
|
|
}
|
|
return a;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export class VMCardContribution {
|
|
id: string;
|
|
title: LocalizedText;
|
|
value?: LocalizedText;
|
|
badge?: string;
|
|
when?: string;
|
|
pluginId?: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new VMCardContribution(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.id = source["id"];
|
|
this.title = this.convertValues(source["title"], LocalizedText);
|
|
this.value = this.convertValues(source["value"], LocalizedText);
|
|
this.badge = source["badge"];
|
|
this.when = source["when"];
|
|
this.pluginId = source["pluginId"];
|
|
}
|
|
|
|
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
|
if (!a) {
|
|
return a;
|
|
}
|
|
if (a.slice && a.map) {
|
|
return (a as any[]).map(elem => this.convertValues(elem, classs));
|
|
} else if ("object" === typeof a) {
|
|
if (asMap) {
|
|
for (const key of Object.keys(a)) {
|
|
a[key] = new classs(a[key]);
|
|
}
|
|
return a;
|
|
}
|
|
return new classs(a);
|
|
}
|
|
return a;
|
|
}
|
|
}
|
|
export class VMTemplateContribution {
|
|
id: string;
|
|
driverId?: string;
|
|
name: LocalizedText;
|
|
description?: LocalizedText;
|
|
defaults?: Record<string, any>;
|
|
pluginId?: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new VMTemplateContribution(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.id = source["id"];
|
|
this.driverId = source["driverId"];
|
|
this.name = this.convertValues(source["name"], LocalizedText);
|
|
this.description = this.convertValues(source["description"], LocalizedText);
|
|
this.defaults = source["defaults"];
|
|
this.pluginId = source["pluginId"];
|
|
}
|
|
|
|
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
|
if (!a) {
|
|
return a;
|
|
}
|
|
if (a.slice && a.map) {
|
|
return (a as any[]).map(elem => this.convertValues(elem, classs));
|
|
} else if ("object" === typeof a) {
|
|
if (asMap) {
|
|
for (const key of Object.keys(a)) {
|
|
a[key] = new classs(a[key]);
|
|
}
|
|
return a;
|
|
}
|
|
return new classs(a);
|
|
}
|
|
return a;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
export namespace reims {
|
|
|
|
export class CreateOpts {
|
|
name: string;
|
|
dir?: string;
|
|
source_mode?: string;
|
|
macos?: string;
|
|
offline?: boolean;
|
|
installer?: string;
|
|
cpus?: number;
|
|
memory?: string;
|
|
disk_size?: string;
|
|
disk?: string;
|
|
disk_mode?: string;
|
|
disk_controller?: string;
|
|
graphics?: string;
|
|
gpu?: string;
|
|
resolution?: string;
|
|
displays?: number;
|
|
borderless?: boolean;
|
|
capture?: boolean;
|
|
audio?: boolean;
|
|
network?: boolean;
|
|
ssh_port?: number;
|
|
logs?: boolean;
|
|
guest_lang?: string;
|
|
start?: boolean;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new CreateOpts(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.name = source["name"];
|
|
this.dir = source["dir"];
|
|
this.source_mode = source["source_mode"];
|
|
this.macos = source["macos"];
|
|
this.offline = source["offline"];
|
|
this.installer = source["installer"];
|
|
this.cpus = source["cpus"];
|
|
this.memory = source["memory"];
|
|
this.disk_size = source["disk_size"];
|
|
this.disk = source["disk"];
|
|
this.disk_mode = source["disk_mode"];
|
|
this.disk_controller = source["disk_controller"];
|
|
this.graphics = source["graphics"];
|
|
this.gpu = source["gpu"];
|
|
this.resolution = source["resolution"];
|
|
this.displays = source["displays"];
|
|
this.borderless = source["borderless"];
|
|
this.capture = source["capture"];
|
|
this.audio = source["audio"];
|
|
this.network = source["network"];
|
|
this.ssh_port = source["ssh_port"];
|
|
this.logs = source["logs"];
|
|
this.guest_lang = source["guest_lang"];
|
|
this.start = source["start"];
|
|
}
|
|
}
|
|
export class DiskCompactResult {
|
|
path: string;
|
|
before_bytes: number;
|
|
after_bytes: number;
|
|
reclaimed_bytes: number;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new DiskCompactResult(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.path = source["path"];
|
|
this.before_bytes = source["before_bytes"];
|
|
this.after_bytes = source["after_bytes"];
|
|
this.reclaimed_bytes = source["reclaimed_bytes"];
|
|
}
|
|
}
|
|
export class DiskResizeResult {
|
|
path: string;
|
|
old_virtual_bytes: number;
|
|
new_virtual_bytes: number;
|
|
guest_expand_cmd: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new DiskResizeResult(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.path = source["path"];
|
|
this.old_virtual_bytes = source["old_virtual_bytes"];
|
|
this.new_virtual_bytes = source["new_virtual_bytes"];
|
|
this.guest_expand_cmd = source["guest_expand_cmd"];
|
|
}
|
|
}
|
|
export class DiskSnapshot {
|
|
id: string;
|
|
name: string;
|
|
created_at: number;
|
|
vm_state_bytes: number;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new DiskSnapshot(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.id = source["id"];
|
|
this.name = source["name"];
|
|
this.created_at = source["created_at"];
|
|
this.vm_state_bytes = source["vm_state_bytes"];
|
|
}
|
|
}
|
|
export class SetOpts {
|
|
name: string;
|
|
cpus?: number;
|
|
memory?: string;
|
|
graphics?: string;
|
|
displays?: number;
|
|
disk_controller?: string;
|
|
resolution?: string;
|
|
borderless?: boolean;
|
|
capture?: boolean;
|
|
gpu?: string;
|
|
logs?: boolean;
|
|
log_level?: string;
|
|
audio?: boolean;
|
|
audio_backend?: string;
|
|
network?: boolean;
|
|
ssh_port?: number;
|
|
stop_timeout?: number;
|
|
extra_args?: string;
|
|
env?: string[];
|
|
guest_lang?: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new SetOpts(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.name = source["name"];
|
|
this.cpus = source["cpus"];
|
|
this.memory = source["memory"];
|
|
this.graphics = source["graphics"];
|
|
this.displays = source["displays"];
|
|
this.disk_controller = source["disk_controller"];
|
|
this.resolution = source["resolution"];
|
|
this.borderless = source["borderless"];
|
|
this.capture = source["capture"];
|
|
this.gpu = source["gpu"];
|
|
this.logs = source["logs"];
|
|
this.log_level = source["log_level"];
|
|
this.audio = source["audio"];
|
|
this.audio_backend = source["audio_backend"];
|
|
this.network = source["network"];
|
|
this.ssh_port = source["ssh_port"];
|
|
this.stop_timeout = source["stop_timeout"];
|
|
this.extra_args = source["extra_args"];
|
|
this.env = source["env"];
|
|
this.guest_lang = source["guest_lang"];
|
|
}
|
|
}
|
|
export class VMDetail {
|
|
name: string;
|
|
state: string;
|
|
kind: string;
|
|
directory: string;
|
|
cpus: number;
|
|
memory: string;
|
|
disk: string;
|
|
disk_controller: string;
|
|
graphics: string;
|
|
display: string;
|
|
displays: number;
|
|
resolution: string;
|
|
gpu: string;
|
|
has_opencore: boolean;
|
|
has_installer: boolean;
|
|
recovery_mode: boolean;
|
|
installer_path?: string;
|
|
cpu_model: string;
|
|
audio: boolean;
|
|
audio_backend?: string;
|
|
audio_raw: string;
|
|
network: boolean;
|
|
network_summary: string;
|
|
ssh_port: number;
|
|
logs: boolean;
|
|
log_level: string;
|
|
stop_timeout: number;
|
|
capture: boolean;
|
|
borderless: boolean;
|
|
extra_args: string;
|
|
guest_tools_attached: boolean;
|
|
guest_tools_configured: boolean;
|
|
guest_tools_connected: boolean;
|
|
guest_tools_mount_mode?: string;
|
|
guest_tools_prevent_sleep: boolean;
|
|
guest_tools_sleep_active: boolean;
|
|
guest_tools_agent_version?: number;
|
|
guest_tools_disabled?: boolean;
|
|
shared_dir?: string;
|
|
guest_lang?: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new VMDetail(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.name = source["name"];
|
|
this.state = source["state"];
|
|
this.kind = source["kind"];
|
|
this.directory = source["directory"];
|
|
this.cpus = source["cpus"];
|
|
this.memory = source["memory"];
|
|
this.disk = source["disk"];
|
|
this.disk_controller = source["disk_controller"];
|
|
this.graphics = source["graphics"];
|
|
this.display = source["display"];
|
|
this.displays = source["displays"];
|
|
this.resolution = source["resolution"];
|
|
this.gpu = source["gpu"];
|
|
this.has_opencore = source["has_opencore"];
|
|
this.has_installer = source["has_installer"];
|
|
this.recovery_mode = source["recovery_mode"];
|
|
this.installer_path = source["installer_path"];
|
|
this.cpu_model = source["cpu_model"];
|
|
this.audio = source["audio"];
|
|
this.audio_backend = source["audio_backend"];
|
|
this.audio_raw = source["audio_raw"];
|
|
this.network = source["network"];
|
|
this.network_summary = source["network_summary"];
|
|
this.ssh_port = source["ssh_port"];
|
|
this.logs = source["logs"];
|
|
this.log_level = source["log_level"];
|
|
this.stop_timeout = source["stop_timeout"];
|
|
this.capture = source["capture"];
|
|
this.borderless = source["borderless"];
|
|
this.extra_args = source["extra_args"];
|
|
this.guest_tools_attached = source["guest_tools_attached"];
|
|
this.guest_tools_configured = source["guest_tools_configured"];
|
|
this.guest_tools_connected = source["guest_tools_connected"];
|
|
this.guest_tools_mount_mode = source["guest_tools_mount_mode"];
|
|
this.guest_tools_prevent_sleep = source["guest_tools_prevent_sleep"];
|
|
this.guest_tools_sleep_active = source["guest_tools_sleep_active"];
|
|
this.guest_tools_agent_version = source["guest_tools_agent_version"];
|
|
this.guest_tools_disabled = source["guest_tools_disabled"];
|
|
this.shared_dir = source["shared_dir"];
|
|
this.guest_lang = source["guest_lang"];
|
|
}
|
|
}
|
|
export class VMListItem {
|
|
name: string;
|
|
dir: string;
|
|
pid?: number;
|
|
state: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new VMListItem(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.name = source["name"];
|
|
this.dir = source["dir"];
|
|
this.pid = source["pid"];
|
|
this.state = source["state"];
|
|
}
|
|
}
|
|
export class ValidationIssue {
|
|
field: string;
|
|
code?: string;
|
|
params?: Record<string, any>;
|
|
message: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new ValidationIssue(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.field = source["field"];
|
|
this.code = source["code"];
|
|
this.params = source["params"];
|
|
this.message = source["message"];
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
export namespace runtime {
|
|
|
|
export class Patch {
|
|
name: string;
|
|
target: string;
|
|
sha256: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new Patch(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.name = source["name"];
|
|
this.target = source["target"];
|
|
this.sha256 = source["sha256"];
|
|
}
|
|
}
|
|
export class Manifest {
|
|
schema_version: number;
|
|
name: string;
|
|
platform: string;
|
|
upstream_repo: string;
|
|
commit: string;
|
|
full_commit: string;
|
|
qemu_version: string;
|
|
util_version: string;
|
|
built_at: string;
|
|
file_count: number;
|
|
dll_count: number;
|
|
raw_bytes: number;
|
|
sha256: Record<string, string>;
|
|
vendor_qemu_commit?: string;
|
|
util_commit?: string;
|
|
metal2vulkan_commit?: string;
|
|
patches?: Patch[];
|
|
channel?: string;
|
|
source_package?: string;
|
|
kind?: string;
|
|
runtime_api?: string;
|
|
capabilities?: string[];
|
|
license?: string;
|
|
publisher?: string;
|
|
origin?: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new Manifest(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.schema_version = source["schema_version"];
|
|
this.name = source["name"];
|
|
this.platform = source["platform"];
|
|
this.upstream_repo = source["upstream_repo"];
|
|
this.commit = source["commit"];
|
|
this.full_commit = source["full_commit"];
|
|
this.qemu_version = source["qemu_version"];
|
|
this.util_version = source["util_version"];
|
|
this.built_at = source["built_at"];
|
|
this.file_count = source["file_count"];
|
|
this.dll_count = source["dll_count"];
|
|
this.raw_bytes = source["raw_bytes"];
|
|
this.sha256 = source["sha256"];
|
|
this.vendor_qemu_commit = source["vendor_qemu_commit"];
|
|
this.util_commit = source["util_commit"];
|
|
this.metal2vulkan_commit = source["metal2vulkan_commit"];
|
|
this.patches = this.convertValues(source["patches"], Patch);
|
|
this.channel = source["channel"];
|
|
this.source_package = source["source_package"];
|
|
this.kind = source["kind"];
|
|
this.runtime_api = source["runtime_api"];
|
|
this.capabilities = source["capabilities"];
|
|
this.license = source["license"];
|
|
this.publisher = source["publisher"];
|
|
this.origin = source["origin"];
|
|
}
|
|
|
|
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
|
if (!a) {
|
|
return a;
|
|
}
|
|
if (a.slice && a.map) {
|
|
return (a as any[]).map(elem => this.convertValues(elem, classs));
|
|
} else if ("object" === typeof a) {
|
|
if (asMap) {
|
|
for (const key of Object.keys(a)) {
|
|
a[key] = new classs(a[key]);
|
|
}
|
|
return a;
|
|
}
|
|
return new classs(a);
|
|
}
|
|
return a;
|
|
}
|
|
}
|
|
export class Installed {
|
|
kind?: string;
|
|
commit: string;
|
|
dir: string;
|
|
active: boolean;
|
|
manifest: Manifest;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new Installed(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.kind = source["kind"];
|
|
this.commit = source["commit"];
|
|
this.dir = source["dir"];
|
|
this.active = source["active"];
|
|
this.manifest = this.convertValues(source["manifest"], Manifest);
|
|
}
|
|
|
|
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
|
if (!a) {
|
|
return a;
|
|
}
|
|
if (a.slice && a.map) {
|
|
return (a as any[]).map(elem => this.convertValues(elem, classs));
|
|
} else if ("object" === typeof a) {
|
|
if (asMap) {
|
|
for (const key of Object.keys(a)) {
|
|
a[key] = new classs(a[key]);
|
|
}
|
|
return a;
|
|
}
|
|
return new classs(a);
|
|
}
|
|
return a;
|
|
}
|
|
}
|
|
export class KindSpec {
|
|
kind: string;
|
|
name?: plugin.LocalizedText;
|
|
name_zh: string;
|
|
name_en: string;
|
|
required_files?: string[];
|
|
default_api_version?: string;
|
|
builtin?: boolean;
|
|
plugin_id?: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new KindSpec(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.kind = source["kind"];
|
|
this.name = this.convertValues(source["name"], plugin.LocalizedText);
|
|
this.name_zh = source["name_zh"];
|
|
this.name_en = source["name_en"];
|
|
this.required_files = source["required_files"];
|
|
this.default_api_version = source["default_api_version"];
|
|
this.builtin = source["builtin"];
|
|
this.plugin_id = source["plugin_id"];
|
|
}
|
|
|
|
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
|
if (!a) {
|
|
return a;
|
|
}
|
|
if (a.slice && a.map) {
|
|
return (a as any[]).map(elem => this.convertValues(elem, classs));
|
|
} else if ("object" === typeof a) {
|
|
if (asMap) {
|
|
for (const key of Object.keys(a)) {
|
|
a[key] = new classs(a[key]);
|
|
}
|
|
return a;
|
|
}
|
|
return new classs(a);
|
|
}
|
|
return a;
|
|
}
|
|
}
|
|
|
|
|
|
export class Remote {
|
|
commit: string;
|
|
tag: string;
|
|
channel: string;
|
|
published_at: string;
|
|
page_url: string;
|
|
archive_name: string;
|
|
archive_url: string;
|
|
archive_size: number;
|
|
sums_url: string;
|
|
source_name?: string;
|
|
source_url?: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new Remote(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.commit = source["commit"];
|
|
this.tag = source["tag"];
|
|
this.channel = source["channel"];
|
|
this.published_at = source["published_at"];
|
|
this.page_url = source["page_url"];
|
|
this.archive_name = source["archive_name"];
|
|
this.archive_url = source["archive_url"];
|
|
this.archive_size = source["archive_size"];
|
|
this.sums_url = source["sums_url"];
|
|
this.source_name = source["source_name"];
|
|
this.source_url = source["source_url"];
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
export namespace version {
|
|
|
|
export class UpdateInfo {
|
|
current: string;
|
|
latest: string;
|
|
channel?: string;
|
|
has_update: boolean;
|
|
page_url?: string;
|
|
download_url?: string;
|
|
asset_name?: string;
|
|
asset_size?: number;
|
|
sums_url?: string;
|
|
published_at?: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new UpdateInfo(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.current = source["current"];
|
|
this.latest = source["latest"];
|
|
this.channel = source["channel"];
|
|
this.has_update = source["has_update"];
|
|
this.page_url = source["page_url"];
|
|
this.download_url = source["download_url"];
|
|
this.asset_name = source["asset_name"];
|
|
this.asset_size = source["asset_size"];
|
|
this.sums_url = source["sums_url"];
|
|
this.published_at = source["published_at"];
|
|
}
|
|
}
|
|
|
|
}
|
|
|