import { FileDownloadLocation, FileDownloadParameters, ITelegramStorageProvider, PartialOnly, User } from '@mtcute/core'; import { BaseTelegramClientOptions as BaseTelegramClientOptionsBase, TelegramClientOptions, BaseTelegramClient as BaseTelegramClientBase, TelegramClient as TelegramClientBase } from '@mtcute/core/client.js'; import { Readable } from 'node:stream'; export type { TelegramClientOptions }; export interface BaseTelegramClientOptions extends PartialOnly, 'transport' | 'crypto' | 'platform'> { /** * Storage to use for this client. * * If a string is passed, it will be used as * a name for an SQLite database file. * * @default `"client.session"` */ storage?: string | ITelegramStorageProvider; } export declare class BaseTelegramClient extends BaseTelegramClientBase { constructor(opts: BaseTelegramClientOptions); } /** * Telegram client for use in Bun */ export declare class TelegramClient extends TelegramClientBase { constructor(opts: TelegramClientOptions); private _rl?; /** * Tiny wrapper over Node `readline` package * for simpler user input for `.start()` method. * * Associated `readline` interface is closed * after `start()` returns, or with the client. * * @param text Text of the question */ input(text: string): Promise; destroy(): Promise; start(params?: Parameters[0]): Promise; downloadToFile(filename: string, location: FileDownloadLocation, params?: FileDownloadParameters | undefined): Promise; downloadAsNodeStream(location: FileDownloadLocation, params?: FileDownloadParameters | undefined): Readable; }