import { BasePlatformAdapter, MessageEvent, ProcessingOutcome, SendResult } from './platform-base.js'; import type { PlatformConfig } from './platform-base.js'; export interface TelegramFullConfig extends PlatformConfig { token: string; webhookUrl?: string; webhookPort?: number; disableLinkPreviews?: boolean; replyToMode?: 'first' | 'recent' | 'none'; allowedUserIds?: string[]; dmTopics?: Array<{ name: string; iconColor?: number; }>; } interface TelegramMessage { message_id: number; from?: { id: number; username?: string; first_name?: string; last_name?: string; is_bot?: boolean; }; chat: { id: number; type: string; title?: string; }; text?: string; caption?: string; photo?: Array<{ file_id: string; width: number; height: number; }>; document?: { file_id: string; file_name?: string; mime_type?: string; }; voice?: { file_id: string; duration: number; mime_type?: string; }; audio?: { file_id: string; duration: number; mime_type?: string; }; video?: { file_id: string; duration: number; mime_type?: string; }; sticker?: { file_id: string; emoji?: string; }; reply_to_message?: TelegramMessage; message_thread_id?: number; entities?: Array<{ type: string; offset: number; length: number; }>; media_group_id?: string; } interface TelegramUpdate { update_id: number; message?: TelegramMessage; edited_message?: TelegramMessage; callback_query?: { id: string; from: { id: number; username?: string; }; message?: TelegramMessage & { chat: { id: number; }; }; data?: string; }; message_reaction?: { chat: { id: number; }; message_id: number; user?: { id: number; }; new_reaction: Array<{ type: string; emoji?: string; }>; }; } declare const MAX_MESSAGE_LENGTH = 4096; declare function escapeMdv2(text: string): string; export declare class TelegramFullChannel extends BasePlatformAdapter { private token; private offset; private webhookMode; private disableLinkPreviews; private replyToMode; private allowedUserIds; private pollPromise; private readonly baseUrl; private typingTasks; private rateLimitUntil; private conflictCount; constructor(config: TelegramFullConfig); connect(): Promise; disconnect(): Promise; private pollLoop; private isPollingConflict; private getUpdates; private apiCall; private handleUpdate; private handleMessage; private detectMessageType; private handleCallbackQuery; send(chatId: string, content: string, replyTo?: string, metadata?: Record): Promise; editMessage(chatId: string, messageId: string, content: string, _finalize?: boolean): Promise; sendTyping(chatId: string, metadata?: Record): Promise; stopTyping(chatId: string): Promise; sendImage(chatId: string, imageUrl: string, caption?: string, replyTo?: string, metadata?: Record): Promise; sendAnimation(chatId: string, animationUrl: string, caption?: string, replyTo?: string, metadata?: Record): Promise; sendDocument(chatId: string, fileUrl: string, caption?: string, fileName?: string, replyTo?: string): Promise; sendVoice(chatId: string, audioUrl: string, caption?: string, replyTo?: string): Promise; sendInlineKeyboard(chatId: string, text: string, buttons: Array>): Promise; setReaction(chatId: string, messageId: string, emoji: string): Promise; getChatInfo(chatId: string): Promise>; formatMessage(content: string): string; handleWebhookUpdate(update: TelegramUpdate): void; getOffset(): number; onProcessingComplete(_event: MessageEvent, _outcome: ProcessingOutcome): void; protected splitMessage(text: string, maxLen: number): string[]; private stripUndefined; } export { MAX_MESSAGE_LENGTH, escapeMdv2 }; //# sourceMappingURL=telegram-full.d.ts.map