@wix/auto_sdk_ecom_cart-v-2 1.0.21 → 1.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +46 -53
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1 -1
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +45 -52
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +46 -53
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +1 -1
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +45 -52
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +14 -14
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +59 -66
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +45 -52
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +14 -14
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +59 -66
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +45 -52
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.typings.ts","../../src/ecom-v2-cart-cart-v-2.universal.ts","../../src/ecom-v2-cart-cart-v-2.http.ts"],"sourcesContent":["export * from './src/ecom-v2-cart-cart-v-2.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixEcomV2Cart from './ecom-v2-cart-cart-v-2.http.js';\nimport { transformSDKAddressToRESTAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformRESTAddressToSDKAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformSDKImageToRESTImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformRESTImageToSDKImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformSDKPageURLV2ToRESTPageURLV2 } from '@wix/sdk-runtime/transformations/page-url-v2';\nimport { transformRESTPageURLV2ToSDKPageURLV2 } from '@wix/sdk-runtime/transformations/page-url-v2';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\nexport interface Cart {\n /**\n * Cart ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * Date and time the Cart was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the Cart was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Revision number, which increments by 1 each time the Cart is updated.\n * @readonly\n */\n revision?: string | null;\n /**\n * Line items added to the Cart by the customer.\n * This list may include both valid items (in stock) and invalid ones (e.g., out of stock).\n * When submitting an order, only valid items will be included in the order.\n * @maxSize 300\n * @readonly\n */\n lineItems?: V2LineItem[];\n /** The sum of all line item final prices. */\n subtotal?: MultiCurrencyPrice;\n /**\n * Optional message left by the customer.\n * Usually intended for the merchant and contain special instructions, requests, or clarifications related to the order.\n * @maxLength 1000\n */\n note?: string | null;\n /**\n * List of coupons added to the Cart.\n * Currently, only one coupon code is supported.\n * @maxSize 1\n */\n coupons?: Coupon[];\n /** Information about the source of the Cart, detailing the origin or context in which the Cart was created. */\n source?: CartSource;\n /** Information about the site from which the Cart's line items were added. */\n businessInfo?: BusinessInfo;\n /** Information about the customer that owns the Cart. */\n customerInfo?: CustomerInfo;\n /** Delivery-related information associated with the Cart. */\n deliveryInfo?: DeliveryInfo;\n /** Tax-related information associated with the Cart. */\n taxInfo?: TaxInfo;\n /** Payment-related information associated with the Cart. */\n paymentInfo?: PaymentInfo;\n /**\n * Whether the Cart has been placed as an Order.\n * Defaults to `false`.\n * @readonly\n */\n orderPlaced?: boolean;\n /**\n * The ID of the Order created from the Cart.\n * This field is empty until the checkout process is completed.\n * @format GUID\n * @readonly\n */\n orderId?: string | null;\n /**\n * Persistent ID that correlates between the Cart and the created Order (after the checkout is completed).\n * @format GUID\n * @readonly\n */\n purchaseFlowId?: string | null;\n /**\n * Additional Cart settings.\n *\n * > **Notes:**\n * > * Custom settings can only be set when creating a Cart.\n * > * To access and manage custom checkout page content, your app must have the permission scope named \"Manage eCommerce - Admin Permissions\". Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).\n * @immutable\n */\n settings?: CartSettings;\n /**\n * Custom checkout URL to redirect the customer to a checkout page.\n * By default, customers are redirected to the standard Wix checkout page.\n * Clients can override this behavior by providing their own URL here.\n * If the URL contains the placeholder `{checkout_id}`, it will be replaced with the actual Cart ID.\n * @maxLength 2048\n */\n customCheckoutUrl?: string | null;\n /**\n * Custom fields.\n * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls.\n */\n extendedFields?: ExtendedFields;\n}\n\nexport interface V2LineItem {\n /**\n * A unique identifier of the line item within the Cart.\n * @format GUID\n */\n _id?: string;\n /** The name of the line item. */\n name?: TranslatableString;\n /** Quantity-related information about the line item. */\n quantityInfo?: ItemQuantityInfo;\n /** Pricing-related information about the line item. */\n pricing?: ItemPricingInfo;\n /** Information about the origin of the line item. */\n source?: ItemSource;\n /** Details about the item for display purposes. */\n attributes?: ItemAttributes;\n /** Delivery-related information about the line item. */\n deliveryConfig?: ItemDeliveryConfig;\n /** Tax-related information about the line item. */\n taxConfig?: ItemTaxConfig;\n /** Payment-related information about the line item. */\n paymentConfig?: ItemPaymentConfig;\n /** The availability status of the line item according to the inventory. */\n status?: ItemStatusWithLiterals;\n /**\n * Custom extended fields for the line item object.\n *\n * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured using the 'Checkout & Orders - Line Items Schema Plugin' in the app dashboard before they can be accessed with API calls.\n */\n extendedFields?: ExtendedFields;\n /**\n * Additional Fees to be added to this item calculation.\n * @maxSize 5\n */\n additionalFees?: AdditionalFee[];\n /**\n * Modifier groups that were added to the item.\n * @maxSize 25\n */\n modifierGroups?: ModifierGroup[];\n /**\n * List of discounts applied to this line item.\n * @maxSize 100\n */\n discounts?: ItemDiscount[];\n /**\n * Whether the line item is a custom line item.\n * Custom line items don't trigger the Catalog service plugin.\n */\n customLineItem?: boolean;\n}\n\nexport interface TranslatableString {\n /**\n * __Required.__ String in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n *\n * Min: 1 character.\n * Max: 200 characters.\n * @minLength 1\n * @maxLength 200\n */\n original?: string;\n /**\n * String translated into the buyer's language.\n *\n * Min: 1 character.\n * Max: 400 characters.\n * Default: Same as `original`.\n * @minLength 1\n * @maxLength 400\n */\n translated?: string | null;\n}\n\nexport interface ItemQuantityInfo {\n /**\n * The final confirmed quantity of items to be purchased.\n * This value is the minimum between the requested quantity and the available quantity.\n * @min 1\n * @max 100000\n */\n confirmedQuantity?: number;\n /**\n * The amount of items originally requested by the customer.\n * @min 1\n * @max 100000\n */\n requestedQuantity?: number;\n /** The maximum quantity of items available for purchase. */\n availableQuantity?: number | null;\n /**\n * Whether the line item quantity is fixed and cannot be changed.\n * Default: `false`.\n */\n fixedQuantity?: boolean;\n}\n\nexport interface ItemPricingInfo {\n /**\n * Final unit price after applying automatic discounts.\n * Includes tax if `tax_info.prices_include_tax` is true.\n */\n unitPrice?: MultiCurrencyPrice;\n /**\n * Final total price for this item (unit price × quantity).\n * Includes tax if `tax_info.prices_include_tax` is true.\n */\n totalPrice?: MultiCurrencyPrice;\n /**\n * Additional description for the price.\n * For example, when price is 0 but additional details about the actual price are needed - \"Starts at $67\".\n */\n priceDescription?: PriceDescription;\n /** Indicates whether the price is not yet defined, and will be updated after the order is created. */\n priceUndetermined?: boolean;\n /** Detailed breakdown of price components. */\n breakdown?: ItemPriceBreakdown;\n}\n\nexport interface MultiCurrencyPrice {\n /**\n * Amount.\n * @decimalValue options { gte:0, lte:1000000000000000 }\n */\n amount?: string;\n /**\n * Converted amount.\n * @readonly\n * @decimalValue options { gte:0, lte:1000000000000000 }\n */\n convertedAmount?: string;\n /**\n * Amount formatted with currency symbol.\n * @readonly\n */\n formattedAmount?: string;\n /**\n * Converted amount formatted with currency symbol.\n * @readonly\n */\n formattedConvertedAmount?: string;\n}\n\nexport interface PriceDescription {\n /**\n * __Required.__ Price description in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n * @minLength 1\n * @maxLength 100\n */\n original?: string;\n /**\n * Price description translated into the buyer's language.\n *\n * Default: Same as `original`.\n * @minLength 1\n * @maxLength 100\n */\n translated?: string | null;\n}\n\nexport interface ItemPriceBreakdown {\n /**\n * Full catalog price of a single item before any discounts, including modifiers.\n * Includes tax if `tax_info.prices_include_tax` is true.\n */\n fullPrice?: MultiCurrencyPrice;\n /**\n * Catalog sale price of a single item, including modifiers.\n * Includes tax if `tax_info.prices_include_tax` is true.\n */\n salePrice?: MultiCurrencyPrice;\n /**\n * Total price of all item modifiers for the entire quantity of this item.\n * Includes tax if `tax_info.prices_include_tax` is true.\n */\n totalModifiersPrice?: MultiCurrencyPrice;\n}\n\nexport interface ItemSource {\n /**\n * Catalog and item reference.\n * Holds IDs for the item and the catalog it came from, as well as further optional info.\n * Optional for custom line items, which don't trigger the Catalog service plugin.\n */\n catalogReference?: CatalogReference;\n /**\n * Overriding values for catalog item properties.\n * To override catalog fields, your app must have the permission scope named \"Manage eCommerce - Admin Permissions\".\n * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).\n */\n catalogOverrideFields?: CatalogOverrideFields;\n /**\n * In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID.\n * + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID.\n * + in most cases, this field is the same as `catalogReference.catalogItemId`.\n * + Used in membership validation.\n * @minLength 1\n * @maxLength 36\n */\n rootCatalogItemId?: string | null;\n /**\n * ID of the app managing the inventory.\n * @format GUID\n */\n inventoryAppId?: string | null;\n}\n\n/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */\nexport interface CatalogReference {\n /**\n * ID of the item within the catalog it belongs to.\n * @minLength 1\n * @maxLength 36\n */\n catalogItemId?: string;\n /**\n * ID of the app providing the catalog.\n *\n * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).\n *\n * For items from Wix catalogs, the following values always apply:\n * + Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n * + Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`\n * + Wix Restaurants: `\"9a5d83fd-8570-482e-81ab-cfa88942ee60\"`\n * @minLength 1\n */\n appId?: string;\n /**\n * Additional item details in key:value pairs. Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items.\n *\n * For products and variants from a Wix Stores catalog, learn more about eCommerce integration ([SDK](https://dev.wix.com/docs/sdk/backend-modules/stores/catalog-v3/e-commerce-integration) | [REST](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration)).\n */\n options?: Record<string, any> | null;\n}\n\nexport interface CatalogOverrideFields {\n /** The name of the line item. */\n name?: TranslatableString;\n /**\n * The sale price of a single item after modifiers but before automatic discount.\n * @decimalValue options { gte:0, lte:999999999, maxScale:3 }\n */\n salePrice?: string | null;\n /**\n * The full price of a single item after modifiers but before automatic discount.\n * @decimalValue options { gte:0, lte:999999999, maxScale:3 }\n */\n fullPrice?: string | null;\n /**\n * Item description lines.\n * Used when displaying the line item to buyers.\n * @maxSize 20\n */\n descriptionLines?: DescriptionLine[];\n /** Physical properties of the item. */\n physicalProperties?: PhysicalProperties;\n /** Item image. */\n image?: string;\n /** Payment method selected for the item. */\n paymentOption?: PaymentOption;\n /**\n * Partial payment to be paid upfront during the checkout.\n * Only eligible for catalog items with `lineItem.paymentOption.value` type of `DEPOSIT_ONLINE`.\n * @format DECIMAL_VALUE\n * @decimalValue options { gt:0, lte:999999999, maxScale:3 }\n */\n depositAmount?: string | null;\n /**\n * Whether to save the payment method on the order.\n *\n * Default: `false`\n */\n savePaymentMethod?: boolean | null;\n}\n\nexport interface DescriptionLine\n extends DescriptionLineValueOneOf,\n DescriptionLineDescriptionLineValueOneOf {\n /** Description line plain text value. */\n plainText?: PlainTextValue;\n /** Description line color value. */\n colorInfo?: Color;\n /** Description line name. */\n name?: DescriptionLineName;\n /**\n * Whether the description line originates from a modifier.\n * @internal\n * @deprecated Whether the description line originates from a modifier.\n * @replacedBy none\n * @targetRemovalDate 2025-12-31\n */\n modifierDescriptionLine?: boolean;\n}\n\n/** @oneof */\nexport interface DescriptionLineValueOneOf {\n /** Description line plain text value. */\n plainText?: PlainTextValue;\n /** Description line color value. */\n colorInfo?: Color;\n}\n\n/** @oneof */\nexport interface DescriptionLineDescriptionLineValueOneOf {}\n\nexport interface DescriptionLineName {\n /**\n * Description line name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n * @maxLength 100\n */\n original?: string;\n /**\n * Description line name translated into the buyer's language.\n *\n * Default: Same as `original`.\n * @maxLength 200\n */\n translated?: string | null;\n}\n\nexport interface PlainTextValue {\n /**\n * Description line plain text value in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n * @maxLength 600\n */\n original?: string;\n /**\n * Description line plain text value translated into the buyer's language.\n *\n * Default: Same as `original`.\n * @maxLength 600\n */\n translated?: string | null;\n}\n\nexport interface Color {\n /**\n * Description line color name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n * @maxLength 500\n */\n original?: string;\n /**\n * Description line color name translated into the buyer's language.\n *\n * Default: Same as `original`.\n * @maxLength 500\n */\n translated?: string | null;\n /** HEX or RGB color code for display. */\n code?: string | null;\n}\n\nexport enum DescriptionLineType {\n /** Unrecognized type. */\n UNRECOGNISED = 'UNRECOGNISED',\n /** Plain text type. */\n PLAIN_TEXT = 'PLAIN_TEXT',\n /** Color type. */\n COLOR = 'COLOR',\n}\n\n/** @enumType */\nexport type DescriptionLineTypeWithLiterals =\n | DescriptionLineType\n | 'UNRECOGNISED'\n | 'PLAIN_TEXT'\n | 'COLOR';\n\nexport interface PhysicalProperties {\n /** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */\n weight?: number | null;\n /**\n * Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku).\n * @maxLength 40\n */\n sku?: string | null;\n /** Whether this line item is shippable. */\n shippable?: boolean;\n}\n\nexport interface PaymentOption {\n /**\n * Type of selected payment option for current item.\n *\n * Default: `FULL_PAYMENT_ONLINE`\n */\n value?: PaymentOptionTypeWithLiterals;\n}\n\n/** Type of selected payment option for catalog item */\nexport enum PaymentOptionType {\n /** The entire payment for this item happens as part of the checkout. */\n FULL_PAYMENT_ONLINE = 'FULL_PAYMENT_ONLINE',\n /** The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. */\n FULL_PAYMENT_OFFLINE = 'FULL_PAYMENT_OFFLINE',\n /** Payment for this item is done by charging a membership. Any remaining amount not covered by the membership, such as item modifiers, is paid online. */\n MEMBERSHIP = 'MEMBERSHIP',\n /** Partial payment to be paid upfront during checkout. The initial amount to be paid for each line item is specified in `depositAmount`. */\n DEPOSIT_ONLINE = 'DEPOSIT_ONLINE',\n /** Payment for this item can only be done by charging a membership and must be manually redeemed in the dashboard by the site admin. When selected, `price` is `0`. */\n MEMBERSHIP_OFFLINE = 'MEMBERSHIP_OFFLINE',\n /**\n * Item price is charged to online membership. Any remaining amount not covered by the membership, such as item modifiers, is paid offline.\n * @documentationMaturity preview\n */\n MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER = 'MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER',\n}\n\n/** @enumType */\nexport type PaymentOptionTypeWithLiterals =\n | PaymentOptionType\n | 'FULL_PAYMENT_ONLINE'\n | 'FULL_PAYMENT_OFFLINE'\n | 'MEMBERSHIP'\n | 'DEPOSIT_ONLINE'\n | 'MEMBERSHIP_OFFLINE'\n | 'MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER';\n\nexport interface ItemAttributes {\n /**\n * Description lines of the item.\n * @maxSize 100\n */\n descriptionLines?: DescriptionLine[];\n /** The image of the item. */\n image?: string;\n /** URL to the item's page on the site. */\n url?: string;\n /**\n * Policies to be displayed to the buyer on the checkout page.\n * @maxSize 5\n */\n policies?: Policy[];\n /** Item type. Either a preset type or custom. */\n itemType?: ItemType;\n /**\n * Physical properties of the item.\n * When relevant, contains information such as SKU, item weight, and shippability.\n */\n physicalProperties?: PhysicalProperties;\n /** Subscription option information. */\n subscriptionInfo?: SubscriptionOptionInfo;\n /** Service properties. When relevant, this contains information such as date and number of participants. */\n serviceProperties?: ServiceProperties;\n /**\n * Whether the item can only be purchased by site members.\n * Default: `false`\n */\n membersOnly?: boolean;\n}\n\nexport interface Policy {\n /**\n * Policy title - should be translated\n * @minLength 1\n * @maxLength 29\n */\n title?: string | null;\n /**\n * Policy content - should be translated\n * @minLength 1\n * @maxLength 3000\n */\n content?: string;\n}\n\nexport interface ItemType extends ItemTypeItemTypeDataOneOf {\n /** Preset item type. */\n preset?: ItemTypeItemTypeWithLiterals;\n /** Custom item type. When none of the preset types are suitable, specifies the custom type. */\n custom?: string;\n}\n\n/** @oneof */\nexport interface ItemTypeItemTypeDataOneOf {\n /** Preset item type. */\n preset?: ItemTypeItemTypeWithLiterals;\n /** Custom item type. When none of the preset types are suitable, specifies the custom type. */\n custom?: string;\n}\n\nexport enum ItemTypeItemType {\n UNRECOGNISED = 'UNRECOGNISED',\n PHYSICAL = 'PHYSICAL',\n DIGITAL = 'DIGITAL',\n GIFT_CARD = 'GIFT_CARD',\n SERVICE = 'SERVICE',\n}\n\n/** @enumType */\nexport type ItemTypeItemTypeWithLiterals =\n | ItemTypeItemType\n | 'UNRECOGNISED'\n | 'PHYSICAL'\n | 'DIGITAL'\n | 'GIFT_CARD'\n | 'SERVICE';\n\nexport interface SubscriptionOptionInfo {\n /** Subscription option settings. */\n subscriptionSettings?: SubscriptionSettings;\n /** Subscription option title. */\n title?: Title;\n /** Subscription option description. */\n description?: Description;\n}\n\nexport interface SubscriptionSettings {\n /** Frequency of recurring payment. */\n frequency?: SubscriptionFrequencyWithLiterals;\n /**\n * Interval of recurring payment.\n *\n * Default: `1`.\n * If SubscriptionFrequency is Day the minimum interval is 7\n * @min 1\n * @max 3650\n */\n interval?: number | null;\n /** Whether subscription is renewed automatically at the end of each period. */\n autoRenewal?: boolean;\n /**\n * Number of billing cycles before subscription ends. Ignored if `autoRenewal` is `true`.\n * @min 1\n */\n billingCycles?: number | null;\n /** Whether to allow the customer to cancel the subscription.. */\n enableCustomerCancellation?: boolean;\n /**\n * Period until first cycle starts. If applied payNow will be 0\n * If None => no free trial\n */\n freeTrialPeriod?: FreeTrialPeriod;\n /**\n * The date the subscription will start. The subscription will be charged either now or according to freeTrialDays.\n * @internal\n */\n startDate?: Date | null;\n}\n\n/** Frequency unit of recurring payment */\nexport enum SubscriptionFrequency {\n UNDEFINED = 'UNDEFINED',\n DAY = 'DAY',\n WEEK = 'WEEK',\n MONTH = 'MONTH',\n YEAR = 'YEAR',\n}\n\n/** @enumType */\nexport type SubscriptionFrequencyWithLiterals =\n | SubscriptionFrequency\n | 'UNDEFINED'\n | 'DAY'\n | 'WEEK'\n | 'MONTH'\n | 'YEAR';\n\nexport interface FreeTrialPeriod {\n /** Frequency of period. Values: DAY, WEEK, MONTH, YEAR */\n frequency?: SubscriptionFrequencyWithLiterals;\n /**\n * interval of period\n * @min 1\n * @max 999\n */\n interval?: number;\n}\n\nexport interface Title {\n /**\n * Subscription option name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n * @minLength 1\n * @maxLength 150\n */\n original?: string;\n /**\n * Subscription option name translated into the buyer's language.\n *\n * Default: Same as `original`.\n * @minLength 1\n * @maxLength 150\n */\n translated?: string | null;\n}\n\nexport interface Description {\n /**\n * Subscription option description.\n * @maxLength 500\n */\n original?: string;\n /**\n * Translated subscription option description.\n * @maxLength 500\n */\n translated?: string | null;\n}\n\nexport interface SecuredMedia {\n /**\n * Media ID in Wix Media Manager.\n * @minLength 1\n * @maxLength 100\n */\n _id?: string;\n /**\n * Original filename.\n * @minLength 1\n * @maxLength 1000\n */\n fileName?: string;\n /** File type. */\n fileType?: FileTypeWithLiterals;\n}\n\nexport enum FileType {\n UNSPECIFIED = 'UNSPECIFIED',\n SECURE_PICTURE = 'SECURE_PICTURE',\n SECURE_VIDEO = 'SECURE_VIDEO',\n SECURE_DOCUMENT = 'SECURE_DOCUMENT',\n SECURE_MUSIC = 'SECURE_MUSIC',\n SECURE_ARCHIVE = 'SECURE_ARCHIVE',\n}\n\n/** @enumType */\nexport type FileTypeWithLiterals =\n | FileType\n | 'UNSPECIFIED'\n | 'SECURE_PICTURE'\n | 'SECURE_VIDEO'\n | 'SECURE_DOCUMENT'\n | 'SECURE_MUSIC'\n | 'SECURE_ARCHIVE';\n\nexport interface ServiceProperties {\n /**\n * Date and time the service is to be provided, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.\n * For example, the start time of a class.\n */\n scheduledDate?: Date | null;\n /**\n * The number of people participating in the service. For example, the number of people attending a class or the number of people per hotel room.\n * @min 1\n * @max 10000\n */\n numberOfParticipants?: number | null;\n}\n\nexport interface ItemDeliveryConfig {\n /**\n * Delivery profile ID.\n * @format GUID\n */\n deliveryProfileId?: string | null;\n /**\n * An optional custom fulfiller's ID.\n * @format GUID\n */\n fulfillerId?: string | null;\n}\n\nexport interface ItemTaxConfig {\n /** Address to use for tax calculation purposes. */\n taxableAddress?: TaxableAddress;\n /**\n * Tax group ID for this line item.\n * @maxLength 50\n */\n taxGroupId?: string | null;\n}\n\nexport interface TaxableAddress extends TaxableAddressTaxableAddressDataOneOf {\n /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */\n addressType?: TaxableAddressTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface TaxableAddressTaxableAddressDataOneOf {\n /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */\n addressType?: TaxableAddressTypeWithLiterals;\n}\n\nexport enum TaxableAddressType {\n UNKNOWN_TAXABLE_ADDRESS = 'UNKNOWN_TAXABLE_ADDRESS',\n BUSINESS = 'BUSINESS',\n BILLING = 'BILLING',\n SHIPPING = 'SHIPPING',\n}\n\n/** @enumType */\nexport type TaxableAddressTypeWithLiterals =\n | TaxableAddressType\n | 'UNKNOWN_TAXABLE_ADDRESS'\n | 'BUSINESS'\n | 'BILLING'\n | 'SHIPPING';\n\nexport interface ItemPaymentConfig {\n /**\n * Whether to save the payment method on the order.\n * Default: `false`\n */\n savePaymentMethod?: boolean;\n /**\n * Item payment policy that requires buyer consent to complete purchase.\n * The payment policy will be displayed on the checkout page.\n * @minLength 1\n * @maxLength 2500\n */\n consentRequiredPaymentPolicy?: string | null;\n /**\n * Partial payment to be paid upfront during the checkout.\n * Eligible for catalog items with `lineItem.paymentOption` type `DEPOSIT_ONLINE` only.\n */\n depositAmount?: MultiCurrencyPrice;\n /**\n * Selected membership to be used as payment for this item.\n * Must be used with `lineItem.paymentOption` set to `MEMBERSHIP` or `MEMBERSHIP_OFFLINE`.\n * This field can be empty when `lineItem.paymentOption` is set to `MEMBERSHIP_OFFLINE`.\n */\n selectedMembership?: SelectedMembership;\n /**\n * Type of selected payment option for current item.\n *\n * Default: `FULL_PAYMENT_ONLINE`\n */\n paymentOption?: PaymentOptionTypeWithLiterals;\n}\n\nexport interface SelectedMembership {\n /**\n * Membership ID.\n * @minLength 1\n * @maxLength 100\n */\n _id?: string;\n /**\n * ID of the app providing this payment option.\n * @format GUID\n */\n appId?: string;\n /**\n * Name of the selected membership.\n * @readonly\n */\n name?: TranslatableString;\n}\n\nexport enum ItemStatus {\n UNKNOWN_ITEM_STATUS = 'UNKNOWN_ITEM_STATUS',\n /** The item is available in the requested quantity. */\n IN_STOCK = 'IN_STOCK',\n /** Only part of the requested quantity is available. */\n PARTIALLY_IN_STOCK = 'PARTIALLY_IN_STOCK',\n /** The item is out of stock. */\n OUT_OF_STOCK = 'OUT_OF_STOCK',\n /** The item is no longer exists in the catalog. */\n REMOVED_FROM_CATALOG = 'REMOVED_FROM_CATALOG',\n}\n\n/** @enumType */\nexport type ItemStatusWithLiterals =\n | ItemStatus\n | 'UNKNOWN_ITEM_STATUS'\n | 'IN_STOCK'\n | 'PARTIALLY_IN_STOCK'\n | 'OUT_OF_STOCK'\n | 'REMOVED_FROM_CATALOG';\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface AdditionalFee {\n /**\n * Additional fee's unique code or ID.\n * @minLength 1\n * @maxLength 100\n */\n code?: string | null;\n /**\n * Additional fee's name.\n *\n * Max: 50 characters\n * @minLength 1\n * @maxLength 50\n */\n name?: string;\n /**\n * Total additional fees. This `price` does not include any taxes that may apply to these additional fees.\n * @decimalValue options { gte:0, lte:1000000000000000, maxScale:2 }\n */\n price?: string;\n /**\n * Tax details.\n *\n * > **Note:** Tax is not calculated in the returned `price` even when `taxDetails.taxable` is `true`.\n */\n taxDetails?: TaxDetails;\n /**\n * Number of subscription cycle this fee applies to\n * default None - all billing cycle\n * @internal\n * @min 1\n * @max 999\n */\n subscriptionCycles?: number | null;\n}\n\n/** Tax details. */\nexport interface TaxDetails {\n /** Whether additional fee is taxable. */\n taxable?: boolean;\n /**\n * Reserved for internal use.\n * @format GUID\n */\n taxGroupId?: string | null;\n}\n\nexport interface ModifierGroup {\n /**\n * Modifier group ID.\n * @minLength 1\n * @maxLength 36\n * @readonly\n */\n _id?: string;\n /** Modifier group name. */\n name?: TranslatableString;\n /**\n * List of modifiers in this group.\n * @minSize 1\n * @maxSize 25\n */\n modifiers?: ItemModifier[];\n}\n\nexport interface ItemModifier {\n /**\n * Modifier ID.\n * @minLength 1\n * @maxLength 36\n * @readonly\n */\n _id?: string;\n /**\n * The quantity of this modifier.\n * @min 1\n * @max 100000\n */\n quantity?: number;\n /** Primary display label for the modifier. */\n label?: TranslatableString;\n /** Additional details. */\n details?: TranslatableString;\n /** The price of the modifier. */\n price?: MultiCurrencyPrice;\n}\n\n/**\n * Currently, only automatic discounts are applied to line items.\n * In the future, coupon discounts will be supported as well.\n */\nexport interface ItemDiscount {\n /** The display name of the discount. */\n name?: TranslatableString;\n /** The amount discounted from the item's sale price (per unit). */\n amountOff?: MultiCurrencyPrice;\n}\n\nexport interface Scope {\n /** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */\n namespace?: string;\n /** Coupon scope's applied group (e.g., event or ticket in Wix Events) */\n group?: Group;\n}\n\nexport interface Group {\n /** Coupon scope's group (e.g., product or collection in Wix Stores). See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */\n name?: string;\n /** Item ID (when the coupon scope is limited to just one item). */\n entityId?: string | null;\n}\n\nexport interface Coupon {\n /**\n * ID of the coupon in the Cart.\n * @format GUID\n */\n _id?: string;\n /**\n * Coupon code.\n * @minLength 1\n * @maxLength 50\n */\n code?: string;\n}\n\nexport interface CartSource {\n /**\n * Sales channel that created the Cart.\n * @immutable\n */\n channelType?: ChannelTypeWithLiterals;\n /**\n * References to an external app and resource associated with this Cart.\n * Used for integration and tracking across different platforms.\n * @maxSize 10\n * @immutable\n */\n externalReferences?: ExternalReference[];\n /**\n * ID of the entity that created the Cart.\n * @readonly\n */\n createdBy?: CreatedBy;\n /**\n * Reference IDs for the app and component providing custom checkout page content.\n *\n * To access and manage custom checkout page content, your app must have the permission scope named \"Manage eCommerce - Admin Permissions\".\n * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).\n */\n customContentReference?: CustomContentReference;\n}\n\nexport enum ChannelType {\n /** Unspecified sales channel. This value is not supported. */\n UNSPECIFIED = 'UNSPECIFIED',\n /** A web client. */\n WEB = 'WEB',\n /** [Point of sale solutions](https://support.wix.com/en/wix-mobile-pos-2196395). */\n POS = 'POS',\n /** [eBay shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-ebay-shop). */\n EBAY = 'EBAY',\n /** [Amazon shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-amazon-shop). */\n AMAZON = 'AMAZON',\n /** Other sales platform. */\n OTHER_PLATFORM = 'OTHER_PLATFORM',\n /** [Wix Owner app](https://support.wix.com/article/wix-owner-app-an-overview). */\n WIX_APP_STORE = 'WIX_APP_STORE',\n /** Wix Invoices app in [your dashboard](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Finvoices/settings/general-settings) */\n WIX_INVOICES = 'WIX_INVOICES',\n /** Wix merchant backoffice. */\n BACKOFFICE_MERCHANT = 'BACKOFFICE_MERCHANT',\n /** Wish sales channel. */\n WISH = 'WISH',\n /** [ClassPass sales channel](https://support.wix.com/en/article/wix-bookings-letting-clients-book-your-services-with-classpass). */\n CLASS_PASS = 'CLASS_PASS',\n /** Global-E sales channel. */\n GLOBAL_E = 'GLOBAL_E',\n /** [Facebook shop](https://support.wix.com/en/article/wix-stores-changes-to-facebook-shops). */\n FACEBOOK = 'FACEBOOK',\n /** [Etsy sales channel](https://support.wix.com/en/article/wix-stores-request-adding-etsy-as-a-sales-channel). */\n ETSY = 'ETSY',\n /** [TikTok sales channel](https://support.wix.com/en/article/wix-stores-request-adding-tiktok-as-a-sales-channel). */\n TIKTOK = 'TIKTOK',\n /** [Faire marketplace integration](https://support.wix.com/en/article/wix-stores-creating-a-faire-store-using-the-faire-integration-app). */\n FAIRE_COM = 'FAIRE_COM',\n /** PayPal Agentic Checkout sales channel. */\n PAYPAL_AGENTIC_CHECKOUT = 'PAYPAL_AGENTIC_CHECKOUT',\n}\n\n/** @enumType */\nexport type ChannelTypeWithLiterals =\n | ChannelType\n | 'UNSPECIFIED'\n | 'WEB'\n | 'POS'\n | 'EBAY'\n | 'AMAZON'\n | 'OTHER_PLATFORM'\n | 'WIX_APP_STORE'\n | 'WIX_INVOICES'\n | 'BACKOFFICE_MERCHANT'\n | 'WISH'\n | 'CLASS_PASS'\n | 'GLOBAL_E'\n | 'FACEBOOK'\n | 'ETSY'\n | 'TIKTOK'\n | 'FAIRE_COM'\n | 'PAYPAL_AGENTIC_CHECKOUT';\n\nexport interface ExternalReference {\n /**\n * ID of the app associated with the purchase flow.\n * For example, the Wix Pay Links app ID.\n * @format GUID\n * @immutable\n */\n appId?: string;\n /**\n * Reference to an external resource ID. Used to link the purchase flow to a specific entity in an external system.\n * For example, a Wix Pay Link ID.\n * @minLength 1\n * @maxLength 100\n * @immutable\n */\n resourceId?: string | null;\n}\n\nexport interface CreatedBy extends CreatedByIdOneOf {\n /**\n * Site visitor ID (if site visitor is **not** a member).\n * @format GUID\n * @readonly\n */\n visitorId?: string;\n /**\n * Site member ID.\n * @format GUID\n * @readonly\n */\n memberId?: string;\n /**\n * Wix user ID - when the Cart was created by a Wix user on behalf of a buyer.\n * For example, via POS (point of service).\n * @format GUID\n */\n userId?: string;\n /**\n * App ID - when the Cart was created by an external application or Wix service.\n * @format GUID\n */\n appId?: string;\n}\n\n/** @oneof */\nexport interface CreatedByIdOneOf {\n /**\n * Site visitor ID (if site visitor is **not** a member).\n * @format GUID\n * @readonly\n */\n visitorId?: string;\n /**\n * Site member ID.\n * @format GUID\n * @readonly\n */\n memberId?: string;\n /**\n * Wix user ID - when the Cart was created by a Wix user on behalf of a buyer.\n * For example, via POS (point of service).\n * @format GUID\n */\n userId?: string;\n /**\n * App ID - when the Cart was created by an external application or Wix service.\n * @format GUID\n */\n appId?: string;\n}\n\nexport interface CustomContentReference {\n /**\n * ID of the app providing the content.\n *\n * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).\n * @format GUID\n */\n appId?: string;\n /**\n * ID of the component within the app it belongs to.\n *\n * You can get your component's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).\n * @format GUID\n */\n componentId?: string;\n}\n\nexport interface BusinessInfo {\n /**\n * The ID of the business location associated with the cart.\n * Learn more about the [Locations API](https://dev.wix.com/docs/rest/business-management/locations/introduction).\n * @format GUID\n */\n locationId?: string | null;\n /**\n * The business’s default language, represented as a two-letter ISO 639-1 code.\n * @format LANGUAGE\n * @readonly\n */\n languageCode?: string;\n /**\n * The business’s default currency, represented as a three-letter ISO 4217 code.\n * @format CURRENCY\n * @readonly\n */\n currencyCode?: string;\n}\n\nexport interface CustomerInfo extends CustomerInfoIdOneOf {\n /**\n * Site visitor ID (if site visitor is **not** a member).\n * @format GUID\n * @readonly\n */\n visitorId?: string;\n /**\n * Site member ID.\n * @format GUID\n * @readonly\n */\n memberId?: string;\n /**\n * Wix user ID - when the Cart was created by a Wix user on behalf of a customer.\n * For example, via POS (point of service).\n * @format GUID\n * @readonly\n */\n userId?: string;\n /**\n * Customer's first name.\n * @maxLength 100\n */\n firstName?: string | null;\n /**\n * Customer's last name.\n * @maxLength 100\n */\n lastName?: string | null;\n /**\n * Customer's phone number.\n * @format PHONE\n */\n phone?: string | null;\n /**\n * Company name.\n * @maxLength 1000\n */\n company?: string | null;\n /** Business VAT registration number. */\n vatId?: VatId;\n /**\n * Customer's email address.\n * @format EMAIL\n */\n email?: string | null;\n /**\n * The Contact ID of the customer.\n * Created automatically if one does not yet exist.\n * For more information, see [Contacts API](https://dev.wix.com/api/rest/contacts/contacts/introduction).\n * @format GUID\n * @readonly\n */\n contactId?: string | null;\n /**\n * Customer's language, represented as a two-letter ISO 639-1 code.\n * Resolved automatically from the request metadata ('x-wix-linguist' header).\n * @format LANGUAGE\n * @readonly\n */\n languageCode?: string;\n /**\n * Customer’s currency, represented as a three-letter ISO 4217 code.\n * Resolved automatically from the request metadata ('x-wix-currency' header).\n * @format CURRENCY\n * @readonly\n */\n currencyCode?: string;\n}\n\n/** @oneof */\nexport interface CustomerInfoIdOneOf {\n /**\n * Site visitor ID (if site visitor is **not** a member).\n * @format GUID\n * @readonly\n */\n visitorId?: string;\n /**\n * Site member ID.\n * @format GUID\n * @readonly\n */\n memberId?: string;\n /**\n * Wix user ID - when the Cart was created by a Wix user on behalf of a customer.\n * For example, via POS (point of service).\n * @format GUID\n * @readonly\n */\n userId?: string;\n}\n\nexport interface VatId {\n /** Customer's tax ID. */\n _id?: string;\n /**\n * Tax type.\n *\n * Supported values:\n * + `CPF`: for individual tax payers\n * + `CNPJ`: for corporations\n */\n type?: VatTypeWithLiterals;\n}\n\n/** tax info types */\nexport enum VatType {\n UNSPECIFIED = 'UNSPECIFIED',\n /** CPF - for individual tax payers. */\n CPF = 'CPF',\n /** CNPJ - for corporations */\n CNPJ = 'CNPJ',\n}\n\n/** @enumType */\nexport type VatTypeWithLiterals = VatType | 'UNSPECIFIED' | 'CPF' | 'CNPJ';\n\nexport interface DeliveryInfo {\n /** The delivery address. */\n address?: Address;\n /** The selected delivery method by the customer. */\n method?: DeliveryMethod;\n /**\n * The unit of weight measurement when shipping items (e.g., KG, LB).\n * @readonly\n */\n weightUnit?: WeightUnitWithLiterals;\n}\n\n/** Physical address */\nexport interface Address {\n /**\n * Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.\n * @format COUNTRY\n */\n country?: string | null;\n /**\n * Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format.\n * @maxLength 50\n */\n subdivision?: string | null;\n /**\n * City name.\n * @maxLength 50\n */\n city?: string | null;\n /**\n * Postal or zip code.\n * @maxLength 50\n */\n postalCode?: string | null;\n /** Street address. */\n streetAddress?: StreetAddress;\n /**\n * Main address line (usually street name and number).\n * @maxLength 150\n */\n addressLine1?: string | null;\n /**\n * Free text providing more detailed address info. Usually contains apt, suite, floor.\n * @maxLength 100\n */\n addressLine2?: string | null;\n /** Geocode object containing latitude and longitude coordinates. */\n location?: AddressLocation;\n /**\n * Country's full name.\n * @readonly\n */\n countryFullname?: string | null;\n /**\n * Subdivision full-name.\n * @readonly\n */\n subdivisionFullname?: string | null;\n}\n\nexport interface StreetAddress {\n /** Street number. */\n number?: string;\n /** Street name. */\n name?: string;\n}\n\nexport interface AddressLocation {\n /** Address latitude. */\n latitude?: number | null;\n /** Address longitude. */\n longitude?: number | null;\n}\n\nexport interface DeliveryMethod {\n /**\n * Unique code that acts as an ID for a shipping rate.\n * For example, `\"usps_std_overnight\"`.\n * @maxLength 250\n */\n code?: string;\n /**\n * The carrier app id\n * @format GUID\n */\n appId?: string | null;\n /**\n * Delivery rate title.\n * For example, `\"USPS Standard Overnight Delivery\"`, `\"Standard\"`, or `\"First-Class Package International\"`.\n * @readonly\n */\n title?: TranslatableString;\n /**\n * Whether the delivery method is a pickup option.\n * @readonly\n */\n pickup?: boolean;\n}\n\nexport enum WeightUnit {\n /** Weight unit can't be classified due to an error. */\n UNSPECIFIED_WEIGHT_UNIT = 'UNSPECIFIED_WEIGHT_UNIT',\n /** Kilograms. */\n KG = 'KG',\n /** Pounds. */\n LB = 'LB',\n}\n\n/** @enumType */\nexport type WeightUnitWithLiterals =\n | WeightUnit\n | 'UNSPECIFIED_WEIGHT_UNIT'\n | 'KG'\n | 'LB';\n\nexport interface TaxInfo {\n /**\n * Indicates whether tax is already included in prices (line items, delivery, additional fess).\n * @readonly\n */\n pricesIncludeTax?: boolean;\n}\n\nexport interface PaymentInfo {\n /**\n * A list of gift cards to pay with.\n * Currently only one gift card is supported.\n * @readonly\n * @maxSize 1\n */\n giftCards?: GiftCard[];\n /**\n * The currency to pay with, represented as a three-letter ISO 4217 code.\n * @format CURRENCY\n * @readonly\n */\n currencyCode?: string;\n /** Billing address. */\n billingAddress?: Address;\n /** Full contact details for billing. */\n billingContact?: FullAddressContactDetails;\n}\n\nexport interface GiftCard {\n /**\n * A unique identifier of the gift card within the Cart.\n * @format GUID\n */\n _id?: string;\n /**\n * A partially hidden version of the actual gift card code\n * @maxLength 50\n */\n obfuscatedCode?: string;\n /**\n * App ID of the gift card provider.\n * @format GUID\n */\n appId?: string;\n /**\n * External ID in the gift card provider's system.\n * Used for integration and tracking across different platforms.\n * @minLength 1\n * @maxLength 50\n */\n externalId?: string | null;\n}\n\n/** Full contact details for an address */\nexport interface FullAddressContactDetails {\n /**\n * First name.\n * @maxLength 100\n */\n firstName?: string | null;\n /**\n * Last name.\n * @maxLength 100\n */\n lastName?: string | null;\n /**\n * Phone number.\n * @format PHONE\n */\n phone?: string | null;\n /**\n * Company name.\n * @maxLength 1000\n */\n company?: string | null;\n /** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */\n vatId?: VatId;\n}\n\nexport interface CartSettings {\n /**\n * Whether to restrict the option to add or remove a gift card on the checkout page.\n * Default: `false`\n */\n lockGiftCard?: boolean;\n /**\n * Whether to restrict the option to add or remove a coupon code on the checkout page.\n * Default: `false`\n */\n lockCouponCode?: boolean;\n /**\n * Whether to disable policy agreement checkout in the checkout page.\n * Default: `false`\n */\n policyAgreementCheckboxDisabled?: boolean;\n /**\n * Whether to disable manual payment option for this checkout.\n * Default: `false`\n */\n manualPaymentDisabled?: boolean;\n}\n\nexport interface CustomField {\n /** Custom field value. */\n value?: any;\n /**\n * Custom field title.\n * @minLength 1\n * @maxLength 500\n */\n title?: string;\n /**\n * Translated custom field title.\n * @minLength 1\n * @maxLength 500\n */\n translatedTitle?: string | null;\n}\n\nexport interface LegacyFields {\n /**\n * The applied discounts of the Cart.\n * Discounts that are no longer applied are not included in this list.\n * @maxSize 100\n */\n appliedDiscounts?: Discount[];\n /** The coupon discount amount. */\n couponDiscount?: MultiCurrencyPrice;\n /** The sum of all line items after applying all discounts. */\n subtotalAfterCouponDiscount?: MultiCurrencyPrice;\n}\n\nexport interface Discount {\n /** The display name of the discount. */\n name?: TranslatableString;\n /** The source of the discount, indicating how it was applied. */\n source?: DiscountSource;\n /** The component in the Cart that the discount applies to. */\n scope?: DiscountScopeWithLiterals;\n /**\n * List of benefits provided by the discount.\n * @minSize 1\n * @maxSize 100\n */\n benefits?: DiscountBenefit[];\n /**\n * Number of subscription cycles this discount applies to.\n * If unset, the discount applies to all billing cycles.\n * @min 1\n * @max 1000\n */\n subscriptionCycles?: number | null;\n}\n\nexport interface DiscountSource {\n /** The type of the discount source. */\n sourceType?: DiscountSourceTypeWithLiterals;\n /**\n * Coupon code that triggered the discount.\n * Relevant for coupon discounts only.\n * @maxLength 50\n */\n couponCode?: string | null;\n}\n\nexport enum DiscountSourceType {\n UNKNOWN_DISCOUNT_SOURCE_TYPE = 'UNKNOWN_DISCOUNT_SOURCE_TYPE',\n /** The discount was applied automatically by a rule. */\n AUTOMATIC_RULE = 'AUTOMATIC_RULE',\n /** The discount was applied by a coupon code. */\n COUPON = 'COUPON',\n}\n\n/** @enumType */\nexport type DiscountSourceTypeWithLiterals =\n | DiscountSourceType\n | 'UNKNOWN_DISCOUNT_SOURCE_TYPE'\n | 'AUTOMATIC_RULE'\n | 'COUPON';\n\nexport enum DiscountScope {\n UNKNOWN_DISCOUNT_SCOPE = 'UNKNOWN_DISCOUNT_SCOPE',\n /** The discount applies to the cart's subtotal. */\n CART_SUBTOTAL = 'CART_SUBTOTAL',\n /** The discount applies to a specific line item. */\n LINE_ITEM = 'LINE_ITEM',\n /** The discount applies to the delivery price. */\n DELIVERY = 'DELIVERY',\n}\n\n/** @enumType */\nexport type DiscountScopeWithLiterals =\n | DiscountScope\n | 'UNKNOWN_DISCOUNT_SCOPE'\n | 'CART_SUBTOTAL'\n | 'LINE_ITEM'\n | 'DELIVERY';\n\nexport interface DiscountBenefit extends DiscountBenefitValueOneOf {\n /** A specific monetary value deducted from the total cost. */\n amountOff?: MultiCurrencyPrice;\n /**\n * The ID of line item that the discount applies to.\n * Relevant for item-level discounts only.\n * @format GUID\n */\n lineItemId?: string | null;\n}\n\n/** @oneof */\nexport interface DiscountBenefitValueOneOf {\n /** A specific monetary value deducted from the total cost. */\n amountOff?: MultiCurrencyPrice;\n}\n\nexport interface CartSummary {\n /**\n * The Cart ID.\n * @format GUID\n */\n cartId?: string;\n /**\n * Summarized details for each line item in the cart.\n * @maxSize 300\n */\n lineItems?: LineItemSummary[];\n /**\n * List of discounts applied to the cart.\n * @maxSize 100\n */\n discounts?: Discount[];\n /** Summary of the delivery costs. */\n deliverySummary?: DeliverySummary;\n /**\n * List of additional fees applied to the cart.\n * @maxSize 100\n */\n additionalFees?: V2AdditionalFee[];\n /** Summary of tax calculations applied to the cart. */\n taxSummary?: TaxSummary;\n /** Summary of all calculated price components in the cart. */\n priceSummary?: PriceSummary;\n /** Payment details summarizing how the customer will pay for the order. */\n paymentSummary?: PaymentSummary;\n /**\n * A token representing the Cart's calculated prices.\n *\n * The client can pass this token when completing the checkout to ensure that the\n * prices the customer saw match the final prices at checkout.\n *\n * The server will validate the token if provided by recalculating the cart and comparing the\n * resulting pricing token. If the validation fails, the checkout will be rejected.\n *\n * This mechanism protects against unexpected price changes or tampering between\n * cart calculation and order placement.\n *\n * The token is opaque and should not be parsed or modified by clients.\n * @maxLength 1024\n */\n priceVerificationToken?: string | null;\n /**\n * List of errors that occurred during the calculation process, returned by Totals Calculator.\n * TODO: Temporary field for backward compatibility; will be removed once we introduce the unified 'violations' model.\n */\n calculationErrors?: CalculationErrors;\n /**\n * List of business violations raised by the Validations service plugin ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/service-plugins/validations/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/service-plugins/validations-integration-service-plugin/introduction)).\n * TODO: Temporary field for backward compatibility; will be removed once we introduce the unified 'violations' model.\n * @maxSize 100\n */\n spiViolations?: Violation[];\n}\n\nexport interface LineItemSummary {\n /**\n * Line item ID.\n * @format GUID\n */\n lineItemId?: string;\n /**\n * The quantity of the line item.\n * @min 1\n * @max 100000\n */\n quantity?: number;\n /**\n * Final unit price after applying automatic discounts.\n * Includes tax if `tax_summary.prices_include_tax` is true.\n */\n unitPrice?: MultiCurrencyPrice;\n /**\n * Total price for the line item (unit price × quantity).\n * Includes tax if `tax_summary.prices_include_tax` is true.\n */\n totalPrice?: MultiCurrencyPrice;\n}\n\nexport interface DeliverySummary {\n /** The calculated delivery method. */\n method?: DeliveryMethod;\n /**\n * Delivery price after discount.\n * Includes tax if `tax_summary.prices_include_tax` is true.\n */\n price?: MultiCurrencyPrice;\n}\n\nexport interface V2AdditionalFee {\n /**\n * Additional fee's code.\n * @minLength 1\n * @maxLength 100\n */\n code?: string | null;\n /** Additional fee's name. */\n name?: TranslatableString;\n /**\n * Provider's app id.\n * @minLength 1\n * @maxLength 100\n */\n providerAppId?: string | null;\n /**\n * The line items associated with this fee.\n * If the list is empty, the fee will be associated with the entire cart.\n * @format GUID\n * @maxSize 100\n */\n lineItemIds?: string[];\n /**\n * Additional fee's price.\n * Includes tax if `tax_summary.prices_include_tax` is true.\n */\n price?: MultiCurrencyPrice;\n /**\n * Number of subscription cycle this fee applies to.\n * If None and discount is linked to subscription line item, it applies to all cycles.\n * @min 1\n * @max 999\n */\n subscriptionCycles?: number | null;\n}\n\nexport interface TaxSummary {\n /**\n * List of taxes applied to the cart.\n * May contain multiple entries when advanced tax rates are configured by the merchant,\n * or a single entry representing the total tax amount.\n * For more details on advanced tax rates, read [this article](https://support.wix.com/en/article/setting-up-tax-calculation-using-the-manual-method#step-3-optional-customize-advanced-mode-settings).\n * @maxSize 100\n */\n taxes?: Tax[];\n /**\n * Indicates whether tax is already included in prices (line items, discounts, delivery, additional fess).\n * @readonly\n */\n pricesIncludeTax?: boolean;\n /**\n * Taxes applied to line items.\n * @maxSize 300\n */\n lineItemTaxes?: LineItemTax[];\n /** Tax applied to the delivery method. */\n deliveryTax?: MultiCurrencyPrice;\n /**\n * Taxes applied to additional fees.\n * @maxSize 100\n */\n additionalFeeTaxes?: AdditionalFeeTax[];\n}\n\nexport interface Tax {\n /** The name of the tax. */\n name?: TranslatableString;\n /** Amount for which tax is calculated. */\n taxableAmount?: MultiCurrencyPrice;\n /** Amount that is exempt from tax. */\n exemptAmount?: MultiCurrencyPrice;\n /**\n * Tax rate %, as a decimal point between 0 and 1.\n * @decimalValue options { gte:0, lte:1, maxScale:6 }\n */\n rate?: string | null;\n /** Calculated tax, based on `taxable_amount` and `rate`. */\n amount?: MultiCurrencyPrice;\n}\n\nexport interface LineItemTax {\n /**\n * Line item ID.\n * @format GUID\n */\n lineItemId?: string;\n /** Tax amount applied to the additional fee. */\n tax?: MultiCurrencyPrice;\n}\n\nexport interface AdditionalFeeTax {\n /**\n * Additional fee's code.\n * @minLength 1\n * @maxLength 100\n */\n additionalFeeCode?: string;\n /** Tax amount applied to the additional fee. */\n tax?: MultiCurrencyPrice;\n}\n\nexport interface PriceSummary {\n /**\n * Total price of all line items after applying item-level discounts.\n * Includes tax if `tax_summary.prices_include_tax` is true.\n */\n subtotal?: MultiCurrencyPrice;\n /**\n * Total cart-level discount applied to the subtotal.\n * Line-item discounts are reflected in the subtotal and not included here.\n * Currently supports only a single coupon.\n */\n discount?: MultiCurrencyPrice;\n /**\n * Final delivery cost for the cart.\n * Includes tax if `tax_summary.prices_include_tax` is true.\n */\n delivery?: MultiCurrencyPrice;\n /**\n * Total additional fees associated with the cart.\n * Includes tax if `tax_summary.prices_include_tax` is true.\n */\n additionalFees?: MultiCurrencyPrice;\n /** Total tax amount calculated across all applicable components (items, discounts, delivery, and fees). */\n tax?: MultiCurrencyPrice;\n /** Total amount to be paid. */\n total?: MultiCurrencyPrice;\n}\n\nexport interface PaymentSummary {\n /**\n * The amount that will be deducted from each gift card added to the cart.\n * Currently, only one gift card is supported.\n * @maxSize 1\n */\n giftCards?: GiftCardSummary[];\n /**\n * A list of valid memberships that will be charged as part of the order.\n * @maxSize 300\n */\n memberships?: Membership[];\n /**\n * Charges information for each subscription in the checkout.\n * @maxSize 100\n */\n subscriptionCharges?: SubscriptionCharges[];\n /** Indicates whether a remaining payment is required to create the order, after applying gift cards. */\n requiresPaymentAfterGiftCard?: boolean;\n /** The total amount due after applying all gift cards. */\n totalAfterGiftCards?: MultiCurrencyPrice;\n /** The upfront amount to be charged immediately when placing the order (after applying gift cards). */\n payNow?: MultiCurrencyPrice;\n /** The remaining amount to be collected later. */\n payLater?: MultiCurrencyPrice;\n /** The amount to be charged after a free trial period (typically for subscription-based products). */\n payAfterFreeTrial?: MultiCurrencyPrice;\n}\n\nexport interface GiftCardSummary {\n /**\n * The ID of the gift card assigned by the Cart.\n * @format GUID\n */\n giftCardId?: string;\n /** The amount to be reduced from the gift card's balance. */\n redeemAmount?: MultiCurrencyPrice;\n}\n\nexport interface Membership {\n /**\n * Membership ID.\n * @minLength 1\n * @maxLength 100\n */\n _id?: string;\n /**\n * ID of the app providing this payment option.\n * @format GUID\n */\n appId?: string;\n /**\n * IDs of the line items this membership applies to.\n * @minSize 1\n * @maxSize 300\n * @minLength 1\n * @maxLength 100\n */\n lineItemIds?: string[];\n}\n\nexport interface SubscriptionCharges {\n /**\n * ids of the items the subscription is defined on\n * @format GUID\n * @minSize 1\n * @maxSize 300\n */\n lineItemIds?: string[];\n /**\n * Generated description explaining future charges amount and schedule.\n * Translated to subscription order buyer language, or to site language if was not provided.\n * @maxLength 1000\n */\n description?: string | null;\n /**\n * Charges for subscription.\n * @maxSize 50\n */\n charges?: Charge[];\n}\n\nexport interface Charge {\n /** The cycle number from which the charge starts. */\n cycleFrom?: number;\n /** The number of cycles for which the charge is applicable. */\n cycleCount?: number | null;\n /** Charge summary. */\n priceSummary?: PriceSummary;\n /** The billing date from which the charge starts. */\n cycleBillingDate?: Date | null;\n}\n\nexport interface CalculationErrors\n extends CalculationErrorsShippingCalculationErrorOneOf {\n /** General shipping calculation error. */\n generalShippingCalculationError?: Details;\n /** Carrier errors. */\n carrierErrors?: CarrierErrors;\n /** Tax calculation error. */\n taxCalculationError?: Details;\n /** Coupon calculation error. */\n couponCalculationError?: Details;\n /** Gift card calculation error. */\n giftCardCalculationError?: Details;\n /**\n * Order validation errors.\n * @maxSize 100\n */\n orderValidationErrors?: ApplicationError[];\n /**\n * Membership payment methods calculation errors\n * For example, will indicate that a line item that must be paid with membership payment doesn't have one or selected memberships are invalid\n */\n membershipError?: Details;\n /** Discount Rule calculation error. */\n discountsCalculationError?: Details;\n}\n\n/** @oneof */\nexport interface CalculationErrorsShippingCalculationErrorOneOf {\n /** General shipping calculation error. */\n generalShippingCalculationError?: Details;\n /** Carrier errors. */\n carrierErrors?: CarrierErrors;\n}\n\nexport interface Details extends DetailsKindOneOf {\n applicationError?: ApplicationError;\n validationError?: ValidationError;\n systemError?: SystemError;\n /**\n * deprecated in API's - to enable migration from rendering arbitrary tracing to rest response\n * @deprecated\n */\n tracing?: Record<string, string>;\n}\n\n/** @oneof */\nexport interface DetailsKindOneOf {\n applicationError?: ApplicationError;\n validationError?: ValidationError;\n systemError?: SystemError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\n/**\n * example result:\n * {\n * \"fieldViolations\": [\n * {\n * \"field\": \"fieldA\",\n * \"description\": \"invalid music note. supported notes: [do,re,mi,fa,sol,la,ti]\",\n * \"violatedRule\": \"OTHER\",\n * \"ruleName\": \"INVALID_NOTE\",\n * \"data\": {\n * \"value\": \"FI\"\n * }\n * },\n * {\n * \"field\": \"fieldB\",\n * \"description\": \"field value out of range. supported range: [0-20]\",\n * \"violatedRule\": \"MAX\",\n * \"data\": {\n * \"threshold\": 20\n * }\n * },\n * {\n * \"field\": \"fieldC\",\n * \"description\": \"invalid phone number. provide a valid phone number of size: [7-12], supported characters: [0-9, +, -, (, )]\",\n * \"violatedRule\": \"FORMAT\",\n * \"data\": {\n * \"type\": \"PHONE\"\n * }\n * }\n * ]\n * }\n */\nexport interface ValidationError {\n fieldViolations?: FieldViolation[];\n}\n\nexport enum RuleType {\n VALIDATION = 'VALIDATION',\n OTHER = 'OTHER',\n MAX = 'MAX',\n MIN = 'MIN',\n MAX_LENGTH = 'MAX_LENGTH',\n MIN_LENGTH = 'MIN_LENGTH',\n MAX_SIZE = 'MAX_SIZE',\n MIN_SIZE = 'MIN_SIZE',\n FORMAT = 'FORMAT',\n DECIMAL_LTE = 'DECIMAL_LTE',\n DECIMAL_GTE = 'DECIMAL_GTE',\n DECIMAL_LT = 'DECIMAL_LT',\n DECIMAL_GT = 'DECIMAL_GT',\n DECIMAL_MAX_SCALE = 'DECIMAL_MAX_SCALE',\n INVALID_ENUM_VALUE = 'INVALID_ENUM_VALUE',\n REQUIRED_FIELD = 'REQUIRED_FIELD',\n FIELD_NOT_ALLOWED = 'FIELD_NOT_ALLOWED',\n ONE_OF_ALIGNMENT = 'ONE_OF_ALIGNMENT',\n EXACT_LENGTH = 'EXACT_LENGTH',\n EXACT_SIZE = 'EXACT_SIZE',\n REQUIRED_ONE_OF_FIELD = 'REQUIRED_ONE_OF_FIELD',\n}\n\n/** @enumType */\nexport type RuleTypeWithLiterals =\n | RuleType\n | 'VALIDATION'\n | 'OTHER'\n | 'MAX'\n | 'MIN'\n | 'MAX_LENGTH'\n | 'MIN_LENGTH'\n | 'MAX_SIZE'\n | 'MIN_SIZE'\n | 'FORMAT'\n | 'DECIMAL_LTE'\n | 'DECIMAL_GTE'\n | 'DECIMAL_LT'\n | 'DECIMAL_GT'\n | 'DECIMAL_MAX_SCALE'\n | 'INVALID_ENUM_VALUE'\n | 'REQUIRED_FIELD'\n | 'FIELD_NOT_ALLOWED'\n | 'ONE_OF_ALIGNMENT'\n | 'EXACT_LENGTH'\n | 'EXACT_SIZE'\n | 'REQUIRED_ONE_OF_FIELD';\n\nexport interface FieldViolation {\n field?: string;\n description?: string;\n violatedRule?: RuleTypeWithLiterals;\n /** applicable when violated_rule=OTHER */\n ruleName?: string | null;\n data?: Record<string, any> | null;\n}\n\nexport interface SystemError {\n /** Error code. */\n errorCode?: string | null;\n}\n\nexport interface CarrierErrors {\n /**\n * Carrier errors.\n * @maxSize 100\n */\n errors?: CarrierError[];\n}\n\nexport interface CarrierError {\n /**\n * Carrier ID.\n * @format GUID\n */\n carrierId?: string;\n /** Error details. */\n error?: Details;\n}\n\nexport interface Violation {\n /** Severity of the violation. The violations are shown on the cart and checkout pages. A warning is displayed as yellow, and allows a site visitor to proceed with caution. An error is displayed as red, and doesn't allow a site visitor to proceed with the eCommerce flow. */\n severity?: SeverityWithLiterals;\n /** Target location on a checkout or cart page where the violation will be displayed. */\n target?: Target;\n /**\n * Violation description. Can include rich text. Only HTTP or HTTPS links in the following format are allowed: `<a href=\"https://www.wix.com\">Click me</a>`.\n * @minLength 1\n * @maxLength 1000\n */\n description?: string | null;\n}\n\nexport enum Severity {\n /** The user is allowed to move forward in the flow. */\n WARNING = 'WARNING',\n /**\n * The user is blocked from moving forward in the flow.\n * For example, if callerContext is CART - moving to checkout is blocked. if callerContext is CHECKOUT, placing an order is blocked.\n */\n ERROR = 'ERROR',\n}\n\n/** @enumType */\nexport type SeverityWithLiterals = Severity | 'WARNING' | 'ERROR';\n\nexport interface Target extends TargetTargetTypeOneOf {\n /** General (other) violation. */\n other?: Other;\n /** Specific line item violation. */\n lineItem?: LineItem;\n}\n\n/** @oneof */\nexport interface TargetTargetTypeOneOf {\n /** General (other) violation. */\n other?: Other;\n /** Specific line item violation. */\n lineItem?: LineItem;\n}\n\n/** Available locations on the webpage */\nexport enum NameInOther {\n /** Default location, in case no specific location is specified. */\n OTHER_DEFAULT = 'OTHER_DEFAULT',\n}\n\n/** @enumType */\nexport type NameInOtherWithLiterals = NameInOther | 'OTHER_DEFAULT';\n\n/** Available locations on the line item */\nexport enum NameInLineItem {\n /** Default location, in case no specific location is specified. */\n LINE_ITEM_DEFAULT = 'LINE_ITEM_DEFAULT',\n}\n\n/** @enumType */\nexport type NameInLineItemWithLiterals = NameInLineItem | 'LINE_ITEM_DEFAULT';\n\nexport enum SuggestedFix {\n /** No suggested fix is specified. The user should refer to the violation description to resolve the issue. */\n UNKNOWN_SUGGESTED_FIX = 'UNKNOWN_SUGGESTED_FIX',\n /** The line item should be removed from the cart or checkout to resolve the violation. */\n REMOVE_LINE_ITEM = 'REMOVE_LINE_ITEM',\n}\n\n/** @enumType */\nexport type SuggestedFixWithLiterals =\n | SuggestedFix\n | 'UNKNOWN_SUGGESTED_FIX'\n | 'REMOVE_LINE_ITEM';\n\n/** General (other) violation. */\nexport interface Other {\n /** Location on a checkout or a cart page where a general (other) violation will be displayed. */\n name?: NameInOtherWithLiterals;\n}\n\n/** Specific line item violation. */\nexport interface LineItem {\n /** Location on a checkout or a cart page where the specific line item violation will be displayed. */\n name?: NameInLineItemWithLiterals;\n /** ID of the line item containing the violation. */\n _id?: string | null;\n /**\n * Suggested fix for resolving the line item violation.\n * @internal\n */\n suggestedFix?: SuggestedFixWithLiterals;\n}\n\nexport interface CreateCurrentCartRequest {\n /** Cart to be created. */\n cart?: Cart;\n /**\n * A list of catalog items to add to the cart.\n * @maxSize 300\n */\n catalogItems?: CatalogItemInput[];\n /**\n * A list of custom items to add to the cart.\n * Custom line items don't trigger the Catalog service plugin.\n *\n * To access and manage custom line items, your app must have the permission scope named \"Manage eCommerce - Admin Permissions\".\n * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).\n * @maxSize 300\n */\n customItems?: CustomItemInput[];\n /**\n * Coupons to apply.\n * Currently only one is supported.\n * If the coupon code is invalid, the cart will be created without it.\n * @maxSize 1\n * @minLength 1\n * @maxLength 50\n */\n couponCodes?: string[];\n /**\n * Gift cards to add.\n * Currently only one is support.\n * If the gift card code is invalid, the cart will be created without it.\n * @maxSize 1\n * @minLength 8\n * @maxLength 20\n */\n giftCardCodes?: string[];\n}\n\nexport interface CatalogItemInput {\n /** A reference to the catalog item. */\n catalogReference?: CatalogReference;\n /**\n * The amount of catalog items requested by the customer.\n * @min 1\n * @max 100000\n */\n quantity?: number;\n /** Selected membership to be used as payment for this item. */\n selectedMembership?: SelectedMembership;\n /**\n * Overriding values for catalog item properties.\n * To override catalog fields, your app must have the permission scope named \"Manage eCommerce - Admin Permissions\".\n * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).\n */\n catalogOverrideFields?: CatalogOverrideFields;\n /**\n * Custom extended fields for the line item object.\n *\n * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls.\n */\n extendedFields?: ExtendedFields;\n /**\n * ID of the app managing the inventory.\n * @format GUID\n */\n inventoryAppId?: string | null;\n}\n\nexport interface CustomItemInput {\n /** The name of the line item. */\n name?: TranslatableString;\n /** Quantity-related information about the line item. */\n quantityInfo?: CustomItemQuantityInfo;\n /** Pricing-related information about the line item. */\n pricing?: CustomItemPricingInfo;\n /** Information about the origin of the line item. */\n source?: CustomItemSource;\n /** Details about the item for display purposes. */\n attributes?: CustomItemAttributes;\n /** Delivery-related information about the line item. */\n deliveryConfig?: CustomItemDeliveryConfig;\n /** Tax-related information about the line item. */\n taxConfig?: CustomItemTaxConfig;\n /** Payment-related information about the line item. */\n paymentConfig?: CustomItemPaymentConfig;\n /**\n * Modifier groups that were added to the item.\n * @maxSize 25\n */\n modifierGroups?: ModifierGroup[];\n}\n\nexport interface CustomItemQuantityInfo {\n /**\n * The amount of items originally requested by the customer.\n * @min 1\n * @max 100000\n */\n requestedQuantity?: number;\n /** The maximum quantity of items available for purchase. */\n availableQuantity?: number | null;\n /** Whether the line item quantity is fixed and cannot be changed. */\n fixedQuantity?: boolean;\n}\n\nexport interface CustomItemPricingInfo {\n /**\n * Sale price of a single item, without modifiers.\n * Includes tax if `tax_info.prices_include_tax` is true.\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0, lte:1000000000000000, maxScale:3 }\n */\n price?: string;\n /**\n * Full price of a single item before any discounts, without modifiers.\n * Defaults to `price` when not provided.\n * Includes tax if `tax_info.prices_include_tax` is true.\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0, lte:1000000000000000, maxScale:3 }\n */\n fullPrice?: string | null;\n /**\n * Additional description for the price.\n * For example, when price is 0 but additional details about the actual price are needed - \"Starts at $67\".\n */\n priceDescription?: PriceDescription;\n /** Indicates whether the price is not yet defined, and will be updated after the order is created. */\n priceUndetermined?: boolean;\n}\n\nexport interface CustomItemSource {\n /**\n * Catalog and item reference.\n * Holds IDs for the item and the catalog it came from, as well as further optional info.\n * Optional for custom line items, which don't trigger the Catalog service plugin.\n */\n catalogReference?: CatalogReference;\n /**\n * In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID.\n * + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID.\n * + in most cases, this field is the same as `catalogReference.catalogItemId`.\n * + Used in membership validation.\n * @minLength 1\n * @maxLength 36\n */\n rootCatalogItemId?: string | null;\n /**\n * ID of the app managing the inventory.\n * @format GUID\n */\n inventoryAppId?: string | null;\n}\n\nexport interface CustomItemAttributes {\n /**\n * Description lines of the item.\n * @maxSize 100\n */\n descriptionLines?: DescriptionLine[];\n /** The image of the item. */\n image?: string;\n /** URL to the item's page on the site. */\n url?: string;\n /** Item type. Either a preset type or custom. */\n itemType?: ItemType;\n /**\n * Physical properties of the item.\n * When relevant, contains information such as SKU, item weight, and shippability.\n */\n physicalProperties?: PhysicalProperties;\n /** Subscription option information. */\n subscriptionInfo?: SubscriptionOptionInfo;\n /** Service properties. When relevant, this contains information such as date and number of participants. */\n serviceProperties?: ServiceProperties;\n /**\n * Whether the item can only be purchased by site members.\n * Default: `false`\n */\n membersOnly?: boolean;\n}\n\nexport interface CustomItemDeliveryConfig {\n /**\n * Delivery profile ID.\n * @format GUID\n */\n deliveryProfileId?: string | null;\n}\n\nexport interface CustomItemTaxConfig {\n /** Address to use for tax calculation purposes. */\n taxableAddress?: TaxableAddress;\n /**\n * Tax group ID for this line item.\n * @maxLength 50\n */\n taxGroupId?: string | null;\n}\n\nexport interface CustomItemPaymentConfig {\n /**\n * Partial payment to be paid upfront during the checkout.\n * Eligible for catalog items with `lineItem.paymentOption` type `DEPOSIT_ONLINE` only.\n */\n depositAmount?: MultiCurrencyPrice;\n /**\n * Type of selected payment option for current item.\n *\n * Default: `FULL_PAYMENT_ONLINE`\n */\n paymentOption?: PaymentOptionTypeWithLiterals;\n}\n\nexport interface CreateCurrentCartResponse {\n /** The created Cart. */\n cart?: Cart;\n}\n\nexport interface GetCurrentCartRequest {}\n\nexport interface GetCurrentCartResponse {\n /** The requested Cart. */\n cart?: Cart;\n}\n\nexport interface UpdateCurrentCartRequest {\n /** Cart to be updated, may be partial. */\n cart?: Cart;\n}\n\nexport interface UpdateCurrentCartResponse {\n /** Updated Cart. */\n cart?: Cart;\n}\n\nexport interface DeleteCurrentCartRequest {}\n\nexport interface DeleteCurrentCartResponse {}\n\nexport interface RefreshCurrentCartRequest {}\n\nexport interface RefreshCurrentCartResponse {\n /** Synchronized Cart. */\n cart?: Cart;\n}\n\nexport interface CalculateCurrentCartRequest {\n /**\n * Specifies the level of **business validation** to perform during cart calculation,\n * by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).\n */\n validationsConfig?: ValidationsConfigWithLiterals;\n /**\n * Optional custom configuration for the calculation.\n * If not provided, all price components are calculated by default.\n */\n customCalculationConfig?: CalculationConfig;\n}\n\nexport enum ValidationsConfig {\n UNKNOWN_VALIDATIONS_CONFIG = 'UNKNOWN_VALIDATIONS_CONFIG',\n /** No business validations are performed. */\n SKIP_VALIDATIONS = 'SKIP_VALIDATIONS',\n /** Perform cart-level business validations as defined by the service plugin implementer. */\n PRE_CHECKOUT_VALIDATIONS = 'PRE_CHECKOUT_VALIDATIONS',\n /** Perform checkout-specific business validations as defined by the service plugin implementer. */\n CHECKOUT_VALIDATIONS = 'CHECKOUT_VALIDATIONS',\n}\n\n/** @enumType */\nexport type ValidationsConfigWithLiterals =\n | ValidationsConfig\n | 'UNKNOWN_VALIDATIONS_CONFIG'\n | 'SKIP_VALIDATIONS'\n | 'PRE_CHECKOUT_VALIDATIONS'\n | 'CHECKOUT_VALIDATIONS';\n\nexport interface CalculationConfig {\n /**\n * Whether to calculate delivery costs.\n * Default: false\n */\n calculateDelivery?: boolean;\n /**\n * Whether to calculate any additional fees.\n * Default: false\n */\n calculateAdditionalFees?: boolean;\n /**\n * Whether to include tax calculation.\n * Default: false\n */\n calculateTax?: boolean;\n /**\n * Whether to calculate the effect of gift card balances on the cart total.\n * Gift cards are not redeemed - only reflected for estimation purposes.\n * Default: false\n */\n calculateGiftCards?: boolean;\n}\n\nexport interface CalculateCurrentCartResponse {\n /** The Cart that was calculated. */\n cart?: Cart;\n /** The calculation summary. */\n summary?: CartSummary;\n}\n\nexport interface AddLineItemsToCurrentCartRequest {\n /**\n * A list of catalog items to add to the cart.\n * @maxSize 300\n */\n catalogItems?: CatalogItemInput[];\n /**\n * A list of custom items to add to the cart.\n * @maxSize 300\n */\n customItems?: CustomItemInput[];\n}\n\nexport interface AddLineItemsToCurrentCartResponse {\n /** Updated Cart. */\n cart?: Cart;\n}\n\nexport interface RemoveLineItemsFromCurrentCartRequest {\n /**\n * Line item IDs to remove from cart.\n * @format GUID\n * @minSize 1\n * @maxSize 100\n */\n lineItemIds?: string[];\n}\n\nexport interface RemoveLineItemsFromCurrentCartResponse {\n /** Updated Cart. */\n cart?: Cart;\n}\n\nexport interface UpdateLineItemsInCurrentCartRequest {\n /**\n * Line item updates to apply.\n * @minSize 1\n * @maxSize 100\n */\n lineItems?: LineItemUpdate[];\n}\n\nexport interface LineItemUpdate {\n /**\n * Line item ID to update.\n * @format GUID\n */\n lineItemId?: string;\n /** Quantity update (optional - if not provided, quantity is not updated) */\n quantity?: QuantityUpdate;\n /** Selected membership update (optional - if not provided, membership is not updated) */\n selectedMembership?: SelectedMembershipUpdate;\n}\n\nexport interface QuantityUpdate {\n /**\n * The new quantity of the line item.\n * @min 1\n * @max 100000\n */\n newQuantity?: number;\n}\n\nexport interface SelectedMembershipUpdate {\n /**\n * The new selectedMembership of the item.\n *\n * To just remove current selected membership, and not replace with a new one, pass an empty value here.\n */\n newMembership?: SelectedMembership;\n}\n\nexport interface UpdateLineItemsInCurrentCartResponse {\n /** Updated Cart. */\n cart?: Cart;\n}\n\nexport interface AddCouponToCurrentCartRequest {\n /**\n * Coupon to apply.\n *\n * Currently only one is supported.\n * @minLength 1\n * @maxLength 50\n */\n couponCode?: string;\n}\n\nexport interface AddCouponToCurrentCartResponse {\n /** Updated Cart. */\n cart?: Cart;\n}\n\nexport interface RemoveCouponFromCurrentCartRequest {\n /**\n * Coupon ID.\n * @format GUID\n */\n couponId?: string;\n}\n\nexport interface RemoveCouponFromCurrentCartResponse {\n /** Updated Cart. */\n cart?: Cart;\n}\n\nexport interface AddGiftCardToCurrentCartRequest {\n /**\n * Gift card code.\n *\n * Currently only one is supported.\n * @maxLength 50\n */\n giftCardCode?: string;\n}\n\nexport interface AddGiftCardToCurrentCartResponse {\n /** Updated Cart. */\n cart?: Cart;\n}\n\nexport interface RemoveGiftCardFromCurrentCartRequest {\n /**\n * Gift card ID.\n * @format GUID\n */\n giftCardId?: string;\n}\n\nexport interface RemoveGiftCardFromCurrentCartResponse {\n /** Updated Cart. */\n cart?: Cart;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface CreateCartRequest {\n /** Cart to be created. */\n cart?: Cart;\n /**\n * A list of catalog items to add to the cart.\n * @maxSize 300\n */\n catalogItems?: CatalogItemInput[];\n /**\n * A list of custom items to add to the cart.\n * Custom line items don't trigger the Catalog service plugin.\n *\n * To access and manage custom line items, your app must have the permission scope named \"Manage eCommerce - Admin Permissions\".\n * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).\n * @maxSize 300\n */\n customItems?: CustomItemInput[];\n /**\n * Coupons to apply.\n * Currently only one is supported.\n * If the coupon code is invalid, the cart will be created without it.\n * @maxSize 1\n * @minLength 1\n * @maxLength 50\n */\n couponCodes?: string[];\n /**\n * Gift cards to add.\n * Currently only one is support.\n * If the gift card code is invalid, the cart will be created without it.\n * @maxSize 1\n * @minLength 8\n * @maxLength 20\n */\n giftCardCodes?: string[];\n}\n\nexport interface CreateCartResponse {\n /** The created Cart. */\n cart?: Cart;\n}\n\nexport interface GetCartRequest {\n /**\n * ID of the Cart to retrieve.\n * @format GUID\n */\n cartId: string;\n}\n\nexport interface GetCartResponse {\n /** The requested Cart. */\n cart?: Cart;\n}\n\nexport interface UpdateCartRequest {\n /** Cart to be updated, may be partial. */\n cart: Cart;\n}\n\nexport interface UpdateCartResponse {\n /** Updated Cart. */\n cart?: Cart;\n}\n\nexport interface DeleteCartRequest {\n /**\n * ID of the Cart to delete.\n * @format GUID\n */\n cartId: string;\n}\n\nexport interface DeleteCartResponse {}\n\nexport interface RefreshCartRequest {\n /**\n * ID of the Cart to refresh.\n * @format GUID\n */\n cartId: string;\n}\n\nexport interface RefreshCartResponse {\n /** Synchronized Cart. */\n cart?: Cart;\n}\n\nexport interface CalculateCartRequest {\n /**\n * ID of the Cart to calculate.\n * @format GUID\n */\n cartId: string;\n /**\n * Specifies the level of **business validation** to perform during cart calculation,\n * by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).\n */\n validationsConfig?: ValidationsConfigWithLiterals;\n /**\n * Optional custom configuration for the calculation.\n * If not provided, all price components are calculated by default.\n */\n customCalculationConfig?: CalculationConfig;\n}\n\nexport interface CalculateCartResponse {\n /** The Cart that was calculated. */\n cart?: Cart;\n /** The calculation summary. */\n summary?: CartSummary;\n}\n\nexport interface GetCheckoutURLRequest {\n /**\n * ID of the Cart to calculate.\n * @format GUID\n */\n cartId: string;\n /**\n * Checkout currency parameter to append as a query param\n * @format CURRENCY\n */\n currencyCode?: string | null;\n}\n\nexport interface GetCheckoutURLResponse {\n /**\n * The checkout URL.\n * @format WEB_URL\n */\n checkoutUrl?: string;\n}\n\nexport interface PlaceOrderRequest {\n /**\n * Cart ID.\n * @format GUID\n */\n cartId: string;\n /**\n * The pricing token received from `CalculateCart`'s response.\n * Used to verify that the prices shown to the customer have not changed before completing checkout.\n * @maxLength 3000\n */\n pricingToken?: string | null;\n /**\n * Payment token.\n * @maxLength 100\n */\n paymentToken?: string | null;\n /** Urls to redirect to after payment is made. */\n redirectUrls?: RedirectUrls;\n /** Indicates the payment method should be saved on the order */\n savePaymentMethod?: boolean;\n /** Indicates whether to authorize the payment and delay the capture */\n delayCapture?: boolean;\n}\n\nexport interface RedirectUrls {\n /**\n * URL to redirect to if payment is canceled (usually checkout url).\n * @format WEB_URL\n */\n cancelUrl?: string;\n /**\n * URL to redirect to if an error occurred on payment (usually checkout url).\n * @format WEB_URL\n */\n errorUrl?: string;\n /**\n * URL to redirect to after successful payment, excepts order place holder {orderId}.\n * @maxLength 2000\n */\n successUrl?: string | null;\n /**\n * URL to redirect to if payment is pending, excepts order place holder {orderId}.\n * @maxLength 2000\n */\n pendingUrl?: string | null;\n}\n\nexport interface PlaceOrderResponse {\n /**\n * The order ID of the created order.\n * @format GUID\n */\n orderId?: string;\n /**\n * Payment response token.\n * @maxLength 1000\n */\n paymentResponseToken?: string | null;\n /**\n * The payment gateway is Cashier.\n * payment_gateway_order_id will be returned given that money was charged.\n * In some cases, money will not be charged:\n * If the total price is 0 - For example, could be a free item or a an item with 100% discount\n * If the total price is not 0, but the payment is covered by alternative payment methods such as gift card\n * @maxLength 50\n */\n paymentGatewayOrderId?: string | null;\n /** Whether an order was successfully created from this cart and the payment transaction was completed. */\n cartCompleted?: boolean;\n}\n\nexport interface AddLineItemsRequest {\n /**\n * Cart ID.\n * @format GUID\n */\n cartId: string;\n /**\n * A list of catalog items to add to the cart.\n * @maxSize 300\n */\n catalogItems?: CatalogItemInput[];\n /**\n * A list of custom items to add to the cart.\n * @maxSize 300\n */\n customItems?: CustomItemInput[];\n}\n\nexport interface AddLineItemsResponse {\n /** Updated Cart. */\n cart?: Cart;\n}\n\nexport interface RemoveLineItemsRequest {\n /**\n * Cart ID.\n * @format GUID\n */\n cartId: string;\n /**\n * Line item IDs to remove from cart.\n * @format GUID\n * @minSize 1\n * @maxSize 100\n */\n lineItemIds: string[];\n}\n\nexport interface RemoveLineItemsResponse {\n /** Updated Cart. */\n cart?: Cart;\n}\n\nexport interface UpdateLineItemsRequest {\n /**\n * Cart ID.\n * @format GUID\n */\n cartId: string;\n /**\n * Line item updates to apply.\n * @minSize 1\n * @maxSize 300\n */\n lineItems?: LineItemUpdate[];\n}\n\nexport interface UpdateLineItemsResponse {\n /** Updated Cart. */\n cart?: Cart;\n}\n\nexport interface AddCouponRequest {\n /**\n * Cart ID.\n * @format GUID\n */\n cartId: string;\n /**\n * Coupon to apply.\n *\n * Currently only one is supported.\n * @minLength 1\n * @maxLength 50\n */\n couponCode: string;\n}\n\nexport interface AddCouponResponse {\n /** Updated Cart. */\n cart?: Cart;\n}\n\nexport interface RemoveCouponRequest {\n /**\n * Cart ID.\n * @format GUID\n */\n cartId: string;\n /**\n * Discount ID.\n * @format GUID\n */\n couponId: string;\n}\n\nexport interface RemoveCouponResponse {\n /** Updated Cart. */\n cart?: Cart;\n}\n\nexport interface AddGiftCardRequest {\n /**\n * Cart ID.\n * @format GUID\n */\n cartId: string;\n /**\n * Gift card code.\n *\n * Currently only one is supported.\n * @maxLength 50\n */\n giftCardCode: string;\n}\n\nexport interface AddGiftCardResponse {\n /** Updated Cart. */\n cart?: Cart;\n}\n\nexport interface RemoveGiftCardRequest {\n /**\n * Cart ID.\n * @format GUID\n */\n cartId: string;\n /**\n * Gift card ID.\n * @format GUID\n */\n giftCardId: string;\n}\n\nexport interface RemoveGiftCardResponse {\n /** Updated Cart. */\n cart?: Cart;\n}\n\nexport interface MarkCartAsCompletedRequest {\n /**\n * Cart ID.\n * @format GUID\n */\n cartId: string;\n /**\n * Order ID.\n * @format GUID\n */\n orderId?: string | null;\n}\n\nexport interface MarkCartAsCompletedResponse {\n /** Updated Cart. */\n cart?: Cart;\n}\n\nexport interface Empty {}\n\nexport interface HandleAsyncCheckoutCompletionRequest {\n /**\n * Server-signed JWT token with required information to complete checkout\n * @maxLength 4096\n */\n token: string;\n}\n\nexport interface RawHttpResponse {\n body?: Uint8Array;\n statusCode?: number | null;\n headers?: HeadersEntry[];\n}\n\nexport interface HeadersEntry {\n key?: string;\n value?: string;\n}\n\n/**\n * Creates a Cart.\n * @internal\n * @documentationMaturity preview\n * @requiredField options.catalogItems.catalogReference\n * @requiredField options.catalogItems.quantity\n * @requiredField options.catalogItems.selectedMembership._id\n * @requiredField options.catalogItems.selectedMembership.appId\n * @requiredField options.customItems.name\n * @requiredField options.customItems.pricing\n * @requiredField options.customItems.quantityInfo\n * @requiredField options.customItems.quantityInfo.requestedQuantity\n * @permissionId ecom:v2:cart:create_cart\n * @permissionId ECOM.ADMIN_MODIFY_CARTS\n * @applicableIdentity APP\n * @returns The created Cart.\n * @fqn wix.ecom.cart.v2.CartService.CreateCart\n */\nexport async function createCart(\n options?: NonNullablePaths<\n CreateCartOptions,\n | `catalogItems.${number}.catalogReference`\n | `catalogItems.${number}.quantity`\n | `catalogItems.${number}.selectedMembership._id`\n | `catalogItems.${number}.selectedMembership.appId`\n | `customItems.${number}.attributes.descriptionLines.${number}.name`\n | `customItems.${number}.name`\n | `customItems.${number}.pricing`\n | `customItems.${number}.pricing.price`\n | `customItems.${number}.quantityInfo`\n | `customItems.${number}.quantityInfo.requestedQuantity`,\n 7\n >\n): Promise<\n NonNullablePaths<\n Cart,\n | `_id`\n | `lineItems`\n | `lineItems.${number}._id`\n | `lineItems.${number}.name.original`\n | `lineItems.${number}.quantityInfo.confirmedQuantity`\n | `lineItems.${number}.quantityInfo.requestedQuantity`\n | `lineItems.${number}.quantityInfo.fixedQuantity`\n | `lineItems.${number}.pricing.unitPrice.amount`\n | `lineItems.${number}.pricing.unitPrice.convertedAmount`\n | `lineItems.${number}.pricing.unitPrice.formattedAmount`\n | `lineItems.${number}.pricing.unitPrice.formattedConvertedAmount`\n | `lineItems.${number}.pricing.priceDescription.original`\n | `lineItems.${number}.pricing.priceUndetermined`\n | `lineItems.${number}.source.catalogReference.catalogItemId`\n | `lineItems.${number}.source.catalogReference.appId`\n | `lineItems.${number}.attributes.itemType.preset`\n | `lineItems.${number}.attributes.itemType.custom`\n | `lineItems.${number}.attributes.physicalProperties.shippable`\n | `lineItems.${number}.attributes.membersOnly`\n | `lineItems.${number}.taxConfig.taxableAddress.addressType`\n | `lineItems.${number}.paymentConfig.savePaymentMethod`\n | `lineItems.${number}.paymentConfig.selectedMembership._id`\n | `lineItems.${number}.paymentConfig.selectedMembership.appId`\n | `lineItems.${number}.paymentConfig.paymentOption`\n | `lineItems.${number}.status`\n | `lineItems.${number}.customLineItem`\n | `coupons`\n | `coupons.${number}._id`\n | `coupons.${number}.code`\n | `source.channelType`\n | `source.externalReferences`\n | `source.externalReferences.${number}.appId`\n | `source.createdBy.visitorId`\n | `source.createdBy.memberId`\n | `source.createdBy.userId`\n | `source.createdBy.appId`\n | `source.customContentReference.appId`\n | `source.customContentReference.componentId`\n | `businessInfo.languageCode`\n | `businessInfo.currencyCode`\n | `customerInfo.visitorId`\n | `customerInfo.memberId`\n | `customerInfo.userId`\n | `customerInfo.vatId._id`\n | `customerInfo.vatId.type`\n | `customerInfo.languageCode`\n | `customerInfo.currencyCode`\n | `deliveryInfo.address.streetAddress.number`\n | `deliveryInfo.address.streetAddress.name`\n | `deliveryInfo.method.code`\n | `deliveryInfo.method.pickup`\n | `deliveryInfo.weightUnit`\n | `taxInfo.pricesIncludeTax`\n | `paymentInfo.giftCards`\n | `paymentInfo.giftCards.${number}._id`\n | `paymentInfo.giftCards.${number}.obfuscatedCode`\n | `paymentInfo.giftCards.${number}.appId`\n | `paymentInfo.currencyCode`\n | `orderPlaced`\n | `settings.lockGiftCard`\n | `settings.lockCouponCode`\n | `settings.policyAgreementCheckboxDisabled`\n | `settings.manualPaymentDisabled`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n cart: options?.cart,\n catalogItems: options?.catalogItems,\n customItems: options?.customItems,\n couponCodes: options?.couponCodes,\n giftCardCodes: options?.giftCardCodes,\n }),\n [\n {\n transformFn: transformSDKImageToRESTImage,\n paths: [\n { path: 'cart.lineItems.source.catalogOverrideFields.image' },\n { path: 'cart.lineItems.attributes.image' },\n { path: 'catalogItems.catalogOverrideFields.image' },\n { path: 'customItems.attributes.image' },\n ],\n },\n {\n transformFn: transformSDKPageURLV2ToRESTPageURLV2,\n paths: [\n { path: 'cart.lineItems.attributes.url' },\n { path: 'customItems.attributes.url' },\n ],\n },\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: [\n { path: 'cart.deliveryInfo.address' },\n { path: 'cart.paymentInfo.billingAddress' },\n ],\n },\n ]\n );\n\n const reqOpts = ambassadorWixEcomV2Cart.createCart(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'cart.lineItems.source.catalogOverrideFields.image' },\n { path: 'cart.lineItems.attributes.image' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [{ path: 'cart.lineItems.attributes.url' }],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'cart.deliveryInfo.address' },\n { path: 'cart.paymentInfo.billingAddress' },\n ],\n },\n ])\n )?.cart!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n cart: '$[0].cart',\n catalogItems: '$[0].catalogItems',\n customItems: '$[0].customItems',\n couponCodes: '$[0].couponCodes',\n giftCardCodes: '$[0].giftCardCodes',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CreateCartOptions {\n /** Cart to be created. */\n cart?: Cart;\n /**\n * A list of catalog items to add to the cart.\n * @maxSize 300\n */\n catalogItems?: CatalogItemInput[];\n /**\n * A list of custom items to add to the cart.\n * Custom line items don't trigger the Catalog service plugin.\n *\n * To access and manage custom line items, your app must have the permission scope named \"Manage eCommerce - Admin Permissions\".\n * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).\n * @maxSize 300\n */\n customItems?: CustomItemInput[];\n /**\n * Coupons to apply.\n * Currently only one is supported.\n * If the coupon code is invalid, the cart will be created without it.\n * @maxSize 1\n * @minLength 1\n * @maxLength 50\n */\n couponCodes?: string[];\n /**\n * Gift cards to add.\n * Currently only one is support.\n * If the gift card code is invalid, the cart will be created without it.\n * @maxSize 1\n * @minLength 8\n * @maxLength 20\n */\n giftCardCodes?: string[];\n}\n\n/**\n * Retrieves a Cart.\n * @param cartId - ID of the Cart to retrieve.\n * @internal\n * @documentationMaturity preview\n * @requiredField cartId\n * @permissionId ecom:v2:cart:get_cart\n * @returns The requested Cart.\n * @fqn wix.ecom.cart.v2.CartService.GetCart\n */\nexport async function getCart(\n cartId: string\n): Promise<\n NonNullablePaths<\n Cart,\n | `_id`\n | `lineItems`\n | `lineItems.${number}._id`\n | `lineItems.${number}.name.original`\n | `lineItems.${number}.quantityInfo.confirmedQuantity`\n | `lineItems.${number}.quantityInfo.requestedQuantity`\n | `lineItems.${number}.quantityInfo.fixedQuantity`\n | `lineItems.${number}.pricing.unitPrice.amount`\n | `lineItems.${number}.pricing.unitPrice.convertedAmount`\n | `lineItems.${number}.pricing.unitPrice.formattedAmount`\n | `lineItems.${number}.pricing.unitPrice.formattedConvertedAmount`\n | `lineItems.${number}.pricing.priceDescription.original`\n | `lineItems.${number}.pricing.priceUndetermined`\n | `lineItems.${number}.source.catalogReference.catalogItemId`\n | `lineItems.${number}.source.catalogReference.appId`\n | `lineItems.${number}.attributes.itemType.preset`\n | `lineItems.${number}.attributes.itemType.custom`\n | `lineItems.${number}.attributes.physicalProperties.shippable`\n | `lineItems.${number}.attributes.membersOnly`\n | `lineItems.${number}.taxConfig.taxableAddress.addressType`\n | `lineItems.${number}.paymentConfig.savePaymentMethod`\n | `lineItems.${number}.paymentConfig.selectedMembership._id`\n | `lineItems.${number}.paymentConfig.selectedMembership.appId`\n | `lineItems.${number}.paymentConfig.paymentOption`\n | `lineItems.${number}.status`\n | `lineItems.${number}.customLineItem`\n | `coupons`\n | `coupons.${number}._id`\n | `coupons.${number}.code`\n | `source.channelType`\n | `source.externalReferences`\n | `source.externalReferences.${number}.appId`\n | `source.createdBy.visitorId`\n | `source.createdBy.memberId`\n | `source.createdBy.userId`\n | `source.createdBy.appId`\n | `source.customContentReference.appId`\n | `source.customContentReference.componentId`\n | `businessInfo.languageCode`\n | `businessInfo.currencyCode`\n | `customerInfo.visitorId`\n | `customerInfo.memberId`\n | `customerInfo.userId`\n | `customerInfo.vatId._id`\n | `customerInfo.vatId.type`\n | `customerInfo.languageCode`\n | `customerInfo.currencyCode`\n | `deliveryInfo.address.streetAddress.number`\n | `deliveryInfo.address.streetAddress.name`\n | `deliveryInfo.method.code`\n | `deliveryInfo.method.pickup`\n | `deliveryInfo.weightUnit`\n | `taxInfo.pricesIncludeTax`\n | `paymentInfo.giftCards`\n | `paymentInfo.giftCards.${number}._id`\n | `paymentInfo.giftCards.${number}.obfuscatedCode`\n | `paymentInfo.giftCards.${number}.appId`\n | `paymentInfo.currencyCode`\n | `orderPlaced`\n | `settings.lockGiftCard`\n | `settings.lockCouponCode`\n | `settings.policyAgreementCheckboxDisabled`\n | `settings.manualPaymentDisabled`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ cartId: cartId });\n\n const reqOpts = ambassadorWixEcomV2Cart.getCart(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'cart.lineItems.source.catalogOverrideFields.image' },\n { path: 'cart.lineItems.attributes.image' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [{ path: 'cart.lineItems.attributes.url' }],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'cart.deliveryInfo.address' },\n { path: 'cart.paymentInfo.billingAddress' },\n ],\n },\n ])\n )?.cart!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { cartId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['cartId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates a Cart.\n *\n * Use this endpoint to set and replace fields such as buyer note and delivery method.\n * To add or remove elements from lists (e.g., line items, discounts, gift cards), use their dedicated endpoints.\n * @param _id - Cart ID.\n * @internal\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField cart\n * @permissionId ecom:v2:cart:update_cart\n * @permissionId ECOM.ADMIN_MODIFY_CARTS\n * @applicableIdentity APP\n * @returns Updated Cart.\n * @fqn wix.ecom.cart.v2.CartService.UpdateCart\n */\nexport async function updateCart(\n _id: string,\n cart: UpdateCart\n): Promise<\n NonNullablePaths<\n Cart,\n | `_id`\n | `lineItems`\n | `lineItems.${number}._id`\n | `lineItems.${number}.name.original`\n | `lineItems.${number}.quantityInfo.confirmedQuantity`\n | `lineItems.${number}.quantityInfo.requestedQuantity`\n | `lineItems.${number}.quantityInfo.fixedQuantity`\n | `lineItems.${number}.pricing.unitPrice.amount`\n | `lineItems.${number}.pricing.unitPrice.convertedAmount`\n | `lineItems.${number}.pricing.unitPrice.formattedAmount`\n | `lineItems.${number}.pricing.unitPrice.formattedConvertedAmount`\n | `lineItems.${number}.pricing.priceDescription.original`\n | `lineItems.${number}.pricing.priceUndetermined`\n | `lineItems.${number}.source.catalogReference.catalogItemId`\n | `lineItems.${number}.source.catalogReference.appId`\n | `lineItems.${number}.attributes.itemType.preset`\n | `lineItems.${number}.attributes.itemType.custom`\n | `lineItems.${number}.attributes.physicalProperties.shippable`\n | `lineItems.${number}.attributes.membersOnly`\n | `lineItems.${number}.taxConfig.taxableAddress.addressType`\n | `lineItems.${number}.paymentConfig.savePaymentMethod`\n | `lineItems.${number}.paymentConfig.selectedMembership._id`\n | `lineItems.${number}.paymentConfig.selectedMembership.appId`\n | `lineItems.${number}.paymentConfig.paymentOption`\n | `lineItems.${number}.status`\n | `lineItems.${number}.customLineItem`\n | `coupons`\n | `coupons.${number}._id`\n | `coupons.${number}.code`\n | `source.channelType`\n | `source.externalReferences`\n | `source.externalReferences.${number}.appId`\n | `source.createdBy.visitorId`\n | `source.createdBy.memberId`\n | `source.createdBy.userId`\n | `source.createdBy.appId`\n | `source.customContentReference.appId`\n | `source.customContentReference.componentId`\n | `businessInfo.languageCode`\n | `businessInfo.currencyCode`\n | `customerInfo.visitorId`\n | `customerInfo.memberId`\n | `customerInfo.userId`\n | `customerInfo.vatId._id`\n | `customerInfo.vatId.type`\n | `customerInfo.languageCode`\n | `customerInfo.currencyCode`\n | `deliveryInfo.address.streetAddress.number`\n | `deliveryInfo.address.streetAddress.name`\n | `deliveryInfo.method.code`\n | `deliveryInfo.method.pickup`\n | `deliveryInfo.weightUnit`\n | `taxInfo.pricesIncludeTax`\n | `paymentInfo.giftCards`\n | `paymentInfo.giftCards.${number}._id`\n | `paymentInfo.giftCards.${number}.obfuscatedCode`\n | `paymentInfo.giftCards.${number}.appId`\n | `paymentInfo.currencyCode`\n | `orderPlaced`\n | `settings.lockGiftCard`\n | `settings.lockCouponCode`\n | `settings.policyAgreementCheckboxDisabled`\n | `settings.manualPaymentDisabled`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({ cart: { ...cart, id: _id } }),\n [\n {\n transformFn: transformSDKImageToRESTImage,\n paths: [\n { path: 'cart.lineItems.source.catalogOverrideFields.image' },\n { path: 'cart.lineItems.attributes.image' },\n ],\n },\n {\n transformFn: transformSDKPageURLV2ToRESTPageURLV2,\n paths: [{ path: 'cart.lineItems.attributes.url' }],\n },\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: [\n { path: 'cart.deliveryInfo.address' },\n { path: 'cart.paymentInfo.billingAddress' },\n ],\n },\n ]\n );\n\n const reqOpts = ambassadorWixEcomV2Cart.updateCart(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'cart.lineItems.source.catalogOverrideFields.image' },\n { path: 'cart.lineItems.attributes.image' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [{ path: 'cart.lineItems.attributes.url' }],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'cart.deliveryInfo.address' },\n { path: 'cart.paymentInfo.billingAddress' },\n ],\n },\n ])\n )?.cart!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { cart: '$[1]' },\n explicitPathsToArguments: { 'cart.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'cart']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateCart {\n /**\n * Cart ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * Date and time the Cart was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the Cart was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Revision number, which increments by 1 each time the Cart is updated.\n * @readonly\n */\n revision?: string | null;\n /**\n * Line items added to the Cart by the customer.\n * This list may include both valid items (in stock) and invalid ones (e.g., out of stock).\n * When submitting an order, only valid items will be included in the order.\n * @maxSize 300\n * @readonly\n */\n lineItems?: V2LineItem[];\n /** The sum of all line item final prices. */\n subtotal?: MultiCurrencyPrice;\n /**\n * Optional message left by the customer.\n * Usually intended for the merchant and contain special instructions, requests, or clarifications related to the order.\n * @maxLength 1000\n */\n note?: string | null;\n /**\n * List of coupons added to the Cart.\n * Currently, only one coupon code is supported.\n * @maxSize 1\n */\n coupons?: Coupon[];\n /** Information about the source of the Cart, detailing the origin or context in which the Cart was created. */\n source?: CartSource;\n /** Information about the site from which the Cart's line items were added. */\n businessInfo?: BusinessInfo;\n /** Information about the customer that owns the Cart. */\n customerInfo?: CustomerInfo;\n /** Delivery-related information associated with the Cart. */\n deliveryInfo?: DeliveryInfo;\n /** Tax-related information associated with the Cart. */\n taxInfo?: TaxInfo;\n /** Payment-related information associated with the Cart. */\n paymentInfo?: PaymentInfo;\n /**\n * Whether the Cart has been placed as an Order.\n * Defaults to `false`.\n * @readonly\n */\n orderPlaced?: boolean;\n /**\n * The ID of the Order created from the Cart.\n * This field is empty until the checkout process is completed.\n * @format GUID\n * @readonly\n */\n orderId?: string | null;\n /**\n * Persistent ID that correlates between the Cart and the created Order (after the checkout is completed).\n * @format GUID\n * @readonly\n */\n purchaseFlowId?: string | null;\n /**\n * Additional Cart settings.\n *\n * > **Notes:**\n * > * Custom settings can only be set when creating a Cart.\n * > * To access and manage custom checkout page content, your app must have the permission scope named \"Manage eCommerce - Admin Permissions\". Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).\n * @immutable\n */\n settings?: CartSettings;\n /**\n * Custom checkout URL to redirect the customer to a checkout page.\n * By default, customers are redirected to the standard Wix checkout page.\n * Clients can override this behavior by providing their own URL here.\n * If the URL contains the placeholder `{checkout_id}`, it will be replaced with the actual Cart ID.\n * @maxLength 2048\n */\n customCheckoutUrl?: string | null;\n /**\n * Custom fields.\n * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls.\n */\n extendedFields?: ExtendedFields;\n}\n\n/**\n * Deletes a Cart.\n * @param cartId - ID of the Cart to delete.\n * @internal\n * @documentationMaturity preview\n * @requiredField cartId\n * @permissionId ecom:v2:cart:delete_cart\n * @fqn wix.ecom.cart.v2.CartService.DeleteCart\n */\nexport async function deleteCart(cartId: string): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ cartId: cartId });\n\n const reqOpts = ambassadorWixEcomV2Cart.deleteCart(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { cartId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['cartId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Re-evaluates prices, inventory and discounts to ensure the Cart is up-to-date with the latest changes.\n * @param cartId - ID of the Cart to refresh.\n * @internal\n * @documentationMaturity preview\n * @requiredField cartId\n * @permissionId ecom:v2:cart:refresh_cart\n * @fqn wix.ecom.cart.v2.CartService.RefreshCart\n */\nexport async function refreshCart(\n cartId: string\n): Promise<\n NonNullablePaths<\n RefreshCartResponse,\n | `cart._id`\n | `cart.lineItems`\n | `cart.lineItems.${number}._id`\n | `cart.lineItems.${number}.name.original`\n | `cart.lineItems.${number}.quantityInfo.confirmedQuantity`\n | `cart.lineItems.${number}.quantityInfo.requestedQuantity`\n | `cart.lineItems.${number}.quantityInfo.fixedQuantity`\n | `cart.lineItems.${number}.pricing.unitPrice.amount`\n | `cart.lineItems.${number}.pricing.unitPrice.convertedAmount`\n | `cart.lineItems.${number}.pricing.unitPrice.formattedAmount`\n | `cart.lineItems.${number}.pricing.unitPrice.formattedConvertedAmount`\n | `cart.lineItems.${number}.pricing.priceDescription.original`\n | `cart.lineItems.${number}.pricing.priceUndetermined`\n | `cart.lineItems.${number}.source.catalogReference.catalogItemId`\n | `cart.lineItems.${number}.source.catalogReference.appId`\n | `cart.lineItems.${number}.attributes.itemType.preset`\n | `cart.lineItems.${number}.attributes.itemType.custom`\n | `cart.lineItems.${number}.attributes.physicalProperties.shippable`\n | `cart.lineItems.${number}.attributes.membersOnly`\n | `cart.lineItems.${number}.taxConfig.taxableAddress.addressType`\n | `cart.lineItems.${number}.paymentConfig.savePaymentMethod`\n | `cart.lineItems.${number}.paymentConfig.selectedMembership._id`\n | `cart.lineItems.${number}.paymentConfig.selectedMembership.appId`\n | `cart.lineItems.${number}.paymentConfig.paymentOption`\n | `cart.lineItems.${number}.status`\n | `cart.lineItems.${number}.customLineItem`\n | `cart.coupons`\n | `cart.coupons.${number}._id`\n | `cart.coupons.${number}.code`\n | `cart.source.channelType`\n | `cart.source.externalReferences`\n | `cart.source.externalReferences.${number}.appId`\n | `cart.source.createdBy.visitorId`\n | `cart.source.createdBy.memberId`\n | `cart.source.createdBy.userId`\n | `cart.source.createdBy.appId`\n | `cart.source.customContentReference.appId`\n | `cart.source.customContentReference.componentId`\n | `cart.businessInfo.languageCode`\n | `cart.businessInfo.currencyCode`\n | `cart.customerInfo.visitorId`\n | `cart.customerInfo.memberId`\n | `cart.customerInfo.userId`\n | `cart.customerInfo.vatId._id`\n | `cart.customerInfo.vatId.type`\n | `cart.customerInfo.languageCode`\n | `cart.customerInfo.currencyCode`\n | `cart.deliveryInfo.address.streetAddress.number`\n | `cart.deliveryInfo.address.streetAddress.name`\n | `cart.deliveryInfo.method.code`\n | `cart.deliveryInfo.method.pickup`\n | `cart.deliveryInfo.weightUnit`\n | `cart.taxInfo.pricesIncludeTax`\n | `cart.paymentInfo.giftCards`\n | `cart.paymentInfo.giftCards.${number}._id`\n | `cart.paymentInfo.giftCards.${number}.obfuscatedCode`\n | `cart.paymentInfo.giftCards.${number}.appId`\n | `cart.paymentInfo.currencyCode`\n | `cart.orderPlaced`\n | `cart.settings.lockGiftCard`\n | `cart.settings.lockCouponCode`\n | `cart.settings.policyAgreementCheckboxDisabled`\n | `cart.settings.manualPaymentDisabled`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ cartId: cartId });\n\n const reqOpts = ambassadorWixEcomV2Cart.refreshCart(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'cart.lineItems.source.catalogOverrideFields.image' },\n { path: 'cart.lineItems.attributes.image' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [{ path: 'cart.lineItems.attributes.url' }],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'cart.deliveryInfo.address' },\n { path: 'cart.paymentInfo.billingAddress' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { cartId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['cartId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Calculates the cart based on its current state (line items, discounts, delivery method, etc.)\n * and returns a detailed summary including subtotal, delivery costs, taxes, fees and the total price.\n * Note that discounts are already pre-computed and applied to the Cart.\n *\n * This is a read-only operation that does not modify the cart.\n * @param cartId - ID of the Cart to calculate.\n * @internal\n * @documentationMaturity preview\n * @requiredField cartId\n * @permissionId ecom:v2:cart:calculate_cart\n * @fqn wix.ecom.cart.v2.CartService.CalculateCart\n */\nexport async function calculateCart(\n cartId: string,\n options?: CalculateCartOptions\n): Promise<\n NonNullablePaths<\n CalculateCartResponse,\n | `cart._id`\n | `cart.lineItems`\n | `cart.lineItems.${number}._id`\n | `cart.lineItems.${number}.name.original`\n | `cart.lineItems.${number}.quantityInfo.confirmedQuantity`\n | `cart.lineItems.${number}.quantityInfo.requestedQuantity`\n | `cart.lineItems.${number}.quantityInfo.fixedQuantity`\n | `cart.lineItems.${number}.pricing.unitPrice.amount`\n | `cart.lineItems.${number}.pricing.unitPrice.convertedAmount`\n | `cart.lineItems.${number}.pricing.unitPrice.formattedAmount`\n | `cart.lineItems.${number}.pricing.unitPrice.formattedConvertedAmount`\n | `cart.lineItems.${number}.pricing.priceDescription.original`\n | `cart.lineItems.${number}.pricing.priceUndetermined`\n | `cart.lineItems.${number}.source.catalogReference.catalogItemId`\n | `cart.lineItems.${number}.source.catalogReference.appId`\n | `cart.lineItems.${number}.attributes.itemType.preset`\n | `cart.lineItems.${number}.attributes.itemType.custom`\n | `cart.lineItems.${number}.attributes.physicalProperties.shippable`\n | `cart.lineItems.${number}.attributes.membersOnly`\n | `cart.lineItems.${number}.taxConfig.taxableAddress.addressType`\n | `cart.lineItems.${number}.paymentConfig.savePaymentMethod`\n | `cart.lineItems.${number}.paymentConfig.selectedMembership._id`\n | `cart.lineItems.${number}.paymentConfig.selectedMembership.appId`\n | `cart.lineItems.${number}.paymentConfig.paymentOption`\n | `cart.lineItems.${number}.status`\n | `cart.lineItems.${number}.customLineItem`\n | `cart.coupons`\n | `cart.coupons.${number}._id`\n | `cart.coupons.${number}.code`\n | `cart.source.channelType`\n | `cart.source.externalReferences`\n | `cart.source.externalReferences.${number}.appId`\n | `cart.source.createdBy.visitorId`\n | `cart.source.createdBy.memberId`\n | `cart.source.createdBy.userId`\n | `cart.source.createdBy.appId`\n | `cart.source.customContentReference.appId`\n | `cart.source.customContentReference.componentId`\n | `cart.businessInfo.languageCode`\n | `cart.businessInfo.currencyCode`\n | `cart.customerInfo.visitorId`\n | `cart.customerInfo.memberId`\n | `cart.customerInfo.userId`\n | `cart.customerInfo.vatId._id`\n | `cart.customerInfo.vatId.type`\n | `cart.customerInfo.languageCode`\n | `cart.customerInfo.currencyCode`\n | `cart.deliveryInfo.address.streetAddress.number`\n | `cart.deliveryInfo.address.streetAddress.name`\n | `cart.deliveryInfo.method.code`\n | `cart.deliveryInfo.method.pickup`\n | `cart.deliveryInfo.weightUnit`\n | `cart.taxInfo.pricesIncludeTax`\n | `cart.paymentInfo.giftCards`\n | `cart.paymentInfo.giftCards.${number}._id`\n | `cart.paymentInfo.giftCards.${number}.obfuscatedCode`\n | `cart.paymentInfo.giftCards.${number}.appId`\n | `cart.paymentInfo.currencyCode`\n | `cart.orderPlaced`\n | `cart.settings.lockGiftCard`\n | `cart.settings.lockCouponCode`\n | `cart.settings.policyAgreementCheckboxDisabled`\n | `cart.settings.manualPaymentDisabled`\n | `summary.cartId`\n | `summary.lineItems`\n | `summary.lineItems.${number}.lineItemId`\n | `summary.lineItems.${number}.quantity`\n | `summary.lineItems.${number}.unitPrice.amount`\n | `summary.lineItems.${number}.unitPrice.convertedAmount`\n | `summary.lineItems.${number}.unitPrice.formattedAmount`\n | `summary.lineItems.${number}.unitPrice.formattedConvertedAmount`\n | `summary.discounts`\n | `summary.discounts.${number}.name.original`\n | `summary.discounts.${number}.source.sourceType`\n | `summary.discounts.${number}.scope`\n | `summary.deliverySummary.method.code`\n | `summary.deliverySummary.method.pickup`\n | `summary.additionalFees`\n | `summary.taxSummary.taxes`\n | `summary.taxSummary.pricesIncludeTax`\n | `summary.taxSummary.lineItemTaxes`\n | `summary.taxSummary.lineItemTaxes.${number}.lineItemId`\n | `summary.taxSummary.additionalFeeTaxes`\n | `summary.taxSummary.additionalFeeTaxes.${number}.additionalFeeCode`\n | `summary.paymentSummary.giftCards`\n | `summary.paymentSummary.giftCards.${number}.giftCardId`\n | `summary.paymentSummary.memberships`\n | `summary.paymentSummary.memberships.${number}._id`\n | `summary.paymentSummary.memberships.${number}.appId`\n | `summary.paymentSummary.subscriptionCharges`\n | `summary.paymentSummary.requiresPaymentAfterGiftCard`\n | `summary.calculationErrors.generalShippingCalculationError.applicationError.code`\n | `summary.calculationErrors.generalShippingCalculationError.applicationError.description`\n | `summary.calculationErrors.generalShippingCalculationError.validationError.fieldViolations`\n | `summary.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field`\n | `summary.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description`\n | `summary.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule`\n | `summary.calculationErrors.carrierErrors.errors`\n | `summary.calculationErrors.carrierErrors.errors.${number}.carrierId`\n | `summary.calculationErrors.orderValidationErrors`\n | `summary.spiViolations`\n | `summary.spiViolations.${number}.severity`\n | `summary.spiViolations.${number}.target.other.name`\n | `summary.spiViolations.${number}.target.lineItem.name`,\n 8\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n cartId: cartId,\n validationsConfig: options?.validationsConfig,\n customCalculationConfig: options?.customCalculationConfig,\n });\n\n const reqOpts = ambassadorWixEcomV2Cart.calculateCart(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'cart.lineItems.source.catalogOverrideFields.image' },\n { path: 'cart.lineItems.attributes.image' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [{ path: 'cart.lineItems.attributes.url' }],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'cart.deliveryInfo.address' },\n { path: 'cart.paymentInfo.billingAddress' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n cartId: '$[0]',\n validationsConfig: '$[1].validationsConfig',\n customCalculationConfig: '$[1].customCalculationConfig',\n },\n singleArgumentUnchanged: false,\n },\n ['cartId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CalculateCartOptions {\n /**\n * Specifies the level of **business validation** to perform during cart calculation,\n * by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).\n */\n validationsConfig?: ValidationsConfigWithLiterals;\n /**\n * Optional custom configuration for the calculation.\n * If not provided, all price components are calculated by default.\n */\n customCalculationConfig?: CalculationConfig;\n}\n\n/**\n * Retrieves the checkout URL for the Cart.\n *\n * By default, this is the standard Wix checkout page.\n * If `custom_checkout_url` is defined, it overrides the default and is returned as the checkout URL.\n * @param cartId - ID of the Cart to calculate.\n * @internal\n * @documentationMaturity preview\n * @requiredField cartId\n * @permissionId ecom:v2:cart:get_checkout_url\n * @fqn wix.ecom.cart.v2.CartService.GetCheckoutURL\n */\nexport async function getCheckoutUrl(\n cartId: string,\n options?: GetCheckoutUrlOptions\n): Promise<NonNullablePaths<GetCheckoutURLResponse, `checkoutUrl`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n cartId: cartId,\n currencyCode: options?.currencyCode,\n });\n\n const reqOpts = ambassadorWixEcomV2Cart.getCheckoutUrl(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n cartId: '$[0]',\n currencyCode: '$[1].currencyCode',\n },\n singleArgumentUnchanged: false,\n },\n ['cartId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetCheckoutUrlOptions {\n /**\n * Checkout currency parameter to append as a query param\n * @format CURRENCY\n */\n currencyCode?: string | null;\n}\n\n/**\n * Completes the checkout process and creates an Order.\n * This endpoint may charge the customer.\n *\n * Read more about the [eCommerce Orders API](https://dev.wix.com/api/rest/wix-ecommerce/orders-api/introduction).\n * @param cartId - Cart ID.\n * @internal\n * @documentationMaturity preview\n * @requiredField cartId\n * @permissionId ecom:v2:cart:place_order\n * @fqn wix.ecom.cart.v2.CartService.PlaceOrder\n */\nexport async function placeOrder(\n cartId: string,\n options?: PlaceOrderOptions\n): Promise<\n NonNullablePaths<PlaceOrderResponse, `orderId` | `cartCompleted`, 2>\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n cartId: cartId,\n pricingToken: options?.pricingToken,\n paymentToken: options?.paymentToken,\n redirectUrls: options?.redirectUrls,\n savePaymentMethod: options?.savePaymentMethod,\n delayCapture: options?.delayCapture,\n });\n\n const reqOpts = ambassadorWixEcomV2Cart.placeOrder(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n cartId: '$[0]',\n pricingToken: '$[1].pricingToken',\n paymentToken: '$[1].paymentToken',\n redirectUrls: '$[1].redirectUrls',\n savePaymentMethod: '$[1].savePaymentMethod',\n delayCapture: '$[1].delayCapture',\n },\n singleArgumentUnchanged: false,\n },\n ['cartId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface PlaceOrderOptions {\n /**\n * The pricing token received from `CalculateCart`'s response.\n * Used to verify that the prices shown to the customer have not changed before completing checkout.\n * @maxLength 3000\n */\n pricingToken?: string | null;\n /**\n * Payment token.\n * @maxLength 100\n */\n paymentToken?: string | null;\n /** Urls to redirect to after payment is made. */\n redirectUrls?: RedirectUrls;\n /** Indicates the payment method should be saved on the order */\n savePaymentMethod?: boolean;\n /** Indicates whether to authorize the payment and delay the capture */\n delayCapture?: boolean;\n}\n\n/**\n * Adds line items to the Cart.\n * @param cartId - Cart ID.\n * @internal\n * @documentationMaturity preview\n * @requiredField cartId\n * @requiredField options.catalogItems.catalogReference\n * @requiredField options.catalogItems.quantity\n * @requiredField options.catalogItems.selectedMembership._id\n * @requiredField options.catalogItems.selectedMembership.appId\n * @requiredField options.customItems.name\n * @requiredField options.customItems.pricing\n * @requiredField options.customItems.quantityInfo\n * @requiredField options.customItems.quantityInfo.requestedQuantity\n * @permissionId ecom:v2:cart:update_cart\n * @permissionId ECOM.ADMIN_MODIFY_CARTS\n * @applicableIdentity APP\n * @fqn wix.ecom.cart.v2.CartService.AddLineItems\n */\nexport async function addLineItems(\n cartId: string,\n options?: NonNullablePaths<\n AddLineItemsOptions,\n | `catalogItems.${number}.catalogReference`\n | `catalogItems.${number}.quantity`\n | `catalogItems.${number}.selectedMembership._id`\n | `catalogItems.${number}.selectedMembership.appId`\n | `customItems.${number}.attributes.descriptionLines.${number}.name`\n | `customItems.${number}.name`\n | `customItems.${number}.pricing`\n | `customItems.${number}.pricing.price`\n | `customItems.${number}.quantityInfo`\n | `customItems.${number}.quantityInfo.requestedQuantity`,\n 7\n >\n): Promise<\n NonNullablePaths<\n AddLineItemsResponse,\n | `cart._id`\n | `cart.lineItems`\n | `cart.lineItems.${number}._id`\n | `cart.lineItems.${number}.name.original`\n | `cart.lineItems.${number}.quantityInfo.confirmedQuantity`\n | `cart.lineItems.${number}.quantityInfo.requestedQuantity`\n | `cart.lineItems.${number}.quantityInfo.fixedQuantity`\n | `cart.lineItems.${number}.pricing.unitPrice.amount`\n | `cart.lineItems.${number}.pricing.unitPrice.convertedAmount`\n | `cart.lineItems.${number}.pricing.unitPrice.formattedAmount`\n | `cart.lineItems.${number}.pricing.unitPrice.formattedConvertedAmount`\n | `cart.lineItems.${number}.pricing.priceDescription.original`\n | `cart.lineItems.${number}.pricing.priceUndetermined`\n | `cart.lineItems.${number}.source.catalogReference.catalogItemId`\n | `cart.lineItems.${number}.source.catalogReference.appId`\n | `cart.lineItems.${number}.attributes.itemType.preset`\n | `cart.lineItems.${number}.attributes.itemType.custom`\n | `cart.lineItems.${number}.attributes.physicalProperties.shippable`\n | `cart.lineItems.${number}.attributes.membersOnly`\n | `cart.lineItems.${number}.taxConfig.taxableAddress.addressType`\n | `cart.lineItems.${number}.paymentConfig.savePaymentMethod`\n | `cart.lineItems.${number}.paymentConfig.selectedMembership._id`\n | `cart.lineItems.${number}.paymentConfig.selectedMembership.appId`\n | `cart.lineItems.${number}.paymentConfig.paymentOption`\n | `cart.lineItems.${number}.status`\n | `cart.lineItems.${number}.customLineItem`\n | `cart.coupons`\n | `cart.coupons.${number}._id`\n | `cart.coupons.${number}.code`\n | `cart.source.channelType`\n | `cart.source.externalReferences`\n | `cart.source.externalReferences.${number}.appId`\n | `cart.source.createdBy.visitorId`\n | `cart.source.createdBy.memberId`\n | `cart.source.createdBy.userId`\n | `cart.source.createdBy.appId`\n | `cart.source.customContentReference.appId`\n | `cart.source.customContentReference.componentId`\n | `cart.businessInfo.languageCode`\n | `cart.businessInfo.currencyCode`\n | `cart.customerInfo.visitorId`\n | `cart.customerInfo.memberId`\n | `cart.customerInfo.userId`\n | `cart.customerInfo.vatId._id`\n | `cart.customerInfo.vatId.type`\n | `cart.customerInfo.languageCode`\n | `cart.customerInfo.currencyCode`\n | `cart.deliveryInfo.address.streetAddress.number`\n | `cart.deliveryInfo.address.streetAddress.name`\n | `cart.deliveryInfo.method.code`\n | `cart.deliveryInfo.method.pickup`\n | `cart.deliveryInfo.weightUnit`\n | `cart.taxInfo.pricesIncludeTax`\n | `cart.paymentInfo.giftCards`\n | `cart.paymentInfo.giftCards.${number}._id`\n | `cart.paymentInfo.giftCards.${number}.obfuscatedCode`\n | `cart.paymentInfo.giftCards.${number}.appId`\n | `cart.paymentInfo.currencyCode`\n | `cart.orderPlaced`\n | `cart.settings.lockGiftCard`\n | `cart.settings.lockCouponCode`\n | `cart.settings.policyAgreementCheckboxDisabled`\n | `cart.settings.manualPaymentDisabled`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n cartId: cartId,\n catalogItems: options?.catalogItems,\n customItems: options?.customItems,\n }),\n [\n {\n transformFn: transformSDKImageToRESTImage,\n paths: [\n { path: 'catalogItems.catalogOverrideFields.image' },\n { path: 'customItems.attributes.image' },\n ],\n },\n {\n transformFn: transformSDKPageURLV2ToRESTPageURLV2,\n paths: [{ path: 'customItems.attributes.url' }],\n },\n ]\n );\n\n const reqOpts = ambassadorWixEcomV2Cart.addLineItems(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'cart.lineItems.source.catalogOverrideFields.image' },\n { path: 'cart.lineItems.attributes.image' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [{ path: 'cart.lineItems.attributes.url' }],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'cart.deliveryInfo.address' },\n { path: 'cart.paymentInfo.billingAddress' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n cartId: '$[0]',\n catalogItems: '$[1].catalogItems',\n customItems: '$[1].customItems',\n },\n singleArgumentUnchanged: false,\n },\n ['cartId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface AddLineItemsOptions {\n /**\n * A list of catalog items to add to the cart.\n * @maxSize 300\n */\n catalogItems?: CatalogItemInput[];\n /**\n * A list of custom items to add to the cart.\n * @maxSize 300\n */\n customItems?: CustomItemInput[];\n}\n\n/**\n * Removes line items from the Cart.\n * @param cartId - Cart ID.\n * @param lineItemIds - Line item IDs to remove from cart.\n * @internal\n * @documentationMaturity preview\n * @requiredField cartId\n * @requiredField lineItemIds\n * @permissionId ecom:v2:cart:update_cart\n * @fqn wix.ecom.cart.v2.CartService.RemoveLineItems\n */\nexport async function removeLineItems(\n cartId: string,\n lineItemIds: string[]\n): Promise<\n NonNullablePaths<\n RemoveLineItemsResponse,\n | `cart._id`\n | `cart.lineItems`\n | `cart.lineItems.${number}._id`\n | `cart.lineItems.${number}.name.original`\n | `cart.lineItems.${number}.quantityInfo.confirmedQuantity`\n | `cart.lineItems.${number}.quantityInfo.requestedQuantity`\n | `cart.lineItems.${number}.quantityInfo.fixedQuantity`\n | `cart.lineItems.${number}.pricing.unitPrice.amount`\n | `cart.lineItems.${number}.pricing.unitPrice.convertedAmount`\n | `cart.lineItems.${number}.pricing.unitPrice.formattedAmount`\n | `cart.lineItems.${number}.pricing.unitPrice.formattedConvertedAmount`\n | `cart.lineItems.${number}.pricing.priceDescription.original`\n | `cart.lineItems.${number}.pricing.priceUndetermined`\n | `cart.lineItems.${number}.source.catalogReference.catalogItemId`\n | `cart.lineItems.${number}.source.catalogReference.appId`\n | `cart.lineItems.${number}.attributes.itemType.preset`\n | `cart.lineItems.${number}.attributes.itemType.custom`\n | `cart.lineItems.${number}.attributes.physicalProperties.shippable`\n | `cart.lineItems.${number}.attributes.membersOnly`\n | `cart.lineItems.${number}.taxConfig.taxableAddress.addressType`\n | `cart.lineItems.${number}.paymentConfig.savePaymentMethod`\n | `cart.lineItems.${number}.paymentConfig.selectedMembership._id`\n | `cart.lineItems.${number}.paymentConfig.selectedMembership.appId`\n | `cart.lineItems.${number}.paymentConfig.paymentOption`\n | `cart.lineItems.${number}.status`\n | `cart.lineItems.${number}.customLineItem`\n | `cart.coupons`\n | `cart.coupons.${number}._id`\n | `cart.coupons.${number}.code`\n | `cart.source.channelType`\n | `cart.source.externalReferences`\n | `cart.source.externalReferences.${number}.appId`\n | `cart.source.createdBy.visitorId`\n | `cart.source.createdBy.memberId`\n | `cart.source.createdBy.userId`\n | `cart.source.createdBy.appId`\n | `cart.source.customContentReference.appId`\n | `cart.source.customContentReference.componentId`\n | `cart.businessInfo.languageCode`\n | `cart.businessInfo.currencyCode`\n | `cart.customerInfo.visitorId`\n | `cart.customerInfo.memberId`\n | `cart.customerInfo.userId`\n | `cart.customerInfo.vatId._id`\n | `cart.customerInfo.vatId.type`\n | `cart.customerInfo.languageCode`\n | `cart.customerInfo.currencyCode`\n | `cart.deliveryInfo.address.streetAddress.number`\n | `cart.deliveryInfo.address.streetAddress.name`\n | `cart.deliveryInfo.method.code`\n | `cart.deliveryInfo.method.pickup`\n | `cart.deliveryInfo.weightUnit`\n | `cart.taxInfo.pricesIncludeTax`\n | `cart.paymentInfo.giftCards`\n | `cart.paymentInfo.giftCards.${number}._id`\n | `cart.paymentInfo.giftCards.${number}.obfuscatedCode`\n | `cart.paymentInfo.giftCards.${number}.appId`\n | `cart.paymentInfo.currencyCode`\n | `cart.orderPlaced`\n | `cart.settings.lockGiftCard`\n | `cart.settings.lockCouponCode`\n | `cart.settings.policyAgreementCheckboxDisabled`\n | `cart.settings.manualPaymentDisabled`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n cartId: cartId,\n lineItemIds: lineItemIds,\n });\n\n const reqOpts = ambassadorWixEcomV2Cart.removeLineItems(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'cart.lineItems.source.catalogOverrideFields.image' },\n { path: 'cart.lineItems.attributes.image' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [{ path: 'cart.lineItems.attributes.url' }],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'cart.deliveryInfo.address' },\n { path: 'cart.paymentInfo.billingAddress' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { cartId: '$[0]', lineItemIds: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['cartId', 'lineItemIds']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates line items in the Cart.\n * Use this endpoint to update line items properties such as quantity and selected membership.\n * @param cartId - Cart ID.\n * @internal\n * @documentationMaturity preview\n * @requiredField cartId\n * @requiredField options.lineItems.lineItemId\n * @requiredField options.lineItems.quantity.newQuantity\n * @permissionId ecom:v2:cart:update_cart\n * @fqn wix.ecom.cart.v2.CartService.UpdateLineItems\n */\nexport async function updateLineItems(\n cartId: string,\n options?: NonNullablePaths<\n UpdateLineItemsOptions,\n | `lineItems.${number}.lineItemId`\n | `lineItems.${number}.quantity.newQuantity`,\n 5\n >\n): Promise<\n NonNullablePaths<\n UpdateLineItemsResponse,\n | `cart._id`\n | `cart.lineItems`\n | `cart.lineItems.${number}._id`\n | `cart.lineItems.${number}.name.original`\n | `cart.lineItems.${number}.quantityInfo.confirmedQuantity`\n | `cart.lineItems.${number}.quantityInfo.requestedQuantity`\n | `cart.lineItems.${number}.quantityInfo.fixedQuantity`\n | `cart.lineItems.${number}.pricing.unitPrice.amount`\n | `cart.lineItems.${number}.pricing.unitPrice.convertedAmount`\n | `cart.lineItems.${number}.pricing.unitPrice.formattedAmount`\n | `cart.lineItems.${number}.pricing.unitPrice.formattedConvertedAmount`\n | `cart.lineItems.${number}.pricing.priceDescription.original`\n | `cart.lineItems.${number}.pricing.priceUndetermined`\n | `cart.lineItems.${number}.source.catalogReference.catalogItemId`\n | `cart.lineItems.${number}.source.catalogReference.appId`\n | `cart.lineItems.${number}.attributes.itemType.preset`\n | `cart.lineItems.${number}.attributes.itemType.custom`\n | `cart.lineItems.${number}.attributes.physicalProperties.shippable`\n | `cart.lineItems.${number}.attributes.membersOnly`\n | `cart.lineItems.${number}.taxConfig.taxableAddress.addressType`\n | `cart.lineItems.${number}.paymentConfig.savePaymentMethod`\n | `cart.lineItems.${number}.paymentConfig.selectedMembership._id`\n | `cart.lineItems.${number}.paymentConfig.selectedMembership.appId`\n | `cart.lineItems.${number}.paymentConfig.paymentOption`\n | `cart.lineItems.${number}.status`\n | `cart.lineItems.${number}.customLineItem`\n | `cart.coupons`\n | `cart.coupons.${number}._id`\n | `cart.coupons.${number}.code`\n | `cart.source.channelType`\n | `cart.source.externalReferences`\n | `cart.source.externalReferences.${number}.appId`\n | `cart.source.createdBy.visitorId`\n | `cart.source.createdBy.memberId`\n | `cart.source.createdBy.userId`\n | `cart.source.createdBy.appId`\n | `cart.source.customContentReference.appId`\n | `cart.source.customContentReference.componentId`\n | `cart.businessInfo.languageCode`\n | `cart.businessInfo.currencyCode`\n | `cart.customerInfo.visitorId`\n | `cart.customerInfo.memberId`\n | `cart.customerInfo.userId`\n | `cart.customerInfo.vatId._id`\n | `cart.customerInfo.vatId.type`\n | `cart.customerInfo.languageCode`\n | `cart.customerInfo.currencyCode`\n | `cart.deliveryInfo.address.streetAddress.number`\n | `cart.deliveryInfo.address.streetAddress.name`\n | `cart.deliveryInfo.method.code`\n | `cart.deliveryInfo.method.pickup`\n | `cart.deliveryInfo.weightUnit`\n | `cart.taxInfo.pricesIncludeTax`\n | `cart.paymentInfo.giftCards`\n | `cart.paymentInfo.giftCards.${number}._id`\n | `cart.paymentInfo.giftCards.${number}.obfuscatedCode`\n | `cart.paymentInfo.giftCards.${number}.appId`\n | `cart.paymentInfo.currencyCode`\n | `cart.orderPlaced`\n | `cart.settings.lockGiftCard`\n | `cart.settings.lockCouponCode`\n | `cart.settings.policyAgreementCheckboxDisabled`\n | `cart.settings.manualPaymentDisabled`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n cartId: cartId,\n lineItems: options?.lineItems,\n });\n\n const reqOpts = ambassadorWixEcomV2Cart.updateLineItems(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'cart.lineItems.source.catalogOverrideFields.image' },\n { path: 'cart.lineItems.attributes.image' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [{ path: 'cart.lineItems.attributes.url' }],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'cart.deliveryInfo.address' },\n { path: 'cart.paymentInfo.billingAddress' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n cartId: '$[0]',\n lineItems: '$[1].lineItems',\n },\n singleArgumentUnchanged: false,\n },\n ['cartId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateLineItemsOptions {\n /**\n * Line item updates to apply.\n * @minSize 1\n * @maxSize 300\n */\n lineItems?: LineItemUpdate[];\n}\n\n/**\n * Adds a coupon to the Cart.\n * @param cartId - Cart ID.\n * @param couponCode - Coupon to apply.\n *\n * Currently only one is supported.\n * @internal\n * @documentationMaturity preview\n * @requiredField cartId\n * @requiredField couponCode\n * @permissionId ecom:v2:cart:update_cart\n * @fqn wix.ecom.cart.v2.CartService.AddCoupon\n */\nexport async function addCoupon(\n cartId: string,\n couponCode: string\n): Promise<\n NonNullablePaths<\n AddCouponResponse,\n | `cart._id`\n | `cart.lineItems`\n | `cart.lineItems.${number}._id`\n | `cart.lineItems.${number}.name.original`\n | `cart.lineItems.${number}.quantityInfo.confirmedQuantity`\n | `cart.lineItems.${number}.quantityInfo.requestedQuantity`\n | `cart.lineItems.${number}.quantityInfo.fixedQuantity`\n | `cart.lineItems.${number}.pricing.unitPrice.amount`\n | `cart.lineItems.${number}.pricing.unitPrice.convertedAmount`\n | `cart.lineItems.${number}.pricing.unitPrice.formattedAmount`\n | `cart.lineItems.${number}.pricing.unitPrice.formattedConvertedAmount`\n | `cart.lineItems.${number}.pricing.priceDescription.original`\n | `cart.lineItems.${number}.pricing.priceUndetermined`\n | `cart.lineItems.${number}.source.catalogReference.catalogItemId`\n | `cart.lineItems.${number}.source.catalogReference.appId`\n | `cart.lineItems.${number}.attributes.itemType.preset`\n | `cart.lineItems.${number}.attributes.itemType.custom`\n | `cart.lineItems.${number}.attributes.physicalProperties.shippable`\n | `cart.lineItems.${number}.attributes.membersOnly`\n | `cart.lineItems.${number}.taxConfig.taxableAddress.addressType`\n | `cart.lineItems.${number}.paymentConfig.savePaymentMethod`\n | `cart.lineItems.${number}.paymentConfig.selectedMembership._id`\n | `cart.lineItems.${number}.paymentConfig.selectedMembership.appId`\n | `cart.lineItems.${number}.paymentConfig.paymentOption`\n | `cart.lineItems.${number}.status`\n | `cart.lineItems.${number}.customLineItem`\n | `cart.coupons`\n | `cart.coupons.${number}._id`\n | `cart.coupons.${number}.code`\n | `cart.source.channelType`\n | `cart.source.externalReferences`\n | `cart.source.externalReferences.${number}.appId`\n | `cart.source.createdBy.visitorId`\n | `cart.source.createdBy.memberId`\n | `cart.source.createdBy.userId`\n | `cart.source.createdBy.appId`\n | `cart.source.customContentReference.appId`\n | `cart.source.customContentReference.componentId`\n | `cart.businessInfo.languageCode`\n | `cart.businessInfo.currencyCode`\n | `cart.customerInfo.visitorId`\n | `cart.customerInfo.memberId`\n | `cart.customerInfo.userId`\n | `cart.customerInfo.vatId._id`\n | `cart.customerInfo.vatId.type`\n | `cart.customerInfo.languageCode`\n | `cart.customerInfo.currencyCode`\n | `cart.deliveryInfo.address.streetAddress.number`\n | `cart.deliveryInfo.address.streetAddress.name`\n | `cart.deliveryInfo.method.code`\n | `cart.deliveryInfo.method.pickup`\n | `cart.deliveryInfo.weightUnit`\n | `cart.taxInfo.pricesIncludeTax`\n | `cart.paymentInfo.giftCards`\n | `cart.paymentInfo.giftCards.${number}._id`\n | `cart.paymentInfo.giftCards.${number}.obfuscatedCode`\n | `cart.paymentInfo.giftCards.${number}.appId`\n | `cart.paymentInfo.currencyCode`\n | `cart.orderPlaced`\n | `cart.settings.lockGiftCard`\n | `cart.settings.lockCouponCode`\n | `cart.settings.policyAgreementCheckboxDisabled`\n | `cart.settings.manualPaymentDisabled`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n cartId: cartId,\n couponCode: couponCode,\n });\n\n const reqOpts = ambassadorWixEcomV2Cart.addCoupon(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'cart.lineItems.source.catalogOverrideFields.image' },\n { path: 'cart.lineItems.attributes.image' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [{ path: 'cart.lineItems.attributes.url' }],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'cart.deliveryInfo.address' },\n { path: 'cart.paymentInfo.billingAddress' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { cartId: '$[0]', couponCode: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['cartId', 'couponCode']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Removes a coupon from the Cart.\n * @param cartId - Cart ID.\n * @param couponId - Discount ID.\n * @internal\n * @documentationMaturity preview\n * @requiredField cartId\n * @requiredField couponId\n * @permissionId ecom:v2:cart:update_cart\n * @fqn wix.ecom.cart.v2.CartService.RemoveCoupon\n */\nexport async function removeCoupon(\n cartId: string,\n couponId: string\n): Promise<\n NonNullablePaths<\n RemoveCouponResponse,\n | `cart._id`\n | `cart.lineItems`\n | `cart.lineItems.${number}._id`\n | `cart.lineItems.${number}.name.original`\n | `cart.lineItems.${number}.quantityInfo.confirmedQuantity`\n | `cart.lineItems.${number}.quantityInfo.requestedQuantity`\n | `cart.lineItems.${number}.quantityInfo.fixedQuantity`\n | `cart.lineItems.${number}.pricing.unitPrice.amount`\n | `cart.lineItems.${number}.pricing.unitPrice.convertedAmount`\n | `cart.lineItems.${number}.pricing.unitPrice.formattedAmount`\n | `cart.lineItems.${number}.pricing.unitPrice.formattedConvertedAmount`\n | `cart.lineItems.${number}.pricing.priceDescription.original`\n | `cart.lineItems.${number}.pricing.priceUndetermined`\n | `cart.lineItems.${number}.source.catalogReference.catalogItemId`\n | `cart.lineItems.${number}.source.catalogReference.appId`\n | `cart.lineItems.${number}.attributes.itemType.preset`\n | `cart.lineItems.${number}.attributes.itemType.custom`\n | `cart.lineItems.${number}.attributes.physicalProperties.shippable`\n | `cart.lineItems.${number}.attributes.membersOnly`\n | `cart.lineItems.${number}.taxConfig.taxableAddress.addressType`\n | `cart.lineItems.${number}.paymentConfig.savePaymentMethod`\n | `cart.lineItems.${number}.paymentConfig.selectedMembership._id`\n | `cart.lineItems.${number}.paymentConfig.selectedMembership.appId`\n | `cart.lineItems.${number}.paymentConfig.paymentOption`\n | `cart.lineItems.${number}.status`\n | `cart.lineItems.${number}.customLineItem`\n | `cart.coupons`\n | `cart.coupons.${number}._id`\n | `cart.coupons.${number}.code`\n | `cart.source.channelType`\n | `cart.source.externalReferences`\n | `cart.source.externalReferences.${number}.appId`\n | `cart.source.createdBy.visitorId`\n | `cart.source.createdBy.memberId`\n | `cart.source.createdBy.userId`\n | `cart.source.createdBy.appId`\n | `cart.source.customContentReference.appId`\n | `cart.source.customContentReference.componentId`\n | `cart.businessInfo.languageCode`\n | `cart.businessInfo.currencyCode`\n | `cart.customerInfo.visitorId`\n | `cart.customerInfo.memberId`\n | `cart.customerInfo.userId`\n | `cart.customerInfo.vatId._id`\n | `cart.customerInfo.vatId.type`\n | `cart.customerInfo.languageCode`\n | `cart.customerInfo.currencyCode`\n | `cart.deliveryInfo.address.streetAddress.number`\n | `cart.deliveryInfo.address.streetAddress.name`\n | `cart.deliveryInfo.method.code`\n | `cart.deliveryInfo.method.pickup`\n | `cart.deliveryInfo.weightUnit`\n | `cart.taxInfo.pricesIncludeTax`\n | `cart.paymentInfo.giftCards`\n | `cart.paymentInfo.giftCards.${number}._id`\n | `cart.paymentInfo.giftCards.${number}.obfuscatedCode`\n | `cart.paymentInfo.giftCards.${number}.appId`\n | `cart.paymentInfo.currencyCode`\n | `cart.orderPlaced`\n | `cart.settings.lockGiftCard`\n | `cart.settings.lockCouponCode`\n | `cart.settings.policyAgreementCheckboxDisabled`\n | `cart.settings.manualPaymentDisabled`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n cartId: cartId,\n couponId: couponId,\n });\n\n const reqOpts = ambassadorWixEcomV2Cart.removeCoupon(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'cart.lineItems.source.catalogOverrideFields.image' },\n { path: 'cart.lineItems.attributes.image' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [{ path: 'cart.lineItems.attributes.url' }],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'cart.deliveryInfo.address' },\n { path: 'cart.paymentInfo.billingAddress' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { cartId: '$[0]', couponId: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['cartId', 'couponId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Adds a gift card to the Cart.\n * Once added, the gift card’s balance will be used as a payment method during checkout, either partially or fully covering the cart total.\n * @param cartId - Cart ID.\n * @param giftCardCode - Gift card code.\n *\n * Currently only one is supported.\n * @internal\n * @documentationMaturity preview\n * @requiredField cartId\n * @requiredField giftCardCode\n * @permissionId ecom:v2:cart:update_cart\n * @fqn wix.ecom.cart.v2.CartService.AddGiftCard\n */\nexport async function addGiftCard(\n cartId: string,\n giftCardCode: string\n): Promise<\n NonNullablePaths<\n AddGiftCardResponse,\n | `cart._id`\n | `cart.lineItems`\n | `cart.lineItems.${number}._id`\n | `cart.lineItems.${number}.name.original`\n | `cart.lineItems.${number}.quantityInfo.confirmedQuantity`\n | `cart.lineItems.${number}.quantityInfo.requestedQuantity`\n | `cart.lineItems.${number}.quantityInfo.fixedQuantity`\n | `cart.lineItems.${number}.pricing.unitPrice.amount`\n | `cart.lineItems.${number}.pricing.unitPrice.convertedAmount`\n | `cart.lineItems.${number}.pricing.unitPrice.formattedAmount`\n | `cart.lineItems.${number}.pricing.unitPrice.formattedConvertedAmount`\n | `cart.lineItems.${number}.pricing.priceDescription.original`\n | `cart.lineItems.${number}.pricing.priceUndetermined`\n | `cart.lineItems.${number}.source.catalogReference.catalogItemId`\n | `cart.lineItems.${number}.source.catalogReference.appId`\n | `cart.lineItems.${number}.attributes.itemType.preset`\n | `cart.lineItems.${number}.attributes.itemType.custom`\n | `cart.lineItems.${number}.attributes.physicalProperties.shippable`\n | `cart.lineItems.${number}.attributes.membersOnly`\n | `cart.lineItems.${number}.taxConfig.taxableAddress.addressType`\n | `cart.lineItems.${number}.paymentConfig.savePaymentMethod`\n | `cart.lineItems.${number}.paymentConfig.selectedMembership._id`\n | `cart.lineItems.${number}.paymentConfig.selectedMembership.appId`\n | `cart.lineItems.${number}.paymentConfig.paymentOption`\n | `cart.lineItems.${number}.status`\n | `cart.lineItems.${number}.customLineItem`\n | `cart.coupons`\n | `cart.coupons.${number}._id`\n | `cart.coupons.${number}.code`\n | `cart.source.channelType`\n | `cart.source.externalReferences`\n | `cart.source.externalReferences.${number}.appId`\n | `cart.source.createdBy.visitorId`\n | `cart.source.createdBy.memberId`\n | `cart.source.createdBy.userId`\n | `cart.source.createdBy.appId`\n | `cart.source.customContentReference.appId`\n | `cart.source.customContentReference.componentId`\n | `cart.businessInfo.languageCode`\n | `cart.businessInfo.currencyCode`\n | `cart.customerInfo.visitorId`\n | `cart.customerInfo.memberId`\n | `cart.customerInfo.userId`\n | `cart.customerInfo.vatId._id`\n | `cart.customerInfo.vatId.type`\n | `cart.customerInfo.languageCode`\n | `cart.customerInfo.currencyCode`\n | `cart.deliveryInfo.address.streetAddress.number`\n | `cart.deliveryInfo.address.streetAddress.name`\n | `cart.deliveryInfo.method.code`\n | `cart.deliveryInfo.method.pickup`\n | `cart.deliveryInfo.weightUnit`\n | `cart.taxInfo.pricesIncludeTax`\n | `cart.paymentInfo.giftCards`\n | `cart.paymentInfo.giftCards.${number}._id`\n | `cart.paymentInfo.giftCards.${number}.obfuscatedCode`\n | `cart.paymentInfo.giftCards.${number}.appId`\n | `cart.paymentInfo.currencyCode`\n | `cart.orderPlaced`\n | `cart.settings.lockGiftCard`\n | `cart.settings.lockCouponCode`\n | `cart.settings.policyAgreementCheckboxDisabled`\n | `cart.settings.manualPaymentDisabled`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n cartId: cartId,\n giftCardCode: giftCardCode,\n });\n\n const reqOpts = ambassadorWixEcomV2Cart.addGiftCard(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'cart.lineItems.source.catalogOverrideFields.image' },\n { path: 'cart.lineItems.attributes.image' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [{ path: 'cart.lineItems.attributes.url' }],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'cart.deliveryInfo.address' },\n { path: 'cart.paymentInfo.billingAddress' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { cartId: '$[0]', giftCardCode: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['cartId', 'giftCardCode']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Removes a gift card from the Cart.\n * @param cartId - Cart ID.\n * @param giftCardId - Gift card ID.\n * @internal\n * @documentationMaturity preview\n * @requiredField cartId\n * @requiredField giftCardId\n * @permissionId ecom:v2:cart:update_cart\n * @fqn wix.ecom.cart.v2.CartService.RemoveGiftCard\n */\nexport async function removeGiftCard(\n cartId: string,\n giftCardId: string\n): Promise<\n NonNullablePaths<\n RemoveGiftCardResponse,\n | `cart._id`\n | `cart.lineItems`\n | `cart.lineItems.${number}._id`\n | `cart.lineItems.${number}.name.original`\n | `cart.lineItems.${number}.quantityInfo.confirmedQuantity`\n | `cart.lineItems.${number}.quantityInfo.requestedQuantity`\n | `cart.lineItems.${number}.quantityInfo.fixedQuantity`\n | `cart.lineItems.${number}.pricing.unitPrice.amount`\n | `cart.lineItems.${number}.pricing.unitPrice.convertedAmount`\n | `cart.lineItems.${number}.pricing.unitPrice.formattedAmount`\n | `cart.lineItems.${number}.pricing.unitPrice.formattedConvertedAmount`\n | `cart.lineItems.${number}.pricing.priceDescription.original`\n | `cart.lineItems.${number}.pricing.priceUndetermined`\n | `cart.lineItems.${number}.source.catalogReference.catalogItemId`\n | `cart.lineItems.${number}.source.catalogReference.appId`\n | `cart.lineItems.${number}.attributes.itemType.preset`\n | `cart.lineItems.${number}.attributes.itemType.custom`\n | `cart.lineItems.${number}.attributes.physicalProperties.shippable`\n | `cart.lineItems.${number}.attributes.membersOnly`\n | `cart.lineItems.${number}.taxConfig.taxableAddress.addressType`\n | `cart.lineItems.${number}.paymentConfig.savePaymentMethod`\n | `cart.lineItems.${number}.paymentConfig.selectedMembership._id`\n | `cart.lineItems.${number}.paymentConfig.selectedMembership.appId`\n | `cart.lineItems.${number}.paymentConfig.paymentOption`\n | `cart.lineItems.${number}.status`\n | `cart.lineItems.${number}.customLineItem`\n | `cart.coupons`\n | `cart.coupons.${number}._id`\n | `cart.coupons.${number}.code`\n | `cart.source.channelType`\n | `cart.source.externalReferences`\n | `cart.source.externalReferences.${number}.appId`\n | `cart.source.createdBy.visitorId`\n | `cart.source.createdBy.memberId`\n | `cart.source.createdBy.userId`\n | `cart.source.createdBy.appId`\n | `cart.source.customContentReference.appId`\n | `cart.source.customContentReference.componentId`\n | `cart.businessInfo.languageCode`\n | `cart.businessInfo.currencyCode`\n | `cart.customerInfo.visitorId`\n | `cart.customerInfo.memberId`\n | `cart.customerInfo.userId`\n | `cart.customerInfo.vatId._id`\n | `cart.customerInfo.vatId.type`\n | `cart.customerInfo.languageCode`\n | `cart.customerInfo.currencyCode`\n | `cart.deliveryInfo.address.streetAddress.number`\n | `cart.deliveryInfo.address.streetAddress.name`\n | `cart.deliveryInfo.method.code`\n | `cart.deliveryInfo.method.pickup`\n | `cart.deliveryInfo.weightUnit`\n | `cart.taxInfo.pricesIncludeTax`\n | `cart.paymentInfo.giftCards`\n | `cart.paymentInfo.giftCards.${number}._id`\n | `cart.paymentInfo.giftCards.${number}.obfuscatedCode`\n | `cart.paymentInfo.giftCards.${number}.appId`\n | `cart.paymentInfo.currencyCode`\n | `cart.orderPlaced`\n | `cart.settings.lockGiftCard`\n | `cart.settings.lockCouponCode`\n | `cart.settings.policyAgreementCheckboxDisabled`\n | `cart.settings.manualPaymentDisabled`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n cartId: cartId,\n giftCardId: giftCardId,\n });\n\n const reqOpts = ambassadorWixEcomV2Cart.removeGiftCard(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'cart.lineItems.source.catalogOverrideFields.image' },\n { path: 'cart.lineItems.attributes.image' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [{ path: 'cart.lineItems.attributes.url' }],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'cart.deliveryInfo.address' },\n { path: 'cart.paymentInfo.billingAddress' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { cartId: '$[0]', giftCardId: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['cartId', 'giftCardId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Marks the cart as completed. This means an order was created from the cart.\n *\n * Sets the `orderPlaced` field to `true`.\n * @param cartId - Cart ID.\n * @internal\n * @documentationMaturity preview\n * @requiredField cartId\n * @permissionId ecom:v2:cart:update_cart\n * @fqn wix.ecom.cart.v2.CartService.MarkCartAsCompleted\n */\nexport async function markCartAsCompleted(\n cartId: string,\n options?: MarkCartAsCompletedOptions\n): Promise<\n NonNullablePaths<\n MarkCartAsCompletedResponse,\n | `cart._id`\n | `cart.lineItems`\n | `cart.lineItems.${number}._id`\n | `cart.lineItems.${number}.name.original`\n | `cart.lineItems.${number}.quantityInfo.confirmedQuantity`\n | `cart.lineItems.${number}.quantityInfo.requestedQuantity`\n | `cart.lineItems.${number}.quantityInfo.fixedQuantity`\n | `cart.lineItems.${number}.pricing.unitPrice.amount`\n | `cart.lineItems.${number}.pricing.unitPrice.convertedAmount`\n | `cart.lineItems.${number}.pricing.unitPrice.formattedAmount`\n | `cart.lineItems.${number}.pricing.unitPrice.formattedConvertedAmount`\n | `cart.lineItems.${number}.pricing.priceDescription.original`\n | `cart.lineItems.${number}.pricing.priceUndetermined`\n | `cart.lineItems.${number}.source.catalogReference.catalogItemId`\n | `cart.lineItems.${number}.source.catalogReference.appId`\n | `cart.lineItems.${number}.attributes.itemType.preset`\n | `cart.lineItems.${number}.attributes.itemType.custom`\n | `cart.lineItems.${number}.attributes.physicalProperties.shippable`\n | `cart.lineItems.${number}.attributes.membersOnly`\n | `cart.lineItems.${number}.taxConfig.taxableAddress.addressType`\n | `cart.lineItems.${number}.paymentConfig.savePaymentMethod`\n | `cart.lineItems.${number}.paymentConfig.selectedMembership._id`\n | `cart.lineItems.${number}.paymentConfig.selectedMembership.appId`\n | `cart.lineItems.${number}.paymentConfig.paymentOption`\n | `cart.lineItems.${number}.status`\n | `cart.lineItems.${number}.customLineItem`\n | `cart.coupons`\n | `cart.coupons.${number}._id`\n | `cart.coupons.${number}.code`\n | `cart.source.channelType`\n | `cart.source.externalReferences`\n | `cart.source.externalReferences.${number}.appId`\n | `cart.source.createdBy.visitorId`\n | `cart.source.createdBy.memberId`\n | `cart.source.createdBy.userId`\n | `cart.source.createdBy.appId`\n | `cart.source.customContentReference.appId`\n | `cart.source.customContentReference.componentId`\n | `cart.businessInfo.languageCode`\n | `cart.businessInfo.currencyCode`\n | `cart.customerInfo.visitorId`\n | `cart.customerInfo.memberId`\n | `cart.customerInfo.userId`\n | `cart.customerInfo.vatId._id`\n | `cart.customerInfo.vatId.type`\n | `cart.customerInfo.languageCode`\n | `cart.customerInfo.currencyCode`\n | `cart.deliveryInfo.address.streetAddress.number`\n | `cart.deliveryInfo.address.streetAddress.name`\n | `cart.deliveryInfo.method.code`\n | `cart.deliveryInfo.method.pickup`\n | `cart.deliveryInfo.weightUnit`\n | `cart.taxInfo.pricesIncludeTax`\n | `cart.paymentInfo.giftCards`\n | `cart.paymentInfo.giftCards.${number}._id`\n | `cart.paymentInfo.giftCards.${number}.obfuscatedCode`\n | `cart.paymentInfo.giftCards.${number}.appId`\n | `cart.paymentInfo.currencyCode`\n | `cart.orderPlaced`\n | `cart.settings.lockGiftCard`\n | `cart.settings.lockCouponCode`\n | `cart.settings.policyAgreementCheckboxDisabled`\n | `cart.settings.manualPaymentDisabled`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n cartId: cartId,\n orderId: options?.orderId,\n });\n\n const reqOpts = ambassadorWixEcomV2Cart.markCartAsCompleted(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'cart.lineItems.source.catalogOverrideFields.image' },\n { path: 'cart.lineItems.attributes.image' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [{ path: 'cart.lineItems.attributes.url' }],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'cart.deliveryInfo.address' },\n { path: 'cart.paymentInfo.billingAddress' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { cartId: '$[0]', orderId: '$[1].orderId' },\n singleArgumentUnchanged: false,\n },\n ['cartId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface MarkCartAsCompletedOptions {\n /**\n * Order ID.\n * @format GUID\n */\n orderId?: string | null;\n}\n\n/**\n * Handles asynchronous checkout completion and redirects to a specified URL.\n *\n * Triggered by Wix Cashier after payment completion, this endpoint finalizes the checkout process and redirects the user to the previously provided success URL.\n * In some cases, this endpoint might be called directly by the external payment provider.\n * @param token - Server-signed JWT token with required information to complete checkout\n * @internal\n * @documentationMaturity preview\n * @requiredField token\n * @permissionId ecom:v2:cart:update_cart\n * @fqn wix.ecom.cart.v2.CartService.HandleAsyncCheckoutCompletion\n */\nexport async function handleAsyncCheckoutCompletion(\n token: string\n): Promise<\n NonNullablePaths<\n RawHttpResponse,\n `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ token: token });\n\n const reqOpts =\n ambassadorWixEcomV2Cart.handleAsyncCheckoutCompletion(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { token: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['token']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTBytesToSDKBytes } from '@wix/sdk-runtime/transformations/bytes';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixEcomCartV2CartServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/cart-v2',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/cart-v2',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/cart-v2',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/cart-v2',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/cart-v2',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/cart-v2',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/cart-v2',\n destPath: '',\n },\n ],\n 'apps._base_domain_': [\n {\n srcPath: '/_api/cart-v2',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/cart-v2',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/cart-v2',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/cart-v2',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/cart-v2',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/ecom/v2/carts',\n destPath: '/v2/carts',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/cart-v2',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_ecom_cart-v-2';\n\n/** Creates a Cart. */\nexport function createCart(payload: object): RequestOptionsFactory<any> {\n function __createCart({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'cart.createdDate' },\n { path: 'cart.updatedDate' },\n {\n path: 'cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate',\n },\n { path: 'cart.lineItems.attributes.image.urlExpirationDate' },\n {\n path: 'cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate',\n },\n { path: 'cart.lineItems.attributes.serviceProperties.scheduledDate' },\n {\n path: 'catalogItems.catalogOverrideFields.image.urlExpirationDate',\n },\n { path: 'customItems.attributes.image.urlExpirationDate' },\n {\n path: 'customItems.attributes.subscriptionInfo.subscriptionSettings.startDate',\n },\n { path: 'customItems.attributes.serviceProperties.scheduledDate' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n {\n path: 'cart.lineItems.source.catalogOverrideFields.physicalProperties.weight',\n },\n { path: 'cart.lineItems.attributes.physicalProperties.weight' },\n { path: 'cart.deliveryInfo.address.geocode.latitude' },\n { path: 'cart.deliveryInfo.address.geocode.longitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.latitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.longitude' },\n {\n path: 'catalogItems.catalogOverrideFields.physicalProperties.weight',\n },\n { path: 'customItems.attributes.physicalProperties.weight' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.ecom.v2.cart',\n method: 'POST' as any,\n methodFqn: 'wix.ecom.cart.v2.CartService.CreateCart',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomCartV2CartServiceUrl({\n protoPath: '/v2/carts',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'cart.createdDate' },\n { path: 'cart.updatedDate' },\n {\n path: 'cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate',\n },\n { path: 'cart.lineItems.attributes.image.urlExpirationDate' },\n {\n path: 'cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate',\n },\n {\n path: 'cart.lineItems.attributes.serviceProperties.scheduledDate',\n },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'cart.lineItems.source.catalogOverrideFields.physicalProperties.weight',\n },\n { path: 'cart.lineItems.attributes.physicalProperties.weight' },\n { path: 'cart.deliveryInfo.address.geocode.latitude' },\n { path: 'cart.deliveryInfo.address.geocode.longitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.latitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createCart;\n}\n\n/** Retrieves a Cart. */\nexport function getCart(payload: object): RequestOptionsFactory<any> {\n function __getCart({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.v2.cart',\n method: 'GET' as any,\n methodFqn: 'wix.ecom.cart.v2.CartService.GetCart',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomCartV2CartServiceUrl({\n protoPath: '/v2/carts/{cartId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'cart.createdDate' },\n { path: 'cart.updatedDate' },\n {\n path: 'cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate',\n },\n { path: 'cart.lineItems.attributes.image.urlExpirationDate' },\n {\n path: 'cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate',\n },\n {\n path: 'cart.lineItems.attributes.serviceProperties.scheduledDate',\n },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'cart.lineItems.source.catalogOverrideFields.physicalProperties.weight',\n },\n { path: 'cart.lineItems.attributes.physicalProperties.weight' },\n { path: 'cart.deliveryInfo.address.geocode.latitude' },\n { path: 'cart.deliveryInfo.address.geocode.longitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.latitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getCart;\n}\n\n/**\n * Updates a Cart.\n *\n * Use this endpoint to set and replace fields such as buyer note and delivery method.\n * To add or remove elements from lists (e.g., line items, discounts, gift cards), use their dedicated endpoints.\n */\nexport function updateCart(payload: object): RequestOptionsFactory<any> {\n function __updateCart({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'cart.createdDate' },\n { path: 'cart.updatedDate' },\n {\n path: 'cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate',\n },\n { path: 'cart.lineItems.attributes.image.urlExpirationDate' },\n {\n path: 'cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate',\n },\n { path: 'cart.lineItems.attributes.serviceProperties.scheduledDate' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n {\n path: 'cart.lineItems.source.catalogOverrideFields.physicalProperties.weight',\n },\n { path: 'cart.lineItems.attributes.physicalProperties.weight' },\n { path: 'cart.deliveryInfo.address.geocode.latitude' },\n { path: 'cart.deliveryInfo.address.geocode.longitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.latitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.longitude' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.ecom.v2.cart',\n method: 'PATCH' as any,\n methodFqn: 'wix.ecom.cart.v2.CartService.UpdateCart',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomCartV2CartServiceUrl({\n protoPath: '/v2/carts/{cart.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'cart.createdDate' },\n { path: 'cart.updatedDate' },\n {\n path: 'cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate',\n },\n { path: 'cart.lineItems.attributes.image.urlExpirationDate' },\n {\n path: 'cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate',\n },\n {\n path: 'cart.lineItems.attributes.serviceProperties.scheduledDate',\n },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'cart.lineItems.source.catalogOverrideFields.physicalProperties.weight',\n },\n { path: 'cart.lineItems.attributes.physicalProperties.weight' },\n { path: 'cart.deliveryInfo.address.geocode.latitude' },\n { path: 'cart.deliveryInfo.address.geocode.longitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.latitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateCart;\n}\n\n/** Deletes a Cart. */\nexport function deleteCart(payload: object): RequestOptionsFactory<any> {\n function __deleteCart({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.v2.cart',\n method: 'DELETE' as any,\n methodFqn: 'wix.ecom.cart.v2.CartService.DeleteCart',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomCartV2CartServiceUrl({\n protoPath: '/v2/carts/{cartId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteCart;\n}\n\n/** Re-evaluates prices, inventory and discounts to ensure the Cart is up-to-date with the latest changes. */\nexport function refreshCart(payload: object): RequestOptionsFactory<any> {\n function __refreshCart({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.v2.cart',\n method: 'POST' as any,\n methodFqn: 'wix.ecom.cart.v2.CartService.RefreshCart',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomCartV2CartServiceUrl({\n protoPath: '/v2/carts/{cartId}/refresh',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'cart.createdDate' },\n { path: 'cart.updatedDate' },\n {\n path: 'cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate',\n },\n { path: 'cart.lineItems.attributes.image.urlExpirationDate' },\n {\n path: 'cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate',\n },\n {\n path: 'cart.lineItems.attributes.serviceProperties.scheduledDate',\n },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'cart.lineItems.source.catalogOverrideFields.physicalProperties.weight',\n },\n { path: 'cart.lineItems.attributes.physicalProperties.weight' },\n { path: 'cart.deliveryInfo.address.geocode.latitude' },\n { path: 'cart.deliveryInfo.address.geocode.longitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.latitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __refreshCart;\n}\n\n/**\n * Calculates the cart based on its current state (line items, discounts, delivery method, etc.)\n * and returns a detailed summary including subtotal, delivery costs, taxes, fees and the total price.\n * Note that discounts are already pre-computed and applied to the Cart.\n *\n * This is a read-only operation that does not modify the cart.\n */\nexport function calculateCart(payload: object): RequestOptionsFactory<any> {\n function __calculateCart({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.v2.cart',\n method: 'POST' as any,\n methodFqn: 'wix.ecom.cart.v2.CartService.CalculateCart',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomCartV2CartServiceUrl({\n protoPath: '/v2/carts/{cartId}/calculate',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'cart.createdDate' },\n { path: 'cart.updatedDate' },\n {\n path: 'cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate',\n },\n { path: 'cart.lineItems.attributes.image.urlExpirationDate' },\n {\n path: 'cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate',\n },\n {\n path: 'cart.lineItems.attributes.serviceProperties.scheduledDate',\n },\n {\n path: 'summary.paymentSummary.subscriptionCharges.charges.cycleBillingDate',\n },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'cart.lineItems.source.catalogOverrideFields.physicalProperties.weight',\n },\n { path: 'cart.lineItems.attributes.physicalProperties.weight' },\n { path: 'cart.deliveryInfo.address.geocode.latitude' },\n { path: 'cart.deliveryInfo.address.geocode.longitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.latitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __calculateCart;\n}\n\n/**\n * Retrieves the checkout URL for the Cart.\n *\n * By default, this is the standard Wix checkout page.\n * If `custom_checkout_url` is defined, it overrides the default and is returned as the checkout URL.\n */\nexport function getCheckoutUrl(payload: object): RequestOptionsFactory<any> {\n function __getCheckoutUrl({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.v2.cart',\n method: 'POST' as any,\n methodFqn: 'wix.ecom.cart.v2.CartService.GetCheckoutURL',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomCartV2CartServiceUrl({\n protoPath: '/v2/carts/{cartId}/get-checkout-url',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __getCheckoutUrl;\n}\n\n/**\n * Completes the checkout process and creates an Order.\n * This endpoint may charge the customer.\n *\n * Read more about the [eCommerce Orders API](https://dev.wix.com/api/rest/wix-ecommerce/orders-api/introduction).\n */\nexport function placeOrder(payload: object): RequestOptionsFactory<any> {\n function __placeOrder({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.v2.cart',\n method: 'POST' as any,\n methodFqn: 'wix.ecom.cart.v2.CartService.PlaceOrder',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomCartV2CartServiceUrl({\n protoPath: '/v2/carts/{cartId}/place-order',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __placeOrder;\n}\n\n/** Adds line items to the Cart. */\nexport function addLineItems(payload: object): RequestOptionsFactory<any> {\n function __addLineItems({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n {\n path: 'catalogItems.catalogOverrideFields.physicalProperties.weight',\n },\n { path: 'customItems.attributes.physicalProperties.weight' },\n ],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n {\n path: 'catalogItems.catalogOverrideFields.image.urlExpirationDate',\n },\n { path: 'customItems.attributes.image.urlExpirationDate' },\n {\n path: 'customItems.attributes.subscriptionInfo.subscriptionSettings.startDate',\n },\n { path: 'customItems.attributes.serviceProperties.scheduledDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.ecom.v2.cart',\n method: 'POST' as any,\n methodFqn: 'wix.ecom.cart.v2.CartService.AddLineItems',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomCartV2CartServiceUrl({\n protoPath: '/v2/carts/{cartId}/add-line-items',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'cart.createdDate' },\n { path: 'cart.updatedDate' },\n {\n path: 'cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate',\n },\n { path: 'cart.lineItems.attributes.image.urlExpirationDate' },\n {\n path: 'cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate',\n },\n {\n path: 'cart.lineItems.attributes.serviceProperties.scheduledDate',\n },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'cart.lineItems.source.catalogOverrideFields.physicalProperties.weight',\n },\n { path: 'cart.lineItems.attributes.physicalProperties.weight' },\n { path: 'cart.deliveryInfo.address.geocode.latitude' },\n { path: 'cart.deliveryInfo.address.geocode.longitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.latitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __addLineItems;\n}\n\n/** Removes line items from the Cart. */\nexport function removeLineItems(payload: object): RequestOptionsFactory<any> {\n function __removeLineItems({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.v2.cart',\n method: 'POST' as any,\n methodFqn: 'wix.ecom.cart.v2.CartService.RemoveLineItems',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomCartV2CartServiceUrl({\n protoPath: '/v2/carts/{cartId}/remove-line-items',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'cart.createdDate' },\n { path: 'cart.updatedDate' },\n {\n path: 'cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate',\n },\n { path: 'cart.lineItems.attributes.image.urlExpirationDate' },\n {\n path: 'cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate',\n },\n {\n path: 'cart.lineItems.attributes.serviceProperties.scheduledDate',\n },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'cart.lineItems.source.catalogOverrideFields.physicalProperties.weight',\n },\n { path: 'cart.lineItems.attributes.physicalProperties.weight' },\n { path: 'cart.deliveryInfo.address.geocode.latitude' },\n { path: 'cart.deliveryInfo.address.geocode.longitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.latitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __removeLineItems;\n}\n\n/**\n * Updates line items in the Cart.\n * Use this endpoint to update line items properties such as quantity and selected membership.\n */\nexport function updateLineItems(payload: object): RequestOptionsFactory<any> {\n function __updateLineItems({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.v2.cart',\n method: 'POST' as any,\n methodFqn: 'wix.ecom.cart.v2.CartService.UpdateLineItems',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomCartV2CartServiceUrl({\n protoPath: '/v2/carts/{cartId}/update-line-items',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'cart.createdDate' },\n { path: 'cart.updatedDate' },\n {\n path: 'cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate',\n },\n { path: 'cart.lineItems.attributes.image.urlExpirationDate' },\n {\n path: 'cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate',\n },\n {\n path: 'cart.lineItems.attributes.serviceProperties.scheduledDate',\n },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'cart.lineItems.source.catalogOverrideFields.physicalProperties.weight',\n },\n { path: 'cart.lineItems.attributes.physicalProperties.weight' },\n { path: 'cart.deliveryInfo.address.geocode.latitude' },\n { path: 'cart.deliveryInfo.address.geocode.longitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.latitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateLineItems;\n}\n\n/** Adds a coupon to the Cart. */\nexport function addCoupon(payload: object): RequestOptionsFactory<any> {\n function __addCoupon({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.v2.cart',\n method: 'POST' as any,\n methodFqn: 'wix.ecom.cart.v2.CartService.AddCoupon',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomCartV2CartServiceUrl({\n protoPath: '/v2/carts/{cartId}/add-coupon',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'cart.createdDate' },\n { path: 'cart.updatedDate' },\n {\n path: 'cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate',\n },\n { path: 'cart.lineItems.attributes.image.urlExpirationDate' },\n {\n path: 'cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate',\n },\n {\n path: 'cart.lineItems.attributes.serviceProperties.scheduledDate',\n },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'cart.lineItems.source.catalogOverrideFields.physicalProperties.weight',\n },\n { path: 'cart.lineItems.attributes.physicalProperties.weight' },\n { path: 'cart.deliveryInfo.address.geocode.latitude' },\n { path: 'cart.deliveryInfo.address.geocode.longitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.latitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __addCoupon;\n}\n\n/** Removes a coupon from the Cart. */\nexport function removeCoupon(payload: object): RequestOptionsFactory<any> {\n function __removeCoupon({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.v2.cart',\n method: 'POST' as any,\n methodFqn: 'wix.ecom.cart.v2.CartService.RemoveCoupon',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomCartV2CartServiceUrl({\n protoPath: '/v2/carts/{cartId}/remove-coupon',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'cart.createdDate' },\n { path: 'cart.updatedDate' },\n {\n path: 'cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate',\n },\n { path: 'cart.lineItems.attributes.image.urlExpirationDate' },\n {\n path: 'cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate',\n },\n {\n path: 'cart.lineItems.attributes.serviceProperties.scheduledDate',\n },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'cart.lineItems.source.catalogOverrideFields.physicalProperties.weight',\n },\n { path: 'cart.lineItems.attributes.physicalProperties.weight' },\n { path: 'cart.deliveryInfo.address.geocode.latitude' },\n { path: 'cart.deliveryInfo.address.geocode.longitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.latitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __removeCoupon;\n}\n\n/**\n * Adds a gift card to the Cart.\n * Once added, the gift card’s balance will be used as a payment method during checkout, either partially or fully covering the cart total.\n */\nexport function addGiftCard(payload: object): RequestOptionsFactory<any> {\n function __addGiftCard({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.v2.cart',\n method: 'POST' as any,\n methodFqn: 'wix.ecom.cart.v2.CartService.AddGiftCard',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomCartV2CartServiceUrl({\n protoPath: '/v2/carts/{cartId}/add-gift-card',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'cart.createdDate' },\n { path: 'cart.updatedDate' },\n {\n path: 'cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate',\n },\n { path: 'cart.lineItems.attributes.image.urlExpirationDate' },\n {\n path: 'cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate',\n },\n {\n path: 'cart.lineItems.attributes.serviceProperties.scheduledDate',\n },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'cart.lineItems.source.catalogOverrideFields.physicalProperties.weight',\n },\n { path: 'cart.lineItems.attributes.physicalProperties.weight' },\n { path: 'cart.deliveryInfo.address.geocode.latitude' },\n { path: 'cart.deliveryInfo.address.geocode.longitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.latitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __addGiftCard;\n}\n\n/** Removes a gift card from the Cart. */\nexport function removeGiftCard(payload: object): RequestOptionsFactory<any> {\n function __removeGiftCard({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.v2.cart',\n method: 'POST' as any,\n methodFqn: 'wix.ecom.cart.v2.CartService.RemoveGiftCard',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomCartV2CartServiceUrl({\n protoPath: '/v2/carts/{cartId}/remove-gift-card',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'cart.createdDate' },\n { path: 'cart.updatedDate' },\n {\n path: 'cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate',\n },\n { path: 'cart.lineItems.attributes.image.urlExpirationDate' },\n {\n path: 'cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate',\n },\n {\n path: 'cart.lineItems.attributes.serviceProperties.scheduledDate',\n },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'cart.lineItems.source.catalogOverrideFields.physicalProperties.weight',\n },\n { path: 'cart.lineItems.attributes.physicalProperties.weight' },\n { path: 'cart.deliveryInfo.address.geocode.latitude' },\n { path: 'cart.deliveryInfo.address.geocode.longitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.latitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __removeGiftCard;\n}\n\n/**\n * Marks the cart as completed. This means an order was created from the cart.\n *\n * Sets the `orderPlaced` field to `true`.\n */\nexport function markCartAsCompleted(\n payload: object\n): RequestOptionsFactory<any> {\n function __markCartAsCompleted({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.v2.cart',\n method: 'POST' as any,\n methodFqn: 'wix.ecom.cart.v2.CartService.MarkCartAsCompleted',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomCartV2CartServiceUrl({\n protoPath: '/v2/carts/{cartId}/mark-cart-as-completed',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'cart.createdDate' },\n { path: 'cart.updatedDate' },\n {\n path: 'cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate',\n },\n { path: 'cart.lineItems.attributes.image.urlExpirationDate' },\n {\n path: 'cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate',\n },\n {\n path: 'cart.lineItems.attributes.serviceProperties.scheduledDate',\n },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'cart.lineItems.source.catalogOverrideFields.physicalProperties.weight',\n },\n { path: 'cart.lineItems.attributes.physicalProperties.weight' },\n { path: 'cart.deliveryInfo.address.geocode.latitude' },\n { path: 'cart.deliveryInfo.address.geocode.longitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.latitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __markCartAsCompleted;\n}\n\n/**\n * Handles asynchronous checkout completion and redirects to a specified URL.\n *\n * Triggered by Wix Cashier after payment completion, this endpoint finalizes the checkout process and redirects the user to the previously provided success URL.\n * In some cases, this endpoint might be called directly by the external payment provider.\n */\nexport function handleAsyncCheckoutCompletion(\n payload: object\n): RequestOptionsFactory<any> {\n function __handleAsyncCheckoutCompletion({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.v2.cart',\n method: 'POST' as any,\n methodFqn: 'wix.ecom.cart.v2.CartService.HandleAsyncCheckoutCompletion',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomCartV2CartServiceUrl({\n protoPath: '/v2/carts/handle-async-checkout-completion',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTBytesToSDKBytes,\n paths: [{ path: 'body' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __handleAsyncChecko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AM,4BAA4B;AAAA,YACpC,EAAE,MAAM,kCAAkC;AAAA,UAC5C;AAAA,QACF;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAf;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,QAAQ,QAAQ,SAAS,eAAe;AAAA,QACpE,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,UAAU,SAAS;AAAA,IACtB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AAsBA,eAAsBgB,+BACpB,OAOA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC,EAAE,MAAa,CAAC;AAEtE,QAAM,UACoB,8BAA8B,OAAO;AAE/D,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAhB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,OAAO,OAAO;AAAA,QAC1C,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,OAAO;AAAA,IACV;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["addCoupon","addGiftCard","addLineItems","calculateCart","createCart","deleteCart","getCart","getCheckoutUrl","handleAsyncCheckoutCompletion","markCartAsCompleted","placeOrder","refreshCart","removeCoupon","removeGiftCard","removeLineItems","updateCart","updateLineItems","import_float","import_timestamp","import_rest_modules","payload","import_address","import_image","import_page_url_v2","import_transform_paths","DescriptionLineType","PaymentOptionType","ItemTypeItemType","SubscriptionFrequency","FileType","TaxableAddressType","ItemStatus","ChannelType","VatType","WeightUnit","DiscountSourceType","DiscountScope","RuleType","Severity","NameInOther","NameInLineItem","SuggestedFix","ValidationsConfig","WebhookIdentityType","createCart","sdkTransformError","getCart","updateCart","deleteCart","refreshCart","calculateCart","getCheckoutUrl","placeOrder","addLineItems","removeLineItems","updateLineItems","addCoupon","removeCoupon","addGiftCard","removeGiftCard","markCartAsCompleted","handleAsyncCheckoutCompletion"]}
|
|
1
|
+
{"version":3,"sources":["../../index.typings.ts","../../src/ecom-v2-cart-cart-v-2.universal.ts","../../src/ecom-v2-cart-cart-v-2.http.ts"],"sourcesContent":["export * from './src/ecom-v2-cart-cart-v-2.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixEcomV2Cart from './ecom-v2-cart-cart-v-2.http.js';\nimport { transformSDKAddressToRESTAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformRESTAddressToSDKAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformSDKImageToRESTImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformRESTImageToSDKImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformSDKPageURLV2ToRESTPageURLV2 } from '@wix/sdk-runtime/transformations/page-url-v2';\nimport { transformRESTPageURLV2ToSDKPageURLV2 } from '@wix/sdk-runtime/transformations/page-url-v2';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\nexport interface Cart {\n /**\n * Cart ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * Date and time the Cart was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the Cart was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Revision number, which increments by 1 each time the Cart is updated.\n * @readonly\n */\n revision?: string | null;\n /**\n * Line items added to the Cart by the customer.\n * This list may include both valid items (in stock) and invalid ones (e.g., out of stock).\n * When submitting an order, only valid items will be included in the order.\n * @maxSize 300\n * @readonly\n */\n lineItems?: V2LineItem[];\n /** The sum of all line item final prices. */\n subtotal?: ConvertedMoney;\n /**\n * Optional message left by the customer.\n * Usually intended for the merchant and contain special instructions, requests, or clarifications related to the order.\n * @maxLength 1000\n */\n note?: string | null;\n /**\n * List of coupons added to the Cart.\n * Currently, only one coupon code is supported.\n * @maxSize 1\n */\n coupons?: Coupon[];\n /** Information about the source of the Cart, detailing the origin or context in which the Cart was created. */\n source?: CartSource;\n /** Information about the site from which the Cart's line items were added. */\n businessInfo?: BusinessInfo;\n /** Information about the customer that owns the Cart. */\n customerInfo?: CustomerInfo;\n /** Delivery-related information associated with the Cart. */\n deliveryInfo?: DeliveryInfo;\n /** Tax-related information associated with the Cart. */\n taxInfo?: TaxInfo;\n /** Payment-related information associated with the Cart. */\n paymentInfo?: PaymentInfo;\n /**\n * Whether the Cart has been placed as an Order.\n * Defaults to `false`.\n * @readonly\n */\n orderPlaced?: boolean;\n /**\n * The ID of the Order created from the Cart.\n * This field is empty until the checkout process is completed.\n * @format GUID\n * @readonly\n */\n orderId?: string | null;\n /**\n * Persistent ID that correlates between the Cart and the created Order (after the checkout is completed).\n * @format GUID\n * @readonly\n */\n purchaseFlowId?: string | null;\n /**\n * Additional Cart settings.\n *\n * > **Notes:**\n * > * Custom settings can only be set when creating a Cart.\n * > * To access and manage custom checkout page content, your app must have the permission scope named \"Manage eCommerce - Admin Permissions\". Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).\n * @immutable\n */\n settings?: CartSettings;\n /**\n * Custom checkout URL to redirect the customer to a checkout page.\n * By default, customers are redirected to the standard Wix checkout page.\n * Clients can override this behavior by providing their own URL here.\n * If the URL contains the placeholder `{checkout_id}`, it will be replaced with the actual Cart ID.\n * @maxLength 2048\n */\n customCheckoutUrl?: string | null;\n /**\n * Custom fields.\n * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls.\n */\n extendedFields?: ExtendedFields;\n}\n\nexport interface V2LineItem {\n /**\n * A unique identifier of the line item within the Cart.\n * @format GUID\n */\n _id?: string;\n /** The name of the line item. */\n name?: TranslatableString;\n /** Quantity-related information about the line item. */\n quantityInfo?: ItemQuantityInfo;\n /** Pricing-related information about the line item. */\n pricing?: ItemPricingInfo;\n /** Information about the origin of the line item. */\n source?: ItemSource;\n /** Details about the item for display purposes. */\n attributes?: ItemAttributes;\n /** Delivery-related information about the line item. */\n deliveryConfig?: ItemDeliveryConfig;\n /** Tax-related information about the line item. */\n taxConfig?: ItemTaxConfig;\n /** Payment-related information about the line item. */\n paymentConfig?: ItemPaymentConfig;\n /** The availability status of the line item according to the inventory. */\n status?: ItemStatusWithLiterals;\n /**\n * Custom extended fields for the line item object.\n *\n * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured using the 'Checkout & Orders - Line Items Schema Plugin' in the app dashboard before they can be accessed with API calls.\n */\n extendedFields?: ExtendedFields;\n /**\n * Additional Fees to be added to this item calculation.\n * @maxSize 5\n */\n additionalFees?: AdditionalFee[];\n /**\n * Modifier groups that were added to the item.\n * @maxSize 25\n */\n modifierGroups?: ModifierGroup[];\n /**\n * List of discounts applied to this line item.\n * @maxSize 100\n */\n discounts?: ItemDiscount[];\n /**\n * Whether the line item is a custom line item.\n * Custom line items don't trigger the Catalog service plugin.\n */\n customLineItem?: boolean;\n}\n\nexport interface TranslatableString {\n /**\n * __Required.__ String in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n *\n * Min: 1 character.\n * Max: 200 characters.\n * @minLength 1\n * @maxLength 200\n */\n original?: string;\n /**\n * String translated into the buyer's language.\n *\n * Min: 1 character.\n * Max: 400 characters.\n * Default: Same as `original`.\n * @minLength 1\n * @maxLength 400\n */\n translated?: string | null;\n}\n\nexport interface ItemQuantityInfo {\n /**\n * The final confirmed quantity of items to be purchased.\n * This value is the minimum between the requested quantity and the available quantity.\n * @min 1\n * @max 100000\n */\n confirmedQuantity?: number;\n /**\n * The amount of items originally requested by the customer.\n * @min 1\n * @max 100000\n */\n requestedQuantity?: number;\n /** The maximum quantity of items available for purchase. */\n availableQuantity?: number | null;\n /**\n * Whether the line item quantity is fixed and cannot be changed.\n * Default: `false`.\n */\n fixedQuantity?: boolean;\n}\n\nexport interface ItemPricingInfo {\n /**\n * Final unit price after applying automatic discounts.\n * Includes tax if `tax_info.prices_include_tax` is true.\n */\n unitPrice?: ConvertedMoney;\n /**\n * Final total price for this item (unit price × quantity).\n * Includes tax if `tax_info.prices_include_tax` is true.\n */\n totalPrice?: ConvertedMoney;\n /**\n * Additional description for the price.\n * For example, when price is 0 but additional details about the actual price are needed - \"Starts at $67\".\n */\n priceDescription?: PriceDescription;\n /** Indicates whether the price is not yet defined, and will be updated after the order is created. */\n priceUndetermined?: boolean;\n /** Detailed breakdown of price components. */\n breakdown?: ItemPriceBreakdown;\n}\n\nexport interface ConvertedMoney {\n /**\n * Monetary amount in the original currency, as specified in `business_info.currency_code`.\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0, lte:999999999, maxScale:3 }\n */\n amount?: string;\n /**\n * Monetary amount in the converted currency, as specified in `customer_info.currency_code`.\n *\n * Default: `amount`.\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0, lte:999999999, maxScale:3 }\n */\n convertedAmount?: string;\n}\n\nexport interface PriceDescription {\n /**\n * __Required.__ Price description in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n * @minLength 1\n * @maxLength 100\n */\n original?: string;\n /**\n * Price description translated into the buyer's language.\n *\n * Default: Same as `original`.\n * @minLength 1\n * @maxLength 100\n */\n translated?: string | null;\n}\n\nexport interface ItemPriceBreakdown {\n /**\n * Full catalog price of a single item before any discounts, including modifiers.\n * Includes tax if `tax_info.prices_include_tax` is true.\n */\n fullPrice?: ConvertedMoney;\n /**\n * Catalog sale price of a single item, including modifiers.\n * Includes tax if `tax_info.prices_include_tax` is true.\n */\n salePrice?: ConvertedMoney;\n /**\n * Total price of all item modifiers for the entire quantity of this item.\n * Includes tax if `tax_info.prices_include_tax` is true.\n */\n totalModifiersPrice?: ConvertedMoney;\n}\n\nexport interface ItemSource {\n /**\n * Catalog and item reference.\n * Holds IDs for the item and the catalog it came from, as well as further optional info.\n * Optional for custom line items, which don't trigger the Catalog service plugin.\n */\n catalogReference?: CatalogReference;\n /**\n * Overriding values for catalog item properties.\n * To override catalog fields, your app must have the permission scope named \"Manage eCommerce - Admin Permissions\".\n * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).\n */\n catalogOverrideFields?: CatalogOverrideFields;\n /**\n * In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID.\n * + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID.\n * + in most cases, this field is the same as `catalogReference.catalogItemId`.\n * + Used in membership validation.\n * @minLength 1\n * @maxLength 36\n */\n rootCatalogItemId?: string | null;\n /**\n * ID of the app managing the inventory.\n * @format GUID\n */\n inventoryAppId?: string | null;\n}\n\n/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */\nexport interface CatalogReference {\n /**\n * ID of the item within the catalog it belongs to.\n * @minLength 1\n * @maxLength 36\n */\n catalogItemId?: string;\n /**\n * ID of the app providing the catalog.\n *\n * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).\n *\n * For items from Wix catalogs, the following values always apply:\n * + Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n * + Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`\n * + Wix Restaurants: `\"9a5d83fd-8570-482e-81ab-cfa88942ee60\"`\n * @minLength 1\n */\n appId?: string;\n /**\n * Additional item details in key:value pairs. Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items.\n *\n * For products and variants from a Wix Stores catalog, learn more about eCommerce integration ([SDK](https://dev.wix.com/docs/sdk/backend-modules/stores/catalog-v3/e-commerce-integration) | [REST](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration)).\n */\n options?: Record<string, any> | null;\n}\n\nexport interface CatalogOverrideFields {\n /** The name of the line item. */\n name?: TranslatableString;\n /**\n * The sale price of a single item after modifiers but before automatic discount.\n * @decimalValue options { gte:0, lte:999999999, maxScale:3 }\n */\n salePrice?: string | null;\n /**\n * The full price of a single item after modifiers but before automatic discount.\n * @decimalValue options { gte:0, lte:999999999, maxScale:3 }\n */\n fullPrice?: string | null;\n /**\n * Item description lines.\n * Used when displaying the line item to buyers.\n * @maxSize 20\n */\n descriptionLines?: DescriptionLine[];\n /** Physical properties of the item. */\n physicalProperties?: PhysicalProperties;\n /** Item image. */\n image?: string;\n /** Payment method selected for the item. */\n paymentOption?: PaymentOption;\n /**\n * Partial payment to be paid upfront during the checkout.\n * Only eligible for catalog items with `lineItem.paymentOption.value` type of `DEPOSIT_ONLINE`.\n * @format DECIMAL_VALUE\n * @decimalValue options { gt:0, lte:999999999, maxScale:3 }\n */\n depositAmount?: string | null;\n /**\n * Whether to save the payment method on the order.\n *\n * Default: `false`\n */\n savePaymentMethod?: boolean | null;\n}\n\nexport interface DescriptionLine\n extends DescriptionLineValueOneOf,\n DescriptionLineDescriptionLineValueOneOf {\n /** Description line plain text value. */\n plainText?: PlainTextValue;\n /** Description line color value. */\n colorInfo?: Color;\n /** Description line name. */\n name?: DescriptionLineName;\n /**\n * Whether the description line originates from a modifier.\n * @internal\n * @deprecated Whether the description line originates from a modifier.\n * @replacedBy none\n * @targetRemovalDate 2025-12-31\n */\n modifierDescriptionLine?: boolean;\n}\n\n/** @oneof */\nexport interface DescriptionLineValueOneOf {\n /** Description line plain text value. */\n plainText?: PlainTextValue;\n /** Description line color value. */\n colorInfo?: Color;\n}\n\n/** @oneof */\nexport interface DescriptionLineDescriptionLineValueOneOf {}\n\nexport interface DescriptionLineName {\n /**\n * Description line name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n * @maxLength 100\n */\n original?: string;\n /**\n * Description line name translated into the buyer's language.\n *\n * Default: Same as `original`.\n * @maxLength 200\n */\n translated?: string | null;\n}\n\nexport interface PlainTextValue {\n /**\n * Description line plain text value in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n * @maxLength 600\n */\n original?: string;\n /**\n * Description line plain text value translated into the buyer's language.\n *\n * Default: Same as `original`.\n * @maxLength 600\n */\n translated?: string | null;\n}\n\nexport interface Color {\n /**\n * Description line color name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n * @maxLength 500\n */\n original?: string;\n /**\n * Description line color name translated into the buyer's language.\n *\n * Default: Same as `original`.\n * @maxLength 500\n */\n translated?: string | null;\n /** HEX or RGB color code for display. */\n code?: string | null;\n}\n\nexport enum DescriptionLineType {\n /** Unrecognized type. */\n UNRECOGNISED = 'UNRECOGNISED',\n /** Plain text type. */\n PLAIN_TEXT = 'PLAIN_TEXT',\n /** Color type. */\n COLOR = 'COLOR',\n}\n\n/** @enumType */\nexport type DescriptionLineTypeWithLiterals =\n | DescriptionLineType\n | 'UNRECOGNISED'\n | 'PLAIN_TEXT'\n | 'COLOR';\n\nexport interface PhysicalProperties {\n /** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */\n weight?: number | null;\n /**\n * Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku).\n * @maxLength 40\n */\n sku?: string | null;\n /** Whether this line item is shippable. */\n shippable?: boolean;\n}\n\nexport interface PaymentOption {\n /**\n * Type of selected payment option for current item.\n *\n * Default: `FULL_PAYMENT_ONLINE`\n */\n value?: PaymentOptionTypeWithLiterals;\n}\n\n/** Type of selected payment option for catalog item */\nexport enum PaymentOptionType {\n /** The entire payment for this item happens as part of the checkout. */\n FULL_PAYMENT_ONLINE = 'FULL_PAYMENT_ONLINE',\n /** The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. */\n FULL_PAYMENT_OFFLINE = 'FULL_PAYMENT_OFFLINE',\n /** Payment for this item is done by charging a membership. Any remaining amount not covered by the membership, such as item modifiers, is paid online. */\n MEMBERSHIP = 'MEMBERSHIP',\n /** Partial payment to be paid upfront during checkout. The initial amount to be paid for each line item is specified in `depositAmount`. */\n DEPOSIT_ONLINE = 'DEPOSIT_ONLINE',\n /** Payment for this item can only be done by charging a membership and must be manually redeemed in the dashboard by the site admin. When selected, `price` is `0`. */\n MEMBERSHIP_OFFLINE = 'MEMBERSHIP_OFFLINE',\n /**\n * Item price is charged to online membership. Any remaining amount not covered by the membership, such as item modifiers, is paid offline.\n * @documentationMaturity preview\n */\n MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER = 'MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER',\n}\n\n/** @enumType */\nexport type PaymentOptionTypeWithLiterals =\n | PaymentOptionType\n | 'FULL_PAYMENT_ONLINE'\n | 'FULL_PAYMENT_OFFLINE'\n | 'MEMBERSHIP'\n | 'DEPOSIT_ONLINE'\n | 'MEMBERSHIP_OFFLINE'\n | 'MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER';\n\nexport interface ItemAttributes {\n /**\n * Description lines of the item.\n * @maxSize 100\n */\n descriptionLines?: DescriptionLine[];\n /** The image of the item. */\n image?: string;\n /** URL to the item's page on the site. */\n url?: string;\n /**\n * Policies to be displayed to the buyer on the checkout page.\n * @maxSize 5\n */\n policies?: Policy[];\n /** Item type. Either a preset type or custom. */\n itemType?: ItemType;\n /**\n * Physical properties of the item.\n * When relevant, contains information such as SKU, item weight, and shippability.\n */\n physicalProperties?: PhysicalProperties;\n /** Subscription option information. */\n subscriptionInfo?: SubscriptionOptionInfo;\n /** Service properties. When relevant, this contains information such as date and number of participants. */\n serviceProperties?: ServiceProperties;\n /**\n * Whether the item can only be purchased by site members.\n * Default: `false`\n */\n membersOnly?: boolean;\n}\n\nexport interface Policy {\n /**\n * Policy title - should be translated\n * @minLength 1\n * @maxLength 29\n */\n title?: string | null;\n /**\n * Policy content - should be translated\n * @minLength 1\n * @maxLength 3000\n */\n content?: string;\n}\n\nexport interface ItemType extends ItemTypeItemTypeDataOneOf {\n /** Preset item type. */\n preset?: ItemTypeItemTypeWithLiterals;\n /** Custom item type. When none of the preset types are suitable, specifies the custom type. */\n custom?: string;\n}\n\n/** @oneof */\nexport interface ItemTypeItemTypeDataOneOf {\n /** Preset item type. */\n preset?: ItemTypeItemTypeWithLiterals;\n /** Custom item type. When none of the preset types are suitable, specifies the custom type. */\n custom?: string;\n}\n\nexport enum ItemTypeItemType {\n UNRECOGNISED = 'UNRECOGNISED',\n PHYSICAL = 'PHYSICAL',\n DIGITAL = 'DIGITAL',\n GIFT_CARD = 'GIFT_CARD',\n SERVICE = 'SERVICE',\n}\n\n/** @enumType */\nexport type ItemTypeItemTypeWithLiterals =\n | ItemTypeItemType\n | 'UNRECOGNISED'\n | 'PHYSICAL'\n | 'DIGITAL'\n | 'GIFT_CARD'\n | 'SERVICE';\n\nexport interface SubscriptionOptionInfo {\n /** Subscription option settings. */\n subscriptionSettings?: SubscriptionSettings;\n /** Subscription option title. */\n title?: Title;\n /** Subscription option description. */\n description?: Description;\n}\n\nexport interface SubscriptionSettings {\n /** Frequency of recurring payment. */\n frequency?: SubscriptionFrequencyWithLiterals;\n /**\n * Interval of recurring payment.\n *\n * Default: `1`.\n * If SubscriptionFrequency is Day the minimum interval is 7\n * @min 1\n * @max 3650\n */\n interval?: number | null;\n /** Whether subscription is renewed automatically at the end of each period. */\n autoRenewal?: boolean;\n /**\n * Number of billing cycles before subscription ends. Ignored if `autoRenewal` is `true`.\n * @min 1\n */\n billingCycles?: number | null;\n /** Whether to allow the customer to cancel the subscription.. */\n enableCustomerCancellation?: boolean;\n /**\n * Period until first cycle starts. If applied payNow will be 0\n * If None => no free trial\n */\n freeTrialPeriod?: FreeTrialPeriod;\n /**\n * The date the subscription will start. The subscription will be charged either now or according to freeTrialDays.\n * @internal\n */\n startDate?: Date | null;\n}\n\n/** Frequency unit of recurring payment */\nexport enum SubscriptionFrequency {\n UNDEFINED = 'UNDEFINED',\n DAY = 'DAY',\n WEEK = 'WEEK',\n MONTH = 'MONTH',\n YEAR = 'YEAR',\n}\n\n/** @enumType */\nexport type SubscriptionFrequencyWithLiterals =\n | SubscriptionFrequency\n | 'UNDEFINED'\n | 'DAY'\n | 'WEEK'\n | 'MONTH'\n | 'YEAR';\n\nexport interface FreeTrialPeriod {\n /** Frequency of period. Values: DAY, WEEK, MONTH, YEAR */\n frequency?: SubscriptionFrequencyWithLiterals;\n /**\n * interval of period\n * @min 1\n * @max 999\n */\n interval?: number;\n}\n\nexport interface Title {\n /**\n * Subscription option name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n * @minLength 1\n * @maxLength 150\n */\n original?: string;\n /**\n * Subscription option name translated into the buyer's language.\n *\n * Default: Same as `original`.\n * @minLength 1\n * @maxLength 150\n */\n translated?: string | null;\n}\n\nexport interface Description {\n /**\n * Subscription option description.\n * @maxLength 500\n */\n original?: string;\n /**\n * Translated subscription option description.\n * @maxLength 500\n */\n translated?: string | null;\n}\n\nexport interface SecuredMedia {\n /**\n * Media ID in Wix Media Manager.\n * @minLength 1\n * @maxLength 100\n */\n _id?: string;\n /**\n * Original filename.\n * @minLength 1\n * @maxLength 1000\n */\n fileName?: string;\n /** File type. */\n fileType?: FileTypeWithLiterals;\n}\n\nexport enum FileType {\n UNSPECIFIED = 'UNSPECIFIED',\n SECURE_PICTURE = 'SECURE_PICTURE',\n SECURE_VIDEO = 'SECURE_VIDEO',\n SECURE_DOCUMENT = 'SECURE_DOCUMENT',\n SECURE_MUSIC = 'SECURE_MUSIC',\n SECURE_ARCHIVE = 'SECURE_ARCHIVE',\n}\n\n/** @enumType */\nexport type FileTypeWithLiterals =\n | FileType\n | 'UNSPECIFIED'\n | 'SECURE_PICTURE'\n | 'SECURE_VIDEO'\n | 'SECURE_DOCUMENT'\n | 'SECURE_MUSIC'\n | 'SECURE_ARCHIVE';\n\nexport interface ServiceProperties {\n /**\n * Date and time the service is to be provided, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.\n * For example, the start time of a class.\n */\n scheduledDate?: Date | null;\n /**\n * The number of people participating in the service. For example, the number of people attending a class or the number of people per hotel room.\n * @min 1\n * @max 10000\n */\n numberOfParticipants?: number | null;\n}\n\nexport interface ItemDeliveryConfig {\n /**\n * Delivery profile ID.\n * @format GUID\n */\n deliveryProfileId?: string | null;\n /**\n * An optional custom fulfiller's ID.\n * @format GUID\n */\n fulfillerId?: string | null;\n}\n\nexport interface ItemTaxConfig {\n /** Address to use for tax calculation purposes. */\n taxableAddress?: TaxableAddress;\n /**\n * Tax group ID for this line item.\n * @maxLength 50\n */\n taxGroupId?: string | null;\n}\n\nexport interface TaxableAddress extends TaxableAddressTaxableAddressDataOneOf {\n /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */\n addressType?: TaxableAddressTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface TaxableAddressTaxableAddressDataOneOf {\n /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */\n addressType?: TaxableAddressTypeWithLiterals;\n}\n\nexport enum TaxableAddressType {\n UNKNOWN_TAXABLE_ADDRESS = 'UNKNOWN_TAXABLE_ADDRESS',\n BUSINESS = 'BUSINESS',\n BILLING = 'BILLING',\n SHIPPING = 'SHIPPING',\n}\n\n/** @enumType */\nexport type TaxableAddressTypeWithLiterals =\n | TaxableAddressType\n | 'UNKNOWN_TAXABLE_ADDRESS'\n | 'BUSINESS'\n | 'BILLING'\n | 'SHIPPING';\n\nexport interface ItemPaymentConfig {\n /**\n * Whether to save the payment method on the order.\n * Default: `false`\n */\n savePaymentMethod?: boolean;\n /**\n * Item payment policy that requires buyer consent to complete purchase.\n * The payment policy will be displayed on the checkout page.\n * @minLength 1\n * @maxLength 2500\n */\n consentRequiredPaymentPolicy?: string | null;\n /**\n * Partial payment to be paid upfront during the checkout.\n * Eligible for catalog items with `lineItem.paymentOption` type `DEPOSIT_ONLINE` only.\n */\n depositAmount?: ConvertedMoney;\n /**\n * Selected membership to be used as payment for this item.\n * Must be used with `lineItem.paymentOption` set to `MEMBERSHIP` or `MEMBERSHIP_OFFLINE`.\n * This field can be empty when `lineItem.paymentOption` is set to `MEMBERSHIP_OFFLINE`.\n */\n selectedMembership?: SelectedMembership;\n /**\n * Type of selected payment option for current item.\n *\n * Default: `FULL_PAYMENT_ONLINE`\n */\n paymentOption?: PaymentOptionTypeWithLiterals;\n}\n\nexport interface SelectedMembership {\n /**\n * Membership ID.\n * @minLength 1\n * @maxLength 100\n */\n _id?: string;\n /**\n * ID of the app providing this payment option.\n * @format GUID\n */\n appId?: string;\n /**\n * Name of the selected membership.\n * @readonly\n */\n name?: TranslatableString;\n}\n\nexport enum ItemStatus {\n UNKNOWN_ITEM_STATUS = 'UNKNOWN_ITEM_STATUS',\n /** The item is available in the requested quantity. */\n IN_STOCK = 'IN_STOCK',\n /** Only part of the requested quantity is available. */\n PARTIALLY_IN_STOCK = 'PARTIALLY_IN_STOCK',\n /** The item is out of stock. */\n OUT_OF_STOCK = 'OUT_OF_STOCK',\n /** The item is no longer exists in the catalog. */\n REMOVED_FROM_CATALOG = 'REMOVED_FROM_CATALOG',\n}\n\n/** @enumType */\nexport type ItemStatusWithLiterals =\n | ItemStatus\n | 'UNKNOWN_ITEM_STATUS'\n | 'IN_STOCK'\n | 'PARTIALLY_IN_STOCK'\n | 'OUT_OF_STOCK'\n | 'REMOVED_FROM_CATALOG';\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface AdditionalFee {\n /**\n * Additional fee's unique code or ID.\n * @minLength 1\n * @maxLength 100\n */\n code?: string | null;\n /**\n * Additional fee's name.\n *\n * Max: 50 characters\n * @minLength 1\n * @maxLength 50\n */\n name?: string;\n /**\n * Total additional fees. This `price` does not include any taxes that may apply to these additional fees.\n * @decimalValue options { gte:0, lte:1000000000000000, maxScale:2 }\n */\n price?: string;\n /**\n * Tax details.\n *\n * > **Note:** Tax is not calculated in the returned `price` even when `taxDetails.taxable` is `true`.\n */\n taxDetails?: TaxDetails;\n /**\n * Number of subscription cycle this fee applies to\n * default None - all billing cycle\n * @internal\n * @min 1\n * @max 999\n */\n subscriptionCycles?: number | null;\n}\n\n/** Tax details. */\nexport interface TaxDetails {\n /** Whether additional fee is taxable. */\n taxable?: boolean;\n /**\n * Reserved for internal use.\n * @format GUID\n */\n taxGroupId?: string | null;\n}\n\nexport interface ModifierGroup {\n /**\n * Modifier group ID.\n * @minLength 1\n * @maxLength 36\n * @readonly\n */\n _id?: string;\n /** Modifier group name. */\n name?: TranslatableString;\n /**\n * List of modifiers in this group.\n * @minSize 1\n * @maxSize 25\n */\n modifiers?: ItemModifier[];\n}\n\nexport interface ItemModifier {\n /**\n * Modifier ID.\n * @minLength 1\n * @maxLength 36\n * @readonly\n */\n _id?: string;\n /**\n * The quantity of this modifier.\n * @min 1\n * @max 100000\n */\n quantity?: number;\n /** Primary display label for the modifier. */\n label?: TranslatableString;\n /** Additional details. */\n details?: TranslatableString;\n /** The price of the modifier. */\n price?: ConvertedMoney;\n}\n\n/**\n * Currently, only automatic discounts are applied to line items.\n * In the future, coupon discounts will be supported as well.\n */\nexport interface ItemDiscount {\n /** The display name of the discount. */\n name?: TranslatableString;\n /** The amount discounted from the item's sale price (per unit). */\n amountOff?: ConvertedMoney;\n}\n\nexport interface Scope {\n /** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */\n namespace?: string;\n /** Coupon scope's applied group (e.g., event or ticket in Wix Events) */\n group?: Group;\n}\n\nexport interface Group {\n /** Coupon scope's group (e.g., product or collection in Wix Stores). See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */\n name?: string;\n /** Item ID (when the coupon scope is limited to just one item). */\n entityId?: string | null;\n}\n\nexport interface Coupon {\n /**\n * ID of the coupon in the Cart.\n * @format GUID\n */\n _id?: string;\n /**\n * Coupon code.\n * @minLength 1\n * @maxLength 50\n */\n code?: string;\n}\n\nexport interface CartSource {\n /**\n * Sales channel that created the Cart.\n * @immutable\n */\n channelType?: ChannelTypeWithLiterals;\n /**\n * References to an external app and resource associated with this Cart.\n * Used for integration and tracking across different platforms.\n * @maxSize 10\n * @immutable\n */\n externalReferences?: ExternalReference[];\n /**\n * ID of the entity that created the Cart.\n * @readonly\n */\n createdBy?: CreatedBy;\n /**\n * Reference IDs for the app and component providing custom checkout page content.\n *\n * To access and manage custom checkout page content, your app must have the permission scope named \"Manage eCommerce - Admin Permissions\".\n * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).\n */\n customContentReference?: CustomContentReference;\n}\n\nexport enum ChannelType {\n /** Unspecified sales channel. This value is not supported. */\n UNSPECIFIED = 'UNSPECIFIED',\n /** A web client. */\n WEB = 'WEB',\n /** [Point of sale solutions](https://support.wix.com/en/wix-mobile-pos-2196395). */\n POS = 'POS',\n /** [eBay shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-ebay-shop). */\n EBAY = 'EBAY',\n /** [Amazon shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-amazon-shop). */\n AMAZON = 'AMAZON',\n /** Other sales platform. */\n OTHER_PLATFORM = 'OTHER_PLATFORM',\n /** [Wix Owner app](https://support.wix.com/article/wix-owner-app-an-overview). */\n WIX_APP_STORE = 'WIX_APP_STORE',\n /** Wix Invoices app in [your dashboard](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Finvoices/settings/general-settings) */\n WIX_INVOICES = 'WIX_INVOICES',\n /** Wix merchant backoffice. */\n BACKOFFICE_MERCHANT = 'BACKOFFICE_MERCHANT',\n /** Wish sales channel. */\n WISH = 'WISH',\n /** [ClassPass sales channel](https://support.wix.com/en/article/wix-bookings-letting-clients-book-your-services-with-classpass). */\n CLASS_PASS = 'CLASS_PASS',\n /** Global-E sales channel. */\n GLOBAL_E = 'GLOBAL_E',\n /** [Facebook shop](https://support.wix.com/en/article/wix-stores-changes-to-facebook-shops). */\n FACEBOOK = 'FACEBOOK',\n /** [Etsy sales channel](https://support.wix.com/en/article/wix-stores-request-adding-etsy-as-a-sales-channel). */\n ETSY = 'ETSY',\n /** [TikTok sales channel](https://support.wix.com/en/article/wix-stores-request-adding-tiktok-as-a-sales-channel). */\n TIKTOK = 'TIKTOK',\n /** [Faire marketplace integration](https://support.wix.com/en/article/wix-stores-creating-a-faire-store-using-the-faire-integration-app). */\n FAIRE_COM = 'FAIRE_COM',\n /** PayPal Agentic Checkout sales channel. */\n PAYPAL_AGENTIC_CHECKOUT = 'PAYPAL_AGENTIC_CHECKOUT',\n}\n\n/** @enumType */\nexport type ChannelTypeWithLiterals =\n | ChannelType\n | 'UNSPECIFIED'\n | 'WEB'\n | 'POS'\n | 'EBAY'\n | 'AMAZON'\n | 'OTHER_PLATFORM'\n | 'WIX_APP_STORE'\n | 'WIX_INVOICES'\n | 'BACKOFFICE_MERCHANT'\n | 'WISH'\n | 'CLASS_PASS'\n | 'GLOBAL_E'\n | 'FACEBOOK'\n | 'ETSY'\n | 'TIKTOK'\n | 'FAIRE_COM'\n | 'PAYPAL_AGENTIC_CHECKOUT';\n\nexport interface ExternalReference {\n /**\n * ID of the app associated with the purchase flow.\n * For example, the Wix Pay Links app ID.\n * @format GUID\n * @immutable\n */\n appId?: string;\n /**\n * Reference to an external resource ID. Used to link the purchase flow to a specific entity in an external system.\n * For example, a Wix Pay Link ID.\n * @minLength 1\n * @maxLength 100\n * @immutable\n */\n resourceId?: string | null;\n}\n\nexport interface CreatedBy extends CreatedByIdOneOf {\n /**\n * Site visitor ID (if site visitor is **not** a member).\n * @format GUID\n * @readonly\n */\n visitorId?: string;\n /**\n * Site member ID.\n * @format GUID\n * @readonly\n */\n memberId?: string;\n /**\n * Wix user ID - when the Cart was created by a Wix user on behalf of a buyer.\n * For example, via POS (point of service).\n * @format GUID\n */\n userId?: string;\n /**\n * App ID - when the Cart was created by an external application or Wix service.\n * @format GUID\n */\n appId?: string;\n}\n\n/** @oneof */\nexport interface CreatedByIdOneOf {\n /**\n * Site visitor ID (if site visitor is **not** a member).\n * @format GUID\n * @readonly\n */\n visitorId?: string;\n /**\n * Site member ID.\n * @format GUID\n * @readonly\n */\n memberId?: string;\n /**\n * Wix user ID - when the Cart was created by a Wix user on behalf of a buyer.\n * For example, via POS (point of service).\n * @format GUID\n */\n userId?: string;\n /**\n * App ID - when the Cart was created by an external application or Wix service.\n * @format GUID\n */\n appId?: string;\n}\n\nexport interface CustomContentReference {\n /**\n * ID of the app providing the content.\n *\n * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).\n * @format GUID\n */\n appId?: string;\n /**\n * ID of the component within the app it belongs to.\n *\n * You can get your component's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).\n * @format GUID\n */\n componentId?: string;\n}\n\nexport interface BusinessInfo {\n /**\n * The ID of the business location associated with the cart.\n * Learn more about the [Locations API](https://dev.wix.com/docs/rest/business-management/locations/introduction).\n * @format GUID\n */\n locationId?: string | null;\n /**\n * The business’s default language, represented as a two-letter ISO 639-1 code.\n * @format LANGUAGE\n * @readonly\n */\n languageCode?: string;\n /**\n * The business’s default currency, represented as a three-letter ISO 4217 code.\n * @format CURRENCY\n * @readonly\n */\n currencyCode?: string;\n}\n\nexport interface CustomerInfo extends CustomerInfoIdOneOf {\n /**\n * Site visitor ID (if site visitor is **not** a member).\n * @format GUID\n * @readonly\n */\n visitorId?: string;\n /**\n * Site member ID.\n * @format GUID\n * @readonly\n */\n memberId?: string;\n /**\n * Wix user ID - when the Cart was created by a Wix user on behalf of a customer.\n * For example, via POS (point of service).\n * @format GUID\n * @readonly\n */\n userId?: string;\n /**\n * Customer's first name.\n * @maxLength 100\n */\n firstName?: string | null;\n /**\n * Customer's last name.\n * @maxLength 100\n */\n lastName?: string | null;\n /**\n * Customer's phone number.\n * @format PHONE\n */\n phone?: string | null;\n /**\n * Company name.\n * @maxLength 1000\n */\n company?: string | null;\n /** Business VAT registration number. */\n vatId?: VatId;\n /**\n * Customer's email address.\n * @format EMAIL\n */\n email?: string | null;\n /**\n * The Contact ID of the customer.\n * Created automatically if one does not yet exist.\n * For more information, see [Contacts API](https://dev.wix.com/api/rest/contacts/contacts/introduction).\n * @format GUID\n * @readonly\n */\n contactId?: string | null;\n /**\n * Customer's language, represented as a two-letter ISO 639-1 code.\n * Resolved automatically from the request metadata ('x-wix-linguist' header).\n * @format LANGUAGE\n * @readonly\n */\n languageCode?: string;\n /**\n * Customer’s currency, represented as a three-letter ISO 4217 code.\n * Resolved automatically from the request metadata ('x-wix-currency' header).\n * @format CURRENCY\n * @readonly\n */\n currencyCode?: string;\n}\n\n/** @oneof */\nexport interface CustomerInfoIdOneOf {\n /**\n * Site visitor ID (if site visitor is **not** a member).\n * @format GUID\n * @readonly\n */\n visitorId?: string;\n /**\n * Site member ID.\n * @format GUID\n * @readonly\n */\n memberId?: string;\n /**\n * Wix user ID - when the Cart was created by a Wix user on behalf of a customer.\n * For example, via POS (point of service).\n * @format GUID\n * @readonly\n */\n userId?: string;\n}\n\nexport interface VatId {\n /** Customer's tax ID. */\n _id?: string;\n /**\n * Tax type.\n *\n * Supported values:\n * + `CPF`: for individual tax payers\n * + `CNPJ`: for corporations\n */\n type?: VatTypeWithLiterals;\n}\n\n/** tax info types */\nexport enum VatType {\n UNSPECIFIED = 'UNSPECIFIED',\n /** CPF - for individual tax payers. */\n CPF = 'CPF',\n /** CNPJ - for corporations */\n CNPJ = 'CNPJ',\n}\n\n/** @enumType */\nexport type VatTypeWithLiterals = VatType | 'UNSPECIFIED' | 'CPF' | 'CNPJ';\n\nexport interface DeliveryInfo {\n /** The delivery address. */\n address?: Address;\n /** The selected delivery method by the customer. */\n method?: DeliveryMethod;\n /**\n * The unit of weight measurement when shipping items (e.g., KG, LB).\n * @readonly\n */\n weightUnit?: WeightUnitWithLiterals;\n}\n\n/** Physical address */\nexport interface Address {\n /**\n * Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.\n * @format COUNTRY\n */\n country?: string | null;\n /**\n * Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format.\n * @maxLength 50\n */\n subdivision?: string | null;\n /**\n * City name.\n * @maxLength 50\n */\n city?: string | null;\n /**\n * Postal or zip code.\n * @maxLength 50\n */\n postalCode?: string | null;\n /** Street address. */\n streetAddress?: StreetAddress;\n /**\n * Main address line (usually street name and number).\n * @maxLength 150\n */\n addressLine1?: string | null;\n /**\n * Free text providing more detailed address info. Usually contains apt, suite, floor.\n * @maxLength 100\n */\n addressLine2?: string | null;\n /** Geocode object containing latitude and longitude coordinates. */\n location?: AddressLocation;\n /**\n * Country's full name.\n * @readonly\n */\n countryFullname?: string | null;\n /**\n * Subdivision full-name.\n * @readonly\n */\n subdivisionFullname?: string | null;\n}\n\nexport interface StreetAddress {\n /** Street number. */\n number?: string;\n /** Street name. */\n name?: string;\n}\n\nexport interface AddressLocation {\n /** Address latitude. */\n latitude?: number | null;\n /** Address longitude. */\n longitude?: number | null;\n}\n\nexport interface DeliveryMethod {\n /**\n * Unique code that acts as an ID for a shipping rate.\n * For example, `\"usps_std_overnight\"`.\n * @maxLength 250\n */\n code?: string;\n /**\n * The carrier app id\n * @format GUID\n */\n appId?: string | null;\n /**\n * Delivery rate title.\n * For example, `\"USPS Standard Overnight Delivery\"`, `\"Standard\"`, or `\"First-Class Package International\"`.\n * @readonly\n */\n title?: TranslatableString;\n /**\n * Whether the delivery method is a pickup option.\n * @readonly\n */\n pickup?: boolean;\n}\n\nexport enum WeightUnit {\n /** Weight unit can't be classified due to an error. */\n UNSPECIFIED_WEIGHT_UNIT = 'UNSPECIFIED_WEIGHT_UNIT',\n /** Kilograms. */\n KG = 'KG',\n /** Pounds. */\n LB = 'LB',\n}\n\n/** @enumType */\nexport type WeightUnitWithLiterals =\n | WeightUnit\n | 'UNSPECIFIED_WEIGHT_UNIT'\n | 'KG'\n | 'LB';\n\nexport interface TaxInfo {\n /**\n * Indicates whether tax is already included in prices (line items, delivery, additional fess).\n * @readonly\n */\n pricesIncludeTax?: boolean;\n}\n\nexport interface PaymentInfo {\n /**\n * A list of gift cards to pay with.\n * Currently only one gift card is supported.\n * @readonly\n * @maxSize 1\n */\n giftCards?: GiftCard[];\n /**\n * The currency to pay with, represented as a three-letter ISO 4217 code.\n * @format CURRENCY\n * @readonly\n */\n currencyCode?: string;\n /** Billing address. */\n billingAddress?: Address;\n /** Full contact details for billing. */\n billingContact?: FullAddressContactDetails;\n}\n\nexport interface GiftCard {\n /**\n * A unique identifier of the gift card within the Cart.\n * @format GUID\n */\n _id?: string;\n /**\n * A partially hidden version of the actual gift card code\n * @maxLength 50\n */\n obfuscatedCode?: string;\n /**\n * App ID of the gift card provider.\n * @format GUID\n */\n appId?: string;\n /**\n * External ID in the gift card provider's system.\n * Used for integration and tracking across different platforms.\n * @minLength 1\n * @maxLength 50\n */\n externalId?: string | null;\n}\n\n/** Full contact details for an address */\nexport interface FullAddressContactDetails {\n /**\n * First name.\n * @maxLength 100\n */\n firstName?: string | null;\n /**\n * Last name.\n * @maxLength 100\n */\n lastName?: string | null;\n /**\n * Phone number.\n * @format PHONE\n */\n phone?: string | null;\n /**\n * Company name.\n * @maxLength 1000\n */\n company?: string | null;\n /** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */\n vatId?: VatId;\n}\n\nexport interface CartSettings {\n /**\n * Whether to restrict the option to add or remove a gift card on the checkout page.\n * Default: `false`\n */\n lockGiftCard?: boolean;\n /**\n * Whether to restrict the option to add or remove a coupon code on the checkout page.\n * Default: `false`\n */\n lockCouponCode?: boolean;\n /**\n * Whether to disable policy agreement checkout in the checkout page.\n * Default: `false`\n */\n policyAgreementCheckboxDisabled?: boolean;\n /**\n * Whether to disable manual payment option for this checkout.\n * Default: `false`\n */\n manualPaymentDisabled?: boolean;\n}\n\nexport interface CustomField {\n /** Custom field value. */\n value?: any;\n /**\n * Custom field title.\n * @minLength 1\n * @maxLength 500\n */\n title?: string;\n /**\n * Translated custom field title.\n * @minLength 1\n * @maxLength 500\n */\n translatedTitle?: string | null;\n}\n\nexport interface LegacyFields {\n /**\n * The applied discounts of the Cart.\n * Discounts that are no longer applied are not included in this list.\n * @maxSize 100\n */\n appliedDiscounts?: Discount[];\n /** The coupon discount amount. */\n couponDiscount?: ConvertedMoney;\n /** The sum of all line items after applying all discounts. */\n subtotalAfterCouponDiscount?: ConvertedMoney;\n}\n\nexport interface Discount {\n /** The display name of the discount. */\n name?: TranslatableString;\n /** The source of the discount, indicating how it was applied. */\n source?: DiscountSource;\n /** The component in the Cart that the discount applies to. */\n scope?: DiscountScopeWithLiterals;\n /**\n * List of benefits provided by the discount.\n * @minSize 1\n * @maxSize 100\n */\n benefits?: DiscountBenefit[];\n /**\n * Number of subscription cycles this discount applies to.\n * If unset, the discount applies to all billing cycles.\n * @min 1\n * @max 1000\n */\n subscriptionCycles?: number | null;\n}\n\nexport interface DiscountSource {\n /** The type of the discount source. */\n sourceType?: DiscountSourceTypeWithLiterals;\n /**\n * Coupon code that triggered the discount.\n * Relevant for coupon discounts only.\n * @maxLength 50\n */\n couponCode?: string | null;\n}\n\nexport enum DiscountSourceType {\n UNKNOWN_DISCOUNT_SOURCE_TYPE = 'UNKNOWN_DISCOUNT_SOURCE_TYPE',\n /** The discount was applied automatically by a rule. */\n AUTOMATIC_RULE = 'AUTOMATIC_RULE',\n /** The discount was applied by a coupon code. */\n COUPON = 'COUPON',\n}\n\n/** @enumType */\nexport type DiscountSourceTypeWithLiterals =\n | DiscountSourceType\n | 'UNKNOWN_DISCOUNT_SOURCE_TYPE'\n | 'AUTOMATIC_RULE'\n | 'COUPON';\n\nexport enum DiscountScope {\n UNKNOWN_DISCOUNT_SCOPE = 'UNKNOWN_DISCOUNT_SCOPE',\n /** The discount applies to the cart's subtotal. */\n CART_SUBTOTAL = 'CART_SUBTOTAL',\n /** The discount applies to a specific line item. */\n LINE_ITEM = 'LINE_ITEM',\n /** The discount applies to the delivery price. */\n DELIVERY = 'DELIVERY',\n}\n\n/** @enumType */\nexport type DiscountScopeWithLiterals =\n | DiscountScope\n | 'UNKNOWN_DISCOUNT_SCOPE'\n | 'CART_SUBTOTAL'\n | 'LINE_ITEM'\n | 'DELIVERY';\n\nexport interface DiscountBenefit extends DiscountBenefitValueOneOf {\n /** A specific monetary value deducted from the total cost. */\n amountOff?: ConvertedMoney;\n /**\n * The ID of line item that the discount applies to.\n * Relevant for item-level discounts only.\n * @format GUID\n */\n lineItemId?: string | null;\n}\n\n/** @oneof */\nexport interface DiscountBenefitValueOneOf {\n /** A specific monetary value deducted from the total cost. */\n amountOff?: ConvertedMoney;\n}\n\nexport interface CartSummary {\n /**\n * The Cart ID.\n * @format GUID\n */\n cartId?: string;\n /**\n * Summarized details for each line item in the cart.\n * @maxSize 300\n */\n lineItems?: LineItemSummary[];\n /**\n * List of discounts applied to the cart.\n * @maxSize 100\n */\n discounts?: Discount[];\n /** Summary of the delivery costs. */\n deliverySummary?: DeliverySummary;\n /**\n * List of additional fees applied to the cart.\n * @maxSize 100\n */\n additionalFees?: V2AdditionalFee[];\n /** Summary of tax calculations applied to the cart. */\n taxSummary?: TaxSummary;\n /** Summary of all calculated price components in the cart. */\n priceSummary?: PriceSummary;\n /** Payment details summarizing how the customer will pay for the order. */\n paymentSummary?: PaymentSummary;\n /**\n * A token representing the Cart's calculated prices.\n *\n * The client can pass this token when completing the checkout to ensure that the\n * prices the customer saw match the final prices at checkout.\n *\n * The server will validate the token if provided by recalculating the cart and comparing the\n * resulting pricing token. If the validation fails, the checkout will be rejected.\n *\n * This mechanism protects against unexpected price changes or tampering between\n * cart calculation and order placement.\n *\n * The token is opaque and should not be parsed or modified by clients.\n * @maxLength 1024\n */\n priceVerificationToken?: string | null;\n /**\n * List of errors that occurred during the calculation process, returned by Totals Calculator.\n * TODO: Temporary field for backward compatibility; will be removed once we introduce the unified 'violations' model.\n */\n calculationErrors?: CalculationErrors;\n /**\n * List of business violations raised by the Validations service plugin ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/service-plugins/validations/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/service-plugins/validations-integration-service-plugin/introduction)).\n * TODO: Temporary field for backward compatibility; will be removed once we introduce the unified 'violations' model.\n * @maxSize 100\n */\n spiViolations?: Violation[];\n}\n\nexport interface LineItemSummary {\n /**\n * Line item ID.\n * @format GUID\n */\n lineItemId?: string;\n /**\n * The quantity of the line item.\n * @min 1\n * @max 100000\n */\n quantity?: number;\n /**\n * Final unit price after applying automatic discounts.\n * Includes tax if `tax_summary.prices_include_tax` is true.\n */\n unitPrice?: ConvertedMoney;\n /**\n * Total price for the line item (unit price × quantity).\n * Includes tax if `tax_summary.prices_include_tax` is true.\n */\n totalPrice?: ConvertedMoney;\n}\n\nexport interface DeliverySummary {\n /** The calculated delivery method. */\n method?: DeliveryMethod;\n /**\n * Delivery price after discount.\n * Includes tax if `tax_summary.prices_include_tax` is true.\n */\n price?: ConvertedMoney;\n}\n\nexport interface V2AdditionalFee {\n /**\n * Additional fee's code.\n * @minLength 1\n * @maxLength 100\n */\n code?: string | null;\n /** Additional fee's name. */\n name?: TranslatableString;\n /**\n * Provider's app id.\n * @minLength 1\n * @maxLength 100\n */\n providerAppId?: string | null;\n /**\n * The line items associated with this fee.\n * If the list is empty, the fee will be associated with the entire cart.\n * @format GUID\n * @maxSize 100\n */\n lineItemIds?: string[];\n /**\n * Additional fee's price.\n * Includes tax if `tax_summary.prices_include_tax` is true.\n */\n price?: ConvertedMoney;\n /**\n * Number of subscription cycle this fee applies to.\n * If None and discount is linked to subscription line item, it applies to all cycles.\n * @min 1\n * @max 999\n */\n subscriptionCycles?: number | null;\n}\n\nexport interface TaxSummary {\n /**\n * List of taxes applied to the cart.\n * May contain multiple entries when advanced tax rates are configured by the merchant,\n * or a single entry representing the total tax amount.\n * For more details on advanced tax rates, read [this article](https://support.wix.com/en/article/setting-up-tax-calculation-using-the-manual-method#step-3-optional-customize-advanced-mode-settings).\n * @maxSize 100\n */\n taxes?: Tax[];\n /**\n * Indicates whether tax is already included in prices (line items, discounts, delivery, additional fess).\n * @readonly\n */\n pricesIncludeTax?: boolean;\n /**\n * Taxes applied to line items.\n * @maxSize 300\n */\n lineItemTaxes?: LineItemTax[];\n /** Tax applied to the delivery method. */\n deliveryTax?: ConvertedMoney;\n /**\n * Taxes applied to additional fees.\n * @maxSize 100\n */\n additionalFeeTaxes?: AdditionalFeeTax[];\n}\n\nexport interface Tax {\n /** The name of the tax. */\n name?: TranslatableString;\n /** Amount for which tax is calculated. */\n taxableAmount?: ConvertedMoney;\n /** Amount that is exempt from tax. */\n exemptAmount?: ConvertedMoney;\n /**\n * Tax rate %, as a decimal point between 0 and 1.\n * @decimalValue options { gte:0, lte:1, maxScale:6 }\n */\n rate?: string | null;\n /** Calculated tax, based on `taxable_amount` and `rate`. */\n amount?: ConvertedMoney;\n}\n\nexport interface LineItemTax {\n /**\n * Line item ID.\n * @format GUID\n */\n lineItemId?: string;\n /** Tax amount applied to the additional fee. */\n tax?: ConvertedMoney;\n}\n\nexport interface AdditionalFeeTax {\n /**\n * Additional fee's code.\n * @minLength 1\n * @maxLength 100\n */\n additionalFeeCode?: string;\n /** Tax amount applied to the additional fee. */\n tax?: ConvertedMoney;\n}\n\nexport interface PriceSummary {\n /**\n * Total price of all line items after applying item-level discounts.\n * Includes tax if `tax_summary.prices_include_tax` is true.\n */\n subtotal?: ConvertedMoney;\n /**\n * Total cart-level discount applied to the subtotal.\n * Line-item discounts are reflected in the subtotal and not included here.\n * Currently supports only a single coupon.\n */\n discount?: ConvertedMoney;\n /**\n * Final delivery cost for the cart.\n * Includes tax if `tax_summary.prices_include_tax` is true.\n */\n delivery?: ConvertedMoney;\n /**\n * Total additional fees associated with the cart.\n * Includes tax if `tax_summary.prices_include_tax` is true.\n */\n additionalFees?: ConvertedMoney;\n /** Total tax amount calculated across all applicable components (items, discounts, delivery, and fees). */\n tax?: ConvertedMoney;\n /** Total amount to be paid. */\n total?: ConvertedMoney;\n}\n\nexport interface PaymentSummary {\n /**\n * The amount that will be deducted from each gift card added to the cart.\n * Currently, only one gift card is supported.\n * @maxSize 1\n */\n giftCards?: GiftCardSummary[];\n /**\n * A list of valid memberships that will be charged as part of the order.\n * @maxSize 300\n */\n memberships?: Membership[];\n /**\n * Charges information for each subscription in the checkout.\n * @maxSize 100\n */\n subscriptionCharges?: SubscriptionCharges[];\n /** Indicates whether a remaining payment is required to create the order, after applying gift cards. */\n requiresPaymentAfterGiftCard?: boolean;\n /** The total amount due after applying all gift cards. */\n totalAfterGiftCards?: ConvertedMoney;\n /** The upfront amount to be charged immediately when placing the order (after applying gift cards). */\n payNow?: ConvertedMoney;\n /** The remaining amount to be collected later. */\n payLater?: ConvertedMoney;\n /** The amount to be charged after a free trial period (typically for subscription-based products). */\n payAfterFreeTrial?: ConvertedMoney;\n}\n\nexport interface GiftCardSummary {\n /**\n * The ID of the gift card assigned by the Cart.\n * @format GUID\n */\n giftCardId?: string;\n /** The amount to be reduced from the gift card's balance. */\n redeemAmount?: ConvertedMoney;\n}\n\nexport interface Membership {\n /**\n * Membership ID.\n * @minLength 1\n * @maxLength 100\n */\n _id?: string;\n /**\n * ID of the app providing this payment option.\n * @format GUID\n */\n appId?: string;\n /**\n * IDs of the line items this membership applies to.\n * @minSize 1\n * @maxSize 300\n * @minLength 1\n * @maxLength 100\n */\n lineItemIds?: string[];\n}\n\nexport interface SubscriptionCharges {\n /**\n * ids of the items the subscription is defined on\n * @format GUID\n * @minSize 1\n * @maxSize 300\n */\n lineItemIds?: string[];\n /**\n * Generated description explaining future charges amount and schedule.\n * Translated to subscription order buyer language, or to site language if was not provided.\n * @maxLength 1000\n */\n description?: string | null;\n /**\n * Charges for subscription.\n * @maxSize 50\n */\n charges?: Charge[];\n}\n\nexport interface Charge {\n /** The cycle number from which the charge starts. */\n cycleFrom?: number;\n /** The number of cycles for which the charge is applicable. */\n cycleCount?: number | null;\n /** Charge summary. */\n priceSummary?: PriceSummary;\n /** The billing date from which the charge starts. */\n cycleBillingDate?: Date | null;\n}\n\nexport interface CalculationErrors\n extends CalculationErrorsShippingCalculationErrorOneOf {\n /** General shipping calculation error. */\n generalShippingCalculationError?: Details;\n /** Carrier errors. */\n carrierErrors?: CarrierErrors;\n /** Tax calculation error. */\n taxCalculationError?: Details;\n /** Coupon calculation error. */\n couponCalculationError?: Details;\n /** Gift card calculation error. */\n giftCardCalculationError?: Details;\n /**\n * Order validation errors.\n * @maxSize 100\n */\n orderValidationErrors?: ApplicationError[];\n /**\n * Membership payment methods calculation errors\n * For example, will indicate that a line item that must be paid with membership payment doesn't have one or selected memberships are invalid\n */\n membershipError?: Details;\n /** Discount Rule calculation error. */\n discountsCalculationError?: Details;\n}\n\n/** @oneof */\nexport interface CalculationErrorsShippingCalculationErrorOneOf {\n /** General shipping calculation error. */\n generalShippingCalculationError?: Details;\n /** Carrier errors. */\n carrierErrors?: CarrierErrors;\n}\n\nexport interface Details extends DetailsKindOneOf {\n applicationError?: ApplicationError;\n validationError?: ValidationError;\n systemError?: SystemError;\n /**\n * deprecated in API's - to enable migration from rendering arbitrary tracing to rest response\n * @deprecated\n */\n tracing?: Record<string, string>;\n}\n\n/** @oneof */\nexport interface DetailsKindOneOf {\n applicationError?: ApplicationError;\n validationError?: ValidationError;\n systemError?: SystemError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\n/**\n * example result:\n * {\n * \"fieldViolations\": [\n * {\n * \"field\": \"fieldA\",\n * \"description\": \"invalid music note. supported notes: [do,re,mi,fa,sol,la,ti]\",\n * \"violatedRule\": \"OTHER\",\n * \"ruleName\": \"INVALID_NOTE\",\n * \"data\": {\n * \"value\": \"FI\"\n * }\n * },\n * {\n * \"field\": \"fieldB\",\n * \"description\": \"field value out of range. supported range: [0-20]\",\n * \"violatedRule\": \"MAX\",\n * \"data\": {\n * \"threshold\": 20\n * }\n * },\n * {\n * \"field\": \"fieldC\",\n * \"description\": \"invalid phone number. provide a valid phone number of size: [7-12], supported characters: [0-9, +, -, (, )]\",\n * \"violatedRule\": \"FORMAT\",\n * \"data\": {\n * \"type\": \"PHONE\"\n * }\n * }\n * ]\n * }\n */\nexport interface ValidationError {\n fieldViolations?: FieldViolation[];\n}\n\nexport enum RuleType {\n VALIDATION = 'VALIDATION',\n OTHER = 'OTHER',\n MAX = 'MAX',\n MIN = 'MIN',\n MAX_LENGTH = 'MAX_LENGTH',\n MIN_LENGTH = 'MIN_LENGTH',\n MAX_SIZE = 'MAX_SIZE',\n MIN_SIZE = 'MIN_SIZE',\n FORMAT = 'FORMAT',\n DECIMAL_LTE = 'DECIMAL_LTE',\n DECIMAL_GTE = 'DECIMAL_GTE',\n DECIMAL_LT = 'DECIMAL_LT',\n DECIMAL_GT = 'DECIMAL_GT',\n DECIMAL_MAX_SCALE = 'DECIMAL_MAX_SCALE',\n INVALID_ENUM_VALUE = 'INVALID_ENUM_VALUE',\n REQUIRED_FIELD = 'REQUIRED_FIELD',\n FIELD_NOT_ALLOWED = 'FIELD_NOT_ALLOWED',\n ONE_OF_ALIGNMENT = 'ONE_OF_ALIGNMENT',\n EXACT_LENGTH = 'EXACT_LENGTH',\n EXACT_SIZE = 'EXACT_SIZE',\n REQUIRED_ONE_OF_FIELD = 'REQUIRED_ONE_OF_FIELD',\n}\n\n/** @enumType */\nexport type RuleTypeWithLiterals =\n | RuleType\n | 'VALIDATION'\n | 'OTHER'\n | 'MAX'\n | 'MIN'\n | 'MAX_LENGTH'\n | 'MIN_LENGTH'\n | 'MAX_SIZE'\n | 'MIN_SIZE'\n | 'FORMAT'\n | 'DECIMAL_LTE'\n | 'DECIMAL_GTE'\n | 'DECIMAL_LT'\n | 'DECIMAL_GT'\n | 'DECIMAL_MAX_SCALE'\n | 'INVALID_ENUM_VALUE'\n | 'REQUIRED_FIELD'\n | 'FIELD_NOT_ALLOWED'\n | 'ONE_OF_ALIGNMENT'\n | 'EXACT_LENGTH'\n | 'EXACT_SIZE'\n | 'REQUIRED_ONE_OF_FIELD';\n\nexport interface FieldViolation {\n field?: string;\n description?: string;\n violatedRule?: RuleTypeWithLiterals;\n /** applicable when violated_rule=OTHER */\n ruleName?: string | null;\n data?: Record<string, any> | null;\n}\n\nexport interface SystemError {\n /** Error code. */\n errorCode?: string | null;\n}\n\nexport interface CarrierErrors {\n /**\n * Carrier errors.\n * @maxSize 100\n */\n errors?: CarrierError[];\n}\n\nexport interface CarrierError {\n /**\n * Carrier ID.\n * @format GUID\n */\n carrierId?: string;\n /** Error details. */\n error?: Details;\n}\n\nexport interface Violation {\n /** Severity of the violation. The violations are shown on the cart and checkout pages. A warning is displayed as yellow, and allows a site visitor to proceed with caution. An error is displayed as red, and doesn't allow a site visitor to proceed with the eCommerce flow. */\n severity?: SeverityWithLiterals;\n /** Target location on a checkout or cart page where the violation will be displayed. */\n target?: Target;\n /**\n * Violation description. Can include rich text. Only HTTP or HTTPS links in the following format are allowed: `<a href=\"https://www.wix.com\">Click me</a>`.\n * @minLength 1\n * @maxLength 1000\n */\n description?: string | null;\n}\n\nexport enum Severity {\n /** The user is allowed to move forward in the flow. */\n WARNING = 'WARNING',\n /**\n * The user is blocked from moving forward in the flow.\n * For example, if callerContext is CART - moving to checkout is blocked. if callerContext is CHECKOUT, placing an order is blocked.\n */\n ERROR = 'ERROR',\n}\n\n/** @enumType */\nexport type SeverityWithLiterals = Severity | 'WARNING' | 'ERROR';\n\nexport interface Target extends TargetTargetTypeOneOf {\n /** General (other) violation. */\n other?: Other;\n /** Specific line item violation. */\n lineItem?: LineItem;\n}\n\n/** @oneof */\nexport interface TargetTargetTypeOneOf {\n /** General (other) violation. */\n other?: Other;\n /** Specific line item violation. */\n lineItem?: LineItem;\n}\n\n/** Available locations on the webpage */\nexport enum NameInOther {\n /** Default location, in case no specific location is specified. */\n OTHER_DEFAULT = 'OTHER_DEFAULT',\n}\n\n/** @enumType */\nexport type NameInOtherWithLiterals = NameInOther | 'OTHER_DEFAULT';\n\n/** Available locations on the line item */\nexport enum NameInLineItem {\n /** Default location, in case no specific location is specified. */\n LINE_ITEM_DEFAULT = 'LINE_ITEM_DEFAULT',\n}\n\n/** @enumType */\nexport type NameInLineItemWithLiterals = NameInLineItem | 'LINE_ITEM_DEFAULT';\n\nexport enum SuggestedFix {\n /** No suggested fix is specified. The user should refer to the violation description to resolve the issue. */\n UNKNOWN_SUGGESTED_FIX = 'UNKNOWN_SUGGESTED_FIX',\n /** The line item should be removed from the cart or checkout to resolve the violation. */\n REMOVE_LINE_ITEM = 'REMOVE_LINE_ITEM',\n}\n\n/** @enumType */\nexport type SuggestedFixWithLiterals =\n | SuggestedFix\n | 'UNKNOWN_SUGGESTED_FIX'\n | 'REMOVE_LINE_ITEM';\n\n/** General (other) violation. */\nexport interface Other {\n /** Location on a checkout or a cart page where a general (other) violation will be displayed. */\n name?: NameInOtherWithLiterals;\n}\n\n/** Specific line item violation. */\nexport interface LineItem {\n /** Location on a checkout or a cart page where the specific line item violation will be displayed. */\n name?: NameInLineItemWithLiterals;\n /** ID of the line item containing the violation. */\n _id?: string | null;\n /**\n * Suggested fix for resolving the line item violation.\n * @internal\n */\n suggestedFix?: SuggestedFixWithLiterals;\n}\n\nexport interface CreateCurrentCartRequest {\n /** Cart to be created. */\n cart?: Cart;\n /**\n * A list of catalog items to add to the cart.\n * @maxSize 300\n */\n catalogItems?: CatalogItemInput[];\n /**\n * A list of custom items to add to the cart.\n * Custom line items don't trigger the Catalog service plugin.\n *\n * To access and manage custom line items, your app must have the permission scope named \"Manage eCommerce - Admin Permissions\".\n * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).\n * @maxSize 300\n */\n customItems?: CustomItemInput[];\n /**\n * Coupons to apply.\n * Currently only one is supported.\n * If the coupon code is invalid, the cart will be created without it.\n * @maxSize 1\n * @minLength 1\n * @maxLength 50\n */\n couponCodes?: string[];\n /**\n * Gift cards to add.\n * Currently only one is support.\n * If the gift card code is invalid, the cart will be created without it.\n * @maxSize 1\n * @minLength 8\n * @maxLength 20\n */\n giftCardCodes?: string[];\n}\n\nexport interface CatalogItemInput {\n /** A reference to the catalog item. */\n catalogReference?: CatalogReference;\n /**\n * The amount of catalog items requested by the customer.\n * @min 1\n * @max 100000\n */\n quantity?: number;\n /** Selected membership to be used as payment for this item. */\n selectedMembership?: SelectedMembership;\n /**\n * Overriding values for catalog item properties.\n * To override catalog fields, your app must have the permission scope named \"Manage eCommerce - Admin Permissions\".\n * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).\n */\n catalogOverrideFields?: CatalogOverrideFields;\n /**\n * Custom extended fields for the line item object.\n *\n * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls.\n */\n extendedFields?: ExtendedFields;\n /**\n * ID of the app managing the inventory.\n * @format GUID\n */\n inventoryAppId?: string | null;\n}\n\nexport interface CustomItemInput {\n /** The name of the line item. */\n name?: TranslatableString;\n /** Quantity-related information about the line item. */\n quantityInfo?: CustomItemQuantityInfo;\n /** Pricing-related information about the line item. */\n pricing?: CustomItemPricingInfo;\n /** Information about the origin of the line item. */\n source?: CustomItemSource;\n /** Details about the item for display purposes. */\n attributes?: CustomItemAttributes;\n /** Delivery-related information about the line item. */\n deliveryConfig?: CustomItemDeliveryConfig;\n /** Tax-related information about the line item. */\n taxConfig?: CustomItemTaxConfig;\n /** Payment-related information about the line item. */\n paymentConfig?: CustomItemPaymentConfig;\n /**\n * Modifier groups that were added to the item.\n * @maxSize 25\n */\n modifierGroups?: ModifierGroup[];\n}\n\nexport interface CustomItemQuantityInfo {\n /**\n * The amount of items originally requested by the customer.\n * @min 1\n * @max 100000\n */\n requestedQuantity?: number;\n /** The maximum quantity of items available for purchase. */\n availableQuantity?: number | null;\n /** Whether the line item quantity is fixed and cannot be changed. */\n fixedQuantity?: boolean;\n}\n\nexport interface CustomItemPricingInfo {\n /**\n * Sale price of a single item, without modifiers.\n * Includes tax if `tax_info.prices_include_tax` is true.\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0, lte:1000000000000000, maxScale:3 }\n */\n price?: string;\n /**\n * Full price of a single item before any discounts, without modifiers.\n * Defaults to `price` when not provided.\n * Includes tax if `tax_info.prices_include_tax` is true.\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0, lte:1000000000000000, maxScale:3 }\n */\n fullPrice?: string | null;\n /**\n * Additional description for the price.\n * For example, when price is 0 but additional details about the actual price are needed - \"Starts at $67\".\n */\n priceDescription?: PriceDescription;\n /** Indicates whether the price is not yet defined, and will be updated after the order is created. */\n priceUndetermined?: boolean;\n}\n\nexport interface CustomItemSource {\n /**\n * Catalog and item reference.\n * Holds IDs for the item and the catalog it came from, as well as further optional info.\n * Optional for custom line items, which don't trigger the Catalog service plugin.\n */\n catalogReference?: CatalogReference;\n /**\n * In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID.\n * + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID.\n * + in most cases, this field is the same as `catalogReference.catalogItemId`.\n * + Used in membership validation.\n * @minLength 1\n * @maxLength 36\n */\n rootCatalogItemId?: string | null;\n /**\n * ID of the app managing the inventory.\n * @format GUID\n */\n inventoryAppId?: string | null;\n}\n\nexport interface CustomItemAttributes {\n /**\n * Description lines of the item.\n * @maxSize 100\n */\n descriptionLines?: DescriptionLine[];\n /** The image of the item. */\n image?: string;\n /** URL to the item's page on the site. */\n url?: string;\n /** Item type. Either a preset type or custom. */\n itemType?: ItemType;\n /**\n * Physical properties of the item.\n * When relevant, contains information such as SKU, item weight, and shippability.\n */\n physicalProperties?: PhysicalProperties;\n /** Subscription option information. */\n subscriptionInfo?: SubscriptionOptionInfo;\n /** Service properties. When relevant, this contains information such as date and number of participants. */\n serviceProperties?: ServiceProperties;\n /**\n * Whether the item can only be purchased by site members.\n * Default: `false`\n */\n membersOnly?: boolean;\n}\n\nexport interface CustomItemDeliveryConfig {\n /**\n * Delivery profile ID.\n * @format GUID\n */\n deliveryProfileId?: string | null;\n}\n\nexport interface CustomItemTaxConfig {\n /** Address to use for tax calculation purposes. */\n taxableAddress?: TaxableAddress;\n /**\n * Tax group ID for this line item.\n * @maxLength 50\n */\n taxGroupId?: string | null;\n}\n\nexport interface CustomItemPaymentConfig {\n /**\n * Partial payment to be paid upfront during the checkout.\n * Eligible for catalog items with `lineItem.paymentOption` type `DEPOSIT_ONLINE` only.\n */\n depositAmount?: ConvertedMoney;\n /**\n * Type of selected payment option for current item.\n *\n * Default: `FULL_PAYMENT_ONLINE`\n */\n paymentOption?: PaymentOptionTypeWithLiterals;\n}\n\nexport interface CreateCurrentCartResponse {\n /** The created Cart. */\n cart?: Cart;\n}\n\nexport interface GetCurrentCartRequest {}\n\nexport interface GetCurrentCartResponse {\n /** The requested Cart. */\n cart?: Cart;\n}\n\nexport interface UpdateCurrentCartRequest {\n /** Cart to be updated, may be partial. */\n cart?: Cart;\n}\n\nexport interface UpdateCurrentCartResponse {\n /** Updated Cart. */\n cart?: Cart;\n}\n\nexport interface DeleteCurrentCartRequest {}\n\nexport interface DeleteCurrentCartResponse {}\n\nexport interface RefreshCurrentCartRequest {}\n\nexport interface RefreshCurrentCartResponse {\n /** Synchronized Cart. */\n cart?: Cart;\n}\n\nexport interface CalculateCurrentCartRequest {\n /**\n * Specifies the level of **business validation** to perform during cart calculation,\n * by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).\n */\n validationsConfig?: ValidationsConfigWithLiterals;\n /**\n * Optional custom configuration for the calculation.\n * If not provided, all price components are calculated by default.\n */\n customCalculationConfig?: CalculationConfig;\n}\n\nexport enum ValidationsConfig {\n UNKNOWN_VALIDATIONS_CONFIG = 'UNKNOWN_VALIDATIONS_CONFIG',\n /** No business validations are performed. */\n SKIP_VALIDATIONS = 'SKIP_VALIDATIONS',\n /** Perform cart-level business validations as defined by the service plugin implementer. */\n PRE_CHECKOUT_VALIDATIONS = 'PRE_CHECKOUT_VALIDATIONS',\n /** Perform checkout-specific business validations as defined by the service plugin implementer. */\n CHECKOUT_VALIDATIONS = 'CHECKOUT_VALIDATIONS',\n}\n\n/** @enumType */\nexport type ValidationsConfigWithLiterals =\n | ValidationsConfig\n | 'UNKNOWN_VALIDATIONS_CONFIG'\n | 'SKIP_VALIDATIONS'\n | 'PRE_CHECKOUT_VALIDATIONS'\n | 'CHECKOUT_VALIDATIONS';\n\nexport interface CalculationConfig {\n /**\n * Whether to calculate delivery costs.\n * Default: false\n */\n calculateDelivery?: boolean;\n /**\n * Whether to calculate any additional fees.\n * Default: false\n */\n calculateAdditionalFees?: boolean;\n /**\n * Whether to include tax calculation.\n * Default: false\n */\n calculateTax?: boolean;\n /**\n * Whether to calculate the effect of gift card balances on the cart total.\n * Gift cards are not redeemed - only reflected for estimation purposes.\n * Default: false\n */\n calculateGiftCards?: boolean;\n}\n\nexport interface CalculateCurrentCartResponse {\n /** The Cart that was calculated. */\n cart?: Cart;\n /** The calculation summary. */\n summary?: CartSummary;\n}\n\nexport interface AddLineItemsToCurrentCartRequest {\n /**\n * A list of catalog items to add to the cart.\n * @maxSize 300\n */\n catalogItems?: CatalogItemInput[];\n /**\n * A list of custom items to add to the cart.\n * @maxSize 300\n */\n customItems?: CustomItemInput[];\n}\n\nexport interface AddLineItemsToCurrentCartResponse {\n /** Updated Cart. */\n cart?: Cart;\n}\n\nexport interface RemoveLineItemsFromCurrentCartRequest {\n /**\n * Line item IDs to remove from cart.\n * @format GUID\n * @minSize 1\n * @maxSize 100\n */\n lineItemIds?: string[];\n}\n\nexport interface RemoveLineItemsFromCurrentCartResponse {\n /** Updated Cart. */\n cart?: Cart;\n}\n\nexport interface UpdateLineItemsInCurrentCartRequest {\n /**\n * Line item updates to apply.\n * @minSize 1\n * @maxSize 100\n */\n lineItems?: LineItemUpdate[];\n}\n\nexport interface LineItemUpdate {\n /**\n * Line item ID to update.\n * @format GUID\n */\n lineItemId?: string;\n /** Quantity update (optional - if not provided, quantity is not updated) */\n quantity?: QuantityUpdate;\n /** Selected membership update (optional - if not provided, membership is not updated) */\n selectedMembership?: SelectedMembershipUpdate;\n}\n\nexport interface QuantityUpdate {\n /**\n * The new quantity of the line item.\n * @min 1\n * @max 100000\n */\n newQuantity?: number;\n}\n\nexport interface SelectedMembershipUpdate {\n /**\n * The new selectedMembership of the item.\n *\n * To just remove current selected membership, and not replace with a new one, pass an empty value here.\n */\n newMembership?: SelectedMembership;\n}\n\nexport interface UpdateLineItemsInCurrentCartResponse {\n /** Updated Cart. */\n cart?: Cart;\n}\n\nexport interface AddCouponToCurrentCartRequest {\n /**\n * Coupon to apply.\n *\n * Currently only one is supported.\n * @minLength 1\n * @maxLength 50\n */\n couponCode?: string;\n}\n\nexport interface AddCouponToCurrentCartResponse {\n /** Updated Cart. */\n cart?: Cart;\n}\n\nexport interface RemoveCouponFromCurrentCartRequest {\n /**\n * Coupon ID.\n * @format GUID\n */\n couponId?: string;\n}\n\nexport interface RemoveCouponFromCurrentCartResponse {\n /** Updated Cart. */\n cart?: Cart;\n}\n\nexport interface AddGiftCardToCurrentCartRequest {\n /**\n * Gift card code.\n *\n * Currently only one is supported.\n * @maxLength 50\n */\n giftCardCode?: string;\n}\n\nexport interface AddGiftCardToCurrentCartResponse {\n /** Updated Cart. */\n cart?: Cart;\n}\n\nexport interface RemoveGiftCardFromCurrentCartRequest {\n /**\n * Gift card ID.\n * @format GUID\n */\n giftCardId?: string;\n}\n\nexport interface RemoveGiftCardFromCurrentCartResponse {\n /** Updated Cart. */\n cart?: Cart;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface CreateCartRequest {\n /** Cart to be created. */\n cart?: Cart;\n /**\n * A list of catalog items to add to the cart.\n * @maxSize 300\n */\n catalogItems?: CatalogItemInput[];\n /**\n * A list of custom items to add to the cart.\n * Custom line items don't trigger the Catalog service plugin.\n *\n * To access and manage custom line items, your app must have the permission scope named \"Manage eCommerce - Admin Permissions\".\n * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).\n * @maxSize 300\n */\n customItems?: CustomItemInput[];\n /**\n * Coupons to apply.\n * Currently only one is supported.\n * If the coupon code is invalid, the cart will be created without it.\n * @maxSize 1\n * @minLength 1\n * @maxLength 50\n */\n couponCodes?: string[];\n /**\n * Gift cards to add.\n * Currently only one is support.\n * If the gift card code is invalid, the cart will be created without it.\n * @maxSize 1\n * @minLength 8\n * @maxLength 20\n */\n giftCardCodes?: string[];\n}\n\nexport interface CreateCartResponse {\n /** The created Cart. */\n cart?: Cart;\n}\n\nexport interface GetCartRequest {\n /**\n * ID of the Cart to retrieve.\n * @format GUID\n */\n cartId: string;\n}\n\nexport interface GetCartResponse {\n /** The requested Cart. */\n cart?: Cart;\n}\n\nexport interface UpdateCartRequest {\n /** Cart to be updated, may be partial. */\n cart: Cart;\n}\n\nexport interface UpdateCartResponse {\n /** Updated Cart. */\n cart?: Cart;\n}\n\nexport interface DeleteCartRequest {\n /**\n * ID of the Cart to delete.\n * @format GUID\n */\n cartId: string;\n}\n\nexport interface DeleteCartResponse {}\n\nexport interface RefreshCartRequest {\n /**\n * ID of the Cart to refresh.\n * @format GUID\n */\n cartId: string;\n}\n\nexport interface RefreshCartResponse {\n /** Synchronized Cart. */\n cart?: Cart;\n}\n\nexport interface CalculateCartRequest {\n /**\n * ID of the Cart to calculate.\n * @format GUID\n */\n cartId: string;\n /**\n * Specifies the level of **business validation** to perform during cart calculation,\n * by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).\n */\n validationsConfig?: ValidationsConfigWithLiterals;\n /**\n * Optional custom configuration for the calculation.\n * If not provided, all price components are calculated by default.\n */\n customCalculationConfig?: CalculationConfig;\n}\n\nexport interface CalculateCartResponse {\n /** The Cart that was calculated. */\n cart?: Cart;\n /** The calculation summary. */\n summary?: CartSummary;\n}\n\nexport interface GetCheckoutURLRequest {\n /**\n * ID of the Cart to calculate.\n * @format GUID\n */\n cartId: string;\n /**\n * Checkout currency parameter to append as a query param\n * @format CURRENCY\n */\n currencyCode?: string | null;\n}\n\nexport interface GetCheckoutURLResponse {\n /**\n * The checkout URL.\n * @format WEB_URL\n */\n checkoutUrl?: string;\n}\n\nexport interface PlaceOrderRequest {\n /**\n * Cart ID.\n * @format GUID\n */\n cartId: string;\n /**\n * The pricing token received from `CalculateCart`'s response.\n * Used to verify that the prices shown to the customer have not changed before completing checkout.\n * @maxLength 3000\n */\n pricingToken?: string | null;\n /**\n * Payment token.\n * @maxLength 100\n */\n paymentToken?: string | null;\n /** Urls to redirect to after payment is made. */\n redirectUrls?: RedirectUrls;\n /** Indicates the payment method should be saved on the order */\n savePaymentMethod?: boolean;\n /** Indicates whether to authorize the payment and delay the capture */\n delayCapture?: boolean;\n}\n\nexport interface RedirectUrls {\n /**\n * URL to redirect to if payment is canceled (usually checkout url).\n * @format WEB_URL\n */\n cancelUrl?: string;\n /**\n * URL to redirect to if an error occurred on payment (usually checkout url).\n * @format WEB_URL\n */\n errorUrl?: string;\n /**\n * URL to redirect to after successful payment, excepts order place holder {orderId}.\n * @maxLength 2000\n */\n successUrl?: string | null;\n /**\n * URL to redirect to if payment is pending, excepts order place holder {orderId}.\n * @maxLength 2000\n */\n pendingUrl?: string | null;\n}\n\nexport interface PlaceOrderResponse {\n /**\n * The order ID of the created order.\n * @format GUID\n */\n orderId?: string;\n /**\n * Payment response token.\n * @maxLength 1000\n */\n paymentResponseToken?: string | null;\n /**\n * The payment gateway is Cashier.\n * payment_gateway_order_id will be returned given that money was charged.\n * In some cases, money will not be charged:\n * If the total price is 0 - For example, could be a free item or a an item with 100% discount\n * If the total price is not 0, but the payment is covered by alternative payment methods such as gift card\n * @maxLength 50\n */\n paymentGatewayOrderId?: string | null;\n /** Whether an order was successfully created from this cart and the payment transaction was completed. */\n cartCompleted?: boolean;\n}\n\nexport interface AddLineItemsRequest {\n /**\n * Cart ID.\n * @format GUID\n */\n cartId: string;\n /**\n * A list of catalog items to add to the cart.\n * @maxSize 300\n */\n catalogItems?: CatalogItemInput[];\n /**\n * A list of custom items to add to the cart.\n * @maxSize 300\n */\n customItems?: CustomItemInput[];\n}\n\nexport interface AddLineItemsResponse {\n /** Updated Cart. */\n cart?: Cart;\n}\n\nexport interface RemoveLineItemsRequest {\n /**\n * Cart ID.\n * @format GUID\n */\n cartId: string;\n /**\n * Line item IDs to remove from cart.\n * @format GUID\n * @minSize 1\n * @maxSize 100\n */\n lineItemIds: string[];\n}\n\nexport interface RemoveLineItemsResponse {\n /** Updated Cart. */\n cart?: Cart;\n}\n\nexport interface UpdateLineItemsRequest {\n /**\n * Cart ID.\n * @format GUID\n */\n cartId: string;\n /**\n * Line item updates to apply.\n * @minSize 1\n * @maxSize 300\n */\n lineItems?: LineItemUpdate[];\n}\n\nexport interface UpdateLineItemsResponse {\n /** Updated Cart. */\n cart?: Cart;\n}\n\nexport interface AddCouponRequest {\n /**\n * Cart ID.\n * @format GUID\n */\n cartId: string;\n /**\n * Coupon to apply.\n *\n * Currently only one is supported.\n * @minLength 1\n * @maxLength 50\n */\n couponCode: string;\n}\n\nexport interface AddCouponResponse {\n /** Updated Cart. */\n cart?: Cart;\n}\n\nexport interface RemoveCouponRequest {\n /**\n * Cart ID.\n * @format GUID\n */\n cartId: string;\n /**\n * Discount ID.\n * @format GUID\n */\n couponId: string;\n}\n\nexport interface RemoveCouponResponse {\n /** Updated Cart. */\n cart?: Cart;\n}\n\nexport interface AddGiftCardRequest {\n /**\n * Cart ID.\n * @format GUID\n */\n cartId: string;\n /**\n * Gift card code.\n *\n * Currently only one is supported.\n * @maxLength 50\n */\n giftCardCode: string;\n}\n\nexport interface AddGiftCardResponse {\n /** Updated Cart. */\n cart?: Cart;\n}\n\nexport interface RemoveGiftCardRequest {\n /**\n * Cart ID.\n * @format GUID\n */\n cartId: string;\n /**\n * Gift card ID.\n * @format GUID\n */\n giftCardId: string;\n}\n\nexport interface RemoveGiftCardResponse {\n /** Updated Cart. */\n cart?: Cart;\n}\n\nexport interface MarkCartAsCompletedRequest {\n /**\n * Cart ID.\n * @format GUID\n */\n cartId: string;\n /**\n * Order ID.\n * @format GUID\n */\n orderId?: string | null;\n}\n\nexport interface MarkCartAsCompletedResponse {\n /** Updated Cart. */\n cart?: Cart;\n}\n\nexport interface Empty {}\n\nexport interface HandleAsyncCheckoutCompletionRequest {\n /**\n * Server-signed JWT token with required information to complete checkout\n * @maxLength 4096\n */\n token: string;\n}\n\nexport interface RawHttpResponse {\n body?: Uint8Array;\n statusCode?: number | null;\n headers?: HeadersEntry[];\n}\n\nexport interface HeadersEntry {\n key?: string;\n value?: string;\n}\n\n/**\n * Creates a Cart.\n * @internal\n * @documentationMaturity preview\n * @requiredField options.catalogItems.catalogReference\n * @requiredField options.catalogItems.quantity\n * @requiredField options.catalogItems.selectedMembership._id\n * @requiredField options.catalogItems.selectedMembership.appId\n * @requiredField options.customItems.name\n * @requiredField options.customItems.pricing\n * @requiredField options.customItems.quantityInfo\n * @requiredField options.customItems.quantityInfo.requestedQuantity\n * @permissionId ecom:v2:cart:create_cart\n * @permissionId ECOM.ADMIN_MODIFY_CARTS\n * @applicableIdentity APP\n * @returns The created Cart.\n * @fqn wix.ecom.cart.v2.CartService.CreateCart\n */\nexport async function createCart(\n options?: NonNullablePaths<\n CreateCartOptions,\n | `catalogItems.${number}.catalogReference`\n | `catalogItems.${number}.quantity`\n | `catalogItems.${number}.selectedMembership._id`\n | `catalogItems.${number}.selectedMembership.appId`\n | `customItems.${number}.attributes.descriptionLines.${number}.name`\n | `customItems.${number}.name`\n | `customItems.${number}.pricing`\n | `customItems.${number}.pricing.price`\n | `customItems.${number}.quantityInfo`\n | `customItems.${number}.quantityInfo.requestedQuantity`,\n 7\n >\n): Promise<\n NonNullablePaths<\n Cart,\n | `_id`\n | `lineItems`\n | `lineItems.${number}._id`\n | `lineItems.${number}.name.original`\n | `lineItems.${number}.quantityInfo.confirmedQuantity`\n | `lineItems.${number}.quantityInfo.requestedQuantity`\n | `lineItems.${number}.quantityInfo.fixedQuantity`\n | `lineItems.${number}.pricing.unitPrice.amount`\n | `lineItems.${number}.pricing.unitPrice.convertedAmount`\n | `lineItems.${number}.pricing.priceDescription.original`\n | `lineItems.${number}.pricing.priceUndetermined`\n | `lineItems.${number}.source.catalogReference.catalogItemId`\n | `lineItems.${number}.source.catalogReference.appId`\n | `lineItems.${number}.attributes.itemType.preset`\n | `lineItems.${number}.attributes.itemType.custom`\n | `lineItems.${number}.attributes.physicalProperties.shippable`\n | `lineItems.${number}.attributes.membersOnly`\n | `lineItems.${number}.taxConfig.taxableAddress.addressType`\n | `lineItems.${number}.paymentConfig.savePaymentMethod`\n | `lineItems.${number}.paymentConfig.selectedMembership._id`\n | `lineItems.${number}.paymentConfig.selectedMembership.appId`\n | `lineItems.${number}.paymentConfig.paymentOption`\n | `lineItems.${number}.status`\n | `lineItems.${number}.customLineItem`\n | `coupons`\n | `coupons.${number}._id`\n | `coupons.${number}.code`\n | `source.channelType`\n | `source.externalReferences`\n | `source.externalReferences.${number}.appId`\n | `source.createdBy.visitorId`\n | `source.createdBy.memberId`\n | `source.createdBy.userId`\n | `source.createdBy.appId`\n | `source.customContentReference.appId`\n | `source.customContentReference.componentId`\n | `businessInfo.languageCode`\n | `businessInfo.currencyCode`\n | `customerInfo.visitorId`\n | `customerInfo.memberId`\n | `customerInfo.userId`\n | `customerInfo.vatId._id`\n | `customerInfo.vatId.type`\n | `customerInfo.languageCode`\n | `customerInfo.currencyCode`\n | `deliveryInfo.address.streetAddress.number`\n | `deliveryInfo.address.streetAddress.name`\n | `deliveryInfo.method.code`\n | `deliveryInfo.method.pickup`\n | `deliveryInfo.weightUnit`\n | `taxInfo.pricesIncludeTax`\n | `paymentInfo.giftCards`\n | `paymentInfo.giftCards.${number}._id`\n | `paymentInfo.giftCards.${number}.obfuscatedCode`\n | `paymentInfo.giftCards.${number}.appId`\n | `paymentInfo.currencyCode`\n | `orderPlaced`\n | `settings.lockGiftCard`\n | `settings.lockCouponCode`\n | `settings.policyAgreementCheckboxDisabled`\n | `settings.manualPaymentDisabled`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n cart: options?.cart,\n catalogItems: options?.catalogItems,\n customItems: options?.customItems,\n couponCodes: options?.couponCodes,\n giftCardCodes: options?.giftCardCodes,\n }),\n [\n {\n transformFn: transformSDKImageToRESTImage,\n paths: [\n { path: 'cart.lineItems.source.catalogOverrideFields.image' },\n { path: 'cart.lineItems.attributes.image' },\n { path: 'catalogItems.catalogOverrideFields.image' },\n { path: 'customItems.attributes.image' },\n ],\n },\n {\n transformFn: transformSDKPageURLV2ToRESTPageURLV2,\n paths: [\n { path: 'cart.lineItems.attributes.url' },\n { path: 'customItems.attributes.url' },\n ],\n },\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: [\n { path: 'cart.deliveryInfo.address' },\n { path: 'cart.paymentInfo.billingAddress' },\n ],\n },\n ]\n );\n\n const reqOpts = ambassadorWixEcomV2Cart.createCart(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'cart.lineItems.source.catalogOverrideFields.image' },\n { path: 'cart.lineItems.attributes.image' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [{ path: 'cart.lineItems.attributes.url' }],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'cart.deliveryInfo.address' },\n { path: 'cart.paymentInfo.billingAddress' },\n ],\n },\n ])\n )?.cart!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n cart: '$[0].cart',\n catalogItems: '$[0].catalogItems',\n customItems: '$[0].customItems',\n couponCodes: '$[0].couponCodes',\n giftCardCodes: '$[0].giftCardCodes',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CreateCartOptions {\n /** Cart to be created. */\n cart?: Cart;\n /**\n * A list of catalog items to add to the cart.\n * @maxSize 300\n */\n catalogItems?: CatalogItemInput[];\n /**\n * A list of custom items to add to the cart.\n * Custom line items don't trigger the Catalog service plugin.\n *\n * To access and manage custom line items, your app must have the permission scope named \"Manage eCommerce - Admin Permissions\".\n * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).\n * @maxSize 300\n */\n customItems?: CustomItemInput[];\n /**\n * Coupons to apply.\n * Currently only one is supported.\n * If the coupon code is invalid, the cart will be created without it.\n * @maxSize 1\n * @minLength 1\n * @maxLength 50\n */\n couponCodes?: string[];\n /**\n * Gift cards to add.\n * Currently only one is support.\n * If the gift card code is invalid, the cart will be created without it.\n * @maxSize 1\n * @minLength 8\n * @maxLength 20\n */\n giftCardCodes?: string[];\n}\n\n/**\n * Retrieves a Cart.\n * @param cartId - ID of the Cart to retrieve.\n * @internal\n * @documentationMaturity preview\n * @requiredField cartId\n * @permissionId ecom:v2:cart:get_cart\n * @returns The requested Cart.\n * @fqn wix.ecom.cart.v2.CartService.GetCart\n */\nexport async function getCart(\n cartId: string\n): Promise<\n NonNullablePaths<\n Cart,\n | `_id`\n | `lineItems`\n | `lineItems.${number}._id`\n | `lineItems.${number}.name.original`\n | `lineItems.${number}.quantityInfo.confirmedQuantity`\n | `lineItems.${number}.quantityInfo.requestedQuantity`\n | `lineItems.${number}.quantityInfo.fixedQuantity`\n | `lineItems.${number}.pricing.unitPrice.amount`\n | `lineItems.${number}.pricing.unitPrice.convertedAmount`\n | `lineItems.${number}.pricing.priceDescription.original`\n | `lineItems.${number}.pricing.priceUndetermined`\n | `lineItems.${number}.source.catalogReference.catalogItemId`\n | `lineItems.${number}.source.catalogReference.appId`\n | `lineItems.${number}.attributes.itemType.preset`\n | `lineItems.${number}.attributes.itemType.custom`\n | `lineItems.${number}.attributes.physicalProperties.shippable`\n | `lineItems.${number}.attributes.membersOnly`\n | `lineItems.${number}.taxConfig.taxableAddress.addressType`\n | `lineItems.${number}.paymentConfig.savePaymentMethod`\n | `lineItems.${number}.paymentConfig.selectedMembership._id`\n | `lineItems.${number}.paymentConfig.selectedMembership.appId`\n | `lineItems.${number}.paymentConfig.paymentOption`\n | `lineItems.${number}.status`\n | `lineItems.${number}.customLineItem`\n | `coupons`\n | `coupons.${number}._id`\n | `coupons.${number}.code`\n | `source.channelType`\n | `source.externalReferences`\n | `source.externalReferences.${number}.appId`\n | `source.createdBy.visitorId`\n | `source.createdBy.memberId`\n | `source.createdBy.userId`\n | `source.createdBy.appId`\n | `source.customContentReference.appId`\n | `source.customContentReference.componentId`\n | `businessInfo.languageCode`\n | `businessInfo.currencyCode`\n | `customerInfo.visitorId`\n | `customerInfo.memberId`\n | `customerInfo.userId`\n | `customerInfo.vatId._id`\n | `customerInfo.vatId.type`\n | `customerInfo.languageCode`\n | `customerInfo.currencyCode`\n | `deliveryInfo.address.streetAddress.number`\n | `deliveryInfo.address.streetAddress.name`\n | `deliveryInfo.method.code`\n | `deliveryInfo.method.pickup`\n | `deliveryInfo.weightUnit`\n | `taxInfo.pricesIncludeTax`\n | `paymentInfo.giftCards`\n | `paymentInfo.giftCards.${number}._id`\n | `paymentInfo.giftCards.${number}.obfuscatedCode`\n | `paymentInfo.giftCards.${number}.appId`\n | `paymentInfo.currencyCode`\n | `orderPlaced`\n | `settings.lockGiftCard`\n | `settings.lockCouponCode`\n | `settings.policyAgreementCheckboxDisabled`\n | `settings.manualPaymentDisabled`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ cartId: cartId });\n\n const reqOpts = ambassadorWixEcomV2Cart.getCart(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'cart.lineItems.source.catalogOverrideFields.image' },\n { path: 'cart.lineItems.attributes.image' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [{ path: 'cart.lineItems.attributes.url' }],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'cart.deliveryInfo.address' },\n { path: 'cart.paymentInfo.billingAddress' },\n ],\n },\n ])\n )?.cart!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { cartId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['cartId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates a Cart.\n *\n * Use this endpoint to set and replace fields such as buyer note and delivery method.\n * To add or remove elements from lists (e.g., line items, discounts, gift cards), use their dedicated endpoints.\n * @param _id - Cart ID.\n * @internal\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField cart\n * @permissionId ecom:v2:cart:update_cart\n * @permissionId ECOM.ADMIN_MODIFY_CARTS\n * @applicableIdentity APP\n * @returns Updated Cart.\n * @fqn wix.ecom.cart.v2.CartService.UpdateCart\n */\nexport async function updateCart(\n _id: string,\n cart: UpdateCart\n): Promise<\n NonNullablePaths<\n Cart,\n | `_id`\n | `lineItems`\n | `lineItems.${number}._id`\n | `lineItems.${number}.name.original`\n | `lineItems.${number}.quantityInfo.confirmedQuantity`\n | `lineItems.${number}.quantityInfo.requestedQuantity`\n | `lineItems.${number}.quantityInfo.fixedQuantity`\n | `lineItems.${number}.pricing.unitPrice.amount`\n | `lineItems.${number}.pricing.unitPrice.convertedAmount`\n | `lineItems.${number}.pricing.priceDescription.original`\n | `lineItems.${number}.pricing.priceUndetermined`\n | `lineItems.${number}.source.catalogReference.catalogItemId`\n | `lineItems.${number}.source.catalogReference.appId`\n | `lineItems.${number}.attributes.itemType.preset`\n | `lineItems.${number}.attributes.itemType.custom`\n | `lineItems.${number}.attributes.physicalProperties.shippable`\n | `lineItems.${number}.attributes.membersOnly`\n | `lineItems.${number}.taxConfig.taxableAddress.addressType`\n | `lineItems.${number}.paymentConfig.savePaymentMethod`\n | `lineItems.${number}.paymentConfig.selectedMembership._id`\n | `lineItems.${number}.paymentConfig.selectedMembership.appId`\n | `lineItems.${number}.paymentConfig.paymentOption`\n | `lineItems.${number}.status`\n | `lineItems.${number}.customLineItem`\n | `coupons`\n | `coupons.${number}._id`\n | `coupons.${number}.code`\n | `source.channelType`\n | `source.externalReferences`\n | `source.externalReferences.${number}.appId`\n | `source.createdBy.visitorId`\n | `source.createdBy.memberId`\n | `source.createdBy.userId`\n | `source.createdBy.appId`\n | `source.customContentReference.appId`\n | `source.customContentReference.componentId`\n | `businessInfo.languageCode`\n | `businessInfo.currencyCode`\n | `customerInfo.visitorId`\n | `customerInfo.memberId`\n | `customerInfo.userId`\n | `customerInfo.vatId._id`\n | `customerInfo.vatId.type`\n | `customerInfo.languageCode`\n | `customerInfo.currencyCode`\n | `deliveryInfo.address.streetAddress.number`\n | `deliveryInfo.address.streetAddress.name`\n | `deliveryInfo.method.code`\n | `deliveryInfo.method.pickup`\n | `deliveryInfo.weightUnit`\n | `taxInfo.pricesIncludeTax`\n | `paymentInfo.giftCards`\n | `paymentInfo.giftCards.${number}._id`\n | `paymentInfo.giftCards.${number}.obfuscatedCode`\n | `paymentInfo.giftCards.${number}.appId`\n | `paymentInfo.currencyCode`\n | `orderPlaced`\n | `settings.lockGiftCard`\n | `settings.lockCouponCode`\n | `settings.policyAgreementCheckboxDisabled`\n | `settings.manualPaymentDisabled`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({ cart: { ...cart, id: _id } }),\n [\n {\n transformFn: transformSDKImageToRESTImage,\n paths: [\n { path: 'cart.lineItems.source.catalogOverrideFields.image' },\n { path: 'cart.lineItems.attributes.image' },\n ],\n },\n {\n transformFn: transformSDKPageURLV2ToRESTPageURLV2,\n paths: [{ path: 'cart.lineItems.attributes.url' }],\n },\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: [\n { path: 'cart.deliveryInfo.address' },\n { path: 'cart.paymentInfo.billingAddress' },\n ],\n },\n ]\n );\n\n const reqOpts = ambassadorWixEcomV2Cart.updateCart(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'cart.lineItems.source.catalogOverrideFields.image' },\n { path: 'cart.lineItems.attributes.image' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [{ path: 'cart.lineItems.attributes.url' }],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'cart.deliveryInfo.address' },\n { path: 'cart.paymentInfo.billingAddress' },\n ],\n },\n ])\n )?.cart!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { cart: '$[1]' },\n explicitPathsToArguments: { 'cart.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'cart']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateCart {\n /**\n * Cart ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * Date and time the Cart was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the Cart was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Revision number, which increments by 1 each time the Cart is updated.\n * @readonly\n */\n revision?: string | null;\n /**\n * Line items added to the Cart by the customer.\n * This list may include both valid items (in stock) and invalid ones (e.g., out of stock).\n * When submitting an order, only valid items will be included in the order.\n * @maxSize 300\n * @readonly\n */\n lineItems?: V2LineItem[];\n /** The sum of all line item final prices. */\n subtotal?: ConvertedMoney;\n /**\n * Optional message left by the customer.\n * Usually intended for the merchant and contain special instructions, requests, or clarifications related to the order.\n * @maxLength 1000\n */\n note?: string | null;\n /**\n * List of coupons added to the Cart.\n * Currently, only one coupon code is supported.\n * @maxSize 1\n */\n coupons?: Coupon[];\n /** Information about the source of the Cart, detailing the origin or context in which the Cart was created. */\n source?: CartSource;\n /** Information about the site from which the Cart's line items were added. */\n businessInfo?: BusinessInfo;\n /** Information about the customer that owns the Cart. */\n customerInfo?: CustomerInfo;\n /** Delivery-related information associated with the Cart. */\n deliveryInfo?: DeliveryInfo;\n /** Tax-related information associated with the Cart. */\n taxInfo?: TaxInfo;\n /** Payment-related information associated with the Cart. */\n paymentInfo?: PaymentInfo;\n /**\n * Whether the Cart has been placed as an Order.\n * Defaults to `false`.\n * @readonly\n */\n orderPlaced?: boolean;\n /**\n * The ID of the Order created from the Cart.\n * This field is empty until the checkout process is completed.\n * @format GUID\n * @readonly\n */\n orderId?: string | null;\n /**\n * Persistent ID that correlates between the Cart and the created Order (after the checkout is completed).\n * @format GUID\n * @readonly\n */\n purchaseFlowId?: string | null;\n /**\n * Additional Cart settings.\n *\n * > **Notes:**\n * > * Custom settings can only be set when creating a Cart.\n * > * To access and manage custom checkout page content, your app must have the permission scope named \"Manage eCommerce - Admin Permissions\". Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).\n * @immutable\n */\n settings?: CartSettings;\n /**\n * Custom checkout URL to redirect the customer to a checkout page.\n * By default, customers are redirected to the standard Wix checkout page.\n * Clients can override this behavior by providing their own URL here.\n * If the URL contains the placeholder `{checkout_id}`, it will be replaced with the actual Cart ID.\n * @maxLength 2048\n */\n customCheckoutUrl?: string | null;\n /**\n * Custom fields.\n * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls.\n */\n extendedFields?: ExtendedFields;\n}\n\n/**\n * Deletes a Cart.\n * @param cartId - ID of the Cart to delete.\n * @internal\n * @documentationMaturity preview\n * @requiredField cartId\n * @permissionId ecom:v2:cart:delete_cart\n * @fqn wix.ecom.cart.v2.CartService.DeleteCart\n */\nexport async function deleteCart(cartId: string): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ cartId: cartId });\n\n const reqOpts = ambassadorWixEcomV2Cart.deleteCart(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { cartId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['cartId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Re-evaluates prices, inventory and discounts to ensure the Cart is up-to-date with the latest changes.\n * @param cartId - ID of the Cart to refresh.\n * @internal\n * @documentationMaturity preview\n * @requiredField cartId\n * @permissionId ecom:v2:cart:refresh_cart\n * @fqn wix.ecom.cart.v2.CartService.RefreshCart\n */\nexport async function refreshCart(\n cartId: string\n): Promise<\n NonNullablePaths<\n RefreshCartResponse,\n | `cart._id`\n | `cart.lineItems`\n | `cart.lineItems.${number}._id`\n | `cart.lineItems.${number}.name.original`\n | `cart.lineItems.${number}.quantityInfo.confirmedQuantity`\n | `cart.lineItems.${number}.quantityInfo.requestedQuantity`\n | `cart.lineItems.${number}.quantityInfo.fixedQuantity`\n | `cart.lineItems.${number}.pricing.unitPrice.amount`\n | `cart.lineItems.${number}.pricing.unitPrice.convertedAmount`\n | `cart.lineItems.${number}.pricing.priceDescription.original`\n | `cart.lineItems.${number}.pricing.priceUndetermined`\n | `cart.lineItems.${number}.source.catalogReference.catalogItemId`\n | `cart.lineItems.${number}.source.catalogReference.appId`\n | `cart.lineItems.${number}.attributes.itemType.preset`\n | `cart.lineItems.${number}.attributes.itemType.custom`\n | `cart.lineItems.${number}.attributes.physicalProperties.shippable`\n | `cart.lineItems.${number}.attributes.membersOnly`\n | `cart.lineItems.${number}.taxConfig.taxableAddress.addressType`\n | `cart.lineItems.${number}.paymentConfig.savePaymentMethod`\n | `cart.lineItems.${number}.paymentConfig.selectedMembership._id`\n | `cart.lineItems.${number}.paymentConfig.selectedMembership.appId`\n | `cart.lineItems.${number}.paymentConfig.paymentOption`\n | `cart.lineItems.${number}.status`\n | `cart.lineItems.${number}.customLineItem`\n | `cart.coupons`\n | `cart.coupons.${number}._id`\n | `cart.coupons.${number}.code`\n | `cart.source.channelType`\n | `cart.source.externalReferences`\n | `cart.source.externalReferences.${number}.appId`\n | `cart.source.createdBy.visitorId`\n | `cart.source.createdBy.memberId`\n | `cart.source.createdBy.userId`\n | `cart.source.createdBy.appId`\n | `cart.source.customContentReference.appId`\n | `cart.source.customContentReference.componentId`\n | `cart.businessInfo.languageCode`\n | `cart.businessInfo.currencyCode`\n | `cart.customerInfo.visitorId`\n | `cart.customerInfo.memberId`\n | `cart.customerInfo.userId`\n | `cart.customerInfo.vatId._id`\n | `cart.customerInfo.vatId.type`\n | `cart.customerInfo.languageCode`\n | `cart.customerInfo.currencyCode`\n | `cart.deliveryInfo.address.streetAddress.number`\n | `cart.deliveryInfo.address.streetAddress.name`\n | `cart.deliveryInfo.method.code`\n | `cart.deliveryInfo.method.pickup`\n | `cart.deliveryInfo.weightUnit`\n | `cart.taxInfo.pricesIncludeTax`\n | `cart.paymentInfo.giftCards`\n | `cart.paymentInfo.giftCards.${number}._id`\n | `cart.paymentInfo.giftCards.${number}.obfuscatedCode`\n | `cart.paymentInfo.giftCards.${number}.appId`\n | `cart.paymentInfo.currencyCode`\n | `cart.orderPlaced`\n | `cart.settings.lockGiftCard`\n | `cart.settings.lockCouponCode`\n | `cart.settings.policyAgreementCheckboxDisabled`\n | `cart.settings.manualPaymentDisabled`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ cartId: cartId });\n\n const reqOpts = ambassadorWixEcomV2Cart.refreshCart(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'cart.lineItems.source.catalogOverrideFields.image' },\n { path: 'cart.lineItems.attributes.image' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [{ path: 'cart.lineItems.attributes.url' }],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'cart.deliveryInfo.address' },\n { path: 'cart.paymentInfo.billingAddress' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { cartId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['cartId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Calculates the cart based on its current state (line items, discounts, delivery method, etc.)\n * and returns a detailed summary including subtotal, delivery costs, taxes, fees and the total price.\n * Note that discounts are already pre-computed and applied to the Cart.\n *\n * This is a read-only operation that does not modify the cart.\n * @param cartId - ID of the Cart to calculate.\n * @internal\n * @documentationMaturity preview\n * @requiredField cartId\n * @permissionId ecom:v2:cart:calculate_cart\n * @fqn wix.ecom.cart.v2.CartService.CalculateCart\n */\nexport async function calculateCart(\n cartId: string,\n options?: CalculateCartOptions\n): Promise<\n NonNullablePaths<\n CalculateCartResponse,\n | `cart._id`\n | `cart.lineItems`\n | `cart.lineItems.${number}._id`\n | `cart.lineItems.${number}.name.original`\n | `cart.lineItems.${number}.quantityInfo.confirmedQuantity`\n | `cart.lineItems.${number}.quantityInfo.requestedQuantity`\n | `cart.lineItems.${number}.quantityInfo.fixedQuantity`\n | `cart.lineItems.${number}.pricing.unitPrice.amount`\n | `cart.lineItems.${number}.pricing.unitPrice.convertedAmount`\n | `cart.lineItems.${number}.pricing.priceDescription.original`\n | `cart.lineItems.${number}.pricing.priceUndetermined`\n | `cart.lineItems.${number}.source.catalogReference.catalogItemId`\n | `cart.lineItems.${number}.source.catalogReference.appId`\n | `cart.lineItems.${number}.attributes.itemType.preset`\n | `cart.lineItems.${number}.attributes.itemType.custom`\n | `cart.lineItems.${number}.attributes.physicalProperties.shippable`\n | `cart.lineItems.${number}.attributes.membersOnly`\n | `cart.lineItems.${number}.taxConfig.taxableAddress.addressType`\n | `cart.lineItems.${number}.paymentConfig.savePaymentMethod`\n | `cart.lineItems.${number}.paymentConfig.selectedMembership._id`\n | `cart.lineItems.${number}.paymentConfig.selectedMembership.appId`\n | `cart.lineItems.${number}.paymentConfig.paymentOption`\n | `cart.lineItems.${number}.status`\n | `cart.lineItems.${number}.customLineItem`\n | `cart.coupons`\n | `cart.coupons.${number}._id`\n | `cart.coupons.${number}.code`\n | `cart.source.channelType`\n | `cart.source.externalReferences`\n | `cart.source.externalReferences.${number}.appId`\n | `cart.source.createdBy.visitorId`\n | `cart.source.createdBy.memberId`\n | `cart.source.createdBy.userId`\n | `cart.source.createdBy.appId`\n | `cart.source.customContentReference.appId`\n | `cart.source.customContentReference.componentId`\n | `cart.businessInfo.languageCode`\n | `cart.businessInfo.currencyCode`\n | `cart.customerInfo.visitorId`\n | `cart.customerInfo.memberId`\n | `cart.customerInfo.userId`\n | `cart.customerInfo.vatId._id`\n | `cart.customerInfo.vatId.type`\n | `cart.customerInfo.languageCode`\n | `cart.customerInfo.currencyCode`\n | `cart.deliveryInfo.address.streetAddress.number`\n | `cart.deliveryInfo.address.streetAddress.name`\n | `cart.deliveryInfo.method.code`\n | `cart.deliveryInfo.method.pickup`\n | `cart.deliveryInfo.weightUnit`\n | `cart.taxInfo.pricesIncludeTax`\n | `cart.paymentInfo.giftCards`\n | `cart.paymentInfo.giftCards.${number}._id`\n | `cart.paymentInfo.giftCards.${number}.obfuscatedCode`\n | `cart.paymentInfo.giftCards.${number}.appId`\n | `cart.paymentInfo.currencyCode`\n | `cart.orderPlaced`\n | `cart.settings.lockGiftCard`\n | `cart.settings.lockCouponCode`\n | `cart.settings.policyAgreementCheckboxDisabled`\n | `cart.settings.manualPaymentDisabled`\n | `summary.cartId`\n | `summary.lineItems`\n | `summary.lineItems.${number}.lineItemId`\n | `summary.lineItems.${number}.quantity`\n | `summary.lineItems.${number}.unitPrice.amount`\n | `summary.lineItems.${number}.unitPrice.convertedAmount`\n | `summary.discounts`\n | `summary.discounts.${number}.name.original`\n | `summary.discounts.${number}.source.sourceType`\n | `summary.discounts.${number}.scope`\n | `summary.deliverySummary.method.code`\n | `summary.deliverySummary.method.pickup`\n | `summary.additionalFees`\n | `summary.taxSummary.taxes`\n | `summary.taxSummary.pricesIncludeTax`\n | `summary.taxSummary.lineItemTaxes`\n | `summary.taxSummary.lineItemTaxes.${number}.lineItemId`\n | `summary.taxSummary.additionalFeeTaxes`\n | `summary.taxSummary.additionalFeeTaxes.${number}.additionalFeeCode`\n | `summary.paymentSummary.giftCards`\n | `summary.paymentSummary.giftCards.${number}.giftCardId`\n | `summary.paymentSummary.memberships`\n | `summary.paymentSummary.memberships.${number}._id`\n | `summary.paymentSummary.memberships.${number}.appId`\n | `summary.paymentSummary.subscriptionCharges`\n | `summary.paymentSummary.requiresPaymentAfterGiftCard`\n | `summary.calculationErrors.generalShippingCalculationError.applicationError.code`\n | `summary.calculationErrors.generalShippingCalculationError.applicationError.description`\n | `summary.calculationErrors.generalShippingCalculationError.validationError.fieldViolations`\n | `summary.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field`\n | `summary.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description`\n | `summary.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule`\n | `summary.calculationErrors.carrierErrors.errors`\n | `summary.calculationErrors.carrierErrors.errors.${number}.carrierId`\n | `summary.calculationErrors.orderValidationErrors`\n | `summary.spiViolations`\n | `summary.spiViolations.${number}.severity`\n | `summary.spiViolations.${number}.target.other.name`\n | `summary.spiViolations.${number}.target.lineItem.name`,\n 8\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n cartId: cartId,\n validationsConfig: options?.validationsConfig,\n customCalculationConfig: options?.customCalculationConfig,\n });\n\n const reqOpts = ambassadorWixEcomV2Cart.calculateCart(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'cart.lineItems.source.catalogOverrideFields.image' },\n { path: 'cart.lineItems.attributes.image' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [{ path: 'cart.lineItems.attributes.url' }],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'cart.deliveryInfo.address' },\n { path: 'cart.paymentInfo.billingAddress' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n cartId: '$[0]',\n validationsConfig: '$[1].validationsConfig',\n customCalculationConfig: '$[1].customCalculationConfig',\n },\n singleArgumentUnchanged: false,\n },\n ['cartId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CalculateCartOptions {\n /**\n * Specifies the level of **business validation** to perform during cart calculation,\n * by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).\n */\n validationsConfig?: ValidationsConfigWithLiterals;\n /**\n * Optional custom configuration for the calculation.\n * If not provided, all price components are calculated by default.\n */\n customCalculationConfig?: CalculationConfig;\n}\n\n/**\n * Retrieves the checkout URL for the Cart.\n *\n * By default, this is the standard Wix checkout page.\n * If `custom_checkout_url` is defined, it overrides the default and is returned as the checkout URL.\n * @param cartId - ID of the Cart to calculate.\n * @internal\n * @documentationMaturity preview\n * @requiredField cartId\n * @permissionId ecom:v2:cart:get_checkout_url\n * @fqn wix.ecom.cart.v2.CartService.GetCheckoutURL\n */\nexport async function getCheckoutUrl(\n cartId: string,\n options?: GetCheckoutUrlOptions\n): Promise<NonNullablePaths<GetCheckoutURLResponse, `checkoutUrl`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n cartId: cartId,\n currencyCode: options?.currencyCode,\n });\n\n const reqOpts = ambassadorWixEcomV2Cart.getCheckoutUrl(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n cartId: '$[0]',\n currencyCode: '$[1].currencyCode',\n },\n singleArgumentUnchanged: false,\n },\n ['cartId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetCheckoutUrlOptions {\n /**\n * Checkout currency parameter to append as a query param\n * @format CURRENCY\n */\n currencyCode?: string | null;\n}\n\n/**\n * Completes the checkout process and creates an Order.\n * This endpoint may charge the customer.\n *\n * Read more about the [eCommerce Orders API](https://dev.wix.com/api/rest/wix-ecommerce/orders-api/introduction).\n * @param cartId - Cart ID.\n * @internal\n * @documentationMaturity preview\n * @requiredField cartId\n * @permissionId ecom:v2:cart:place_order\n * @fqn wix.ecom.cart.v2.CartService.PlaceOrder\n */\nexport async function placeOrder(\n cartId: string,\n options?: PlaceOrderOptions\n): Promise<\n NonNullablePaths<PlaceOrderResponse, `orderId` | `cartCompleted`, 2>\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n cartId: cartId,\n pricingToken: options?.pricingToken,\n paymentToken: options?.paymentToken,\n redirectUrls: options?.redirectUrls,\n savePaymentMethod: options?.savePaymentMethod,\n delayCapture: options?.delayCapture,\n });\n\n const reqOpts = ambassadorWixEcomV2Cart.placeOrder(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n cartId: '$[0]',\n pricingToken: '$[1].pricingToken',\n paymentToken: '$[1].paymentToken',\n redirectUrls: '$[1].redirectUrls',\n savePaymentMethod: '$[1].savePaymentMethod',\n delayCapture: '$[1].delayCapture',\n },\n singleArgumentUnchanged: false,\n },\n ['cartId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface PlaceOrderOptions {\n /**\n * The pricing token received from `CalculateCart`'s response.\n * Used to verify that the prices shown to the customer have not changed before completing checkout.\n * @maxLength 3000\n */\n pricingToken?: string | null;\n /**\n * Payment token.\n * @maxLength 100\n */\n paymentToken?: string | null;\n /** Urls to redirect to after payment is made. */\n redirectUrls?: RedirectUrls;\n /** Indicates the payment method should be saved on the order */\n savePaymentMethod?: boolean;\n /** Indicates whether to authorize the payment and delay the capture */\n delayCapture?: boolean;\n}\n\n/**\n * Adds line items to the Cart.\n * @param cartId - Cart ID.\n * @internal\n * @documentationMaturity preview\n * @requiredField cartId\n * @requiredField options.catalogItems.catalogReference\n * @requiredField options.catalogItems.quantity\n * @requiredField options.catalogItems.selectedMembership._id\n * @requiredField options.catalogItems.selectedMembership.appId\n * @requiredField options.customItems.name\n * @requiredField options.customItems.pricing\n * @requiredField options.customItems.quantityInfo\n * @requiredField options.customItems.quantityInfo.requestedQuantity\n * @permissionId ecom:v2:cart:update_cart\n * @permissionId ECOM.ADMIN_MODIFY_CARTS\n * @applicableIdentity APP\n * @fqn wix.ecom.cart.v2.CartService.AddLineItems\n */\nexport async function addLineItems(\n cartId: string,\n options?: NonNullablePaths<\n AddLineItemsOptions,\n | `catalogItems.${number}.catalogReference`\n | `catalogItems.${number}.quantity`\n | `catalogItems.${number}.selectedMembership._id`\n | `catalogItems.${number}.selectedMembership.appId`\n | `customItems.${number}.attributes.descriptionLines.${number}.name`\n | `customItems.${number}.name`\n | `customItems.${number}.pricing`\n | `customItems.${number}.pricing.price`\n | `customItems.${number}.quantityInfo`\n | `customItems.${number}.quantityInfo.requestedQuantity`,\n 7\n >\n): Promise<\n NonNullablePaths<\n AddLineItemsResponse,\n | `cart._id`\n | `cart.lineItems`\n | `cart.lineItems.${number}._id`\n | `cart.lineItems.${number}.name.original`\n | `cart.lineItems.${number}.quantityInfo.confirmedQuantity`\n | `cart.lineItems.${number}.quantityInfo.requestedQuantity`\n | `cart.lineItems.${number}.quantityInfo.fixedQuantity`\n | `cart.lineItems.${number}.pricing.unitPrice.amount`\n | `cart.lineItems.${number}.pricing.unitPrice.convertedAmount`\n | `cart.lineItems.${number}.pricing.priceDescription.original`\n | `cart.lineItems.${number}.pricing.priceUndetermined`\n | `cart.lineItems.${number}.source.catalogReference.catalogItemId`\n | `cart.lineItems.${number}.source.catalogReference.appId`\n | `cart.lineItems.${number}.attributes.itemType.preset`\n | `cart.lineItems.${number}.attributes.itemType.custom`\n | `cart.lineItems.${number}.attributes.physicalProperties.shippable`\n | `cart.lineItems.${number}.attributes.membersOnly`\n | `cart.lineItems.${number}.taxConfig.taxableAddress.addressType`\n | `cart.lineItems.${number}.paymentConfig.savePaymentMethod`\n | `cart.lineItems.${number}.paymentConfig.selectedMembership._id`\n | `cart.lineItems.${number}.paymentConfig.selectedMembership.appId`\n | `cart.lineItems.${number}.paymentConfig.paymentOption`\n | `cart.lineItems.${number}.status`\n | `cart.lineItems.${number}.customLineItem`\n | `cart.coupons`\n | `cart.coupons.${number}._id`\n | `cart.coupons.${number}.code`\n | `cart.source.channelType`\n | `cart.source.externalReferences`\n | `cart.source.externalReferences.${number}.appId`\n | `cart.source.createdBy.visitorId`\n | `cart.source.createdBy.memberId`\n | `cart.source.createdBy.userId`\n | `cart.source.createdBy.appId`\n | `cart.source.customContentReference.appId`\n | `cart.source.customContentReference.componentId`\n | `cart.businessInfo.languageCode`\n | `cart.businessInfo.currencyCode`\n | `cart.customerInfo.visitorId`\n | `cart.customerInfo.memberId`\n | `cart.customerInfo.userId`\n | `cart.customerInfo.vatId._id`\n | `cart.customerInfo.vatId.type`\n | `cart.customerInfo.languageCode`\n | `cart.customerInfo.currencyCode`\n | `cart.deliveryInfo.address.streetAddress.number`\n | `cart.deliveryInfo.address.streetAddress.name`\n | `cart.deliveryInfo.method.code`\n | `cart.deliveryInfo.method.pickup`\n | `cart.deliveryInfo.weightUnit`\n | `cart.taxInfo.pricesIncludeTax`\n | `cart.paymentInfo.giftCards`\n | `cart.paymentInfo.giftCards.${number}._id`\n | `cart.paymentInfo.giftCards.${number}.obfuscatedCode`\n | `cart.paymentInfo.giftCards.${number}.appId`\n | `cart.paymentInfo.currencyCode`\n | `cart.orderPlaced`\n | `cart.settings.lockGiftCard`\n | `cart.settings.lockCouponCode`\n | `cart.settings.policyAgreementCheckboxDisabled`\n | `cart.settings.manualPaymentDisabled`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n cartId: cartId,\n catalogItems: options?.catalogItems,\n customItems: options?.customItems,\n }),\n [\n {\n transformFn: transformSDKImageToRESTImage,\n paths: [\n { path: 'catalogItems.catalogOverrideFields.image' },\n { path: 'customItems.attributes.image' },\n ],\n },\n {\n transformFn: transformSDKPageURLV2ToRESTPageURLV2,\n paths: [{ path: 'customItems.attributes.url' }],\n },\n ]\n );\n\n const reqOpts = ambassadorWixEcomV2Cart.addLineItems(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'cart.lineItems.source.catalogOverrideFields.image' },\n { path: 'cart.lineItems.attributes.image' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [{ path: 'cart.lineItems.attributes.url' }],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'cart.deliveryInfo.address' },\n { path: 'cart.paymentInfo.billingAddress' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n cartId: '$[0]',\n catalogItems: '$[1].catalogItems',\n customItems: '$[1].customItems',\n },\n singleArgumentUnchanged: false,\n },\n ['cartId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface AddLineItemsOptions {\n /**\n * A list of catalog items to add to the cart.\n * @maxSize 300\n */\n catalogItems?: CatalogItemInput[];\n /**\n * A list of custom items to add to the cart.\n * @maxSize 300\n */\n customItems?: CustomItemInput[];\n}\n\n/**\n * Removes line items from the Cart.\n * @param cartId - Cart ID.\n * @param lineItemIds - Line item IDs to remove from cart.\n * @internal\n * @documentationMaturity preview\n * @requiredField cartId\n * @requiredField lineItemIds\n * @permissionId ecom:v2:cart:update_cart\n * @fqn wix.ecom.cart.v2.CartService.RemoveLineItems\n */\nexport async function removeLineItems(\n cartId: string,\n lineItemIds: string[]\n): Promise<\n NonNullablePaths<\n RemoveLineItemsResponse,\n | `cart._id`\n | `cart.lineItems`\n | `cart.lineItems.${number}._id`\n | `cart.lineItems.${number}.name.original`\n | `cart.lineItems.${number}.quantityInfo.confirmedQuantity`\n | `cart.lineItems.${number}.quantityInfo.requestedQuantity`\n | `cart.lineItems.${number}.quantityInfo.fixedQuantity`\n | `cart.lineItems.${number}.pricing.unitPrice.amount`\n | `cart.lineItems.${number}.pricing.unitPrice.convertedAmount`\n | `cart.lineItems.${number}.pricing.priceDescription.original`\n | `cart.lineItems.${number}.pricing.priceUndetermined`\n | `cart.lineItems.${number}.source.catalogReference.catalogItemId`\n | `cart.lineItems.${number}.source.catalogReference.appId`\n | `cart.lineItems.${number}.attributes.itemType.preset`\n | `cart.lineItems.${number}.attributes.itemType.custom`\n | `cart.lineItems.${number}.attributes.physicalProperties.shippable`\n | `cart.lineItems.${number}.attributes.membersOnly`\n | `cart.lineItems.${number}.taxConfig.taxableAddress.addressType`\n | `cart.lineItems.${number}.paymentConfig.savePaymentMethod`\n | `cart.lineItems.${number}.paymentConfig.selectedMembership._id`\n | `cart.lineItems.${number}.paymentConfig.selectedMembership.appId`\n | `cart.lineItems.${number}.paymentConfig.paymentOption`\n | `cart.lineItems.${number}.status`\n | `cart.lineItems.${number}.customLineItem`\n | `cart.coupons`\n | `cart.coupons.${number}._id`\n | `cart.coupons.${number}.code`\n | `cart.source.channelType`\n | `cart.source.externalReferences`\n | `cart.source.externalReferences.${number}.appId`\n | `cart.source.createdBy.visitorId`\n | `cart.source.createdBy.memberId`\n | `cart.source.createdBy.userId`\n | `cart.source.createdBy.appId`\n | `cart.source.customContentReference.appId`\n | `cart.source.customContentReference.componentId`\n | `cart.businessInfo.languageCode`\n | `cart.businessInfo.currencyCode`\n | `cart.customerInfo.visitorId`\n | `cart.customerInfo.memberId`\n | `cart.customerInfo.userId`\n | `cart.customerInfo.vatId._id`\n | `cart.customerInfo.vatId.type`\n | `cart.customerInfo.languageCode`\n | `cart.customerInfo.currencyCode`\n | `cart.deliveryInfo.address.streetAddress.number`\n | `cart.deliveryInfo.address.streetAddress.name`\n | `cart.deliveryInfo.method.code`\n | `cart.deliveryInfo.method.pickup`\n | `cart.deliveryInfo.weightUnit`\n | `cart.taxInfo.pricesIncludeTax`\n | `cart.paymentInfo.giftCards`\n | `cart.paymentInfo.giftCards.${number}._id`\n | `cart.paymentInfo.giftCards.${number}.obfuscatedCode`\n | `cart.paymentInfo.giftCards.${number}.appId`\n | `cart.paymentInfo.currencyCode`\n | `cart.orderPlaced`\n | `cart.settings.lockGiftCard`\n | `cart.settings.lockCouponCode`\n | `cart.settings.policyAgreementCheckboxDisabled`\n | `cart.settings.manualPaymentDisabled`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n cartId: cartId,\n lineItemIds: lineItemIds,\n });\n\n const reqOpts = ambassadorWixEcomV2Cart.removeLineItems(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'cart.lineItems.source.catalogOverrideFields.image' },\n { path: 'cart.lineItems.attributes.image' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [{ path: 'cart.lineItems.attributes.url' }],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'cart.deliveryInfo.address' },\n { path: 'cart.paymentInfo.billingAddress' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { cartId: '$[0]', lineItemIds: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['cartId', 'lineItemIds']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates line items in the Cart.\n * Use this endpoint to update line items properties such as quantity and selected membership.\n * @param cartId - Cart ID.\n * @internal\n * @documentationMaturity preview\n * @requiredField cartId\n * @requiredField options.lineItems.lineItemId\n * @requiredField options.lineItems.quantity.newQuantity\n * @permissionId ecom:v2:cart:update_cart\n * @fqn wix.ecom.cart.v2.CartService.UpdateLineItems\n */\nexport async function updateLineItems(\n cartId: string,\n options?: NonNullablePaths<\n UpdateLineItemsOptions,\n | `lineItems.${number}.lineItemId`\n | `lineItems.${number}.quantity.newQuantity`,\n 5\n >\n): Promise<\n NonNullablePaths<\n UpdateLineItemsResponse,\n | `cart._id`\n | `cart.lineItems`\n | `cart.lineItems.${number}._id`\n | `cart.lineItems.${number}.name.original`\n | `cart.lineItems.${number}.quantityInfo.confirmedQuantity`\n | `cart.lineItems.${number}.quantityInfo.requestedQuantity`\n | `cart.lineItems.${number}.quantityInfo.fixedQuantity`\n | `cart.lineItems.${number}.pricing.unitPrice.amount`\n | `cart.lineItems.${number}.pricing.unitPrice.convertedAmount`\n | `cart.lineItems.${number}.pricing.priceDescription.original`\n | `cart.lineItems.${number}.pricing.priceUndetermined`\n | `cart.lineItems.${number}.source.catalogReference.catalogItemId`\n | `cart.lineItems.${number}.source.catalogReference.appId`\n | `cart.lineItems.${number}.attributes.itemType.preset`\n | `cart.lineItems.${number}.attributes.itemType.custom`\n | `cart.lineItems.${number}.attributes.physicalProperties.shippable`\n | `cart.lineItems.${number}.attributes.membersOnly`\n | `cart.lineItems.${number}.taxConfig.taxableAddress.addressType`\n | `cart.lineItems.${number}.paymentConfig.savePaymentMethod`\n | `cart.lineItems.${number}.paymentConfig.selectedMembership._id`\n | `cart.lineItems.${number}.paymentConfig.selectedMembership.appId`\n | `cart.lineItems.${number}.paymentConfig.paymentOption`\n | `cart.lineItems.${number}.status`\n | `cart.lineItems.${number}.customLineItem`\n | `cart.coupons`\n | `cart.coupons.${number}._id`\n | `cart.coupons.${number}.code`\n | `cart.source.channelType`\n | `cart.source.externalReferences`\n | `cart.source.externalReferences.${number}.appId`\n | `cart.source.createdBy.visitorId`\n | `cart.source.createdBy.memberId`\n | `cart.source.createdBy.userId`\n | `cart.source.createdBy.appId`\n | `cart.source.customContentReference.appId`\n | `cart.source.customContentReference.componentId`\n | `cart.businessInfo.languageCode`\n | `cart.businessInfo.currencyCode`\n | `cart.customerInfo.visitorId`\n | `cart.customerInfo.memberId`\n | `cart.customerInfo.userId`\n | `cart.customerInfo.vatId._id`\n | `cart.customerInfo.vatId.type`\n | `cart.customerInfo.languageCode`\n | `cart.customerInfo.currencyCode`\n | `cart.deliveryInfo.address.streetAddress.number`\n | `cart.deliveryInfo.address.streetAddress.name`\n | `cart.deliveryInfo.method.code`\n | `cart.deliveryInfo.method.pickup`\n | `cart.deliveryInfo.weightUnit`\n | `cart.taxInfo.pricesIncludeTax`\n | `cart.paymentInfo.giftCards`\n | `cart.paymentInfo.giftCards.${number}._id`\n | `cart.paymentInfo.giftCards.${number}.obfuscatedCode`\n | `cart.paymentInfo.giftCards.${number}.appId`\n | `cart.paymentInfo.currencyCode`\n | `cart.orderPlaced`\n | `cart.settings.lockGiftCard`\n | `cart.settings.lockCouponCode`\n | `cart.settings.policyAgreementCheckboxDisabled`\n | `cart.settings.manualPaymentDisabled`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n cartId: cartId,\n lineItems: options?.lineItems,\n });\n\n const reqOpts = ambassadorWixEcomV2Cart.updateLineItems(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'cart.lineItems.source.catalogOverrideFields.image' },\n { path: 'cart.lineItems.attributes.image' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [{ path: 'cart.lineItems.attributes.url' }],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'cart.deliveryInfo.address' },\n { path: 'cart.paymentInfo.billingAddress' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n cartId: '$[0]',\n lineItems: '$[1].lineItems',\n },\n singleArgumentUnchanged: false,\n },\n ['cartId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateLineItemsOptions {\n /**\n * Line item updates to apply.\n * @minSize 1\n * @maxSize 300\n */\n lineItems?: LineItemUpdate[];\n}\n\n/**\n * Adds a coupon to the Cart.\n * @param cartId - Cart ID.\n * @param couponCode - Coupon to apply.\n *\n * Currently only one is supported.\n * @internal\n * @documentationMaturity preview\n * @requiredField cartId\n * @requiredField couponCode\n * @permissionId ecom:v2:cart:update_cart\n * @fqn wix.ecom.cart.v2.CartService.AddCoupon\n */\nexport async function addCoupon(\n cartId: string,\n couponCode: string\n): Promise<\n NonNullablePaths<\n AddCouponResponse,\n | `cart._id`\n | `cart.lineItems`\n | `cart.lineItems.${number}._id`\n | `cart.lineItems.${number}.name.original`\n | `cart.lineItems.${number}.quantityInfo.confirmedQuantity`\n | `cart.lineItems.${number}.quantityInfo.requestedQuantity`\n | `cart.lineItems.${number}.quantityInfo.fixedQuantity`\n | `cart.lineItems.${number}.pricing.unitPrice.amount`\n | `cart.lineItems.${number}.pricing.unitPrice.convertedAmount`\n | `cart.lineItems.${number}.pricing.priceDescription.original`\n | `cart.lineItems.${number}.pricing.priceUndetermined`\n | `cart.lineItems.${number}.source.catalogReference.catalogItemId`\n | `cart.lineItems.${number}.source.catalogReference.appId`\n | `cart.lineItems.${number}.attributes.itemType.preset`\n | `cart.lineItems.${number}.attributes.itemType.custom`\n | `cart.lineItems.${number}.attributes.physicalProperties.shippable`\n | `cart.lineItems.${number}.attributes.membersOnly`\n | `cart.lineItems.${number}.taxConfig.taxableAddress.addressType`\n | `cart.lineItems.${number}.paymentConfig.savePaymentMethod`\n | `cart.lineItems.${number}.paymentConfig.selectedMembership._id`\n | `cart.lineItems.${number}.paymentConfig.selectedMembership.appId`\n | `cart.lineItems.${number}.paymentConfig.paymentOption`\n | `cart.lineItems.${number}.status`\n | `cart.lineItems.${number}.customLineItem`\n | `cart.coupons`\n | `cart.coupons.${number}._id`\n | `cart.coupons.${number}.code`\n | `cart.source.channelType`\n | `cart.source.externalReferences`\n | `cart.source.externalReferences.${number}.appId`\n | `cart.source.createdBy.visitorId`\n | `cart.source.createdBy.memberId`\n | `cart.source.createdBy.userId`\n | `cart.source.createdBy.appId`\n | `cart.source.customContentReference.appId`\n | `cart.source.customContentReference.componentId`\n | `cart.businessInfo.languageCode`\n | `cart.businessInfo.currencyCode`\n | `cart.customerInfo.visitorId`\n | `cart.customerInfo.memberId`\n | `cart.customerInfo.userId`\n | `cart.customerInfo.vatId._id`\n | `cart.customerInfo.vatId.type`\n | `cart.customerInfo.languageCode`\n | `cart.customerInfo.currencyCode`\n | `cart.deliveryInfo.address.streetAddress.number`\n | `cart.deliveryInfo.address.streetAddress.name`\n | `cart.deliveryInfo.method.code`\n | `cart.deliveryInfo.method.pickup`\n | `cart.deliveryInfo.weightUnit`\n | `cart.taxInfo.pricesIncludeTax`\n | `cart.paymentInfo.giftCards`\n | `cart.paymentInfo.giftCards.${number}._id`\n | `cart.paymentInfo.giftCards.${number}.obfuscatedCode`\n | `cart.paymentInfo.giftCards.${number}.appId`\n | `cart.paymentInfo.currencyCode`\n | `cart.orderPlaced`\n | `cart.settings.lockGiftCard`\n | `cart.settings.lockCouponCode`\n | `cart.settings.policyAgreementCheckboxDisabled`\n | `cart.settings.manualPaymentDisabled`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n cartId: cartId,\n couponCode: couponCode,\n });\n\n const reqOpts = ambassadorWixEcomV2Cart.addCoupon(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'cart.lineItems.source.catalogOverrideFields.image' },\n { path: 'cart.lineItems.attributes.image' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [{ path: 'cart.lineItems.attributes.url' }],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'cart.deliveryInfo.address' },\n { path: 'cart.paymentInfo.billingAddress' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { cartId: '$[0]', couponCode: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['cartId', 'couponCode']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Removes a coupon from the Cart.\n * @param cartId - Cart ID.\n * @param couponId - Discount ID.\n * @internal\n * @documentationMaturity preview\n * @requiredField cartId\n * @requiredField couponId\n * @permissionId ecom:v2:cart:update_cart\n * @fqn wix.ecom.cart.v2.CartService.RemoveCoupon\n */\nexport async function removeCoupon(\n cartId: string,\n couponId: string\n): Promise<\n NonNullablePaths<\n RemoveCouponResponse,\n | `cart._id`\n | `cart.lineItems`\n | `cart.lineItems.${number}._id`\n | `cart.lineItems.${number}.name.original`\n | `cart.lineItems.${number}.quantityInfo.confirmedQuantity`\n | `cart.lineItems.${number}.quantityInfo.requestedQuantity`\n | `cart.lineItems.${number}.quantityInfo.fixedQuantity`\n | `cart.lineItems.${number}.pricing.unitPrice.amount`\n | `cart.lineItems.${number}.pricing.unitPrice.convertedAmount`\n | `cart.lineItems.${number}.pricing.priceDescription.original`\n | `cart.lineItems.${number}.pricing.priceUndetermined`\n | `cart.lineItems.${number}.source.catalogReference.catalogItemId`\n | `cart.lineItems.${number}.source.catalogReference.appId`\n | `cart.lineItems.${number}.attributes.itemType.preset`\n | `cart.lineItems.${number}.attributes.itemType.custom`\n | `cart.lineItems.${number}.attributes.physicalProperties.shippable`\n | `cart.lineItems.${number}.attributes.membersOnly`\n | `cart.lineItems.${number}.taxConfig.taxableAddress.addressType`\n | `cart.lineItems.${number}.paymentConfig.savePaymentMethod`\n | `cart.lineItems.${number}.paymentConfig.selectedMembership._id`\n | `cart.lineItems.${number}.paymentConfig.selectedMembership.appId`\n | `cart.lineItems.${number}.paymentConfig.paymentOption`\n | `cart.lineItems.${number}.status`\n | `cart.lineItems.${number}.customLineItem`\n | `cart.coupons`\n | `cart.coupons.${number}._id`\n | `cart.coupons.${number}.code`\n | `cart.source.channelType`\n | `cart.source.externalReferences`\n | `cart.source.externalReferences.${number}.appId`\n | `cart.source.createdBy.visitorId`\n | `cart.source.createdBy.memberId`\n | `cart.source.createdBy.userId`\n | `cart.source.createdBy.appId`\n | `cart.source.customContentReference.appId`\n | `cart.source.customContentReference.componentId`\n | `cart.businessInfo.languageCode`\n | `cart.businessInfo.currencyCode`\n | `cart.customerInfo.visitorId`\n | `cart.customerInfo.memberId`\n | `cart.customerInfo.userId`\n | `cart.customerInfo.vatId._id`\n | `cart.customerInfo.vatId.type`\n | `cart.customerInfo.languageCode`\n | `cart.customerInfo.currencyCode`\n | `cart.deliveryInfo.address.streetAddress.number`\n | `cart.deliveryInfo.address.streetAddress.name`\n | `cart.deliveryInfo.method.code`\n | `cart.deliveryInfo.method.pickup`\n | `cart.deliveryInfo.weightUnit`\n | `cart.taxInfo.pricesIncludeTax`\n | `cart.paymentInfo.giftCards`\n | `cart.paymentInfo.giftCards.${number}._id`\n | `cart.paymentInfo.giftCards.${number}.obfuscatedCode`\n | `cart.paymentInfo.giftCards.${number}.appId`\n | `cart.paymentInfo.currencyCode`\n | `cart.orderPlaced`\n | `cart.settings.lockGiftCard`\n | `cart.settings.lockCouponCode`\n | `cart.settings.policyAgreementCheckboxDisabled`\n | `cart.settings.manualPaymentDisabled`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n cartId: cartId,\n couponId: couponId,\n });\n\n const reqOpts = ambassadorWixEcomV2Cart.removeCoupon(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'cart.lineItems.source.catalogOverrideFields.image' },\n { path: 'cart.lineItems.attributes.image' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [{ path: 'cart.lineItems.attributes.url' }],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'cart.deliveryInfo.address' },\n { path: 'cart.paymentInfo.billingAddress' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { cartId: '$[0]', couponId: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['cartId', 'couponId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Adds a gift card to the Cart.\n * Once added, the gift card’s balance will be used as a payment method during checkout, either partially or fully covering the cart total.\n * @param cartId - Cart ID.\n * @param giftCardCode - Gift card code.\n *\n * Currently only one is supported.\n * @internal\n * @documentationMaturity preview\n * @requiredField cartId\n * @requiredField giftCardCode\n * @permissionId ecom:v2:cart:update_cart\n * @fqn wix.ecom.cart.v2.CartService.AddGiftCard\n */\nexport async function addGiftCard(\n cartId: string,\n giftCardCode: string\n): Promise<\n NonNullablePaths<\n AddGiftCardResponse,\n | `cart._id`\n | `cart.lineItems`\n | `cart.lineItems.${number}._id`\n | `cart.lineItems.${number}.name.original`\n | `cart.lineItems.${number}.quantityInfo.confirmedQuantity`\n | `cart.lineItems.${number}.quantityInfo.requestedQuantity`\n | `cart.lineItems.${number}.quantityInfo.fixedQuantity`\n | `cart.lineItems.${number}.pricing.unitPrice.amount`\n | `cart.lineItems.${number}.pricing.unitPrice.convertedAmount`\n | `cart.lineItems.${number}.pricing.priceDescription.original`\n | `cart.lineItems.${number}.pricing.priceUndetermined`\n | `cart.lineItems.${number}.source.catalogReference.catalogItemId`\n | `cart.lineItems.${number}.source.catalogReference.appId`\n | `cart.lineItems.${number}.attributes.itemType.preset`\n | `cart.lineItems.${number}.attributes.itemType.custom`\n | `cart.lineItems.${number}.attributes.physicalProperties.shippable`\n | `cart.lineItems.${number}.attributes.membersOnly`\n | `cart.lineItems.${number}.taxConfig.taxableAddress.addressType`\n | `cart.lineItems.${number}.paymentConfig.savePaymentMethod`\n | `cart.lineItems.${number}.paymentConfig.selectedMembership._id`\n | `cart.lineItems.${number}.paymentConfig.selectedMembership.appId`\n | `cart.lineItems.${number}.paymentConfig.paymentOption`\n | `cart.lineItems.${number}.status`\n | `cart.lineItems.${number}.customLineItem`\n | `cart.coupons`\n | `cart.coupons.${number}._id`\n | `cart.coupons.${number}.code`\n | `cart.source.channelType`\n | `cart.source.externalReferences`\n | `cart.source.externalReferences.${number}.appId`\n | `cart.source.createdBy.visitorId`\n | `cart.source.createdBy.memberId`\n | `cart.source.createdBy.userId`\n | `cart.source.createdBy.appId`\n | `cart.source.customContentReference.appId`\n | `cart.source.customContentReference.componentId`\n | `cart.businessInfo.languageCode`\n | `cart.businessInfo.currencyCode`\n | `cart.customerInfo.visitorId`\n | `cart.customerInfo.memberId`\n | `cart.customerInfo.userId`\n | `cart.customerInfo.vatId._id`\n | `cart.customerInfo.vatId.type`\n | `cart.customerInfo.languageCode`\n | `cart.customerInfo.currencyCode`\n | `cart.deliveryInfo.address.streetAddress.number`\n | `cart.deliveryInfo.address.streetAddress.name`\n | `cart.deliveryInfo.method.code`\n | `cart.deliveryInfo.method.pickup`\n | `cart.deliveryInfo.weightUnit`\n | `cart.taxInfo.pricesIncludeTax`\n | `cart.paymentInfo.giftCards`\n | `cart.paymentInfo.giftCards.${number}._id`\n | `cart.paymentInfo.giftCards.${number}.obfuscatedCode`\n | `cart.paymentInfo.giftCards.${number}.appId`\n | `cart.paymentInfo.currencyCode`\n | `cart.orderPlaced`\n | `cart.settings.lockGiftCard`\n | `cart.settings.lockCouponCode`\n | `cart.settings.policyAgreementCheckboxDisabled`\n | `cart.settings.manualPaymentDisabled`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n cartId: cartId,\n giftCardCode: giftCardCode,\n });\n\n const reqOpts = ambassadorWixEcomV2Cart.addGiftCard(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'cart.lineItems.source.catalogOverrideFields.image' },\n { path: 'cart.lineItems.attributes.image' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [{ path: 'cart.lineItems.attributes.url' }],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'cart.deliveryInfo.address' },\n { path: 'cart.paymentInfo.billingAddress' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { cartId: '$[0]', giftCardCode: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['cartId', 'giftCardCode']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Removes a gift card from the Cart.\n * @param cartId - Cart ID.\n * @param giftCardId - Gift card ID.\n * @internal\n * @documentationMaturity preview\n * @requiredField cartId\n * @requiredField giftCardId\n * @permissionId ecom:v2:cart:update_cart\n * @fqn wix.ecom.cart.v2.CartService.RemoveGiftCard\n */\nexport async function removeGiftCard(\n cartId: string,\n giftCardId: string\n): Promise<\n NonNullablePaths<\n RemoveGiftCardResponse,\n | `cart._id`\n | `cart.lineItems`\n | `cart.lineItems.${number}._id`\n | `cart.lineItems.${number}.name.original`\n | `cart.lineItems.${number}.quantityInfo.confirmedQuantity`\n | `cart.lineItems.${number}.quantityInfo.requestedQuantity`\n | `cart.lineItems.${number}.quantityInfo.fixedQuantity`\n | `cart.lineItems.${number}.pricing.unitPrice.amount`\n | `cart.lineItems.${number}.pricing.unitPrice.convertedAmount`\n | `cart.lineItems.${number}.pricing.priceDescription.original`\n | `cart.lineItems.${number}.pricing.priceUndetermined`\n | `cart.lineItems.${number}.source.catalogReference.catalogItemId`\n | `cart.lineItems.${number}.source.catalogReference.appId`\n | `cart.lineItems.${number}.attributes.itemType.preset`\n | `cart.lineItems.${number}.attributes.itemType.custom`\n | `cart.lineItems.${number}.attributes.physicalProperties.shippable`\n | `cart.lineItems.${number}.attributes.membersOnly`\n | `cart.lineItems.${number}.taxConfig.taxableAddress.addressType`\n | `cart.lineItems.${number}.paymentConfig.savePaymentMethod`\n | `cart.lineItems.${number}.paymentConfig.selectedMembership._id`\n | `cart.lineItems.${number}.paymentConfig.selectedMembership.appId`\n | `cart.lineItems.${number}.paymentConfig.paymentOption`\n | `cart.lineItems.${number}.status`\n | `cart.lineItems.${number}.customLineItem`\n | `cart.coupons`\n | `cart.coupons.${number}._id`\n | `cart.coupons.${number}.code`\n | `cart.source.channelType`\n | `cart.source.externalReferences`\n | `cart.source.externalReferences.${number}.appId`\n | `cart.source.createdBy.visitorId`\n | `cart.source.createdBy.memberId`\n | `cart.source.createdBy.userId`\n | `cart.source.createdBy.appId`\n | `cart.source.customContentReference.appId`\n | `cart.source.customContentReference.componentId`\n | `cart.businessInfo.languageCode`\n | `cart.businessInfo.currencyCode`\n | `cart.customerInfo.visitorId`\n | `cart.customerInfo.memberId`\n | `cart.customerInfo.userId`\n | `cart.customerInfo.vatId._id`\n | `cart.customerInfo.vatId.type`\n | `cart.customerInfo.languageCode`\n | `cart.customerInfo.currencyCode`\n | `cart.deliveryInfo.address.streetAddress.number`\n | `cart.deliveryInfo.address.streetAddress.name`\n | `cart.deliveryInfo.method.code`\n | `cart.deliveryInfo.method.pickup`\n | `cart.deliveryInfo.weightUnit`\n | `cart.taxInfo.pricesIncludeTax`\n | `cart.paymentInfo.giftCards`\n | `cart.paymentInfo.giftCards.${number}._id`\n | `cart.paymentInfo.giftCards.${number}.obfuscatedCode`\n | `cart.paymentInfo.giftCards.${number}.appId`\n | `cart.paymentInfo.currencyCode`\n | `cart.orderPlaced`\n | `cart.settings.lockGiftCard`\n | `cart.settings.lockCouponCode`\n | `cart.settings.policyAgreementCheckboxDisabled`\n | `cart.settings.manualPaymentDisabled`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n cartId: cartId,\n giftCardId: giftCardId,\n });\n\n const reqOpts = ambassadorWixEcomV2Cart.removeGiftCard(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'cart.lineItems.source.catalogOverrideFields.image' },\n { path: 'cart.lineItems.attributes.image' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [{ path: 'cart.lineItems.attributes.url' }],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'cart.deliveryInfo.address' },\n { path: 'cart.paymentInfo.billingAddress' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { cartId: '$[0]', giftCardId: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['cartId', 'giftCardId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Marks the cart as completed. This means an order was created from the cart.\n *\n * Sets the `orderPlaced` field to `true`.\n * @param cartId - Cart ID.\n * @internal\n * @documentationMaturity preview\n * @requiredField cartId\n * @permissionId ecom:v2:cart:update_cart\n * @fqn wix.ecom.cart.v2.CartService.MarkCartAsCompleted\n */\nexport async function markCartAsCompleted(\n cartId: string,\n options?: MarkCartAsCompletedOptions\n): Promise<\n NonNullablePaths<\n MarkCartAsCompletedResponse,\n | `cart._id`\n | `cart.lineItems`\n | `cart.lineItems.${number}._id`\n | `cart.lineItems.${number}.name.original`\n | `cart.lineItems.${number}.quantityInfo.confirmedQuantity`\n | `cart.lineItems.${number}.quantityInfo.requestedQuantity`\n | `cart.lineItems.${number}.quantityInfo.fixedQuantity`\n | `cart.lineItems.${number}.pricing.unitPrice.amount`\n | `cart.lineItems.${number}.pricing.unitPrice.convertedAmount`\n | `cart.lineItems.${number}.pricing.priceDescription.original`\n | `cart.lineItems.${number}.pricing.priceUndetermined`\n | `cart.lineItems.${number}.source.catalogReference.catalogItemId`\n | `cart.lineItems.${number}.source.catalogReference.appId`\n | `cart.lineItems.${number}.attributes.itemType.preset`\n | `cart.lineItems.${number}.attributes.itemType.custom`\n | `cart.lineItems.${number}.attributes.physicalProperties.shippable`\n | `cart.lineItems.${number}.attributes.membersOnly`\n | `cart.lineItems.${number}.taxConfig.taxableAddress.addressType`\n | `cart.lineItems.${number}.paymentConfig.savePaymentMethod`\n | `cart.lineItems.${number}.paymentConfig.selectedMembership._id`\n | `cart.lineItems.${number}.paymentConfig.selectedMembership.appId`\n | `cart.lineItems.${number}.paymentConfig.paymentOption`\n | `cart.lineItems.${number}.status`\n | `cart.lineItems.${number}.customLineItem`\n | `cart.coupons`\n | `cart.coupons.${number}._id`\n | `cart.coupons.${number}.code`\n | `cart.source.channelType`\n | `cart.source.externalReferences`\n | `cart.source.externalReferences.${number}.appId`\n | `cart.source.createdBy.visitorId`\n | `cart.source.createdBy.memberId`\n | `cart.source.createdBy.userId`\n | `cart.source.createdBy.appId`\n | `cart.source.customContentReference.appId`\n | `cart.source.customContentReference.componentId`\n | `cart.businessInfo.languageCode`\n | `cart.businessInfo.currencyCode`\n | `cart.customerInfo.visitorId`\n | `cart.customerInfo.memberId`\n | `cart.customerInfo.userId`\n | `cart.customerInfo.vatId._id`\n | `cart.customerInfo.vatId.type`\n | `cart.customerInfo.languageCode`\n | `cart.customerInfo.currencyCode`\n | `cart.deliveryInfo.address.streetAddress.number`\n | `cart.deliveryInfo.address.streetAddress.name`\n | `cart.deliveryInfo.method.code`\n | `cart.deliveryInfo.method.pickup`\n | `cart.deliveryInfo.weightUnit`\n | `cart.taxInfo.pricesIncludeTax`\n | `cart.paymentInfo.giftCards`\n | `cart.paymentInfo.giftCards.${number}._id`\n | `cart.paymentInfo.giftCards.${number}.obfuscatedCode`\n | `cart.paymentInfo.giftCards.${number}.appId`\n | `cart.paymentInfo.currencyCode`\n | `cart.orderPlaced`\n | `cart.settings.lockGiftCard`\n | `cart.settings.lockCouponCode`\n | `cart.settings.policyAgreementCheckboxDisabled`\n | `cart.settings.manualPaymentDisabled`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n cartId: cartId,\n orderId: options?.orderId,\n });\n\n const reqOpts = ambassadorWixEcomV2Cart.markCartAsCompleted(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'cart.lineItems.source.catalogOverrideFields.image' },\n { path: 'cart.lineItems.attributes.image' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [{ path: 'cart.lineItems.attributes.url' }],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'cart.deliveryInfo.address' },\n { path: 'cart.paymentInfo.billingAddress' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { cartId: '$[0]', orderId: '$[1].orderId' },\n singleArgumentUnchanged: false,\n },\n ['cartId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface MarkCartAsCompletedOptions {\n /**\n * Order ID.\n * @format GUID\n */\n orderId?: string | null;\n}\n\n/**\n * Handles asynchronous checkout completion and redirects to a specified URL.\n *\n * Triggered by Wix Cashier after payment completion, this endpoint finalizes the checkout process and redirects the user to the previously provided success URL.\n * In some cases, this endpoint might be called directly by the external payment provider.\n * @param token - Server-signed JWT token with required information to complete checkout\n * @internal\n * @documentationMaturity preview\n * @requiredField token\n * @permissionId ecom:v2:cart:update_cart\n * @fqn wix.ecom.cart.v2.CartService.HandleAsyncCheckoutCompletion\n */\nexport async function handleAsyncCheckoutCompletion(\n token: string\n): Promise<\n NonNullablePaths<\n RawHttpResponse,\n `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ token: token });\n\n const reqOpts =\n ambassadorWixEcomV2Cart.handleAsyncCheckoutCompletion(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { token: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['token']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTBytesToSDKBytes } from '@wix/sdk-runtime/transformations/bytes';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixEcomCartV2CartServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/cart-v2',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/cart-v2',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/cart-v2',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/cart-v2',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/cart-v2',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/cart-v2',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/cart-v2',\n destPath: '',\n },\n ],\n 'apps._base_domain_': [\n {\n srcPath: '/_api/cart-v2',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/cart-v2',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/cart-v2',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/cart-v2',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/cart-v2',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/ecom/v2/carts',\n destPath: '/v2/carts',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/cart-v2',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_ecom_cart-v-2';\n\n/** Creates a Cart. */\nexport function createCart(payload: object): RequestOptionsFactory<any> {\n function __createCart({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'cart.createdDate' },\n { path: 'cart.updatedDate' },\n {\n path: 'cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate',\n },\n { path: 'cart.lineItems.attributes.image.urlExpirationDate' },\n {\n path: 'cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate',\n },\n { path: 'cart.lineItems.attributes.serviceProperties.scheduledDate' },\n {\n path: 'catalogItems.catalogOverrideFields.image.urlExpirationDate',\n },\n { path: 'customItems.attributes.image.urlExpirationDate' },\n {\n path: 'customItems.attributes.subscriptionInfo.subscriptionSettings.startDate',\n },\n { path: 'customItems.attributes.serviceProperties.scheduledDate' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n {\n path: 'cart.lineItems.source.catalogOverrideFields.physicalProperties.weight',\n },\n { path: 'cart.lineItems.attributes.physicalProperties.weight' },\n { path: 'cart.deliveryInfo.address.geocode.latitude' },\n { path: 'cart.deliveryInfo.address.geocode.longitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.latitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.longitude' },\n {\n path: 'catalogItems.catalogOverrideFields.physicalProperties.weight',\n },\n { path: 'customItems.attributes.physicalProperties.weight' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.ecom.v2.cart',\n method: 'POST' as any,\n methodFqn: 'wix.ecom.cart.v2.CartService.CreateCart',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomCartV2CartServiceUrl({\n protoPath: '/v2/carts',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'cart.createdDate' },\n { path: 'cart.updatedDate' },\n {\n path: 'cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate',\n },\n { path: 'cart.lineItems.attributes.image.urlExpirationDate' },\n {\n path: 'cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate',\n },\n {\n path: 'cart.lineItems.attributes.serviceProperties.scheduledDate',\n },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'cart.lineItems.source.catalogOverrideFields.physicalProperties.weight',\n },\n { path: 'cart.lineItems.attributes.physicalProperties.weight' },\n { path: 'cart.deliveryInfo.address.geocode.latitude' },\n { path: 'cart.deliveryInfo.address.geocode.longitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.latitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createCart;\n}\n\n/** Retrieves a Cart. */\nexport function getCart(payload: object): RequestOptionsFactory<any> {\n function __getCart({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.v2.cart',\n method: 'GET' as any,\n methodFqn: 'wix.ecom.cart.v2.CartService.GetCart',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomCartV2CartServiceUrl({\n protoPath: '/v2/carts/{cartId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'cart.createdDate' },\n { path: 'cart.updatedDate' },\n {\n path: 'cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate',\n },\n { path: 'cart.lineItems.attributes.image.urlExpirationDate' },\n {\n path: 'cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate',\n },\n {\n path: 'cart.lineItems.attributes.serviceProperties.scheduledDate',\n },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'cart.lineItems.source.catalogOverrideFields.physicalProperties.weight',\n },\n { path: 'cart.lineItems.attributes.physicalProperties.weight' },\n { path: 'cart.deliveryInfo.address.geocode.latitude' },\n { path: 'cart.deliveryInfo.address.geocode.longitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.latitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getCart;\n}\n\n/**\n * Updates a Cart.\n *\n * Use this endpoint to set and replace fields such as buyer note and delivery method.\n * To add or remove elements from lists (e.g., line items, discounts, gift cards), use their dedicated endpoints.\n */\nexport function updateCart(payload: object): RequestOptionsFactory<any> {\n function __updateCart({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'cart.createdDate' },\n { path: 'cart.updatedDate' },\n {\n path: 'cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate',\n },\n { path: 'cart.lineItems.attributes.image.urlExpirationDate' },\n {\n path: 'cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate',\n },\n { path: 'cart.lineItems.attributes.serviceProperties.scheduledDate' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n {\n path: 'cart.lineItems.source.catalogOverrideFields.physicalProperties.weight',\n },\n { path: 'cart.lineItems.attributes.physicalProperties.weight' },\n { path: 'cart.deliveryInfo.address.geocode.latitude' },\n { path: 'cart.deliveryInfo.address.geocode.longitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.latitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.longitude' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.ecom.v2.cart',\n method: 'PATCH' as any,\n methodFqn: 'wix.ecom.cart.v2.CartService.UpdateCart',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomCartV2CartServiceUrl({\n protoPath: '/v2/carts/{cart.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'cart.createdDate' },\n { path: 'cart.updatedDate' },\n {\n path: 'cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate',\n },\n { path: 'cart.lineItems.attributes.image.urlExpirationDate' },\n {\n path: 'cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate',\n },\n {\n path: 'cart.lineItems.attributes.serviceProperties.scheduledDate',\n },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'cart.lineItems.source.catalogOverrideFields.physicalProperties.weight',\n },\n { path: 'cart.lineItems.attributes.physicalProperties.weight' },\n { path: 'cart.deliveryInfo.address.geocode.latitude' },\n { path: 'cart.deliveryInfo.address.geocode.longitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.latitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateCart;\n}\n\n/** Deletes a Cart. */\nexport function deleteCart(payload: object): RequestOptionsFactory<any> {\n function __deleteCart({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.v2.cart',\n method: 'DELETE' as any,\n methodFqn: 'wix.ecom.cart.v2.CartService.DeleteCart',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomCartV2CartServiceUrl({\n protoPath: '/v2/carts/{cartId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteCart;\n}\n\n/** Re-evaluates prices, inventory and discounts to ensure the Cart is up-to-date with the latest changes. */\nexport function refreshCart(payload: object): RequestOptionsFactory<any> {\n function __refreshCart({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.v2.cart',\n method: 'POST' as any,\n methodFqn: 'wix.ecom.cart.v2.CartService.RefreshCart',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomCartV2CartServiceUrl({\n protoPath: '/v2/carts/{cartId}/refresh',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'cart.createdDate' },\n { path: 'cart.updatedDate' },\n {\n path: 'cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate',\n },\n { path: 'cart.lineItems.attributes.image.urlExpirationDate' },\n {\n path: 'cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate',\n },\n {\n path: 'cart.lineItems.attributes.serviceProperties.scheduledDate',\n },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'cart.lineItems.source.catalogOverrideFields.physicalProperties.weight',\n },\n { path: 'cart.lineItems.attributes.physicalProperties.weight' },\n { path: 'cart.deliveryInfo.address.geocode.latitude' },\n { path: 'cart.deliveryInfo.address.geocode.longitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.latitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __refreshCart;\n}\n\n/**\n * Calculates the cart based on its current state (line items, discounts, delivery method, etc.)\n * and returns a detailed summary including subtotal, delivery costs, taxes, fees and the total price.\n * Note that discounts are already pre-computed and applied to the Cart.\n *\n * This is a read-only operation that does not modify the cart.\n */\nexport function calculateCart(payload: object): RequestOptionsFactory<any> {\n function __calculateCart({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.v2.cart',\n method: 'POST' as any,\n methodFqn: 'wix.ecom.cart.v2.CartService.CalculateCart',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomCartV2CartServiceUrl({\n protoPath: '/v2/carts/{cartId}/calculate',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'cart.createdDate' },\n { path: 'cart.updatedDate' },\n {\n path: 'cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate',\n },\n { path: 'cart.lineItems.attributes.image.urlExpirationDate' },\n {\n path: 'cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate',\n },\n {\n path: 'cart.lineItems.attributes.serviceProperties.scheduledDate',\n },\n {\n path: 'summary.paymentSummary.subscriptionCharges.charges.cycleBillingDate',\n },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'cart.lineItems.source.catalogOverrideFields.physicalProperties.weight',\n },\n { path: 'cart.lineItems.attributes.physicalProperties.weight' },\n { path: 'cart.deliveryInfo.address.geocode.latitude' },\n { path: 'cart.deliveryInfo.address.geocode.longitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.latitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __calculateCart;\n}\n\n/**\n * Retrieves the checkout URL for the Cart.\n *\n * By default, this is the standard Wix checkout page.\n * If `custom_checkout_url` is defined, it overrides the default and is returned as the checkout URL.\n */\nexport function getCheckoutUrl(payload: object): RequestOptionsFactory<any> {\n function __getCheckoutUrl({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.v2.cart',\n method: 'POST' as any,\n methodFqn: 'wix.ecom.cart.v2.CartService.GetCheckoutURL',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomCartV2CartServiceUrl({\n protoPath: '/v2/carts/{cartId}/get-checkout-url',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __getCheckoutUrl;\n}\n\n/**\n * Completes the checkout process and creates an Order.\n * This endpoint may charge the customer.\n *\n * Read more about the [eCommerce Orders API](https://dev.wix.com/api/rest/wix-ecommerce/orders-api/introduction).\n */\nexport function placeOrder(payload: object): RequestOptionsFactory<any> {\n function __placeOrder({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.v2.cart',\n method: 'POST' as any,\n methodFqn: 'wix.ecom.cart.v2.CartService.PlaceOrder',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomCartV2CartServiceUrl({\n protoPath: '/v2/carts/{cartId}/place-order',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __placeOrder;\n}\n\n/** Adds line items to the Cart. */\nexport function addLineItems(payload: object): RequestOptionsFactory<any> {\n function __addLineItems({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n {\n path: 'catalogItems.catalogOverrideFields.physicalProperties.weight',\n },\n { path: 'customItems.attributes.physicalProperties.weight' },\n ],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n {\n path: 'catalogItems.catalogOverrideFields.image.urlExpirationDate',\n },\n { path: 'customItems.attributes.image.urlExpirationDate' },\n {\n path: 'customItems.attributes.subscriptionInfo.subscriptionSettings.startDate',\n },\n { path: 'customItems.attributes.serviceProperties.scheduledDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.ecom.v2.cart',\n method: 'POST' as any,\n methodFqn: 'wix.ecom.cart.v2.CartService.AddLineItems',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomCartV2CartServiceUrl({\n protoPath: '/v2/carts/{cartId}/add-line-items',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'cart.createdDate' },\n { path: 'cart.updatedDate' },\n {\n path: 'cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate',\n },\n { path: 'cart.lineItems.attributes.image.urlExpirationDate' },\n {\n path: 'cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate',\n },\n {\n path: 'cart.lineItems.attributes.serviceProperties.scheduledDate',\n },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'cart.lineItems.source.catalogOverrideFields.physicalProperties.weight',\n },\n { path: 'cart.lineItems.attributes.physicalProperties.weight' },\n { path: 'cart.deliveryInfo.address.geocode.latitude' },\n { path: 'cart.deliveryInfo.address.geocode.longitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.latitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __addLineItems;\n}\n\n/** Removes line items from the Cart. */\nexport function removeLineItems(payload: object): RequestOptionsFactory<any> {\n function __removeLineItems({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.v2.cart',\n method: 'POST' as any,\n methodFqn: 'wix.ecom.cart.v2.CartService.RemoveLineItems',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomCartV2CartServiceUrl({\n protoPath: '/v2/carts/{cartId}/remove-line-items',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'cart.createdDate' },\n { path: 'cart.updatedDate' },\n {\n path: 'cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate',\n },\n { path: 'cart.lineItems.attributes.image.urlExpirationDate' },\n {\n path: 'cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate',\n },\n {\n path: 'cart.lineItems.attributes.serviceProperties.scheduledDate',\n },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'cart.lineItems.source.catalogOverrideFields.physicalProperties.weight',\n },\n { path: 'cart.lineItems.attributes.physicalProperties.weight' },\n { path: 'cart.deliveryInfo.address.geocode.latitude' },\n { path: 'cart.deliveryInfo.address.geocode.longitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.latitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __removeLineItems;\n}\n\n/**\n * Updates line items in the Cart.\n * Use this endpoint to update line items properties such as quantity and selected membership.\n */\nexport function updateLineItems(payload: object): RequestOptionsFactory<any> {\n function __updateLineItems({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.v2.cart',\n method: 'POST' as any,\n methodFqn: 'wix.ecom.cart.v2.CartService.UpdateLineItems',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomCartV2CartServiceUrl({\n protoPath: '/v2/carts/{cartId}/update-line-items',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'cart.createdDate' },\n { path: 'cart.updatedDate' },\n {\n path: 'cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate',\n },\n { path: 'cart.lineItems.attributes.image.urlExpirationDate' },\n {\n path: 'cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate',\n },\n {\n path: 'cart.lineItems.attributes.serviceProperties.scheduledDate',\n },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'cart.lineItems.source.catalogOverrideFields.physicalProperties.weight',\n },\n { path: 'cart.lineItems.attributes.physicalProperties.weight' },\n { path: 'cart.deliveryInfo.address.geocode.latitude' },\n { path: 'cart.deliveryInfo.address.geocode.longitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.latitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateLineItems;\n}\n\n/** Adds a coupon to the Cart. */\nexport function addCoupon(payload: object): RequestOptionsFactory<any> {\n function __addCoupon({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.v2.cart',\n method: 'POST' as any,\n methodFqn: 'wix.ecom.cart.v2.CartService.AddCoupon',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomCartV2CartServiceUrl({\n protoPath: '/v2/carts/{cartId}/add-coupon',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'cart.createdDate' },\n { path: 'cart.updatedDate' },\n {\n path: 'cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate',\n },\n { path: 'cart.lineItems.attributes.image.urlExpirationDate' },\n {\n path: 'cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate',\n },\n {\n path: 'cart.lineItems.attributes.serviceProperties.scheduledDate',\n },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'cart.lineItems.source.catalogOverrideFields.physicalProperties.weight',\n },\n { path: 'cart.lineItems.attributes.physicalProperties.weight' },\n { path: 'cart.deliveryInfo.address.geocode.latitude' },\n { path: 'cart.deliveryInfo.address.geocode.longitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.latitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __addCoupon;\n}\n\n/** Removes a coupon from the Cart. */\nexport function removeCoupon(payload: object): RequestOptionsFactory<any> {\n function __removeCoupon({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.v2.cart',\n method: 'POST' as any,\n methodFqn: 'wix.ecom.cart.v2.CartService.RemoveCoupon',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomCartV2CartServiceUrl({\n protoPath: '/v2/carts/{cartId}/remove-coupon',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'cart.createdDate' },\n { path: 'cart.updatedDate' },\n {\n path: 'cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate',\n },\n { path: 'cart.lineItems.attributes.image.urlExpirationDate' },\n {\n path: 'cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate',\n },\n {\n path: 'cart.lineItems.attributes.serviceProperties.scheduledDate',\n },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'cart.lineItems.source.catalogOverrideFields.physicalProperties.weight',\n },\n { path: 'cart.lineItems.attributes.physicalProperties.weight' },\n { path: 'cart.deliveryInfo.address.geocode.latitude' },\n { path: 'cart.deliveryInfo.address.geocode.longitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.latitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __removeCoupon;\n}\n\n/**\n * Adds a gift card to the Cart.\n * Once added, the gift card’s balance will be used as a payment method during checkout, either partially or fully covering the cart total.\n */\nexport function addGiftCard(payload: object): RequestOptionsFactory<any> {\n function __addGiftCard({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.v2.cart',\n method: 'POST' as any,\n methodFqn: 'wix.ecom.cart.v2.CartService.AddGiftCard',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomCartV2CartServiceUrl({\n protoPath: '/v2/carts/{cartId}/add-gift-card',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'cart.createdDate' },\n { path: 'cart.updatedDate' },\n {\n path: 'cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate',\n },\n { path: 'cart.lineItems.attributes.image.urlExpirationDate' },\n {\n path: 'cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate',\n },\n {\n path: 'cart.lineItems.attributes.serviceProperties.scheduledDate',\n },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'cart.lineItems.source.catalogOverrideFields.physicalProperties.weight',\n },\n { path: 'cart.lineItems.attributes.physicalProperties.weight' },\n { path: 'cart.deliveryInfo.address.geocode.latitude' },\n { path: 'cart.deliveryInfo.address.geocode.longitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.latitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __addGiftCard;\n}\n\n/** Removes a gift card from the Cart. */\nexport function removeGiftCard(payload: object): RequestOptionsFactory<any> {\n function __removeGiftCard({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.v2.cart',\n method: 'POST' as any,\n methodFqn: 'wix.ecom.cart.v2.CartService.RemoveGiftCard',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomCartV2CartServiceUrl({\n protoPath: '/v2/carts/{cartId}/remove-gift-card',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'cart.createdDate' },\n { path: 'cart.updatedDate' },\n {\n path: 'cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate',\n },\n { path: 'cart.lineItems.attributes.image.urlExpirationDate' },\n {\n path: 'cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate',\n },\n {\n path: 'cart.lineItems.attributes.serviceProperties.scheduledDate',\n },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'cart.lineItems.source.catalogOverrideFields.physicalProperties.weight',\n },\n { path: 'cart.lineItems.attributes.physicalProperties.weight' },\n { path: 'cart.deliveryInfo.address.geocode.latitude' },\n { path: 'cart.deliveryInfo.address.geocode.longitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.latitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __removeGiftCard;\n}\n\n/**\n * Marks the cart as completed. This means an order was created from the cart.\n *\n * Sets the `orderPlaced` field to `true`.\n */\nexport function markCartAsCompleted(\n payload: object\n): RequestOptionsFactory<any> {\n function __markCartAsCompleted({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.v2.cart',\n method: 'POST' as any,\n methodFqn: 'wix.ecom.cart.v2.CartService.MarkCartAsCompleted',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomCartV2CartServiceUrl({\n protoPath: '/v2/carts/{cartId}/mark-cart-as-completed',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'cart.createdDate' },\n { path: 'cart.updatedDate' },\n {\n path: 'cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate',\n },\n { path: 'cart.lineItems.attributes.image.urlExpirationDate' },\n {\n path: 'cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate',\n },\n {\n path: 'cart.lineItems.attributes.serviceProperties.scheduledDate',\n },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'cart.lineItems.source.catalogOverrideFields.physicalProperties.weight',\n },\n { path: 'cart.lineItems.attributes.physicalProperties.weight' },\n { path: 'cart.deliveryInfo.address.geocode.latitude' },\n { path: 'cart.deliveryInfo.address.geocode.longitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.latitude' },\n { path: 'cart.paymentInfo.billingAddress.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __markCartAsCompleted;\n}\n\n/**\n * Handles asynchronous checkout completion and redirects to a specified URL.\n *\n * Triggered by Wix Cashier after payment completion, this endpoint finalizes the checkout process and redirects the user to the previously provided success URL.\n * In some cases, this endpoint might be called directly by the external payment provider.\n */\nexport function handleAsyncCheckoutCompletion(\n payload: object\n): RequestOptionsFactory<any> {\n function __handleAsyncCheckoutCompletion({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.v2.cart',\n method: 'POST' as any,\n methodFqn: 'wix.ecom.cart.v2.CartService.HandleAsyncCheckoutCompletion',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomCartV2CartServiceUrl({\n protoPath: '/v2/carts/handle-async-checkout-completion',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTBytesToSDKBytes,\n paths: [{ path: 'body' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __handleAsyncCheckoutCompletion;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAAA;AAAA,EAAA,mBAAAC;AAAA,EAAA,oBAAAC;AAAA,EAAA,qBAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,eAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,qCAAAC;AAAA,EAAA,2BAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,mBAAAC;AAAA,EAAA,oBAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,uBAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,uBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,mBAA6C;AAC7C,IAAAC,gBAA6C;AAC7C,mBAA6C;AAC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,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAhB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,OAAO,OAAO;AAAA,QAC1C,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,OAAO;AAAA,IACV;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["addCoupon","addGiftCard","addLineItems","calculateCart","createCart","deleteCart","getCart","getCheckoutUrl","handleAsyncCheckoutCompletion","markCartAsCompleted","placeOrder","refreshCart","removeCoupon","removeGiftCard","removeLineItems","updateCart","updateLineItems","import_float","import_timestamp","import_rest_modules","payload","import_address","import_image","import_page_url_v2","import_transform_paths","DescriptionLineType","PaymentOptionType","ItemTypeItemType","SubscriptionFrequency","FileType","TaxableAddressType","ItemStatus","ChannelType","VatType","WeightUnit","DiscountSourceType","DiscountScope","RuleType","Severity","NameInOther","NameInLineItem","SuggestedFix","ValidationsConfig","WebhookIdentityType","createCart","sdkTransformError","getCart","updateCart","deleteCart","refreshCart","calculateCart","getCheckoutUrl","placeOrder","addLineItems","removeLineItems","updateLineItems","addCoupon","removeCoupon","addGiftCard","removeGiftCard","markCartAsCompleted","handleAsyncCheckoutCompletion"]}
|