-
Notifications
You must be signed in to change notification settings - Fork 0
/
env.d.ts
32 lines (32 loc) · 1.63 KB
/
env.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
interface LocalApi {
getUserConfig(): Promise<UserConfig>;
setUserConfig(config: UserConfig): Promise<LocalResult<null>>;
getCustomConfig(): Promise<CustomSetting>;
setCustomConfig(key: CustomSettingKey, value: any): Promise<LocalResult<null>>;
getLocalFileList(): Promise<Recordable[]>;
getLocalHistoryList(fileName: string): Promise<string[]>;
getLocalFileContent(fileName: string, history?: string): Promise<string>;
useLocalFileHistory(historyName: string): Promise<string>;
deleteLocalFile(fileName: string): Promise<unknown>;
renameLocalFile(fileName: string, newname: string): Promise<LocalResult<null>>;
saveLoads(fileName: string, data: object): Promise<LocalResult<null>>;
saveLocalFile(fileName: string, data: string | Buffer, folder?: string): Promise<LocalResult<null>>;
newWindow(url: string, browser?: boolean): Promise<LocalResult<null>>;
relaunch(): void;
maximizeWindow(): void;
minimizeWindow(): void;
closeWindow(): void;
openFolder(folderName: string): Promise<LocalResult<null>>;
concatExr(targetDir: string): Promise<LocalResult<string>>;
createShareLink(filename: string, uuid: string): Promise<LocalResult<string>>;
executeShareLink(link: string): Promise<LocalResult<Recordable>>;
starItem(filename: string, star: boolean): Promise<LocalResult<null>>;
openDevTools(): void;
clearCache(): void;
stringifyData(obj: object): Promise<LocalResult<string>>;
getRemoteFiles(): Promise<Recordable<string>[]>;
uploadRemoteFile(filename: string): Promise<void>;
downloadRemoteFile(filename: string): Promise<void>;
deleteRemoteFile(filename: string): Promise<void>;
createShortcut(): void;
}