@etainabl/nodejs-sdk 1.3.192 → 1.3.193
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/index.js +13 -17
- package/dist/esm/index.js.map +1 -1
- package/dist/index.js +13 -17
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -6284,6 +6284,9 @@ function generateNotificationEmail(options) {
|
|
|
6284
6284
|
if (!process.env.ETAINABL_UI_URL) {
|
|
6285
6285
|
throw new Error("ETAINABL_UI_URL environment variable is not set");
|
|
6286
6286
|
}
|
|
6287
|
+
if (!process.env.ETAINABL_PUBLIC_ASSETS_URL) {
|
|
6288
|
+
throw new Error("ETAINABL_PUBLIC_ASSETS_URL environment variable is not set");
|
|
6289
|
+
}
|
|
6287
6290
|
const { title, message, category = "Notification", actions = [], metadata = {}, items = [] } = options;
|
|
6288
6291
|
const isSingleItem = items.length === 1;
|
|
6289
6292
|
const hasMultipleItems = items.length > 1;
|
|
@@ -6328,11 +6331,14 @@ function generateNotificationEmail(options) {
|
|
|
6328
6331
|
|
|
6329
6332
|
<mj-body background-color="#F3F4F6">
|
|
6330
6333
|
<!-- Header -->
|
|
6331
|
-
<mj-section background-color="#1f303d" padding="20px 0">
|
|
6334
|
+
<mj-section background-color="#1f303d" padding="24px 0 20px 0">
|
|
6332
6335
|
<mj-column>
|
|
6333
|
-
<mj-
|
|
6334
|
-
|
|
6335
|
-
|
|
6336
|
+
<mj-image
|
|
6337
|
+
src="${process.env.ETAINABL_PUBLIC_ASSETS_URL}/email/etainabl_email_logo.png"
|
|
6338
|
+
alt="Etainabl"
|
|
6339
|
+
width="180px"
|
|
6340
|
+
padding="0"
|
|
6341
|
+
/>
|
|
6336
6342
|
</mj-column>
|
|
6337
6343
|
</mj-section>
|
|
6338
6344
|
|
|
@@ -6356,30 +6362,21 @@ function generateNotificationEmail(options) {
|
|
|
6356
6362
|
</mj-section>
|
|
6357
6363
|
|
|
6358
6364
|
<!-- Main Title -->
|
|
6359
|
-
<mj-section padding="0 32px
|
|
6365
|
+
<mj-section padding="0 32px 18px 32px">
|
|
6360
6366
|
<mj-column>
|
|
6361
|
-
<mj-text font-size="
|
|
6367
|
+
<mj-text font-size="${hasMultipleItems ? "18px" : "14px"}" color="#1F2937" padding="0">
|
|
6362
6368
|
${mainTitle}
|
|
6363
6369
|
</mj-text>
|
|
6364
6370
|
</mj-column>
|
|
6365
6371
|
</mj-section>
|
|
6366
6372
|
|
|
6367
|
-
<!-- Subtitle -->
|
|
6368
|
-
<mj-section padding="0 32px 24px 32px">
|
|
6369
|
-
<mj-column>
|
|
6370
|
-
<mj-text font-size="14px" color="#6B7280" padding="0">
|
|
6371
|
-
${subtitle}
|
|
6372
|
-
</mj-text>
|
|
6373
|
-
</mj-column>
|
|
6374
|
-
</mj-section>
|
|
6375
|
-
|
|
6376
6373
|
${hasMultipleItems ? (() => {
|
|
6377
6374
|
const maxItems = 3;
|
|
6378
6375
|
const displayItems = items.slice(0, maxItems);
|
|
6379
6376
|
const remainingCount = items.length - maxItems;
|
|
6380
6377
|
return `
|
|
6381
6378
|
<!-- Items List -->
|
|
6382
|
-
<mj-section padding="0 32px
|
|
6379
|
+
<mj-section padding="0 32px 18px 32px">
|
|
6383
6380
|
<mj-column>
|
|
6384
6381
|
<mj-text padding="0">
|
|
6385
6382
|
<table style="width: 100%; border-collapse: collapse;">
|
|
@@ -6389,7 +6386,6 @@ function generateNotificationEmail(options) {
|
|
|
6389
6386
|
<td style="padding: 0 0 8px 0;">
|
|
6390
6387
|
<table style="width: 100%; border-collapse: collapse; background-color: #F9FAFB; border-radius: 6px; overflow: hidden;">
|
|
6391
6388
|
<tr>
|
|
6392
|
-
<td style="width: 6px; background-color: #5ECFB1; border-radius: 10px;"></td>
|
|
6393
6389
|
<td style="padding: 16px;">
|
|
6394
6390
|
<span style="color: #1F2937; font-size: 14px; line-height: 1.5;">${item.message}</span>
|
|
6395
6391
|
</td>
|