import { Express } from 'express'; import TelegramBot, { Message, ParseMode } from 'node-telegram-bot-api'; import { BaseEventController, BaseEventControllerOptions } from './BaseEventController'; interface TelegramControllerOptions extends BaseEventControllerOptions { token: string; callbackUrl?: string; } interface SendMessageActionArgs { text: string; chatId: string | number; mode?: ParseMode; } declare type SendMessageResult = TelegramBot.Message; interface SendStickerActionArgs { chatId: string | number; sticker: string; } declare type SendStickerResult = TelegramBot.Message; interface ReadFileActionArgs { fileId: string; encoding?: string; } declare type ReadFileResult = string; interface TemporarilyDownloadFileLocallyActionArgs { fileId: string; } declare type TemporarilyDownloadFileLocallyResult = string; declare class TelegramController extends BaseEventController { private token; private bot; private callback?; name: string; constructor(options: TelegramControllerOptions); init(app: Express): Promise; action(name: string, args: { chatId: string | number; text: string; sticker: string; fileId: string; encoding?: string; mode?: ParseMode; }): Promise; sendMessageAction(args: SendMessageActionArgs): Promise; sendStickerAction(args: SendStickerActionArgs): Promise; readFileAction(args: ReadFileActionArgs): Promise; _temporarilyDownloadFileLocally(args: TemporarilyDownloadFileLocallyActionArgs): Promise; } export { TelegramController, TelegramControllerOptions, };