import { BaseConnector } from '../../base/base.connector'; import type { ISmsOptions, ISmsProvider, ISendMessageSuccessResponse, WithPassthrough, SmsSendResult, ISmsConnector } from '../../types'; import { ChannelTypeEnum } from '../../types'; import type { VonageConfig } from './vonage.config'; import type { VonageNarrowedInput } from './vonage.types'; export declare class VonageSmsConnector extends BaseConnector implements ISmsProvider, ISmsConnector { private config; readonly id = "vonage"; readonly channelType: ChannelTypeEnum.SMS; constructor(config: VonageConfig, fetchImpl?: typeof fetch); /** * Thinwrap-native send. Implements `ISmsConnector`. * Builds a form-urlencoded body (Vonage is one of the few wrapped providers * that auths via form fields instead of HTTP headers) and POSTs to * `https://rest.nexmo.com/sms/json`. * * Wire keys are kebab-case (`client-ref`, `message-class`, `status-report-req`) * which does not match camelCase auto-derivation; the connector * writes them explicitly in the `connectorBody` literal rather than invoking * any casing transform. * * Vonage emits HTTP 200 even for soft errors — `messages[0].status` is the * source of truth. The connector inspects `message.status` after the * HTTP layer; non-`'0'` is mapped via `VONAGE_STATUS_TO_PROVIDER_CODE` to a * canonical `ConnectorError`. */ send(input: VonageNarrowedInput): Promise; /** * Body-layer mapping: HTTP 200 with non-`'0'` per-message status. Soft-rate-limit * (status `'1'`) does not carry a `Retry-After` header — that's an HTTP-layer * concern handled in `mapVendorError`. */ private mapVonageStatus; /** * HTTP-layer mapping. Parses `Retry-After` and embeds * the parsed seconds in `providerMessage` text; raw header value is attached * to `cause.retryAfter`. No structured `retryAfterSeconds` field per * Retry is consumer policy (no retryAfterSeconds field). */ private mapVendorError; sendMessage(options: ISmsOptions, bridgeProviderData?: WithPassthrough>): Promise; }