import { BaseConnector } from '../../base/base.connector'; import type { ISmsOptions, ISmsProvider, ISendMessageSuccessResponse, WithPassthrough, SmsSendResult, ISmsConnector } from '../../types'; import { ChannelTypeEnum } from '../../types'; import type { TelnyxConfig } from './telnyx.config'; import type { TelnyxNarrowedInput } from './telnyx.types'; export declare class TelnyxSmsConnector extends BaseConnector implements ISmsProvider, ISmsConnector { private config; readonly id = "telnyx"; readonly channelType: ChannelTypeEnum.SMS; constructor(config: TelnyxConfig, fetchImpl?: typeof fetch); /** * Thinwrap-native send. Implements `ISmsConnector`. * Builds a JSON body, authenticates with `Authorization: Bearer `, * and POSTs to `https://api.telnyx.com/v2/messages`. * * Telnyx wire keys are snake_case (`messaging_profile_id`, `webhook_url`, * `auto_detect`, `media_urls`). these are written explicitly in * the `connectorBody` literal rather than invoking a casing transform. * * Telnyx wraps successful responses in a JSON:API `{ data: {...} }` * envelope; the connector unwraps once for `providerMessageId` and * preserves the full envelope in `raw`. */ send(input: TelnyxNarrowedInput): Promise; /** * Map Telnyx error responses to canonical `ConnectorError` with the 6-value * `ProviderCode` union. Parses `Retry-After`: * parsed seconds embedded in `providerMessage` text; raw header * value on `cause.retryAfter`. No structured `retryAfterSeconds` field per * Retry is consumer policy (no retryAfterSeconds field). */ private mapVendorError; sendMessage(options: ISmsOptions, bridgeProviderData?: WithPassthrough>): Promise; }