/** * Telegram channel adapter: getUpdates long-polling intake, normalized message * routing into `dsh-connect`, and replies back to Telegram (text / markdown / * streaming edits / inline-keyboard choice prompts). * * @module dsh-connect/telegram */ import type { Context } from "@deepseek-ai/cordis"; import z from "@deepseek-ai/schemastery"; import { type TelegramConfig } from "./adapter.js"; export { TelegramAdapter } from "./adapter.js"; export type { TelegramConfig } from "./adapter.js"; export { TelegramClient } from "./client.js"; export type { TelegramClientConfig, TelegramMessage, TelegramUpdate } from "./client.js"; export { markdownToTelegramHtml, escapeHtml, buildInlineKeyboard, encodeMessageRef, decodeMessageRef, isBotMentioned } from "./adapter.js"; /** Plugin config; secrets may come from config or the TELEGRAM_BOT_TOKEN environment. */ export declare const Config: z; language: z<"zh" | "en", "zh" | "en", "plain">; requireMention: z; pollingTimeoutSeconds: z; baseUrl: z; /** * Access control for *this* channel. Telegram's user and chat ids are numeric, * so they cannot share a list with Feishu's `ou_`/`oc_` ids. Empty means * "everyone"; absent falls back to the top-level `allowUsers`/`allowChats`. */ allowUsers: z; allowChats: z; }>>, Schemastery.ObjectT; language: z<"zh" | "en", "zh" | "en", "plain">; requireMention: z; pollingTimeoutSeconds: z; baseUrl: z; /** * Access control for *this* channel. Telegram's user and chat ids are numeric, * so they cannot share a list with Feishu's `ou_`/`oc_` ids. Empty means * "everyone"; absent falls back to the top-level `allowUsers`/`allowChats`. */ allowUsers: z; allowChats: z; }>>, "plain">; interface ConnectLike { registerAdapter(adapter: unknown): void; } /** * Register and start the Telegram adapter. `connect` is the already-constructed * `ConnectService` instance (passed from the merged entry, not resolved via * `ctx.get` — that returns undefined during the same plugin's `apply`). */ export declare function register(connect: ConnectLike, config: (TelegramConfig | null) | undefined, ctx: Context): void; /** * Compatibility shell for the old split-plugin registration path (when `connect` * is an already-active, separate plugin). The merged entry calls `register` * directly instead, because `ctx.get("connect")` returns undefined inside this * plugin's own `apply`. */ export declare function apply(ctx: Context, config?: TelegramConfig | null): void; //# sourceMappingURL=index.d.ts.map