import type { Api, BotError } from "grammy"; import type { Message } from "grammy/types"; import type { ConversationEvent } from "../../types.js"; import type { Workspace } from "../../office/types.js"; import type { TelegramMessagingBot } from "./bot.js"; export interface TelegramEvent extends ConversationEvent { type: "message" | "command"; userName?: string; } interface TelegramMessageUpdate { message: Message | undefined; } export type TelegramUpdateHandler = (ctx: TelegramMessageUpdate) => Promise; export interface TelegramClient { api: Pick; catch(errorHandler: (error: BotError) => void): void; start(): Promise; stop(): Promise; command(command: string, handler: TelegramUpdateHandler): unknown; on(filter: "message", handler: TelegramUpdateHandler): unknown; } export interface TelegramMessagingBotOptions { token: string; workspace: Workspace; client?: TelegramClient; onPollingFailure?: (error: Error) => void; } export type TelegramResponseBot = Pick; export {}; //# sourceMappingURL=types.d.ts.map