@nauth-toolkit/email-nodemailer 0.1.3

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 (51) hide show
  1. package/LICENSE +90 -0
  2. package/README.md +30 -0
  3. package/dist/index.d.ts +3 -0
  4. package/dist/index.d.ts.map +1 -0
  5. package/dist/index.js +21 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/nodemailer-email.provider.d.ts +51 -0
  8. package/dist/nodemailer-email.provider.d.ts.map +1 -0
  9. package/dist/nodemailer-email.provider.js +212 -0
  10. package/dist/nodemailer-email.provider.js.map +1 -0
  11. package/dist/templates/default/account-lockout.html.hbs +631 -0
  12. package/dist/templates/default/account-lockout.text.hbs +20 -0
  13. package/dist/templates/default/email-changed.html.hbs +596 -0
  14. package/dist/templates/default/email-changed.text.hbs +12 -0
  15. package/dist/templates/default/mfa-enabled.html.hbs +595 -0
  16. package/dist/templates/default/mfa-enabled.text.hbs +12 -0
  17. package/dist/templates/default/new-device.html.hbs +646 -0
  18. package/dist/templates/default/new-device.text.hbs +23 -0
  19. package/dist/templates/default/password-changed.html.hbs +595 -0
  20. package/dist/templates/default/password-changed.text.hbs +12 -0
  21. package/dist/templates/default/password-reset.html.hbs +633 -0
  22. package/dist/templates/default/password-reset.text.hbs +14 -0
  23. package/dist/templates/default/verification.html.hbs +633 -0
  24. package/dist/templates/default/verification.text.hbs +16 -0
  25. package/dist/templates/default/welcome.html.hbs +609 -0
  26. package/dist/templates/default/welcome.text.hbs +14 -0
  27. package/dist/templates/handlebars-template.engine.d.ts +36 -0
  28. package/dist/templates/handlebars-template.engine.d.ts.map +1 -0
  29. package/dist/templates/handlebars-template.engine.js +221 -0
  30. package/dist/templates/handlebars-template.engine.js.map +1 -0
  31. package/dist/templates/index.d.ts +2 -0
  32. package/dist/templates/index.d.ts.map +1 -0
  33. package/dist/templates/index.js +18 -0
  34. package/dist/templates/index.js.map +1 -0
  35. package/package.json +54 -0
  36. package/src/templates/default/account-lockout.html.hbs +631 -0
  37. package/src/templates/default/account-lockout.text.hbs +20 -0
  38. package/src/templates/default/email-changed.html.hbs +596 -0
  39. package/src/templates/default/email-changed.text.hbs +12 -0
  40. package/src/templates/default/mfa-enabled.html.hbs +595 -0
  41. package/src/templates/default/mfa-enabled.text.hbs +12 -0
  42. package/src/templates/default/new-device.html.hbs +646 -0
  43. package/src/templates/default/new-device.text.hbs +23 -0
  44. package/src/templates/default/password-changed.html.hbs +595 -0
  45. package/src/templates/default/password-changed.text.hbs +12 -0
  46. package/src/templates/default/password-reset.html.hbs +633 -0
  47. package/src/templates/default/password-reset.text.hbs +14 -0
  48. package/src/templates/default/verification.html.hbs +633 -0
  49. package/src/templates/default/verification.text.hbs +16 -0
  50. package/src/templates/default/welcome.html.hbs +609 -0
  51. package/src/templates/default/welcome.text.hbs +14 -0
@@ -0,0 +1,609 @@
1
+ ---
2
+ subject: Welcome to {{appName}}!
3
+ ---
4
+ <!doctype html>
5
+ <html lang="und" dir="auto" xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
6
+ <head>
7
+ <title>{{ subject }}</title>
8
+ <!--[if !mso]><!-->
9
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
10
+ <!--<![endif]-->
11
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
12
+ <meta name="viewport" content="width=device-width, initial-scale=1">
13
+ <style type="text/css">
14
+ #outlook a { padding:0; }
15
+ body { margin:0;padding:0;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%; }
16
+ table, td { border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt; }
17
+ img { border:0;height:auto;line-height:100%; outline:none;text-decoration:none;-ms-interpolation-mode:bicubic; }
18
+ p { display:block;margin:13px 0; }
19
+ </style>
20
+ <!--[if mso]>
21
+ <noscript>
22
+ <xml>
23
+ <o:OfficeDocumentSettings>
24
+ <o:AllowPNG/>
25
+ <o:PixelsPerInch>96</o:PixelsPerInch>
26
+ </o:OfficeDocumentSettings>
27
+ </xml>
28
+ </noscript>
29
+ <![endif]-->
30
+ <!--[if lte mso 11]>
31
+ <style type="text/css">
32
+ .mj-outlook-group-fix { width:100% !important; }
33
+ </style>
34
+ <![endif]-->
35
+
36
+ <!--[if !mso]><!-->
37
+ <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" rel="stylesheet" type="text/css">
38
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet" type="text/css">
39
+ <style type="text/css">
40
+ @import url(https://fonts.googleapis.com/css?family=Roboto:300,400,500,700);
41
+ @import url(https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap);
42
+ </style>
43
+ <!--<![endif]-->
44
+
45
+
46
+
47
+ <style type="text/css">
48
+ @media only screen and (min-width:480px) {
49
+ .mj-column-per-100 { width:100% !important; max-width: 100%; }
50
+ }
51
+ </style>
52
+ <style media="screen and (min-width:480px)">
53
+ .moz-text-html .mj-column-per-100 { width:100% !important; max-width: 100%; }
54
+ </style>
55
+
56
+
57
+
58
+
59
+ <style type="text/css">
60
+
61
+ @media only screen and (max-width:479px) {
62
+ table.mj-full-width-mobile { width: 100% !important; }
63
+ td.mj-full-width-mobile { width: auto !important; }
64
+ }
65
+
66
+ </style>
67
+
68
+ <style type="text/css">
69
+ /* Global CSS classes for reusable styles */
70
+ .text-primary {
71
+ color: #111827;
72
+ }
73
+ .text-secondary {
74
+ color: #374151;
75
+ }
76
+ .text-muted {
77
+ color: #6b7280;
78
+ }
79
+ .text-small {
80
+ color: #9ca3af;
81
+ }
82
+ .text-success {
83
+ color: #166534;
84
+ }
85
+ .text-danger {
86
+ color: #dc2626;
87
+ }
88
+ .text-info {
89
+ color: #0c4a6e;
90
+ }
91
+
92
+ .bg-success {
93
+ background-color: #f0fdf4;
94
+ }
95
+ .bg-danger {
96
+ background-color: #fef2f2;
97
+ }
98
+ .bg-info {
99
+ background-color: #f0f9ff;
100
+ }
101
+ .bg-muted {
102
+ background-color: #f9fafb;
103
+ }
104
+
105
+ .font-bold {
106
+ font-weight: 600;
107
+ }
108
+ .font-semibold {
109
+ font-weight: 500;
110
+ }
111
+
112
+ .heading {
113
+ font-size: 18px;
114
+ font-weight: 600;
115
+ color: #111827;
116
+ }
117
+ .heading-large {
118
+ font-size: 20px;
119
+ font-weight: 600;
120
+ color: #111827;
121
+ }
122
+ .text-small {
123
+ font-size: 14px;
124
+ }
125
+ .text-xs {
126
+ font-size: 12px;
127
+ }
128
+
129
+ .code-block {
130
+ font-size: 48px !important;
131
+ font-weight: 700 !important;
132
+ letter-spacing: 12px !important;
133
+ color: #111827 !important;
134
+ background-color: #f9fafb !important;
135
+ padding: 20px !important;
136
+ text-align: center !important;
137
+ }
138
+ .code-block div {
139
+ font-size: 48px !important;
140
+ font-weight: 700 !important;
141
+ letter-spacing: 12px !important;
142
+ color: #111827 !important;
143
+ background-color: #f9fafb !important;
144
+ padding: 20px !important;
145
+ text-align: center !important;
146
+ }
147
+
148
+ .alert-box {
149
+ padding: 16px 24px;
150
+ border-left: 4px solid;
151
+ }
152
+ .alert-success {
153
+ background-color: #f0fdf4;
154
+ border-left-color: #22c55e;
155
+ color: #166534;
156
+ }
157
+ .alert-danger {
158
+ background-color: #fef2f2;
159
+ border-left-color: #ef4444;
160
+ color: #991b1b;
161
+ }
162
+ .alert-info {
163
+ background-color: #f0f9ff;
164
+ border-left-color: #0ea5e9;
165
+ color: #0c4a6e;
166
+ }
167
+
168
+ a {
169
+ color: #4f46e5;
170
+ text-decoration: none;
171
+ }
172
+ a:hover {
173
+ text-decoration: underline;
174
+ }
175
+
176
+ ul {
177
+ margin: 0;
178
+ padding-left: 20px;
179
+ color: #374151;
180
+ }
181
+ li {
182
+ margin-bottom: 8px;
183
+ }
184
+ </style>
185
+
186
+ </head>
187
+ <body style="word-spacing:normal;background-color:#f3f4f6;">
188
+
189
+ <div style="display:none;font-size:1px;color:#ffffff;line-height:1px;max-height:0px;max-width:0px;opacity:0;overflow:hidden;">{{ previewText }}</div>
190
+
191
+
192
+ <div
193
+ aria-label="{{ subject }}" aria-roledescription="email" style="background-color:#f3f4f6;" role="article" lang="und" dir="auto"
194
+ >
195
+
196
+
197
+ <!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" class="" role="presentation" style="width:600px;" width="600" bgcolor="#f3f4f6" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
198
+
199
+
200
+ <div style="background:#f3f4f6;background-color:#f3f4f6;margin:0px auto;max-width:600px;">
201
+
202
+ <table
203
+ align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#f3f4f6;background-color:#f3f4f6;width:100%;"
204
+ >
205
+ <tbody>
206
+ <tr>
207
+ <td
208
+ style="direction:ltr;font-size:0px;padding:0;text-align:center;"
209
+ >
210
+ <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><![endif]-->
211
+
212
+ <!-- Header -->
213
+ <!--[if mso | IE]><tr><td class="" width="600px" ><table align="center" border="0" cellpadding="0" cellspacing="0" class="" role="presentation" style="width:600px;" width="600" bgcolor="#ffffff" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
214
+
215
+
216
+ <div style="background:#ffffff;background-color:#ffffff;margin:0px auto;max-width:600px;">
217
+
218
+ <table
219
+ align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#ffffff;background-color:#ffffff;width:100%;"
220
+ >
221
+ <tbody>
222
+ <tr>
223
+ <td
224
+ style="direction:ltr;font-size:0px;padding:0;text-align:center;"
225
+ >
226
+ <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:600px;" ><![endif]-->
227
+
228
+ <div
229
+ class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"
230
+ >
231
+
232
+ <table
233
+ border="0" cellpadding="0" cellspacing="0" role="presentation" style="background-color:#ffffff;vertical-align:top;" width="100%"
234
+ >
235
+ <tbody>
236
+
237
+ <tr>
238
+ <td
239
+ align="center" style="font-size:0px;padding:0;word-break:break-word;"
240
+ >
241
+
242
+ <p
243
+ style="border-top:solid 1px #e5e7eb;font-size:1px;margin:0px auto;width:100%;"
244
+ >
245
+ </p>
246
+
247
+ <!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" style="border-top:solid 1px #e5e7eb;font-size:1px;margin:0px auto;width:600px;" role="presentation" width="600px" ><tr><td style="height:0;line-height:0;"> &nbsp;
248
+ </td></tr></table><![endif]-->
249
+
250
+
251
+ </td>
252
+ </tr>
253
+
254
+ </tbody>
255
+ </table>
256
+
257
+ </div>
258
+
259
+ <!--[if mso | IE]></td></tr></table><![endif]-->
260
+ </td>
261
+ </tr>
262
+ </tbody>
263
+ </table>
264
+
265
+ </div>
266
+
267
+
268
+ <!--[if mso | IE]></td></tr></table></td></tr><![endif]-->
269
+ <!-- Logo/Header Section (Optional) -->{{#if logoUrl}}
270
+ <!--[if mso | IE]><tr><td class="" width="600px" ><table align="center" border="0" cellpadding="0" cellspacing="0" class="" role="presentation" style="width:600px;" width="600" bgcolor="#ffffff" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
271
+
272
+
273
+ <div style="background:#ffffff;background-color:#ffffff;margin:0px auto;max-width:600px;">
274
+
275
+ <table
276
+ align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#ffffff;background-color:#ffffff;width:100%;"
277
+ >
278
+ <tbody>
279
+ <tr>
280
+ <td
281
+ style="direction:ltr;font-size:0px;padding:32px 24px;text-align:center;"
282
+ >
283
+ <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:552px;" ><![endif]-->
284
+
285
+ <div
286
+ class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"
287
+ >
288
+
289
+ <table
290
+ border="0" cellpadding="0" cellspacing="0" role="presentation" style="background-color:#ffffff;vertical-align:top;" width="100%"
291
+ >
292
+ <tbody>
293
+
294
+ <tr>
295
+ <td
296
+ align="center" style="font-size:0px;padding:0;word-break:break-word;"
297
+ >
298
+
299
+ <table
300
+ border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse:collapse;border-spacing:0px;"
301
+ >
302
+ <tbody>
303
+ <tr>
304
+ <td style="width:200px;">
305
+
306
+ <img
307
+ alt="{{appName}}" src="{{logoUrl}}" style="border:0;display:block;outline:none;text-decoration:none;height:auto;width:100%;font-size:13px;" width="200" height="auto"
308
+ />
309
+
310
+ </td>
311
+ </tr>
312
+ </tbody>
313
+ </table>
314
+
315
+ </td>
316
+ </tr>
317
+
318
+ </tbody>
319
+ </table>
320
+
321
+ </div>
322
+
323
+ <!--[if mso | IE]></td></tr></table><![endif]-->
324
+ </td>
325
+ </tr>
326
+ </tbody>
327
+ </table>
328
+
329
+ </div>
330
+
331
+
332
+ <!--[if mso | IE]></td></tr></table></td></tr><![endif]-->
333
+ {{/if}}<!-- Main Content Card -->
334
+ <!--[if mso | IE]><tr><td class="" width="600px" ><table align="center" border="0" cellpadding="0" cellspacing="0" class="" role="presentation" style="width:600px;" width="600" bgcolor="#ffffff" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
335
+
336
+
337
+ <div style="background:#ffffff;background-color:#ffffff;margin:0px auto;max-width:600px;">
338
+
339
+ <table
340
+ align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#ffffff;background-color:#ffffff;width:100%;"
341
+ >
342
+ <tbody>
343
+ <tr>
344
+ <td
345
+ style="direction:ltr;font-size:0px;padding:0 24px;text-align:center;"
346
+ >
347
+ <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:552px;" ><![endif]-->
348
+
349
+ <div
350
+ class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"
351
+ >
352
+
353
+ <table
354
+ border="0" cellpadding="0" cellspacing="0" role="presentation" style="background-color:#ffffff;vertical-align:top;" width="100%"
355
+ >
356
+ <tbody>
357
+ <!-- Greeting (render if any name field is provided) -->{{#if fullName}}
358
+ <tr>
359
+ <td
360
+ align="left" class="heading" style="font-size:0px;padding:32px 24px 16px 24px;word-break:break-word;"
361
+ >
362
+
363
+ <div
364
+ style="font-family:Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;font-size:16px;line-height:24px;text-align:left;color:#374151;"
365
+ >Hi {{ fullName }},</div>
366
+
367
+ </td>
368
+ </tr>
369
+ {{/if}}
370
+ {{#if firstName}}
371
+ <tr>
372
+ <td
373
+ align="left" class="heading" style="font-size:0px;padding:32px 24px 16px 24px;word-break:break-word;"
374
+ >
375
+
376
+ <div
377
+ style="font-family:Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;font-size:16px;line-height:24px;text-align:left;color:#374151;"
378
+ >Hi {{ firstName }},</div>
379
+
380
+ </td>
381
+ </tr>
382
+ {{/if}}
383
+ {{#if lastName}}
384
+ <tr>
385
+ <td
386
+ align="left" class="heading" style="font-size:0px;padding:32px 24px 16px 24px;word-break:break-word;"
387
+ >
388
+
389
+ <div
390
+ style="font-family:Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;font-size:16px;line-height:24px;text-align:left;color:#374151;"
391
+ >Hi {{ lastName }},</div>
392
+
393
+ </td>
394
+ </tr>
395
+ {{/if}}
396
+ {{#if userName}}
397
+ <tr>
398
+ <td
399
+ align="left" class="heading" style="font-size:0px;padding:32px 24px 16px 24px;word-break:break-word;"
400
+ >
401
+
402
+ <div
403
+ style="font-family:Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;font-size:16px;line-height:24px;text-align:left;color:#374151;"
404
+ >Hi {{ userName }},</div>
405
+
406
+ </td>
407
+ </tr>
408
+ {{/if}}<!-- Content Slot - Child template injected here --><!-- Welcome Email Content -->
409
+ <tr>
410
+ <td
411
+ align="left" style="font-size:0px;padding:0 24px 16px 24px;word-break:break-word;"
412
+ >
413
+
414
+ <div
415
+ style="font-family:Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;font-size:16px;line-height:24px;text-align:left;color:#374151;"
416
+ >We're excited to have you with us! Your account has been successfully created and you're ready to get started.</div>
417
+
418
+ </td>
419
+ </tr>
420
+ {{#if dashboardUrl}}
421
+ <tr>
422
+ <td
423
+ align="center" style="font-size:0px;padding:16px 32px;word-break:break-word;"
424
+ >
425
+
426
+ <table
427
+ border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse:separate;line-height:100%;"
428
+ >
429
+ <tbody>
430
+ <tr>
431
+ <td
432
+ align="center" bgcolor="#4f46e5" role="presentation" style="border:none;border-radius:8px;cursor:auto;mso-padding-alt:10px 25px;background:#4f46e5;" valign="middle"
433
+ >
434
+ <a
435
+ href="{{dashboardUrl}}" style="display:inline-block;background:#4f46e5;color:#ffffff;font-family:Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;font-size:16px;font-weight:600;line-height:120%;margin:0;text-decoration:none;text-transform:none;padding:10px 25px;mso-padding-alt:0px;border-radius:8px;" target="_blank"
436
+ >
437
+ Get Started
438
+ </a>
439
+ </td>
440
+ </tr>
441
+ </tbody>
442
+ </table>
443
+
444
+ </td>
445
+ </tr>
446
+ {{/if}}{{#if supportEmail}}
447
+ <tr>
448
+ <td
449
+ align="left" class="text-small" style="font-size:0px;padding:24px 24px 16px 24px;word-break:break-word;"
450
+ >
451
+
452
+ <div
453
+ style="font-family:Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;font-size:16px;line-height:24px;text-align:left;color:#374151;"
454
+ >If you have any questions or need assistance, feel free to reach out to our support team at <a href="mailto:{{supportEmail}}">{{supportEmail}}</a>.</div>
455
+
456
+ </td>
457
+ </tr>
458
+ {{/if}}
459
+ <tr>
460
+ <td
461
+ align="left" class="font-bold text-primary" style="font-size:0px;padding:0 24px 24px 24px;word-break:break-word;"
462
+ >
463
+
464
+ <div
465
+ style="font-family:Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;font-size:16px;line-height:24px;text-align:left;color:#374151;"
466
+ >Happy exploring! 🎉</div>
467
+
468
+ </td>
469
+ </tr>
470
+
471
+ </tbody>
472
+ </table>
473
+
474
+ </div>
475
+
476
+ <!--[if mso | IE]></td></tr></table><![endif]-->
477
+ </td>
478
+ </tr>
479
+ </tbody>
480
+ </table>
481
+
482
+ </div>
483
+
484
+
485
+ <!--[if mso | IE]></td></tr></table></td></tr><![endif]-->
486
+ <!-- Footer -->
487
+ <!--[if mso | IE]><tr><td class="" width="600px" ><table align="center" border="0" cellpadding="0" cellspacing="0" class="" role="presentation" style="width:600px;" width="600" bgcolor="#ffffff" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
488
+
489
+
490
+ <div style="background:#ffffff;background-color:#ffffff;margin:0px auto;max-width:600px;">
491
+
492
+ <table
493
+ align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#ffffff;background-color:#ffffff;width:100%;"
494
+ >
495
+ <tbody>
496
+ <tr>
497
+ <td
498
+ style="direction:ltr;font-size:0px;padding:24px;text-align:center;"
499
+ >
500
+ <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:552px;" ><![endif]-->
501
+
502
+ <div
503
+ class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"
504
+ >
505
+
506
+ <table
507
+ border="0" cellpadding="0" cellspacing="0" role="presentation" style="background-color:#ffffff;vertical-align:top;" width="100%"
508
+ >
509
+ <tbody>
510
+
511
+ <tr>
512
+ <td
513
+ align="center" style="font-size:0px;padding:16px 0;word-break:break-word;"
514
+ >
515
+
516
+ <p
517
+ style="border-top:solid 1px #e5e7eb;font-size:1px;margin:0px auto;width:100%;"
518
+ >
519
+ </p>
520
+
521
+ <!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" style="border-top:solid 1px #e5e7eb;font-size:1px;margin:0px auto;width:552px;" role="presentation" width="552px" ><tr><td style="height:0;line-height:0;"> &nbsp;
522
+ </td></tr></table><![endif]-->
523
+
524
+
525
+ </td>
526
+ </tr>
527
+
528
+ <tr>
529
+ <td
530
+ align="center" style="font-size:0px;padding:8px 0;word-break:break-word;"
531
+ >
532
+
533
+ <div
534
+ style="font-family:Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;font-size:14px;line-height:24px;text-align:center;color:#6b7280;"
535
+ >&copy; {{ currentYear }} {{ companyName }}. All rights reserved.</div>
536
+
537
+ </td>
538
+ </tr>
539
+ {{#if supportEmail}}
540
+ <tr>
541
+ <td
542
+ align="center" style="font-size:0px;padding:8px 0;word-break:break-word;"
543
+ >
544
+
545
+ <div
546
+ style="font-family:Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;font-size:14px;line-height:24px;text-align:center;color:#6b7280;"
547
+ >Need help? <a href="mailto:{{supportEmail}}">Contact Support</a></div>
548
+
549
+ </td>
550
+ </tr>
551
+ {{/if}}<!-- Footer Disclaimer (custom or default) -->{{#if footerDisclaimer}}
552
+ <tr>
553
+ <td
554
+ align="center" style="font-size:0px;padding:16px 24px 8px 24px;word-break:break-word;"
555
+ >
556
+
557
+ <div
558
+ style="font-family:Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;font-size:12px;line-height:18px;text-align:center;color:#6b7280;"
559
+ >{{ footerDisclaimer }}</div>
560
+
561
+ </td>
562
+ </tr>
563
+ {{else}}
564
+ <tr>
565
+ <td
566
+ align="center" style="font-size:0px;padding:16px 24px 8px 24px;word-break:break-word;"
567
+ >
568
+
569
+ <div
570
+ style="font-family:Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;font-size:12px;line-height:18px;text-align:center;color:#6b7280;"
571
+ >This email and any attachments are confidential and intended solely for the use of the individual or entity
572
+ to whom they are addressed. If you have received this email in error, please notify the sender immediately
573
+ and delete it from your system. Any unauthorized use, disclosure, copying, or distribution of this email is
574
+ strictly prohibited.</div>
575
+
576
+ </td>
577
+ </tr>
578
+ {{/if}}
579
+ </tbody>
580
+ </table>
581
+
582
+ </div>
583
+
584
+ <!--[if mso | IE]></td></tr></table><![endif]-->
585
+ </td>
586
+ </tr>
587
+ </tbody>
588
+ </table>
589
+
590
+ </div>
591
+
592
+
593
+ <!--[if mso | IE]></td></tr></table></td></tr></table><![endif]-->
594
+ </td>
595
+ </tr>
596
+ </tbody>
597
+ </table>
598
+
599
+ </div>
600
+
601
+
602
+ <!--[if mso | IE]></td></tr></table><![endif]-->
603
+
604
+
605
+ </div>
606
+
607
+ </body>
608
+ </html>
609
+
@@ -0,0 +1,14 @@
1
+ Welcome to {{appName}}!
2
+
3
+ {{#if fullName}}Hi {{fullName}},{{/if}}
4
+ {{#if firstName}}Hi {{firstName}},{{/if}}
5
+ {{#if lastName}}Hi {{lastName}},{{/if}}
6
+ {{#if userName}}Hi {{userName}},{{/if}}
7
+
8
+ We're excited to have you with us! Your account has been successfully created and you're ready to get started.
9
+
10
+ {{#if dashboardUrl}}Visit: {{dashboardUrl}}{{/if}}
11
+
12
+ {{#if supportEmail}}If you have any questions or need assistance, reach out to our support team at {{supportEmail}}.{{/if}}
13
+
14
+ Happy exploring!
@@ -0,0 +1,36 @@
1
+ import { TemplateEngine, TemplateType, TemplateVariables, EmailTemplate } from '@nauth-toolkit/core';
2
+ import * as Handlebars from 'handlebars';
3
+ export interface TemplateSource {
4
+ content?: string;
5
+ filePath?: string;
6
+ }
7
+ export interface TemplateFiles {
8
+ subject: TemplateSource;
9
+ html: TemplateSource;
10
+ text?: TemplateSource;
11
+ }
12
+ export interface HandlebarsTemplateEngineOptions {
13
+ baseDir?: string;
14
+ useDefaultTemplates?: boolean;
15
+ helpers?: Record<string, Handlebars.HelperDelegate>;
16
+ compileOptions?: CompileOptions;
17
+ }
18
+ export declare class HandlebarsTemplateEngine implements TemplateEngine {
19
+ private templates;
20
+ private readonly handlebars;
21
+ private readonly baseDir;
22
+ constructor(options?: HandlebarsTemplateEngineOptions);
23
+ render(type: TemplateType | string, variables: TemplateVariables): Promise<EmailTemplate>;
24
+ registerTemplate(type: TemplateType | string, template: EmailTemplate): void;
25
+ registerTemplateFromFile(type: TemplateType | string, htmlFilePath: string, textFilePath?: string): Promise<void>;
26
+ registerTemplateFromFiles(type: TemplateType | string, templateFiles: TemplateFiles): Promise<void>;
27
+ registerTemplateFromSources(type: TemplateType | string, templateSources: TemplateFiles): Promise<void>;
28
+ getAvailableTemplates(): string[];
29
+ hasTemplate(type: TemplateType | string): boolean;
30
+ private parseFrontmatter;
31
+ private loadTemplateSource;
32
+ private htmlToText;
33
+ private registerDefaultHelpers;
34
+ private registerDefaultTemplates;
35
+ }
36
+ //# sourceMappingURL=handlebars-template.engine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handlebars-template.engine.d.ts","sourceRoot":"","sources":["../../src/templates/handlebars-template.engine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,aAAa,EAGd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,UAAU,MAAM,YAAY,CAAC;AASzC,MAAM,WAAW,cAAc;IAI7B,OAAO,CAAC,EAAE,MAAM,CAAC;IAMjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAQD,MAAM,WAAW,aAAa;IAI5B,OAAO,EAAE,cAAc,CAAC;IAKxB,IAAI,EAAE,cAAc,CAAC;IAKrB,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB;AAKD,MAAM,WAAW,+BAA+B;IAK9C,OAAO,CAAC,EAAE,MAAM,CAAC;IAMjB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAK9B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,cAAc,CAAC,CAAC;IAKpD,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC;AA4CD,qBAAa,wBAAyB,YAAW,cAAc;IAK7D,OAAO,CAAC,SAAS,CAOH;IAKd,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAoB;IAK/C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;gBAOrB,OAAO,GAAE,+BAAoC;IA0BnD,MAAM,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,EAAE,SAAS,EAAE,iBAAiB,GAAG,OAAO,CAAC,aAAa,CAAC;IA8B/F,gBAAgB,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,EAAE,QAAQ,EAAE,aAAa,GAAG,IAAI;IAwBtE,wBAAwB,CAC5B,IAAI,EAAE,YAAY,GAAG,MAAM,EAC3B,YAAY,EAAE,MAAM,EACpB,YAAY,CAAC,EAAE,MAAM,GACpB,OAAO,CAAC,IAAI,CAAC;IAiCV,yBAAyB,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,EAAE,aAAa,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAkBnG,2BAA2B,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,EAAE,eAAe,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAS7G,qBAAqB,IAAI,MAAM,EAAE;IAUjC,WAAW,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,GAAG,OAAO;IAoBjD,OAAO,CAAC,gBAAgB;YAiCV,kBAAkB;IA6BhC,OAAO,CAAC,UAAU;IAuBlB,OAAO,CAAC,sBAAsB;IAiD9B,OAAO,CAAC,wBAAwB;CAqCjC"}