import { Readable } from "node:stream";
/**
 * Stable JSON-serializer used to convert structured Telegram options
 * (entities, reply_markup, reply_parameters, etc.) into the string form
 * the Bot API expects on x-www-form-urlencoded / multipart bodies.
 *
 * Strings are passed through unchanged so callers may opt into
 * pre-serialized payloads.
 */
export declare function stringify(data: unknown): string;
/**
 * Lightweight `util.deprecate` wrapper. Logs each unique message exactly once.
 */
export declare const deprecate: (msg: string) => void;
export type FileInput = string | Buffer | Readable | NodeJS.ReadableStream;
export interface FileMeta {
    filename?: string;
    contentType?: string;
}
export interface PreparedFile {
    /** Final value to attach to a multipart form. */
    value: Buffer | Readable | NodeJS.ReadableStream;
    filename: string;
    contentType: string;
}
/**
 * Format an arbitrary file-like input into:
 *   - a {@link PreparedFile} (multipart upload)         OR
 *   - a string `fileId` / URL (no upload necessary)
 *
 * @param data           the user-supplied value (path, buffer, stream, or fileId/URL)
 * @param meta           optional filename / content type hints
 * @param filepathLookup whether to treat strings as filesystem paths (mirrors
 *                       legacy `options.filepath`).
 */
export declare function prepareFile(data: FileInput | undefined | null, meta?: FileMeta, filepathLookup?: boolean): Promise<{
    file: PreparedFile | null;
    fileId: string | null;
}>;
/**
 * Variant for multi-file methods (sendMediaGroup, sendPaidMedia, postStory, …).
 */
export declare function prepareFiles<T extends {
    media?: FileInput;
    data?: FileInput;
    fileOptions?: FileMeta;
    type?: string;
}>(attachKey: string, inputs: T[], defaultMeta?: FileMeta, filepathLookup?: boolean): Promise<{
    formData: Record<string, PreparedFile>;
    fileIds: Record<number, string>;
}>;
/**
 * Read a Node.js stream into a Buffer.
 */
export declare function streamToBuffer(stream: NodeJS.ReadableStream): Promise<Buffer>;
//# sourceMappingURL=utils.d.ts.map