/// import "isomorphic-fetch"; export interface File { _id: string; type: "binary" | "text"; name: string; time: string; preview: string; version: string; meta: string; } export interface History { file: File; history: File[]; } export default class SecureFile { private Server; private Username; private PrivateKey; private jwt_enabled; private JWT; constructor(server: string, username: string, private_key: string, jwt?: boolean); private getCode(); private getJWT(); makeRequest(endpoint: string, method: "POST" | "GET" | "PUT" | "DELETE", query: any, body?: Buffer, jwt?: boolean): any; test(): Promise<{ user: string; test: true; }>; list(folder?: string): Promise; create(name: string, data: Buffer, type: "text" | "binary", folder?: string, preview?: Buffer, meta?: string): Promise; get(id: string, version?: string): Promise; update(id: string, data: Buffer, preview?: Buffer, meta?: string): Promise; delete(id: string): Promise; history(id: string): Promise; } export declare class NoConnection extends Error { type: string; constructor(); } export declare class Unauthorized extends Error { type: string; constructor(); } export declare class NoPermission extends Error { type: string; constructor(); } export declare class InvalidJWT extends Error { type: string; constructor(); } export declare class NotFound extends Error { type: string; constructor(); } export declare class BadRequest extends Error { type: string; constructor(); }