type ParseMode = "HTML" | "MarkdownV2";
interface InlineKeyboardButton {
    text: string;
    callback_data?: string;
    url?: string;
}
interface InlineKeyboardMarkup {
    inline_keyboard: InlineKeyboardButton[][];
}
interface TelegramUser {
    id: number;
    is_bot: boolean;
    first_name?: string;
    last_name?: string;
    username?: string;
}
interface TelegramChat {
    id: number;
    type: "private" | "group" | "supergroup" | "channel";
    title?: string;
    username?: string;
}
interface TelegramPhotoSize {
    file_id: string;
    file_unique_id: string;
    width: number;
    height: number;
    file_size?: number;
}
interface TelegramVoice {
    file_id: string;
    file_unique_id: string;
    duration: number;
    mime_type?: string;
    file_size?: number;
}
interface TelegramDocument {
    file_id: string;
    file_unique_id: string;
    file_name?: string;
    mime_type?: string;
    file_size?: number;
}
interface TelegramMessage {
    message_id: number;
    from?: TelegramUser;
    chat: TelegramChat;
    date: number;
    text?: string;
    caption?: string;
    voice?: TelegramVoice;
    photo?: TelegramPhotoSize[];
    document?: TelegramDocument;
    reply_to_message?: TelegramMessage;
    entities?: TelegramMessageEntity[];
}
interface TelegramMessageEntity {
    type: string;
    offset: number;
    length: number;
}
interface TelegramCallbackQuery {
    id: string;
    from: TelegramUser;
    message?: TelegramMessage;
    data?: string;
}
interface TelegramUpdate {
    update_id: number;
    message?: TelegramMessage;
    edited_message?: TelegramMessage;
    callback_query?: TelegramCallbackQuery;
}
interface TelegramFile {
    file_id: string;
    file_unique_id: string;
    file_size?: number;
    file_path?: string;
}
interface SendMessageOptions {
    parseMode?: ParseMode;
    replyMarkup?: InlineKeyboardMarkup;
    replyToMessageId?: number;
    disableWebPagePreview?: boolean;
    disableNotification?: boolean;
}
interface SendVoiceOptions {
    caption?: string;
    parseMode?: ParseMode;
    duration?: number;
    replyMarkup?: InlineKeyboardMarkup;
    replyToMessageId?: number;
    fileName?: string;
    mimeType?: string;
}
interface SendPhotoOptions {
    caption?: string;
    parseMode?: ParseMode;
    replyMarkup?: InlineKeyboardMarkup;
    replyToMessageId?: number;
    fileName?: string;
    mimeType?: string;
}
interface EditMessageOptions {
    parseMode?: ParseMode;
    replyMarkup?: InlineKeyboardMarkup;
    disableWebPagePreview?: boolean;
}
interface AnswerCallbackQueryOptions {
    text?: string;
    showAlert?: boolean;
    url?: string;
    cacheTime?: number;
}
interface TelegramBotConfig {
    token: string;
    webhookSecret?: string;
    apiBase?: string;
    fetch?: typeof fetch;
}
interface TelegramBot {
    readonly token: string;
    readonly webhookSecret?: string;
    readonly apiBase: string;
    sendMessage(chatId: number | string, text: string, opts?: SendMessageOptions): Promise<TelegramMessage>;
    sendVoice(chatId: number | string, voice: Buffer | Uint8Array, opts?: SendVoiceOptions): Promise<TelegramMessage>;
    sendPhoto(chatId: number | string, photo: Buffer | Uint8Array, opts?: SendPhotoOptions): Promise<TelegramMessage>;
    editMessage(chatId: number | string, messageId: number, text: string, opts?: EditMessageOptions): Promise<TelegramMessage | true>;
    answerCallbackQuery(callbackQueryId: string, opts?: AnswerCallbackQueryOptions): Promise<true>;
    getFile(fileId: string): Promise<TelegramFile>;
    callApi<T = unknown>(method: string, payload?: Record<string, unknown>): Promise<T>;
}

export type { AnswerCallbackQueryOptions as A, EditMessageOptions as E, InlineKeyboardButton as I, ParseMode as P, SendMessageOptions as S, TelegramBot as T, InlineKeyboardMarkup as a, SendPhotoOptions as b, SendVoiceOptions as c, TelegramBotConfig as d, TelegramCallbackQuery as e, TelegramChat as f, TelegramDocument as g, TelegramFile as h, TelegramMessage as i, TelegramPhotoSize as j, TelegramUpdate as k, TelegramUser as l, TelegramVoice as m };
