108 lines
3.4 KiB
TypeScript
108 lines
3.4 KiB
TypeScript
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
|
// This file is automatically generated. DO NOT EDIT
|
|
|
|
/**
|
|
* DocumentService 文档服务
|
|
* @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 ent$0 from "../models/ent/models.js";
|
|
|
|
/**
|
|
* CreateDocument 创建文档
|
|
*/
|
|
export function CreateDocument(title: string): Promise<ent$0.Document | null> & { cancel(): void } {
|
|
let $resultPromise = $Call.ByID(3360680842, title) as any;
|
|
let $typingPromise = $resultPromise.then(($result: any) => {
|
|
return $$createType1($result);
|
|
}) as any;
|
|
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
|
return $typingPromise;
|
|
}
|
|
|
|
/**
|
|
* DeleteDocument 删除文档
|
|
*/
|
|
export function DeleteDocument(id: number): Promise<void> & { cancel(): void } {
|
|
let $resultPromise = $Call.ByID(412287269, id) as any;
|
|
return $resultPromise;
|
|
}
|
|
|
|
/**
|
|
* GetDocumentByID 根据ID获取文档
|
|
*/
|
|
export function GetDocumentByID(id: number): Promise<ent$0.Document | null> & { cancel(): void } {
|
|
let $resultPromise = $Call.ByID(3468193232, id) as any;
|
|
let $typingPromise = $resultPromise.then(($result: any) => {
|
|
return $$createType1($result);
|
|
}) as any;
|
|
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
|
return $typingPromise;
|
|
}
|
|
|
|
/**
|
|
* ListAllDocumentsMeta 列出所有文档
|
|
*/
|
|
export function ListAllDocumentsMeta(): Promise<(ent$0.Document | null)[]> & { cancel(): void } {
|
|
let $resultPromise = $Call.ByID(3073950297) as any;
|
|
let $typingPromise = $resultPromise.then(($result: any) => {
|
|
return $$createType2($result);
|
|
}) as any;
|
|
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
|
return $typingPromise;
|
|
}
|
|
|
|
/**
|
|
* LockDocument 锁定文档
|
|
*/
|
|
export function LockDocument(id: number): Promise<void> & { cancel(): void } {
|
|
let $resultPromise = $Call.ByID(1889494473, id) as any;
|
|
return $resultPromise;
|
|
}
|
|
|
|
/**
|
|
* ServiceStartup 服务启动
|
|
*/
|
|
export function ServiceStartup(options: application$0.ServiceOptions): Promise<void> & { cancel(): void } {
|
|
let $resultPromise = $Call.ByID(1474135487, options) as any;
|
|
return $resultPromise;
|
|
}
|
|
|
|
/**
|
|
* UnlockDocument 解锁文档
|
|
*/
|
|
export function UnlockDocument(id: number): Promise<void> & { cancel(): void } {
|
|
let $resultPromise = $Call.ByID(222307930, id) as any;
|
|
return $resultPromise;
|
|
}
|
|
|
|
/**
|
|
* UpdateDocumentContent 更新文档内容
|
|
*/
|
|
export function UpdateDocumentContent(id: number, content: string): Promise<void> & { cancel(): void } {
|
|
let $resultPromise = $Call.ByID(3251897116, id, content) as any;
|
|
return $resultPromise;
|
|
}
|
|
|
|
/**
|
|
* UpdateDocumentTitle 更新文档标题
|
|
*/
|
|
export function UpdateDocumentTitle(id: number, title: string): Promise<void> & { cancel(): void } {
|
|
let $resultPromise = $Call.ByID(2045530459, id, title) as any;
|
|
return $resultPromise;
|
|
}
|
|
|
|
// Private type creation functions
|
|
const $$createType0 = ent$0.Document.createFrom;
|
|
const $$createType1 = $Create.Nullable($$createType0);
|
|
const $$createType2 = $Create.Array($$createType1);
|