///
///
///
import { AuthorizedHttpClient } from '../../utils/api-request';
import fs from 'fs';
import { Bucket } from '../bucket';
import { Readable } from 'stream';
import { MultipartUpload } from './multipart-upload';
import { IStratusMultipartSummaryRes } from '../../utils/pojo/stratus';
export declare class TransferManager {
#private;
_requester: AuthorizedHttpClient;
bucket: Bucket;
constructor(bucketInstance: Bucket);
/**
* Creates a new multipart upload instance for uploading an object in parts.
* @param key - The name of the object to be uploaded.
* @param uploadId - (Optional) Upload ID for the multipart upload session.
* If not provided, a new upload is initiated.
* @returns {MultipartUpload} An instance of the MultipartUpload.
*/
createMultipartInstance(key: string, uploadId?: string): Promise;
/**
* Creates a new multipart upload instance for uploading an object in parts.
* @param key - The name of the object to be uploaded.
* @param options - (Optional) Configuration options for the multipart upload:
* - `uploadId` (string): Upload ID for existing multipart upload session.
* If not provided, a new upload is initiated.
* - `overwrite` (boolean): Whether to overwrite existing object.
* @returns {MultipartUpload} An instance of the MultipartUpload.
*/
createMultipartInstance(key: string, options?: {
uploadId?: string;
overwrite?: boolean;
}): Promise;
/**
* Uploads an object in multiple parts.
* This method divides the object into smaller parts and uploads them concurrently.
* @param key - The name of the object to be uploaded.
* @param body - The object body as a readable stream.
* @param partSize - The size (in MB) of each part.
* @param concurrency - The maximum number of parts to upload concurrently. Default is 5.
* @returns {IStratusMultipartSummaryRes} The result of the multipart upload, including the status and summary.
*/
putObjectAsParts(key: string, body: fs.ReadStream, partSize: number, concurrency?: number): Promise;
/**
* Uploads an object in multiple parts.
* This method divides the object into smaller parts and uploads them concurrently.
* @param key - The name of the object to be uploaded.
* @param body - The object body as a readable stream.
* @param partSize - The size (in MB) of each part.
* @param options - Configuration options for the multipart upload:
* - `concurrency` (number): The maximum number of parts to upload concurrently. Default is 5.
* - `overwrite` (boolean): Whether to overwrite existing object.
* @returns {IStratusMultipartSummaryRes} The result of the multipart upload, including the status and summary.
*/
putObjectAsParts(key: string, body: fs.ReadStream, partSize: number, options?: {
concurrency?: number;
overwrite?: boolean;
}): Promise;
/**
* Retrieves the object as an iterable of multiple parts.
* This method allows iterating over large objects without loading the entire object into memory.
* @param key - The name of the object to retrieve.
* @param partSize - The size (in MB) of each part.
* @param versionId - (Optional) The version ID of the object to retrieve.
* @returns {AsyncGenerator} An asynchronous generator that yields each part of the object as a Buffer.
*/
getIterableObject(key: string, partSize: number, versionId?: string): AsyncGenerator;
/**
* Generates downloaders for each part of the object.
* This method returns functions that can be called to download specific parts of an object.
* @param key - The name of the object.
* @param partSize - The size (in MB) of each part.
* @param versionId - (Optional) The version ID of the object to retrieve.
* @returns { Array<() => Promise } An array of functions that return a readable stream for each part of the object.
*/
generatePartDownloaders(key: string, partSize: number, versionId?: string): Promise Promise>>;
validateObjectSize(size: number): boolean;
validatePartSize(partSize: number): boolean;
}