@visulima/email 1.0.0-alpha.8 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +786 -0
- package/LICENSE.md +541 -847
- package/README.md +212 -191
- package/dist/crypto/index.d.ts +304 -4
- package/dist/crypto/index.js +1 -1
- package/dist/deliverability/dmarc-report.d.ts +95 -0
- package/dist/deliverability/dmarc-report.js +1 -0
- package/dist/deliverability/index.d.ts +360 -0
- package/dist/deliverability/index.js +1 -0
- package/dist/events/index.d.ts +31 -0
- package/dist/events/index.js +1 -0
- package/dist/inbound/index.d.ts +375 -0
- package/dist/inbound/index.js +1 -0
- package/dist/index.d.ts +94 -9
- package/dist/index.js +1 -1
- package/dist/middleware/index.d.ts +346 -0
- package/dist/middleware/index.js +1 -0
- package/dist/packem_shared/ALL_EVENTS-3kwh5CBE.js +1 -0
- package/dist/packem_shared/DkimSigner-BuSbnos1.js +18 -0
- package/dist/packem_shared/DraftMailMessage-BxqGSLMN.js +1 -0
- package/dist/packem_shared/EmailError-B-sEf3bp.js +1 -0
- package/dist/packem_shared/Mail-BEuzrB00.js +1 -0
- package/dist/packem_shared/MailMessage-D9k5gYrd.js +1 -0
- package/dist/packem_shared/MemoryEventStore-CuhfO9aj.js +1 -0
- package/dist/packem_shared/MemoryQueue-Dl1Fa6OJ.js +1 -0
- package/dist/packem_shared/MemorySuppressionStore-DZnbz-_B.js +1 -0
- package/dist/packem_shared/RATE_LIMIT_PRESETS-BPADLgcA.js +1 -0
- package/dist/packem_shared/RequiredOptionError-DuNNY_a5.js +1 -0
- package/dist/packem_shared/SmimeEncrypter-C7usORKF.js +6 -0
- package/dist/packem_shared/SmimeSigner-DgAApLPS.js +8 -0
- package/dist/packem_shared/addDarkModeSupport-DZYxULjl.js +1 -0
- package/dist/packem_shared/address-formatter-BWR2Dddx.js +1 -0
- package/dist/packem_shared/aggregate-features-BqEjPd42.js +1 -0
- package/dist/packem_shared/ahaSendProvider-D81_wUA1.js +1 -0
- package/dist/packem_shared/arcMessageSignatureBase-BY4j0TxM.js +17 -0
- package/dist/packem_shared/attachment-processor-CMp7qqMI.js +1 -0
- package/dist/packem_shared/awsSesProvider-BGZJUIep.js +32 -0
- package/dist/packem_shared/azureProvider-CmcK4bsf.js +1 -0
- package/dist/packem_shared/brevoProvider-C1BDXr41.js +1 -0
- package/dist/packem_shared/build-mime-message-B6927SQy.js +3 -0
- package/dist/packem_shared/buildListUnsubscribe-Cdr8MvR_.js +1 -0
- package/dist/packem_shared/buildMtaStsPolicy-oEQg8y_C.js +6 -0
- package/dist/packem_shared/circuitBreakerMiddleware-D2SA_07f.js +1 -0
- package/dist/packem_shared/cloudflareEmailProvider-Bv-ty-74.js +1 -0
- package/dist/packem_shared/composeMiddleware-BHwLLEzK.js +1 -0
- package/dist/packem_shared/create-logger-BQTS3f-I.js +1 -0
- package/dist/packem_shared/createSuppressionStore-CeAZKCbY.js +1 -0
- package/dist/packem_shared/createTestEmail-CF_RUjqo.js +1 -0
- package/dist/packem_shared/createWorker-_-yMWcNQ.js +1 -0
- package/dist/packem_shared/dedupeMiddleware-B6ajWOTi.js +1 -0
- package/dist/packem_shared/defineInboundHandler-CnL2BzlL.js +1 -0
- package/dist/packem_shared/defineProvider-C9q-7iwt.js +1 -0
- package/dist/packem_shared/detectMimeType-Dxv4MjZ7.js +1 -0
- package/dist/packem_shared/emailMatchers-DZDkrZ_3.js +1 -0
- package/dist/packem_shared/event-bus.d-DEl3w_EW.d.ts +104 -0
- package/dist/packem_shared/extractCidReferences-BuoTREMp.js +1 -0
- package/dist/packem_shared/extractReply-BUjIBt9A.js +5 -0
- package/dist/packem_shared/failoverProvider-BgX6zfnY.js +1 -0
- package/dist/packem_shared/format-address-DTl-9O70.js +1 -0
- package/dist/packem_shared/generate-boundary-DQbzDiOI.js +1 -0
- package/dist/packem_shared/generate-message-id-gXAuMz4g.js +1 -0
- package/dist/packem_shared/headers-to-record-De1Eg951.js +1 -0
- package/dist/packem_shared/httpProvider-DJAsYSun.js +1 -0
- package/dist/packem_shared/index-yDU-1zOZ.js +11 -0
- package/dist/packem_shared/infobipProvider-lHyGrXgZ.js +1 -0
- package/dist/packem_shared/injectPreheader-CF9WHZ7J.js +1 -0
- package/dist/packem_shared/inlineCss-BQ7d2Cyz.js +1 -0
- package/dist/packem_shared/isValidSigningCertUrl-Bii1AMGC.js +3 -0
- package/dist/packem_shared/loggingMiddleware-CZIiVMVp.js +1 -0
- package/dist/packem_shared/loopsProvider-DyloxzNC.js +1 -0
- package/dist/packem_shared/mail.d-B9SSqyy0.d.ts +909 -0
- package/dist/packem_shared/{mailCrabProvider-CM_CFDca.js → mailCrabProvider-CPtBT6Th.js} +1 -1
- package/dist/packem_shared/mailPaceProvider-CJEvOFBh.js +1 -0
- package/dist/packem_shared/mailchannelsProvider-osRkW_tz.js +1 -0
- package/dist/packem_shared/mailerSendProvider-C_6LzARK.js +1 -0
- package/dist/packem_shared/mailgunProvider-DkISvMPe.js +1 -0
- package/dist/packem_shared/mailjetProvider-CV0i4Xzh.js +1 -0
- package/dist/packem_shared/mailomatProvider-B5YFonEO.js +1 -0
- package/dist/packem_shared/mailtrapProvider-C4ZquIPz.js +1 -0
- package/dist/packem_shared/make-request-BlK_B72c.js +1 -0
- package/dist/packem_shared/mandrillProvider-DWPFh_Sj.js +1 -0
- package/dist/packem_shared/mockProvider-Behywbl1.js +1 -0
- package/dist/packem_shared/netcoreProvider-C5TEciaN.js +1 -0
- package/dist/packem_shared/nodemailerProvider-BFHobXxt.js +1 -0
- package/dist/packem_shared/normalizeMessageId-DAx2pGe2.js +1 -0
- package/dist/packem_shared/oauth2Middleware-CodqXkyj.js +1 -0
- package/dist/packem_shared/opentelemetryProvider-ByHC01ub.js +1 -0
- package/dist/packem_shared/outlook365Provider-63ggDpqV.js +1 -0
- package/dist/packem_shared/parseAddress-DdbViBAJ.js +1 -0
- package/dist/packem_shared/parseArfReport-Ds6S3c4J.js +6 -0
- package/dist/packem_shared/parseCloudflareInbound-C__j-oNa.js +1 -0
- package/dist/packem_shared/parseDmarcRecord-DXZ-_rF0.js +1 -0
- package/dist/packem_shared/parseMailgunInbound-BpC6uPNe.js +1 -0
- package/dist/packem_shared/parsePostmarkInbound-Co3_c6-9.js +1 -0
- package/dist/packem_shared/parseSendGridInbound-DsALoijO.js +4 -0
- package/dist/packem_shared/parseSesInbound-CH5tHIjp.js +1 -0
- package/dist/packem_shared/parseTlsReport-wPe1lIDs.js +1 -0
- package/dist/packem_shared/plunkProvider-yTlrJVEp.js +1 -0
- package/dist/packem_shared/postProcessHtml-DqKi2Ucg.js +1 -0
- package/dist/packem_shared/postalProvider-CRX_bMYD.js +1 -0
- package/dist/packem_shared/postmarkProvider-CDx85Yge.js +1 -0
- package/dist/packem_shared/provider-base-C7PuopYK.js +1 -0
- package/dist/packem_shared/provider.d-J-y6iogK.d.ts +28 -0
- package/dist/packem_shared/quoted-printable-nSGDA1tA.js +7 -0
- package/dist/packem_shared/resendProvider-CiclWxzr.js +1 -0
- package/dist/packem_shared/retry-3pnxTuNs.js +1 -0
- package/dist/packem_shared/retryMiddleware-DbViDX4r.js +1 -0
- package/dist/packem_shared/roundRobinProvider-D1by5KGW.js +1 -0
- package/dist/packem_shared/sanitize-header-DJhgZl3y.js +1 -0
- package/dist/packem_shared/scalewayProvider-BcND48qO.js +1 -0
- package/dist/packem_shared/sendGridProvider-D8ZLgY62.js +1 -0
- package/dist/packem_shared/smtpProvider-Bm0yP97W.js +25 -0
- package/dist/packem_shared/sparkpostProvider-CTYfSRaV.js +1 -0
- package/dist/packem_shared/sweegoProvider-DOoin_vi.js +1 -0
- package/dist/packem_shared/toEmailSnapshot-DeRqM5SJ.js +1 -0
- package/dist/packem_shared/tracer.d-MU42G1jG.d.ts +494 -0
- package/dist/packem_shared/types.d-BId55FW2.d.ts +107 -0
- package/dist/packem_shared/types.d-CmoWvdZi.d.ts +61 -0
- package/dist/packem_shared/types.d-DCkecJse.d.ts +51 -0
- package/dist/packem_shared/types.d-Mpu0HZoG.d.ts +24 -0
- package/dist/packem_shared/types.d-ejzh-xBP.d.ts +209 -0
- package/dist/packem_shared/types.d-lcJZmwRK.d.ts +69 -0
- package/dist/packem_shared/types.d-nyR1ty1Q.d.ts +9 -0
- package/dist/packem_shared/utils-BfYfPB_I.js +1 -0
- package/dist/packem_shared/validate-email-options-mCM9dVug.js +1 -0
- package/dist/packem_shared/verifyMailgunWebhook-Cwl0OD3P.js +1 -0
- package/dist/packem_shared/verifyPostmarkWebhook-C72ZvbrG.js +1 -0
- package/dist/packem_shared/verifyResendWebhook-YK2zNDXR.js +1 -0
- package/dist/packem_shared/verifySendGridWebhook-Dbwc1tfG.js +1 -0
- package/dist/packem_shared/withEvents-CCVblSqj.js +1 -0
- package/dist/packem_shared/withMetrics-DWywX_6M.js +1 -0
- package/dist/packem_shared/withRender-VP9wE5Yr.js +1 -0
- package/dist/packem_shared/withSuppression-DBaZDMAr.js +1 -0
- package/dist/packem_shared/withTelemetry-DL2qo0Hp.js +1 -0
- package/dist/packem_shared/zeptomailProvider-DKBPSHPj.js +1 -0
- package/dist/providers/ahasend/index.d.ts +36 -3
- package/dist/providers/ahasend/index.js +1 -1
- package/dist/providers/aws-ses/index.d.ts +47 -3
- package/dist/providers/aws-ses/index.js +1 -1
- package/dist/providers/azure/index.d.ts +52 -3
- package/dist/providers/azure/index.js +1 -1
- package/dist/providers/brevo/index.d.ts +65 -3
- package/dist/providers/brevo/index.js +1 -1
- package/dist/providers/cloudflare-email/index.d.ts +36 -0
- package/dist/providers/cloudflare-email/index.js +1 -0
- package/dist/providers/failover/index.d.ts +27 -3
- package/dist/providers/failover/index.js +1 -1
- package/dist/providers/http/index.d.ts +35 -3
- package/dist/providers/http/index.js +1 -1
- package/dist/providers/infobip/index.d.ts +56 -3
- package/dist/providers/infobip/index.js +1 -1
- package/dist/providers/loops/index.d.ts +47 -0
- package/dist/providers/loops/index.js +1 -0
- package/dist/providers/mailchannels/index.d.ts +26 -0
- package/dist/providers/mailchannels/index.js +1 -0
- package/dist/providers/mailcrab/index.d.ts +32 -3
- package/dist/providers/mailcrab/index.js +1 -1
- package/dist/providers/mailersend/index.d.ts +51 -3
- package/dist/providers/mailersend/index.js +1 -1
- package/dist/providers/mailgun/index.d.ts +73 -3
- package/dist/providers/mailgun/index.js +1 -1
- package/dist/providers/mailjet/index.d.ts +72 -3
- package/dist/providers/mailjet/index.js +1 -1
- package/dist/providers/mailomat/index.d.ts +40 -3
- package/dist/providers/mailomat/index.js +1 -1
- package/dist/providers/mailpace/index.d.ts +52 -3
- package/dist/providers/mailpace/index.js +1 -1
- package/dist/providers/mailtrap/index.d.ts +44 -3
- package/dist/providers/mailtrap/index.js +1 -1
- package/dist/providers/mandrill/index.d.ts +87 -3
- package/dist/providers/mandrill/index.js +1 -1
- package/dist/providers/mock/index.d.ts +12 -3
- package/dist/providers/mock/index.js +1 -1
- package/dist/providers/netcore/index.d.ts +35 -0
- package/dist/providers/netcore/index.js +1 -0
- package/dist/providers/nodemailer/index.d.ts +38 -3
- package/dist/providers/nodemailer/index.js +1 -1
- package/dist/providers/opentelemetry/index.d.ts +37 -3
- package/dist/providers/opentelemetry/index.js +1 -1
- package/dist/providers/outlook365/index.d.ts +48 -0
- package/dist/providers/outlook365/index.js +1 -0
- package/dist/providers/plunk/index.d.ts +38 -3
- package/dist/providers/plunk/index.js +1 -1
- package/dist/providers/postal/index.d.ts +48 -3
- package/dist/providers/postal/index.js +1 -1
- package/dist/providers/postmark/index.d.ts +60 -3
- package/dist/providers/postmark/index.js +1 -1
- package/dist/providers/resend/index.d.ts +51 -3
- package/dist/providers/resend/index.js +1 -1
- package/dist/providers/roundrobin/index.d.ts +27 -3
- package/dist/providers/roundrobin/index.js +1 -1
- package/dist/providers/scaleway/index.d.ts +44 -3
- package/dist/providers/scaleway/index.js +1 -1
- package/dist/providers/sendgrid/index.d.ts +84 -3
- package/dist/providers/sendgrid/index.js +1 -1
- package/dist/providers/smtp/index.d.ts +71 -3
- package/dist/providers/smtp/index.js +1 -1
- package/dist/providers/sparkpost/index.d.ts +43 -0
- package/dist/providers/sparkpost/index.js +1 -0
- package/dist/providers/sweego/index.d.ts +40 -3
- package/dist/providers/sweego/index.js +1 -1
- package/dist/providers/zeptomail/index.d.ts +37 -3
- package/dist/providers/zeptomail/index.js +1 -1
- package/dist/queue/bullmq-queue.d.ts +46 -0
- package/dist/queue/bullmq-queue.js +1 -0
- package/dist/queue/index.d.ts +147 -0
- package/dist/queue/index.js +1 -0
- package/dist/queue/pg-boss-queue.d.ts +41 -0
- package/dist/queue/pg-boss-queue.js +1 -0
- package/dist/queue/sqs-queue.d.ts +72 -0
- package/dist/queue/sqs-queue.js +1 -0
- package/dist/queue/unstorage-queue.d.ts +199 -0
- package/dist/queue/unstorage-queue.js +1 -0
- package/dist/render/index.d.ts +107 -0
- package/dist/render/index.js +1 -0
- package/dist/template-engines/handlebars.d.ts +23 -22
- package/dist/template-engines/handlebars.js +1 -1
- package/dist/template-engines/html-to-text.d.ts +24 -24
- package/dist/template-engines/html-to-text.js +1 -1
- package/dist/template-engines/i18n.d.ts +61 -0
- package/dist/template-engines/i18n.js +1 -0
- package/dist/template-engines/jsx-email.d.ts +11 -0
- package/dist/template-engines/jsx-email.js +1 -0
- package/dist/template-engines/liquid.d.ts +12 -0
- package/dist/template-engines/liquid.js +1 -0
- package/dist/template-engines/mjml.d.ts +10 -10
- package/dist/template-engines/mjml.js +1 -1
- package/dist/template-engines/react-email.d.ts +9 -9
- package/dist/template-engines/react-email.js +1 -1
- package/dist/template-engines/vue-email.d.ts +9 -9
- package/dist/template-engines/vue-email.js +1 -1
- package/dist/test/index.d.ts +155 -0
- package/dist/test/index.js +1 -0
- package/dist/utils/cache.d.ts +49 -48
- package/dist/utils/cache.js +1 -1
- package/dist/utils/format-email-address.d.ts +8 -7
- package/dist/utils/format-email-address.js +1 -1
- package/dist/utils/normalize-email-aliases.d.ts +20 -20
- package/dist/utils/normalize-email-aliases.js +1 -1
- package/dist/utils/parse-address.d.ts +18 -17
- package/dist/utils/parse-address.js +1 -1
- package/dist/utils/parse-eml.d.ts +22 -0
- package/dist/utils/parse-eml.js +6 -0
- package/dist/utils/result.d.ts +49 -0
- package/dist/utils/result.js +1 -0
- package/dist/utils/validation/check-feature-support.d.ts +53 -0
- package/dist/utils/validation/check-feature-support.js +1 -0
- package/dist/utils/validation/validate-email.d.ts +5 -5
- package/dist/utils/validation/validate-email.js +1 -1
- package/dist/webhooks/index.d.ts +231 -0
- package/dist/webhooks/index.js +1 -0
- package/package.json +177 -67
- package/dist/attachment-helpers.d.ts +0 -64
- package/dist/crypto/dkim-signer.d.ts +0 -48
- package/dist/crypto/smime-encrypter.d.ts +0 -53
- package/dist/crypto/smime-signer.d.ts +0 -48
- package/dist/crypto/types.d.ts +0 -101
- package/dist/draft-mail-message.d.ts +0 -13
- package/dist/errors/email-error.d.ts +0 -17
- package/dist/errors/required-option-error.d.ts +0 -10
- package/dist/mail-message.d.ts +0 -425
- package/dist/mail.d.ts +0 -206
- package/dist/packem_shared/DkimSigner-pFd4c3fZ.js +0 -18
- package/dist/packem_shared/EmailError-zm2ffVav.js +0 -1
- package/dist/packem_shared/Mail-6Bltpy_p.js +0 -1
- package/dist/packem_shared/MailMessage-B76GPBBA.js +0 -1
- package/dist/packem_shared/RequiredOptionError-CevW3u2K.js +0 -1
- package/dist/packem_shared/SmimeEncrypter-CBevU534.js +0 -6
- package/dist/packem_shared/SmimeSigner-CObA4jzT.js +0 -8
- package/dist/packem_shared/address-formatter-Cm_E_ZMa.js +0 -1
- package/dist/packem_shared/ahaSendProvider-DlFKEQ6D.js +0 -1
- package/dist/packem_shared/attachment-processor-2rHmfa7j.js +0 -1
- package/dist/packem_shared/awsSesProvider-Ba-eVJxZ.js +0 -32
- package/dist/packem_shared/azureProvider-CQYAkgVF.js +0 -1
- package/dist/packem_shared/brevoProvider-5p6jjiK9.js +0 -1
- package/dist/packem_shared/build-mime-message-IYaUqqPJ.js +0 -2
- package/dist/packem_shared/create-logger-BiWdqFNg.js +0 -1
- package/dist/packem_shared/defineProvider-B9rSklAJ.js +0 -1
- package/dist/packem_shared/detectMimeType-S8WRsNtY.js +0 -1
- package/dist/packem_shared/failoverProvider-CAHQQueo.js +0 -1
- package/dist/packem_shared/generate-boundary-Cx8nXYS0.js +0 -1
- package/dist/packem_shared/generate-message-id-D4uA8gkj.js +0 -1
- package/dist/packem_shared/headers-to-record-Qo124ImV.js +0 -1
- package/dist/packem_shared/httpProvider-CZD6LZX3.js +0 -1
- package/dist/packem_shared/infobipProvider-CtLwrUaP.js +0 -1
- package/dist/packem_shared/mailPaceProvider-B6yKvh6z.js +0 -1
- package/dist/packem_shared/mailerSendProvider-CeeIXFnW.js +0 -1
- package/dist/packem_shared/mailgunProvider-mmjKzouh.js +0 -1
- package/dist/packem_shared/mailjetProvider-DwN6i0VA.js +0 -1
- package/dist/packem_shared/mailomatProvider-DMQmjKHT.js +0 -1
- package/dist/packem_shared/mailtrapProvider-BN3UBEQw.js +0 -1
- package/dist/packem_shared/make-request-BDzF9W9D.js +0 -1
- package/dist/packem_shared/mandrillProvider-370y7CLu.js +0 -1
- package/dist/packem_shared/mockProvider-DN5ZwutD.js +0 -1
- package/dist/packem_shared/nodemailerProvider-_w8QXMU-.js +0 -1
- package/dist/packem_shared/opentelemetryProvider-C_ZXOLSd.js +0 -1
- package/dist/packem_shared/plunkProvider-DfJumQ4U.js +0 -1
- package/dist/packem_shared/postalProvider-Bavx2FcH.js +0 -1
- package/dist/packem_shared/postmarkProvider-DFC0uvjO.js +0 -1
- package/dist/packem_shared/provider-base-Cmzx6BTO.js +0 -1
- package/dist/packem_shared/readFile-BlZxbhCU-C8bCdiA2.js +0 -1
- package/dist/packem_shared/resendProvider-CfqU7UdE.js +0 -1
- package/dist/packem_shared/roundRobinProvider-1WQnuKR8.js +0 -1
- package/dist/packem_shared/sanitize-header-wWav-Scu.js +0 -1
- package/dist/packem_shared/scalewayProvider-be1HPimL.js +0 -1
- package/dist/packem_shared/sendGridProvider-BVI1sq3n.js +0 -1
- package/dist/packem_shared/smtpProvider-BV-ufR53.js +0 -23
- package/dist/packem_shared/sweegoProvider-7419CSAq.js +0 -1
- package/dist/packem_shared/validate-email-options-DfJ7llf8.js +0 -1
- package/dist/packem_shared/zeptomailProvider-C2lh0Xmo.js +0 -1
- package/dist/providers/ahasend/provider.d.ts +0 -7
- package/dist/providers/ahasend/types.d.ts +0 -28
- package/dist/providers/aws-ses/provider.d.ts +0 -8
- package/dist/providers/aws-ses/types.d.ts +0 -38
- package/dist/providers/azure/provider.d.ts +0 -7
- package/dist/providers/azure/types.d.ts +0 -44
- package/dist/providers/brevo/provider.d.ts +0 -7
- package/dist/providers/brevo/types.d.ts +0 -57
- package/dist/providers/failover/provider.d.ts +0 -7
- package/dist/providers/failover/types.d.ts +0 -19
- package/dist/providers/http/provider.d.ts +0 -7
- package/dist/providers/http/types.d.ts +0 -27
- package/dist/providers/infobip/provider.d.ts +0 -7
- package/dist/providers/infobip/types.d.ts +0 -48
- package/dist/providers/mailcrab/provider.d.ts +0 -9
- package/dist/providers/mailcrab/types.d.ts +0 -22
- package/dist/providers/mailersend/provider.d.ts +0 -7
- package/dist/providers/mailersend/types.d.ts +0 -43
- package/dist/providers/mailgun/provider.d.ts +0 -7
- package/dist/providers/mailgun/types.d.ts +0 -65
- package/dist/providers/mailjet/provider.d.ts +0 -7
- package/dist/providers/mailjet/types.d.ts +0 -64
- package/dist/providers/mailomat/provider.d.ts +0 -7
- package/dist/providers/mailomat/types.d.ts +0 -32
- package/dist/providers/mailpace/provider.d.ts +0 -7
- package/dist/providers/mailpace/types.d.ts +0 -44
- package/dist/providers/mailtrap/provider.d.ts +0 -7
- package/dist/providers/mailtrap/types.d.ts +0 -36
- package/dist/providers/mandrill/provider.d.ts +0 -7
- package/dist/providers/mandrill/types.d.ts +0 -79
- package/dist/providers/mock/provider.d.ts +0 -8
- package/dist/providers/mock/types.d.ts +0 -50
- package/dist/providers/nodemailer/provider.d.ts +0 -7
- package/dist/providers/nodemailer/types.d.ts +0 -30
- package/dist/providers/opentelemetry/provider.d.ts +0 -8
- package/dist/providers/opentelemetry/types.d.ts +0 -31
- package/dist/providers/plunk/provider.d.ts +0 -7
- package/dist/providers/plunk/types.d.ts +0 -30
- package/dist/providers/postal/provider.d.ts +0 -7
- package/dist/providers/postal/types.d.ts +0 -40
- package/dist/providers/postmark/provider.d.ts +0 -7
- package/dist/providers/postmark/types.d.ts +0 -52
- package/dist/providers/provider.d.ts +0 -27
- package/dist/providers/resend/provider.d.ts +0 -7
- package/dist/providers/resend/types.d.ts +0 -43
- package/dist/providers/roundrobin/provider.d.ts +0 -7
- package/dist/providers/roundrobin/types.d.ts +0 -19
- package/dist/providers/scaleway/provider.d.ts +0 -7
- package/dist/providers/scaleway/types.d.ts +0 -36
- package/dist/providers/sendgrid/provider.d.ts +0 -7
- package/dist/providers/sendgrid/types.d.ts +0 -76
- package/dist/providers/smtp/provider.d.ts +0 -7
- package/dist/providers/smtp/types.d.ts +0 -63
- package/dist/providers/sweego/provider.d.ts +0 -7
- package/dist/providers/sweego/types.d.ts +0 -32
- package/dist/providers/utils/address-formatter.d.ts +0 -139
- package/dist/providers/utils/attachment-processor.d.ts +0 -58
- package/dist/providers/utils/index.d.ts +0 -4
- package/dist/providers/utils/payload-builder.d.ts +0 -78
- package/dist/providers/utils/provider-base.d.ts +0 -69
- package/dist/providers/zeptomail/provider.d.ts +0 -7
- package/dist/providers/zeptomail/types.d.ts +0 -29
- package/dist/template-engines/types.d.ts +0 -8
- package/dist/types.d.ts +0 -203
- package/dist/utils/build-mime-message.d.ts +0 -8
- package/dist/utils/create-logger.d.ts +0 -16
- package/dist/utils/format-email-addresses.d.ts +0 -8
- package/dist/utils/generate-boundary.d.ts +0 -7
- package/dist/utils/generate-message-id.d.ts +0 -6
- package/dist/utils/headers-to-record.d.ts +0 -9
- package/dist/utils/is-port-available.d.ts +0 -9
- package/dist/utils/make-request.d.ts +0 -18
- package/dist/utils/retry.d.ts +0 -10
- package/dist/utils/sanitize-header.d.ts +0 -14
- package/dist/utils/to-base64.d.ts +0 -8
- package/dist/utils/validation/check-mx-records.d.ts +0 -42
- package/dist/utils/validation/check-mx-records.js +0 -1
- package/dist/utils/validation/disposable-email-domains.d.ts +0 -13
- package/dist/utils/validation/disposable-email-domains.js +0 -1
- package/dist/utils/validation/role-accounts.d.ts +0 -21
- package/dist/utils/validation/role-accounts.js +0 -1
- package/dist/utils/validation/validate-email-options.d.ts +0 -8
- package/dist/utils/validation/verify-email.d.ts +0 -47
- package/dist/utils/validation/verify-email.js +0 -1
- package/dist/utils/validation/verify-smtp.d.ts +0 -39
- package/dist/utils/validation/verify-smtp.js +0 -4
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import type { BaseConfig, EmailOptions } from "../../types.d.ts";
|
|
2
|
-
/**
|
|
3
|
-
* Infobip configuration
|
|
4
|
-
*/
|
|
5
|
-
export interface InfobipConfig extends BaseConfig {
|
|
6
|
-
/**
|
|
7
|
-
* Infobip API key
|
|
8
|
-
*/
|
|
9
|
-
apiKey: string;
|
|
10
|
-
/**
|
|
11
|
-
* Infobip base URL (e.g., "https://api.infobip.com")
|
|
12
|
-
*/
|
|
13
|
-
baseUrl?: string;
|
|
14
|
-
/**
|
|
15
|
-
* Infobip API endpoint
|
|
16
|
-
* Defaults to: https://{baseUrl}/email/3/send
|
|
17
|
-
*/
|
|
18
|
-
endpoint?: string;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Infobip-specific email options
|
|
22
|
-
*/
|
|
23
|
-
export interface InfobipEmailOptions extends EmailOptions {
|
|
24
|
-
/**
|
|
25
|
-
* Intermediate report (for delivery status updates)
|
|
26
|
-
*/
|
|
27
|
-
intermediateReport?: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Notify URL (for delivery notifications)
|
|
30
|
-
*/
|
|
31
|
-
notifyUrl?: string;
|
|
32
|
-
/**
|
|
33
|
-
* Send at (Unix timestamp in milliseconds)
|
|
34
|
-
*/
|
|
35
|
-
sendAt?: number;
|
|
36
|
-
/**
|
|
37
|
-
* Infobip template ID for template-based emails
|
|
38
|
-
*/
|
|
39
|
-
templateId?: number;
|
|
40
|
-
/**
|
|
41
|
-
* Template variables for Infobip templates
|
|
42
|
-
*/
|
|
43
|
-
templateVariables?: Record<string, unknown>;
|
|
44
|
-
/**
|
|
45
|
-
* Tracking URL (for click tracking)
|
|
46
|
-
*/
|
|
47
|
-
trackingUrl?: string;
|
|
48
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { ProviderFactory } from "../provider.d.ts";
|
|
2
|
-
import type { MailCrabConfig, MailCrabEmailOptions } from "./types.d.ts";
|
|
3
|
-
/**
|
|
4
|
-
* MailCrab Provider for local email testing
|
|
5
|
-
* MailCrab is a local SMTP server for testing emails during development
|
|
6
|
-
* This is a convenience wrapper around the SMTP provider with MailCrab defaults
|
|
7
|
-
*/
|
|
8
|
-
declare const mailCrabProvider: ProviderFactory<MailCrabConfig, unknown, MailCrabEmailOptions>;
|
|
9
|
-
export default mailCrabProvider;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { BaseConfig, EmailOptions } from "../../types.d.ts";
|
|
2
|
-
/**
|
|
3
|
-
* MailCrab configuration (for local development/testing)
|
|
4
|
-
*/
|
|
5
|
-
export interface MailCrabConfig extends BaseConfig {
|
|
6
|
-
/**
|
|
7
|
-
* MailCrab host (default: localhost)
|
|
8
|
-
*/
|
|
9
|
-
host?: string;
|
|
10
|
-
/**
|
|
11
|
-
* MailCrab port (default: 1025)
|
|
12
|
-
*/
|
|
13
|
-
port?: number;
|
|
14
|
-
/**
|
|
15
|
-
* Use secure connection (default: false)
|
|
16
|
-
*/
|
|
17
|
-
secure?: boolean;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* MailCrab-specific email options
|
|
21
|
-
*/
|
|
22
|
-
export type MailCrabEmailOptions = EmailOptions;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ProviderFactory } from "../provider.d.ts";
|
|
2
|
-
import type { MailerSendConfig, MailerSendEmailOptions } from "./types.d.ts";
|
|
3
|
-
/**
|
|
4
|
-
* MailerSend Provider for sending emails through MailerSend API
|
|
5
|
-
*/
|
|
6
|
-
declare const mailerSendProvider: ProviderFactory<MailerSendConfig, unknown, MailerSendEmailOptions>;
|
|
7
|
-
export default mailerSendProvider;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import type { BaseConfig, EmailOptions } from "../../types.d.ts";
|
|
2
|
-
/**
|
|
3
|
-
* MailerSend configuration
|
|
4
|
-
*/
|
|
5
|
-
export interface MailerSendConfig extends BaseConfig {
|
|
6
|
-
/**
|
|
7
|
-
* MailerSend API token
|
|
8
|
-
*/
|
|
9
|
-
apiToken: string;
|
|
10
|
-
/**
|
|
11
|
-
* MailerSend API endpoint
|
|
12
|
-
* Defaults to: https://api.mailersend.com
|
|
13
|
-
*/
|
|
14
|
-
endpoint?: string;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* MailerSend-specific email options
|
|
18
|
-
*/
|
|
19
|
-
export interface MailerSendEmailOptions extends EmailOptions {
|
|
20
|
-
/**
|
|
21
|
-
* Domain ID (optional, for domain-specific sending)
|
|
22
|
-
*/
|
|
23
|
-
domainId?: string;
|
|
24
|
-
/**
|
|
25
|
-
* Personalization (per-recipient variables)
|
|
26
|
-
*/
|
|
27
|
-
personalization?: {
|
|
28
|
-
data: Record<string, unknown>;
|
|
29
|
-
email: string;
|
|
30
|
-
}[];
|
|
31
|
-
/**
|
|
32
|
-
* Scheduled at (Unix timestamp)
|
|
33
|
-
*/
|
|
34
|
-
scheduledAt?: number;
|
|
35
|
-
/**
|
|
36
|
-
* MailerSend template ID for template-based emails
|
|
37
|
-
*/
|
|
38
|
-
templateId?: string;
|
|
39
|
-
/**
|
|
40
|
-
* Template variables for MailerSend templates
|
|
41
|
-
*/
|
|
42
|
-
templateVariables?: Record<string, unknown>;
|
|
43
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ProviderFactory } from "../provider.d.ts";
|
|
2
|
-
import type { MailgunConfig, MailgunEmailOptions } from "./types.d.ts";
|
|
3
|
-
/**
|
|
4
|
-
* Mailgun Provider for sending emails through Mailgun API
|
|
5
|
-
*/
|
|
6
|
-
declare const mailgunProvider: ProviderFactory<MailgunConfig, unknown, MailgunEmailOptions>;
|
|
7
|
-
export default mailgunProvider;
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import type { BaseConfig, EmailOptions } from "../../types.d.ts";
|
|
2
|
-
/**
|
|
3
|
-
* Mailgun configuration
|
|
4
|
-
*/
|
|
5
|
-
export interface MailgunConfig extends BaseConfig {
|
|
6
|
-
/**
|
|
7
|
-
* Mailgun API key
|
|
8
|
-
*/
|
|
9
|
-
apiKey: string;
|
|
10
|
-
/**
|
|
11
|
-
* Mailgun domain (required for sending emails)
|
|
12
|
-
*/
|
|
13
|
-
domain: string;
|
|
14
|
-
/**
|
|
15
|
-
* Mailgun API endpoint
|
|
16
|
-
* Defaults to US endpoint: https://api.mailgun.net
|
|
17
|
-
* Use https://api.eu.mailgun.net for EU accounts
|
|
18
|
-
*/
|
|
19
|
-
endpoint?: string;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Mailgun-specific email options
|
|
23
|
-
*/
|
|
24
|
-
export interface MailgunEmailOptions extends EmailOptions {
|
|
25
|
-
/**
|
|
26
|
-
* Campaign ID for tracking
|
|
27
|
-
*/
|
|
28
|
-
campaignId?: string;
|
|
29
|
-
/**
|
|
30
|
-
* Enable/disable click tracking
|
|
31
|
-
*/
|
|
32
|
-
clickTracking?: boolean;
|
|
33
|
-
/**
|
|
34
|
-
* Delivery time (Unix timestamp or RFC 2822 date)
|
|
35
|
-
*/
|
|
36
|
-
deliveryTime?: string | number;
|
|
37
|
-
/**
|
|
38
|
-
* Enable/disable open tracking
|
|
39
|
-
*/
|
|
40
|
-
openTracking?: boolean;
|
|
41
|
-
/**
|
|
42
|
-
* Require TLS
|
|
43
|
-
*/
|
|
44
|
-
requireTls?: boolean;
|
|
45
|
-
/**
|
|
46
|
-
* Skip verification
|
|
47
|
-
*/
|
|
48
|
-
skipVerification?: boolean;
|
|
49
|
-
/**
|
|
50
|
-
* Mailgun template name
|
|
51
|
-
*/
|
|
52
|
-
template?: string;
|
|
53
|
-
/**
|
|
54
|
-
* Template variables for Mailgun templates
|
|
55
|
-
*/
|
|
56
|
-
templateVariables?: Record<string, unknown>;
|
|
57
|
-
/**
|
|
58
|
-
* Test mode - emails won't actually be sent
|
|
59
|
-
*/
|
|
60
|
-
testMode?: boolean;
|
|
61
|
-
/**
|
|
62
|
-
* Enable/disable unsubscribe tracking
|
|
63
|
-
*/
|
|
64
|
-
unsubscribeTracking?: boolean;
|
|
65
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ProviderFactory } from "../provider.d.ts";
|
|
2
|
-
import type { MailjetConfig, MailjetEmailOptions } from "./types.d.ts";
|
|
3
|
-
/**
|
|
4
|
-
* Mailjet Provider for sending emails through Mailjet API.
|
|
5
|
-
*/
|
|
6
|
-
declare const provider: ProviderFactory<MailjetConfig, unknown, MailjetEmailOptions>;
|
|
7
|
-
export default provider;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import type { BaseConfig, EmailOptions } from "../../types.d.ts";
|
|
2
|
-
/**
|
|
3
|
-
* Mailjet configuration
|
|
4
|
-
*/
|
|
5
|
-
export interface MailjetConfig extends BaseConfig {
|
|
6
|
-
/**
|
|
7
|
-
* Mailjet API Key
|
|
8
|
-
*/
|
|
9
|
-
apiKey: string;
|
|
10
|
-
/**
|
|
11
|
-
* Mailjet API Secret
|
|
12
|
-
*/
|
|
13
|
-
apiSecret: string;
|
|
14
|
-
/**
|
|
15
|
-
* Mailjet API endpoint
|
|
16
|
-
* Defaults to: https://api.mailjet.com
|
|
17
|
-
*/
|
|
18
|
-
endpoint?: string;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Mailjet-specific email options
|
|
22
|
-
*/
|
|
23
|
-
export interface MailjetEmailOptions extends Omit<EmailOptions, "priority"> {
|
|
24
|
-
/**
|
|
25
|
-
* Custom campaign name
|
|
26
|
-
*/
|
|
27
|
-
campaign?: string;
|
|
28
|
-
/**
|
|
29
|
-
* Custom ID for tracking
|
|
30
|
-
*/
|
|
31
|
-
customId?: string;
|
|
32
|
-
/**
|
|
33
|
-
* Deduplicate campaign (prevent duplicate emails)
|
|
34
|
-
*/
|
|
35
|
-
deduplicateCampaign?: boolean;
|
|
36
|
-
/**
|
|
37
|
-
* Delivery time (Unix timestamp)
|
|
38
|
-
*/
|
|
39
|
-
deliveryTime?: number;
|
|
40
|
-
/**
|
|
41
|
-
* Event payload (for webhooks)
|
|
42
|
-
*/
|
|
43
|
-
eventPayload?: string;
|
|
44
|
-
/**
|
|
45
|
-
* Priority (1-5, where 1 is highest)
|
|
46
|
-
*/
|
|
47
|
-
priority?: number;
|
|
48
|
-
/**
|
|
49
|
-
* Mailjet template ID for template-based emails
|
|
50
|
-
*/
|
|
51
|
-
templateId?: number;
|
|
52
|
-
/**
|
|
53
|
-
* Template language (for multilingual templates)
|
|
54
|
-
*/
|
|
55
|
-
templateLanguage?: boolean;
|
|
56
|
-
/**
|
|
57
|
-
* Template variables for Mailjet templates
|
|
58
|
-
*/
|
|
59
|
-
templateVariables?: Record<string, unknown>;
|
|
60
|
-
/**
|
|
61
|
-
* URL tags (for tracking)
|
|
62
|
-
*/
|
|
63
|
-
urlTags?: Record<string, string>;
|
|
64
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ProviderFactory } from "../provider.d.ts";
|
|
2
|
-
import type { MailomatConfig, MailomatEmailOptions } from "./types.d.ts";
|
|
3
|
-
/**
|
|
4
|
-
* Mailomat Provider for sending emails through Mailomat API.
|
|
5
|
-
*/
|
|
6
|
-
declare const mailomatProvider: ProviderFactory<MailomatConfig, unknown, MailomatEmailOptions>;
|
|
7
|
-
export default mailomatProvider;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { BaseConfig, EmailOptions } from "../../types.d.ts";
|
|
2
|
-
/**
|
|
3
|
-
* Mailomat configuration
|
|
4
|
-
*/
|
|
5
|
-
export interface MailomatConfig extends BaseConfig {
|
|
6
|
-
/**
|
|
7
|
-
* Mailomat API key
|
|
8
|
-
*/
|
|
9
|
-
apiKey: string;
|
|
10
|
-
/**
|
|
11
|
-
* Mailomat API endpoint
|
|
12
|
-
* Defaults to: https://api.mailomat.com
|
|
13
|
-
*/
|
|
14
|
-
endpoint?: string;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Mailomat-specific email options
|
|
18
|
-
*/
|
|
19
|
-
export interface MailomatEmailOptions extends EmailOptions {
|
|
20
|
-
/**
|
|
21
|
-
* Tags for categorization
|
|
22
|
-
*/
|
|
23
|
-
tags?: string[];
|
|
24
|
-
/**
|
|
25
|
-
* Mailomat template ID for template-based emails
|
|
26
|
-
*/
|
|
27
|
-
templateId?: string;
|
|
28
|
-
/**
|
|
29
|
-
* Template variables for Mailomat templates
|
|
30
|
-
*/
|
|
31
|
-
templateVariables?: Record<string, unknown>;
|
|
32
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ProviderFactory } from "../provider.d.ts";
|
|
2
|
-
import type { MailPaceConfig, MailPaceEmailOptions } from "./types.d.ts";
|
|
3
|
-
/**
|
|
4
|
-
* MailPace Provider for sending emails through MailPace API.
|
|
5
|
-
*/
|
|
6
|
-
declare const mailPaceProvider: ProviderFactory<MailPaceConfig, unknown, MailPaceEmailOptions>;
|
|
7
|
-
export default mailPaceProvider;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import type { BaseConfig, EmailOptions } from "../../types.d.ts";
|
|
2
|
-
/**
|
|
3
|
-
* MailPace configuration
|
|
4
|
-
*/
|
|
5
|
-
export interface MailPaceConfig extends BaseConfig {
|
|
6
|
-
/**
|
|
7
|
-
* MailPace API token
|
|
8
|
-
*/
|
|
9
|
-
apiToken: string;
|
|
10
|
-
/**
|
|
11
|
-
* MailPace API endpoint
|
|
12
|
-
* Defaults to: https://app.mailpace.com/api/v1
|
|
13
|
-
*/
|
|
14
|
-
endpoint?: string;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* MailPace-specific email options
|
|
18
|
-
*/
|
|
19
|
-
export interface MailPaceEmailOptions extends Omit<EmailOptions, "attachments"> {
|
|
20
|
-
/**
|
|
21
|
-
* Attachments (MailPace specific format)
|
|
22
|
-
*/
|
|
23
|
-
attachments?: {
|
|
24
|
-
content: string;
|
|
25
|
-
content_type?: string;
|
|
26
|
-
name: string;
|
|
27
|
-
}[];
|
|
28
|
-
/**
|
|
29
|
-
* List unsubscribe header
|
|
30
|
-
*/
|
|
31
|
-
listUnsubscribe?: string;
|
|
32
|
-
/**
|
|
33
|
-
* Tags for categorization
|
|
34
|
-
*/
|
|
35
|
-
tags?: string[];
|
|
36
|
-
/**
|
|
37
|
-
* MailPace template ID for template-based emails
|
|
38
|
-
*/
|
|
39
|
-
templateId?: number;
|
|
40
|
-
/**
|
|
41
|
-
* Template variables for MailPace templates
|
|
42
|
-
*/
|
|
43
|
-
templateVariables?: Record<string, unknown>;
|
|
44
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ProviderFactory } from "../provider.d.ts";
|
|
2
|
-
import type { MailtrapConfig, MailtrapEmailOptions } from "./types.d.ts";
|
|
3
|
-
/**
|
|
4
|
-
* Mailtrap Provider for sending emails through Mailtrap API
|
|
5
|
-
*/
|
|
6
|
-
declare const mailtrapProvider: ProviderFactory<MailtrapConfig, unknown, MailtrapEmailOptions>;
|
|
7
|
-
export default mailtrapProvider;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { BaseConfig, EmailOptions } from "../../types.d.ts";
|
|
2
|
-
/**
|
|
3
|
-
* Mailtrap configuration
|
|
4
|
-
*/
|
|
5
|
-
export interface MailtrapConfig extends BaseConfig {
|
|
6
|
-
/**
|
|
7
|
-
* Mailtrap API token
|
|
8
|
-
*/
|
|
9
|
-
apiToken: string;
|
|
10
|
-
/**
|
|
11
|
-
* Mailtrap API endpoint
|
|
12
|
-
* Defaults to: https://send.api.mailtrap.io
|
|
13
|
-
*/
|
|
14
|
-
endpoint?: string;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Mailtrap-specific email options
|
|
18
|
-
*/
|
|
19
|
-
export interface MailtrapEmailOptions extends EmailOptions {
|
|
20
|
-
/**
|
|
21
|
-
* Category for categorization
|
|
22
|
-
*/
|
|
23
|
-
category?: string;
|
|
24
|
-
/**
|
|
25
|
-
* Custom variables (key-value pairs)
|
|
26
|
-
*/
|
|
27
|
-
customVariables?: Record<string, unknown>;
|
|
28
|
-
/**
|
|
29
|
-
* Mailtrap template UUID for template-based emails
|
|
30
|
-
*/
|
|
31
|
-
templateUuid?: string;
|
|
32
|
-
/**
|
|
33
|
-
* Template variables for Mailtrap templates
|
|
34
|
-
*/
|
|
35
|
-
templateVariables?: Record<string, unknown>;
|
|
36
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ProviderFactory } from "../provider.d.ts";
|
|
2
|
-
import type { MandrillConfig, MandrillEmailOptions } from "./types.d.ts";
|
|
3
|
-
/**
|
|
4
|
-
* Mandrill Provider for sending emails through Mandrill API
|
|
5
|
-
*/
|
|
6
|
-
declare const mandrillProvider: ProviderFactory<MandrillConfig, unknown, MandrillEmailOptions>;
|
|
7
|
-
export default mandrillProvider;
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import type { BaseConfig, EmailOptions } from "../../types.d.ts";
|
|
2
|
-
/**
|
|
3
|
-
* Mandrill configuration
|
|
4
|
-
*/
|
|
5
|
-
export interface MandrillConfig extends BaseConfig {
|
|
6
|
-
/**
|
|
7
|
-
* Mandrill API key
|
|
8
|
-
*/
|
|
9
|
-
apiKey: string;
|
|
10
|
-
/**
|
|
11
|
-
* Mandrill API endpoint
|
|
12
|
-
* Defaults to: https://mandrillapp.com/api/1.0
|
|
13
|
-
*/
|
|
14
|
-
endpoint?: string;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Mandrill-specific email options
|
|
18
|
-
*/
|
|
19
|
-
export interface MandrillEmailOptions extends EmailOptions {
|
|
20
|
-
/**
|
|
21
|
-
* Global merge variables
|
|
22
|
-
*/
|
|
23
|
-
globalMergeVars?: {
|
|
24
|
-
content: unknown;
|
|
25
|
-
name: string;
|
|
26
|
-
}[];
|
|
27
|
-
/**
|
|
28
|
-
* Google Analytics campaign
|
|
29
|
-
*/
|
|
30
|
-
googleAnalyticsCampaign?: string;
|
|
31
|
-
/**
|
|
32
|
-
* Google Analytics domains
|
|
33
|
-
*/
|
|
34
|
-
googleAnalyticsDomains?: string[];
|
|
35
|
-
/**
|
|
36
|
-
* Per-recipient merge variables
|
|
37
|
-
*/
|
|
38
|
-
mergeVars?: {
|
|
39
|
-
rcpt: string;
|
|
40
|
-
vars: {
|
|
41
|
-
content: unknown;
|
|
42
|
-
name: string;
|
|
43
|
-
}[];
|
|
44
|
-
}[];
|
|
45
|
-
/**
|
|
46
|
-
* Metadata (key-value pairs)
|
|
47
|
-
*/
|
|
48
|
-
metadata?: Record<string, string>;
|
|
49
|
-
/**
|
|
50
|
-
* Send at timestamp (ISO 8601 format)
|
|
51
|
-
*/
|
|
52
|
-
sendAt?: string;
|
|
53
|
-
/**
|
|
54
|
-
* Subaccount ID
|
|
55
|
-
*/
|
|
56
|
-
subaccount?: string;
|
|
57
|
-
/**
|
|
58
|
-
* Tags for categorization
|
|
59
|
-
*/
|
|
60
|
-
tags?: string[];
|
|
61
|
-
/**
|
|
62
|
-
* Template content (for template-based emails)
|
|
63
|
-
*/
|
|
64
|
-
templateContent?: {
|
|
65
|
-
content: string;
|
|
66
|
-
name: string;
|
|
67
|
-
}[];
|
|
68
|
-
/**
|
|
69
|
-
* Mandrill template name
|
|
70
|
-
*/
|
|
71
|
-
templateName?: string;
|
|
72
|
-
/**
|
|
73
|
-
* Template variables (merge vars)
|
|
74
|
-
*/
|
|
75
|
-
templateVariables?: {
|
|
76
|
-
content: unknown;
|
|
77
|
-
name: string;
|
|
78
|
-
}[];
|
|
79
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { ProviderFactory } from "../provider.d.ts";
|
|
2
|
-
import type { MockConfig, MockEmailEntry, MockEmailOptions } from "./types.d.ts";
|
|
3
|
-
/**
|
|
4
|
-
* Mock Provider for testing emails without actually sending them
|
|
5
|
-
* Stores emails in memory for later retrieval and inspection
|
|
6
|
-
*/
|
|
7
|
-
declare const mockProvider: ProviderFactory<MockConfig, MockEmailEntry[], MockEmailOptions>;
|
|
8
|
-
export default mockProvider;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import type { BaseConfig, EmailOptions, EmailResult, Receipt } from "../../types.d.ts";
|
|
2
|
-
/**
|
|
3
|
-
* Random delay range configuration
|
|
4
|
-
*/
|
|
5
|
-
export interface RandomDelayRange {
|
|
6
|
-
max: number;
|
|
7
|
-
min: number;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Mock configuration for testing
|
|
11
|
-
*/
|
|
12
|
-
export interface MockConfig extends BaseConfig {
|
|
13
|
-
/**
|
|
14
|
-
* Default response to return for send operations
|
|
15
|
-
*/
|
|
16
|
-
defaultResponse?: Receipt;
|
|
17
|
-
/**
|
|
18
|
-
* Delay in milliseconds before resolving (default: 0)
|
|
19
|
-
* Useful for testing async behavior
|
|
20
|
-
*/
|
|
21
|
-
delay?: number;
|
|
22
|
-
/**
|
|
23
|
-
* Failure rate (0-1) for simulating random failures (default: 0)
|
|
24
|
-
* 0 = never fail, 1 = always fail
|
|
25
|
-
*/
|
|
26
|
-
failureRate?: number;
|
|
27
|
-
/**
|
|
28
|
-
* Random delay range in milliseconds
|
|
29
|
-
* When set, delay will be randomly chosen between min and max
|
|
30
|
-
*/
|
|
31
|
-
randomDelayRange?: RandomDelayRange;
|
|
32
|
-
/**
|
|
33
|
-
* Whether to simulate failures (default: false)
|
|
34
|
-
* When true, sendEmail will return an error
|
|
35
|
-
*/
|
|
36
|
-
simulateFailure?: boolean;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Mock-specific email options
|
|
40
|
-
*/
|
|
41
|
-
export type MockEmailOptions = EmailOptions;
|
|
42
|
-
/**
|
|
43
|
-
* Stored email entry in mock provider
|
|
44
|
-
*/
|
|
45
|
-
export interface MockEmailEntry {
|
|
46
|
-
id: string;
|
|
47
|
-
options: EmailOptions;
|
|
48
|
-
result: EmailResult;
|
|
49
|
-
timestamp: Date;
|
|
50
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ProviderFactory } from "../provider.d.ts";
|
|
2
|
-
import type { NodemailerConfig, NodemailerEmailOptions } from "./types.d.ts";
|
|
3
|
-
/**
|
|
4
|
-
* Nodemailer Provider for sending emails via nodemailer
|
|
5
|
-
*/
|
|
6
|
-
declare const nodemailerProvider: ProviderFactory<NodemailerConfig, unknown, NodemailerEmailOptions>;
|
|
7
|
-
export default nodemailerProvider;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { BaseConfig, EmailAddress, EmailOptions } from "../../types.d.ts";
|
|
2
|
-
/**
|
|
3
|
-
* Nodemailer configuration
|
|
4
|
-
* Accepts any nodemailer transport configuration
|
|
5
|
-
* Common transports: SMTP, Sendmail, SES, etc.
|
|
6
|
-
*/
|
|
7
|
-
export interface NodemailerConfig extends BaseConfig {
|
|
8
|
-
/**
|
|
9
|
-
* Default from address (optional, can be overridden per email)
|
|
10
|
-
*/
|
|
11
|
-
defaultFrom?: EmailAddress;
|
|
12
|
-
/**
|
|
13
|
-
* Nodemailer transport configuration
|
|
14
|
-
* Can be a transport object or a transport name (e.g., 'smtp', 'sendmail')
|
|
15
|
-
* For SMTP: { host, port, secure, auth: { user, pass } }
|
|
16
|
-
* For Sendmail: { path: '/usr/sbin/sendmail' }
|
|
17
|
-
* For SES: { SES: { ... } }
|
|
18
|
-
* See: https://nodemailer.com/transports/
|
|
19
|
-
*/
|
|
20
|
-
transport: Record<string, unknown> | string;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Nodemailer-specific email options
|
|
24
|
-
*/
|
|
25
|
-
export interface NodemailerEmailOptions extends EmailOptions {
|
|
26
|
-
/**
|
|
27
|
-
* Override transport for this specific email
|
|
28
|
-
*/
|
|
29
|
-
transportOverride?: Record<string, unknown> | string;
|
|
30
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { EmailOptions } from "../../types.d.ts";
|
|
2
|
-
import type { Provider, ProviderFactory } from "../provider.d.ts";
|
|
3
|
-
import type { OpenTelemetryConfig } from "./types.d.ts";
|
|
4
|
-
/**
|
|
5
|
-
* OpenTelemetry Provider for instrumenting email sending with OpenTelemetry traces and metrics
|
|
6
|
-
*/
|
|
7
|
-
declare const opentelemetryProvider: ProviderFactory<OpenTelemetryConfig, Provider<unknown, unknown, EmailOptions>, EmailOptions>;
|
|
8
|
-
export default opentelemetryProvider;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { Tracer } from "@opentelemetry/api";
|
|
2
|
-
import type { BaseConfig, EmailOptions } from "../../types.d.ts";
|
|
3
|
-
import type { Provider, ProviderFactory } from "../provider.d.ts";
|
|
4
|
-
/**
|
|
5
|
-
* OpenTelemetry configuration
|
|
6
|
-
*/
|
|
7
|
-
export interface OpenTelemetryConfig extends BaseConfig {
|
|
8
|
-
/**
|
|
9
|
-
* The provider to wrap with OpenTelemetry instrumentation
|
|
10
|
-
* Can be a Provider instance or ProviderFactory function
|
|
11
|
-
*/
|
|
12
|
-
provider: Provider | ProviderFactory;
|
|
13
|
-
/**
|
|
14
|
-
* Whether to record email content in spans (default: false)
|
|
15
|
-
* When false, only metadata is recorded
|
|
16
|
-
*/
|
|
17
|
-
recordContent?: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* Service name for OpenTelemetry spans (default: "email")
|
|
20
|
-
*/
|
|
21
|
-
serviceName?: string;
|
|
22
|
-
/**
|
|
23
|
-
* Optional OpenTelemetry tracer instance
|
|
24
|
-
* If not provided, uses the global tracer
|
|
25
|
-
*/
|
|
26
|
-
tracer?: Tracer;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* OpenTelemetry-specific email options
|
|
30
|
-
*/
|
|
31
|
-
export type OpenTelemetryEmailOptions = EmailOptions;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ProviderFactory } from "../provider.d.ts";
|
|
2
|
-
import type { PlunkConfig, PlunkEmailOptions } from "./types.d.ts";
|
|
3
|
-
/**
|
|
4
|
-
* Plunk Provider for sending emails through Plunk API.
|
|
5
|
-
*/
|
|
6
|
-
declare const plunkProvider: ProviderFactory<PlunkConfig, unknown, PlunkEmailOptions>;
|
|
7
|
-
export default plunkProvider;
|