diff --git a/src/client/web/src/client/files.ts b/src/client/web/src/client/files.ts index 8cb788e..42d0dbc 100644 --- a/src/client/web/src/client/files.ts +++ b/src/client/web/src/client/files.ts @@ -5,6 +5,7 @@ import { UploadStatusResp, ListResp, ListUploadingsResp, + ListSharingsResp, } from "./"; const filePathQuery = "fp"; @@ -189,4 +190,11 @@ export class FilesClient extends BaseClient { }, }); }; + + listSharings = (): Promise> => { + return this.do({ + method: "get", + url: `${this.url}/v1/fs/sharings`, + }); + }; } diff --git a/src/client/web/src/client/index.ts b/src/client/web/src/client/index.ts index fa91ea0..bbada68 100644 --- a/src/client/web/src/client/index.ts +++ b/src/client/web/src/client/index.ts @@ -54,6 +54,10 @@ export interface ListUploadingsResp { uploadInfos: UploadInfo[]; } +export interface ListSharingsResp { + sharingDirs: string[]; +} + export interface IUsersClient { login: (user: string, pwd: string, captchaId: string, captchaInput:string) => Promise; logout: () => Promise; @@ -86,6 +90,10 @@ export interface IFilesClient { listHome: () => Promise>; listUploadings: () => Promise>; deleteUploading: (filePath: string) => Promise; + addSharing: (dirPath: string) => Promise; + deleteSharing: (dirPath: string) => Promise; + isSharing: (dirPath: string) => Promise; + listSharings: () => Promise>; } export interface Response {