@wix/auto_sdk_ecom_current-cart-v-2 1.0.39 → 1.0.41
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/build/cjs/index.d.ts +90 -3918
- package/build/cjs/index.js +16 -20
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +4140 -1
- package/build/cjs/index.typings.js +12 -16
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +32 -29
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +90 -3918
- package/build/es/index.mjs +16 -20
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +4140 -1
- package/build/es/index.typings.mjs +12 -16
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +32 -29
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +4 -32
- package/build/internal/cjs/index.js +16 -20
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +54 -54
- package/build/internal/cjs/index.typings.js +12 -16
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +30 -28
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +4 -32
- package/build/internal/es/index.mjs +16 -20
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +54 -54
- package/build/internal/es/index.typings.mjs +12 -16
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +30 -28
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
package/build/es/index.mjs
CHANGED
|
@@ -1148,9 +1148,9 @@ async function createCurrentCart2(options) {
|
|
|
1148
1148
|
cart: options?.cart,
|
|
1149
1149
|
catalogItems: options?.catalogItems,
|
|
1150
1150
|
customItems: options?.customItems,
|
|
1151
|
-
|
|
1151
|
+
coupons: options?.coupons,
|
|
1152
1152
|
deliveryMethod: options?.deliveryMethod,
|
|
1153
|
-
|
|
1153
|
+
giftCards: options?.giftCards
|
|
1154
1154
|
}),
|
|
1155
1155
|
[
|
|
1156
1156
|
{
|
|
@@ -1214,9 +1214,9 @@ async function createCurrentCart2(options) {
|
|
|
1214
1214
|
cart: "$[0].cart",
|
|
1215
1215
|
catalogItems: "$[0].catalogItems",
|
|
1216
1216
|
customItems: "$[0].customItems",
|
|
1217
|
-
|
|
1217
|
+
coupons: "$[0].coupons",
|
|
1218
1218
|
deliveryMethod: "$[0].deliveryMethod",
|
|
1219
|
-
|
|
1219
|
+
giftCards: "$[0].giftCards"
|
|
1220
1220
|
},
|
|
1221
1221
|
singleArgumentUnchanged: false
|
|
1222
1222
|
},
|
|
@@ -1611,11 +1611,9 @@ async function updateLineItemsInCurrentCart2(options) {
|
|
|
1611
1611
|
throw transformedError;
|
|
1612
1612
|
}
|
|
1613
1613
|
}
|
|
1614
|
-
async function addCouponToCurrentCart2(
|
|
1614
|
+
async function addCouponToCurrentCart2(coupon) {
|
|
1615
1615
|
const { httpClient, sideEffects } = arguments[1];
|
|
1616
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1617
|
-
couponCode
|
|
1618
|
-
});
|
|
1616
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({ coupon });
|
|
1619
1617
|
const reqOpts = addCouponToCurrentCart(payload);
|
|
1620
1618
|
sideEffects?.onSiteCall?.();
|
|
1621
1619
|
try {
|
|
@@ -1648,10 +1646,10 @@ async function addCouponToCurrentCart2(couponCode) {
|
|
|
1648
1646
|
err,
|
|
1649
1647
|
{
|
|
1650
1648
|
spreadPathsToArguments: {},
|
|
1651
|
-
explicitPathsToArguments: {
|
|
1649
|
+
explicitPathsToArguments: { coupon: "$[0]" },
|
|
1652
1650
|
singleArgumentUnchanged: false
|
|
1653
1651
|
},
|
|
1654
|
-
["
|
|
1652
|
+
["coupon"]
|
|
1655
1653
|
);
|
|
1656
1654
|
sideEffects?.onError?.(err);
|
|
1657
1655
|
throw transformedError;
|
|
@@ -1747,11 +1745,9 @@ async function setDeliveryMethodForCurrentCart2(deliveryMethod) {
|
|
|
1747
1745
|
throw transformedError;
|
|
1748
1746
|
}
|
|
1749
1747
|
}
|
|
1750
|
-
async function addGiftCardToCurrentCart2(
|
|
1748
|
+
async function addGiftCardToCurrentCart2(giftCard) {
|
|
1751
1749
|
const { httpClient, sideEffects } = arguments[1];
|
|
1752
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1753
|
-
giftCardCode
|
|
1754
|
-
});
|
|
1750
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({ giftCard });
|
|
1755
1751
|
const reqOpts = addGiftCardToCurrentCart(payload);
|
|
1756
1752
|
sideEffects?.onSiteCall?.();
|
|
1757
1753
|
try {
|
|
@@ -1784,10 +1780,10 @@ async function addGiftCardToCurrentCart2(giftCardCode) {
|
|
|
1784
1780
|
err,
|
|
1785
1781
|
{
|
|
1786
1782
|
spreadPathsToArguments: {},
|
|
1787
|
-
explicitPathsToArguments: {
|
|
1783
|
+
explicitPathsToArguments: { giftCard: "$[0]" },
|
|
1788
1784
|
singleArgumentUnchanged: false
|
|
1789
1785
|
},
|
|
1790
|
-
["
|
|
1786
|
+
["giftCard"]
|
|
1791
1787
|
);
|
|
1792
1788
|
sideEffects?.onError?.(err);
|
|
1793
1789
|
throw transformedError;
|
|
@@ -1902,8 +1898,8 @@ function updateLineItemsInCurrentCart3(httpClient) {
|
|
|
1902
1898
|
);
|
|
1903
1899
|
}
|
|
1904
1900
|
function addCouponToCurrentCart3(httpClient) {
|
|
1905
|
-
return (
|
|
1906
|
-
|
|
1901
|
+
return (coupon) => addCouponToCurrentCart2(
|
|
1902
|
+
coupon,
|
|
1907
1903
|
// @ts-ignore
|
|
1908
1904
|
{ httpClient }
|
|
1909
1905
|
);
|
|
@@ -1923,8 +1919,8 @@ function setDeliveryMethodForCurrentCart3(httpClient) {
|
|
|
1923
1919
|
);
|
|
1924
1920
|
}
|
|
1925
1921
|
function addGiftCardToCurrentCart3(httpClient) {
|
|
1926
|
-
return (
|
|
1927
|
-
|
|
1922
|
+
return (giftCard) => addGiftCardToCurrentCart2(
|
|
1923
|
+
giftCard,
|
|
1928
1924
|
// @ts-ignore
|
|
1929
1925
|
{ httpClient }
|
|
1930
1926
|
);
|