@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/cjs/index.js
CHANGED
|
@@ -1212,9 +1212,9 @@ async function createCurrentCart2(options) {
|
|
|
1212
1212
|
cart: options?.cart,
|
|
1213
1213
|
catalogItems: options?.catalogItems,
|
|
1214
1214
|
customItems: options?.customItems,
|
|
1215
|
-
|
|
1215
|
+
coupons: options?.coupons,
|
|
1216
1216
|
deliveryMethod: options?.deliveryMethod,
|
|
1217
|
-
|
|
1217
|
+
giftCards: options?.giftCards
|
|
1218
1218
|
}),
|
|
1219
1219
|
[
|
|
1220
1220
|
{
|
|
@@ -1278,9 +1278,9 @@ async function createCurrentCart2(options) {
|
|
|
1278
1278
|
cart: "$[0].cart",
|
|
1279
1279
|
catalogItems: "$[0].catalogItems",
|
|
1280
1280
|
customItems: "$[0].customItems",
|
|
1281
|
-
|
|
1281
|
+
coupons: "$[0].coupons",
|
|
1282
1282
|
deliveryMethod: "$[0].deliveryMethod",
|
|
1283
|
-
|
|
1283
|
+
giftCards: "$[0].giftCards"
|
|
1284
1284
|
},
|
|
1285
1285
|
singleArgumentUnchanged: false
|
|
1286
1286
|
},
|
|
@@ -1675,11 +1675,9 @@ async function updateLineItemsInCurrentCart2(options) {
|
|
|
1675
1675
|
throw transformedError;
|
|
1676
1676
|
}
|
|
1677
1677
|
}
|
|
1678
|
-
async function addCouponToCurrentCart2(
|
|
1678
|
+
async function addCouponToCurrentCart2(coupon) {
|
|
1679
1679
|
const { httpClient, sideEffects } = arguments[1];
|
|
1680
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1681
|
-
couponCode
|
|
1682
|
-
});
|
|
1680
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ coupon });
|
|
1683
1681
|
const reqOpts = addCouponToCurrentCart(payload);
|
|
1684
1682
|
sideEffects?.onSiteCall?.();
|
|
1685
1683
|
try {
|
|
@@ -1712,10 +1710,10 @@ async function addCouponToCurrentCart2(couponCode) {
|
|
|
1712
1710
|
err,
|
|
1713
1711
|
{
|
|
1714
1712
|
spreadPathsToArguments: {},
|
|
1715
|
-
explicitPathsToArguments: {
|
|
1713
|
+
explicitPathsToArguments: { coupon: "$[0]" },
|
|
1716
1714
|
singleArgumentUnchanged: false
|
|
1717
1715
|
},
|
|
1718
|
-
["
|
|
1716
|
+
["coupon"]
|
|
1719
1717
|
);
|
|
1720
1718
|
sideEffects?.onError?.(err);
|
|
1721
1719
|
throw transformedError;
|
|
@@ -1811,11 +1809,9 @@ async function setDeliveryMethodForCurrentCart2(deliveryMethod) {
|
|
|
1811
1809
|
throw transformedError;
|
|
1812
1810
|
}
|
|
1813
1811
|
}
|
|
1814
|
-
async function addGiftCardToCurrentCart2(
|
|
1812
|
+
async function addGiftCardToCurrentCart2(giftCard) {
|
|
1815
1813
|
const { httpClient, sideEffects } = arguments[1];
|
|
1816
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1817
|
-
giftCardCode
|
|
1818
|
-
});
|
|
1814
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ giftCard });
|
|
1819
1815
|
const reqOpts = addGiftCardToCurrentCart(payload);
|
|
1820
1816
|
sideEffects?.onSiteCall?.();
|
|
1821
1817
|
try {
|
|
@@ -1848,10 +1844,10 @@ async function addGiftCardToCurrentCart2(giftCardCode) {
|
|
|
1848
1844
|
err,
|
|
1849
1845
|
{
|
|
1850
1846
|
spreadPathsToArguments: {},
|
|
1851
|
-
explicitPathsToArguments: {
|
|
1847
|
+
explicitPathsToArguments: { giftCard: "$[0]" },
|
|
1852
1848
|
singleArgumentUnchanged: false
|
|
1853
1849
|
},
|
|
1854
|
-
["
|
|
1850
|
+
["giftCard"]
|
|
1855
1851
|
);
|
|
1856
1852
|
sideEffects?.onError?.(err);
|
|
1857
1853
|
throw transformedError;
|
|
@@ -1966,8 +1962,8 @@ function updateLineItemsInCurrentCart3(httpClient) {
|
|
|
1966
1962
|
);
|
|
1967
1963
|
}
|
|
1968
1964
|
function addCouponToCurrentCart3(httpClient) {
|
|
1969
|
-
return (
|
|
1970
|
-
|
|
1965
|
+
return (coupon) => addCouponToCurrentCart2(
|
|
1966
|
+
coupon,
|
|
1971
1967
|
// @ts-ignore
|
|
1972
1968
|
{ httpClient }
|
|
1973
1969
|
);
|
|
@@ -1987,8 +1983,8 @@ function setDeliveryMethodForCurrentCart3(httpClient) {
|
|
|
1987
1983
|
);
|
|
1988
1984
|
}
|
|
1989
1985
|
function addGiftCardToCurrentCart3(httpClient) {
|
|
1990
|
-
return (
|
|
1991
|
-
|
|
1986
|
+
return (giftCard) => addGiftCardToCurrentCart2(
|
|
1987
|
+
giftCard,
|
|
1992
1988
|
// @ts-ignore
|
|
1993
1989
|
{ httpClient }
|
|
1994
1990
|
);
|