chore(wails): regenerate frontend Wails bindings
This commit is contained in:
1 parent
de523c5323
commit
e8c9186a76
4 files changed
+430
-252
No files matched your search
@@ -1 +1 @@
|
||||
640cefb23cef4711cf51530e8a87140c
|
||||
58f4fafea894c5f7c1c6ebefde51e110
|
||||
Vendored
+3
-3
@@ -1,10 +1,10 @@
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
import {reims} from '../models';
|
||||
import {plugin} from '../models';
|
||||
import {version} from '../models';
|
||||
import {app} from '../models';
|
||||
import {driver} from '../models';
|
||||
import {plugin} from '../models';
|
||||
import {runtime} from '../models';
|
||||
import {installer} from '../models';
|
||||
import {http} from '../models';
|
||||
@@ -189,10 +189,10 @@ export function ScanInstalledPlugin(arg1:string):Promise<plugin.ScanReport>;
|
||||
|
||||
export function SetActiveTheme(arg1:string,arg2:string):Promise<void>;
|
||||
|
||||
export function SetAutoPinPCores(arg1:boolean):Promise<void>;
|
||||
|
||||
export function SetAppUpdateChannel(arg1:string):Promise<void>;
|
||||
|
||||
export function SetAutoPinPCores(arg1:boolean):Promise<void>;
|
||||
|
||||
export function SetDataRoot(arg1:string):Promise<void>;
|
||||
|
||||
export function SetGuestPreventSleep(arg1:string,arg2:boolean):Promise<void>;
|
||||
|
||||
@@ -362,6 +362,10 @@ export function SetActiveTheme(arg1, arg2) {
|
||||
return window['go']['app']['App']['SetActiveTheme'](arg1, arg2);
|
||||
}
|
||||
|
||||
export function SetAppUpdateChannel(arg1) {
|
||||
return window['go']['app']['App']['SetAppUpdateChannel'](arg1);
|
||||
}
|
||||
|
||||
export function SetAutoPinPCores(arg1) {
|
||||
return window['go']['app']['App']['SetAutoPinPCores'](arg1);
|
||||
}
|
||||
@@ -386,10 +390,6 @@ export function SetPluginSettings(arg1, arg2, arg3) {
|
||||
return window['go']['app']['App']['SetPluginSettings'](arg1, arg2, arg3);
|
||||
}
|
||||
|
||||
export function SetAppUpdateChannel(arg1) {
|
||||
return window['go']['app']['App']['SetAppUpdateChannel'](arg1);
|
||||
}
|
||||
|
||||
export function SetRuntimeChannel(arg1) {
|
||||
return window['go']['app']['App']['SetRuntimeChannel'](arg1);
|
||||
}
|
||||
|
||||
+422
-244
@@ -1170,6 +1170,46 @@ export namespace plugin {
|
||||
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;
|
||||
@@ -1187,6 +1227,237 @@ export namespace plugin {
|
||||
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;
|
||||
@@ -1459,12 +1730,25 @@ export namespace plugin {
|
||||
return a;
|
||||
}
|
||||
}
|
||||
export interface ResolvedLocaleFont {
|
||||
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;
|
||||
@@ -1472,7 +1756,7 @@ export namespace plugin {
|
||||
fallback?: string;
|
||||
has_ui_messages?: boolean;
|
||||
messages?: Record<string, string>;
|
||||
plugin_messages?: Record<string, Record<string, string>>;
|
||||
plugin_messages?: Record<string, any>;
|
||||
fonts?: ResolvedLocaleFont[];
|
||||
pluginIds?: string[];
|
||||
|
||||
@@ -1488,9 +1772,27 @@ export namespace plugin {
|
||||
this.has_ui_messages = source["has_ui_messages"];
|
||||
this.messages = source["messages"];
|
||||
this.plugin_messages = source["plugin_messages"];
|
||||
this.fonts = source["fonts"];
|
||||
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;
|
||||
@@ -1536,6 +1838,104 @@ export namespace plugin {
|
||||
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;
|
||||
@@ -1702,246 +2102,6 @@ export namespace plugin {
|
||||
return a;
|
||||
}
|
||||
}
|
||||
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 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 = source["localized"] ? new LocalizedText(source["localized"]) : undefined;
|
||||
}
|
||||
}
|
||||
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 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 = new LocalizedText(source["title"]);
|
||||
this.summary = new LocalizedText(source["summary"]);
|
||||
this.examples = source["examples"];
|
||||
this.extra_count = source["extra_count"];
|
||||
}
|
||||
}
|
||||
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 = source["name"] ? new LocalizedText(source["name"]) : undefined;
|
||||
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 = new LocalizedText(source["headline"]);
|
||||
this.native_exec_notice = source["native_exec_notice"] ? new LocalizedText(source["native_exec_notice"]) : undefined;
|
||||
this.hard_findings = (source["hard_findings"] || []).map((x: any) => new ScanFinding(x));
|
||||
this.capabilities = (source["capabilities"] || []).map((x: any) => new CapabilityItem(x));
|
||||
this.pending_findings = (source["pending_findings"] || []).map((x: any) => new ScanFinding(x));
|
||||
this.executables = (source["executables"] || []).map((x: any) => new ExecutableFile(x));
|
||||
}
|
||||
}
|
||||
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 = new LocalizedText(source["name"]);
|
||||
this.description = new LocalizedText(source["description"]);
|
||||
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 = new Engines(source["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 = source["changelog"] ? new LocalizedText(source["changelog"]) : undefined;
|
||||
this.tags = source["tags"];
|
||||
this.updated_at = source["updated_at"];
|
||||
}
|
||||
}
|
||||
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 = new LocalizedText(source["reason"]);
|
||||
this.instead_id = source["instead_id"];
|
||||
this.instead_name = source["instead_name"];
|
||||
this.withdrawn_at = source["withdrawn_at"];
|
||||
}
|
||||
}
|
||||
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 = new MarketEntry(source["entry"]);
|
||||
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 = source["withdrawn"] ? new MarketWithdrawal(source["withdrawn"]) : undefined;
|
||||
this.high_risk_permissions = source["high_risk_permissions"];
|
||||
}
|
||||
}
|
||||
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 = (source["items"] || []).map((x: any) => new MarketCatalogItem(x));
|
||||
this.withdrawn_installed = (source["withdrawn_installed"] || []).map((x: any) => new MarketWithdrawal(x));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2389,7 +2549,7 @@ export namespace runtime {
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.kind = source["kind"];
|
||||
this.name = source["name"];
|
||||
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"];
|
||||
@@ -2397,6 +2557,24 @@ export namespace runtime {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user