mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-29 18:00:51 +01:00
33 lines
1.1 KiB
Go
33 lines
1.1 KiB
Go
import { ComputedRef } from 'vue';
|
|
|
|
declare global {
|
|
interface FileServices<T> extends Services<T> {
|
|
listDir: (
|
|
id: string,
|
|
path: string
|
|
) => Promise<ResponseWithData<FileNavItem[]>>;
|
|
listRootDir: (id: string) => Promise<ResponseWithData<FileNavItem[]>>;
|
|
getFile: (id: string, path: string) => Promise<ResponseWithData<string>>;
|
|
getFileInfo: (
|
|
id: string,
|
|
path: string
|
|
) => Promise<ResponseWithData<FileNavItem>>;
|
|
saveFile: (id: string, path: string, data: string) => Promise<Response>;
|
|
saveFileBinary: (id: string, path: string, file: File) => Promise<Response>;
|
|
saveFilesBinary: (
|
|
id: string,
|
|
files: { path: string; file: File }[],
|
|
targetDirectory?: string
|
|
) => Promise<Response>;
|
|
saveDir: (id: string, path: string) => Promise<Response>;
|
|
renameFile: (
|
|
id: string,
|
|
path: string,
|
|
new_path: string
|
|
) => Promise<Response>;
|
|
deleteFile: (id: string, path: string) => Promise<Response>;
|
|
copyFile: (id: string, path: string, new_path: string) => Promise<Response>;
|
|
fileContent: ComputedRef<string>;
|
|
}
|
|
}
|