@anker-in/shopify-sdk 0.1.1-beta.17 → 0.1.1-beta.19
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/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -10280,6 +10280,7 @@ interface NormalizedCart {
|
|
|
10280
10280
|
code: string;
|
|
10281
10281
|
}>;
|
|
10282
10282
|
discountAllocations?: Array<{
|
|
10283
|
+
title: string;
|
|
10283
10284
|
code: string;
|
|
10284
10285
|
amount: number;
|
|
10285
10286
|
}>;
|
package/dist/index.d.ts
CHANGED
|
@@ -10280,6 +10280,7 @@ interface NormalizedCart {
|
|
|
10280
10280
|
code: string;
|
|
10281
10281
|
}>;
|
|
10282
10282
|
discountAllocations?: Array<{
|
|
10283
|
+
title: string;
|
|
10283
10284
|
code: string;
|
|
10284
10285
|
amount: number;
|
|
10285
10286
|
}>;
|
package/dist/index.js
CHANGED
|
@@ -1382,7 +1382,8 @@ function normalizeLineItem(line) {
|
|
|
1382
1382
|
totalAmount: cost?.totalAmount?.amount || 0,
|
|
1383
1383
|
subtotalAmount: cost?.subtotalAmount?.amount || 0,
|
|
1384
1384
|
discountAllocations: discountAllocations?.map((item) => ({
|
|
1385
|
-
|
|
1385
|
+
title: item?.title || "",
|
|
1386
|
+
code: item?.code || "",
|
|
1386
1387
|
amount: item?.discountedAmount?.amount || 0
|
|
1387
1388
|
})) || [],
|
|
1388
1389
|
customAttributes: attributes?.filter((item) => item.key && item.value).map((item) => ({ key: item.key, value: item.value || "" })) || [],
|
|
@@ -1449,7 +1450,8 @@ function normalizeCart(cart) {
|
|
|
1449
1450
|
orderDiscounts,
|
|
1450
1451
|
discountCodes: cart.discountCodes || [],
|
|
1451
1452
|
discountAllocations: cart?.discountAllocations?.map((item) => ({
|
|
1452
|
-
|
|
1453
|
+
title: item?.title || "",
|
|
1454
|
+
code: item?.code || "",
|
|
1453
1455
|
amount: Number(item?.discountedAmount?.amount || 0)
|
|
1454
1456
|
})) || [],
|
|
1455
1457
|
// Map delivery amount from cart cost
|