import { APIResource } from "../../core/resource.js"; import { APIPromise } from "../../core/api-promise.js"; import { RequestOptions } from "../../internal/request-options.js"; export declare class Telegram extends APIResource { /** * Connect a Telegram bot to a sender. Provide the bot token from @BotFather; Zavu * validates it, registers the webhook, and routes the sender's Telegram messages * through it. * * @example * ```ts * const response = await client.senders.telegram.connect( * 'senderId', * { botToken: 'botToken' }, * ); * ``` */ connect(senderID: string, body: TelegramConnectParams, options?: RequestOptions): APIPromise; /** * Disconnect Telegram from a sender and remove the webhook. * * @example * ```ts * await client.senders.telegram.disconnect('senderId'); * ``` */ disconnect(senderID: string, options?: RequestOptions): APIPromise; } export interface TelegramConnectResponse { telegram: TelegramConnectResponse.Telegram; } export declare namespace TelegramConnectResponse { interface Telegram { connected: boolean; botId?: string; botUsername?: string; } } export interface TelegramConnectParams { /** * Bot token from @BotFather. */ botToken: string; } export declare namespace Telegram { export { type TelegramConnectResponse as TelegramConnectResponse, type TelegramConnectParams as TelegramConnectParams, }; } //# sourceMappingURL=telegram.d.ts.map