import { type IAgentRuntime, type TestSuite } from '@elizaos/core'; import type { Context } from 'telegraf'; /** * Represents a test suite for testing Telegram functionality. * * This test suite includes methods to initialize and validate a Telegram bot connection, * send basic text messages to a Telegram chat, send text messages with image attachments, * handle and process incoming Telegram messages, and process and validate image attachments * in incoming messages. * * @implements {TestSuite} */ export declare class TelegramTestSuite implements TestSuite { name: string; private telegramClient; private bot; private messageManager; tests: { name: string; fn: (runtime: IAgentRuntime) => Promise; }[]; /** * Constructor for initializing a set of test cases for a Telegram bot. * * @constructor * @property {Array} tests - An array of test cases with name and corresponding test functions. * @property {string} tests.name - The name of the test case. * @property {function} tests.fn - The test function to be executed. */ constructor(); /** * Retrieves the Telegram test chat ID from environment variables. * * Reference on getting the Telegram chat ID: * https://stackoverflow.com/a/32572159 */ /** * Validates the chat ID by checking if it is set in the runtime settings or environment variables. * If not set, an error is thrown with a message instructing to provide a valid chat ID. * @param {IAgentRuntime} runtime - The runtime object that provides access to the settings and environment variables. * @throws {Error} If TELEGRAM_TEST_CHAT_ID is not set in the runtime settings or environment variables. * @returns {string} The validated chat ID. */ validateChatId(runtime: IAgentRuntime): string | number; getChatInfo(runtime: IAgentRuntime): Promise; testCreatingTelegramBot(runtime: IAgentRuntime): Promise; testSendingTextMessage(runtime: IAgentRuntime): Promise; testSendingMessageWithAttachment(runtime: IAgentRuntime): Promise; testHandlingMessage(runtime: IAgentRuntime): Promise; testProcessingImages(runtime: IAgentRuntime): Promise; getFileId(chatId: string, imageUrl: string): Promise; }