// src/ecom-v2-cart-cart-v-2.universal.ts
import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
import {
  renameKeysFromSDKRequestToRESTRequest,
  renameKeysFromRESTResponseToSDKResponse
} from "@wix/sdk-runtime/rename-all-nested-keys";

// src/ecom-v2-cart-cart-v-2.http.ts
import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
import { transformSDKFloatToRESTFloat } from "@wix/sdk-runtime/transformations/float";
import { transformRESTFloatToSDKFloat } from "@wix/sdk-runtime/transformations/float";
import { transformRESTBytesToSDKBytes } from "@wix/sdk-runtime/transformations/bytes";
import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
import { transformSDKFieldMaskToRESTFieldMask } from "@wix/sdk-runtime/transformations/field-mask";
import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
function resolveWixEcomCartV2CartServiceUrl(opts) {
  const domainToMappings = {
    "api._api_base_domain_": [
      {
        srcPath: "/cart-v2",
        destPath: ""
      }
    ],
    _: [
      {
        srcPath: "/_api/cart-v2",
        destPath: ""
      }
    ],
    "*.dev.wix-code.com": [
      {
        srcPath: "/_api/cart-v2",
        destPath: ""
      }
    ],
    "www._base_domain_": [
      {
        srcPath: "/_api/cart-v2",
        destPath: ""
      }
    ],
    "editor._base_domain_": [
      {
        srcPath: "/_api/cart-v2",
        destPath: ""
      }
    ],
    "blocks._base_domain_": [
      {
        srcPath: "/_api/cart-v2",
        destPath: ""
      }
    ],
    "create.editorx": [
      {
        srcPath: "/_api/cart-v2",
        destPath: ""
      }
    ],
    "apps._base_domain_": [
      {
        srcPath: "/_api/cart-v2",
        destPath: ""
      }
    ],
    "manage._base_domain_": [
      {
        srcPath: "/_api/cart-v2",
        destPath: ""
      }
    ],
    "bo._base_domain_": [
      {
        srcPath: "/_api/cart-v2",
        destPath: ""
      }
    ],
    "wixbo.ai": [
      {
        srcPath: "/_api/cart-v2",
        destPath: ""
      }
    ],
    "wix-bo.com": [
      {
        srcPath: "/_api/cart-v2",
        destPath: ""
      }
    ],
    "www.wixapis.com": [
      {
        srcPath: "/ecom/v2/carts",
        destPath: "/v2/carts"
      }
    ],
    "editor.wixapps.net": [
      {
        srcPath: "/_api/cart-v2",
        destPath: ""
      }
    ]
  };
  return resolveUrl(Object.assign(opts, { domainToMappings }));
}
var PACKAGE_NAME = "@wix/auto_sdk_ecom_cart-v-2";
function createCart(payload) {
  function __createCart({ host }) {
    const serializedData = transformPaths(payload, [
      {
        transformFn: transformSDKTimestampToRESTTimestamp,
        paths: [
          { path: "cart.createdDate" },
          { path: "cart.updatedDate" },
          {
            path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
          },
          { path: "cart.lineItems.attributes.image.urlExpirationDate" },
          {
            path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
          },
          { path: "cart.lineItems.attributes.serviceProperties.scheduledDate" },
          { path: "cart.lineItems.attributes.serviceProperties.endDate" },
          {
            path: "catalogItems.catalogOverrideFields.image.urlExpirationDate"
          },
          { path: "customItems.attributes.image.urlExpirationDate" },
          { path: "customItems.attributes.serviceProperties.scheduledDate" },
          { path: "customItems.attributes.serviceProperties.endDate" },
          {
            path: "customItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
          }
        ]
      },
      {
        transformFn: transformSDKFloatToRESTFloat,
        paths: [
          {
            path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
          },
          { path: "cart.lineItems.attributes.physicalProperties.weight" },
          { path: "cart.deliveryInfo.address.geocode.latitude" },
          { path: "cart.deliveryInfo.address.geocode.longitude" },
          { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
          { path: "cart.paymentInfo.billingAddress.geocode.longitude" },
          { path: "cart.legacyFields.discounts.merchantDiscount.percentage" },
          { path: "cart.tcAppliedDiscounts.merchantDiscount.percentage" },
          {
            path: "catalogItems.catalogOverrideFields.physicalProperties.weight"
          },
          { path: "customItems.attributes.physicalProperties.weight" }
        ]
      }
    ]);
    const metadata = {
      entityFqdn: "wix.ecom.v2.cart",
      method: "POST",
      methodFqn: "wix.ecom.cart.v2.CartService.CreateCart",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixEcomCartV2CartServiceUrl({
        protoPath: "/v2/carts",
        data: serializedData,
        host
      }),
      data: serializedData,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "cart.createdDate" },
            { path: "cart.updatedDate" },
            {
              path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
            },
            { path: "cart.lineItems.attributes.image.urlExpirationDate" },
            {
              path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
            },
            {
              path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
            },
            { path: "cart.lineItems.attributes.serviceProperties.endDate" }
          ]
        },
        {
          transformFn: transformRESTFloatToSDKFloat,
          paths: [
            {
              path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
            },
            { path: "cart.lineItems.attributes.physicalProperties.weight" },
            { path: "cart.deliveryInfo.address.geocode.latitude" },
            { path: "cart.deliveryInfo.address.geocode.longitude" },
            { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
            { path: "cart.paymentInfo.billingAddress.geocode.longitude" },
            {
              path: "cart.legacyFields.discounts.merchantDiscount.percentage"
            },
            { path: "cart.tcAppliedDiscounts.merchantDiscount.percentage" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __createCart;
}
function getCart(payload) {
  function __getCart({ host }) {
    const metadata = {
      entityFqdn: "wix.ecom.v2.cart",
      method: "GET",
      methodFqn: "wix.ecom.cart.v2.CartService.GetCart",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixEcomCartV2CartServiceUrl({
        protoPath: "/v2/carts/{cartId}",
        data: payload,
        host
      }),
      params: toURLSearchParams(payload),
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "cart.createdDate" },
            { path: "cart.updatedDate" },
            {
              path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
            },
            { path: "cart.lineItems.attributes.image.urlExpirationDate" },
            {
              path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
            },
            {
              path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
            },
            { path: "cart.lineItems.attributes.serviceProperties.endDate" }
          ]
        },
        {
          transformFn: transformRESTFloatToSDKFloat,
          paths: [
            {
              path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
            },
            { path: "cart.lineItems.attributes.physicalProperties.weight" },
            { path: "cart.deliveryInfo.address.geocode.latitude" },
            { path: "cart.deliveryInfo.address.geocode.longitude" },
            { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
            { path: "cart.paymentInfo.billingAddress.geocode.longitude" },
            {
              path: "cart.legacyFields.discounts.merchantDiscount.percentage"
            },
            { path: "cart.tcAppliedDiscounts.merchantDiscount.percentage" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __getCart;
}
function updateCart(payload) {
  function __updateCart({ host }) {
    const serializedData = transformPaths(payload, [
      {
        transformFn: transformSDKFieldMaskToRESTFieldMask,
        paths: [{ path: "fieldMask" }]
      },
      {
        transformFn: transformSDKTimestampToRESTTimestamp,
        paths: [
          { path: "cart.createdDate" },
          { path: "cart.updatedDate" },
          {
            path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
          },
          { path: "cart.lineItems.attributes.image.urlExpirationDate" },
          {
            path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
          },
          { path: "cart.lineItems.attributes.serviceProperties.scheduledDate" },
          { path: "cart.lineItems.attributes.serviceProperties.endDate" }
        ]
      },
      {
        transformFn: transformSDKFloatToRESTFloat,
        paths: [
          {
            path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
          },
          { path: "cart.lineItems.attributes.physicalProperties.weight" },
          { path: "cart.deliveryInfo.address.geocode.latitude" },
          { path: "cart.deliveryInfo.address.geocode.longitude" },
          { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
          { path: "cart.paymentInfo.billingAddress.geocode.longitude" },
          { path: "cart.legacyFields.discounts.merchantDiscount.percentage" },
          { path: "cart.tcAppliedDiscounts.merchantDiscount.percentage" }
        ]
      }
    ]);
    const metadata = {
      entityFqdn: "wix.ecom.v2.cart",
      method: "PATCH",
      methodFqn: "wix.ecom.cart.v2.CartService.UpdateCart",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixEcomCartV2CartServiceUrl({
        protoPath: "/v2/carts/{cart.id}",
        data: serializedData,
        host
      }),
      data: serializedData,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "cart.createdDate" },
            { path: "cart.updatedDate" },
            {
              path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
            },
            { path: "cart.lineItems.attributes.image.urlExpirationDate" },
            {
              path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
            },
            {
              path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
            },
            { path: "cart.lineItems.attributes.serviceProperties.endDate" }
          ]
        },
        {
          transformFn: transformRESTFloatToSDKFloat,
          paths: [
            {
              path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
            },
            { path: "cart.lineItems.attributes.physicalProperties.weight" },
            { path: "cart.deliveryInfo.address.geocode.latitude" },
            { path: "cart.deliveryInfo.address.geocode.longitude" },
            { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
            { path: "cart.paymentInfo.billingAddress.geocode.longitude" },
            {
              path: "cart.legacyFields.discounts.merchantDiscount.percentage"
            },
            { path: "cart.tcAppliedDiscounts.merchantDiscount.percentage" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __updateCart;
}
function deleteCart(payload) {
  function __deleteCart({ host }) {
    const metadata = {
      entityFqdn: "wix.ecom.v2.cart",
      method: "DELETE",
      methodFqn: "wix.ecom.cart.v2.CartService.DeleteCart",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixEcomCartV2CartServiceUrl({
        protoPath: "/v2/carts/{cartId}",
        data: payload,
        host
      }),
      params: toURLSearchParams(payload)
    };
    return metadata;
  }
  return __deleteCart;
}
function refreshCart(payload) {
  function __refreshCart({ host }) {
    const metadata = {
      entityFqdn: "wix.ecom.v2.cart",
      method: "POST",
      methodFqn: "wix.ecom.cart.v2.CartService.RefreshCart",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixEcomCartV2CartServiceUrl({
        protoPath: "/v2/carts/{cartId}/refresh",
        data: payload,
        host
      }),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "cart.createdDate" },
            { path: "cart.updatedDate" },
            {
              path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
            },
            { path: "cart.lineItems.attributes.image.urlExpirationDate" },
            {
              path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
            },
            {
              path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
            },
            { path: "cart.lineItems.attributes.serviceProperties.endDate" }
          ]
        },
        {
          transformFn: transformRESTFloatToSDKFloat,
          paths: [
            {
              path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
            },
            { path: "cart.lineItems.attributes.physicalProperties.weight" },
            { path: "cart.deliveryInfo.address.geocode.latitude" },
            { path: "cart.deliveryInfo.address.geocode.longitude" },
            { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
            { path: "cart.paymentInfo.billingAddress.geocode.longitude" },
            {
              path: "cart.legacyFields.discounts.merchantDiscount.percentage"
            },
            { path: "cart.tcAppliedDiscounts.merchantDiscount.percentage" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __refreshCart;
}
function estimateCart(payload) {
  function __estimateCart({ host }) {
    const metadata = {
      entityFqdn: "wix.ecom.v2.cart",
      method: "POST",
      methodFqn: "wix.ecom.cart.v2.CartService.EstimateCart",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixEcomCartV2CartServiceUrl({
        protoPath: "/v2/carts/{cartId}/estimate",
        data: payload,
        host
      }),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "cart.createdDate" },
            { path: "cart.updatedDate" },
            {
              path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
            },
            { path: "cart.lineItems.attributes.image.urlExpirationDate" },
            {
              path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
            },
            {
              path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
            },
            { path: "cart.lineItems.attributes.serviceProperties.endDate" },
            {
              path: "summary.paymentSummary.subscriptionCharges.charges.cycleBillingDate"
            }
          ]
        },
        {
          transformFn: transformRESTFloatToSDKFloat,
          paths: [
            {
              path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
            },
            { path: "cart.lineItems.attributes.physicalProperties.weight" },
            { path: "cart.deliveryInfo.address.geocode.latitude" },
            { path: "cart.deliveryInfo.address.geocode.longitude" },
            { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
            { path: "cart.paymentInfo.billingAddress.geocode.longitude" },
            {
              path: "cart.legacyFields.discounts.merchantDiscount.percentage"
            },
            { path: "cart.tcAppliedDiscounts.merchantDiscount.percentage" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __estimateCart;
}
function calculateCart(payload) {
  function __calculateCart({ host }) {
    const metadata = {
      entityFqdn: "wix.ecom.v2.cart",
      method: "POST",
      methodFqn: "wix.ecom.cart.v2.CartService.CalculateCart",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixEcomCartV2CartServiceUrl({
        protoPath: "/v2/carts/{cartId}/calculate",
        data: payload,
        host
      }),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "cart.createdDate" },
            { path: "cart.updatedDate" },
            {
              path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
            },
            { path: "cart.lineItems.attributes.image.urlExpirationDate" },
            {
              path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
            },
            {
              path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
            },
            { path: "cart.lineItems.attributes.serviceProperties.endDate" },
            {
              path: "summary.paymentSummary.subscriptionCharges.charges.cycleBillingDate"
            }
          ]
        },
        {
          transformFn: transformRESTFloatToSDKFloat,
          paths: [
            {
              path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
            },
            { path: "cart.lineItems.attributes.physicalProperties.weight" },
            { path: "cart.deliveryInfo.address.geocode.latitude" },
            { path: "cart.deliveryInfo.address.geocode.longitude" },
            { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
            { path: "cart.paymentInfo.billingAddress.geocode.longitude" },
            {
              path: "cart.legacyFields.discounts.merchantDiscount.percentage"
            },
            { path: "cart.tcAppliedDiscounts.merchantDiscount.percentage" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __calculateCart;
}
function getCheckoutUrl(payload) {
  function __getCheckoutUrl({ host }) {
    const metadata = {
      entityFqdn: "wix.ecom.v2.cart",
      method: "POST",
      methodFqn: "wix.ecom.cart.v2.CartService.GetCheckoutURL",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixEcomCartV2CartServiceUrl({
        protoPath: "/v2/carts/{cartId}/get-checkout-url",
        data: payload,
        host
      }),
      data: payload
    };
    return metadata;
  }
  return __getCheckoutUrl;
}
function placeOrder(payload) {
  function __placeOrder({ host }) {
    const metadata = {
      entityFqdn: "wix.ecom.v2.cart",
      method: "POST",
      methodFqn: "wix.ecom.cart.v2.CartService.PlaceOrder",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixEcomCartV2CartServiceUrl({
        protoPath: "/v2/carts/{cartId}/place-order",
        data: payload,
        host
      }),
      data: payload
    };
    return metadata;
  }
  return __placeOrder;
}
function addLineItems(payload) {
  function __addLineItems({ host }) {
    const serializedData = transformPaths(payload, [
      {
        transformFn: transformSDKFloatToRESTFloat,
        paths: [
          {
            path: "catalogItems.catalogOverrideFields.physicalProperties.weight"
          },
          { path: "customItems.attributes.physicalProperties.weight" }
        ]
      },
      {
        transformFn: transformSDKTimestampToRESTTimestamp,
        paths: [
          {
            path: "catalogItems.catalogOverrideFields.image.urlExpirationDate"
          },
          { path: "customItems.attributes.image.urlExpirationDate" },
          { path: "customItems.attributes.serviceProperties.scheduledDate" },
          { path: "customItems.attributes.serviceProperties.endDate" },
          {
            path: "customItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
          }
        ]
      }
    ]);
    const metadata = {
      entityFqdn: "wix.ecom.v2.cart",
      method: "POST",
      methodFqn: "wix.ecom.cart.v2.CartService.AddLineItems",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixEcomCartV2CartServiceUrl({
        protoPath: "/v2/carts/{cartId}/add-line-items",
        data: serializedData,
        host
      }),
      data: serializedData,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "cart.createdDate" },
            { path: "cart.updatedDate" },
            {
              path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
            },
            { path: "cart.lineItems.attributes.image.urlExpirationDate" },
            {
              path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
            },
            {
              path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
            },
            { path: "cart.lineItems.attributes.serviceProperties.endDate" }
          ]
        },
        {
          transformFn: transformRESTFloatToSDKFloat,
          paths: [
            {
              path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
            },
            { path: "cart.lineItems.attributes.physicalProperties.weight" },
            { path: "cart.deliveryInfo.address.geocode.latitude" },
            { path: "cart.deliveryInfo.address.geocode.longitude" },
            { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
            { path: "cart.paymentInfo.billingAddress.geocode.longitude" },
            {
              path: "cart.legacyFields.discounts.merchantDiscount.percentage"
            },
            { path: "cart.tcAppliedDiscounts.merchantDiscount.percentage" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __addLineItems;
}
function removeLineItems(payload) {
  function __removeLineItems({ host }) {
    const metadata = {
      entityFqdn: "wix.ecom.v2.cart",
      method: "POST",
      methodFqn: "wix.ecom.cart.v2.CartService.RemoveLineItems",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixEcomCartV2CartServiceUrl({
        protoPath: "/v2/carts/{cartId}/remove-line-items",
        data: payload,
        host
      }),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "cart.createdDate" },
            { path: "cart.updatedDate" },
            {
              path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
            },
            { path: "cart.lineItems.attributes.image.urlExpirationDate" },
            {
              path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
            },
            {
              path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
            },
            { path: "cart.lineItems.attributes.serviceProperties.endDate" }
          ]
        },
        {
          transformFn: transformRESTFloatToSDKFloat,
          paths: [
            {
              path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
            },
            { path: "cart.lineItems.attributes.physicalProperties.weight" },
            { path: "cart.deliveryInfo.address.geocode.latitude" },
            { path: "cart.deliveryInfo.address.geocode.longitude" },
            { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
            { path: "cart.paymentInfo.billingAddress.geocode.longitude" },
            {
              path: "cart.legacyFields.discounts.merchantDiscount.percentage"
            },
            { path: "cart.tcAppliedDiscounts.merchantDiscount.percentage" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __removeLineItems;
}
function updateLineItems(payload) {
  function __updateLineItems({ host }) {
    const metadata = {
      entityFqdn: "wix.ecom.v2.cart",
      method: "POST",
      methodFqn: "wix.ecom.cart.v2.CartService.UpdateLineItems",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixEcomCartV2CartServiceUrl({
        protoPath: "/v2/carts/{cartId}/update-line-items",
        data: payload,
        host
      }),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "cart.createdDate" },
            { path: "cart.updatedDate" },
            {
              path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
            },
            { path: "cart.lineItems.attributes.image.urlExpirationDate" },
            {
              path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
            },
            {
              path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
            },
            { path: "cart.lineItems.attributes.serviceProperties.endDate" }
          ]
        },
        {
          transformFn: transformRESTFloatToSDKFloat,
          paths: [
            {
              path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
            },
            { path: "cart.lineItems.attributes.physicalProperties.weight" },
            { path: "cart.deliveryInfo.address.geocode.latitude" },
            { path: "cart.deliveryInfo.address.geocode.longitude" },
            { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
            { path: "cart.paymentInfo.billingAddress.geocode.longitude" },
            {
              path: "cart.legacyFields.discounts.merchantDiscount.percentage"
            },
            { path: "cart.tcAppliedDiscounts.merchantDiscount.percentage" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __updateLineItems;
}
function addCoupon(payload) {
  function __addCoupon({ host }) {
    const metadata = {
      entityFqdn: "wix.ecom.v2.cart",
      method: "POST",
      methodFqn: "wix.ecom.cart.v2.CartService.AddCoupon",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixEcomCartV2CartServiceUrl({
        protoPath: "/v2/carts/{cartId}/add-coupon",
        data: payload,
        host
      }),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "cart.createdDate" },
            { path: "cart.updatedDate" },
            {
              path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
            },
            { path: "cart.lineItems.attributes.image.urlExpirationDate" },
            {
              path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
            },
            {
              path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
            },
            { path: "cart.lineItems.attributes.serviceProperties.endDate" }
          ]
        },
        {
          transformFn: transformRESTFloatToSDKFloat,
          paths: [
            {
              path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
            },
            { path: "cart.lineItems.attributes.physicalProperties.weight" },
            { path: "cart.deliveryInfo.address.geocode.latitude" },
            { path: "cart.deliveryInfo.address.geocode.longitude" },
            { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
            { path: "cart.paymentInfo.billingAddress.geocode.longitude" },
            {
              path: "cart.legacyFields.discounts.merchantDiscount.percentage"
            },
            { path: "cart.tcAppliedDiscounts.merchantDiscount.percentage" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __addCoupon;
}
function removeCoupon(payload) {
  function __removeCoupon({ host }) {
    const metadata = {
      entityFqdn: "wix.ecom.v2.cart",
      method: "POST",
      methodFqn: "wix.ecom.cart.v2.CartService.RemoveCoupon",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixEcomCartV2CartServiceUrl({
        protoPath: "/v2/carts/{cartId}/remove-coupon",
        data: payload,
        host
      }),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "cart.createdDate" },
            { path: "cart.updatedDate" },
            {
              path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
            },
            { path: "cart.lineItems.attributes.image.urlExpirationDate" },
            {
              path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
            },
            {
              path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
            },
            { path: "cart.lineItems.attributes.serviceProperties.endDate" }
          ]
        },
        {
          transformFn: transformRESTFloatToSDKFloat,
          paths: [
            {
              path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
            },
            { path: "cart.lineItems.attributes.physicalProperties.weight" },
            { path: "cart.deliveryInfo.address.geocode.latitude" },
            { path: "cart.deliveryInfo.address.geocode.longitude" },
            { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
            { path: "cart.paymentInfo.billingAddress.geocode.longitude" },
            {
              path: "cart.legacyFields.discounts.merchantDiscount.percentage"
            },
            { path: "cart.tcAppliedDiscounts.merchantDiscount.percentage" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __removeCoupon;
}
function setDeliveryMethod(payload) {
  function __setDeliveryMethod({ host }) {
    const metadata = {
      entityFqdn: "wix.ecom.v2.cart",
      method: "POST",
      methodFqn: "wix.ecom.cart.v2.CartService.SetDeliveryMethod",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixEcomCartV2CartServiceUrl({
        protoPath: "/v2/carts/{cartId}/set-delivery-method",
        data: payload,
        host
      }),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "cart.createdDate" },
            { path: "cart.updatedDate" },
            {
              path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
            },
            { path: "cart.lineItems.attributes.image.urlExpirationDate" },
            {
              path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
            },
            {
              path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
            },
            { path: "cart.lineItems.attributes.serviceProperties.endDate" }
          ]
        },
        {
          transformFn: transformRESTFloatToSDKFloat,
          paths: [
            {
              path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
            },
            { path: "cart.lineItems.attributes.physicalProperties.weight" },
            { path: "cart.deliveryInfo.address.geocode.latitude" },
            { path: "cart.deliveryInfo.address.geocode.longitude" },
            { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
            { path: "cart.paymentInfo.billingAddress.geocode.longitude" },
            {
              path: "cart.legacyFields.discounts.merchantDiscount.percentage"
            },
            { path: "cart.tcAppliedDiscounts.merchantDiscount.percentage" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __setDeliveryMethod;
}
function removeDeliveryMethod(payload) {
  function __removeDeliveryMethod({ host }) {
    const metadata = {
      entityFqdn: "wix.ecom.v2.cart",
      method: "POST",
      methodFqn: "wix.ecom.cart.v2.CartService.RemoveDeliveryMethod",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixEcomCartV2CartServiceUrl({
        protoPath: "/v2/carts/{cartId}/remove-delivery-method",
        data: payload,
        host
      }),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "cart.createdDate" },
            { path: "cart.updatedDate" },
            {
              path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
            },
            { path: "cart.lineItems.attributes.image.urlExpirationDate" },
            {
              path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
            },
            {
              path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
            },
            { path: "cart.lineItems.attributes.serviceProperties.endDate" }
          ]
        },
        {
          transformFn: transformRESTFloatToSDKFloat,
          paths: [
            {
              path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
            },
            { path: "cart.lineItems.attributes.physicalProperties.weight" },
            { path: "cart.deliveryInfo.address.geocode.latitude" },
            { path: "cart.deliveryInfo.address.geocode.longitude" },
            { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
            { path: "cart.paymentInfo.billingAddress.geocode.longitude" },
            {
              path: "cart.legacyFields.discounts.merchantDiscount.percentage"
            },
            { path: "cart.tcAppliedDiscounts.merchantDiscount.percentage" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __removeDeliveryMethod;
}
function addGiftCard(payload) {
  function __addGiftCard({ host }) {
    const metadata = {
      entityFqdn: "wix.ecom.v2.cart",
      method: "POST",
      methodFqn: "wix.ecom.cart.v2.CartService.AddGiftCard",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixEcomCartV2CartServiceUrl({
        protoPath: "/v2/carts/{cartId}/add-gift-card",
        data: payload,
        host
      }),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "cart.createdDate" },
            { path: "cart.updatedDate" },
            {
              path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
            },
            { path: "cart.lineItems.attributes.image.urlExpirationDate" },
            {
              path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
            },
            {
              path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
            },
            { path: "cart.lineItems.attributes.serviceProperties.endDate" }
          ]
        },
        {
          transformFn: transformRESTFloatToSDKFloat,
          paths: [
            {
              path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
            },
            { path: "cart.lineItems.attributes.physicalProperties.weight" },
            { path: "cart.deliveryInfo.address.geocode.latitude" },
            { path: "cart.deliveryInfo.address.geocode.longitude" },
            { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
            { path: "cart.paymentInfo.billingAddress.geocode.longitude" },
            {
              path: "cart.legacyFields.discounts.merchantDiscount.percentage"
            },
            { path: "cart.tcAppliedDiscounts.merchantDiscount.percentage" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __addGiftCard;
}
function removeGiftCard(payload) {
  function __removeGiftCard({ host }) {
    const metadata = {
      entityFqdn: "wix.ecom.v2.cart",
      method: "POST",
      methodFqn: "wix.ecom.cart.v2.CartService.RemoveGiftCard",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixEcomCartV2CartServiceUrl({
        protoPath: "/v2/carts/{cartId}/remove-gift-card",
        data: payload,
        host
      }),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "cart.createdDate" },
            { path: "cart.updatedDate" },
            {
              path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
            },
            { path: "cart.lineItems.attributes.image.urlExpirationDate" },
            {
              path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
            },
            {
              path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
            },
            { path: "cart.lineItems.attributes.serviceProperties.endDate" }
          ]
        },
        {
          transformFn: transformRESTFloatToSDKFloat,
          paths: [
            {
              path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
            },
            { path: "cart.lineItems.attributes.physicalProperties.weight" },
            { path: "cart.deliveryInfo.address.geocode.latitude" },
            { path: "cart.deliveryInfo.address.geocode.longitude" },
            { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
            { path: "cart.paymentInfo.billingAddress.geocode.longitude" },
            {
              path: "cart.legacyFields.discounts.merchantDiscount.percentage"
            },
            { path: "cart.tcAppliedDiscounts.merchantDiscount.percentage" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __removeGiftCard;
}
function markCartAsCompleted(payload) {
  function __markCartAsCompleted({ host }) {
    const metadata = {
      entityFqdn: "wix.ecom.v2.cart",
      method: "POST",
      methodFqn: "wix.ecom.cart.v2.CartService.MarkCartAsCompleted",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixEcomCartV2CartServiceUrl({
        protoPath: "/v2/carts/{cartId}/mark-cart-as-completed",
        data: payload,
        host
      }),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "cart.createdDate" },
            { path: "cart.updatedDate" },
            {
              path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
            },
            { path: "cart.lineItems.attributes.image.urlExpirationDate" },
            {
              path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
            },
            {
              path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
            },
            { path: "cart.lineItems.attributes.serviceProperties.endDate" }
          ]
        },
        {
          transformFn: transformRESTFloatToSDKFloat,
          paths: [
            {
              path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
            },
            { path: "cart.lineItems.attributes.physicalProperties.weight" },
            { path: "cart.deliveryInfo.address.geocode.latitude" },
            { path: "cart.deliveryInfo.address.geocode.longitude" },
            { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
            { path: "cart.paymentInfo.billingAddress.geocode.longitude" },
            {
              path: "cart.legacyFields.discounts.merchantDiscount.percentage"
            },
            { path: "cart.tcAppliedDiscounts.merchantDiscount.percentage" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __markCartAsCompleted;
}
function handleAsyncCheckoutCompletion(payload) {
  function __handleAsyncCheckoutCompletion({ host }) {
    const metadata = {
      entityFqdn: "wix.ecom.v2.cart",
      method: "GET",
      methodFqn: "wix.ecom.cart.v2.CartService.HandleAsyncCheckoutCompletion",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixEcomCartV2CartServiceUrl({
        protoPath: "/v2/carts/handle-async-checkout-completion",
        data: payload,
        host
      }),
      params: toURLSearchParams(payload),
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTBytesToSDKBytes,
          paths: [{ path: "body" }]
        }
      ])
    };
    return metadata;
  }
  return __handleAsyncCheckoutCompletion;
}
function updateFormSubmissions(payload) {
  function __updateFormSubmissions({ host }) {
    const metadata = {
      entityFqdn: "wix.ecom.v2.cart",
      method: "POST",
      methodFqn: "wix.ecom.cart.v2.CartService.UpdateFormSubmissions",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixEcomCartV2CartServiceUrl({
        protoPath: "/v2/carts/{cartId}/update-forms-submission",
        data: payload,
        host
      }),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "cart.createdDate" },
            { path: "cart.updatedDate" },
            {
              path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
            },
            { path: "cart.lineItems.attributes.image.urlExpirationDate" },
            {
              path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
            },
            {
              path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
            },
            { path: "cart.lineItems.attributes.serviceProperties.endDate" }
          ]
        },
        {
          transformFn: transformRESTFloatToSDKFloat,
          paths: [
            {
              path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
            },
            { path: "cart.lineItems.attributes.physicalProperties.weight" },
            { path: "cart.deliveryInfo.address.geocode.latitude" },
            { path: "cart.deliveryInfo.address.geocode.longitude" },
            { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
            { path: "cart.paymentInfo.billingAddress.geocode.longitude" },
            {
              path: "cart.legacyFields.discounts.merchantDiscount.percentage"
            },
            { path: "cart.tcAppliedDiscounts.merchantDiscount.percentage" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __updateFormSubmissions;
}

// src/ecom-v2-cart-cart-v-2.universal.ts
import { transformSDKAddressToRESTAddress } from "@wix/sdk-runtime/transformations/address";
import { transformRESTAddressToSDKAddress } from "@wix/sdk-runtime/transformations/address";
import { transformSDKImageToRESTImage } from "@wix/sdk-runtime/transformations/image";
import { transformRESTImageToSDKImage } from "@wix/sdk-runtime/transformations/image";
import { transformSDKPageURLV2ToRESTPageURLV2 } from "@wix/sdk-runtime/transformations/page-url-v2";
import { transformRESTPageURLV2ToSDKPageURLV2 } from "@wix/sdk-runtime/transformations/page-url-v2";
import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
var DescriptionLineType = /* @__PURE__ */ ((DescriptionLineType2) => {
  DescriptionLineType2["UNRECOGNISED"] = "UNRECOGNISED";
  DescriptionLineType2["PLAIN_TEXT"] = "PLAIN_TEXT";
  DescriptionLineType2["COLOR"] = "COLOR";
  return DescriptionLineType2;
})(DescriptionLineType || {});
var DimensionsUnit = /* @__PURE__ */ ((DimensionsUnit2) => {
  DimensionsUnit2["UNKNOWN_DIMENSIONS_UNIT"] = "UNKNOWN_DIMENSIONS_UNIT";
  DimensionsUnit2["MM"] = "MM";
  DimensionsUnit2["CM"] = "CM";
  DimensionsUnit2["M"] = "M";
  DimensionsUnit2["IN"] = "IN";
  DimensionsUnit2["FT"] = "FT";
  DimensionsUnit2["YD"] = "YD";
  return DimensionsUnit2;
})(DimensionsUnit || {});
var PaymentOptionType = /* @__PURE__ */ ((PaymentOptionType2) => {
  PaymentOptionType2["FULL_PAYMENT_ONLINE"] = "FULL_PAYMENT_ONLINE";
  PaymentOptionType2["FULL_PAYMENT_OFFLINE"] = "FULL_PAYMENT_OFFLINE";
  PaymentOptionType2["MEMBERSHIP"] = "MEMBERSHIP";
  PaymentOptionType2["DEPOSIT_ONLINE"] = "DEPOSIT_ONLINE";
  PaymentOptionType2["MEMBERSHIP_OFFLINE"] = "MEMBERSHIP_OFFLINE";
  PaymentOptionType2["MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER"] = "MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER";
  return PaymentOptionType2;
})(PaymentOptionType || {});
var ItemTypePreset = /* @__PURE__ */ ((ItemTypePreset2) => {
  ItemTypePreset2["UNRECOGNISED"] = "UNRECOGNISED";
  ItemTypePreset2["PHYSICAL"] = "PHYSICAL";
  ItemTypePreset2["DIGITAL"] = "DIGITAL";
  ItemTypePreset2["GIFT_CARD"] = "GIFT_CARD";
  ItemTypePreset2["SERVICE"] = "SERVICE";
  return ItemTypePreset2;
})(ItemTypePreset || {});
var SubscriptionFrequency = /* @__PURE__ */ ((SubscriptionFrequency2) => {
  SubscriptionFrequency2["UNDEFINED"] = "UNDEFINED";
  SubscriptionFrequency2["DAY"] = "DAY";
  SubscriptionFrequency2["WEEK"] = "WEEK";
  SubscriptionFrequency2["MONTH"] = "MONTH";
  SubscriptionFrequency2["YEAR"] = "YEAR";
  return SubscriptionFrequency2;
})(SubscriptionFrequency || {});
var ProductPeriodAlignment = /* @__PURE__ */ ((ProductPeriodAlignment2) => {
  ProductPeriodAlignment2["ALIGNED_WITH_BILLING_PERIOD"] = "ALIGNED_WITH_BILLING_PERIOD";
  ProductPeriodAlignment2["NOT_ALIGNED_WITH_BILLING_PERIOD"] = "NOT_ALIGNED_WITH_BILLING_PERIOD";
  return ProductPeriodAlignment2;
})(ProductPeriodAlignment || {});
var FileType = /* @__PURE__ */ ((FileType2) => {
  FileType2["UNSPECIFIED"] = "UNSPECIFIED";
  FileType2["SECURE_PICTURE"] = "SECURE_PICTURE";
  FileType2["SECURE_VIDEO"] = "SECURE_VIDEO";
  FileType2["SECURE_DOCUMENT"] = "SECURE_DOCUMENT";
  FileType2["SECURE_MUSIC"] = "SECURE_MUSIC";
  FileType2["SECURE_ARCHIVE"] = "SECURE_ARCHIVE";
  FileType2["SECURE_RAW"] = "SECURE_RAW";
  return FileType2;
})(FileType || {});
var TaxableAddressType = /* @__PURE__ */ ((TaxableAddressType2) => {
  TaxableAddressType2["BUSINESS"] = "BUSINESS";
  TaxableAddressType2["BILLING"] = "BILLING";
  TaxableAddressType2["SHIPPING"] = "SHIPPING";
  return TaxableAddressType2;
})(TaxableAddressType || {});
var ItemStatus = /* @__PURE__ */ ((ItemStatus2) => {
  ItemStatus2["IN_STOCK"] = "IN_STOCK";
  ItemStatus2["PARTIALLY_IN_STOCK"] = "PARTIALLY_IN_STOCK";
  ItemStatus2["OUT_OF_STOCK"] = "OUT_OF_STOCK";
  ItemStatus2["REMOVED_FROM_CATALOG"] = "REMOVED_FROM_CATALOG";
  return ItemStatus2;
})(ItemStatus || {});
var DiscountSourceType = /* @__PURE__ */ ((DiscountSourceType2) => {
  DiscountSourceType2["AUTOMATIC_RULE"] = "AUTOMATIC_RULE";
  DiscountSourceType2["COUPON"] = "COUPON";
  return DiscountSourceType2;
})(DiscountSourceType || {});
var ChannelType = /* @__PURE__ */ ((ChannelType2) => {
  ChannelType2["UNSPECIFIED"] = "UNSPECIFIED";
  ChannelType2["WEB"] = "WEB";
  ChannelType2["POS"] = "POS";
  ChannelType2["EBAY"] = "EBAY";
  ChannelType2["AMAZON"] = "AMAZON";
  ChannelType2["OTHER_PLATFORM"] = "OTHER_PLATFORM";
  ChannelType2["WIX_APP_STORE"] = "WIX_APP_STORE";
  ChannelType2["WIX_INVOICES"] = "WIX_INVOICES";
  ChannelType2["BACKOFFICE_MERCHANT"] = "BACKOFFICE_MERCHANT";
  ChannelType2["WISH"] = "WISH";
  ChannelType2["CLASS_PASS"] = "CLASS_PASS";
  ChannelType2["GLOBAL_E"] = "GLOBAL_E";
  ChannelType2["FACEBOOK"] = "FACEBOOK";
  ChannelType2["ETSY"] = "ETSY";
  ChannelType2["TIKTOK"] = "TIKTOK";
  ChannelType2["FAIRE_COM"] = "FAIRE_COM";
  ChannelType2["PAYPAL_AGENTIC_CHECKOUT"] = "PAYPAL_AGENTIC_CHECKOUT";
  ChannelType2["STRIPE_AGENTIC_CHECKOUT"] = "STRIPE_AGENTIC_CHECKOUT";
  ChannelType2["WIX_INVOICES_PLATFORM"] = "WIX_INVOICES_PLATFORM";
  ChannelType2["UCP_AGENTIC_CHECKOUT"] = "UCP_AGENTIC_CHECKOUT";
  return ChannelType2;
})(ChannelType || {});
var VatType = /* @__PURE__ */ ((VatType2) => {
  VatType2["UNSPECIFIED"] = "UNSPECIFIED";
  VatType2["CPF"] = "CPF";
  VatType2["CNPJ"] = "CNPJ";
  return VatType2;
})(VatType || {});
var WeightUnit = /* @__PURE__ */ ((WeightUnit2) => {
  WeightUnit2["UNSPECIFIED_WEIGHT_UNIT"] = "UNSPECIFIED_WEIGHT_UNIT";
  WeightUnit2["KG"] = "KG";
  WeightUnit2["LB"] = "LB";
  return WeightUnit2;
})(WeightUnit || {});
var DiscountScope = /* @__PURE__ */ ((DiscountScope2) => {
  DiscountScope2["UNKNOWN_DISCOUNT_SCOPE"] = "UNKNOWN_DISCOUNT_SCOPE";
  DiscountScope2["CART_SUBTOTAL"] = "CART_SUBTOTAL";
  DiscountScope2["LINE_ITEM"] = "LINE_ITEM";
  DiscountScope2["DELIVERY"] = "DELIVERY";
  return DiscountScope2;
})(DiscountScope || {});
var DiscountType = /* @__PURE__ */ ((DiscountType2) => {
  DiscountType2["GLOBAL"] = "GLOBAL";
  DiscountType2["SPECIFIC_ITEMS"] = "SPECIFIC_ITEMS";
  DiscountType2["SHIPPING"] = "SHIPPING";
  return DiscountType2;
})(DiscountType || {});
var Source = /* @__PURE__ */ ((Source2) => {
  Source2["UNKNOWN_ADDITIONAL_FEE_SOURCE"] = "UNKNOWN_ADDITIONAL_FEE_SOURCE";
  Source2["SERVICE_PLUGIN"] = "SERVICE_PLUGIN";
  Source2["LINE_ITEM"] = "LINE_ITEM";
  Source2["DELIVERY"] = "DELIVERY";
  Source2["PLATFORM"] = "PLATFORM";
  return Source2;
})(Source || {});
var RuleType = /* @__PURE__ */ ((RuleType2) => {
  RuleType2["VALIDATION"] = "VALIDATION";
  RuleType2["OTHER"] = "OTHER";
  RuleType2["MAX"] = "MAX";
  RuleType2["MIN"] = "MIN";
  RuleType2["MAX_LENGTH"] = "MAX_LENGTH";
  RuleType2["MIN_LENGTH"] = "MIN_LENGTH";
  RuleType2["MAX_SIZE"] = "MAX_SIZE";
  RuleType2["MIN_SIZE"] = "MIN_SIZE";
  RuleType2["FORMAT"] = "FORMAT";
  RuleType2["DECIMAL_LTE"] = "DECIMAL_LTE";
  RuleType2["DECIMAL_GTE"] = "DECIMAL_GTE";
  RuleType2["DECIMAL_LT"] = "DECIMAL_LT";
  RuleType2["DECIMAL_GT"] = "DECIMAL_GT";
  RuleType2["DECIMAL_MAX_SCALE"] = "DECIMAL_MAX_SCALE";
  RuleType2["INVALID_ENUM_VALUE"] = "INVALID_ENUM_VALUE";
  RuleType2["REQUIRED_FIELD"] = "REQUIRED_FIELD";
  RuleType2["FIELD_NOT_ALLOWED"] = "FIELD_NOT_ALLOWED";
  RuleType2["ONE_OF_ALIGNMENT"] = "ONE_OF_ALIGNMENT";
  RuleType2["EXACT_LENGTH"] = "EXACT_LENGTH";
  RuleType2["EXACT_SIZE"] = "EXACT_SIZE";
  RuleType2["REQUIRED_ONE_OF_FIELD"] = "REQUIRED_ONE_OF_FIELD";
  return RuleType2;
})(RuleType || {});
var Severity = /* @__PURE__ */ ((Severity2) => {
  Severity2["WARNING"] = "WARNING";
  Severity2["ERROR"] = "ERROR";
  return Severity2;
})(Severity || {});
var NameInOther = /* @__PURE__ */ ((NameInOther2) => {
  NameInOther2["OTHER_DEFAULT"] = "OTHER_DEFAULT";
  return NameInOther2;
})(NameInOther || {});
var NameInLineItem = /* @__PURE__ */ ((NameInLineItem2) => {
  NameInLineItem2["LINE_ITEM_DEFAULT"] = "LINE_ITEM_DEFAULT";
  return NameInLineItem2;
})(NameInLineItem || {});
var SuggestedFix = /* @__PURE__ */ ((SuggestedFix2) => {
  SuggestedFix2["UNKNOWN_SUGGESTED_FIX"] = "UNKNOWN_SUGGESTED_FIX";
  SuggestedFix2["REMOVE_LINE_ITEM"] = "REMOVE_LINE_ITEM";
  return SuggestedFix2;
})(SuggestedFix || {});
var ViolationScope = /* @__PURE__ */ ((ViolationScope2) => {
  ViolationScope2["GLOBAL"] = "GLOBAL";
  ViolationScope2["LINE_ITEM"] = "LINE_ITEM";
  ViolationScope2["DISCOUNT"] = "DISCOUNT";
  ViolationScope2["DELIVERY"] = "DELIVERY";
  ViolationScope2["TAX"] = "TAX";
  ViolationScope2["MEMBERSHIP"] = "MEMBERSHIP";
  ViolationScope2["GIFT_CARD"] = "GIFT_CARD";
  return ViolationScope2;
})(ViolationScope || {});
var ViolationCode = /* @__PURE__ */ ((ViolationCode2) => {
  ViolationCode2["GENERAL_CODE"] = "GENERAL_CODE";
  ViolationCode2["CUSTOM_VALIDATION"] = "CUSTOM_VALIDATION";
  ViolationCode2["EMPTY_CART"] = "EMPTY_CART";
  ViolationCode2["LINE_ITEMS_OUT_OF_STOCK"] = "LINE_ITEMS_OUT_OF_STOCK";
  ViolationCode2["MEMBERS_ONLY_ITEM"] = "MEMBERS_ONLY_ITEM";
  ViolationCode2["INVALID_COUPON_CODE"] = "INVALID_COUPON_CODE";
  ViolationCode2["INVALID_COUPON_STATUS"] = "INVALID_COUPON_STATUS";
  ViolationCode2["CANNOT_APPLY_COUPON_DISCOUNT_WHEN_PURCHASING_GIFT_CARD"] = "CANNOT_APPLY_COUPON_DISCOUNT_WHEN_PURCHASING_GIFT_CARD";
  ViolationCode2["MISSING_DELIVERY_ADDRESS"] = "MISSING_DELIVERY_ADDRESS";
  ViolationCode2["MISSING_DELIVERY_METHOD"] = "MISSING_DELIVERY_METHOD";
  ViolationCode2["DELIVERY_METHOD_NO_LONGER_AVAILABLE"] = "DELIVERY_METHOD_NO_LONGER_AVAILABLE";
  ViolationCode2["DELIVERY_METHOD_NOT_APPLIED_TO_ALL_LINE_ITEMS"] = "DELIVERY_METHOD_NOT_APPLIED_TO_ALL_LINE_ITEMS";
  ViolationCode2["INVALID_GIFT_CARD_CODE"] = "INVALID_GIFT_CARD_CODE";
  ViolationCode2["INVALID_GIFT_CARD_STATUS"] = "INVALID_GIFT_CARD_STATUS";
  ViolationCode2["CANNOT_PAY_FOR_GIFT_CARD_WITH_GIFT_CARD"] = "CANNOT_PAY_FOR_GIFT_CARD_WITH_GIFT_CARD";
  ViolationCode2["SUBTOTAL_BELOW_ORDER_MINIMUM"] = "SUBTOTAL_BELOW_ORDER_MINIMUM";
  return ViolationCode2;
})(ViolationCode || {});
var ViolationSeverity = /* @__PURE__ */ ((ViolationSeverity2) => {
  ViolationSeverity2["WARNING"] = "WARNING";
  ViolationSeverity2["ERROR"] = "ERROR";
  return ViolationSeverity2;
})(ViolationSeverity || {});
var InvalidCouponReason = /* @__PURE__ */ ((InvalidCouponReason2) => {
  InvalidCouponReason2["UNKNOWN_INVALID_COUPON_REASON"] = "UNKNOWN_INVALID_COUPON_REASON";
  InvalidCouponReason2["EXPIRED"] = "EXPIRED";
  InvalidCouponReason2["DISABLED"] = "DISABLED";
  InvalidCouponReason2["INACTIVE"] = "INACTIVE";
  InvalidCouponReason2["MAX_USAGE_EXCEEDED"] = "MAX_USAGE_EXCEEDED";
  InvalidCouponReason2["MAX_USAGE_PER_CUSTOMER_EXCEEDED"] = "MAX_USAGE_PER_CUSTOMER_EXCEEDED";
  InvalidCouponReason2["NOT_APPLICABLE_TO_SUBSCRIPTIONS"] = "NOT_APPLICABLE_TO_SUBSCRIPTIONS";
  InvalidCouponReason2["NOT_APPLICABLE_TO_SELECTED_LINE_ITEMS"] = "NOT_APPLICABLE_TO_SELECTED_LINE_ITEMS";
  InvalidCouponReason2["MIN_LINE_ITEM_QUANTITY_NOT_REACHED"] = "MIN_LINE_ITEM_QUANTITY_NOT_REACHED";
  InvalidCouponReason2["MIN_SUBTOTAL_NOT_REACHED"] = "MIN_SUBTOTAL_NOT_REACHED";
  return InvalidCouponReason2;
})(InvalidCouponReason || {});
var InvalidGiftCardReason = /* @__PURE__ */ ((InvalidGiftCardReason2) => {
  InvalidGiftCardReason2["UNKNOWN_INVALID_GIFT_CARD_REASON"] = "UNKNOWN_INVALID_GIFT_CARD_REASON";
  InvalidGiftCardReason2["EXPIRED"] = "EXPIRED";
  InvalidGiftCardReason2["DISABLED"] = "DISABLED";
  InvalidGiftCardReason2["EMPTY_BALANCE"] = "EMPTY_BALANCE";
  return InvalidGiftCardReason2;
})(InvalidGiftCardReason || {});
var ValidationsConfig = /* @__PURE__ */ ((ValidationsConfig2) => {
  ValidationsConfig2["SKIP_VALIDATIONS"] = "SKIP_VALIDATIONS";
  ValidationsConfig2["PRE_CHECKOUT_VALIDATIONS"] = "PRE_CHECKOUT_VALIDATIONS";
  ValidationsConfig2["CHECKOUT_VALIDATIONS"] = "CHECKOUT_VALIDATIONS";
  return ValidationsConfig2;
})(ValidationsConfig || {});
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
  WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
  WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
  WebhookIdentityType2["MEMBER"] = "MEMBER";
  WebhookIdentityType2["WIX_USER"] = "WIX_USER";
  WebhookIdentityType2["APP"] = "APP";
  return WebhookIdentityType2;
})(WebhookIdentityType || {});
var CheckoutStage = /* @__PURE__ */ ((CheckoutStage2) => {
  CheckoutStage2["INITIALIZATION"] = "INITIALIZATION";
  CheckoutStage2["IN_PROGRESS"] = "IN_PROGRESS";
  CheckoutStage2["ORDER_CREATION"] = "ORDER_CREATION";
  return CheckoutStage2;
})(CheckoutStage || {});
var JurisdictionType = /* @__PURE__ */ ((JurisdictionType2) => {
  JurisdictionType2["UNDEFINED"] = "UNDEFINED";
  JurisdictionType2["COUNTRY"] = "COUNTRY";
  JurisdictionType2["STATE"] = "STATE";
  JurisdictionType2["COUNTY"] = "COUNTY";
  JurisdictionType2["CITY"] = "CITY";
  JurisdictionType2["SPECIAL"] = "SPECIAL";
  return JurisdictionType2;
})(JurisdictionType || {});
var RateType = /* @__PURE__ */ ((RateType2) => {
  RateType2["NO_TAX_COLLECTED"] = "NO_TAX_COLLECTED";
  RateType2["MANUAL_RATE"] = "MANUAL_RATE";
  RateType2["AUTO_RATE"] = "AUTO_RATE";
  RateType2["FALLBACK_RATE"] = "FALLBACK_RATE";
  return RateType2;
})(RateType || {});
var ManualCalculationReason = /* @__PURE__ */ ((ManualCalculationReason2) => {
  ManualCalculationReason2["GLOBAL_SETTING_TO_MANUAL"] = "GLOBAL_SETTING_TO_MANUAL";
  ManualCalculationReason2["REGION_SETTING_TO_MANUAL"] = "REGION_SETTING_TO_MANUAL";
  return ManualCalculationReason2;
})(ManualCalculationReason || {});
var FallbackReason = /* @__PURE__ */ ((FallbackReason2) => {
  FallbackReason2["AUTO_TAX_FAILED"] = "AUTO_TAX_FAILED";
  FallbackReason2["AUTO_TAX_DEACTIVATED"] = "AUTO_TAX_DEACTIVATED";
  return FallbackReason2;
})(FallbackReason || {});
var PickupMethod = /* @__PURE__ */ ((PickupMethod2) => {
  PickupMethod2["STORE_PICKUP"] = "STORE_PICKUP";
  PickupMethod2["PICKUP_POINT"] = "PICKUP_POINT";
  return PickupMethod2;
})(PickupMethod || {});
var ChargeType = /* @__PURE__ */ ((ChargeType2) => {
  ChargeType2["HANDLING_FEE"] = "HANDLING_FEE";
  ChargeType2["INSURANCE"] = "INSURANCE";
  return ChargeType2;
})(ChargeType || {});
var BalanceType = /* @__PURE__ */ ((BalanceType2) => {
  BalanceType2["PUNCH_CARD"] = "PUNCH_CARD";
  BalanceType2["CREDIT"] = "CREDIT";
  return BalanceType2;
})(BalanceType || {});
var AdditionalFeeSource = /* @__PURE__ */ ((AdditionalFeeSource2) => {
  AdditionalFeeSource2["UNKNOWN_ADDITIONAL_FEE_SOURCE"] = "UNKNOWN_ADDITIONAL_FEE_SOURCE";
  AdditionalFeeSource2["SERVICE_PLUGIN"] = "SERVICE_PLUGIN";
  AdditionalFeeSource2["ITEM"] = "ITEM";
  AdditionalFeeSource2["MANUAL"] = "MANUAL";
  AdditionalFeeSource2["SHIPPING"] = "SHIPPING";
  AdditionalFeeSource2["PLATFORM"] = "PLATFORM";
  return AdditionalFeeSource2;
})(AdditionalFeeSource || {});
var PlatformFeeChargeType = /* @__PURE__ */ ((PlatformFeeChargeType2) => {
  PlatformFeeChargeType2["PASS_ON"] = "PASS_ON";
  PlatformFeeChargeType2["ABSORBED"] = "ABSORBED";
  return PlatformFeeChargeType2;
})(PlatformFeeChargeType || {});
async function createCart2(options) {
  const { httpClient, sideEffects } = arguments[1];
  const payload = transformPaths2(
    renameKeysFromSDKRequestToRESTRequest({
      cart: options?.cart,
      catalogItems: options?.catalogItems,
      customItems: options?.customItems,
      coupons: options?.coupons,
      deliveryMethod: options?.deliveryMethod,
      giftCards: options?.giftCards
    }),
    [
      {
        transformFn: transformSDKImageToRESTImage,
        paths: [
          { path: "cart.lineItems.source.catalogOverrideFields.image" },
          { path: "cart.lineItems.attributes.image" },
          { path: "catalogItems.catalogOverrideFields.image" },
          { path: "customItems.attributes.image" }
        ]
      },
      {
        transformFn: transformSDKPageURLV2ToRESTPageURLV2,
        paths: [
          { path: "cart.lineItems.attributes.url" },
          { path: "customItems.attributes.url" }
        ]
      },
      {
        transformFn: transformSDKAddressToRESTAddress,
        paths: [
          { path: "cart.deliveryInfo.address" },
          { path: "cart.paymentInfo.billingAddress" }
        ]
      }
    ]
  );
  const reqOpts = createCart(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(
      transformPaths2(result.data, [
        {
          transformFn: transformRESTImageToSDKImage,
          paths: [
            { path: "cart.lineItems.source.catalogOverrideFields.image" },
            { path: "cart.lineItems.attributes.image" }
          ]
        },
        {
          transformFn: transformRESTPageURLV2ToSDKPageURLV2,
          paths: [{ path: "cart.lineItems.attributes.url" }]
        },
        {
          transformFn: transformRESTAddressToSDKAddress,
          paths: [
            { path: "cart.deliveryInfo.address" },
            { path: "cart.paymentInfo.billingAddress" }
          ]
        }
      ])
    )?.cart;
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: {
          cart: "$[0].cart",
          catalogItems: "$[0].catalogItems",
          customItems: "$[0].customItems",
          coupons: "$[0].coupons",
          deliveryMethod: "$[0].deliveryMethod",
          giftCards: "$[0].giftCards"
        },
        singleArgumentUnchanged: false
      },
      ["options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function getCart2(cartId) {
  const { httpClient, sideEffects } = arguments[1];
  const payload = renameKeysFromSDKRequestToRESTRequest({ cartId });
  const reqOpts = getCart(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(
      transformPaths2(result.data, [
        {
          transformFn: transformRESTImageToSDKImage,
          paths: [
            { path: "cart.lineItems.source.catalogOverrideFields.image" },
            { path: "cart.lineItems.attributes.image" }
          ]
        },
        {
          transformFn: transformRESTPageURLV2ToSDKPageURLV2,
          paths: [{ path: "cart.lineItems.attributes.url" }]
        },
        {
          transformFn: transformRESTAddressToSDKAddress,
          paths: [
            { path: "cart.deliveryInfo.address" },
            { path: "cart.paymentInfo.billingAddress" }
          ]
        }
      ])
    )?.cart;
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: { cartId: "$[0]" },
        singleArgumentUnchanged: false
      },
      ["cartId"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function updateCart2(_id, cart) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = transformPaths2(
    renameKeysFromSDKRequestToRESTRequest({ cart: { ...cart, id: _id } }),
    [
      {
        transformFn: transformSDKImageToRESTImage,
        paths: [
          { path: "cart.lineItems.source.catalogOverrideFields.image" },
          { path: "cart.lineItems.attributes.image" }
        ]
      },
      {
        transformFn: transformSDKPageURLV2ToRESTPageURLV2,
        paths: [{ path: "cart.lineItems.attributes.url" }]
      },
      {
        transformFn: transformSDKAddressToRESTAddress,
        paths: [
          { path: "cart.deliveryInfo.address" },
          { path: "cart.paymentInfo.billingAddress" }
        ]
      }
    ]
  );
  const reqOpts = updateCart(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(
      transformPaths2(result.data, [
        {
          transformFn: transformRESTImageToSDKImage,
          paths: [
            { path: "cart.lineItems.source.catalogOverrideFields.image" },
            { path: "cart.lineItems.attributes.image" }
          ]
        },
        {
          transformFn: transformRESTPageURLV2ToSDKPageURLV2,
          paths: [{ path: "cart.lineItems.attributes.url" }]
        },
        {
          transformFn: transformRESTAddressToSDKAddress,
          paths: [
            { path: "cart.deliveryInfo.address" },
            { path: "cart.paymentInfo.billingAddress" }
          ]
        }
      ])
    )?.cart;
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: { cart: "$[1]" },
        explicitPathsToArguments: { "cart.id": "$[0]" },
        singleArgumentUnchanged: false
      },
      ["_id", "cart"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function deleteCart2(cartId) {
  const { httpClient, sideEffects } = arguments[1];
  const payload = renameKeysFromSDKRequestToRESTRequest({ cartId });
  const reqOpts = deleteCart(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: { cartId: "$[0]" },
        singleArgumentUnchanged: false
      },
      ["cartId"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function refreshCart2(cartId) {
  const { httpClient, sideEffects } = arguments[1];
  const payload = renameKeysFromSDKRequestToRESTRequest({ cartId });
  const reqOpts = refreshCart(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(
      transformPaths2(result.data, [
        {
          transformFn: transformRESTImageToSDKImage,
          paths: [
            { path: "cart.lineItems.source.catalogOverrideFields.image" },
            { path: "cart.lineItems.attributes.image" }
          ]
        },
        {
          transformFn: transformRESTPageURLV2ToSDKPageURLV2,
          paths: [{ path: "cart.lineItems.attributes.url" }]
        },
        {
          transformFn: transformRESTAddressToSDKAddress,
          paths: [
            { path: "cart.deliveryInfo.address" },
            { path: "cart.paymentInfo.billingAddress" }
          ]
        }
      ])
    );
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: { cartId: "$[0]" },
        singleArgumentUnchanged: false
      },
      ["cartId"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function estimateCart2(cartId, options) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    cartId,
    refreshCart: options?.refreshCart,
    validationConfig: options?.validationConfig,
    calculateOrderDiscounts: options?.calculateOrderDiscounts,
    calculateDelivery: options?.calculateDelivery,
    calculateAdditionalFees: options?.calculateAdditionalFees,
    calculateTax: options?.calculateTax,
    calculateGiftCards: options?.calculateGiftCards
  });
  const reqOpts = estimateCart(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(
      transformPaths2(result.data, [
        {
          transformFn: transformRESTImageToSDKImage,
          paths: [
            { path: "cart.lineItems.source.catalogOverrideFields.image" },
            { path: "cart.lineItems.attributes.image" }
          ]
        },
        {
          transformFn: transformRESTPageURLV2ToSDKPageURLV2,
          paths: [{ path: "cart.lineItems.attributes.url" }]
        },
        {
          transformFn: transformRESTAddressToSDKAddress,
          paths: [
            { path: "cart.deliveryInfo.address" },
            { path: "cart.paymentInfo.billingAddress" }
          ]
        }
      ])
    );
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: {
          cartId: "$[0]",
          refreshCart: "$[1].refreshCart",
          validationConfig: "$[1].validationConfig",
          calculateOrderDiscounts: "$[1].calculateOrderDiscounts",
          calculateDelivery: "$[1].calculateDelivery",
          calculateAdditionalFees: "$[1].calculateAdditionalFees",
          calculateTax: "$[1].calculateTax",
          calculateGiftCards: "$[1].calculateGiftCards"
        },
        singleArgumentUnchanged: false
      },
      ["cartId", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function calculateCart2(cartId, options) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    cartId,
    refreshCart: options?.refreshCart
  });
  const reqOpts = calculateCart(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(
      transformPaths2(result.data, [
        {
          transformFn: transformRESTImageToSDKImage,
          paths: [
            { path: "cart.lineItems.source.catalogOverrideFields.image" },
            { path: "cart.lineItems.attributes.image" }
          ]
        },
        {
          transformFn: transformRESTPageURLV2ToSDKPageURLV2,
          paths: [{ path: "cart.lineItems.attributes.url" }]
        },
        {
          transformFn: transformRESTAddressToSDKAddress,
          paths: [
            { path: "cart.deliveryInfo.address" },
            { path: "cart.paymentInfo.billingAddress" }
          ]
        }
      ])
    );
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: {
          cartId: "$[0]",
          refreshCart: "$[1].refreshCart"
        },
        singleArgumentUnchanged: false
      },
      ["cartId", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function getCheckoutUrl2(cartId, options) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    cartId,
    currencyCode: options?.currencyCode
  });
  const reqOpts = getCheckoutUrl(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: {
          cartId: "$[0]",
          currencyCode: "$[1].currencyCode"
        },
        singleArgumentUnchanged: false
      },
      ["cartId", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function placeOrder2(cartId, options) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    cartId,
    priceVerificationToken: options?.priceVerificationToken,
    paymentToken: options?.paymentToken,
    redirectUrls: options?.redirectUrls,
    savePaymentMethod: options?.savePaymentMethod,
    delayCapture: options?.delayCapture,
    inAppPurchase: options?.inAppPurchase
  });
  const reqOpts = placeOrder(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: {
          cartId: "$[0]",
          priceVerificationToken: "$[1].priceVerificationToken",
          paymentToken: "$[1].paymentToken",
          redirectUrls: "$[1].redirectUrls",
          savePaymentMethod: "$[1].savePaymentMethod",
          delayCapture: "$[1].delayCapture",
          inAppPurchase: "$[1].inAppPurchase"
        },
        singleArgumentUnchanged: false
      },
      ["cartId", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function addLineItems2(cartId, options) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = transformPaths2(
    renameKeysFromSDKRequestToRESTRequest({
      cartId,
      catalogItems: options?.catalogItems,
      customItems: options?.customItems
    }),
    [
      {
        transformFn: transformSDKImageToRESTImage,
        paths: [
          { path: "catalogItems.catalogOverrideFields.image" },
          { path: "customItems.attributes.image" }
        ]
      },
      {
        transformFn: transformSDKPageURLV2ToRESTPageURLV2,
        paths: [{ path: "customItems.attributes.url" }]
      }
    ]
  );
  const reqOpts = addLineItems(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(
      transformPaths2(result.data, [
        {
          transformFn: transformRESTImageToSDKImage,
          paths: [
            { path: "cart.lineItems.source.catalogOverrideFields.image" },
            { path: "cart.lineItems.attributes.image" }
          ]
        },
        {
          transformFn: transformRESTPageURLV2ToSDKPageURLV2,
          paths: [{ path: "cart.lineItems.attributes.url" }]
        },
        {
          transformFn: transformRESTAddressToSDKAddress,
          paths: [
            { path: "cart.deliveryInfo.address" },
            { path: "cart.paymentInfo.billingAddress" }
          ]
        }
      ])
    );
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: {
          cartId: "$[0]",
          catalogItems: "$[1].catalogItems",
          customItems: "$[1].customItems"
        },
        singleArgumentUnchanged: false
      },
      ["cartId", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function removeLineItems2(cartId, lineItemIds) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    cartId,
    lineItemIds
  });
  const reqOpts = removeLineItems(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(
      transformPaths2(result.data, [
        {
          transformFn: transformRESTImageToSDKImage,
          paths: [
            { path: "cart.lineItems.source.catalogOverrideFields.image" },
            { path: "cart.lineItems.attributes.image" }
          ]
        },
        {
          transformFn: transformRESTPageURLV2ToSDKPageURLV2,
          paths: [{ path: "cart.lineItems.attributes.url" }]
        },
        {
          transformFn: transformRESTAddressToSDKAddress,
          paths: [
            { path: "cart.deliveryInfo.address" },
            { path: "cart.paymentInfo.billingAddress" }
          ]
        }
      ])
    );
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: { cartId: "$[0]", lineItemIds: "$[1]" },
        singleArgumentUnchanged: false
      },
      ["cartId", "lineItemIds"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function updateLineItems2(cartId, options) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    cartId,
    lineItems: options?.lineItems
  });
  const reqOpts = updateLineItems(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(
      transformPaths2(result.data, [
        {
          transformFn: transformRESTImageToSDKImage,
          paths: [
            { path: "cart.lineItems.source.catalogOverrideFields.image" },
            { path: "cart.lineItems.attributes.image" }
          ]
        },
        {
          transformFn: transformRESTPageURLV2ToSDKPageURLV2,
          paths: [{ path: "cart.lineItems.attributes.url" }]
        },
        {
          transformFn: transformRESTAddressToSDKAddress,
          paths: [
            { path: "cart.deliveryInfo.address" },
            { path: "cart.paymentInfo.billingAddress" }
          ]
        }
      ])
    );
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: {
          cartId: "$[0]",
          lineItems: "$[1].lineItems"
        },
        singleArgumentUnchanged: false
      },
      ["cartId", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function addCoupon2(cartId, coupon) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    cartId,
    coupon
  });
  const reqOpts = addCoupon(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(
      transformPaths2(result.data, [
        {
          transformFn: transformRESTImageToSDKImage,
          paths: [
            { path: "cart.lineItems.source.catalogOverrideFields.image" },
            { path: "cart.lineItems.attributes.image" }
          ]
        },
        {
          transformFn: transformRESTPageURLV2ToSDKPageURLV2,
          paths: [{ path: "cart.lineItems.attributes.url" }]
        },
        {
          transformFn: transformRESTAddressToSDKAddress,
          paths: [
            { path: "cart.deliveryInfo.address" },
            { path: "cart.paymentInfo.billingAddress" }
          ]
        }
      ])
    );
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: { cartId: "$[0]", coupon: "$[1]" },
        singleArgumentUnchanged: false
      },
      ["cartId", "coupon"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function removeCoupon2(cartId, couponId) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    cartId,
    couponId
  });
  const reqOpts = removeCoupon(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(
      transformPaths2(result.data, [
        {
          transformFn: transformRESTImageToSDKImage,
          paths: [
            { path: "cart.lineItems.source.catalogOverrideFields.image" },
            { path: "cart.lineItems.attributes.image" }
          ]
        },
        {
          transformFn: transformRESTPageURLV2ToSDKPageURLV2,
          paths: [{ path: "cart.lineItems.attributes.url" }]
        },
        {
          transformFn: transformRESTAddressToSDKAddress,
          paths: [
            { path: "cart.deliveryInfo.address" },
            { path: "cart.paymentInfo.billingAddress" }
          ]
        }
      ])
    );
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: { cartId: "$[0]", couponId: "$[1]" },
        singleArgumentUnchanged: false
      },
      ["cartId", "couponId"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function setDeliveryMethod2(cartId, deliveryMethod) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    cartId,
    deliveryMethod
  });
  const reqOpts = setDeliveryMethod(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(
      transformPaths2(result.data, [
        {
          transformFn: transformRESTImageToSDKImage,
          paths: [
            { path: "cart.lineItems.source.catalogOverrideFields.image" },
            { path: "cart.lineItems.attributes.image" }
          ]
        },
        {
          transformFn: transformRESTPageURLV2ToSDKPageURLV2,
          paths: [{ path: "cart.lineItems.attributes.url" }]
        },
        {
          transformFn: transformRESTAddressToSDKAddress,
          paths: [
            { path: "cart.deliveryInfo.address" },
            { path: "cart.paymentInfo.billingAddress" }
          ]
        }
      ])
    );
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: { cartId: "$[0]", deliveryMethod: "$[1]" },
        singleArgumentUnchanged: false
      },
      ["cartId", "deliveryMethod"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function removeDeliveryMethod2(cartId) {
  const { httpClient, sideEffects } = arguments[1];
  const payload = renameKeysFromSDKRequestToRESTRequest({ cartId });
  const reqOpts = removeDeliveryMethod(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(
      transformPaths2(result.data, [
        {
          transformFn: transformRESTImageToSDKImage,
          paths: [
            { path: "cart.lineItems.source.catalogOverrideFields.image" },
            { path: "cart.lineItems.attributes.image" }
          ]
        },
        {
          transformFn: transformRESTPageURLV2ToSDKPageURLV2,
          paths: [{ path: "cart.lineItems.attributes.url" }]
        },
        {
          transformFn: transformRESTAddressToSDKAddress,
          paths: [
            { path: "cart.deliveryInfo.address" },
            { path: "cart.paymentInfo.billingAddress" }
          ]
        }
      ])
    );
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: { cartId: "$[0]" },
        singleArgumentUnchanged: false
      },
      ["cartId"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function addGiftCard2(cartId, giftCard) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    cartId,
    giftCard
  });
  const reqOpts = addGiftCard(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(
      transformPaths2(result.data, [
        {
          transformFn: transformRESTImageToSDKImage,
          paths: [
            { path: "cart.lineItems.source.catalogOverrideFields.image" },
            { path: "cart.lineItems.attributes.image" }
          ]
        },
        {
          transformFn: transformRESTPageURLV2ToSDKPageURLV2,
          paths: [{ path: "cart.lineItems.attributes.url" }]
        },
        {
          transformFn: transformRESTAddressToSDKAddress,
          paths: [
            { path: "cart.deliveryInfo.address" },
            { path: "cart.paymentInfo.billingAddress" }
          ]
        }
      ])
    );
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: { cartId: "$[0]", giftCard: "$[1]" },
        singleArgumentUnchanged: false
      },
      ["cartId", "giftCard"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function removeGiftCard2(cartId, giftCardId) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    cartId,
    giftCardId
  });
  const reqOpts = removeGiftCard(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(
      transformPaths2(result.data, [
        {
          transformFn: transformRESTImageToSDKImage,
          paths: [
            { path: "cart.lineItems.source.catalogOverrideFields.image" },
            { path: "cart.lineItems.attributes.image" }
          ]
        },
        {
          transformFn: transformRESTPageURLV2ToSDKPageURLV2,
          paths: [{ path: "cart.lineItems.attributes.url" }]
        },
        {
          transformFn: transformRESTAddressToSDKAddress,
          paths: [
            { path: "cart.deliveryInfo.address" },
            { path: "cart.paymentInfo.billingAddress" }
          ]
        }
      ])
    );
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: { cartId: "$[0]", giftCardId: "$[1]" },
        singleArgumentUnchanged: false
      },
      ["cartId", "giftCardId"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function markCartAsCompleted2(cartId, options) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    cartId,
    orderId: options?.orderId
  });
  const reqOpts = markCartAsCompleted(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(
      transformPaths2(result.data, [
        {
          transformFn: transformRESTImageToSDKImage,
          paths: [
            { path: "cart.lineItems.source.catalogOverrideFields.image" },
            { path: "cart.lineItems.attributes.image" }
          ]
        },
        {
          transformFn: transformRESTPageURLV2ToSDKPageURLV2,
          paths: [{ path: "cart.lineItems.attributes.url" }]
        },
        {
          transformFn: transformRESTAddressToSDKAddress,
          paths: [
            { path: "cart.deliveryInfo.address" },
            { path: "cart.paymentInfo.billingAddress" }
          ]
        }
      ])
    );
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: { cartId: "$[0]", orderId: "$[1].orderId" },
        singleArgumentUnchanged: false
      },
      ["cartId", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function handleAsyncCheckoutCompletion2(token) {
  const { httpClient, sideEffects } = arguments[1];
  const payload = renameKeysFromSDKRequestToRESTRequest({ token });
  const reqOpts = handleAsyncCheckoutCompletion(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: { token: "$[0]" },
        singleArgumentUnchanged: false
      },
      ["token"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function updateFormSubmissions2(cartId, options) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    cartId,
    formSubmissions: options?.formSubmissions
  });
  const reqOpts = updateFormSubmissions(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(
      transformPaths2(result.data, [
        {
          transformFn: transformRESTImageToSDKImage,
          paths: [
            { path: "cart.lineItems.source.catalogOverrideFields.image" },
            { path: "cart.lineItems.attributes.image" }
          ]
        },
        {
          transformFn: transformRESTPageURLV2ToSDKPageURLV2,
          paths: [{ path: "cart.lineItems.attributes.url" }]
        },
        {
          transformFn: transformRESTAddressToSDKAddress,
          paths: [
            { path: "cart.deliveryInfo.address" },
            { path: "cart.paymentInfo.billingAddress" }
          ]
        }
      ])
    );
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: {
          cartId: "$[0]",
          formSubmissions: "$[1].formSubmissions"
        },
        singleArgumentUnchanged: false
      },
      ["cartId", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}

// src/ecom-v2-cart-cart-v-2.public.ts
function createCart3(httpClient) {
  return (options) => createCart2(
    options,
    // @ts-ignore
    { httpClient }
  );
}
function getCart3(httpClient) {
  return (cartId) => getCart2(
    cartId,
    // @ts-ignore
    { httpClient }
  );
}
function updateCart3(httpClient) {
  return (_id, cart) => updateCart2(
    _id,
    cart,
    // @ts-ignore
    { httpClient }
  );
}
function deleteCart3(httpClient) {
  return (cartId) => deleteCart2(
    cartId,
    // @ts-ignore
    { httpClient }
  );
}
function refreshCart3(httpClient) {
  return (cartId) => refreshCart2(
    cartId,
    // @ts-ignore
    { httpClient }
  );
}
function estimateCart3(httpClient) {
  return (cartId, options) => estimateCart2(
    cartId,
    options,
    // @ts-ignore
    { httpClient }
  );
}
function calculateCart3(httpClient) {
  return (cartId, options) => calculateCart2(
    cartId,
    options,
    // @ts-ignore
    { httpClient }
  );
}
function getCheckoutUrl3(httpClient) {
  return (cartId, options) => getCheckoutUrl2(
    cartId,
    options,
    // @ts-ignore
    { httpClient }
  );
}
function placeOrder3(httpClient) {
  return (cartId, options) => placeOrder2(
    cartId,
    options,
    // @ts-ignore
    { httpClient }
  );
}
function addLineItems3(httpClient) {
  return (cartId, options) => addLineItems2(
    cartId,
    options,
    // @ts-ignore
    { httpClient }
  );
}
function removeLineItems3(httpClient) {
  return (cartId, lineItemIds) => removeLineItems2(
    cartId,
    lineItemIds,
    // @ts-ignore
    { httpClient }
  );
}
function updateLineItems3(httpClient) {
  return (cartId, options) => updateLineItems2(
    cartId,
    options,
    // @ts-ignore
    { httpClient }
  );
}
function addCoupon3(httpClient) {
  return (cartId, coupon) => addCoupon2(
    cartId,
    coupon,
    // @ts-ignore
    { httpClient }
  );
}
function removeCoupon3(httpClient) {
  return (cartId, couponId) => removeCoupon2(
    cartId,
    couponId,
    // @ts-ignore
    { httpClient }
  );
}
function setDeliveryMethod3(httpClient) {
  return (cartId, deliveryMethod) => setDeliveryMethod2(
    cartId,
    deliveryMethod,
    // @ts-ignore
    { httpClient }
  );
}
function removeDeliveryMethod3(httpClient) {
  return (cartId) => removeDeliveryMethod2(
    cartId,
    // @ts-ignore
    { httpClient }
  );
}
function addGiftCard3(httpClient) {
  return (cartId, giftCard) => addGiftCard2(
    cartId,
    giftCard,
    // @ts-ignore
    { httpClient }
  );
}
function removeGiftCard3(httpClient) {
  return (cartId, giftCardId) => removeGiftCard2(
    cartId,
    giftCardId,
    // @ts-ignore
    { httpClient }
  );
}
function markCartAsCompleted3(httpClient) {
  return (cartId, options) => markCartAsCompleted2(
    cartId,
    options,
    // @ts-ignore
    { httpClient }
  );
}
function handleAsyncCheckoutCompletion3(httpClient) {
  return (token) => handleAsyncCheckoutCompletion2(
    token,
    // @ts-ignore
    { httpClient }
  );
}
function updateFormSubmissions3(httpClient) {
  return (cartId, options) => updateFormSubmissions2(
    cartId,
    options,
    // @ts-ignore
    { httpClient }
  );
}

// src/ecom-v2-cart-cart-v-2.context.ts
import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
var createCart4 = /* @__PURE__ */ createRESTModule(createCart3);
var getCart4 = /* @__PURE__ */ createRESTModule(getCart3);
var updateCart4 = /* @__PURE__ */ createRESTModule(updateCart3);
var deleteCart4 = /* @__PURE__ */ createRESTModule(deleteCart3);
var refreshCart4 = /* @__PURE__ */ createRESTModule(refreshCart3);
var estimateCart4 = /* @__PURE__ */ createRESTModule(estimateCart3);
var calculateCart4 = /* @__PURE__ */ createRESTModule(calculateCart3);
var getCheckoutUrl4 = /* @__PURE__ */ createRESTModule(getCheckoutUrl3);
var placeOrder4 = /* @__PURE__ */ createRESTModule(placeOrder3);
var addLineItems4 = /* @__PURE__ */ createRESTModule(addLineItems3);
var removeLineItems4 = /* @__PURE__ */ createRESTModule(removeLineItems3);
var updateLineItems4 = /* @__PURE__ */ createRESTModule(updateLineItems3);
var addCoupon4 = /* @__PURE__ */ createRESTModule(addCoupon3);
var removeCoupon4 = /* @__PURE__ */ createRESTModule(removeCoupon3);
var setDeliveryMethod4 = /* @__PURE__ */ createRESTModule(setDeliveryMethod3);
var removeDeliveryMethod4 = /* @__PURE__ */ createRESTModule(removeDeliveryMethod3);
var addGiftCard4 = /* @__PURE__ */ createRESTModule(addGiftCard3);
var removeGiftCard4 = /* @__PURE__ */ createRESTModule(removeGiftCard3);
var markCartAsCompleted4 = /* @__PURE__ */ createRESTModule(markCartAsCompleted3);
var handleAsyncCheckoutCompletion4 = /* @__PURE__ */ createRESTModule(handleAsyncCheckoutCompletion3);
var updateFormSubmissions4 = /* @__PURE__ */ createRESTModule(updateFormSubmissions3);
export {
  AdditionalFeeSource,
  BalanceType,
  ChannelType,
  ChargeType,
  CheckoutStage,
  DescriptionLineType,
  DimensionsUnit,
  DiscountScope,
  DiscountSourceType,
  DiscountType,
  FallbackReason,
  FileType,
  InvalidCouponReason,
  InvalidGiftCardReason,
  ItemStatus,
  ItemTypePreset,
  JurisdictionType,
  ManualCalculationReason,
  NameInLineItem,
  NameInOther,
  PaymentOptionType,
  PickupMethod,
  PlatformFeeChargeType,
  ProductPeriodAlignment,
  RateType,
  RuleType,
  Severity,
  Source,
  SubscriptionFrequency,
  SuggestedFix,
  TaxableAddressType,
  ValidationsConfig,
  VatType,
  ViolationCode,
  ViolationScope,
  ViolationSeverity,
  WebhookIdentityType,
  WeightUnit,
  addCoupon4 as addCoupon,
  addGiftCard4 as addGiftCard,
  addLineItems4 as addLineItems,
  calculateCart4 as calculateCart,
  createCart4 as createCart,
  deleteCart4 as deleteCart,
  estimateCart4 as estimateCart,
  getCart4 as getCart,
  getCheckoutUrl4 as getCheckoutUrl,
  handleAsyncCheckoutCompletion4 as handleAsyncCheckoutCompletion,
  markCartAsCompleted4 as markCartAsCompleted,
  placeOrder4 as placeOrder,
  refreshCart4 as refreshCart,
  removeCoupon4 as removeCoupon,
  removeDeliveryMethod4 as removeDeliveryMethod,
  removeGiftCard4 as removeGiftCard,
  removeLineItems4 as removeLineItems,
  setDeliveryMethod4 as setDeliveryMethod,
  updateCart4 as updateCart,
  updateFormSubmissions4 as updateFormSubmissions,
  updateLineItems4 as updateLineItems
};
//# sourceMappingURL=index.mjs.map