@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 +21 -19
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +21 -19
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -53,6 +53,9 @@ declare const wasteCategories: readonly [{
|
|
|
53
53
|
}, {
|
|
54
54
|
readonly name: "Meals Donated";
|
|
55
55
|
readonly type: "N/A";
|
|
56
|
+
}, {
|
|
57
|
+
readonly name: "Cardboard";
|
|
58
|
+
readonly type: "Recyclable";
|
|
56
59
|
}];
|
|
57
60
|
declare const utilityTypes: readonly [{
|
|
58
61
|
readonly name: "Electricity";
|
package/dist/index.d.ts
CHANGED
|
@@ -53,6 +53,9 @@ declare const wasteCategories: readonly [{
|
|
|
53
53
|
}, {
|
|
54
54
|
readonly name: "Meals Donated";
|
|
55
55
|
readonly type: "N/A";
|
|
56
|
+
}, {
|
|
57
|
+
readonly name: "Cardboard";
|
|
58
|
+
readonly type: "Recyclable";
|
|
56
59
|
}];
|
|
57
60
|
declare const utilityTypes: readonly [{
|
|
58
61
|
readonly name: "Electricity";
|
package/dist/index.js
CHANGED
|
@@ -22862,6 +22862,9 @@ function generateNotificationEmail(options) {
|
|
|
22862
22862
|
if (!process.env.ETAINABL_UI_URL) {
|
|
22863
22863
|
throw new Error("ETAINABL_UI_URL environment variable is not set");
|
|
22864
22864
|
}
|
|
22865
|
+
if (!process.env.ETAINABL_PUBLIC_ASSETS_URL) {
|
|
22866
|
+
throw new Error("ETAINABL_PUBLIC_ASSETS_URL environment variable is not set");
|
|
22867
|
+
}
|
|
22865
22868
|
const { title, message, category = "Notification", actions = [], metadata = {}, items = [] } = options;
|
|
22866
22869
|
const isSingleItem = items.length === 1;
|
|
22867
22870
|
const hasMultipleItems = items.length > 1;
|
|
@@ -22906,11 +22909,14 @@ function generateNotificationEmail(options) {
|
|
|
22906
22909
|
|
|
22907
22910
|
<mj-body background-color="#F3F4F6">
|
|
22908
22911
|
<!-- Header -->
|
|
22909
|
-
<mj-section background-color="#1f303d" padding="20px 0">
|
|
22912
|
+
<mj-section background-color="#1f303d" padding="24px 0 20px 0">
|
|
22910
22913
|
<mj-column>
|
|
22911
|
-
<mj-
|
|
22912
|
-
|
|
22913
|
-
|
|
22914
|
+
<mj-image
|
|
22915
|
+
src="${process.env.ETAINABL_PUBLIC_ASSETS_URL}/email/etainabl_email_logo.png"
|
|
22916
|
+
alt="Etainabl"
|
|
22917
|
+
width="180px"
|
|
22918
|
+
padding="0"
|
|
22919
|
+
/>
|
|
22914
22920
|
</mj-column>
|
|
22915
22921
|
</mj-section>
|
|
22916
22922
|
|
|
@@ -22934,30 +22940,21 @@ function generateNotificationEmail(options) {
|
|
|
22934
22940
|
</mj-section>
|
|
22935
22941
|
|
|
22936
22942
|
<!-- Main Title -->
|
|
22937
|
-
<mj-section padding="0 32px
|
|
22943
|
+
<mj-section padding="0 32px 18px 32px">
|
|
22938
22944
|
<mj-column>
|
|
22939
|
-
<mj-text font-size="
|
|
22945
|
+
<mj-text font-size="${hasMultipleItems ? "18px" : "14px"}" color="#1F2937" padding="0">
|
|
22940
22946
|
${mainTitle}
|
|
22941
22947
|
</mj-text>
|
|
22942
22948
|
</mj-column>
|
|
22943
22949
|
</mj-section>
|
|
22944
22950
|
|
|
22945
|
-
<!-- Subtitle -->
|
|
22946
|
-
<mj-section padding="0 32px 24px 32px">
|
|
22947
|
-
<mj-column>
|
|
22948
|
-
<mj-text font-size="14px" color="#6B7280" padding="0">
|
|
22949
|
-
${subtitle}
|
|
22950
|
-
</mj-text>
|
|
22951
|
-
</mj-column>
|
|
22952
|
-
</mj-section>
|
|
22953
|
-
|
|
22954
22951
|
${hasMultipleItems ? (() => {
|
|
22955
22952
|
const maxItems = 3;
|
|
22956
22953
|
const displayItems = items.slice(0, maxItems);
|
|
22957
22954
|
const remainingCount = items.length - maxItems;
|
|
22958
22955
|
return `
|
|
22959
22956
|
<!-- Items List -->
|
|
22960
|
-
<mj-section padding="0 32px
|
|
22957
|
+
<mj-section padding="0 32px 18px 32px">
|
|
22961
22958
|
<mj-column>
|
|
22962
22959
|
<mj-text padding="0">
|
|
22963
22960
|
<table style="width: 100%; border-collapse: collapse;">
|
|
@@ -22967,7 +22964,6 @@ function generateNotificationEmail(options) {
|
|
|
22967
22964
|
<td style="padding: 0 0 8px 0;">
|
|
22968
22965
|
<table style="width: 100%; border-collapse: collapse; background-color: #F9FAFB; border-radius: 6px; overflow: hidden;">
|
|
22969
22966
|
<tr>
|
|
22970
|
-
<td style="width: 6px; background-color: #5ECFB1; border-radius: 10px;"></td>
|
|
22971
22967
|
<td style="padding: 16px;">
|
|
22972
22968
|
<span style="color: #1F2937; font-size: 14px; line-height: 1.5;">${item.message}</span>
|
|
22973
22969
|
</td>
|
|
@@ -25317,7 +25313,8 @@ var wasteCategories = [
|
|
|
25317
25313
|
{ name: "Wood", type: "Recyclable" },
|
|
25318
25314
|
{ name: "Metal", type: "Recyclable" },
|
|
25319
25315
|
{ name: "Furniture", type: "Recyclable" },
|
|
25320
|
-
{ name: "Meals Donated", type: "N/A" }
|
|
25316
|
+
{ name: "Meals Donated", type: "N/A" },
|
|
25317
|
+
{ name: "Cardboard", type: "Recyclable" }
|
|
25321
25318
|
];
|
|
25322
25319
|
var utilityTypes = [
|
|
25323
25320
|
{ name: "Electricity", value: "electricity", icon: "fa-plug", color: "text-warning" },
|
|
@@ -25340,7 +25337,12 @@ var utilityTypes = [
|
|
|
25340
25337
|
{ name: "Other", value: "other", icon: "fa-meter", color: "text-muted" }
|
|
25341
25338
|
];
|
|
25342
25339
|
var units = [
|
|
25343
|
-
{
|
|
25340
|
+
{
|
|
25341
|
+
name: "kWh",
|
|
25342
|
+
value: "kwh",
|
|
25343
|
+
types: ["electricity", "gas", "solar", "heating", "cooling"],
|
|
25344
|
+
defaultTypes: ["electricity", "gas", "solar", "heating", "cooling"]
|
|
25345
|
+
},
|
|
25344
25346
|
{ name: "m3 (Cubic Meters)", value: "m3", types: ["gas", "water"], defaultTypes: ["water"] },
|
|
25345
25347
|
{ name: "hcf (Hundred Cubic Feet)", value: "hcf", types: ["gas"] },
|
|
25346
25348
|
{ name: "ft3 (Cubic Feet)", value: "ft3", types: ["gas"] },
|