import type { CommandHandler, Connector, ConnectorCapabilities, ConnectorMessage, MessageHandler, SlashCommandEntry } from "@/types"; import type { FileFolder } from "../../engine/files/fileFolder.js"; export type TelegramConnectorOptions = { token: string; allowedUids: string[]; mode?: "public" | "private"; polling?: boolean; clearWebhook?: boolean; statePath?: string | null; fileStore: FileFolder; dataDir: string; enableGracefulShutdown?: boolean; onFatal?: (reason: string, error?: unknown) => void; }; export declare class TelegramConnector implements Connector { capabilities: ConnectorCapabilities; private bot; private handlers; private commandHandlers; private pollingEnabled; private statePath; private lastUpdateId; private fileStore; private dataDir; private persistTimer; private typingTimers; private startingPolling; private commandSyncEnabled; private pendingCommands; private commandSyncTimer; private allowedUids; private mode; private shuttingDown; private clearWebhookOnStart; private clearedWebhook; constructor(options: TelegramConnectorOptions); onMessage(handler: MessageHandler): () => void; onCommand(handler: CommandHandler): () => void; updateCommands(commands: SlashCommandEntry[]): void; commandSyncStart(): void; sendMessage(targetId: string, message: ConnectorMessage): Promise; startTyping(targetId: string): () => void; setReaction(targetId: string, messageId: string, reaction: string): Promise; private sendFile; private sendTextWithFallback; private sendTextChunk; private sendFileWithOptions; private initialize; private trackUpdate; private loadState; private schedulePersist; private persistState; private quarantineStateFile; private startPolling; private handlePollingError; private isAllowedUid; private isAllowedTarget; private attachSignalHandlers; shutdown(reason?: string): Promise; private stopPolling; private ensureWebhookCleared; private stopTyping; private extractFiles; private documentNoticeText; private downloadFile; private scheduleCommandSync; private commandSyncFlush; } //# sourceMappingURL=connector.d.ts.map