import Lock from "./lock"; export interface IFileVersion { version: string; time: Date; preview: string; deleted: boolean; } export interface IFile { _id: string; type: string; name: string; folder: string; deleted: boolean; active: IFileVersion; versions: IFileVersion[]; user: string; application: string; } export interface IHistory { file: IFile; history: IFileVersion[]; } 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 NotFound extends Error { type: string; constructor(); } export declare class BadRequest extends Error { type: string; constructor(); } export default class SecureFileWrapper { private server; private _jwtObservableServer; jwtObservable: { subscribe: (callback: import("./observable").ObserverCallback<((jwt: string) => void)[]>) => void; unsubscribe: (callback: import("./observable").ObserverCallback<((jwt: string) => void)[]>) => void; }; jwt: string; auth_lock: Lock; constructor(server: string); getJWT(): Promise; makeRequest(endpoint: string, method: "POST" | "GET" | "PUT" | "DELETE", query: any, body?: ArrayBuffer | ArrayBufferView, second?: boolean): any; list(folder?: string): Promise; create(name: string, data: ArrayBuffer | ArrayBufferView, type: "text" | "binary", folder?: string, preview?: string): Promise; get(id: string, version?: string): Promise; update(id: string, data: ArrayBuffer | ArrayBufferView, preview?: string): Promise; delete(id: string): Promise; history(id: string): Promise; restore(id: string, version: string): Promise; }