import { Observable } from "rxjs";
export {};
import { Logger } from "../common/Logger";
import { EventEmitter } from "events";
import { Core } from "../Core";
import { FileDescriptor } from "../common/models/FileDescriptor";
import { GenericService } from "./GenericService";
declare class FileServer extends GenericService {
    private _capabilities;
    private transferPromiseQueue;
    private _fileStorageService;
    ONE_KILOBYTE: any;
    static getClassName(): string;
    getClassName(): string;
    static getAccessorName(): string;
    getAccessorName(): string;
    constructor(_core: Core, _eventEmitter: EventEmitter, _logger: Logger, _startConfig: {
        start_up: boolean;
        optional: boolean;
    });
    get capabilities(): Promise<any>;
    start(_options: any): Promise<unknown>;
    stop(): Promise<unknown>;
    init(useRestAtStartup: boolean): Promise<unknown>;
    /**
     *
     * @private
     * @description
     *    Method retrieve data from server using range request mecanism (RFC7233)
     * @returns {Object} structure containing the response data from server and the index
     *
     * @param {string} url (required) server url for request
     * @param {number} minRange (required) minimum value of range
     * @param {number} maxRange (required) maximum value of range
     * @param {number} index (required) index of the part. Used to re-assemble the data     *
     */
    getPartialDataFromServer(url: string, minRange: number, maxRange: number, index: number): Promise<unknown>;
    getPartialBufferFromServer(url: string, minRange: number, maxRange: number, index: number): Promise<unknown>;
    /**
     * @method getBufferFromUrlWithOptimization
     * @description
     * Method creates buffer from a file retrieved from server using optimization (range request) whenever necessary
     *
     * @param {string} url (required) server url for request
     * @param {string} mime (required) Mime type of the blob to be created
     * @param {number} fileSize=0 (optional) size of file to be retrieved. Default: 0
     * @param {string} fileName (optional) name of file to be downloaded
     * @param {string} uploadedDate
     * @returns {Buffer} Buffer created from data received from server
     *
     */
    getBufferFromUrlWithOptimization(url: string, mime: string, fileSize: number, fileName: string, uploadedDate: string): Promise<unknown>;
    /**
     * @method getFileFromUrlWithOptimization
     * @description
     * Method creates buffer from a file retrieved from server using optimization (range request) whenever necessary
     *
     * @param {string} destFile
     * @param {string} url (required) server url for request
     * @param {string} mime (required) Mime type of the blob to be created
     * @param {number} fileSize=0 (optional) size of file to be retrieved. Default: 0
     * @param {string} fileName (optional) name of file to be downloaded
     * @param {string} uploadedDate (optional) date of the upload
     * @returns {Buffer} Buffer created from data received from server
     *
     */
    getFileFromUrlWithOptimization(destFile: string, url: string, mime: string, fileSize: number, fileName: string, uploadedDate: string): Promise<unknown>;
    /***
     * @private
     * @param fileDescriptor
     * @param large
     */
    getBlobThumbnailFromFileDescriptor(fileDescriptor: any, large?: boolean): Promise<void>;
    /**
     * @description
     * Method sends data file to server
     *
     * @private
     * @param {string} fileId (required) file descriptor ID of file to be sent
     * @param {string} filePath (required) file path to file to be sent
     * @param {string} mime (required) mime type of file
     * @returns {Promise<FileDescriptor>} file descriptor data received as response from server or http error response
     *
     */
    _uploadAFile(fileId: string, filePath: string, mime: string): Promise<unknown>;
    /**
     * @description
     * Method sends data to server using range request mecanism (RFC7233)
     *
     * @private
     * @param {string} fileId (required) file descriptor ID of file to be sent
     * @param {Buffer} file (required) file to be sent
     * @param {number} index (required) index of the part. Used to indicate the part number to the server
     * @returns {Promise<{}>} file descriptor data received as response from server or http error response
     *
     */
    _sendPartialDataToServer(fileId: string, file: Buffer, index: number): Promise<unknown>;
    /**
     * @description
     * Upload File ByChunk progressCallback callback is displayed as part of the Requester class.
     * @callback uploadAFileByChunk~progressCallback
     * @param {FileDescriptor} fileDescriptor
     */
    /**
     * @method uploadAFileByChunk
     * Method sends data to server using range request mecanism (RFC7233)
     *
     * @private
     * @param {FileDescriptor} fileDescriptor (required) file descriptor Object of file to be sent
     * @param {string} filePath (required) filePath of the file to be sent
//     * @param {uploadAFileByChunk~progressCallback} progressCallback (required) initial size of whole file to be sent before partition
     * @returns {Promise<{FileDescriptor}>} file descriptor data received as response from server or http error response
     *
     */
    uploadAFileByChunk(fileDescriptor: FileDescriptor, filePath: string): Promise<any>;
    isTransferInProgress(): any;
    cancelAllTransfers(): void;
    /**
     * @method getBlobFromUrlWithOptimization
     * @description
     * Method creates blob from a file retrieved from server using optimization (range request) whenever necessary
     *
     * @param {string} url (required) server url for request
     * @param {string} mime (required) Mime type of the blob to be created
     * @param {number} fileSize=0 (optional) size of file to be retrieved. Default: 0
     * @param {string} fileName (optional) name of file to be downloaded
     * @param {string} uploadedDate
     * @returns {Promise<{
     *                          buffer : Array<any>,
     *                           type: string, // mime type
     *                           fileSize: number,
     *                           fileName: string
     *                       }>} Object created from data received from server.
     */
    getBlobFromUrlWithOptimization(url: string, mime: string, fileSize: number, fileName: string, uploadedDate: string): Promise<unknown>;
    /**
     * @method getBlobFromUrlWithOptimizationObserver
     * @description
     * Method creates blob from a file retrieved from server using optimization (range request) whenever necessary
     *
     * @param {string} url (required) server url for request
     * @param {string} mime (required) Mime type of the blob to be created
     * @param {number} fileSize=0 (optional) size of file to be retrieved. Default: 0
     * @param {string} fileName (optional) name of file to be downloaded
     * @param {string} uploadedDate
     * @returns {Promise<Observable<any>} Observer returning a Blob created from data received from server
     *
     */
    getBlobFromUrlWithOptimizationObserver(url: string, mime: string, fileSize: number, fileName: string, uploadedDate: string): Promise<Observable<any>>;
    /**
     * @description
     * Method creates blob from a file retrieved from server
     *
     * @private
     * @param {string} url (required) server url for request
     * @param {string} mime (required) Mime type of the blob to be created
     * @param {number} fileSize (required) size of file to be retrieved
     * @param {string} fileName (required) name of file to be downloaded
     * @returns {Promise<{
     *                          buffer : Array<any>,
     *                           type: string, // mime type
     *                           fileSize: number,
     *                           fileName: string
     *                       }>} Blob created from data received from server
     */
    getBlobFromUrl(url: string, mime: string, fileSize: number, fileName: string): Promise<unknown>;
    /**
     * @description
     * Method retrieves user quota (capabilities) for user
    *
    * @returns {Object} user quota for user
    *
    */
    getServerCapabilities(): Promise<unknown>;
}
export { FileServer as FileServerService };
