1 | import Client from "./client";
|
2 | import FileSystemElement from "./fileSystemElement";
|
3 | export declare enum SharePermission {
|
4 | all = 31,
|
5 | read = 1,
|
6 | update = 2,
|
7 | create = 4,
|
8 | delete = 8,
|
9 | share = 16
|
10 | }
|
11 | export interface ICreateShare {
|
12 | "fileSystemElement": FileSystemElement;
|
13 | "publicUpload"?: boolean;
|
14 | "password"?: string;
|
15 | }
|
16 | export default class Share {
|
17 | static getShare(client: Client, id: string): Promise<Share>;
|
18 | static createShareRequestBody(createShare: ICreateShare): string;
|
19 | private client;
|
20 | private memento;
|
21 | private constructor();
|
22 | delete(): Promise<void>;
|
23 | setExpiration(expiration: Date): Promise<void>;
|
24 | /**
|
25 | * set a new password
|
26 | * @param password
|
27 | */
|
28 | setPassword(password: string): Promise<void>;
|
29 | setNote(note: string): Promise<void>;
|
30 | private initialize;
|
31 | /**
|
32 | * token
|
33 | * The token is readonly
|
34 | */
|
35 | get token(): string;
|
36 | /**
|
37 | * share url
|
38 | * The share url is readonly
|
39 | */
|
40 | get url(): string;
|
41 | /**
|
42 | * expiration
|
43 | * The expiration is readonly
|
44 | */
|
45 | get expiration(): Date | null;
|
46 | /**
|
47 | * note
|
48 | * The note is readonly
|
49 | */
|
50 | get note(): string;
|
51 | /**
|
52 | * id
|
53 | * The id is readonly
|
54 | */
|
55 | get id(): string;
|
56 | }
|