@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
@@ -1,175 +1,175 @@
1
- import { M as MaybePromise } from "../packem_shared/types.d-ejzh-xBP.js";
1
+ import { M as MaybePromise } from "../packem_shared/types.d-B9295M4_.js";
2
2
  import 'node:buffer';
3
3
  /**
4
- * A parsed address from an inbound message.
5
- */
4
+ * A parsed address from an inbound message.
5
+ */
6
6
  interface InboundAddress {
7
7
  /**
8
- * The email address.
9
- */
8
+ * The email address.
9
+ */
10
10
  email: string;
11
11
  /**
12
- * The display name, when present.
13
- */
12
+ * The display name, when present.
13
+ */
14
14
  name?: string;
15
15
  }
16
16
  /**
17
- * An attachment on an inbound message.
18
- */
17
+ * An attachment on an inbound message.
18
+ */
19
19
  interface InboundAttachment {
20
20
  /**
21
- * The Content-ID, for inline attachments.
22
- */
21
+ * The Content-ID, for inline attachments.
22
+ */
23
23
  cid?: string;
24
24
  /**
25
- * Base64-encoded content, when the provider includes it inline.
26
- */
25
+ * Base64-encoded content, when the provider includes it inline.
26
+ */
27
27
  content?: string;
28
28
  /**
29
- * The MIME type.
30
- */
29
+ * The MIME type.
30
+ */
31
31
  contentType?: string;
32
32
  /**
33
- * The filename.
34
- */
33
+ * The filename.
34
+ */
35
35
  filename: string;
36
36
  /**
37
- * The size in bytes, when reported.
38
- */
37
+ * The size in bytes, when reported.
38
+ */
39
39
  size?: number;
40
40
  }
41
41
  /**
42
- * A normalized inbound email, produced from any provider's inbound webhook/event payload.
43
- *
44
- * This is the common shape every `parse*Inbound` adapter maps onto, so downstream code is
45
- * provider-agnostic.
46
- */
42
+ * A normalized inbound email, produced from any provider's inbound webhook/event payload.
43
+ *
44
+ * This is the common shape every `parse*Inbound` adapter maps onto, so downstream code is
45
+ * provider-agnostic.
46
+ */
47
47
  interface InboundEmail {
48
48
  /**
49
- * Attachments included on the message.
50
- */
49
+ * Attachments included on the message.
50
+ */
51
51
  attachments: InboundAttachment[];
52
52
  /**
53
- * Blind carbon-copy recipients.
54
- */
53
+ * Blind carbon-copy recipients.
54
+ */
55
55
  bcc: InboundAddress[];
56
56
  /**
57
- * Carbon-copy recipients.
58
- */
57
+ * Carbon-copy recipients.
58
+ */
59
59
  cc: InboundAddress[];
60
60
  /**
61
- * The sender.
62
- */
61
+ * The sender.
62
+ */
63
63
  from?: InboundAddress;
64
64
  /**
65
- * All headers, keyed by lower-cased name.
66
- */
65
+ * All headers, keyed by lower-cased name.
66
+ */
67
67
  headers: Record<string, string>;
68
68
  /**
69
- * The HTML body, when present.
70
- */
69
+ * The HTML body, when present.
70
+ */
71
71
  html?: string;
72
72
  /**
73
- * The `In-Reply-To` header value (a Message-ID), when present.
74
- */
73
+ * The `In-Reply-To` header value (a Message-ID), when present.
74
+ */
75
75
  inReplyTo?: string;
76
76
  /**
77
- * The canonical `Message-ID` of this message, when present.
78
- */
77
+ * The canonical `Message-ID` of this message, when present.
78
+ */
79
79
  messageId?: string;
80
80
  /**
81
- * The provider this message was parsed from.
82
- */
81
+ * The provider this message was parsed from.
82
+ */
83
83
  provider: string;
84
84
  /**
85
- * The raw payload the adapter received, for provider-specific fields.
86
- */
85
+ * The raw payload the adapter received, for provider-specific fields.
86
+ */
87
87
  raw?: unknown;
88
88
  /**
89
- * Message-IDs from the `References` header, oldest first.
90
- */
89
+ * Message-IDs from the `References` header, oldest first.
90
+ */
91
91
  references: string[];
92
92
  /**
93
- * The `Reply-To` address, when present.
94
- */
93
+ * The `Reply-To` address, when present.
94
+ */
95
95
  replyTo?: InboundAddress;
96
96
  /**
97
- * The subject line.
98
- */
97
+ * The subject line.
98
+ */
99
99
  subject?: string;
100
100
  /**
101
- * The plain-text body, when present.
102
- */
101
+ * The plain-text body, when present.
102
+ */
103
103
  text?: string;
104
104
  /**
105
- * Primary (`To`) recipients.
106
- */
105
+ * Primary (`To`) recipients.
106
+ */
107
107
  to: InboundAddress[];
108
108
  }
109
109
  /**
110
- * The inbound providers {@link parseInbound} can normalize.
111
- */
110
+ * The inbound providers {@link parseInbound} can normalize.
111
+ */
112
112
  type InboundProvider = "cloudflare" | "mailgun" | "postmark" | "sendgrid" | "ses";
113
113
  /**
114
- * Normalizes a provider-specific inbound webhook payload into the common {@link InboundEmail} shape.
115
- * @param provider The provider the payload came from.
116
- * @param payload The raw (already JSON/form-decoded) payload.
117
- * @returns The normalized inbound email.
118
- */
114
+ * Normalizes a provider-specific inbound webhook payload into the common {@link InboundEmail} shape.
115
+ * @param provider The provider the payload came from.
116
+ * @param payload The raw (already JSON/form-decoded) payload.
117
+ * @returns The normalized inbound email.
118
+ */
119
119
  declare const parseInbound: (provider: InboundProvider, payload: unknown) => InboundEmail;
120
120
  /**
121
- * Options for {@link defineInboundHandler}.
122
- */
121
+ * Options for {@link defineInboundHandler}.
122
+ */
123
123
  interface InboundHandlerOptions {
124
124
  /**
125
- * Invoked when a payload fails to parse or `onMessage` throws. When omitted, the error propagates.
126
- * @param error The thrown error.
127
- * @param provider The provider being handled.
128
- * @param payload The offending payload.
129
- */
125
+ * Invoked when a payload fails to parse or `onMessage` throws. When omitted, the error propagates.
126
+ * @param error The thrown error.
127
+ * @param provider The provider being handled.
128
+ * @param payload The offending payload.
129
+ */
130
130
  onError?: (error: unknown, provider: InboundProvider, payload: unknown) => MaybePromise<void>;
131
131
  /**
132
- * Invoked with each normalized inbound message.
133
- * @param email The normalized inbound email.
134
- */
132
+ * Invoked with each normalized inbound message.
133
+ * @param email The normalized inbound email.
134
+ */
135
135
  onMessage: (email: InboundEmail) => MaybePromise<void>;
136
136
  /**
137
- * Strip quoted history from the plain-text body (via {@link extractReply}) before `onMessage`.
138
- * @default false
139
- */
137
+ * Strip quoted history from the plain-text body (via {@link extractReply}) before `onMessage`.
138
+ * @default false
139
+ */
140
140
  stripReply?: boolean;
141
141
  }
142
142
  /**
143
- * A unified inbound handler created by {@link defineInboundHandler}.
144
- */
143
+ * A unified inbound handler created by {@link defineInboundHandler}.
144
+ */
145
145
  interface InboundHandler {
146
146
  /**
147
- * Parses a provider payload, optionally strips quoted history, and dispatches it to `onMessage`.
148
- * @param provider The provider the payload came from.
149
- * @param payload The raw payload.
150
- * @returns The normalized email, or `undefined` when an error was handled by `onError`.
151
- */
147
+ * Parses a provider payload, optionally strips quoted history, and dispatches it to `onMessage`.
148
+ * @param provider The provider the payload came from.
149
+ * @param payload The raw payload.
150
+ * @returns The normalized email, or `undefined` when an error was handled by `onError`.
151
+ */
152
152
  handle: (provider: InboundProvider, payload: unknown) => Promise<InboundEmail | undefined>;
153
153
  }
154
154
  /**
155
- * Creates a single inbound entry point over the five provider parsers — parse, optionally strip the
156
- * reply quote, then dispatch to your `onMessage` callback.
157
- * @param options Handler options. See {@link InboundHandlerOptions}.
158
- * @returns The handler. See {@link InboundHandler}.
159
- * @example
160
- * ```ts
161
- * const handler = defineInboundHandler({ stripReply: true, onMessage: (email) => saveReply(email) });
162
- *
163
- * app.post("/inbound/postmark", async (req) => { await handler.handle("postmark", req.body); });
164
- * ```
165
- */
155
+ * Creates a single inbound entry point over the five provider parsers — parse, optionally strip the
156
+ * reply quote, then dispatch to your `onMessage` callback.
157
+ * @param options Handler options. See {@link InboundHandlerOptions}.
158
+ * @returns The handler. See {@link InboundHandler}.
159
+ * @example
160
+ * ```ts
161
+ * const handler = defineInboundHandler({ stripReply: true, onMessage: (email) => saveReply(email) });
162
+ *
163
+ * app.post("/inbound/postmark", async (req) => { await handler.handle("postmark", req.body); });
164
+ * ```
165
+ */
166
166
  declare const defineInboundHandler: (options: InboundHandlerOptions) => InboundHandler;
167
167
  /**
168
- * The shape of a Cloudflare Email Workers message, narrowed to what the parser reads.
169
- *
170
- * Cloudflare delivers a `ForwardableEmailMessage` with `from`, `to`, and a `Headers` object; the body
171
- * arrives as a raw stream you must parse yourself, so pass the decoded `text`/`html` alongside it.
172
- */
168
+ * The shape of a Cloudflare Email Workers message, narrowed to what the parser reads.
169
+ *
170
+ * Cloudflare delivers a `ForwardableEmailMessage` with `from`, `to`, and a `Headers` object; the body
171
+ * arrives as a raw stream you must parse yourself, so pass the decoded `text`/`html` alongside it.
172
+ */
173
173
  interface CloudflareEmailLike {
174
174
  from?: string;
175
175
  headers?: Headers | Record<string, string>;
@@ -178,14 +178,14 @@ interface CloudflareEmailLike {
178
178
  to?: string;
179
179
  }
180
180
  /**
181
- * Parses a [Cloudflare Email Workers](https://developers.cloudflare.com/email-routing/email-workers/)
182
- * message into the normalized {@link InboundEmail} shape.
183
- *
184
- * Because Cloudflare exposes the body only as a raw stream, decode it first and pass the result via
185
- * `text`/`html`.
186
- * @param message The Cloudflare email message (plus optionally the decoded body).
187
- * @returns The normalized inbound email.
188
- */
181
+ * Parses a [Cloudflare Email Workers](https://developers.cloudflare.com/email-routing/email-workers/)
182
+ * message into the normalized {@link InboundEmail} shape.
183
+ *
184
+ * Because Cloudflare exposes the body only as a raw stream, decode it first and pass the result via
185
+ * `text`/`html`.
186
+ * @param message The Cloudflare email message (plus optionally the decoded body).
187
+ * @returns The normalized inbound email.
188
+ */
189
189
  declare const parseCloudflareInbound: (message: CloudflareEmailLike) => InboundEmail;
190
190
  interface MailgunInboundPayload {
191
191
  [key: string]: unknown;
@@ -203,11 +203,11 @@ interface MailgunInboundPayload {
203
203
  To?: string;
204
204
  }
205
205
  /**
206
- * Parses a [Mailgun inbound](https://documentation.mailgun.com/docs/mailgun/user-manual/receive-forward-store/)
207
- * route payload into the normalized {@link InboundEmail} shape.
208
- * @param payload The parsed form fields of the Mailgun inbound request.
209
- * @returns The normalized inbound email.
210
- */
206
+ * Parses a [Mailgun inbound](https://documentation.mailgun.com/docs/mailgun/user-manual/receive-forward-store/)
207
+ * route payload into the normalized {@link InboundEmail} shape.
208
+ * @param payload The parsed form fields of the Mailgun inbound request.
209
+ * @returns The normalized inbound email.
210
+ */
211
211
  declare const parseMailgunInbound: (payload: MailgunInboundPayload) => InboundEmail;
212
212
  interface PostmarkFullAddress {
213
213
  Email?: string;
@@ -237,11 +237,11 @@ interface PostmarkInboundPayload {
237
237
  ToFull?: PostmarkFullAddress[];
238
238
  }
239
239
  /**
240
- * Parses a [Postmark inbound](https://postmarkapp.com/developer/webhooks/inbound-webhook) webhook
241
- * payload into the normalized {@link InboundEmail} shape.
242
- * @param payload The parsed JSON body of the Postmark inbound webhook.
243
- * @returns The normalized inbound email.
244
- */
240
+ * Parses a [Postmark inbound](https://postmarkapp.com/developer/webhooks/inbound-webhook) webhook
241
+ * payload into the normalized {@link InboundEmail} shape.
242
+ * @param payload The parsed JSON body of the Postmark inbound webhook.
243
+ * @returns The normalized inbound email.
244
+ */
245
245
  declare const parsePostmarkInbound: (payload: PostmarkInboundPayload) => InboundEmail;
246
246
  interface SendGridInboundPayload {
247
247
  [key: string]: unknown;
@@ -254,12 +254,12 @@ interface SendGridInboundPayload {
254
254
  to?: string;
255
255
  }
256
256
  /**
257
- * Parses a [SendGrid Inbound Parse](https://www.twilio.com/docs/sendgrid/for-developers/parsing-email/setting-up-the-inbound-parse-webhook)
258
- * payload (the multipart fields, already decoded into an object) into the normalized
259
- * {@link InboundEmail} shape.
260
- * @param payload The decoded Inbound Parse fields.
261
- * @returns The normalized inbound email.
262
- */
257
+ * Parses a [SendGrid Inbound Parse](https://www.twilio.com/docs/sendgrid/for-developers/parsing-email/setting-up-the-inbound-parse-webhook)
258
+ * payload (the multipart fields, already decoded into an object) into the normalized
259
+ * {@link InboundEmail} shape.
260
+ * @param payload The decoded Inbound Parse fields.
261
+ * @returns The normalized inbound email.
262
+ */
263
263
  declare const parseSendGridInbound: (payload: SendGridInboundPayload) => InboundEmail;
264
264
  interface SesCommonHeaders {
265
265
  cc?: string[];
@@ -286,90 +286,90 @@ interface SesInboundPayload {
286
286
  text?: string;
287
287
  }
288
288
  /**
289
- * Parses an [Amazon SES inbound](https://docs.aws.amazon.com/ses/latest/dg/receiving-email-action-lambda.html)
290
- * notification (the `mail` object, typically delivered via SNS/Lambda) into the normalized
291
- * {@link InboundEmail} shape.
292
- *
293
- * SES does not include the decoded body in the notification — fetch it from S3 (or pass it directly)
294
- * and supply it via `text`/`html`.
295
- * @param payload The SES notification, with optional decoded body.
296
- * @returns The normalized inbound email.
297
- */
289
+ * Parses an [Amazon SES inbound](https://docs.aws.amazon.com/ses/latest/dg/receiving-email-action-lambda.html)
290
+ * notification (the `mail` object, typically delivered via SNS/Lambda) into the normalized
291
+ * {@link InboundEmail} shape.
292
+ *
293
+ * SES does not include the decoded body in the notification — fetch it from S3 (or pass it directly)
294
+ * and supply it via `text`/`html`.
295
+ * @param payload The SES notification, with optional decoded body.
296
+ * @returns The normalized inbound email.
297
+ */
298
298
  declare const parseSesInbound: (payload: SesInboundPayload) => InboundEmail;
299
299
  /**
300
- * Options for {@link extractReply}.
301
- */
300
+ * Options for {@link extractReply}.
301
+ */
302
302
  interface ExtractReplyOptions {
303
303
  /**
304
- * Also strip a trailing signature block (everything after a `-- ` delimiter line).
305
- * @default true
306
- */
304
+ * Also strip a trailing signature block (everything after a `-- ` delimiter line).
305
+ * @default true
306
+ */
307
307
  stripSignature?: boolean;
308
308
  }
309
309
  /**
310
- * Extracts the new reply text from a plain-text email body, stripping quoted history and (optionally)
311
- * the trailing signature.
312
- *
313
- * Uses the same heuristics email clients use: quote markers (`>`), localized attribution lines
314
- * (EN/DE/FR/ES/TR), Outlook/`Original Message` separators, and the RFC 3676 `-- ` signature delimiter.
315
- * @param text The plain-text body.
316
- * @param options Extraction options. See {@link ExtractReplyOptions}.
317
- * @returns The trimmed reply text with quoted history removed.
318
- */
310
+ * Extracts the new reply text from a plain-text email body, stripping quoted history and (optionally)
311
+ * the trailing signature.
312
+ *
313
+ * Uses the same heuristics email clients use: quote markers (`>`), localized attribution lines
314
+ * (EN/DE/FR/ES/TR), Outlook/`Original Message` separators, and the RFC 3676 `-- ` signature delimiter.
315
+ * @param text The plain-text body.
316
+ * @param options Extraction options. See {@link ExtractReplyOptions}.
317
+ * @returns The trimmed reply text with quoted history removed.
318
+ */
319
319
  declare const extractReply: (text: string, options?: ExtractReplyOptions) => string;
320
320
  /**
321
- * A group of inbound messages belonging to the same conversation.
322
- */
321
+ * A group of inbound messages belonging to the same conversation.
322
+ */
323
323
  interface EmailThread {
324
324
  /**
325
- * A stable identifier for the thread: the union-find root, which is a normalized root Message-ID
326
- * or a synthetic `__index_&lt;n>` key when a message has no Message-ID.
327
- */
325
+ * A stable identifier for the thread: the union-find root, which is a normalized root Message-ID
326
+ * or a synthetic `__index_&lt;n>` key when a message has no Message-ID.
327
+ */
328
328
  id: string;
329
329
  /**
330
- * The messages in the thread. Order reflects input order (callers can sort by date if needed).
331
- */
330
+ * The messages in the thread. Order reflects input order (callers can sort by date if needed).
331
+ */
332
332
  messages: InboundEmail[];
333
333
  }
334
334
  /**
335
- * Strips angle brackets and surrounding whitespace from a Message-ID for consistent matching.
336
- * @param id A raw Message-ID, optionally wrapped in angle brackets.
337
- * @returns The bare Message-ID.
338
- */
335
+ * Strips angle brackets and surrounding whitespace from a Message-ID for consistent matching.
336
+ * @param id A raw Message-ID, optionally wrapped in angle brackets.
337
+ * @returns The bare Message-ID.
338
+ */
339
339
  declare const normalizeMessageId: (id: string) => string;
340
340
  /**
341
- * Normalizes a subject for fallback threading: strips leading `Re:`/`Fwd:`/`Aw:`/`Wg:` prefixes and
342
- * collapses whitespace. Uses a linear loop rather than a backtracking regex.
343
- * @param subject The raw subject.
344
- * @returns The normalized subject key.
345
- */
341
+ * Normalizes a subject for fallback threading: strips leading `Re:`/`Fwd:`/`Aw:`/`Wg:` prefixes and
342
+ * collapses whitespace. Uses a linear loop rather than a backtracking regex.
343
+ * @param subject The raw subject.
344
+ * @returns The normalized subject key.
345
+ */
346
346
  declare const normalizeSubject: (subject: string) => string;
347
347
  /**
348
- * Groups inbound messages into conversation threads.
349
- *
350
- * Messages are linked via their `In-Reply-To` and `References` Message-IDs (RFC 5322 threading).
351
- * Messages that share no references but have an identical normalized subject are stitched together as
352
- * a fallback, matching how mail clients group conversations.
353
- * @param messages The inbound messages to thread.
354
- * @returns The detected threads. See {@link EmailThread}.
355
- */
348
+ * Groups inbound messages into conversation threads.
349
+ *
350
+ * Messages are linked via their `In-Reply-To` and `References` Message-IDs (RFC 5322 threading).
351
+ * Messages that share no references but have an identical normalized subject are stitched together as
352
+ * a fallback, matching how mail clients group conversations.
353
+ * @param messages The inbound messages to thread.
354
+ * @returns The detected threads. See {@link EmailThread}.
355
+ */
356
356
  declare const stitchThreads: (messages: InboundEmail[]) => EmailThread[];
357
357
  /**
358
- * Parses a single RFC 5322 address such as `John Doe &lt;john@example.com>` or `john@example.com`.
359
- * @param value The address string.
360
- * @returns The parsed address, or `undefined` when empty.
361
- */
358
+ * Parses a single RFC 5322 address such as `John Doe &lt;john@example.com>` or `john@example.com`.
359
+ * @param value The address string.
360
+ * @returns The parsed address, or `undefined` when empty.
361
+ */
362
362
  declare const parseAddress: (value: string | undefined | null) => InboundAddress | undefined;
363
363
  /**
364
- * Splits and parses a comma-separated address list, respecting commas inside quoted display names.
365
- * @param value The address-list string.
366
- * @returns The parsed addresses (empty when none).
367
- */
364
+ * Splits and parses a comma-separated address list, respecting commas inside quoted display names.
365
+ * @param value The address-list string.
366
+ * @returns The parsed addresses (empty when none).
367
+ */
368
368
  declare const parseAddressList: (value: string | undefined | null) => InboundAddress[];
369
369
  /**
370
- * Splits a `References` header value into individual Message-IDs.
371
- * @param value The raw `References` header.
372
- * @returns The Message-IDs in document order (oldest first).
373
- */
370
+ * Splits a `References` header value into individual Message-IDs.
371
+ * @param value The raw `References` header.
372
+ * @returns The Message-IDs in document order (oldest first).
373
+ */
374
374
  declare const parseReferences: (value: string | undefined | null) => string[];
375
375
  export { type CloudflareEmailLike, type EmailThread, type ExtractReplyOptions, type InboundAddress, type InboundAttachment, type InboundEmail, type InboundHandler, type InboundHandlerOptions, type InboundProvider, defineInboundHandler, extractReply, normalizeMessageId, normalizeSubject, parseAddress, parseAddressList, parseCloudflareInbound, parseInbound, parseMailgunInbound, parsePostmarkInbound, parseReferences, parseSendGridInbound, parseSesInbound, stitchThreads };
package/dist/index.d.ts CHANGED
@@ -1,15 +1,15 @@
1
- export { type A as AttachmentDataOptions, type a as AttachmentOptions, type B as BatchBase, type b as BatchRenderer, D as DraftMailMessage, type F as FeatureCheckMode, M as Mail, type c as MailGlobalConfig, d as MailMessage, type e as MailOptions, type P as Personalization, type S as SendBatchOptions, type f as SendableMessage, g as createMail, h as detectMimeType, i as generateContentId, r as readFileAsBuffer } from "./packem_shared/mail.d-B9SSqyy0.js";
2
- export type { M as Middleware, S as SendFunction } from "./packem_shared/types.d-Mpu0HZoG.js";
3
- export { type a as Provider, type P as ProviderFactory, d as defineProvider } from "./packem_shared/provider.d-J-y6iogK.js";
4
- export type { T as TemplateRenderer } from "./packem_shared/types.d-nyR1ty1Q.js";
5
- export type { A as Attachment, B as BaseConfig, C as CalendarEventOptions, c as EmailAddress, e as EmailHeaders, E as EmailOptions, a as EmailResult, d as EmailTag, F as FeatureFlags, I as ImmutableHeaders, M as MaybePromise, P as Priority, b as Receipt, R as Result } from "./packem_shared/types.d-ejzh-xBP.js";
1
+ export { type A as AttachmentDataOptions, type a as AttachmentOptions, type B as BatchBase, type b as BatchRenderer, D as DraftMailMessage, type F as FeatureCheckMode, M as Mail, type c as MailGlobalConfig, d as MailMessage, type e as MailOptions, type P as Personalization, type S as SendBatchOptions, type f as SendableMessage, g as createMail, h as detectMimeType, i as generateContentId, r as readFileAsBuffer } from "./packem_shared/mail.d-B9JyPxzq.js";
2
+ export type { M as Middleware, S as SendFunction } from "./packem_shared/types.d-GKqPNk0I.js";
3
+ export { type a as Provider, type P as ProviderFactory, d as defineProvider } from "./packem_shared/provider.d-Cx5YQJdP.js";
4
+ export type { T as TemplateRenderer } from "./packem_shared/types.d-I-KeZ5w2.js";
5
+ export type { A as Attachment, B as BaseConfig, C as CalendarEventOptions, c as EmailAddress, e as EmailHeaders, E as EmailOptions, a as EmailResult, d as EmailTag, F as FeatureFlags, I as ImmutableHeaders, M as MaybePromise, P as Priority, b as Receipt, R as Result } from "./packem_shared/types.d-B9295M4_.js";
6
6
  export { default as parseEml } from "./utils/parse-eml.js";
7
7
  export { type OkResult, isErr, isOk, mapOk, tryAsync, unwrap, unwrapOr } from "./utils/result.js";
8
8
  export { type FeatureSupportResult, type FeatureViolation, default as checkFeatureSupport } from "./utils/validation/check-feature-support.js";
9
9
  import 'ical-generator';
10
10
  import 'node:buffer';
11
11
  import 'node:crypto';
12
- import "./packem_shared/types.d-BId55FW2.js";
12
+ import "./packem_shared/types.d-B0t3PQ3t.js";
13
13
  interface ErrorProperties {
14
14
  cause?: unknown;
15
15
  hint?: ErrorHint;
@@ -25,55 +25,44 @@ interface ErrorLocation {
25
25
  line?: number;
26
26
  }
27
27
  /**
28
- * A message that explains to the user how they can fix the error.
29
- * @example
30
- * ```ts
31
- * const error = new VisulimaError({
32
- * hint: "Try running `npm install` to install missing dependencies.",
33
- * location: {
34
- * file: "src/index.ts",
35
- * line: 1,
36
- * column: 1,
37
- * },
38
- * message: "Cannot find module 'react'",
39
- * name: "ModuleNotFoundError",
40
- * });
41
- * ```
42
- *
43
- * For more complex hints, you can pass an array of strings or a single string in markdown format.
44
- */
28
+ * A message that explains to the user how they can fix the error.
29
+ * @example
30
+ * ```ts
31
+ * const error = new VisulimaError({
32
+ * hint: "Try running `npm install` to install missing dependencies.",
33
+ * location: {
34
+ * file: "src/index.ts",
35
+ * line: 1,
36
+ * column: 1,
37
+ * },
38
+ * message: "Cannot find module 'react'",
39
+ * name: "ModuleNotFoundError",
40
+ * });
41
+ * ```
42
+ *
43
+ * For more complex hints, you can pass an array of strings or a single string in markdown format.
44
+ */
45
45
  type ErrorHint = string[] | string;
46
46
  declare class VisulimaError extends Error {
47
47
  loc: ErrorLocation | undefined;
48
48
  title: string | undefined;
49
49
  /**
50
- * A message that explains to the user how they can fix the error.
51
- */
50
+ * A message that explains to the user how they can fix the error.
51
+ */
52
52
  hint: ErrorHint | undefined;
53
53
  type: string;
54
- constructor({
55
- cause,
56
- hint,
57
- location,
58
- message,
59
- name,
60
- stack,
61
- title
62
- }: ErrorProperties);
54
+ constructor({ cause, hint, location, message, name, stack, title }: ErrorProperties);
63
55
  setLocation(location: ErrorLocation): void;
64
56
  setName(name: string): void;
65
57
  setMessage(message: string): void;
66
58
  setHint(hint: ErrorHint): void;
67
59
  }
68
60
  /**
69
- * Will return an array of all causes in the error in the order they occurred.
70
- */
71
- /**
72
- * Base error class for email package operations.
73
- * @param component The component name where the error occurred.
74
- * @param message The error message describing what went wrong.
75
- * @param options Optional error options including cause, code, and hint.
76
- */
61
+ * Base error class for email package operations.
62
+ * @param component The component name where the error occurred.
63
+ * @param message The error message describing what went wrong.
64
+ * @param options Optional error options including cause, code, and hint.
65
+ */
77
66
  declare class EmailError extends VisulimaError {
78
67
  readonly component: string;
79
68
  readonly code?: string;
@@ -84,10 +73,10 @@ declare class EmailError extends VisulimaError {
84
73
  });
85
74
  }
86
75
  /**
87
- * Error for missing required options
88
- * @param component The component name where the error occurred
89
- * @param name The name(s) of the missing required option(s)
90
- */
76
+ * Error for missing required options
77
+ * @param component The component name where the error occurred
78
+ * @param name The name(s) of the missing required option(s)
79
+ */
91
80
  declare class RequiredOptionError extends EmailError {
92
81
  constructor(component: string, name: string | string[]);
93
82
  }
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{detectMimeType as a,generateContentId as t,readFileAsBuffer as o}from"./packem_shared/detectMimeType-DFH3kp6K.js";import{default as p}from"./packem_shared/DraftMailMessage-CGTVuy2z.js";import{default as m}from"./packem_shared/EmailError-B-sEf3bp.js";import{default as l}from"./packem_shared/RequiredOptionError-DuNNY_a5.js";import{Mail as u,createMail as x}from"./packem_shared/Mail-CYAwMRnX.js";import{default as M}from"./packem_shared/MailMessage-DQRgs5Dz.js";import{defineProvider as E}from"./packem_shared/defineProvider-C9q-7iwt.js";import{default as g}from"./utils/parse-eml.js";import{isErr as y,isOk as w,mapOk as A,tryAsync as F,unwrap as h,unwrapOr as q}from"./utils/result.js";import{default as B}from"./utils/validation/check-feature-support.js";export{p as DraftMailMessage,m as EmailError,u as Mail,M as MailMessage,l as RequiredOptionError,B as checkFeatureSupport,x as createMail,E as defineProvider,a as detectMimeType,t as generateContentId,y as isErr,w as isOk,A as mapOk,g as parseEml,o as readFileAsBuffer,F as tryAsync,h as unwrap,q as unwrapOr};
1
+ import{detectMimeType as a,generateContentId as t,readFileAsBuffer as o}from"./packem_shared/detectMimeType-B9_7ujpC.js";import{default as p}from"./packem_shared/DraftMailMessage-BgP1OF1G.js";import{default as m}from"./packem_shared/EmailError-2CCyVX1S.js";import{default as l}from"./packem_shared/RequiredOptionError-BmpC5whN.js";import{Mail as u,createMail as x}from"./packem_shared/Mail-DduRntbB.js";import{default as M}from"./packem_shared/MailMessage-BRBT4Jea.js";import{defineProvider as E}from"./packem_shared/defineProvider-C9q-7iwt.js";import{default as g}from"./utils/parse-eml.js";import{isErr as y,isOk as w,mapOk as A,tryAsync as F,unwrap as h,unwrapOr as q}from"./utils/result.js";import{default as B}from"./utils/validation/check-feature-support.js";export{p as DraftMailMessage,m as EmailError,u as Mail,M as MailMessage,l as RequiredOptionError,B as checkFeatureSupport,x as createMail,E as defineProvider,a as detectMimeType,t as generateContentId,y as isErr,w as isOk,A as mapOk,g as parseEml,o as readFileAsBuffer,F as tryAsync,h as unwrap,q as unwrapOr};