@etainabl/nodejs-sdk 1.3.191 → 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 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-text align="center" font-size="24px" font-weight="700" color="#FFFFFF" padding="0">
6334
- ETAINABL
6335
- </mj-text>
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 8px 32px">
6365
+ <mj-section padding="0 32px 18px 32px">
6360
6366
  <mj-column>
6361
- <mj-text font-size="24px" font-weight="600" color="#1F2937" line-height="1.3" padding="0">
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 24px 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>
@@ -9115,7 +9111,8 @@ var wasteCategories = [
9115
9111
  { name: "Wood", type: "Recyclable" },
9116
9112
  { name: "Metal", type: "Recyclable" },
9117
9113
  { name: "Furniture", type: "Recyclable" },
9118
- { name: "Meals Donated", type: "N/A" }
9114
+ { name: "Meals Donated", type: "N/A" },
9115
+ { name: "Cardboard", type: "Recyclable" }
9119
9116
  ];
9120
9117
  var utilityTypes = [
9121
9118
  { name: "Electricity", value: "electricity", icon: "fa-plug", color: "text-warning" },
@@ -9138,7 +9135,12 @@ var utilityTypes = [
9138
9135
  { name: "Other", value: "other", icon: "fa-meter", color: "text-muted" }
9139
9136
  ];
9140
9137
  var units = [
9141
- { name: "kWh", value: "kwh", types: ["electricity", "gas", "solar", "heating", "cooling"], defaultTypes: ["electricity", "gas", "solar", "heating", "cooling"] },
9138
+ {
9139
+ name: "kWh",
9140
+ value: "kwh",
9141
+ types: ["electricity", "gas", "solar", "heating", "cooling"],
9142
+ defaultTypes: ["electricity", "gas", "solar", "heating", "cooling"]
9143
+ },
9142
9144
  { name: "m3 (Cubic Meters)", value: "m3", types: ["gas", "water"], defaultTypes: ["water"] },
9143
9145
  { name: "hcf (Hundred Cubic Feet)", value: "hcf", types: ["gas"] },
9144
9146
  { name: "ft3 (Cubic Feet)", value: "ft3", types: ["gas"] },