import { d as BaseConfig, b as ChatPayload } from "../../../packem_shared/types.d-C7l7qdMG.js"; import { a as ProviderFactory, P as Provider } from "../../../packem_shared/provider.d-Dh32nRm9.js"; import { l as ReceiverOptions, R as Receiver } from "../../../packem_shared/types.d-4T7bNo4x.js"; import "../../../packem_shared/types.d-BXfGenMH.js"; interface TelegramConfig extends BaseConfig { /** Telegram bot token (`123456:ABC-DEF...`). Required. */ botToken: string; /** Default chat id used when the payload omits `to`. */ defaultChatId?: number | string; /** Override the API base URL. */ endpoint?: string; /** Default parse mode (`MarkdownV2`, `HTML`, ...). */ parseMode?: string; } /** * Telegram chat provider via the Bot API. Edge-safe — `fetch` only. * @see https://core.telegram.org/bots/api#sendmessage */ declare const telegramProvider$1: ProviderFactory; /** * Options for the Telegram inbound receiver. */ interface TelegramReceiverOptions extends ReceiverOptions { /** The outbound Telegram chat provider used by `context.reply()`. Optional. */ provider?: Provider; /** * The secret token configured via `setWebhook`'s `secret_token`. When set, the receiver * requires a matching `X-Telegram-Bot-Api-Secret-Token` header. Strongly recommended — * Telegram updates are otherwise unauthenticated. */ secretToken?: string; } /** * Creates a Telegram inbound receiver for bot webhook updates. When {@link * TelegramReceiverOptions.secretToken} is set, the `X-Telegram-Bot-Api-Secret-Token` header is * verified before dispatch. * * A handler may return an {@link ../types.InboundReply}; it is serialised into a Telegram * `sendMessage` method call in the response body (`chat_id` taken from the originating chat), * which Telegram executes as the reply. Return `raw` to invoke a different method. * @param options Verification config, the message handler and an optional reply provider. * @returns The inbound channel. */ declare const createTelegramReceiver: (options: TelegramReceiverOptions) => Receiver; /** @deprecated Renamed to `createTelegramProvider`; removed in the next major. */ declare const telegramProvider: typeof telegramProvider$1; export { type TelegramConfig, type TelegramReceiverOptions, telegramProvider$1 as createTelegramProvider, createTelegramReceiver, telegramProvider };