105 lines
3.5 KiB
TypeScript
105 lines
3.5 KiB
TypeScript
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
|
// This file is automatically generated. DO NOT EDIT
|
|
|
|
/**
|
|
* ExtensionService 扩展服务
|
|
* @module
|
|
*/
|
|
|
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
// @ts-ignore: Unused imports
|
|
import {Call as $Call, 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";
|
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
// @ts-ignore: Unused imports
|
|
import * as models$0 from "../models/models.js";
|
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
// @ts-ignore: Unused imports
|
|
import * as ent$0 from "../models/ent/models.js";
|
|
|
|
/**
|
|
* GetAllExtensions 获取所有扩展
|
|
*/
|
|
export function GetAllExtensions(): Promise<(ent$0.Extension | null)[]> & { cancel(): void } {
|
|
let $resultPromise = $Call.ByID(3094292124) as any;
|
|
let $typingPromise = $resultPromise.then(($result: any) => {
|
|
return $$createType2($result);
|
|
}) as any;
|
|
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
|
return $typingPromise;
|
|
}
|
|
|
|
/**
|
|
* GetDefaultExtensions 获取默认扩展配置(用于前端绑定生成)
|
|
*/
|
|
export function GetDefaultExtensions(): Promise<models$0.Extension[]> & { cancel(): void } {
|
|
let $resultPromise = $Call.ByID(4036328166) as any;
|
|
let $typingPromise = $resultPromise.then(($result: any) => {
|
|
return $$createType4($result);
|
|
}) as any;
|
|
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
|
return $typingPromise;
|
|
}
|
|
|
|
/**
|
|
* GetExtensionByKey 根据Key获取扩展
|
|
*/
|
|
export function GetExtensionByKey(key: string): Promise<ent$0.Extension | null> & { cancel(): void } {
|
|
let $resultPromise = $Call.ByID(2551065776, key) as any;
|
|
let $typingPromise = $resultPromise.then(($result: any) => {
|
|
return $$createType1($result);
|
|
}) as any;
|
|
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
|
return $typingPromise;
|
|
}
|
|
|
|
/**
|
|
* ResetExtensionConfig 重置单个扩展到默认状态
|
|
*/
|
|
export function ResetExtensionConfig(key: string): Promise<void> & { cancel(): void } {
|
|
let $resultPromise = $Call.ByID(3990780299, key) as any;
|
|
return $resultPromise;
|
|
}
|
|
|
|
/**
|
|
* ServiceStartup 服务启动
|
|
*/
|
|
export function ServiceStartup(options: application$0.ServiceOptions): Promise<void> & { cancel(): void } {
|
|
let $resultPromise = $Call.ByID(40324057, options) as any;
|
|
return $resultPromise;
|
|
}
|
|
|
|
/**
|
|
* SyncExtensions 同步扩展配置
|
|
*/
|
|
export function SyncExtensions(): Promise<void> & { cancel(): void } {
|
|
let $resultPromise = $Call.ByID(167560004) as any;
|
|
return $resultPromise;
|
|
}
|
|
|
|
/**
|
|
* UpdateExtensionConfig 更新扩展配置
|
|
*/
|
|
export function UpdateExtensionConfig(key: string, config: { [_: string]: any }): Promise<void> & { cancel(): void } {
|
|
let $resultPromise = $Call.ByID(3184142503, key, config) as any;
|
|
return $resultPromise;
|
|
}
|
|
|
|
/**
|
|
* UpdateExtensionEnabled 更新扩展启用状态
|
|
*/
|
|
export function UpdateExtensionEnabled(key: string, enabled: boolean): Promise<void> & { cancel(): void } {
|
|
let $resultPromise = $Call.ByID(1067300094, key, enabled) as any;
|
|
return $resultPromise;
|
|
}
|
|
|
|
// Private type creation functions
|
|
const $$createType0 = ent$0.Extension.createFrom;
|
|
const $$createType1 = $Create.Nullable($$createType0);
|
|
const $$createType2 = $Create.Array($$createType1);
|
|
const $$createType3 = models$0.Extension.createFrom;
|
|
const $$createType4 = $Create.Array($$createType3);
|