import { BaseConnector } from '../../base/base.connector'; import type { IChatOptions, IChatProvider, ISendMessageSuccessResponse, WithPassthrough, ChatSendResult, IChatConnector } from '../../types'; import { ChannelTypeEnum } from '../../types'; import type { TelegramConfig } from './telegram.config'; import type { TelegramNarrowedInput } from './telegram.types'; export declare class TelegramChatConnector extends BaseConnector implements IChatProvider, IChatConnector { private config; readonly id = "telegram"; readonly channelType: ChannelTypeEnum.CHAT; constructor(config: TelegramConfig, fetchImpl?: typeof fetch); /** * Thinwrap-native send. Implements `IChatConnector`. * Builds a JSON body for Telegram's `POST /bot/sendMessage` endpoint * with hand-mapped snake_case wire keys (no casing * middleware). Wire-key mapping for the nine narrowed fields is explicit * to avoid the "implicit casing contract" anti-pattern. */ send(input: TelegramNarrowedInput): Promise; /** * HTTP-layer + soft-error mapping. Telegram emits `parameters.retry_after` * (integer seconds) in the JSON body, not a `Retry-After` HTTP header — * outlier., `ConnectorError` carries no * `retryAfterSeconds` field; the parsed integer is appended to * `providerMessage`, and the raw integer is placed in `cause.retryAfter`. */ private mapVendorError; private mapTelegramSoftError; sendMessage(options: IChatOptions, bridgeProviderData?: WithPassthrough>): Promise; }