/// <reference types="node" />
import { Db, GridFSBucket, MongoClient } from 'mongodb';
import { FilesAdapter } from '../adapters/files.adapter';
import { PassThrough, Stream } from 'stream';
import { BFastDatabaseOptions } from '../bfast-database.option';
export declare class GridFsStorageFactory implements FilesAdapter {
    private readonly mongoDatabaseURI;
    private readonly mongoOptions;
    constructor(configAdapter: BFastDatabaseOptions, 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<T>(filename: string, asStream?: boolean): Promise<T>;
    getFileStream(filename: any): Promise<Stream>;
    getFileLocation(filename: string, configAdapter: BFastDatabaseOptions): Promise<string>;
    getMetadata(filename: any): Promise<any>;
    handleFileStream(filename: string, req: any, res: any, contentType: any): Promise<any>;
    listFiles(query?: {
        prefix: string;
        size: number;
        skip: number;
    }): Promise<any[]>;
    validateFilename(filename: string): Promise<void>;
    signedUrl(filename: string): Promise<string>;
    private _saveFile;
}
