/// <reference types="node" />
import { Db, GridFSBucket, MongoClient } from 'mongodb';
import { FilesAdapter } from '../adapters/files.adapter';
import { SecurityController } from '../controllers/security.controller';
import { PassThrough } from 'stream';
import { BFastDatabaseConfigAdapter } from '../bfast.config';
export declare class GridFsStorageFactory implements FilesAdapter {
    private readonly mongoDatabaseURI;
    private readonly mongoOptions;
    constructor(securityController: SecurityController, configAdapter: BFastDatabaseConfigAdapter, mongoDatabaseURI: string, mongoOptions?: {});
    client: MongoClient;
    connectionPromise: Promise<Db>;
    canHandleFileStream: boolean;
    isS3: boolean;
    connect(): Promise<Db>;
    getBucket(bucket?: string): Promise<GridFSBucket>;
    createFile(filename: string, data: PassThrough, contentType: any, options?: any): Promise<string>;
    deleteFile(filename: string): Promise<any>;
    getFileData(filename: string, thumbnail?: boolean): Promise<any>;
    getFileLocation(filename: string, configAdapter: BFastDatabaseConfigAdapter): Promise<string>;
    getMetadata(filename: any): Promise<any>;
    handleFileStream(filename: string, req: any, res: any, contentType: any, thumbnail?: boolean): Promise<any>;
    listFiles(query?: {
        prefix: string;
        size: number;
        skip: number;
    }): Promise<any[]>;
    validateFilename(filename: string): Promise<void>;
    signedUrl(filename: string, thumbnail?: boolean): Promise<string>;
    private _saveFile;
}
