nextcloud-node-client
Version:
Nextcloud client API for node.js TypeScript applications
71 lines (70 loc) • 1.6 kB
TypeScript
import Client from "./client";
import FileSystemElement from "./fileSystemElement";
export declare enum SharePermission {
all = 31,
read = 1,
update = 2,
create = 4,
delete = 8,
share = 16
}
export interface ICreateShare {
"fileSystemElement": FileSystemElement;
"publicUpload"?: boolean;
"password"?: string;
}
export declare enum ShareItemType {
file = "file",
folder = "folder"
}
export default class Share {
static getShare(client: Client, id: string): Promise<Share>;
static createShareRequestBody(createShare: ICreateShare): string;
private client;
private memento;
private constructor();
delete(): Promise<void>;
setExpiration(expiration: Date): Promise<void>;
/**
* set a new password
* @param password
*/
setPassword(password: string): Promise<void>;
setPublicUpload(): Promise<void>;
setNote(note: string): Promise<void>;
private initialize;
/**
* token
* The token is readonly
*/
get token(): string;
/**
* share url
* The share url is readonly
*/
get url(): string;
/**
* expiration
* The expiration is readonly
*/
get expiration(): Date | null;
/**
* note
* The note is readonly
*/
get note(): string;
/**
* id
* The id is readonly
*/
get id(): string;
/**
* returns true if the share akkows upload
*/
get publicUpload(): boolean;
/**
* item type
* The type of the share item file or folder
*/
get itemType(): ShareItemType;
}