264 lines
6.6 KiB
TypeScript
264 lines
6.6 KiB
TypeScript
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||
// This file is automatically generated. DO NOT EDIT
|
||
|
||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||
// @ts-ignore: Unused imports
|
||
import {Create as $Create} from "@wailsio/runtime";
|
||
|
||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||
// @ts-ignore: Unused imports
|
||
import * as application$0 from "../../../github.com/wailsapp/wails/v3/pkg/application/models.js";
|
||
|
||
/**
|
||
* MemoryStats 内存统计信息
|
||
*/
|
||
export class MemoryStats {
|
||
/**
|
||
* 当前堆内存使用量(字节)
|
||
*/
|
||
"heapInUse": number;
|
||
|
||
/**
|
||
* 堆内存分配总量(字节)
|
||
*/
|
||
"heapAlloc": number;
|
||
|
||
/**
|
||
* 系统内存使用量(字节)
|
||
*/
|
||
"sys": number;
|
||
|
||
/**
|
||
* GC 次数
|
||
*/
|
||
"numGC": number;
|
||
|
||
/**
|
||
* GC 暂停时间(纳秒)
|
||
*/
|
||
"pauseTotalNs": number;
|
||
|
||
/**
|
||
* Goroutine 数量
|
||
*/
|
||
"numGoroutine": number;
|
||
|
||
/** Creates a new MemoryStats instance. */
|
||
constructor($$source: Partial<MemoryStats> = {}) {
|
||
if (!("heapInUse" in $$source)) {
|
||
this["heapInUse"] = 0;
|
||
}
|
||
if (!("heapAlloc" in $$source)) {
|
||
this["heapAlloc"] = 0;
|
||
}
|
||
if (!("sys" in $$source)) {
|
||
this["sys"] = 0;
|
||
}
|
||
if (!("numGC" in $$source)) {
|
||
this["numGC"] = 0;
|
||
}
|
||
if (!("pauseTotalNs" in $$source)) {
|
||
this["pauseTotalNs"] = 0;
|
||
}
|
||
if (!("numGoroutine" in $$source)) {
|
||
this["numGoroutine"] = 0;
|
||
}
|
||
|
||
Object.assign(this, $$source);
|
||
}
|
||
|
||
/**
|
||
* Creates a new MemoryStats instance from a string or object.
|
||
*/
|
||
static createFrom($$source: any = {}): MemoryStats {
|
||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
||
return new MemoryStats($$parsedSource as Partial<MemoryStats>);
|
||
}
|
||
}
|
||
|
||
/**
|
||
* MigrationProgress 迁移进度信息
|
||
*/
|
||
export class MigrationProgress {
|
||
"status": MigrationStatus;
|
||
"progress": number;
|
||
"error"?: string;
|
||
|
||
/** Creates a new MigrationProgress instance. */
|
||
constructor($$source: Partial<MigrationProgress> = {}) {
|
||
if (!("status" in $$source)) {
|
||
this["status"] = ("" as MigrationStatus);
|
||
}
|
||
if (!("progress" in $$source)) {
|
||
this["progress"] = 0;
|
||
}
|
||
|
||
Object.assign(this, $$source);
|
||
}
|
||
|
||
/**
|
||
* Creates a new MigrationProgress instance from a string or object.
|
||
*/
|
||
static createFrom($$source: any = {}): MigrationProgress {
|
||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
||
return new MigrationProgress($$parsedSource as Partial<MigrationProgress>);
|
||
}
|
||
}
|
||
|
||
/**
|
||
* MigrationStatus 迁移状态
|
||
*/
|
||
export enum MigrationStatus {
|
||
/**
|
||
* The Go zero value for the underlying type of the enum.
|
||
*/
|
||
$zero = "",
|
||
|
||
MigrationStatusMigrating = "migrating",
|
||
MigrationStatusCompleted = "completed",
|
||
MigrationStatusFailed = "failed",
|
||
};
|
||
|
||
/**
|
||
* SelfUpdateResult 自我更新结果
|
||
*/
|
||
export class SelfUpdateResult {
|
||
/**
|
||
* 是否有更新
|
||
*/
|
||
"hasUpdate": boolean;
|
||
|
||
/**
|
||
* 当前版本
|
||
*/
|
||
"currentVersion": string;
|
||
|
||
/**
|
||
* 最新版本
|
||
*/
|
||
"latestVersion": string;
|
||
|
||
/**
|
||
* 是否已应用更新
|
||
*/
|
||
"updateApplied": boolean;
|
||
|
||
/**
|
||
* 下载链接
|
||
*/
|
||
"assetURL": string;
|
||
|
||
/**
|
||
* 发布说明
|
||
*/
|
||
"releaseNotes": string;
|
||
|
||
/**
|
||
* 错误信息
|
||
*/
|
||
"error": string;
|
||
|
||
/**
|
||
* 更新源(github/gitea)
|
||
*/
|
||
"source": string;
|
||
|
||
/** Creates a new SelfUpdateResult instance. */
|
||
constructor($$source: Partial<SelfUpdateResult> = {}) {
|
||
if (!("hasUpdate" in $$source)) {
|
||
this["hasUpdate"] = false;
|
||
}
|
||
if (!("currentVersion" in $$source)) {
|
||
this["currentVersion"] = "";
|
||
}
|
||
if (!("latestVersion" in $$source)) {
|
||
this["latestVersion"] = "";
|
||
}
|
||
if (!("updateApplied" in $$source)) {
|
||
this["updateApplied"] = false;
|
||
}
|
||
if (!("assetURL" in $$source)) {
|
||
this["assetURL"] = "";
|
||
}
|
||
if (!("releaseNotes" in $$source)) {
|
||
this["releaseNotes"] = "";
|
||
}
|
||
if (!("error" in $$source)) {
|
||
this["error"] = "";
|
||
}
|
||
if (!("source" in $$source)) {
|
||
this["source"] = "";
|
||
}
|
||
|
||
Object.assign(this, $$source);
|
||
}
|
||
|
||
/**
|
||
* Creates a new SelfUpdateResult instance from a string or object.
|
||
*/
|
||
static createFrom($$source: any = {}): SelfUpdateResult {
|
||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
||
return new SelfUpdateResult($$parsedSource as Partial<SelfUpdateResult>);
|
||
}
|
||
}
|
||
|
||
/**
|
||
* WindowInfo 窗口信息(简化版)
|
||
*/
|
||
export class WindowInfo {
|
||
"Window": application$0.WebviewWindow | null;
|
||
"DocumentID": number;
|
||
"Title": string;
|
||
|
||
/** Creates a new WindowInfo instance. */
|
||
constructor($$source: Partial<WindowInfo> = {}) {
|
||
if (!("Window" in $$source)) {
|
||
this["Window"] = null;
|
||
}
|
||
if (!("DocumentID" in $$source)) {
|
||
this["DocumentID"] = 0;
|
||
}
|
||
if (!("Title" in $$source)) {
|
||
this["Title"] = "";
|
||
}
|
||
|
||
Object.assign(this, $$source);
|
||
}
|
||
|
||
/**
|
||
* Creates a new WindowInfo instance from a string or object.
|
||
*/
|
||
static createFrom($$source: any = {}): WindowInfo {
|
||
const $$createField0_0 = $$createType1;
|
||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
||
if ("Window" in $$parsedSource) {
|
||
$$parsedSource["Window"] = $$createField0_0($$parsedSource["Window"]);
|
||
}
|
||
return new WindowInfo($$parsedSource as Partial<WindowInfo>);
|
||
}
|
||
}
|
||
|
||
/**
|
||
* WindowSnapService 窗口吸附服务
|
||
*/
|
||
export class WindowSnapService {
|
||
|
||
/** Creates a new WindowSnapService instance. */
|
||
constructor($$source: Partial<WindowSnapService> = {}) {
|
||
|
||
Object.assign(this, $$source);
|
||
}
|
||
|
||
/**
|
||
* Creates a new WindowSnapService instance from a string or object.
|
||
*/
|
||
static createFrom($$source: any = {}): WindowSnapService {
|
||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
||
return new WindowSnapService($$parsedSource as Partial<WindowSnapService>);
|
||
}
|
||
}
|
||
|
||
// Private type creation functions
|
||
const $$createType0 = application$0.WebviewWindow.createFrom;
|
||
const $$createType1 = $Create.Nullable($$createType0);
|