@visulima/email 2.1.6 → 2.1.8

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.
Files changed (230) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/crypto/index.d.ts +183 -183
  3. package/dist/crypto/index.js +1 -1
  4. package/dist/deliverability/dmarc-report.d.ts +43 -43
  5. package/dist/deliverability/dmarc-report.js +1 -1
  6. package/dist/deliverability/index.d.ts +201 -201
  7. package/dist/events/index.d.ts +17 -17
  8. package/dist/inbound/index.d.ts +180 -180
  9. package/dist/index.d.ts +35 -46
  10. package/dist/index.js +1 -1
  11. package/dist/middleware/index.d.ts +213 -216
  12. package/dist/middleware/index.js +1 -1
  13. package/dist/packem_shared/{DkimSigner-CiLBaXrg.js → DkimSigner-udCl3JXO.js} +6 -6
  14. package/dist/packem_shared/{DraftMailMessage-CGTVuy2z.js → DraftMailMessage-BgP1OF1G.js} +1 -1
  15. package/dist/packem_shared/EmailError-2CCyVX1S.js +1 -0
  16. package/dist/packem_shared/Mail-DduRntbB.js +1 -0
  17. package/dist/packem_shared/MailMessage-BRBT4Jea.js +1 -0
  18. package/dist/packem_shared/{RequiredOptionError-DuNNY_a5.js → RequiredOptionError-BmpC5whN.js} +1 -1
  19. package/dist/packem_shared/SmimeEncrypter-Dm9McVTQ.js +6 -0
  20. package/dist/packem_shared/SmimeSigner-B6hkacNk.js +8 -0
  21. package/dist/packem_shared/{address-formatter-BWR2Dddx.js → address-formatter-bfmGfQ83.js} +1 -1
  22. package/dist/packem_shared/{ahaSendProvider-DSuZIzaQ.js → ahaSendProvider-C6nBGCCa.js} +1 -1
  23. package/dist/packem_shared/arcMessageSignatureBase-B2uArM48.js +17 -0
  24. package/dist/packem_shared/attachment-processor-DjbjtJ6H.js +1 -0
  25. package/dist/packem_shared/{autoSendProvider-DqAoelWR.js → autoSendProvider-Dhig--Zo.js} +1 -1
  26. package/dist/packem_shared/{awsSesProvider-ClK1FUln.js → awsSesProvider-CMqAmU5N.js} +13 -13
  27. package/dist/packem_shared/azureProvider-C-bNOOil.js +1 -0
  28. package/dist/packem_shared/{brevoProvider-CIzuIDlt.js → brevoProvider-CkOjDyir.js} +1 -1
  29. package/dist/packem_shared/build-mime-message-t8KYiQkO.js +3 -0
  30. package/dist/packem_shared/{circuitBreakerMiddleware-D2SA_07f.js → circuitBreakerMiddleware-BSCPR72q.js} +1 -1
  31. package/dist/packem_shared/{cloudflareEmailProvider-B8mOEl3N.js → cloudflareEmailProvider-RCixPWnY.js} +1 -1
  32. package/dist/packem_shared/{createTestEmail-f12yLlWn.js → createTestEmail-XiF5E8vJ.js} +1 -1
  33. package/dist/packem_shared/dedupeMiddleware-CYYI_O7S.js +1 -0
  34. package/dist/packem_shared/{detectMimeType-DFH3kp6K.js → detectMimeType-B9_7ujpC.js} +1 -1
  35. package/dist/packem_shared/event-bus.d-BNQA-FZE.d.ts +104 -0
  36. package/dist/packem_shared/{failoverProvider-BgX6zfnY.js → failoverProvider-BkOOP7pt.js} +1 -1
  37. package/dist/packem_shared/generate-boundary-0xGe9GqK.js +1 -0
  38. package/dist/packem_shared/{httpProvider-aBfTXyCT.js → httpProvider-6idLfv-f.js} +1 -1
  39. package/dist/packem_shared/index-y0s2wQdc.js +11 -0
  40. package/dist/packem_shared/{infobipProvider-DxzsONUX.js → infobipProvider-CHHsqRXy.js} +1 -1
  41. package/dist/packem_shared/isValidSigningCertUrl-D7PuiRW4.js +3 -0
  42. package/dist/packem_shared/{loopsProvider-QBsAH6Ee.js → loopsProvider-Cl-dOuCN.js} +1 -1
  43. package/dist/packem_shared/mail.d-B9JyPxzq.d.ts +910 -0
  44. package/dist/packem_shared/{mailCrabProvider-DRE5snM9.js → mailCrabProvider-De2YxPlF.js} +1 -1
  45. package/dist/packem_shared/{mailPaceProvider-DCa-4ghl.js → mailPaceProvider-DwNTuFb2.js} +1 -1
  46. package/dist/packem_shared/{mailchannelsProvider-GiwkYBdD.js → mailchannelsProvider-Dwl0Typz.js} +1 -1
  47. package/dist/packem_shared/{mailerSendProvider-RK6IbUrL.js → mailerSendProvider-CyMIbqGq.js} +1 -1
  48. package/dist/packem_shared/mailgunProvider-DWKJYRKT.js +1 -0
  49. package/dist/packem_shared/mailjetProvider-DXPJQO1G.js +1 -0
  50. package/dist/packem_shared/{mailomatProvider-DPDpVS8r.js → mailomatProvider-DopZk27y.js} +1 -1
  51. package/dist/packem_shared/{mailtrapProvider-DtrS4Q34.js → mailtrapProvider-CTg4z3GN.js} +1 -1
  52. package/dist/packem_shared/{make-request-B9XjBynA.js → make-request-CDhxj-9b.js} +1 -1
  53. package/dist/packem_shared/{mandrillProvider-B84zH-eV.js → mandrillProvider-CAQeMtU_.js} +1 -1
  54. package/dist/packem_shared/{mockProvider-Behywbl1.js → mockProvider-EcpYlg-_.js} +1 -1
  55. package/dist/packem_shared/{netcoreProvider-D-wtCyJj.js → netcoreProvider-ua1avx07.js} +1 -1
  56. package/dist/packem_shared/{nodemailerProvider-BFHobXxt.js → nodemailerProvider-BZmQfKlM.js} +1 -1
  57. package/dist/packem_shared/{opentelemetryProvider-ByHC01ub.js → opentelemetryProvider-CAfWpywa.js} +1 -1
  58. package/dist/packem_shared/{outlook365Provider-Btk4Emig.js → outlook365Provider-SFYELGDr.js} +1 -1
  59. package/dist/packem_shared/{plunkProvider-Bw8e6460.js → plunkProvider-9amwuQri.js} +1 -1
  60. package/dist/packem_shared/{postalProvider-CT8zr89z.js → postalProvider-CeF3TOIW.js} +1 -1
  61. package/dist/packem_shared/{postmarkProvider-CQSqZWDs.js → postmarkProvider-BPgKEkgF.js} +1 -1
  62. package/dist/packem_shared/{provider-base-C7PuopYK.js → provider-base-B-xhQSqE.js} +1 -1
  63. package/dist/packem_shared/{provider.d-J-y6iogK.d.ts → provider.d-Cx5YQJdP.d.ts} +9 -9
  64. package/dist/packem_shared/{resendProvider-drJYlvLP.js → resendProvider-C9_sM8bH.js} +1 -1
  65. package/dist/packem_shared/{retry-ipI5DRJ8.js → retry-D1Rh-6Z4.js} +1 -1
  66. package/dist/packem_shared/{roundRobinProvider-D1by5KGW.js → roundRobinProvider-BPzLWZf-.js} +1 -1
  67. package/dist/packem_shared/{scalewayProvider-DU5gXQrl.js → scalewayProvider-DfC7275i.js} +1 -1
  68. package/dist/packem_shared/{sendGridProvider-BuTbEXW8.js → sendGridProvider-CUBBHBzs.js} +1 -1
  69. package/dist/packem_shared/smtpProvider-9nBSGtQl.js +27 -0
  70. package/dist/packem_shared/{sparkpostProvider-UAsFYIjP.js → sparkpostProvider-Be_d7S8o.js} +1 -1
  71. package/dist/packem_shared/{sweegoProvider-SUz0LIcA.js → sweegoProvider-CP1cNC-d.js} +1 -1
  72. package/dist/packem_shared/{tracer.d-MU42G1jG.d.ts → tracer.d-sb5yrt_n.d.ts} +2 -2
  73. package/dist/packem_shared/types.d-B0t3PQ3t.d.ts +107 -0
  74. package/dist/packem_shared/{types.d-ejzh-xBP.d.ts → types.d-B9295M4_.d.ts} +82 -82
  75. package/dist/packem_shared/types.d-BzoHR9nB.d.ts +61 -0
  76. package/dist/packem_shared/types.d-C5geVKes.d.ts +51 -0
  77. package/dist/packem_shared/types.d-GKqPNk0I.d.ts +24 -0
  78. package/dist/packem_shared/types.d-I-KeZ5w2.d.ts +9 -0
  79. package/dist/packem_shared/types.d-kHO4kX9q.d.ts +69 -0
  80. package/dist/packem_shared/utils-DjEtR3qT.js +1 -0
  81. package/dist/packem_shared/verifyMailgunWebhook-DNk080BF.js +1 -0
  82. package/dist/packem_shared/verifyPostmarkWebhook-B4OIEHQF.js +1 -0
  83. package/dist/packem_shared/verifyResendWebhook-C7E32LZ1.js +1 -0
  84. package/dist/packem_shared/verifySendGridWebhook-DtFMgBRP.js +1 -0
  85. package/dist/packem_shared/withEvents-CytsykaK.js +1 -0
  86. package/dist/packem_shared/{withSuppression-DBaZDMAr.js → withSuppression-wDl4NTb-.js} +1 -1
  87. package/dist/packem_shared/{zeptomailProvider-DXNX9mG_.js → zeptomailProvider-BZ0fK0Lk.js} +1 -1
  88. package/dist/providers/ahasend/index.d.ts +18 -18
  89. package/dist/providers/ahasend/index.js +1 -1
  90. package/dist/providers/autosend/index.d.ts +30 -30
  91. package/dist/providers/autosend/index.js +1 -1
  92. package/dist/providers/aws-ses/index.d.ts +20 -20
  93. package/dist/providers/aws-ses/index.js +1 -1
  94. package/dist/providers/azure/index.d.ts +26 -26
  95. package/dist/providers/azure/index.js +1 -1
  96. package/dist/providers/brevo/index.d.ts +35 -35
  97. package/dist/providers/brevo/index.js +1 -1
  98. package/dist/providers/cloudflare-email/index.d.ts +25 -25
  99. package/dist/providers/cloudflare-email/index.js +1 -1
  100. package/dist/providers/failover/index.d.ts +14 -14
  101. package/dist/providers/failover/index.js +1 -1
  102. package/dist/providers/http/index.d.ts +15 -15
  103. package/dist/providers/http/index.js +1 -1
  104. package/dist/providers/infobip/index.d.ts +28 -28
  105. package/dist/providers/infobip/index.js +1 -1
  106. package/dist/providers/loops/index.d.ts +25 -25
  107. package/dist/providers/loops/index.js +1 -1
  108. package/dist/providers/mailchannels/index.d.ts +13 -13
  109. package/dist/providers/mailchannels/index.js +1 -1
  110. package/dist/providers/mailcrab/index.d.ts +17 -17
  111. package/dist/providers/mailcrab/index.js +1 -1
  112. package/dist/providers/mailersend/index.d.ts +24 -24
  113. package/dist/providers/mailersend/index.js +1 -1
  114. package/dist/providers/mailgun/index.d.ts +37 -37
  115. package/dist/providers/mailgun/index.js +1 -1
  116. package/dist/providers/mailjet/index.d.ts +36 -36
  117. package/dist/providers/mailjet/index.js +1 -1
  118. package/dist/providers/mailomat/index.d.ts +20 -20
  119. package/dist/providers/mailomat/index.js +1 -1
  120. package/dist/providers/mailpace/index.d.ts +24 -24
  121. package/dist/providers/mailpace/index.js +1 -1
  122. package/dist/providers/mailtrap/index.d.ts +22 -22
  123. package/dist/providers/mailtrap/index.js +1 -1
  124. package/dist/providers/mandrill/index.d.ts +36 -36
  125. package/dist/providers/mandrill/index.js +1 -1
  126. package/dist/providers/mock/index.d.ts +8 -8
  127. package/dist/providers/mock/index.js +1 -1
  128. package/dist/providers/netcore/index.d.ts +17 -17
  129. package/dist/providers/netcore/index.js +1 -1
  130. package/dist/providers/nodemailer/index.d.ts +22 -22
  131. package/dist/providers/nodemailer/index.js +1 -1
  132. package/dist/providers/opentelemetry/index.d.ts +20 -20
  133. package/dist/providers/opentelemetry/index.js +1 -1
  134. package/dist/providers/outlook365/index.d.ts +82 -82
  135. package/dist/providers/outlook365/index.js +1 -1
  136. package/dist/providers/plunk/index.d.ts +18 -18
  137. package/dist/providers/plunk/index.js +1 -1
  138. package/dist/providers/postal/index.d.ts +24 -24
  139. package/dist/providers/postal/index.js +1 -1
  140. package/dist/providers/postmark/index.d.ts +30 -30
  141. package/dist/providers/postmark/index.js +1 -1
  142. package/dist/providers/resend/index.d.ts +24 -24
  143. package/dist/providers/resend/index.js +1 -1
  144. package/dist/providers/roundrobin/index.d.ts +14 -14
  145. package/dist/providers/roundrobin/index.js +1 -1
  146. package/dist/providers/scaleway/index.d.ts +22 -22
  147. package/dist/providers/scaleway/index.js +1 -1
  148. package/dist/providers/sendgrid/index.d.ts +25 -25
  149. package/dist/providers/sendgrid/index.js +1 -1
  150. package/dist/providers/smtp/index.d.ts +11 -11
  151. package/dist/providers/smtp/index.js +1 -1
  152. package/dist/providers/sparkpost/index.d.ts +21 -21
  153. package/dist/providers/sparkpost/index.js +1 -1
  154. package/dist/providers/sweego/index.d.ts +20 -20
  155. package/dist/providers/sweego/index.js +1 -1
  156. package/dist/providers/zeptomail/index.d.ts +17 -17
  157. package/dist/providers/zeptomail/index.js +1 -1
  158. package/dist/queue/bullmq-queue.d.ts +26 -26
  159. package/dist/queue/index.d.ts +86 -86
  160. package/dist/queue/pg-boss-queue.d.ts +13 -13
  161. package/dist/queue/sqs-queue.d.ts +20 -20
  162. package/dist/queue/unstorage-queue.d.ts +47 -47
  163. package/dist/queue/unstorage-queue.js +1 -1
  164. package/dist/render/cid.d.ts +12 -12
  165. package/dist/render/css-inline.d.ts +12 -12
  166. package/dist/render/css-inline.js +1 -1
  167. package/dist/render/dark-mode.d.ts +12 -12
  168. package/dist/render/preheader.d.ts +16 -16
  169. package/dist/template-engines/handlebars.d.ts +19 -19
  170. package/dist/template-engines/handlebars.js +1 -1
  171. package/dist/template-engines/html-to-text.d.ts +12 -12
  172. package/dist/template-engines/html-to-text.js +1 -1
  173. package/dist/template-engines/i18n.d.ts +43 -43
  174. package/dist/template-engines/i18n.js +1 -1
  175. package/dist/template-engines/jsx-email.d.ts +8 -8
  176. package/dist/template-engines/jsx-email.js +1 -1
  177. package/dist/template-engines/liquid.d.ts +9 -9
  178. package/dist/template-engines/liquid.js +1 -1
  179. package/dist/template-engines/mjml.d.ts +9 -9
  180. package/dist/template-engines/mjml.js +1 -1
  181. package/dist/template-engines/react-email.d.ts +8 -8
  182. package/dist/template-engines/react-email.js +1 -1
  183. package/dist/template-engines/vue-email.d.ts +8 -8
  184. package/dist/template-engines/vue-email.js +1 -1
  185. package/dist/test/index.d.ts +89 -89
  186. package/dist/test/index.js +1 -1
  187. package/dist/utils/cache.d.ts +27 -27
  188. package/dist/utils/format-email-address.d.ts +6 -6
  189. package/dist/utils/format-email-address.js +1 -1
  190. package/dist/utils/normalize-email-aliases.d.ts +19 -19
  191. package/dist/utils/parse-address.d.ts +16 -16
  192. package/dist/utils/parse-eml.d.ts +18 -18
  193. package/dist/utils/parse-eml.js +3 -3
  194. package/dist/utils/result.d.ts +30 -30
  195. package/dist/utils/result.js +1 -1
  196. package/dist/utils/validation/check-feature-support.d.ts +33 -33
  197. package/dist/utils/validation/validate-email.d.ts +4 -4
  198. package/dist/webhooks/index.d.ts +134 -134
  199. package/dist/webhooks/index.js +1 -1
  200. package/package.json +1 -1
  201. package/dist/packem_shared/EmailError-B-sEf3bp.js +0 -1
  202. package/dist/packem_shared/Mail-CYAwMRnX.js +0 -1
  203. package/dist/packem_shared/MailMessage-DQRgs5Dz.js +0 -1
  204. package/dist/packem_shared/SmimeEncrypter-DavopRlE.js +0 -6
  205. package/dist/packem_shared/SmimeSigner-0onWksAv.js +0 -8
  206. package/dist/packem_shared/arcMessageSignatureBase-DDLEHW2E.js +0 -17
  207. package/dist/packem_shared/attachment-processor-CMp7qqMI.js +0 -1
  208. package/dist/packem_shared/azureProvider-Cw_Tmde6.js +0 -1
  209. package/dist/packem_shared/build-mime-message-BW5FQ2Bt.js +0 -3
  210. package/dist/packem_shared/dedupeMiddleware-B6ajWOTi.js +0 -1
  211. package/dist/packem_shared/event-bus.d-DEl3w_EW.d.ts +0 -104
  212. package/dist/packem_shared/generate-boundary-DQbzDiOI.js +0 -1
  213. package/dist/packem_shared/index-BoZvzveg.js +0 -11
  214. package/dist/packem_shared/isValidSigningCertUrl-Bii1AMGC.js +0 -3
  215. package/dist/packem_shared/mail.d-B9SSqyy0.d.ts +0 -909
  216. package/dist/packem_shared/mailgunProvider-D9HUWGKN.js +0 -1
  217. package/dist/packem_shared/mailjetProvider-DelLs2Vt.js +0 -1
  218. package/dist/packem_shared/smtpProvider-5MI3-EPh.js +0 -25
  219. package/dist/packem_shared/types.d-BId55FW2.d.ts +0 -107
  220. package/dist/packem_shared/types.d-CmoWvdZi.d.ts +0 -61
  221. package/dist/packem_shared/types.d-DCkecJse.d.ts +0 -51
  222. package/dist/packem_shared/types.d-Mpu0HZoG.d.ts +0 -24
  223. package/dist/packem_shared/types.d-lcJZmwRK.d.ts +0 -69
  224. package/dist/packem_shared/types.d-nyR1ty1Q.d.ts +0 -9
  225. package/dist/packem_shared/utils-BfYfPB_I.js +0 -1
  226. package/dist/packem_shared/verifyMailgunWebhook-Cwl0OD3P.js +0 -1
  227. package/dist/packem_shared/verifyPostmarkWebhook-C72ZvbrG.js +0 -1
  228. package/dist/packem_shared/verifyResendWebhook-YK2zNDXR.js +0 -1
  229. package/dist/packem_shared/verifySendGridWebhook-Dbwc1tfG.js +0 -1
  230. package/dist/packem_shared/withEvents-CCVblSqj.js +0 -1
@@ -0,0 +1,69 @@
1
+ import { E as EmailOptions } from "./types.d-B9295M4_.js";
2
+ /**
3
+ * A queued email job.
4
+ */
5
+ interface QueueJob {
6
+ /**
7
+ * Number of delivery attempts so far.
8
+ */
9
+ attempts: number;
10
+ /**
11
+ * Unique job id.
12
+ */
13
+ id: string;
14
+ /**
15
+ * The message to send.
16
+ */
17
+ message: EmailOptions;
18
+ /**
19
+ * Earliest time (ms since epoch) the job may be delivered. Used for `scheduledAt` and retry backoff.
20
+ */
21
+ scheduledAt: number;
22
+ }
23
+ /**
24
+ * Options when enqueueing a message.
25
+ */
26
+ interface EnqueueOptions {
27
+ /**
28
+ * Deliver no earlier than this time. Accepts a `Date` or epoch milliseconds.
29
+ */
30
+ scheduledAt?: Date | number;
31
+ }
32
+ /**
33
+ * A durable email queue. The in-memory default (`MemoryQueue`) implements this; adapters can
34
+ * back it with Redis/BullMQ, pg-boss, SQS, or `unstorage`.
35
+ *
36
+ * Delivery is reserve → ack/retry: {@link EmailQueue.reserve} hands out a job and hides it for a
37
+ * visibility window; the worker then {@link EmailQueue.ack}s it on success or {@link EmailQueue.retry}s
38
+ * it on failure.
39
+ */
40
+ interface EmailQueue {
41
+ /**
42
+ * Marks a reserved job as successfully processed and removes it.
43
+ * @param id The job id.
44
+ */
45
+ ack: (id: string) => Promise<void> | void;
46
+ /**
47
+ * Adds a message to the queue.
48
+ * @param message The message to send later.
49
+ * @param options Optional scheduling. See {@link EnqueueOptions}.
50
+ * @returns The new job id.
51
+ */
52
+ enqueue: (message: EmailOptions, options?: EnqueueOptions) => Promise<string> | string;
53
+ /**
54
+ * Reserves the next ready job, hiding it from other workers for a visibility window.
55
+ * @returns The next job, or `undefined` when none is ready.
56
+ */
57
+ reserve: () => (QueueJob | undefined) | Promise<QueueJob | undefined>;
58
+ /**
59
+ * Returns a reserved job to the queue, optionally after a delay, incrementing its attempt count.
60
+ * @param id The job id.
61
+ * @param delayMs Milliseconds to wait before the job becomes ready again.
62
+ */
63
+ retry: (id: string, delayMs?: number) => Promise<void> | void;
64
+ /**
65
+ * The number of jobs not yet acked (ready + reserved).
66
+ */
67
+ size: () => number | Promise<number>;
68
+ }
69
+ export { EnqueueOptions as E, QueueJob as Q, EmailQueue as a };
@@ -0,0 +1 @@
1
+ import{createRequire as c}from"node:module";let f;const u=e=>(f??=c(import.meta.url))(e),s=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,a=e=>{if(typeof s<"u"&&s.versions&&s.versions.node){const[t,r]=s.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return s.getBuiltinModule(e)}return u(e)},{Buffer:i}=a("node:buffer"),{timingSafeEqual:l}=a("node:crypto"),_=(e,t)=>{if(e instanceof Headers)return e.get(t)??void 0;const r=t.toLowerCase();for(const[o,n]of Object.entries(e))if(o.toLowerCase()===r)return Array.isArray(n)?n[0]:n},g=(e,t)=>{const r=i.from(e),o=i.from(t);return r.length!==o.length?!1:l(r,o)},m=(e,t,r=Date.now())=>t<=0?!0:Number.isFinite(e)?Math.abs(r/1e3-e)<=t:!1;export{_ as g,m as i,g as t};
@@ -0,0 +1 @@
1
+ import{createRequire as l}from"node:module";import{i as g,t as _}from"./utils-DjEtR3qT.js";let m;const p=e=>(m??=l(import.meta.url))(e),r=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,f=e=>{if(typeof r<"u"&&r.versions&&r.versions.node){const[t,s]=r.versions.node.split(".").map(Number);if(t>22||t===22&&s>=3||t===20&&s>=16)return r.getBuiltinModule(e)}return p(e)},{createHmac:d}=f("node:crypto"),v=e=>{const{now:t,signature:s,signingKey:n,timestamp:i,token:o,tolerance:a=300}=e,c=typeof i=="number"?i:Number.parseInt(i,10);if(!g(c,a,t))return{reason:"timestamp-out-of-tolerance",valid:!1};const u=d("sha256",n).update(`${String(i)}${o}`).digest("hex");return _(s,u)?{valid:!0}:{reason:"signature-mismatch",valid:!1}};export{v as verifyMailgunWebhook};
@@ -0,0 +1 @@
1
+ import{createRequire as a}from"node:module";import{t as d}from"./utils-DjEtR3qT.js";let c;const u=e=>(c??=a(import.meta.url))(e),r=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,f=e=>{if(typeof r<"u"&&r.versions&&r.versions.node){const[s,t]=r.versions.node.split(".").map(Number);if(s>22||s===22&&t>=3||s===20&&t>=16)return r.getBuiltinModule(e)}return u(e)},{Buffer:l}=f("node:buffer"),p=e=>{const{authorization:s,password:t,username:i}=e;if(!s?.startsWith("Basic "))return{reason:"missing-credentials",valid:!1};const o=l.from(s.slice(6),"base64").toString("utf8"),n=`${i}:${t}`;return d(o,n)?{valid:!0}:{reason:"credentials-mismatch",valid:!1}};export{p as verifyPostmarkWebhook};
@@ -0,0 +1 @@
1
+ import{createRequire as v}from"node:module";import{g as t,i as q,t as w}from"./utils-DjEtR3qT.js";let y;const j=e=>(y??=v(import.meta.url))(e),r=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,l=e=>{if(typeof r<"u"&&r.versions&&r.versions.node){const[s,o]=r.versions.node.split(".").map(Number);if(s>22||s===22&&o>=3||s===20&&o>=16)return r.getBuiltinModule(e)}return j(e)},{Buffer:u}=l("node:buffer"),{createHmac:k}=l("node:crypto"),T="v1",W=e=>e.startsWith("whsec_")?u.from(e.slice(6),"base64"):u.from(e,"utf8"),x=e=>{const{headers:s,now:o,payload:d,secret:f,tolerance:m=300}=e,n=t(s,"webhook-id")??t(s,"svix-id"),i=t(s,"webhook-timestamp")??t(s,"svix-timestamp"),a=t(s,"webhook-signature")??t(s,"svix-signature");if(!n||!i||!a)return{reason:"missing-headers",valid:!1};const p=Number.parseInt(i,10);if(!q(p,m,o))return{reason:"timestamp-out-of-tolerance",valid:!1};const h=`${n}.${i}.${d}`,_=k("sha256",W(f)).update(h).digest("base64");return a.split(" ").some(g=>{const[b,c]=g.split(",");return b!==T||!c?!1:w(c,_)})?{valid:!0}:{reason:"signature-mismatch",valid:!1}},B=e=>x(e);export{B as verifyResendWebhook,x as verifyStandardWebhook};
@@ -0,0 +1 @@
1
+ import{createRequire as y}from"node:module";import g from"./EmailError-2CCyVX1S.js";import{i as v}from"./utils-DjEtR3qT.js";let _;const b=e=>(_??=y(import.meta.url))(e),s=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,d=e=>{if(typeof s<"u"&&s.versions&&s.versions.node){const[r,o]=s.versions.node.split(".").map(Number);if(r>22||r===22&&o>=3||r===20&&o>=16)return s.getBuiltinModule(e)}return b(e)},{Buffer:i}=d("node:buffer"),{verify:h,createPublicKey:l}=d("node:crypto"),j=e=>e.includes("-----BEGIN")?l(e):l({format:"der",key:i.from(e,"base64"),type:"spki"}),w=e=>{const{now:r,payload:o,publicKey:f,signature:n,timestamp:t,tolerance:u=300}=e;if(!n||!t)return{reason:"missing-headers",valid:!1};let a;try{a=j(f)}catch(p){throw new g("webhooks","Failed to parse SendGrid verification key",{cause:p})}const m=i.from(t+o,"utf8");let c;try{c=h("sha256",m,{dsaEncoding:"der",key:a},i.from(n,"base64"))}catch{return{reason:"signature-malformed",valid:!1}}return c?v(Number.parseInt(t,10),u,r)?{valid:!0}:{reason:"timestamp-out-of-tolerance",valid:!1}:{reason:"signature-mismatch",valid:!1}};export{w as verifySendGridWebhook};
@@ -0,0 +1 @@
1
+ import{createRequire as d}from"node:module";let p;const m=e=>(p??=d(import.meta.url))(e),i=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,u=e=>{if(typeof i<"u"&&i.versions&&i.versions.node){const[s,t]=i.versions.node.split(".").map(Number);if(s>22||s===22&&t>=3||s===20&&t>=16)return i.getBuiltinModule(e)}return m(e)},{randomUUID:_}=u("node:crypto"),l=e=>(Array.isArray(e)?e[0]:e)?.email,y=(e,s={})=>{const{idFactory:t=_,now:o=Date.now}=s;return async(a,c)=>{const n=l(a.to);e.emit({id:t(),recipient:n,timestamp:new Date(o()),type:"queued"});const r=await c(a);return r.success?e.emit({id:t(),messageId:r.data?.messageId,provider:r.data?.provider,recipient:n,timestamp:new Date(o()),type:"sent"}):e.emit({data:{error:r.error instanceof Error?r.error.message:String(r.error)},id:t(),recipient:n,timestamp:new Date(o()),type:"failed"}),r}};export{y as withEvents};
@@ -1 +1 @@
1
- import{filterSuppressed as d}from"./createSuppressionStore-CeAZKCbY.js";import w from"./EmailError-B-sEf3bp.js";const u=(o,c={})=>async(e,p)=>{const t={allowed:[],suppressed:[]},r=await d(e.to,o),l=e.cc?await d(e.cc,o):t,s=e.bcc?await d(e.bcc,o):t,a=[...r.suppressed,...l.suppressed,...s.suppressed];return a.length>0&&c.onSuppressed?.(a),r.allowed.length===0&&l.allowed.length===0&&s.allowed.length===0?{error:new w("middleware","All recipients are suppressed",{code:"ALL_SUPPRESSED"}),success:!1}:p({...e,bcc:s.allowed.length>0?s.allowed:void 0,cc:l.allowed.length>0?l.allowed:void 0,to:r.allowed})};export{u as withSuppression};
1
+ import{filterSuppressed as d}from"./createSuppressionStore-CeAZKCbY.js";import w from"./EmailError-2CCyVX1S.js";const u=(o,c={})=>async(e,p)=>{const t={allowed:[],suppressed:[]},r=await d(e.to,o),l=e.cc?await d(e.cc,o):t,s=e.bcc?await d(e.bcc,o):t,a=[...r.suppressed,...l.suppressed,...s.suppressed];return a.length>0&&c.onSuppressed?.(a),r.allowed.length===0&&l.allowed.length===0&&s.allowed.length===0?{error:new w("middleware","All recipients are suppressed",{code:"ALL_SUPPRESSED"}),success:!1}:p({...e,bcc:s.allowed.length>0?s.allowed:void 0,cc:l.allowed.length>0?l.allowed:void 0,to:r.allowed})};export{u as withSuppression};
@@ -1 +1 @@
1
- import l from"./EmailError-B-sEf3bp.js";import y from"./RequiredOptionError-DuNNY_a5.js";import{e as b}from"./generate-message-id-gXAuMz4g.js";import{s as k}from"./headers-to-record-De1Eg951.js";import{m as v}from"./make-request-B9XjBynA.js";import{i as w}from"./retry-ipI5DRJ8.js";import{s as A,a as z}from"./sanitize-header-DtQwAnzg.js";import{f as _}from"./validate-email-options-mCM9dVug.js";import{defineProvider as j}from"./defineProvider-C9q-7iwt.js";import{P,h as I,c as T}from"./provider-base-C7PuopYK.js";import{n as h}from"./address-formatter-BWR2Dddx.js";const i="zeptomail",O="https://api.zeptomail.com/v1.1",Z=3e4,E=3,L=j((s={})=>{if(!s.token)throw new y(i,"token");if(!s.token.startsWith("Zoho-enczapikey "))throw new l(i,'Token should be in the format "Zoho-enczapikey <your_api_key>"');const o={debug:s.debug??!1,endpoint:s.endpoint??O,logger:s.logger,retries:s.retries??E,timeout:s.timeout??Z,token:s.token},u=new P,n=T(i,s.logger);return{features:{attachments:!0,batchSending:!1,customHeaders:!0,html:!0,replyTo:!0,scheduling:!1,tagging:!1,templates:!1,tracking:!0},async initialize(){await u.ensureInitialized(async()=>{if(!await this.isAvailable())throw new l(i,"Zeptomail API not available or invalid token");n.debug("Provider initialized successfully")},i)},async isAvailable(){try{return o.token&&o.token.startsWith("Zoho-enczapikey ")?(n.debug("Token format is valid, assuming Zeptomail is available"),!0):!1}catch(e){return n.debug("Error checking availability:",e),!1}},name:i,options:o,async sendEmail(e){try{const m=_(e);if(m.length>0)return{error:new l(i,`Invalid email options: ${m.join(", ")}`),success:!1};await u.ensureInitialized(()=>this.initialize(),i);const a={from:h(e.from).address,subject:e.subject};if(Array.isArray(e.to)?a.to=e.to.length===1?e.to[0].email:e.to.map(t=>t.email):a.to=e.to.email,e.text&&(a.textbody=e.text),e.html&&(a.htmlbody=e.html),e.cc&&(Array.isArray(e.cc)?a.cc=e.cc.length===1?e.cc[0].email:e.cc.map(t=>t.email):a.cc=e.cc.email),e.bcc&&(Array.isArray(e.bcc)?a.bcc=e.bcc.length===1?e.bcc[0].email:e.bcc.map(t=>t.email):a.bcc=e.bcc.email),e.replyTo&&(a.reply_to=[h(e.replyTo).address]),e.trackClicks!==void 0&&(a.track_clicks=e.trackClicks),e.trackOpens!==void 0&&(a.track_opens=e.trackOpens),e.clientReference&&(a.client_reference=e.clientReference),e.mimeHeaders&&Object.keys(e.mimeHeaders).length>0){const t={};for(const[r,d]of Object.entries(e.mimeHeaders))t[r]=d;a.mime_headers=t}if(e.headers){const t=k(e.headers);Object.keys(t).length>0&&(a.mime_headers??={},Object.entries(t).forEach(([r,d])=>{a.mime_headers&&(a.mime_headers[A(r)]=z(d))}))}e.attachments&&e.attachments.length>0&&(a.attachments=e.attachments.map(t=>{const r={name:t.filename};return t.content?(r.content=typeof t.content=="string"?t.content:t.content.toString("base64"),t.contentType&&(r.mime_type=t.contentType)):t.path&&(r.file_cache_key=t.path),r})),n.debug("Sending email via Zeptomail API",{subject:a.subject,to:a.to});const g={Accept:"application/json",Authorization:o.token,"Content-Type":"application/json"},c=await w(async()=>v(`${o.endpoint}/email`,{headers:g,method:"POST",timeout:o.timeout},JSON.stringify(a)),o.retries);if(!c.success){n.debug("API request failed",c.error);let t=c.error instanceof Error?c.error.message:"Unknown error";const r=c.data;return r?.body?.message?t+=` Details: ${r.body.message}`:r?.body?.error?.message&&(t+=` Details: ${r.body.error.message}`),{error:new l(i,`Failed to send email: ${t}`,{cause:c.error}),success:!1}}const p=c.data?.body,f=p?.request_id??b();return n.debug("Email sent successfully",{messageId:f}),{data:{messageId:f,provider:i,response:p,sent:!0,timestamp:new Date},success:!0}}catch(m){return{error:I(i,"send email",m,n),success:!1}}},async validateCredentials(){return this.isAvailable()}}});export{L as default};
1
+ import l from"./EmailError-2CCyVX1S.js";import y from"./RequiredOptionError-BmpC5whN.js";import{e as b}from"./generate-message-id-gXAuMz4g.js";import{s as k}from"./headers-to-record-De1Eg951.js";import{m as v}from"./make-request-CDhxj-9b.js";import{i as w}from"./retry-D1Rh-6Z4.js";import{s as A,a as z}from"./sanitize-header-DtQwAnzg.js";import{f as _}from"./validate-email-options-mCM9dVug.js";import{defineProvider as j}from"./defineProvider-C9q-7iwt.js";import{P,h as I,c as T}from"./provider-base-B-xhQSqE.js";import{n as h}from"./address-formatter-bfmGfQ83.js";const i="zeptomail",O="https://api.zeptomail.com/v1.1",Z=3e4,E=3,L=j((s={})=>{if(!s.token)throw new y(i,"token");if(!s.token.startsWith("Zoho-enczapikey "))throw new l(i,'Token should be in the format "Zoho-enczapikey <your_api_key>"');const o={debug:s.debug??!1,endpoint:s.endpoint??O,logger:s.logger,retries:s.retries??E,timeout:s.timeout??Z,token:s.token},u=new P,n=T(i,s.logger);return{features:{attachments:!0,batchSending:!1,customHeaders:!0,html:!0,replyTo:!0,scheduling:!1,tagging:!1,templates:!1,tracking:!0},async initialize(){await u.ensureInitialized(async()=>{if(!await this.isAvailable())throw new l(i,"Zeptomail API not available or invalid token");n.debug("Provider initialized successfully")},i)},async isAvailable(){try{return o.token&&o.token.startsWith("Zoho-enczapikey ")?(n.debug("Token format is valid, assuming Zeptomail is available"),!0):!1}catch(e){return n.debug("Error checking availability:",e),!1}},name:i,options:o,async sendEmail(e){try{const m=_(e);if(m.length>0)return{error:new l(i,`Invalid email options: ${m.join(", ")}`),success:!1};await u.ensureInitialized(()=>this.initialize(),i);const a={from:h(e.from).address,subject:e.subject};if(Array.isArray(e.to)?a.to=e.to.length===1?e.to[0].email:e.to.map(t=>t.email):a.to=e.to.email,e.text&&(a.textbody=e.text),e.html&&(a.htmlbody=e.html),e.cc&&(Array.isArray(e.cc)?a.cc=e.cc.length===1?e.cc[0].email:e.cc.map(t=>t.email):a.cc=e.cc.email),e.bcc&&(Array.isArray(e.bcc)?a.bcc=e.bcc.length===1?e.bcc[0].email:e.bcc.map(t=>t.email):a.bcc=e.bcc.email),e.replyTo&&(a.reply_to=[h(e.replyTo).address]),e.trackClicks!==void 0&&(a.track_clicks=e.trackClicks),e.trackOpens!==void 0&&(a.track_opens=e.trackOpens),e.clientReference&&(a.client_reference=e.clientReference),e.mimeHeaders&&Object.keys(e.mimeHeaders).length>0){const t={};for(const[r,d]of Object.entries(e.mimeHeaders))t[r]=d;a.mime_headers=t}if(e.headers){const t=k(e.headers);Object.keys(t).length>0&&(a.mime_headers??={},Object.entries(t).forEach(([r,d])=>{a.mime_headers&&(a.mime_headers[A(r)]=z(d))}))}e.attachments&&e.attachments.length>0&&(a.attachments=e.attachments.map(t=>{const r={name:t.filename};return t.content?(r.content=typeof t.content=="string"?t.content:t.content.toString("base64"),t.contentType&&(r.mime_type=t.contentType)):t.path&&(r.file_cache_key=t.path),r})),n.debug("Sending email via Zeptomail API",{subject:a.subject,to:a.to});const g={Accept:"application/json",Authorization:o.token,"Content-Type":"application/json"},c=await w(async()=>v(`${o.endpoint}/email`,{headers:g,method:"POST",timeout:o.timeout},JSON.stringify(a)),o.retries);if(!c.success){n.debug("API request failed",c.error);let t=c.error instanceof Error?c.error.message:"Unknown error";const r=c.data;return r?.body?.message?t+=` Details: ${r.body.message}`:r?.body?.error?.message&&(t+=` Details: ${r.body.error.message}`),{error:new l(i,`Failed to send email: ${t}`,{cause:c.error}),success:!1}}const p=c.data?.body,f=p?.request_id??b();return n.debug("Email sent successfully",{messageId:f}),{data:{messageId:f,provider:i,response:p,sent:!0,timestamp:new Date},success:!0}}catch(m){return{error:I(i,"send email",m,n),success:!1}}},async validateCredentials(){return this.isAvailable()}}});export{L as default};
@@ -1,36 +1,36 @@
1
- import { P as ProviderFactory } from "../../packem_shared/provider.d-J-y6iogK.js";
2
- export type { a as Provider } from "../../packem_shared/provider.d-J-y6iogK.js";
3
- import { B as BaseConfig, E as EmailOptions } from "../../packem_shared/types.d-ejzh-xBP.js";
1
+ import { P as ProviderFactory } from "../../packem_shared/provider.d-Cx5YQJdP.js";
2
+ export type { a as Provider } from "../../packem_shared/provider.d-Cx5YQJdP.js";
3
+ import { B as BaseConfig, E as EmailOptions } from "../../packem_shared/types.d-B9295M4_.js";
4
4
  import 'node:buffer';
5
5
  /**
6
- * AhaSend configuration
7
- */
6
+ * AhaSend configuration
7
+ */
8
8
  interface AhaSendConfig extends BaseConfig {
9
9
  /**
10
- * AhaSend API key
11
- */
10
+ * AhaSend API key
11
+ */
12
12
  apiKey: string;
13
13
  /**
14
- * AhaSend API endpoint
15
- * Defaults to: https://api.ahasend.com
16
- */
14
+ * AhaSend API endpoint
15
+ * Defaults to: https://api.ahasend.com
16
+ */
17
17
  endpoint?: string;
18
18
  }
19
19
  /**
20
- * AhaSend-specific email options
21
- */
20
+ * AhaSend-specific email options
21
+ */
22
22
  interface AhaSendEmailOptions extends EmailOptions {
23
23
  /**
24
- * AhaSend template ID for template-based emails
25
- */
24
+ * AhaSend template ID for template-based emails
25
+ */
26
26
  templateId?: string;
27
27
  /**
28
- * Template variables for AhaSend templates
29
- */
28
+ * Template variables for AhaSend templates
29
+ */
30
30
  templateVariables?: Record<string, unknown>;
31
31
  }
32
32
  /**
33
- * AhaSend Provider for sending emails through AhaSend API
34
- */
33
+ * AhaSend Provider for sending emails through AhaSend API
34
+ */
35
35
  declare const ahaSendProvider: ProviderFactory<AhaSendConfig>;
36
36
  export { type AhaSendConfig, type AhaSendEmailOptions, type ProviderFactory, ahaSendProvider };
@@ -1 +1 @@
1
- import{default as r}from"../../packem_shared/ahaSendProvider-DSuZIzaQ.js";export{r as ahaSendProvider};
1
+ import{default as r}from"../../packem_shared/ahaSendProvider-C6nBGCCa.js";export{r as ahaSendProvider};
@@ -1,56 +1,56 @@
1
- import { P as ProviderFactory } from "../../packem_shared/provider.d-J-y6iogK.js";
2
- export type { a as Provider } from "../../packem_shared/provider.d-J-y6iogK.js";
3
- import { B as BaseConfig, E as EmailOptions } from "../../packem_shared/types.d-ejzh-xBP.js";
1
+ import { P as ProviderFactory } from "../../packem_shared/provider.d-Cx5YQJdP.js";
2
+ export type { a as Provider } from "../../packem_shared/provider.d-Cx5YQJdP.js";
3
+ import { B as BaseConfig, E as EmailOptions } from "../../packem_shared/types.d-B9295M4_.js";
4
4
  import 'node:buffer';
5
5
  /**
6
- * AutoSend configuration.
7
- */
6
+ * AutoSend configuration.
7
+ */
8
8
  interface AutoSendConfig extends BaseConfig {
9
9
  /**
10
- * AutoSend API key (sent as a Bearer token).
11
- */
10
+ * AutoSend API key (sent as a Bearer token).
11
+ */
12
12
  apiKey: string;
13
13
  /**
14
- * API endpoint override (default `https://api.autosend.com/v1`).
15
- */
14
+ * API endpoint override (default `https://api.autosend.com/v1`).
15
+ */
16
16
  endpoint?: string;
17
17
  }
18
18
  /**
19
- * AutoSend-specific email options.
20
- *
21
- * See the [send reference](https://docs.autosend.com/api-reference/mails/send). AutoSend's
22
- * `/mails/send` takes exactly one `to` recipient — pass a single address, and use `cc`/`bcc`
23
- * for additional ones.
24
- */
19
+ * AutoSend-specific email options.
20
+ *
21
+ * See the [send reference](https://docs.autosend.com/api-reference/mails/send). AutoSend's
22
+ * `/mails/send` takes exactly one `to` recipient — pass a single address, and use `cc`/`bcc`
23
+ * for additional ones.
24
+ */
25
25
  interface AutoSendEmailOptions extends EmailOptions {
26
26
  /**
27
- * Sends even if the recipient is on the suppression list. Use sparingly: suppressions exist
28
- * to protect the sending domain's reputation.
29
- */
27
+ * Sends even if the recipient is on the suppression list. Use sparingly: suppressions exist
28
+ * to protect the sending domain's reputation.
29
+ */
30
30
  bypassSuppressions?: boolean;
31
31
  /**
32
- * Values substituted into Handlebars placeholders (`{{ name }}`) in the template or `html`.
33
- */
32
+ * Values substituted into Handlebars placeholders (`{{ name }}`) in the template or `html`.
33
+ */
34
34
  dynamicData?: Record<string, unknown>;
35
35
  /**
36
- * An AutoSend template id, used instead of `html` / `text`.
37
- */
36
+ * An AutoSend template id, used instead of `html` / `text`.
37
+ */
38
38
  templateId?: string;
39
39
  /**
40
- * Enables click tracking for this message.
41
- */
40
+ * Enables click tracking for this message.
41
+ */
42
42
  trackingClick?: boolean;
43
43
  /**
44
- * Enables open tracking for this message.
45
- */
44
+ * Enables open tracking for this message.
45
+ */
46
46
  trackingOpen?: boolean;
47
47
  /**
48
- * The unsubscribe group this message belongs to.
49
- */
48
+ * The unsubscribe group this message belongs to.
49
+ */
50
50
  unsubscribeGroupId?: string;
51
51
  }
52
52
  /**
53
- * AutoSend provider — sends through the [AutoSend send endpoint](https://docs.autosend.com/api-reference/mails/send).
54
- */
53
+ * AutoSend provider — sends through the [AutoSend send endpoint](https://docs.autosend.com/api-reference/mails/send).
54
+ */
55
55
  declare const autoSendProvider: ProviderFactory<AutoSendConfig, unknown, AutoSendEmailOptions>;
56
56
  export { type AutoSendConfig, type AutoSendEmailOptions, type ProviderFactory, autoSendProvider };
@@ -1 +1 @@
1
- import{default as r}from"../../packem_shared/autoSendProvider-DqAoelWR.js";export{r as autoSendProvider};
1
+ import{default as r}from"../../packem_shared/autoSendProvider-Dhig--Zo.js";export{r as autoSendProvider};
@@ -1,10 +1,10 @@
1
- import { P as ProviderFactory } from "../../packem_shared/provider.d-J-y6iogK.js";
2
- export type { a as Provider } from "../../packem_shared/provider.d-J-y6iogK.js";
3
- import { B as BaseConfig, E as EmailOptions } from "../../packem_shared/types.d-ejzh-xBP.js";
1
+ import { P as ProviderFactory } from "../../packem_shared/provider.d-Cx5YQJdP.js";
2
+ export type { a as Provider } from "../../packem_shared/provider.d-Cx5YQJdP.js";
3
+ import { B as BaseConfig, E as EmailOptions } from "../../packem_shared/types.d-B9295M4_.js";
4
4
  import 'node:buffer';
5
5
  /**
6
- * AWS SES configuration
7
- */
6
+ * AWS SES configuration
7
+ */
8
8
  interface AwsSesConfig extends BaseConfig {
9
9
  accessKeyId: string;
10
10
  apiVersion?: string;
@@ -15,33 +15,33 @@ interface AwsSesConfig extends BaseConfig {
15
15
  sessionToken?: string;
16
16
  }
17
17
  /**
18
- * AWS SES-specific email options
19
- */
18
+ * AWS SES-specific email options
19
+ */
20
20
  interface AwsSesEmailOptions extends EmailOptions {
21
21
  /**
22
- * Configuration set name
23
- */
22
+ * Configuration set name
23
+ */
24
24
  configurationSetName?: string;
25
25
  /**
26
- * Message tags as key-value pairs
27
- */
26
+ * Message tags as key-value pairs
27
+ */
28
28
  messageTags?: Record<string, string>;
29
29
  /**
30
- * Return path email address
31
- */
30
+ * Return path email address
31
+ */
32
32
  returnPath?: string;
33
33
  /**
34
- * Return path ARN
35
- */
34
+ * Return path ARN
35
+ */
36
36
  returnPathArn?: string;
37
37
  /**
38
- * Source ARN for sending authorization
39
- */
38
+ * Source ARN for sending authorization
39
+ */
40
40
  sourceArn?: string;
41
41
  }
42
42
  /**
43
- * AWS SES Email Provider Implementation - Zero dependency version
44
- * Uses native Node.js APIs instead of AWS SDK
45
- */
43
+ * AWS SES Email Provider Implementation - Zero dependency version
44
+ * Uses native Node.js APIs instead of AWS SDK
45
+ */
46
46
  declare const awsSesProvider: ProviderFactory<AwsSesConfig>;
47
47
  export { type AwsSesConfig, type AwsSesEmailOptions, type ProviderFactory, awsSesProvider };
@@ -1 +1 @@
1
- import{default as a}from"../../packem_shared/awsSesProvider-ClK1FUln.js";export{a as awsSesProvider};
1
+ import{default as a}from"../../packem_shared/awsSesProvider-CMqAmU5N.js";export{a as awsSesProvider};
@@ -1,52 +1,52 @@
1
- import { P as ProviderFactory } from "../../packem_shared/provider.d-J-y6iogK.js";
2
- export type { a as Provider } from "../../packem_shared/provider.d-J-y6iogK.js";
3
- import { B as BaseConfig, E as EmailOptions } from "../../packem_shared/types.d-ejzh-xBP.js";
1
+ import { P as ProviderFactory } from "../../packem_shared/provider.d-Cx5YQJdP.js";
2
+ export type { a as Provider } from "../../packem_shared/provider.d-Cx5YQJdP.js";
3
+ import { B as BaseConfig, E as EmailOptions } from "../../packem_shared/types.d-B9295M4_.js";
4
4
  import 'node:buffer';
5
5
  /**
6
- * Azure Communication Services configuration
7
- */
6
+ * Azure Communication Services configuration
7
+ */
8
8
  interface AzureConfig extends BaseConfig {
9
9
  /**
10
- * Azure AD access token (for OAuth2 authentication)
11
- */
10
+ * Azure AD access token (for OAuth2 authentication)
11
+ */
12
12
  accessToken?: string;
13
13
  /**
14
- * Azure Communication Services connection string or access token
15
- */
14
+ * Azure Communication Services connection string or access token
15
+ */
16
16
  connectionString?: string;
17
17
  /**
18
- * Azure Communication Services endpoint
19
- * Defaults to: https://{region}.communication.azure.com
20
- */
18
+ * Azure Communication Services endpoint
19
+ * Defaults to: https://{region}.communication.azure.com
20
+ */
21
21
  endpoint?: string;
22
22
  /**
23
- * Azure region (e.g., "eastus", "westus")
24
- */
23
+ * Azure region (e.g., "eastus", "westus")
24
+ */
25
25
  region: string;
26
26
  }
27
27
  /**
28
- * Azure-specific email options
29
- */
28
+ * Azure-specific email options
29
+ */
30
30
  interface AzureEmailOptions extends EmailOptions {
31
31
  /**
32
- * Custom headers
33
- */
32
+ * Custom headers
33
+ */
34
34
  headers?: Record<string, string>;
35
35
  /**
36
- * Importance level (normal, high)
37
- */
36
+ * Importance level (normal, high)
37
+ */
38
38
  importance?: "normal" | "high";
39
39
  /**
40
- * Azure template ID for template-based emails
41
- */
40
+ * Azure template ID for template-based emails
41
+ */
42
42
  templateId?: string;
43
43
  /**
44
- * Template variables for Azure templates
45
- */
44
+ * Template variables for Azure templates
45
+ */
46
46
  templateVariables?: Record<string, unknown>;
47
47
  }
48
48
  /**
49
- * Azure Communication Services Provider for sending emails through Azure API
50
- */
49
+ * Azure Communication Services Provider for sending emails through Azure API
50
+ */
51
51
  declare const azureProvider: ProviderFactory<AzureConfig, unknown, AzureEmailOptions>;
52
52
  export { type AzureConfig, type AzureEmailOptions, type ProviderFactory, azureProvider };
@@ -1 +1 @@
1
- import{default as a}from"../../packem_shared/azureProvider-Cw_Tmde6.js";export{a as azureProvider};
1
+ import{default as a}from"../../packem_shared/azureProvider-C-bNOOil.js";export{a as azureProvider};
@@ -1,65 +1,65 @@
1
- import { P as ProviderFactory } from "../../packem_shared/provider.d-J-y6iogK.js";
2
- export type { a as Provider } from "../../packem_shared/provider.d-J-y6iogK.js";
3
- import { B as BaseConfig, E as EmailOptions, c as EmailAddress } from "../../packem_shared/types.d-ejzh-xBP.js";
1
+ import { P as ProviderFactory } from "../../packem_shared/provider.d-Cx5YQJdP.js";
2
+ export type { a as Provider } from "../../packem_shared/provider.d-Cx5YQJdP.js";
3
+ import { B as BaseConfig, E as EmailOptions, c as EmailAddress } from "../../packem_shared/types.d-B9295M4_.js";
4
4
  import 'node:buffer';
5
5
  /**
6
- * Brevo configuration
7
- */
6
+ * Brevo configuration
7
+ */
8
8
  interface BrevoConfig extends BaseConfig {
9
9
  /**
10
- * Brevo API key
11
- */
10
+ * Brevo API key
11
+ */
12
12
  apiKey: string;
13
13
  /**
14
- * Brevo API endpoint
15
- * Defaults to: https://api.brevo.com/v3
16
- */
14
+ * Brevo API endpoint
15
+ * Defaults to: https://api.brevo.com/v3
16
+ */
17
17
  endpoint?: string;
18
18
  /**
19
- * Enable hard validation for replyTo addresses.
20
- * If true, arrays will be rejected. If false, the first address from an array will be used.
21
- * Defaults to: false
22
- */
19
+ * Enable hard validation for replyTo addresses.
20
+ * If true, arrays will be rejected. If false, the first address from an array will be used.
21
+ * Defaults to: false
22
+ */
23
23
  hardValidation?: boolean;
24
24
  }
25
25
  /**
26
- * Brevo-specific email options
27
- */
26
+ * Brevo-specific email options
27
+ */
28
28
  interface BrevoEmailOptions extends Omit<EmailOptions, "replyTo"> {
29
29
  /**
30
- * Batch ID for batch sending
31
- */
30
+ * Batch ID for batch sending
31
+ */
32
32
  batchId?: string;
33
33
  /**
34
- * Headers (custom headers)
35
- */
34
+ * Headers (custom headers)
35
+ */
36
36
  headers?: Record<string, string>;
37
37
  /**
38
- * Reply-to email address (can override base replyTo).
39
- * Only one address is allowed. If an array is provided and hardValidation is false, the first address will be used.
40
- */
38
+ * Reply-to email address (can override base replyTo).
39
+ * Only one address is allowed. If an array is provided and hardValidation is false, the first address will be used.
40
+ */
41
41
  replyTo?: EmailAddress | EmailAddress[];
42
42
  /**
43
- * Scheduled date/time
44
- * - If string: ISO 8601 format (e.g., "2025-01-15T10:00:00Z")
45
- * - If number: Unix timestamp in seconds (not milliseconds)
46
- */
43
+ * Scheduled date/time
44
+ * - If string: ISO 8601 format (e.g., "2025-01-15T10:00:00Z")
45
+ * - If number: Unix timestamp in seconds (not milliseconds)
46
+ */
47
47
  scheduledAt?: string | number;
48
48
  /**
49
- * Tags for categorization
50
- */
49
+ * Tags for categorization
50
+ */
51
51
  tags?: string[];
52
52
  /**
53
- * Brevo template ID for template-based emails
54
- */
53
+ * Brevo template ID for template-based emails
54
+ */
55
55
  templateId?: number;
56
56
  /**
57
- * Template parameters for Brevo templates
58
- */
57
+ * Template parameters for Brevo templates
58
+ */
59
59
  templateParams?: Record<string, unknown>;
60
60
  }
61
61
  /**
62
- * Brevo Provider for sending emails through Brevo API
63
- */
62
+ * Brevo Provider for sending emails through Brevo API
63
+ */
64
64
  declare const brevoProvider: ProviderFactory<BrevoConfig, unknown, BrevoEmailOptions>;
65
65
  export { type BrevoConfig, type BrevoEmailOptions, type ProviderFactory, brevoProvider };
@@ -1 +1 @@
1
- import{default as o}from"../../packem_shared/brevoProvider-CIzuIDlt.js";export{o as brevoProvider};
1
+ import{default as o}from"../../packem_shared/brevoProvider-CkOjDyir.js";export{o as brevoProvider};
@@ -1,36 +1,36 @@
1
- import { P as ProviderFactory } from "../../packem_shared/provider.d-J-y6iogK.js";
2
- export type { a as Provider } from "../../packem_shared/provider.d-J-y6iogK.js";
3
- import { B as BaseConfig, E as EmailOptions } from "../../packem_shared/types.d-ejzh-xBP.js";
1
+ import { P as ProviderFactory } from "../../packem_shared/provider.d-Cx5YQJdP.js";
2
+ export type { a as Provider } from "../../packem_shared/provider.d-Cx5YQJdP.js";
3
+ import { B as BaseConfig, E as EmailOptions } from "../../packem_shared/types.d-B9295M4_.js";
4
4
  import 'node:buffer';
5
5
  /**
6
- * Cloudflare Email Workers configuration.
7
- *
8
- * Cloudflare's send binding lives in the Workers runtime, so you wire it up yourself and pass a thin
9
- * `send` function — keeping this provider runtime-agnostic and testable.
10
- */
6
+ * Cloudflare Email Workers configuration.
7
+ *
8
+ * Cloudflare's send binding lives in the Workers runtime, so you wire it up yourself and pass a thin
9
+ * `send` function — keeping this provider runtime-agnostic and testable.
10
+ */
11
11
  interface CloudflareEmailConfig extends BaseConfig {
12
12
  /**
13
- * Sends a raw RFC 822 message via your Worker's Email binding.
14
- * @param from The envelope-from address.
15
- * @param to The single recipient address.
16
- * @param raw The full RFC 822 (EML) message.
17
- * @example
18
- * ```ts
19
- * send: async (from, to, raw) => {
20
- * const { EmailMessage } = await import("cloudflare:email");
21
- * await env.SEND_EMAIL.send(new EmailMessage(from, to, raw));
22
- * }
23
- * ```
24
- */
13
+ * Sends a raw RFC 822 message via your Worker's Email binding.
14
+ * @param from The envelope-from address.
15
+ * @param to The single recipient address.
16
+ * @param raw The full RFC 822 (EML) message.
17
+ * @example
18
+ * ```ts
19
+ * send: async (from, to, raw) => {
20
+ * const { EmailMessage } = await import("cloudflare:email");
21
+ * await env.SEND_EMAIL.send(new EmailMessage(from, to, raw));
22
+ * }
23
+ * ```
24
+ */
25
25
  send: (from: string, to: string, raw: string) => Promise<void>;
26
26
  }
27
27
  /**
28
- * Cloudflare Email-specific options.
29
- */
28
+ * Cloudflare Email-specific options.
29
+ */
30
30
  type CloudflareEmailOptions = EmailOptions;
31
31
  /**
32
- * Cloudflare Email Workers provider — sends a raw RFC 822 message through a Worker's Email send
33
- * binding (supplied via {@link CloudflareEmailConfig.send}). Single-recipient only, per the binding.
34
- */
32
+ * Cloudflare Email Workers provider — sends a raw RFC 822 message through a Worker's Email send
33
+ * binding (supplied via {@link CloudflareEmailConfig.send}). Single-recipient only, per the binding.
34
+ */
35
35
  declare const cloudflareEmailProvider: ProviderFactory<CloudflareEmailConfig>;
36
36
  export { type CloudflareEmailConfig, type CloudflareEmailOptions, type ProviderFactory, cloudflareEmailProvider };
@@ -1 +1 @@
1
- import{default as e}from"../../packem_shared/cloudflareEmailProvider-B8mOEl3N.js";export{e as cloudflareEmailProvider};
1
+ import{default as e}from"../../packem_shared/cloudflareEmailProvider-RCixPWnY.js";export{e as cloudflareEmailProvider};