import { MaybePromise } from '@fuman/utils';
import { ITelegramClient } from '../../client.types.js';
import { FileDownloadLocation, FileDownloadParameters } from '../../types/index.js';
import { tl } from '../../../tl/index.js';
export declare function _normalizeFileDownloadLocation(client: ITelegramClient, input: FileDownloadLocation): Promise<{
    location: tl.TypeInputFileLocation | tl.TypeInputWebFileLocation | Uint8Array<ArrayBufferLike>;
    dcId?: number;
    fileSize?: number;
}>;
/**
 * Download a file and return it as an iterable, which yields file contents
 * in chunks of a given size. Order of the chunks is guaranteed to be
 * consecutive.
 *
 * @param params  Download parameters
 */
export declare function downloadAsIterable(client: ITelegramClient, input: FileDownloadLocation, params?: FileDownloadParameters & {
    /**
     * A function to apply backpressure to the download.
     *
     * If the consumer isn't keeping up, the function is supposed to return a promise that resolves when the consumer is ready to receive more data.
     *
     * Note that this function will likely get called multiple times simultaneously, since the download is parallelized.
     */
    throttle?: (chunkSize: number) => MaybePromise<void>;
}): AsyncIterableIterator<Uint8Array>;
