@wix/auto_sdk_ecom_current-cart-v-2 1.0.31 → 1.0.32

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.
@@ -1986,7 +1986,7 @@ interface LineItem {
1986
1986
  }
1987
1987
  interface CreateCurrentCartRequest {
1988
1988
  /** Cart to be created. */
1989
- cart: Cart;
1989
+ cart?: Cart;
1990
1990
  /**
1991
1991
  * A list of catalog items to add to the cart.
1992
1992
  * @maxSize 300
@@ -2915,6 +2915,8 @@ interface HeadersEntry {
2915
2915
  value?: string;
2916
2916
  }
2917
2917
  interface CreateCurrentCartOptions {
2918
+ /** Cart to be created. */
2919
+ cart?: Cart;
2918
2920
  /**
2919
2921
  * A list of catalog items to add to the cart.
2920
2922
  * @maxSize 300
@@ -1083,11 +1083,11 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
1083
1083
  WebhookIdentityType2["APP"] = "APP";
1084
1084
  return WebhookIdentityType2;
1085
1085
  })(WebhookIdentityType || {});
1086
- async function createCurrentCart2(cart, options) {
1087
- const { httpClient, sideEffects } = arguments[2];
1086
+ async function createCurrentCart2(options) {
1087
+ const { httpClient, sideEffects } = arguments[1];
1088
1088
  const payload = transformPaths2(
1089
1089
  renameKeysFromSDKRequestToRESTRequest({
1090
- cart,
1090
+ cart: options?.cart,
1091
1091
  catalogItems: options?.catalogItems,
1092
1092
  customItems: options?.customItems,
1093
1093
  couponCodes: options?.couponCodes,
@@ -1153,16 +1153,16 @@ async function createCurrentCart2(cart, options) {
1153
1153
  {
1154
1154
  spreadPathsToArguments: {},
1155
1155
  explicitPathsToArguments: {
1156
- cart: "$[0]",
1157
- catalogItems: "$[1].catalogItems",
1158
- customItems: "$[1].customItems",
1159
- couponCodes: "$[1].couponCodes",
1160
- deliveryMethod: "$[1].deliveryMethod",
1161
- giftCardCodes: "$[1].giftCardCodes"
1156
+ cart: "$[0].cart",
1157
+ catalogItems: "$[0].catalogItems",
1158
+ customItems: "$[0].customItems",
1159
+ couponCodes: "$[0].couponCodes",
1160
+ deliveryMethod: "$[0].deliveryMethod",
1161
+ giftCardCodes: "$[0].giftCardCodes"
1162
1162
  },
1163
1163
  singleArgumentUnchanged: false
1164
1164
  },
1165
- ["cart", "options"]
1165
+ ["options"]
1166
1166
  );
1167
1167
  sideEffects?.onError?.(err);
1168
1168
  throw transformedError;
@@ -1784,8 +1784,7 @@ async function removeGiftCardFromCurrentCart2(giftCardId) {
1784
1784
 
1785
1785
  // src/ecom-v2-cart-current-cart-v-2.public.ts
1786
1786
  function createCurrentCart3(httpClient) {
1787
- return (cart, options) => createCurrentCart2(
1788
- cart,
1787
+ return (options) => createCurrentCart2(
1789
1788
  options,
1790
1789
  // @ts-ignore
1791
1790
  { httpClient }