72 lines
2.1 KiB
TypeScript
72 lines
2.1 KiB
TypeScript
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
|
// This file is automatically generated. DO NOT EDIT
|
|
|
|
/**
|
|
* ConfigService 应用配置服务
|
|
* @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 models$0 from "../models/models.js";
|
|
|
|
/**
|
|
* Get 获取配置项
|
|
*/
|
|
export function Get(key: string): Promise<any> & { cancel(): void } {
|
|
let $resultPromise = $Call.ByID(807201772, key) as any;
|
|
return $resultPromise;
|
|
}
|
|
|
|
/**
|
|
* GetConfig 获取完整应用配置
|
|
*/
|
|
export function GetConfig(): Promise<models$0.AppConfig | null> & { cancel(): void } {
|
|
let $resultPromise = $Call.ByID(1013336538) as any;
|
|
let $typingPromise = $resultPromise.then(($result: any) => {
|
|
return $$createType1($result);
|
|
}) as any;
|
|
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
|
return $typingPromise;
|
|
}
|
|
|
|
/**
|
|
* ResetConfig 强制重置所有配置为默认值
|
|
*/
|
|
export function ResetConfig(): Promise<void> & { cancel(): void } {
|
|
let $resultPromise = $Call.ByID(3593047389) as any;
|
|
return $resultPromise;
|
|
}
|
|
|
|
/**
|
|
* Set 设置配置项
|
|
*/
|
|
export function Set(key: string, value: any): Promise<void> & { cancel(): void } {
|
|
let $resultPromise = $Call.ByID(2921955968, key, value) as any;
|
|
return $resultPromise;
|
|
}
|
|
|
|
/**
|
|
* SetDataPathChangeCallback 设置数据路径配置变更回调
|
|
*/
|
|
export function SetDataPathChangeCallback(callback: any): Promise<void> & { cancel(): void } {
|
|
let $resultPromise = $Call.ByID(393017412, callback) as any;
|
|
return $resultPromise;
|
|
}
|
|
|
|
/**
|
|
* SetHotkeyChangeCallback 设置热键配置变更回调
|
|
*/
|
|
export function SetHotkeyChangeCallback(callback: any): Promise<void> & { cancel(): void } {
|
|
let $resultPromise = $Call.ByID(283872321, callback) as any;
|
|
return $resultPromise;
|
|
}
|
|
|
|
// Private type creation functions
|
|
const $$createType0 = models$0.AppConfig.createFrom;
|
|
const $$createType1 = $Create.Nullable($$createType0);
|