import { BaseConnector } from '../../base/base.connector'; import type { ISmsOptions, ISmsProvider, ISendMessageSuccessResponse, WithPassthrough, SmsSendResult, ISmsConnector } from '../../types'; import { ChannelTypeEnum } from '../../types'; import type { SnsConfig } from './sns.config'; import type { SnsNarrowedInput } from './sns.types'; export declare class SnsSmsConnector extends BaseConnector implements ISmsProvider, ISmsConnector { private config; readonly id = "sns"; readonly channelType: ChannelTypeEnum.SMS; constructor(config: SnsConfig, fetchImpl?: typeof fetch); /** * Thinwrap-native send. Implements `ISmsConnector`. * Builds an `application/x-www-form-urlencoded` AWS Query API body, signs * with hand-rolled AWS Sig V4 against `node:crypto` (no third-party crypto * dependency — see `signSnsRequest`), and POSTs to * `https://sns..amazonaws.com/`. * * Outlier locality wins over DRY: the signer lives inside this * connector module even though the SES connector holds a near-identical * copy. * * `messageAttributes` is flattened into the indexed AWS Query form * (`MessageAttributes.entry.N.Name` / `.Value.DataType` / `.Value.StringValue`) * BEFORE signing, so the signed canonical request covers the flattened keys. * `_passthrough` body merge also happens before signing so consumer-supplied * extra fields authenticate alongside the connector-built ones. */ send(input: SnsNarrowedInput): Promise; /** * Map SNS XML 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 * top-level structured `retryAfterSeconds` field — retry is consumer policy. */ private mapVendorError; sendMessage(options: ISmsOptions, bridgeProviderData?: WithPassthrough>): Promise; }