@visulima/email 1.0.0-alpha.2 → 1.0.0-alpha.21

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 (231) hide show
  1. package/CHANGELOG.md +246 -0
  2. package/LICENSE.md +536 -899
  3. package/README.md +36 -21
  4. package/dist/crypto/index.d.ts +147 -4
  5. package/dist/crypto/index.js +1 -1
  6. package/dist/index.d.ts +785 -9
  7. package/dist/index.js +1 -1
  8. package/dist/packem_shared/{DkimSigner-pFd4c3fZ.js → DkimSigner-CT2DSHD1.js} +4 -4
  9. package/dist/packem_shared/Mail-D93oo_9g.js +1 -0
  10. package/dist/packem_shared/MailMessage-BvaH5tZZ.js +1 -0
  11. package/dist/packem_shared/{SmimeEncrypter-CBevU534.js → SmimeEncrypter-ZhHEgDwY.js} +2 -2
  12. package/dist/packem_shared/{SmimeSigner-CObA4jzT.js → SmimeSigner-CYSVF6ez.js} +1 -1
  13. package/dist/packem_shared/{ahaSendProvider-DlFKEQ6D.js → ahaSendProvider-DOAAW65O.js} +1 -1
  14. package/dist/packem_shared/{attachment-processor-2rHmfa7j.js → attachment-processor-DsmIomKc.js} +1 -1
  15. package/dist/packem_shared/{awsSesProvider-Ba-eVJxZ.js → awsSesProvider-DX1630Ms.js} +7 -7
  16. package/dist/packem_shared/azureProvider-EkNYKAiF.js +1 -0
  17. package/dist/packem_shared/{brevoProvider-5p6jjiK9.js → brevoProvider-CkR4U4RD.js} +1 -1
  18. package/dist/packem_shared/build-mime-message-6xstxaUV.js +2 -0
  19. package/dist/packem_shared/defineProvider-CtLH0VBE.js +1 -0
  20. package/dist/packem_shared/detectMimeType-bo5oxfnt.js +1 -0
  21. package/dist/packem_shared/failoverProvider-W5ctAhdC.js +1 -0
  22. package/dist/packem_shared/httpProvider-DUg1AQfO.js +1 -0
  23. package/dist/packem_shared/{infobipProvider-CtLwrUaP.js → infobipProvider-BhTsWi7e.js} +1 -1
  24. package/dist/packem_shared/{mailCrabProvider-CM_CFDca.js → mailCrabProvider-B7H6HwWu.js} +1 -1
  25. package/dist/packem_shared/mailPaceProvider-DRt6Z9Hr.js +1 -0
  26. package/dist/packem_shared/{mailerSendProvider-CeeIXFnW.js → mailerSendProvider-Dx_iHInH.js} +1 -1
  27. package/dist/packem_shared/mailgunProvider-ChkLGZZW.js +1 -0
  28. package/dist/packem_shared/mailjetProvider-BMRhNe6H.js +1 -0
  29. package/dist/packem_shared/{mailomatProvider-DMQmjKHT.js → mailomatProvider-CydV-JB6.js} +1 -1
  30. package/dist/packem_shared/{mailtrapProvider-BN3UBEQw.js → mailtrapProvider-CuAfJWDr.js} +1 -1
  31. package/dist/packem_shared/{make-request-BDzF9W9D.js → make-request-CaT4d5oC.js} +1 -1
  32. package/dist/packem_shared/{mandrillProvider-370y7CLu.js → mandrillProvider-BBeLbaw0.js} +1 -1
  33. package/dist/packem_shared/mockProvider-C0P1lKOy.js +1 -0
  34. package/dist/packem_shared/{nodemailerProvider-_w8QXMU-.js → nodemailerProvider-DFcvoVFv.js} +1 -1
  35. package/dist/packem_shared/{opentelemetryProvider-C_ZXOLSd.js → opentelemetryProvider-Dwv88G3O.js} +1 -1
  36. package/dist/packem_shared/{plunkProvider-DfJumQ4U.js → plunkProvider-BQyjG6YT.js} +1 -1
  37. package/dist/packem_shared/{postalProvider-Bavx2FcH.js → postalProvider-DPHQ620q.js} +1 -1
  38. package/dist/packem_shared/{postmarkProvider-DFC0uvjO.js → postmarkProvider-bMTC2gdJ.js} +1 -1
  39. package/dist/packem_shared/provider.d-DcfYeGJJ.d.ts +28 -0
  40. package/dist/packem_shared/readFile-BAVMZg5e-C4whBIPd.js +1 -0
  41. package/dist/packem_shared/resendProvider-Cns1tvF5.js +1 -0
  42. package/dist/packem_shared/roundRobinProvider-FvZQKl6n.js +1 -0
  43. package/dist/packem_shared/{scalewayProvider-be1HPimL.js → scalewayProvider-O1dHz7iJ.js} +1 -1
  44. package/dist/packem_shared/{sendGridProvider-BVI1sq3n.js → sendGridProvider-DmywC-eT.js} +1 -1
  45. package/dist/packem_shared/{smtpProvider-BV-ufR53.js → smtpProvider-Unjao_fn.js} +8 -8
  46. package/dist/packem_shared/sweegoProvider-D086G6xG.js +1 -0
  47. package/dist/packem_shared/types.d-CNnnk-Ya.d.ts +102 -0
  48. package/dist/packem_shared/types.d-nyR1ty1Q.d.ts +9 -0
  49. package/dist/packem_shared/types.d-wwpgA3to.d.ts +204 -0
  50. package/dist/packem_shared/validate-email-options-DPo3SgC0.js +1 -0
  51. package/dist/packem_shared/zeptomailProvider-DKKEpEsW.js +1 -0
  52. package/dist/providers/ahasend/index.d.ts +36 -3
  53. package/dist/providers/ahasend/index.js +1 -1
  54. package/dist/providers/aws-ses/index.d.ts +47 -3
  55. package/dist/providers/aws-ses/index.js +1 -1
  56. package/dist/providers/azure/index.d.ts +52 -3
  57. package/dist/providers/azure/index.js +1 -1
  58. package/dist/providers/brevo/index.d.ts +65 -3
  59. package/dist/providers/brevo/index.js +1 -1
  60. package/dist/providers/failover/index.d.ts +27 -3
  61. package/dist/providers/failover/index.js +1 -1
  62. package/dist/providers/http/index.d.ts +35 -3
  63. package/dist/providers/http/index.js +1 -1
  64. package/dist/providers/infobip/index.d.ts +56 -3
  65. package/dist/providers/infobip/index.js +1 -1
  66. package/dist/providers/mailcrab/index.d.ts +32 -3
  67. package/dist/providers/mailcrab/index.js +1 -1
  68. package/dist/providers/mailersend/index.d.ts +51 -3
  69. package/dist/providers/mailersend/index.js +1 -1
  70. package/dist/providers/mailgun/index.d.ts +73 -3
  71. package/dist/providers/mailgun/index.js +1 -1
  72. package/dist/providers/mailjet/index.d.ts +72 -3
  73. package/dist/providers/mailjet/index.js +1 -1
  74. package/dist/providers/mailomat/index.d.ts +40 -3
  75. package/dist/providers/mailomat/index.js +1 -1
  76. package/dist/providers/mailpace/index.d.ts +52 -3
  77. package/dist/providers/mailpace/index.js +1 -1
  78. package/dist/providers/mailtrap/index.d.ts +44 -3
  79. package/dist/providers/mailtrap/index.js +1 -1
  80. package/dist/providers/mandrill/index.d.ts +87 -3
  81. package/dist/providers/mandrill/index.js +1 -1
  82. package/dist/providers/mock/index.d.ts +59 -3
  83. package/dist/providers/mock/index.js +1 -1
  84. package/dist/providers/nodemailer/index.d.ts +38 -3
  85. package/dist/providers/nodemailer/index.js +1 -1
  86. package/dist/providers/opentelemetry/index.d.ts +529 -3
  87. package/dist/providers/opentelemetry/index.js +1 -1
  88. package/dist/providers/plunk/index.d.ts +38 -3
  89. package/dist/providers/plunk/index.js +1 -1
  90. package/dist/providers/postal/index.d.ts +48 -3
  91. package/dist/providers/postal/index.js +1 -1
  92. package/dist/providers/postmark/index.d.ts +60 -3
  93. package/dist/providers/postmark/index.js +1 -1
  94. package/dist/providers/resend/index.d.ts +51 -3
  95. package/dist/providers/resend/index.js +1 -1
  96. package/dist/providers/roundrobin/index.d.ts +27 -3
  97. package/dist/providers/roundrobin/index.js +1 -1
  98. package/dist/providers/scaleway/index.d.ts +44 -3
  99. package/dist/providers/scaleway/index.js +1 -1
  100. package/dist/providers/sendgrid/index.d.ts +84 -3
  101. package/dist/providers/sendgrid/index.js +1 -1
  102. package/dist/providers/smtp/index.d.ts +71 -3
  103. package/dist/providers/smtp/index.js +1 -1
  104. package/dist/providers/sweego/index.d.ts +40 -3
  105. package/dist/providers/sweego/index.js +1 -1
  106. package/dist/providers/zeptomail/index.d.ts +37 -3
  107. package/dist/providers/zeptomail/index.js +1 -1
  108. package/dist/template-engines/handlebars.d.ts +23 -22
  109. package/dist/template-engines/handlebars.js +1 -1
  110. package/dist/template-engines/html-to-text.d.ts +24 -24
  111. package/dist/template-engines/mjml.d.ts +10 -10
  112. package/dist/template-engines/react-email.d.ts +9 -9
  113. package/dist/template-engines/vue-email.d.ts +9 -9
  114. package/dist/utils/cache.d.ts +49 -48
  115. package/dist/utils/format-email-address.d.ts +8 -7
  116. package/dist/utils/normalize-email-aliases.d.ts +20 -20
  117. package/dist/utils/parse-address.d.ts +18 -17
  118. package/dist/utils/parse-address.js +1 -1
  119. package/dist/utils/validation/check-mx-records.d.ts +36 -35
  120. package/dist/utils/validation/disposable-email-domains.d.ts +1 -13
  121. package/dist/utils/validation/role-accounts.d.ts +18 -18
  122. package/dist/utils/validation/validate-email.d.ts +5 -5
  123. package/dist/utils/validation/verify-email.d.ts +45 -42
  124. package/dist/utils/validation/verify-email.js +1 -1
  125. package/dist/utils/validation/verify-smtp.d.ts +35 -34
  126. package/dist/utils/validation/verify-smtp.js +1 -1
  127. package/package.json +61 -61
  128. package/dist/attachment-helpers.d.ts +0 -64
  129. package/dist/crypto/dkim-signer.d.ts +0 -48
  130. package/dist/crypto/smime-encrypter.d.ts +0 -53
  131. package/dist/crypto/smime-signer.d.ts +0 -48
  132. package/dist/crypto/types.d.ts +0 -101
  133. package/dist/draft-mail-message.d.ts +0 -13
  134. package/dist/errors/email-error.d.ts +0 -17
  135. package/dist/errors/required-option-error.d.ts +0 -10
  136. package/dist/mail-message.d.ts +0 -425
  137. package/dist/mail.d.ts +0 -206
  138. package/dist/packem_shared/Mail-6Bltpy_p.js +0 -1
  139. package/dist/packem_shared/MailMessage-B76GPBBA.js +0 -1
  140. package/dist/packem_shared/azureProvider-CQYAkgVF.js +0 -1
  141. package/dist/packem_shared/build-mime-message-IYaUqqPJ.js +0 -2
  142. package/dist/packem_shared/defineProvider-B9rSklAJ.js +0 -1
  143. package/dist/packem_shared/detectMimeType-S8WRsNtY.js +0 -1
  144. package/dist/packem_shared/failoverProvider-CAHQQueo.js +0 -1
  145. package/dist/packem_shared/httpProvider-CZD6LZX3.js +0 -1
  146. package/dist/packem_shared/mailPaceProvider-B6yKvh6z.js +0 -1
  147. package/dist/packem_shared/mailgunProvider-mmjKzouh.js +0 -1
  148. package/dist/packem_shared/mailjetProvider-DwN6i0VA.js +0 -1
  149. package/dist/packem_shared/mockProvider-DN5ZwutD.js +0 -1
  150. package/dist/packem_shared/readFile-BlZxbhCU-C8bCdiA2.js +0 -1
  151. package/dist/packem_shared/resendProvider-CfqU7UdE.js +0 -1
  152. package/dist/packem_shared/roundRobinProvider-1WQnuKR8.js +0 -1
  153. package/dist/packem_shared/sweegoProvider-7419CSAq.js +0 -1
  154. package/dist/packem_shared/validate-email-options-DfJ7llf8.js +0 -1
  155. package/dist/packem_shared/zeptomailProvider-C2lh0Xmo.js +0 -1
  156. package/dist/providers/ahasend/provider.d.ts +0 -7
  157. package/dist/providers/ahasend/types.d.ts +0 -28
  158. package/dist/providers/aws-ses/provider.d.ts +0 -8
  159. package/dist/providers/aws-ses/types.d.ts +0 -38
  160. package/dist/providers/azure/provider.d.ts +0 -7
  161. package/dist/providers/azure/types.d.ts +0 -44
  162. package/dist/providers/brevo/provider.d.ts +0 -7
  163. package/dist/providers/brevo/types.d.ts +0 -57
  164. package/dist/providers/failover/provider.d.ts +0 -7
  165. package/dist/providers/failover/types.d.ts +0 -19
  166. package/dist/providers/http/provider.d.ts +0 -7
  167. package/dist/providers/http/types.d.ts +0 -27
  168. package/dist/providers/infobip/provider.d.ts +0 -7
  169. package/dist/providers/infobip/types.d.ts +0 -48
  170. package/dist/providers/mailcrab/provider.d.ts +0 -9
  171. package/dist/providers/mailcrab/types.d.ts +0 -22
  172. package/dist/providers/mailersend/provider.d.ts +0 -7
  173. package/dist/providers/mailersend/types.d.ts +0 -43
  174. package/dist/providers/mailgun/provider.d.ts +0 -7
  175. package/dist/providers/mailgun/types.d.ts +0 -65
  176. package/dist/providers/mailjet/provider.d.ts +0 -7
  177. package/dist/providers/mailjet/types.d.ts +0 -64
  178. package/dist/providers/mailomat/provider.d.ts +0 -7
  179. package/dist/providers/mailomat/types.d.ts +0 -32
  180. package/dist/providers/mailpace/provider.d.ts +0 -7
  181. package/dist/providers/mailpace/types.d.ts +0 -44
  182. package/dist/providers/mailtrap/provider.d.ts +0 -7
  183. package/dist/providers/mailtrap/types.d.ts +0 -36
  184. package/dist/providers/mandrill/provider.d.ts +0 -7
  185. package/dist/providers/mandrill/types.d.ts +0 -79
  186. package/dist/providers/mock/provider.d.ts +0 -8
  187. package/dist/providers/mock/types.d.ts +0 -50
  188. package/dist/providers/nodemailer/provider.d.ts +0 -7
  189. package/dist/providers/nodemailer/types.d.ts +0 -30
  190. package/dist/providers/opentelemetry/provider.d.ts +0 -8
  191. package/dist/providers/opentelemetry/types.d.ts +0 -31
  192. package/dist/providers/plunk/provider.d.ts +0 -7
  193. package/dist/providers/plunk/types.d.ts +0 -30
  194. package/dist/providers/postal/provider.d.ts +0 -7
  195. package/dist/providers/postal/types.d.ts +0 -40
  196. package/dist/providers/postmark/provider.d.ts +0 -7
  197. package/dist/providers/postmark/types.d.ts +0 -52
  198. package/dist/providers/provider.d.ts +0 -27
  199. package/dist/providers/resend/provider.d.ts +0 -7
  200. package/dist/providers/resend/types.d.ts +0 -43
  201. package/dist/providers/roundrobin/provider.d.ts +0 -7
  202. package/dist/providers/roundrobin/types.d.ts +0 -19
  203. package/dist/providers/scaleway/provider.d.ts +0 -7
  204. package/dist/providers/scaleway/types.d.ts +0 -36
  205. package/dist/providers/sendgrid/provider.d.ts +0 -7
  206. package/dist/providers/sendgrid/types.d.ts +0 -76
  207. package/dist/providers/smtp/provider.d.ts +0 -7
  208. package/dist/providers/smtp/types.d.ts +0 -63
  209. package/dist/providers/sweego/provider.d.ts +0 -7
  210. package/dist/providers/sweego/types.d.ts +0 -32
  211. package/dist/providers/utils/address-formatter.d.ts +0 -139
  212. package/dist/providers/utils/attachment-processor.d.ts +0 -58
  213. package/dist/providers/utils/index.d.ts +0 -4
  214. package/dist/providers/utils/payload-builder.d.ts +0 -78
  215. package/dist/providers/utils/provider-base.d.ts +0 -69
  216. package/dist/providers/zeptomail/provider.d.ts +0 -7
  217. package/dist/providers/zeptomail/types.d.ts +0 -29
  218. package/dist/template-engines/types.d.ts +0 -8
  219. package/dist/types.d.ts +0 -203
  220. package/dist/utils/build-mime-message.d.ts +0 -8
  221. package/dist/utils/create-logger.d.ts +0 -16
  222. package/dist/utils/format-email-addresses.d.ts +0 -8
  223. package/dist/utils/generate-boundary.d.ts +0 -7
  224. package/dist/utils/generate-message-id.d.ts +0 -6
  225. package/dist/utils/headers-to-record.d.ts +0 -9
  226. package/dist/utils/is-port-available.d.ts +0 -9
  227. package/dist/utils/make-request.d.ts +0 -18
  228. package/dist/utils/retry.d.ts +0 -10
  229. package/dist/utils/sanitize-header.d.ts +0 -14
  230. package/dist/utils/to-base64.d.ts +0 -8
  231. package/dist/utils/validation/validate-email-options.d.ts +0 -8
@@ -1,3 +1,529 @@
1
- export type { Provider, ProviderFactory } from "../provider.d.ts";
2
- export { default as opentelemetryProvider } from "./providers/opentelemetry/provider.d.ts";
3
- export type { OpenTelemetryConfig, OpenTelemetryEmailOptions } from "./types.d.ts";
1
+ import { a as Provider, P as ProviderFactory } from "../../packem_shared/provider.d-DcfYeGJJ.js";
2
+ import { B as BaseConfig, E as EmailOptions } from "../../packem_shared/types.d-wwpgA3to.js";
3
+ import 'node:buffer';
4
+ /**
5
+ * @since 1.0.0
6
+ */
7
+ interface Context {
8
+ /**
9
+ * Get a value from the context.
10
+ *
11
+ * @param key key which identifies a context value
12
+ */
13
+ getValue(key: symbol): unknown;
14
+ /**
15
+ * Create a new context which inherits from this context and has
16
+ * the given key set to the given value.
17
+ *
18
+ * @param key context key for which to set the value
19
+ * @param value value to set for the given key
20
+ */
21
+ setValue(key: symbol, value: unknown): Context;
22
+ /**
23
+ * Return a new context which inherits from this context but does
24
+ * not contain a value for the given key.
25
+ *
26
+ * @param key context key for which to clear a value
27
+ */
28
+ deleteValue(key: symbol): Context;
29
+ }
30
+ /**
31
+ * Attributes is a map from string to attribute values.
32
+ *
33
+ * Note: only the own enumerable keys are counted as valid attribute keys.
34
+ *
35
+ * @since 1.3.0
36
+ */
37
+ interface Attributes {
38
+ [attributeKey: string]: AttributeValue | undefined;
39
+ }
40
+ /**
41
+ * Attribute values may be any non-nullish primitive value except an object.
42
+ *
43
+ * null or undefined attribute values are invalid and will result in undefined behavior.
44
+ *
45
+ * @since 1.3.0
46
+ */
47
+ type AttributeValue = string | number | boolean | Array<null | undefined | string> | Array<null | undefined | number> | Array<null | undefined | boolean>;
48
+ interface ExceptionWithCode {
49
+ code: string | number;
50
+ name?: string;
51
+ message?: string;
52
+ stack?: string;
53
+ }
54
+ interface ExceptionWithMessage {
55
+ code?: string | number;
56
+ message: string;
57
+ name?: string;
58
+ stack?: string;
59
+ }
60
+ interface ExceptionWithName {
61
+ code?: string | number;
62
+ message?: string;
63
+ name: string;
64
+ stack?: string;
65
+ }
66
+ /**
67
+ * Defines Exception.
68
+ *
69
+ * string or an object with one of (message or name or code) and optional stack
70
+ *
71
+ * @since 1.0.0
72
+ */
73
+ type Exception = ExceptionWithCode | ExceptionWithMessage | ExceptionWithName | string;
74
+ /**
75
+ * Defines High-Resolution Time.
76
+ *
77
+ * The first number, HrTime[0], is UNIX Epoch time in seconds since 00:00:00 UTC on 1 January 1970.
78
+ * The second number, HrTime[1], represents the partial second elapsed since Unix Epoch time represented by first number in nanoseconds.
79
+ * For example, 2021-01-01T12:30:10.150Z in UNIX Epoch time in milliseconds is represented as 1609504210150.
80
+ * The first number is calculated by converting and truncating the Epoch time in milliseconds to seconds:
81
+ * HrTime[0] = Math.trunc(1609504210150 / 1000) = 1609504210.
82
+ * The second number is calculated by converting the digits after the decimal point of the subtraction, (1609504210150 / 1000) - HrTime[0], to nanoseconds:
83
+ * HrTime[1] = Number((1609504210.150 - HrTime[0]).toFixed(9)) * 1e9 = 150000000.
84
+ * This is represented in HrTime format as [1609504210, 150000000].
85
+ *
86
+ * @since 1.0.0
87
+ */
88
+ type HrTime = [number, number];
89
+ /**
90
+ * Defines TimeInput.
91
+ *
92
+ * hrtime, epoch milliseconds, performance.now() or Date
93
+ *
94
+ * @since 1.0.0
95
+ */
96
+ type TimeInput = HrTime | number | Date;
97
+ /**
98
+ * @deprecated please use {@link Attributes}
99
+ * @since 1.0.0
100
+ */
101
+ type SpanAttributes = Attributes;
102
+ /**
103
+ * @deprecated please use {@link AttributeValue}
104
+ * @since 1.0.0
105
+ */
106
+ type SpanAttributeValue = AttributeValue;
107
+ /**
108
+ * @since 1.0.0
109
+ */
110
+ interface TraceState {
111
+ /**
112
+ * Create a new TraceState which inherits from this TraceState and has the
113
+ * given key set.
114
+ * The new entry will always be added in the front of the list of states.
115
+ *
116
+ * @param key key of the TraceState entry.
117
+ * @param value value of the TraceState entry.
118
+ */
119
+ set(key: string, value: string): TraceState;
120
+ /**
121
+ * Return a new TraceState which inherits from this TraceState but does not
122
+ * contain the given key.
123
+ *
124
+ * @param key the key for the TraceState entry to be removed.
125
+ */
126
+ unset(key: string): TraceState;
127
+ /**
128
+ * Returns the value to which the specified key is mapped, or `undefined` if
129
+ * this map contains no mapping for the key.
130
+ *
131
+ * @param key with which the specified value is to be associated.
132
+ * @returns the value to which the specified key is mapped, or `undefined` if
133
+ * this map contains no mapping for the key.
134
+ */
135
+ get(key: string): string | undefined;
136
+ /**
137
+ * Serializes the TraceState to a `list` as defined below. The `list` is a
138
+ * series of `list-members` separated by commas `,`, and a list-member is a
139
+ * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs
140
+ * surrounding `list-members` are ignored. There can be a maximum of 32
141
+ * `list-members` in a `list`.
142
+ *
143
+ * @returns the serialized string.
144
+ */
145
+ serialize(): string;
146
+ }
147
+ /**
148
+ * A SpanContext represents the portion of a {@link Span} which must be
149
+ * serialized and propagated along side of a {@link Baggage}.
150
+ *
151
+ * @since 1.0.0
152
+ */
153
+ interface SpanContext {
154
+ /**
155
+ * The ID of the trace that this span belongs to. It is worldwide unique
156
+ * with practically sufficient probability by being made as 16 randomly
157
+ * generated bytes, encoded as a 32 lowercase hex characters corresponding to
158
+ * 128 bits.
159
+ */
160
+ traceId: string;
161
+ /**
162
+ * The ID of the Span. It is globally unique with practically sufficient
163
+ * probability by being made as 8 randomly generated bytes, encoded as a 16
164
+ * lowercase hex characters corresponding to 64 bits.
165
+ */
166
+ spanId: string;
167
+ /**
168
+ * Only true if the SpanContext was propagated from a remote parent.
169
+ */
170
+ isRemote?: boolean;
171
+ /**
172
+ * Trace flags to propagate.
173
+ *
174
+ * It is represented as 1 byte (bitmap). Bit to represent whether trace is
175
+ * sampled or not. When set, the least significant bit documents that the
176
+ * caller may have recorded trace data. A caller who does not record trace
177
+ * data out-of-band leaves this flag unset.
178
+ *
179
+ * see {@link TraceFlags} for valid flag values.
180
+ */
181
+ traceFlags: number;
182
+ /**
183
+ * Tracing-system-specific info to propagate.
184
+ *
185
+ * The tracestate field value is a `list` as defined below. The `list` is a
186
+ * series of `list-members` separated by commas `,`, and a list-member is a
187
+ * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs
188
+ * surrounding `list-members` are ignored. There can be a maximum of 32
189
+ * `list-members` in a `list`.
190
+ * More Info: https://www.w3.org/TR/trace-context/#tracestate-field
191
+ *
192
+ * Examples:
193
+ * Single tracing system (generic format):
194
+ * tracestate: rojo=00f067aa0ba902b7
195
+ * Multiple tracing systems (with different formatting):
196
+ * tracestate: rojo=00f067aa0ba902b7,congo=t61rcWkgMzE
197
+ */
198
+ traceState?: TraceState;
199
+ }
200
+ /**
201
+ * @since 1.0.0
202
+ */
203
+ interface SpanStatus {
204
+ /** The status code of this message. */
205
+ code: SpanStatusCode;
206
+ /** A developer-facing error message. */
207
+ message?: string;
208
+ }
209
+ /**
210
+ * An enumeration of status codes.
211
+ *
212
+ * @since 1.0.0
213
+ */
214
+ declare enum SpanStatusCode {
215
+ /**
216
+ * The default status.
217
+ */
218
+ UNSET = 0,
219
+ /**
220
+ * The operation has been validated by an Application developer or
221
+ * Operator to have completed successfully.
222
+ */
223
+ OK = 1,
224
+ /**
225
+ * The operation contains an error.
226
+ */
227
+ ERROR = 2,
228
+ }
229
+ /**
230
+ * A pointer from the current {@link Span} to another span in the same trace or
231
+ * in a different trace.
232
+ * Few examples of Link usage.
233
+ * 1. Batch Processing: A batch of elements may contain elements associated
234
+ * with one or more traces/spans. Since there can only be one parent
235
+ * SpanContext, Link is used to keep reference to SpanContext of all
236
+ * elements in the batch.
237
+ * 2. Public Endpoint: A SpanContext in incoming client request on a public
238
+ * endpoint is untrusted from service provider perspective. In such case it
239
+ * is advisable to start a new trace with appropriate sampling decision.
240
+ * However, it is desirable to associate incoming SpanContext to new trace
241
+ * initiated on service provider side so two traces (from Client and from
242
+ * Service Provider) can be correlated.
243
+ *
244
+ * @since 1.0.0
245
+ */
246
+ interface Link {
247
+ /** The {@link SpanContext} of a linked span. */
248
+ context: SpanContext;
249
+ /** A set of {@link SpanAttributes} on the link. */
250
+ attributes?: SpanAttributes;
251
+ /** Count of attributes of the link that were dropped due to collection limits */
252
+ droppedAttributesCount?: number;
253
+ }
254
+ /**
255
+ * An interface that represents a span. A span represents a single operation
256
+ * within a trace. Examples of span might include remote procedure calls or a
257
+ * in-process function calls to sub-components. A Trace has a single, top-level
258
+ * "root" Span that in turn may have zero or more child Spans, which in turn
259
+ * may have children.
260
+ *
261
+ * Spans are created by the {@link Tracer.startSpan} method.
262
+ *
263
+ * @since 1.0.0
264
+ */
265
+ interface Span {
266
+ /**
267
+ * Returns the {@link SpanContext} object associated with this Span.
268
+ *
269
+ * Get an immutable, serializable identifier for this span that can be used
270
+ * to create new child spans. Returned SpanContext is usable even after the
271
+ * span ends.
272
+ *
273
+ * @returns the SpanContext object associated with this Span.
274
+ */
275
+ spanContext(): SpanContext;
276
+ /**
277
+ * Sets an attribute to the span.
278
+ *
279
+ * Sets a single Attribute with the key and value passed as arguments.
280
+ *
281
+ * @param key the key for this attribute.
282
+ * @param value the value for this attribute. Setting a value null or
283
+ * undefined is invalid and will result in undefined behavior.
284
+ */
285
+ setAttribute(key: string, value: SpanAttributeValue): this;
286
+ /**
287
+ * Sets attributes to the span.
288
+ *
289
+ * @param attributes the attributes that will be added.
290
+ * null or undefined attribute values
291
+ * are invalid and will result in undefined behavior.
292
+ */
293
+ setAttributes(attributes: SpanAttributes): this;
294
+ /**
295
+ * Adds an event to the Span.
296
+ *
297
+ * @param name the name of the event.
298
+ * @param [attributesOrStartTime] the attributes that will be added; these are
299
+ * associated with this event. Can be also a start time
300
+ * if type is {@type TimeInput} and 3rd param is undefined
301
+ * @param [startTime] start time of the event.
302
+ */
303
+ addEvent(name: string, attributesOrStartTime?: SpanAttributes | TimeInput, startTime?: TimeInput): this;
304
+ /**
305
+ * Adds a single link to the span.
306
+ *
307
+ * Links added after the creation will not affect the sampling decision.
308
+ * It is preferred span links be added at span creation.
309
+ *
310
+ * @param link the link to add.
311
+ */
312
+ addLink(link: Link): this;
313
+ /**
314
+ * Adds multiple links to the span.
315
+ *
316
+ * Links added after the creation will not affect the sampling decision.
317
+ * It is preferred span links be added at span creation.
318
+ *
319
+ * @param links the links to add.
320
+ */
321
+ addLinks(links: Link[]): this;
322
+ /**
323
+ * Sets the status of the span.
324
+ *
325
+ * By default, a span has status {@link SpanStatusCode.UNSET}.
326
+ * Calling this method overrides that default.
327
+ *
328
+ * The status codes have a total order: `OK > ERROR > UNSET`.
329
+ *
330
+ * - Once {@link SpanStatusCode.OK} is set, any further attempts to change
331
+ * the status are ignored.
332
+ * - Any attempt to set {@link SpanStatusCode.UNSET} is always ignored.
333
+ *
334
+ * The `message` field is only used when {@link SpanStatusCode.ERROR} is set.
335
+ * For all other status codes, `message` is ignored.
336
+ *
337
+ * @param status The {@link SpanStatus} to set.
338
+ */
339
+ setStatus(status: SpanStatus): this;
340
+ /**
341
+ * Updates the Span name.
342
+ *
343
+ * This will override the name provided via {@link Tracer.startSpan}.
344
+ *
345
+ * Upon this update, any sampling behavior based on Span name will depend on
346
+ * the implementation.
347
+ *
348
+ * @param name the Span name.
349
+ */
350
+ updateName(name: string): this;
351
+ /**
352
+ * Marks the end of Span execution.
353
+ *
354
+ * Call to End of a Span MUST not have any effects on child spans. Those may
355
+ * still be running and can be ended later.
356
+ *
357
+ * Do not return `this`. The Span generally should not be used after it
358
+ * is ended so chaining is not desired in this context.
359
+ *
360
+ * @param [endTime] the time to set as Span's end time. If not provided,
361
+ * use the current time as the span's end time.
362
+ */
363
+ end(endTime?: TimeInput): void;
364
+ /**
365
+ * Returns the flag whether this span will be recorded.
366
+ *
367
+ * @returns true if this Span is active and recording information like events
368
+ * with the `AddEvent` operation and attributes using `setAttributes`.
369
+ */
370
+ isRecording(): boolean;
371
+ /**
372
+ * Sets exception as a span event
373
+ * @param exception the exception the only accepted values are string or Error
374
+ * @param [time] the time to set as Span's event time. If not provided,
375
+ * use the current time.
376
+ */
377
+ recordException(exception: Exception, time?: TimeInput): void;
378
+ }
379
+ /**
380
+ * @since 1.0.0
381
+ */
382
+ declare enum SpanKind {
383
+ /** Default value. Indicates that the span is used internally. */
384
+ INTERNAL = 0,
385
+ /**
386
+ * Indicates that the span covers server-side handling of an RPC or other
387
+ * remote request.
388
+ */
389
+ SERVER = 1,
390
+ /**
391
+ * Indicates that the span covers the client-side wrapper around an RPC or
392
+ * other remote request.
393
+ */
394
+ CLIENT = 2,
395
+ /**
396
+ * Indicates that the span describes producer sending a message to a
397
+ * broker. Unlike client and server, there is no direct critical path latency
398
+ * relationship between producer and consumer spans.
399
+ */
400
+ PRODUCER = 3,
401
+ /**
402
+ * Indicates that the span describes consumer receiving a message from a
403
+ * broker. Unlike client and server, there is no direct critical path latency
404
+ * relationship between producer and consumer spans.
405
+ */
406
+ CONSUMER = 4,
407
+ }
408
+ /**
409
+ * Options needed for span creation
410
+ *
411
+ * @since 1.0.0
412
+ */
413
+ interface SpanOptions {
414
+ /**
415
+ * The SpanKind of a span
416
+ * @default {@link SpanKind.INTERNAL}
417
+ */
418
+ kind?: SpanKind;
419
+ /** A span's attributes */
420
+ attributes?: Attributes;
421
+ /** {@link Link}s span to other spans */
422
+ links?: Link[];
423
+ /** A manually specified start time for the created `Span` object. */
424
+ startTime?: TimeInput;
425
+ /** The new span should be a root span. (Ignore parent from context). */
426
+ root?: boolean;
427
+ }
428
+ /**
429
+ * Tracer provides an interface for creating {@link Span}s.
430
+ *
431
+ * @since 1.0.0
432
+ */
433
+ interface Tracer {
434
+ /**
435
+ * Starts a new {@link Span}. Start the span without setting it on context.
436
+ *
437
+ * This method do NOT modify the current Context.
438
+ *
439
+ * @param name The name of the span
440
+ * @param [options] SpanOptions used for span creation
441
+ * @param [context] Context to use to extract parent
442
+ * @returns Span The newly created span
443
+ * @example
444
+ * const span = tracer.startSpan('op');
445
+ * span.setAttribute('key', 'value');
446
+ * span.end();
447
+ */
448
+ startSpan(name: string, options?: SpanOptions, context?: Context): Span;
449
+ /**
450
+ * Starts a new {@link Span} and calls the given function passing it the
451
+ * created span as first argument.
452
+ * Additionally the new span gets set in context and this context is activated
453
+ * for the duration of the function call.
454
+ *
455
+ * @param name The name of the span
456
+ * @param [options] SpanOptions used for span creation
457
+ * @param [context] Context to use to extract parent
458
+ * @param fn function called in the context of the span and receives the newly created span as an argument
459
+ * @returns return value of fn
460
+ * @example
461
+ * const something = tracer.startActiveSpan('op', span => {
462
+ * try {
463
+ * do some work
464
+ * span.setStatus({code: SpanStatusCode.OK});
465
+ * return something;
466
+ * } catch (err) {
467
+ * span.setStatus({
468
+ * code: SpanStatusCode.ERROR,
469
+ * message: err.message,
470
+ * });
471
+ * throw err;
472
+ * } finally {
473
+ * span.end();
474
+ * }
475
+ * });
476
+ *
477
+ * @example
478
+ * const span = tracer.startActiveSpan('op', span => {
479
+ * try {
480
+ * do some work
481
+ * return span;
482
+ * } catch (err) {
483
+ * span.setStatus({
484
+ * code: SpanStatusCode.ERROR,
485
+ * message: err.message,
486
+ * });
487
+ * throw err;
488
+ * }
489
+ * });
490
+ * do some more work
491
+ * span.end();
492
+ */
493
+ startActiveSpan<F extends (span: Span) => unknown>(name: string, fn: F): ReturnType<F>;
494
+ startActiveSpan<F extends (span: Span) => unknown>(name: string, options: SpanOptions, fn: F): ReturnType<F>;
495
+ startActiveSpan<F extends (span: Span) => unknown>(name: string, options: SpanOptions, context: Context, fn: F): ReturnType<F>;
496
+ }
497
+ /**
498
+ * OpenTelemetry configuration
499
+ */
500
+ interface OpenTelemetryConfig extends BaseConfig {
501
+ /**
502
+ * The provider to wrap with OpenTelemetry instrumentation
503
+ * Can be a Provider instance or ProviderFactory function
504
+ */
505
+ provider: Provider | ProviderFactory;
506
+ /**
507
+ * Whether to record email content in spans (default: false)
508
+ * When false, only metadata is recorded
509
+ */
510
+ recordContent?: boolean;
511
+ /**
512
+ * Service name for OpenTelemetry spans (default: "email")
513
+ */
514
+ serviceName?: string;
515
+ /**
516
+ * Optional OpenTelemetry tracer instance
517
+ * If not provided, uses the global tracer
518
+ */
519
+ tracer?: Tracer;
520
+ }
521
+ /**
522
+ * OpenTelemetry-specific email options
523
+ */
524
+ type OpenTelemetryEmailOptions = EmailOptions;
525
+ /**
526
+ * OpenTelemetry Provider for instrumenting email sending with OpenTelemetry traces and metrics
527
+ */
528
+ declare const opentelemetryProvider: ProviderFactory<OpenTelemetryConfig, Provider>;
529
+ export { type OpenTelemetryConfig, type OpenTelemetryEmailOptions, type Provider, type ProviderFactory, opentelemetryProvider };
@@ -1 +1 @@
1
- import{default as o}from"../../packem_shared/opentelemetryProvider-C_ZXOLSd.js";export{o as opentelemetryProvider};
1
+ import{default as o}from"../../packem_shared/opentelemetryProvider-Dwv88G3O.js";export{o as opentelemetryProvider};
@@ -1,3 +1,38 @@
1
- export type { Provider, ProviderFactory } from "../provider.d.ts";
2
- export { default as plunkProvider } from "./providers/plunk/provider.d.ts";
3
- export type { PlunkConfig, PlunkEmailOptions } from "./types.d.ts";
1
+ import { P as ProviderFactory } from "../../packem_shared/provider.d-DcfYeGJJ.js";
2
+ export { type a as Provider } from "../../packem_shared/provider.d-DcfYeGJJ.js";
3
+ import { B as BaseConfig, E as EmailOptions } from "../../packem_shared/types.d-wwpgA3to.js";
4
+ import 'node:buffer';
5
+ /**
6
+ * Plunk configuration
7
+ */
8
+ interface PlunkConfig extends BaseConfig {
9
+ apiKey: string;
10
+ endpoint?: string;
11
+ }
12
+ /**
13
+ * Plunk-specific email options
14
+ */
15
+ interface PlunkEmailOptions extends EmailOptions {
16
+ /**
17
+ * Data to pass to the email template
18
+ */
19
+ data?: Record<string, unknown>;
20
+ /**
21
+ * Subscriber email (used for tracking and analytics)
22
+ * If not provided, uses the first 'to' address
23
+ */
24
+ subscriber?: string;
25
+ /**
26
+ * Subscriber ID (optional identifier for the subscriber)
27
+ */
28
+ subscriberId?: string;
29
+ /**
30
+ * Template ID for template-based emails
31
+ */
32
+ templateId?: string;
33
+ }
34
+ /**
35
+ * Plunk Provider for sending emails through Plunk API.
36
+ */
37
+ declare const plunkProvider: ProviderFactory<PlunkConfig>;
38
+ export { type PlunkConfig, type PlunkEmailOptions, type ProviderFactory, plunkProvider };
@@ -1 +1 @@
1
- import{default as o}from"../../packem_shared/plunkProvider-DfJumQ4U.js";export{o as plunkProvider};
1
+ import{default as o}from"../../packem_shared/plunkProvider-BQyjG6YT.js";export{o as plunkProvider};
@@ -1,3 +1,48 @@
1
- export type { Provider, ProviderFactory } from "../provider.d.ts";
2
- export { default as postalProvider } from "./providers/postal/provider.d.ts";
3
- export type { PostalConfig, PostalEmailOptions } from "./types.d.ts";
1
+ import { P as ProviderFactory } from "../../packem_shared/provider.d-DcfYeGJJ.js";
2
+ export { type a as Provider } from "../../packem_shared/provider.d-DcfYeGJJ.js";
3
+ import { B as BaseConfig, E as EmailOptions } from "../../packem_shared/types.d-wwpgA3to.js";
4
+ import 'node:buffer';
5
+ /**
6
+ * Postal configuration
7
+ */
8
+ interface PostalConfig extends BaseConfig {
9
+ /**
10
+ * Postal server API key
11
+ */
12
+ apiKey: string;
13
+ /**
14
+ * Postal API endpoint
15
+ * Defaults to: https://{host}/api/v1
16
+ */
17
+ endpoint?: string;
18
+ /**
19
+ * Postal server host
20
+ */
21
+ host: string;
22
+ }
23
+ /**
24
+ * Postal-specific email options
25
+ */
26
+ interface PostalEmailOptions extends EmailOptions {
27
+ /**
28
+ * Postal message ID (for tracking)
29
+ */
30
+ postalMessageId?: string;
31
+ /**
32
+ * Tags for categorization
33
+ */
34
+ tags?: string[];
35
+ /**
36
+ * Postal template ID for template-based emails
37
+ */
38
+ templateId?: number;
39
+ /**
40
+ * Template variables for Postal templates
41
+ */
42
+ templateVariables?: Record<string, unknown>;
43
+ }
44
+ /**
45
+ * Postal Provider for sending emails through Postal API.
46
+ */
47
+ declare const postalProvider: ProviderFactory<PostalConfig>;
48
+ export { type PostalConfig, type PostalEmailOptions, type ProviderFactory, postalProvider };
@@ -1 +1 @@
1
- import{default as a}from"../../packem_shared/postalProvider-Bavx2FcH.js";export{a as postalProvider};
1
+ import{default as a}from"../../packem_shared/postalProvider-DPHQ620q.js";export{a as postalProvider};
@@ -1,3 +1,60 @@
1
- export type { Provider, ProviderFactory } from "../provider.d.ts";
2
- export { default as postmarkProvider } from "./providers/postmark/provider.d.ts";
3
- export type { PostmarkConfig, PostmarkEmailOptions } from "./types.d.ts";
1
+ import { P as ProviderFactory } from "../../packem_shared/provider.d-DcfYeGJJ.js";
2
+ export { type a as Provider } from "../../packem_shared/provider.d-DcfYeGJJ.js";
3
+ import { B as BaseConfig, E as EmailOptions } from "../../packem_shared/types.d-wwpgA3to.js";
4
+ import 'node:buffer';
5
+ /**
6
+ * Postmark configuration
7
+ */
8
+ interface PostmarkConfig extends BaseConfig {
9
+ /**
10
+ * Postmark API endpoint
11
+ * Defaults to: https://api.postmarkapp.com
12
+ */
13
+ endpoint?: string;
14
+ /**
15
+ * Postmark Server API Token
16
+ */
17
+ serverToken: string;
18
+ }
19
+ /**
20
+ * Postmark-specific email options
21
+ */
22
+ interface PostmarkEmailOptions extends EmailOptions {
23
+ /**
24
+ * Inline CSS for HTML emails
25
+ */
26
+ inlineCss?: boolean;
27
+ /**
28
+ * Message stream ID
29
+ */
30
+ messageStream?: string;
31
+ /**
32
+ * Metadata (key-value pairs)
33
+ */
34
+ metadata?: Record<string, string>;
35
+ /**
36
+ * Postmark template alias (alternative to templateId)
37
+ */
38
+ templateAlias?: string;
39
+ /**
40
+ * Postmark template ID for template-based emails
41
+ */
42
+ templateId?: number;
43
+ /**
44
+ * Template model/variables for Postmark templates
45
+ */
46
+ templateModel?: Record<string, unknown>;
47
+ /**
48
+ * Track links
49
+ */
50
+ trackLinks?: "HtmlAndText" | "HtmlOnly" | "TextOnly" | "None";
51
+ /**
52
+ * Track opens
53
+ */
54
+ trackOpens?: boolean;
55
+ }
56
+ /**
57
+ * Postmark Provider for sending emails through Postmark API.
58
+ */
59
+ declare const postmarkProvider: ProviderFactory<PostmarkConfig>;
60
+ export { type PostmarkConfig, type PostmarkEmailOptions, type ProviderFactory, postmarkProvider };