/** * Telegram Channel Adapter * * Uses Telegram Bot API with long polling to receive messages * and send responses. */ import { BaseChannelAdapter, type ChannelConfig, type ChannelProfile } from "./base.js"; import type { OutboundMessage } from "../types/index.js"; /** Telegram channel configuration */ export interface TelegramConfig { /** Bot token from @BotFather */ botToken: string; /** Polling interval in ms (default: 1000) */ pollingInterval?: number; /** Allowed chat IDs (empty = allow all) */ allowedChatIds?: string[]; } /** Telegram adapter */ export declare class TelegramAdapter extends BaseChannelAdapter { readonly channelType = "telegram"; private botToken; private pollingInterval; private allowedChatIds; private offset; private pollingTimeout?; private botInfo?; private abortController?; constructor(config: ChannelConfig); /** Initialize the adapter */ initialize(): Promise; /** Shutdown the adapter */ shutdown(): Promise; /** Send a message to Telegram */ send(message: OutboundMessage): Promise; /** Get channel profile */ getProfile(): Promise; /** Start polling for updates */ private startPolling; private pollUpdates; /** Process a Telegram update */ private processUpdate; /** Check if bot is mentioned in message */ private isMentioned; /** Clean mentions from message text */ private cleanMentions; private apiCall; /** Extract chat ID from target */ private extractChatId; } //# sourceMappingURL=telegram.d.ts.map