nextcloud-node-client
Version:
Nextcloud client API for node.js TypeScript applications
57 lines (56 loc) • 1.27 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 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>;
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;
}