import { BaseConnector } from '../../base/base.connector'; import type { ISmsOptions, ISmsProvider, ISendMessageSuccessResponse, WithPassthrough, SmsSendResult, ISmsConnector } from '../../types'; import { ChannelTypeEnum } from '../../types'; import type { MessageBirdConfig } from './messagebird.config'; import type { MessageBirdNarrowedInput } from './messagebird.types'; export declare class MessageBirdSmsConnector extends BaseConnector implements ISmsProvider, ISmsConnector { private config; readonly id = "messagebird"; readonly channelType: ChannelTypeEnum.SMS; constructor(config: MessageBirdConfig, fetchImpl?: typeof fetch); /** * Thinwrap-native send. Implements `ISmsConnector`. * Builds a JSON body in mixed-case (explicit casing — most keys are * camelCase, but `datacoding` and `mclass` are lowercased-flat on the wire) * and POSTs to `https://rest.messagebird.com/messages`. * * MessageBird's API requires `recipients: string[]` even for single-recipient * sends; the connector wraps `[input.to]` automatically. Multi-recipient * batches are out of v1.0 Thinwrap baseline — consumers can * override via `_passthrough.body.recipients`. * * Auth uses the custom `Authorization: AccessKey ` scheme (same * family as Infobip's `App ` — neither Bearer nor Basic). */ send(input: MessageBirdNarrowedInput): Promise; /** * Map MessageBird 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). * * MessageBird's body error structure is * `{ errors: [{ code, description, parameter }] }`; numeric `code` is * preserved in `cause.raw` but not mapped to canonical providerCodes (HTTP * status drives canonical mapping). */ private mapVendorError; sendMessage(options: ISmsOptions, bridgeProviderData?: WithPassthrough>): Promise; }