import { BaseConnector } from '../../base/base.connector.js'; import type { IEmailOptions, IEmailProvider, ISendMessageSuccessResponse, ICheckIntegrationResponse, WithPassthrough, EmailSendInput, EmailSendResult, IEmailConnector } from '../../types/index.js'; import { ChannelTypeEnum } from '../../types/index.js'; import type { SesConfig } from './ses.config.js'; export declare class SesEmailConnector extends BaseConnector implements IEmailProvider, IEmailConnector { private config; readonly id = "ses"; readonly channelType: ChannelTypeEnum.EMAIL; constructor(config: SesConfig, fetchImpl?: typeof fetch); /** * Thinwrap-native send. Implements `IEmailConnector`. * Builds a SES v2 SendEmail JSON body, signs with hand-rolled AWS Sig V4 * against `node:crypto` (no third-party crypto dependency; the * `aws4` dep was dropped — see `signSesRequest`), and POSTs to * `https://email..amazonaws.com/v2/email/outbound-emails`. * * The region comes exclusively from `config.region` — no environment * inference, no shared-credentials-file fallback. */ send(input: EmailSendInput): Promise; /** * Build the SES v2 SendEmail JSON body from Thinwrap's `EmailSendInput`. * Hand-coded PascalCase mapping (locality) — no automatic casing * transform; SES's wire shape is structural and irregular (e.g., * `Subject: { Data, Charset }` not just `Subject`). */ private buildSesV2Body; /** * Map SES v2 error responses to canonical `ConnectorError` with the 6-value * `ProviderCode` union. `cause` is shaped * as `{ raw: vendorBody, retryAfter?: }`; * the parsed seconds are exposed as `cause.retryAfterSeconds` when available * but NOT inlined into `providerMessage`. */ private mapVendorError; sendMessage(options: IEmailOptions, bridgeProviderData?: WithPassthrough>): Promise; /** * Novu-compatible check: it SENDS `options` as a real email (SES has no * side-effect-free credential probe on this API). Without options there is * nothing to send, so it reports that instead of failing on `undefined`. */ checkIntegration(options?: IEmailOptions): Promise; }