{"version":3,"sources":["jsdelivr-header.js","/npm/@wix/auto_sdk_ecom_checkout-bundle@1.0.1/index.ts","/npm/@wix/auto_sdk_ecom_checkout-bundle@1.0.1/src/ecom-v1-checkout-checkout.public.ts","/npm/@wix/auto_sdk_ecom_checkout-bundle@1.0.1/src/ecom-v1-checkout-checkout.universal.ts","/npm/@wix/auto_sdk_ecom_checkout-bundle@1.0.1/src/ecom-v1-checkout-checkout.http.ts","/npm/@wix/auto_sdk_ecom_checkout-bundle@1.0.1/src/ecom-v1-checkout-checkout.context.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,8iBCNA,cAAA,GAAA,SAAA,cAAA,CAAA,oBAAA,IAAA,oBAAA,uBAAA,IAAA,uBAAA,YAAA,IAAA,YAAA,WAAA,IAAA,WAAA,cAAA,IAAA,cAAA,oBAAA,IAAA,oBAAA,qBAAA,IAAA,qBAAA,aAAA,IAAA,aAAA,eAAA,IAAA,eAAA,SAAA,IAAA,SAAA,gDAAA,IAAA,gDAAA,aAAA,IAAA,aAAA,uBAAA,IAAA,uBAAA,iBAAA,IAAA,iBAAA,iBAAA,IAAA,iBAAA,aAAA,IAAA,aAAA,wBAAA,IAAA,wBAAA,cAAA,IAAA,cAAA,eAAA,IAAA,eAAA,YAAA,IAAA,YAAA,kBAAA,IAAA,kBAAA,aAAA,IAAA,aAAA,SAAA,IAAA,SAAA,SAAA,IAAA,SAAA,SAAA,IAAA,SAAA,sBAAA,IAAA,sBAAA,aAAA,IAAA,aAAA,mBAAA,IAAA,mBAAA,QAAA,IAAA,QAAA,oBAAA,IAAA,oBAAA,WAAA,IAAA,WAAA,cAAA,IAAA,eAAA,eAAA,IAAA,gBAAA,YAAA,IAAA,aAAA,qBAAA,IAAA,sBAAA,YAAA,IAAA,aAAA,oBAAA,IAAA,qBAAA,2BAAA,IAAA,4BAAA,eAAA,IAAA,gBAAA,kBAAA,IAAA,mBAAA,wBAAA,IAAA,yBAAA,oBAAA,IAAA,qBAAA,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,EAAA,qBAAA,kBAAiB,0BACtB,0BAGK,EAAA,qBAAA,kBAAiB,0BAEtB,6BAGK,EAAA,qBAAA,kBAAiB,6BAKtB,wBAET,gCAAA,mBAAkB,qBAIT,sBAET,gCAAA,mBAAkB,mBAIT,sBAET,gCAAA,mBAAkB","file":"/npm/@wix/auto_sdk_ecom_checkout-bundle@1.0.1/build/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@wix/auto_sdk_ecom_checkout-bundle@1.0.1/build/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","export * from './src/ecom-v1-checkout-checkout.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTAddressToSDKAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTImageToSDKImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformRESTPageURLV2ToSDKPageURLV2 } from '@wix/sdk-runtime/transformations/page-url-v2';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient } from '@wix/sdk-types';\nimport {\n  AddToCheckoutOptions,\n  AddToCheckoutResponse,\n  AddToCheckoutResponseNonNullableFields,\n  Checkout,\n  CheckoutCompletedEnvelope,\n  CheckoutCreatedEnvelope,\n  CheckoutNonNullableFields,\n  CheckoutUpdatedEnvelope,\n  CreateCheckoutOptions,\n  CreateOrderAndChargeOptions,\n  CreateOrderAndChargeResponse,\n  CreateOrderAndChargeResponseNonNullableFields,\n  CreateOrderOptions,\n  CreateOrderResponse,\n  CreateOrderResponseNonNullableFields,\n  GetCheckoutByCartIdResponse,\n  GetCheckoutByCartIdResponseNonNullableFields,\n  GetCheckoutPaymentSettingsResponse,\n  GetCheckoutPaymentSettingsResponseNonNullableFields,\n  GetCheckoutURLResponse,\n  GetCheckoutURLResponseNonNullableFields,\n  GetWixCheckoutURLResponse,\n  GetWixCheckoutURLResponseNonNullableFields,\n  LineItemQuantityUpdate,\n  RemoveCouponResponse,\n  RemoveCouponResponseNonNullableFields,\n  RemoveGiftCardResponse,\n  RemoveGiftCardResponseNonNullableFields,\n  RemoveLineItemsResponse,\n  RemoveLineItemsResponseNonNullableFields,\n  RemoveOverrideCheckoutUrlResponse,\n  RemoveOverrideCheckoutUrlResponseNonNullableFields,\n  UpdateCheckout,\n  UpdateCheckoutOptions,\n  UpdateLineItemsQuantityResponse,\n  UpdateLineItemsQuantityResponseNonNullableFields,\n  addToCheckout as universalAddToCheckout,\n  createCheckout as universalCreateCheckout,\n  createOrder as universalCreateOrder,\n  createOrderAndCharge as universalCreateOrderAndCharge,\n  getCheckout as universalGetCheckout,\n  getCheckoutByCartId as universalGetCheckoutByCartId,\n  getCheckoutPaymentSettings as universalGetCheckoutPaymentSettings,\n  getCheckoutUrl as universalGetCheckoutUrl,\n  getWixCheckoutUrl as universalGetWixCheckoutUrl,\n  markCheckoutAsCompleted as universalMarkCheckoutAsCompleted,\n  removeCoupon as universalRemoveCoupon,\n  removeGiftCard as universalRemoveGiftCard,\n  removeLineItems as universalRemoveLineItems,\n  removeOverrideCheckoutUrl as universalRemoveOverrideCheckoutUrl,\n  updateCheckout as universalUpdateCheckout,\n  updateLineItemsQuantity as universalUpdateLineItemsQuantity,\n} from './ecom-v1-checkout-checkout.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/ecom' };\n\nexport function createCheckout(\n  httpClient: HttpClient\n): CreateCheckoutSignature {\n  return (options?: CreateCheckoutOptions) =>\n    universalCreateCheckout(\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface CreateCheckoutSignature {\n  /**\n   * Creates a checkout.\n   *\n   *\n   * The `createCheckout()` function returns a Promise that resolves to the new checkout when it's created.\n   *\n   * > **Notes:**\n   * > + Checkout must include at least 1 item in the `options.lineItems` array.\n   * > + `options.channelType` is required.\n   * > + If `_id` for `options.lineItems` is added, make sure that each `_id` is unique.\n   * > + If `options.checkoutInfo.customFields` are added, then `options.checkoutInfo.customFields.value` is required.\n   * @param - Checkout creation options.\n   * @returns Fulfilled - the newly created checkout.\n   */\n  (options?: CreateCheckoutOptions | undefined): Promise<\n    Checkout & CheckoutNonNullableFields\n  >;\n}\n\nexport function getCheckout(httpClient: HttpClient): GetCheckoutSignature {\n  return (_id: string) =>\n    universalGetCheckout(\n      _id,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface GetCheckoutSignature {\n  /**\n   * Retrieves a checkout.\n   *\n   *\n   * The `getCheckout()` function returns a Promise that resolves when the specified checkout is retrieved.\n   * @param - Checkout ID.\n   * @returns Fulfilled - the requested checkout.\n   */\n  (_id: string): Promise<Checkout & CheckoutNonNullableFields>;\n}\n\nexport function getCheckoutByCartId(\n  httpClient: HttpClient\n): GetCheckoutByCartIdSignature {\n  return (_id: string) =>\n    universalGetCheckoutByCartId(\n      _id,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface GetCheckoutByCartIdSignature {\n  /**\n   * Retrieves the checkout associated with a specified cart.\n   * @param - Cart ID.\n   */\n  (_id: string): Promise<\n    GetCheckoutByCartIdResponse & GetCheckoutByCartIdResponseNonNullableFields\n  >;\n}\n\n/** @internal */\nexport function getWixCheckoutUrl(\n  httpClient: HttpClient\n): GetWixCheckoutUrlSignature {\n  return (_id: string) =>\n    universalGetWixCheckoutUrl(\n      _id,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface GetWixCheckoutUrlSignature {\n  /**\n   * Deprecated and will be removed soon, use GetCheckoutURL\n   * @param - Checkout ID.\n   */\n  (_id: string): Promise<\n    GetWixCheckoutURLResponse & GetWixCheckoutURLResponseNonNullableFields\n  >;\n}\n\nexport function getCheckoutUrl(\n  httpClient: HttpClient\n): GetCheckoutUrlSignature {\n  return (_id: string) =>\n    universalGetCheckoutUrl(\n      _id,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface GetCheckoutUrlSignature {\n  /**\n   * Retrieves the checkout page URL of a specified checkout.\n   *\n   * By default, a `checkoutUrl` generates for a checkout and directs to a standard Wix checkout page.\n   * However, if `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.\n   * @param - Checkout ID.\n   */\n  (_id: string): Promise<\n    GetCheckoutURLResponse & GetCheckoutURLResponseNonNullableFields\n  >;\n}\n\nexport function updateCheckout(\n  httpClient: HttpClient\n): UpdateCheckoutSignature {\n  return (\n    _id: string | null,\n    checkout: UpdateCheckout,\n    options?: UpdateCheckoutOptions\n  ) =>\n    universalUpdateCheckout(\n      _id,\n      checkout,\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface UpdateCheckoutSignature {\n  /**\n   * Updates a checkout.\n   *\n   *\n   * The `updateCheckout()` function returns a Promise that resolves to the updated checkout when the specified properties are updated.\n   *\n   * >**Notes:**\n   * > + If nothing is passed in the request, the call will fail.\n   * > + The `checkout.buyerInfo.email` may not be removed once it is set.\n   * @param - Checkout ID.\n   * @param - Checkout update options.\n   * @returns Updated checkout.\n   */\n  (\n    _id: string | null,\n    checkout: UpdateCheckout,\n    options?: UpdateCheckoutOptions | undefined\n  ): Promise<Checkout & CheckoutNonNullableFields>;\n}\n\nexport function removeCoupon(httpClient: HttpClient): RemoveCouponSignature {\n  return (_id: string) =>\n    universalRemoveCoupon(\n      _id,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface RemoveCouponSignature {\n  /**\n   * Removes the coupon from a specified checkout.\n   *\n   *\n   * The `removeCoupon()` function returns a Promise that resolves to the updated checkout when the coupon is removed from the specified checkout.\n   *\n   * >**Note:** A checkout can only hold 1 coupon.\n   * @param - ID of the checkout to remove the coupon from.\n   */\n  (_id: string): Promise<\n    RemoveCouponResponse & RemoveCouponResponseNonNullableFields\n  >;\n}\n\nexport function removeGiftCard(\n  httpClient: HttpClient\n): RemoveGiftCardSignature {\n  return (_id: string) =>\n    universalRemoveGiftCard(\n      _id,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface RemoveGiftCardSignature {\n  /**\n   * Removes the gift card from a specified checkout.\n   *\n   *\n   * The `removeGiftCard()` function returns a Promise that resolves to the updated checkout when the gift card is removed from the specified checkout.\n   *\n   * >**Note:** A checkout can only hold 1 gift card.\n   * @param - ID of the checkout to remove the gift card from.\n   */\n  (_id: string): Promise<\n    RemoveGiftCardResponse & RemoveGiftCardResponseNonNullableFields\n  >;\n}\n\nexport function removeOverrideCheckoutUrl(\n  httpClient: HttpClient\n): RemoveOverrideCheckoutUrlSignature {\n  return (_id: string) =>\n    universalRemoveOverrideCheckoutUrl(\n      _id,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface RemoveOverrideCheckoutUrlSignature {\n  /**\n   * Removes the `overrideCheckoutUrl` from a specified checkout.\n   *\n   * When `overrideCheckoutUrl` is removed, the `checkoutUrl` will be set to the default, standard\n   * Wix checkout page URL.\n   * @param - ID of the checkout to remove the override checkout url from.\n   */\n  (_id: string): Promise<\n    RemoveOverrideCheckoutUrlResponse &\n      RemoveOverrideCheckoutUrlResponseNonNullableFields\n  >;\n}\n\nexport function addToCheckout(httpClient: HttpClient): AddToCheckoutSignature {\n  return (_id: string, options?: AddToCheckoutOptions) =>\n    universalAddToCheckout(\n      _id,\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface AddToCheckoutSignature {\n  /**\n   * Adds catalog line items and/or custom line items to a checkout.\n   *\n   *\n   * The `addToCheckout()` function returns a Promise that resolves to the updated checkout when the specified items have been added.\n   * > **Note:** When adding catalog items, `options.lineItems.catalogReference` is required.\n   * @param - Checkout ID.\n   * @param - Items to be added to checkout.\n   */\n  (_id: string, options?: AddToCheckoutOptions | undefined): Promise<\n    AddToCheckoutResponse & AddToCheckoutResponseNonNullableFields\n  >;\n}\n\nexport function removeLineItems(\n  httpClient: HttpClient\n): RemoveLineItemsSignature {\n  return (_id: string, lineItemIds: string[]) =>\n    universalRemoveLineItems(\n      _id,\n      lineItemIds,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface RemoveLineItemsSignature {\n  /**\n   * Removes line items from the specified checkout.\n   *\n   *\n   * The `removeLineItems()` function returns a Promise that resolves to the updated checkout when the line items are removed from the specified checkout.\n   * @param - ID of the checkout to remove line items from.\n   * @param - IDs of the line items to be removed.\n   * To find the IDs of the checkout line items you'd like to remove, pass the `checkout._id` to [getCheckout()](https://www.wix.com/velo/reference/wix-ecom-backend/checkout/getcheckout) and look for the IDs under `lineItems` and/or `customLineItems`.\n   */\n  (_id: string, lineItemIds: string[]): Promise<\n    RemoveLineItemsResponse & RemoveLineItemsResponseNonNullableFields\n  >;\n}\n\nexport function createOrder(httpClient: HttpClient): CreateOrderSignature {\n  return (_id: string, options?: CreateOrderOptions) =>\n    universalCreateOrder(\n      _id,\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface CreateOrderSignature {\n  /**\n   * Creates an order from a specified checkout.\n   *\n   * The `createOrder()` function returns a Promise that resolves to the new order's ID and `paymentGatewayOrderID` when the order is created.\n   * Pass the `paymentGatewayOrderId` as the `paymentId` param to the [`startPayment()`](https://www.wix.com/velo/reference/wix-pay-frontend/startpayment) function to allow a customer to pay for their order.\n   *\n   * > **Note:** The following requirements must be met for an order to be created from a checkout.\n   * > + A checkout cannot have calculation errors. Pass the `checkout._id` to [Get Checkout](https://www.wix.com/velo/reference/wix-ecom-backend/checkout/getcheckout) and take a look at the `calculationErrors` field.\n   * > + A checkout must have at least 1 line item.\n   * > + All of the line Items have an `availability.status` of `\"AVAILABLE\"` or `\"PARTIALLY_AVAILABLE\"`.\n   * > + If there is a payment to be made, meaning that `priceSummary.total` is greater than 0, the `billingInfo.address` field must be provided.\n   * > + When a checkout has line items to be shipped, the `shippingInfo.shippingDestination.address` and `shippingInfo.selectedCarrierServiceOption` fields must be provided.\n   * > + When a checkout has line items for pickup, the `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails` field must be provided.\n   * @param - Checkout ID.\n   * @param - Further order creation options.\n   */\n  (_id: string, options?: CreateOrderOptions | undefined): Promise<\n    CreateOrderResponse & CreateOrderResponseNonNullableFields\n  >;\n}\n\n/** @internal */\nexport function createOrderAndCharge(\n  httpClient: HttpClient\n): CreateOrderAndChargeSignature {\n  return (_id: string, options?: CreateOrderAndChargeOptions) =>\n    universalCreateOrderAndCharge(\n      _id,\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface CreateOrderAndChargeSignature {\n  /**\n   * Deprecated (use createOrder instead)\n   * @param - Checkout ID.\n   */\n  (_id: string, options?: CreateOrderAndChargeOptions | undefined): Promise<\n    CreateOrderAndChargeResponse & CreateOrderAndChargeResponseNonNullableFields\n  >;\n}\n\nexport function markCheckoutAsCompleted(\n  httpClient: HttpClient\n): MarkCheckoutAsCompletedSignature {\n  return (_id: string) =>\n    universalMarkCheckoutAsCompleted(\n      _id,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface MarkCheckoutAsCompletedSignature {\n  /**\n   * Marks a checkout as completed - `checkout.complete` boolean is set to `true`.\n   *\n   *\n   * The `markCheckoutAsCompleted()` function returns a Promise that resolves when the specified checkout is marked as completed.\n   * @param - Checkout ID.\n   */\n  (_id: string): Promise<void>;\n}\n\nexport function updateLineItemsQuantity(\n  httpClient: HttpClient\n): UpdateLineItemsQuantitySignature {\n  return (_id: string, lineItems: LineItemQuantityUpdate[]) =>\n    universalUpdateLineItemsQuantity(\n      _id,\n      lineItems,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface UpdateLineItemsQuantitySignature {\n  /**\n   * Updates the quantity of one or more line items in a checkout.\n   *\n   * This endpoint is only for updating the quantity of line items. To entirely remove a line item from\n   * the checkout, use [`removeLineItems()`](#removelineitems).\n   * To add a new line item to the checkout, use [`addToCheckout()`](#addtocheckout).\n   *\n   * This endpoint checks the amount of stock remaining for this line item. If the specified `quantity`\n   * is greater than the remaining stock, then the `quantity` returned in the response is the total amount\n   * of remaining stock.\n   * @param - Checkout ID.\n   * @param - Line item info to update.\n   */\n  (_id: string, lineItems: LineItemQuantityUpdate[]): Promise<\n    UpdateLineItemsQuantityResponse &\n      UpdateLineItemsQuantityResponseNonNullableFields\n  >;\n}\n\n/** @internal */\nexport function getCheckoutPaymentSettings(\n  httpClient: HttpClient\n): GetCheckoutPaymentSettingsSignature {\n  return (_id: string) =>\n    universalGetCheckoutPaymentSettings(\n      _id,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface GetCheckoutPaymentSettingsSignature {\n  /** @param - Checkout ID. */\n  (_id: string): Promise<\n    GetCheckoutPaymentSettingsResponse &\n      GetCheckoutPaymentSettingsResponseNonNullableFields\n  >;\n}\n\nexport const onCheckoutCompleted = EventDefinition(\n  'wix.ecom.v1.checkout_completed',\n  true,\n  (event: CheckoutCompletedEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [\n            { path: 'data.checkout.createdDate' },\n            { path: 'data.checkout.updatedDate' },\n            {\n              path: 'data.checkout.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate',\n            },\n            { path: 'data.checkout.lineItems.serviceProperties.scheduledDate' },\n            {\n              path: 'data.checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.from',\n            },\n            {\n              path: 'data.checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.to',\n            },\n            {\n              path: 'data.checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.from',\n            },\n            {\n              path: 'data.checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.to',\n            },\n            {\n              path: 'data.checkout.membershipOptions.eligibleMemberships.expirationDate',\n            },\n            {\n              path: 'data.checkout.membershipOptions.invalidMemberships.membership.expirationDate',\n            },\n            {\n              path: 'data.checkout.subscriptionCharges.charges.cycleBillingDate',\n            },\n            { path: 'metadata.eventTime' },\n          ],\n        },\n        {\n          transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n          paths: [{ path: 'data.checkout.lineItems.url' }],\n        },\n        {\n          transformFn: transformRESTImageToSDKImage,\n          paths: [\n            { path: 'data.checkout.lineItems.media' },\n            { path: 'data.checkout.lineItems.catalogOverrideFields.image' },\n          ],\n        },\n        {\n          transformFn: transformRESTFloatToSDKFloat,\n          paths: [\n            { path: 'data.checkout.lineItems.physicalProperties.weight' },\n            {\n              path: 'data.checkout.lineItems.catalogOverrideFields.physicalProperties.weight',\n            },\n            {\n              path: 'data.checkout.appliedDiscounts.merchantDiscount.percentage',\n            },\n          ],\n        },\n        {\n          transformFn: transformRESTAddressToSDKAddress,\n          paths: [\n            { path: 'data.checkout.billingInfo.address' },\n            { path: 'data.checkout.shippingInfo.shippingDestination.address' },\n            {\n              path: 'data.checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address',\n            },\n            {\n              path: 'data.checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address',\n            },\n          ],\n        },\n      ])\n    )\n)<CheckoutCompletedEnvelope>();\nexport const onCheckoutCreated = EventDefinition(\n  'wix.ecom.v1.checkout_created',\n  true,\n  (event: CheckoutCreatedEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [\n            { path: 'entity.createdDate' },\n            { path: 'entity.updatedDate' },\n            {\n              path: 'entity.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate',\n            },\n            { path: 'entity.lineItems.serviceProperties.scheduledDate' },\n            {\n              path: 'entity.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.from',\n            },\n            {\n              path: 'entity.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.to',\n            },\n            {\n              path: 'entity.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.from',\n            },\n            {\n              path: 'entity.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.to',\n            },\n            {\n              path: 'entity.membershipOptions.eligibleMemberships.expirationDate',\n            },\n            {\n              path: 'entity.membershipOptions.invalidMemberships.membership.expirationDate',\n            },\n            { path: 'entity.subscriptionCharges.charges.cycleBillingDate' },\n            { path: 'metadata.eventTime' },\n          ],\n        },\n        {\n          transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n          paths: [{ path: 'entity.lineItems.url' }],\n        },\n        {\n          transformFn: transformRESTImageToSDKImage,\n          paths: [\n            { path: 'entity.lineItems.media' },\n            { path: 'entity.lineItems.catalogOverrideFields.image' },\n          ],\n        },\n        {\n          transformFn: transformRESTFloatToSDKFloat,\n          paths: [\n            { path: 'entity.lineItems.physicalProperties.weight' },\n            {\n              path: 'entity.lineItems.catalogOverrideFields.physicalProperties.weight',\n            },\n            { path: 'entity.appliedDiscounts.merchantDiscount.percentage' },\n          ],\n        },\n        {\n          transformFn: transformRESTAddressToSDKAddress,\n          paths: [\n            { path: 'entity.billingInfo.address' },\n            { path: 'entity.shippingInfo.shippingDestination.address' },\n            {\n              path: 'entity.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address',\n            },\n            {\n              path: 'entity.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address',\n            },\n          ],\n        },\n      ])\n    )\n)<CheckoutCreatedEnvelope>();\nexport const onCheckoutUpdated = EventDefinition(\n  'wix.ecom.v1.checkout_updated',\n  true,\n  (event: CheckoutUpdatedEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [\n            { path: 'entity.createdDate' },\n            { path: 'entity.updatedDate' },\n            {\n              path: 'entity.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate',\n            },\n            { path: 'entity.lineItems.serviceProperties.scheduledDate' },\n            {\n              path: 'entity.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.from',\n            },\n            {\n              path: 'entity.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.to',\n            },\n            {\n              path: 'entity.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.from',\n            },\n            {\n              path: 'entity.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.to',\n            },\n            {\n              path: 'entity.membershipOptions.eligibleMemberships.expirationDate',\n            },\n            {\n              path: 'entity.membershipOptions.invalidMemberships.membership.expirationDate',\n            },\n            { path: 'entity.subscriptionCharges.charges.cycleBillingDate' },\n            { path: 'metadata.eventTime' },\n          ],\n        },\n        {\n          transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n          paths: [{ path: 'entity.lineItems.url' }],\n        },\n        {\n          transformFn: transformRESTImageToSDKImage,\n          paths: [\n            { path: 'entity.lineItems.media' },\n            { path: 'entity.lineItems.catalogOverrideFields.image' },\n          ],\n        },\n        {\n          transformFn: transformRESTFloatToSDKFloat,\n          paths: [\n            { path: 'entity.lineItems.physicalProperties.weight' },\n            {\n              path: 'entity.lineItems.catalogOverrideFields.physicalProperties.weight',\n            },\n            { path: 'entity.appliedDiscounts.merchantDiscount.percentage' },\n          ],\n        },\n        {\n          transformFn: transformRESTAddressToSDKAddress,\n          paths: [\n            { path: 'entity.billingInfo.address' },\n            { path: 'entity.shippingInfo.shippingDestination.address' },\n            {\n              path: 'entity.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address',\n            },\n            {\n              path: 'entity.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address',\n            },\n          ],\n        },\n      ])\n    )\n)<CheckoutUpdatedEnvelope>();\n\nexport {\n  ActionEvent,\n  AddToCheckoutOptions,\n  AddToCheckoutRequest,\n  AddToCheckoutResponse,\n  AddToCheckoutResponseNonNullableFields,\n  AdditionalFee,\n  AdditionalFeeSource,\n  Address,\n  AddressAddressLine1OptionsOneOf,\n  AddressLocation,\n  AddressWithContact,\n  AggregatedTaxBreakdown,\n  ApiAddress,\n  ApplicableLineItems,\n  ApplicationError,\n  AppliedCoupon,\n  AppliedDiscount,\n  AppliedDiscountDiscountSourceOneOf,\n  AutoTaxFallbackCalculationDetails,\n  BaseEventMetadata,\n  BillingInfo,\n  BuyerInfo,\n  BuyerInfoIdOneOf,\n  CalculationErrors,\n  CalculationErrorsShippingCalculationErrorOneOf,\n  Carrier,\n  CarrierError,\n  CarrierErrors,\n  CarrierServiceOption,\n  CatalogOverrideFields,\n  CatalogReference,\n  ChannelInfo,\n  ChannelInfoChannelType,\n  ChannelType,\n  Charge,\n  ChargeDetails,\n  ChargeType,\n  Checkout,\n  CheckoutCompletedEnvelope,\n  CheckoutCreatedEnvelope,\n  CheckoutMarkedAsCompleted,\n  CheckoutNonNullableFields,\n  CheckoutUpdatedEnvelope,\n  Color,\n  CommonVatId,\n  CommonVatType,\n  ConversionInfo,\n  Coupon,\n  CreateCheckoutOptions,\n  CreateCheckoutRequest,\n  CreateCheckoutResponse,\n  CreateCheckoutResponseNonNullableFields,\n  CreateOrderAndChargeOptions,\n  CreateOrderAndChargeRequest,\n  CreateOrderAndChargeResponse,\n  CreateOrderAndChargeResponseIdOneOf,\n  CreateOrderAndChargeResponseNonNullableFields,\n  CreateOrderOptions,\n  CreateOrderRequest,\n  CreateOrderResponse,\n  CreateOrderResponseIdOneOf,\n  CreateOrderResponseNonNullableFields,\n  CreatedBy,\n  CreatedByIdOneOf,\n  CustomContentReference,\n  CustomField,\n  CustomLineItem,\n  CustomSettings,\n  CustomTextFieldSelection,\n  DeleteCheckoutRequest,\n  DeleteCheckoutResponse,\n  DeliveryAllocation,\n  DeliveryLogistics,\n  DeliveryTimeSlot,\n  Description,\n  DescriptionLine,\n  DescriptionLineDescriptionLineValueOneOf,\n  DescriptionLineName,\n  DescriptionLineType,\n  DescriptionLineValueOneOf,\n  Details,\n  DetailsKindOneOf,\n  Discount,\n  DiscountDiscountType,\n  DiscountRule,\n  DiscountRuleName,\n  DiscountType,\n  DomainEvent,\n  DomainEventBodyOneOf,\n  DoublePaymentErrorData,\n  DoublePaymentErrorDataIdOneOf,\n  Empty,\n  EntityCreatedEvent,\n  EntityDeletedEvent,\n  EntityUpdatedEvent,\n  EventMetadata,\n  ExtendedFields,\n  ExternalReference,\n  FallbackReason,\n  FieldViolation,\n  FileType,\n  FocalPoint,\n  FreeTrialPeriod,\n  FullAddressContactDetails,\n  FullName,\n  GetCheckoutByCartIdRequest,\n  GetCheckoutByCartIdResponse,\n  GetCheckoutByCartIdResponseNonNullableFields,\n  GetCheckoutPaymentSettingsRequest,\n  GetCheckoutPaymentSettingsResponse,\n  GetCheckoutPaymentSettingsResponseNonNullableFields,\n  GetCheckoutPaymentSettingsResponsePaymentOption,\n  GetCheckoutRequest,\n  GetCheckoutResponse,\n  GetCheckoutResponseNonNullableFields,\n  GetCheckoutURLRequest,\n  GetCheckoutURLResponse,\n  GetCheckoutURLResponseNonNullableFields,\n  GetCheckoutWithAllExtendedFieldsRequest,\n  GetCheckoutWithAllExtendedFieldsResponse,\n  GetWixCheckoutURLRequest,\n  GetWixCheckoutURLResponse,\n  GetWixCheckoutURLResponseNonNullableFields,\n  GiftCard,\n  Group,\n  IdentificationData,\n  IdentificationDataIdOneOf,\n  IdentityType,\n  InvalidMembership,\n  ItemAvailabilityInfo,\n  ItemAvailabilityStatus,\n  ItemTaxFullDetails,\n  ItemType,\n  ItemTypeItemType,\n  ItemTypeItemTypeDataOneOf,\n  JurisdictionType,\n  LineItem,\n  LineItemDiscount,\n  LineItemQuantityUpdate,\n  LineItemType,\n  ManualCalculationReason,\n  MarkCheckoutAsCompletedRequest,\n  MarkCheckoutAsCompletedResponse,\n  MediaItem,\n  MediaItemType,\n  Membership,\n  MembershipName,\n  MembershipOptions,\n  MembershipPaymentCredits,\n  MerchantDiscount,\n  MerchantDiscountInput,\n  MessageEnvelope,\n  MultiCurrencyPrice,\n  NameInLineItem,\n  NameInOther,\n  OptionSelection,\n  Other,\n  OtherCharge,\n  PaymentErrorResponseData,\n  PaymentOption,\n  PaymentOptionType,\n  PhysicalProperties,\n  PickupAddress,\n  PickupDetails,\n  PickupMethod,\n  PlainTextValue,\n  Policy,\n  PriceDescription,\n  PriceSummary,\n  ProductDetails,\n  ProductName,\n  RateType,\n  RedeemErrorData,\n  Region,\n  RemoveCouponRequest,\n  RemoveCouponResponse,\n  RemoveCouponResponseNonNullableFields,\n  RemoveGiftCardRequest,\n  RemoveGiftCardResponse,\n  RemoveGiftCardResponseNonNullableFields,\n  RemoveLineItemsRequest,\n  RemoveLineItemsResponse,\n  RemoveLineItemsResponseNonNullableFields,\n  RemoveOverrideCheckoutUrlRequest,\n  RemoveOverrideCheckoutUrlResponse,\n  RemoveOverrideCheckoutUrlResponseNonNullableFields,\n  RestoreInfo,\n  RuleType,\n  Scope,\n  SecuredMedia,\n  SelectedCarrierServiceOption,\n  SelectedCarrierServiceOptionOtherCharge,\n  SelectedCarrierServiceOptionPrices,\n  SelectedMembership,\n  SelectedMemberships,\n  ServiceProperties,\n  Severity,\n  ShipmentDetails,\n  ShippingCalculationErrorData,\n  ShippingCalculationErrorDataShippingCalculationErrorOneOf,\n  ShippingInfo,\n  ShippingOption,\n  ShippingPrice,\n  ShippingRegion,\n  StoreSettings,\n  Street,\n  StreetAddress,\n  Subscription,\n  SubscriptionCharges,\n  SubscriptionCreated,\n  SubscriptionFrequency,\n  SubscriptionOptionInfo,\n  SubscriptionSettings,\n  SuggestedFix,\n  SystemError,\n  Target,\n  TargetLineItem,\n  TargetTargetTypeOneOf,\n  TaxBreakdown,\n  TaxCalculationDetails,\n  TaxCalculationDetailsCalculationDetailsOneOf,\n  TaxRateBreakdown,\n  TaxSummary,\n  TaxableAddress,\n  TaxableAddressTaxableAddressDataOneOf,\n  TaxableAddressType,\n  Title,\n  Totals,\n  UpdateCheckout,\n  UpdateCheckoutOptions,\n  UpdateCheckoutRequest,\n  UpdateCheckoutResponse,\n  UpdateCheckoutResponseNonNullableFields,\n  UpdateLineItemsQuantityRequest,\n  UpdateLineItemsQuantityResponse,\n  UpdateLineItemsQuantityResponseNonNullableFields,\n  UpdatedCheckoutMessage,\n  V1BuyerInfo,\n  V1CustomField,\n  V1LineItem,\n  V1PickupDetails,\n  V1ShippingInfo,\n  V1ShippingInfoDetailsOneOf,\n  V1SubscriptionOptionInfo,\n  V1SubscriptionSettings,\n  ValidationError,\n  VatId,\n  VatType,\n  Violation,\n  ViolationsList,\n  WebhookIdentityType,\n  WeightUnit,\n} from './ecom-v1-checkout-checkout.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 } from '@wix/sdk-types';\nimport * as ambassadorWixEcomV1Checkout from './ecom-v1-checkout-checkout.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 Checkout {\n  /**\n   * Checkout ID.\n   * @readonly\n   */\n  _id?: string | null;\n  /**\n   * Line items.\n   *\n   * Max: 300 items\n   * @readonly\n   */\n  lineItems?: LineItem[];\n  /** Billing information. */\n  billingInfo?: AddressWithContact;\n  /** Shipping information. */\n  shippingInfo?: ShippingInfo;\n  /** [Buyer note](https://support.wix.com/en/article/wix-stores-viewing-buyer-notes) left by the customer. */\n  buyerNote?: string | null;\n  /** Buyer information. */\n  buyerInfo?: BuyerInfo;\n  /**\n   * All converted prices are displayed in this currency in three-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.\n   * @readonly\n   */\n  conversionCurrency?: string;\n  /**\n   * Calculated price summary for the checkout.\n   * @readonly\n   */\n  priceSummary?: PriceSummary;\n  /**\n   * Errors when calculating totals.\n   * @readonly\n   */\n  calculationErrors?: CalculationErrors;\n  /**\n   * Applied gift card details.\n   *\n   * >**Note:** Gift cards are supported through the Wix UI, though the service plugin is not currently available. Learn more about [Wix Gift Cards](https://support.wix.com/en/article/wix-stores-setting-up-wix-gift-cards).\n   * @readonly\n   */\n  giftCard?: GiftCard;\n  /**\n   * Applied discounts.\n   * @readonly\n   */\n  appliedDiscounts?: AppliedDiscount[];\n  /** Custom fields. */\n  customFields?: CustomField[];\n  /**\n   * Weight measurement unit - defaults to site's weight unit.\n   * @readonly\n   */\n  weightUnit?: WeightUnit;\n  /**\n   * Tax summary.\n   * @readonly\n   */\n  taxSummary?: TaxSummary;\n  /**\n   * The currency used when submitting the order.\n   * @readonly\n   */\n  currency?: string;\n  /**\n   * Sales channel that submitted the order.\n   * @readonly\n   */\n  channelType?: ChannelType;\n  /**\n   * Site language in which original values are shown.\n   * @readonly\n   */\n  siteLanguage?: string;\n  /**\n   * Language for communication with the buyer. Defaults to the site language.\n   * For a site that supports multiple languages, this is the language the buyer selected.\n   * @readonly\n   */\n  buyerLanguage?: string;\n  /**\n   * Whether an order was successfully created from this checkout.\n   * For an order to be successful, it must be successfully paid for (unless the total is 0).\n   * @readonly\n   */\n  completed?: boolean;\n  /**\n   * Whether tax is included in line item prices.\n   * @readonly\n   */\n  taxIncludedInPrice?: boolean;\n  /**\n   * ID of the checkout's initiator.\n   * @readonly\n   */\n  createdBy?: CreatedBy;\n  /**\n   * Date and time the checkout was created.\n   * @readonly\n   */\n  _createdDate?: Date | null;\n  /**\n   * Date and time the checkout was updated.\n   * @readonly\n   */\n  _updatedDate?: Date | null;\n  /**\n   * Minimal amount to pay in order to place the order.\n   * @readonly\n   */\n  payNow?: PriceSummary;\n  /**\n   * Remaining amount for the order to be fully paid.\n   * @readonly\n   */\n  payLater?: PriceSummary;\n  /** Memberships to apply when creating the order. */\n  membershipOptions?: MembershipOptions;\n  /** Additional Fees. */\n  additionalFees?: AdditionalFee[];\n  /** Cart ID that this checkout was created from. Empty if this checkout wasn't created from a cart. */\n  cartId?: string | null;\n  /**\n   * List of validation violations raised by the [Validations Custom Extension SPI](https://www.wix.com/velo/reference/spis/wix-ecom/ecom-validations/introduction).\n   * @readonly\n   */\n  violations?: Violation[];\n  /**\n   * Custom field data for the checkout 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   * Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.\n   * @readonly\n   */\n  purchaseFlowId?: string | null;\n  /**\n   * Additional settings for customization of the checkout process.\n   *\n   * Custom settings can only be defined when [creating a checkout](https://www.wix.com/velo/reference/wix-ecom-backend/checkout/createcheckout).\n   */\n  customSettings?: CustomSettings;\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   * Order ID.\n   *\n   * This field is empty until the checkout completes and becomes an order.\n   * @internal\n   * @readonly\n   */\n  orderId?: string | null;\n  /**\n   * Payment for subscriptions after free trial period.\n   * @internal\n   * @readonly\n   */\n  payAfterFreeTrial?: PriceSummary;\n  /**\n   * The business location ID associated with the checkout.\n   * Learn more about the [Locations API](https://dev.wix.com/docs/rest/business-management/locations/introduction).\n   */\n  businessLocationId?: string | null;\n  /**\n   * Whether payment is required to create an order.\n   *\n   * Payment is required if any of the following conditions are met:\n   * 1. At least one item requires a payment method. This can be because the item has the `savePaymentMethod` field set to `true`, or the item is a subscription with a price greater than zero.\n   * 2. The calculated total amount due for immediate payment is greater than zero - `checkout.payNow > 0`.\n   * @internal\n   * @readonly\n   */\n  paymentRequired?: boolean;\n  /**\n   * Charges information for each subscription in the Checkout.\n   * @internal\n   * @readonly\n   */\n  subscriptionCharges?: SubscriptionCharges[];\n}\n\nexport interface LineItem {\n  /**\n   * Line item ID.\n   * @readonly\n   */\n  _id?: string | null;\n  /**\n   * Item quantity.\n   *\n   * Min: `\"1\"`\n   * Max: `\"100000\"`\n   */\n  quantity?: number;\n  /** Catalog and item reference. Holds IDs for the item and the catalog it came from, as well as further optional info. Optional for custom line items, which don't trigger the Catalog service plugin. */\n  catalogReference?: CatalogReference;\n  /**\n   * Item name.\n   * + Stores - `product.name`\n   * + Bookings - `service.info.name`\n   * + Events - `ticket.name`\n   * @readonly\n   */\n  productName?: ProductName;\n  /**\n   * URL to the item's page on the site.\n   * @readonly\n   */\n  url?: string;\n  /**\n   * Item price **after** catalog-defined discount and line item discounts.\n   * @readonly\n   */\n  price?: MultiCurrencyPrice;\n  /**\n   * Total line item price **after** catalog-defined discount and line item discounts.\n   * @readonly\n   */\n  lineItemPrice?: MultiCurrencyPrice;\n  /**\n   * Item price **before** catalog-defined discount. Defaults to `price` when not provided.\n   * @readonly\n   */\n  fullPrice?: MultiCurrencyPrice;\n  /**\n   * Item price **before** line item discounts and **after** catalog-defined discount. Defaults to `price` when not provided.\n   * @readonly\n   */\n  priceBeforeDiscounts?: MultiCurrencyPrice;\n  /**\n   * Total price after all discounts and tax.\n   * @readonly\n   */\n  totalPriceAfterTax?: MultiCurrencyPrice;\n  /**\n   * Total price after discounts, and before tax.\n   * @readonly\n   */\n  totalPriceBeforeTax?: MultiCurrencyPrice;\n  /**\n   * Tax details for this line item.\n   * @readonly\n   */\n  taxDetails?: ItemTaxFullDetails;\n  /**\n   * Discount for this line item's entire quantity.\n   * @readonly\n   */\n  discount?: MultiCurrencyPrice;\n  /**\n   * Line item description lines. Used for displaying the cart, checkout and order.\n   * @readonly\n   */\n  descriptionLines?: DescriptionLine[];\n  /**\n   * Line item image details.\n   * @readonly\n   */\n  media?: string;\n  /**\n   * Item availability details.\n   * @readonly\n   */\n  availability?: ItemAvailabilityInfo;\n  /**\n   * Physical properties of the item. When relevant, contains information such as SKU, item weight, and shippability.\n   * @readonly\n   */\n  physicalProperties?: PhysicalProperties;\n  /**\n   * Item type. Either a preset type or custom.\n   * @readonly\n   */\n  itemType?: ItemType;\n  /**\n   * Subscription option information.\n   * @readonly\n   */\n  subscriptionOptionInfo?: SubscriptionOptionInfo;\n  /**\n   * Type of selected payment option for current item. Defaults to `\"FULL_PAYMENT_ONLINE\"`.\n   * + `\"FULL_PAYMENT_ONLINE\"`: The entire payment for this item happens as part of the checkout.\n   * + `\"FULL_PAYMENT_OFFLINE\"`: The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods.\n   * + `\"MEMBERSHIP\"`: Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0.\n   * + `\"DEPOSIT_ONLINE\"`: Partial payment for the given item to be paid upfront during the checkout. Amount to be paid is defined by deposit_amount field.\n   * @readonly\n   */\n  paymentOption?: PaymentOptionType;\n  /**\n   * Service properties. When relevant, this contains information such as date and number of participants.\n   * @readonly\n   */\n  serviceProperties?: ServiceProperties;\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 has the same value as `catalogReference.catalogItemId`.\n   * + Used in membership validation.\n   * @readonly\n   */\n  rootCatalogItemId?: string | null;\n  /**\n   * Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - \"Starts at $67\".\n   * @readonly\n   */\n  priceDescription?: PriceDescription;\n  /**\n   * Partial payment to be paid upfront during the checkout. Eligible for catalog items with `lineItem.paymentOption` type `DEPOSIT_ONLINE` only.\n   * @readonly\n   */\n  depositAmount?: MultiCurrencyPrice;\n  /**\n   * Delivery profile ID.\n   * @readonly\n   */\n  deliveryProfileId?: string | null;\n  /**\n   * Whether the line item is a custom line item. Custom line items don't trigger the Catalog service plugin.\n   * @readonly\n   */\n  customLineItem?: boolean;\n  /**\n   * Item payment policy that requires customer consent to complete purchase. The payment policy will be displayed on the checkout page.\n   * @readonly\n   */\n  consentRequiredPaymentPolicy?: string | null;\n  /**\n   * Overriding values for catalog item properties.\n   *\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   * Whether the price is not yet defined, and will be updated after the order is created.\n   * @internal\n   * @readonly\n   */\n  priceUndetermined?: boolean;\n  /**\n   * Whether the line item quantity is fixed and cannot be changed.\n   * @internal\n   * @readonly\n   */\n  fixedQuantity?: boolean;\n  /**\n   * Whether to save the payment method on the order.\n   *\n   * Default: `false`\n   * @readonly\n   */\n  savePaymentMethod?: boolean;\n  /**\n   * Address to use for tax calculation purposes.\n   * @internal\n   */\n  taxableAddress?: TaxableAddress;\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   * @internal\n   */\n  extendedFields?: ExtendedFields;\n  /**\n   * Policies to be displayed to the customer on the checkout page.\n   * @internal\n   * @readonly\n   */\n  policies?: Policy[];\n  /**\n   * ID of the app managing the inventory.\n   * @internal\n   */\n  inventoryAppId?: string | null;\n  /**\n   * Whether the item can only be purchased by site members.\n   *\n   * Default: `false`\n   * @internal\n   * @readonly\n   */\n  membersOnly?: boolean;\n}\n\n/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */\nexport interface CatalogReference {\n  /** ID of the item within the catalog it belongs to. */\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   */\n  appId?: string;\n  /**\n   * Additional item details in key:value pairs.\n   *\n   * 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 your Wix Stores catalog, learn more about [eCommerce integration](https://www.wix.com/velo/reference/wix-stores-backend/ecommerce-integration).\n   */\n  options?: Record<string, any> | null;\n}\n\nexport interface ProductName {\n  /**\n   * __Required.__ Item 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   *\n   * Min: 1 character.\n   * Max: 200 characters.\n   */\n  original?: string;\n  /**\n   * Item name translated into the buyer's language.\n   *\n   * Min: 1 character.\n   * Max: 400 characters.\n   * Default: Same as `original`.\n   */\n  translated?: string | null;\n}\n\nexport interface MultiCurrencyPrice {\n  /** Amount. */\n  amount?: string;\n  /**\n   * Converted amount.\n   * @readonly\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 ItemTaxFullDetails {\n  /** Amount for which tax is calculated. */\n  taxableAmount?: MultiCurrencyPrice;\n  /** Tax rate %, as a decimal point between 0 and 1. */\n  taxRate?: string;\n  /** Calculated tax, based on `taxable_amount` and `tax_rate`. */\n  totalTax?: MultiCurrencyPrice;\n  /**\n   * If breakdown exists, the sum of rates in the breakdown must equal `tax_rate`. Deprecated - use 'tax_breakdown' instead.\n   * @readonly\n   * @deprecated\n   */\n  rateBreakdown?: TaxRateBreakdown[];\n}\n\nexport interface TaxRateBreakdown {\n  /** Name of tax against which the calculation was performed. */\n  name?: string;\n  /** Rate at which this tax detail was calculated. */\n  rate?: string;\n  /** Amount of tax for this tax detail. */\n  tax?: MultiCurrencyPrice;\n}\n\n/**\n * TaxBreakdown represents tax information for a line item.\n * It holds the tax amount and the tax rate for each tax authority that apply on the line item.\n */\nexport interface TaxBreakdown {\n  /** The name of the jurisdiction to which this tax detail applies. For example, \"New York\" or \"Quebec\". */\n  jurisdiction?: string | null;\n  /** The amount of this line item price that was considered nontaxable. (Decimal value) */\n  nonTaxableAmount?: MultiCurrencyPrice;\n  /** The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.0000 signifies 200% tax. (Decimal value) */\n  rate?: string | null;\n  /** The amount of tax estimated for this line item. (Decimal value) */\n  taxAmount?: MultiCurrencyPrice;\n  /** The taxable amount of this line item. */\n  taxableAmount?: MultiCurrencyPrice;\n  /** The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, \"Sales Tax\", \"Income Tax\", \"Value Added Tax\", etc. */\n  taxType?: string | null;\n  /**\n   * The name of the tax against which this tax amount was calculated. For example, \"NY State Sales Tax\", \"Quebec GST\", etc.\n   * This name should be explicit enough to allow the merchant to understand what tax was calculated.\n   */\n  taxName?: string | null;\n  /** The type of the jurisdiction in which this tax detail applies. */\n  jurisdictionType?: JurisdictionType;\n}\n\n/** JurisdictionType represents the type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */\nexport enum JurisdictionType {\n  UNDEFINED = 'UNDEFINED',\n  COUNTRY = 'COUNTRY',\n  STATE = 'STATE',\n  COUNTY = 'COUNTY',\n  CITY = 'CITY',\n  SPECIAL = 'SPECIAL',\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\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  /** 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  original?: string;\n  /**\n   * Description line name translated into the buyer's language.\n   *\n   * Default: Same as `original`.\n   */\n  translated?: string | null;\n}\n\nexport interface PlainTextValue {\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  original?: string;\n  /**\n   * Description line plain text value translated into the buyer's language.\n   *\n   * Default: Same as `original`.\n   */\n  translated?: string | null;\n}\n\nexport interface Color {\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  original?: string;\n  /**\n   * Description line color name translated into the buyer's language.\n   *\n   * Default: Same as `original`.\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\nexport interface FocalPoint {\n  /** X-coordinate of the focal point. */\n  x?: number;\n  /** Y-coordinate of the focal point. */\n  y?: number;\n  /** crop by height */\n  height?: number | null;\n  /** crop by width */\n  width?: number | null;\n}\n\nexport interface ItemAvailabilityInfo {\n  /** Item availability status. */\n  status?: ItemAvailabilityStatus;\n  /** Quantity available. */\n  quantityAvailable?: number | null;\n}\n\nexport enum ItemAvailabilityStatus {\n  AVAILABLE = 'AVAILABLE',\n  /** Item does not exist */\n  NOT_FOUND = 'NOT_FOUND',\n  /** Item not in stock */\n  NOT_AVAILABLE = 'NOT_AVAILABLE',\n  /** Available quantity is less than requested */\n  PARTIALLY_AVAILABLE = 'PARTIALLY_AVAILABLE',\n}\n\nexport interface PhysicalProperties {\n  /** Line item weight. Measurement unit (`\"KG\"` or `\"LB\"`) is taken from `order.weightUnit`. */\n  weight?: number | null;\n  /** Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku). */\n  sku?: string | null;\n  /** Whether this line item is shippable. */\n  shippable?: boolean;\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 ItemType extends ItemTypeItemTypeDataOneOf {\n  /** Preset item type. */\n  preset?: ItemTypeItemType;\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?: ItemTypeItemType;\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\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?: SubscriptionFrequency;\n  /**\n   * Interval of recurring payment.\n   *\n   * Default: `1`.\n   * If SubscriptionFrequency is Day the minimum interval is 7\n   */\n  interval?: number | null;\n  /** Whether subscription is renewed automatically at the end of each period. */\n  autoRenewal?: boolean;\n  /** Number of billing cycles before subscription ends. Ignored if `autoRenewal` is `true`. */\n  billingCycles?: number | null;\n  /**\n   * Whether to allow the customer to cancel the subscription..\n   * @internal\n   */\n  enableCustomerCancellation?: boolean;\n  /**\n   * Period until first cycle starts. If applied payNow will be 0\n   * If None => no free trial\n   * @internal\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\nexport interface FreeTrialPeriod {\n  /** Frequency of priod. Values: DAY, WEEK, MONTH, YEAR */\n  frequency?: SubscriptionFrequency;\n  /** interval of period */\n  interval?: number;\n}\n\nexport interface Title {\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  original?: string;\n  /**\n   * Subscription option name translated into the buyer's language.\n   *\n   * Default: Same as `original`.\n   */\n  translated?: string | null;\n}\n\nexport interface Description {\n  /** Subscription option description. */\n  original?: string;\n  /** Translated subscription option description. */\n  translated?: string | null;\n}\n\nexport interface SecuredMedia {\n  /** Media ID in Wix Media Manager. */\n  _id?: string;\n  /** Original filename. */\n  fileName?: string;\n  /** File type. */\n  fileType?: FileType;\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/** 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. When selected, `price` is `0`. */\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\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  /** 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  numberOfParticipants?: number | null;\n}\n\nexport interface PriceDescription {\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  original?: string;\n  /**\n   * Price description translated into the buyer's language.\n   *\n   * Default: Same as `original`.\n   */\n  translated?: string | null;\n}\n\nexport interface CatalogOverrideFields {\n  /** Item name. */\n  productName?: ProductName;\n  /** Item price **after** discounts. */\n  price?: string | null;\n  /** Item price **before** discounts. */\n  fullPrice?: string | null;\n  /** Item description lines. Used when displaying the line item to customers. */\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  /** Only eligible for catalog items with `lineItem.paymentOption.value` type of `DEPOSIT_ONLINE`. */\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 PaymentOption {\n  /**\n   * Type of selected payment option for current item.\n   *\n   * Default: `FULL_PAYMENT_ONLINE`\n   */\n  value?: PaymentOptionType;\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?: TaxableAddressType;\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?: TaxableAddressType;\n}\n\nexport enum TaxableAddressType {\n  UNKNOWN_TAXABLE_ADDRESS = 'UNKNOWN_TAXABLE_ADDRESS',\n  BUSINESS = 'BUSINESS',\n  BILLING = 'BILLING',\n  SHIPPING = 'SHIPPING',\n}\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 Policy {\n  /** Policy title - should be translated */\n  title?: string | null;\n  /** Policy content - should be translated */\n  content?: string;\n}\n\n/** Billing Info and shipping details */\nexport interface AddressWithContact {\n  /** Address. */\n  address?: ApiAddress;\n  /** Contact details. */\n  contactDetails?: FullAddressContactDetails;\n}\n\n/** Physical address */\nexport interface ApiAddress {\n  /** Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format. */\n  country?: string | null;\n  /** Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format. */\n  subdivision?: string | null;\n  /** City name. */\n  city?: string | null;\n  /** Postal or zip code. */\n  postalCode?: string | null;\n  /** Street address. */\n  streetAddress?: StreetAddress;\n  /** Main address line (usually street name and number). */\n  addressLine1?: string | null;\n  /** Free text providing more detailed address info. Usually contains apt, suite, floor. */\n  addressLine2?: string | null;\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\n/** Full contact details for an address */\nexport interface FullAddressContactDetails {\n  /** First name. */\n  firstName?: string | null;\n  /** Last name. */\n  lastName?: string | null;\n  /** Phone number. */\n  phone?: string | null;\n  /** Company name. */\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?: CommonVatId;\n}\n\nexport interface CommonVatId {\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?: CommonVatType;\n}\n\n/** tax info types */\nexport enum CommonVatType {\n  UNSPECIFIED = 'UNSPECIFIED',\n  /** CPF - for individual tax payers. */\n  CPF = 'CPF',\n  /** CNPJ - for corporations */\n  CNPJ = 'CNPJ',\n}\n\nexport interface ShippingInfo {\n  /** Shipping address and contact details. */\n  shippingDestination?: AddressWithContact;\n  /** Selected option out of the options allowed for the `region`. */\n  selectedCarrierServiceOption?: SelectedCarrierServiceOption;\n  /**\n   * Shipping region. Based on the address provided.\n   * @readonly\n   */\n  region?: ShippingRegion;\n  /**\n   * All carrier options for this shipping rule.\n   * @readonly\n   */\n  carrierServiceOptions?: CarrierServiceOption[];\n}\n\nexport interface SelectedCarrierServiceOption {\n  /** Unique identifier of selected option. For example, \"usps_std_overnight\". */\n  code?: string;\n  /**\n   * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale).\n   * For example, \"Standard\" or \"First-Class Package International\".\n   * @readonly\n   */\n  title?: string;\n  /**\n   * Delivery logistics.\n   * @readonly\n   */\n  logistics?: DeliveryLogistics;\n  /**\n   * Shipping costs.\n   * @readonly\n   */\n  cost?: SelectedCarrierServiceOptionPrices;\n  /**\n   * Were we able to find the requested shipping option, or otherwise we fallback to the default one (the first)\n   * @readonly\n   */\n  requestedShippingOption?: boolean;\n  /** Other charges */\n  otherCharges?: SelectedCarrierServiceOptionOtherCharge[];\n  /** This carrier's unique ID */\n  carrierId?: string | null;\n  /** Delivery solution allocations to different delivery carriers and delivery regions */\n  deliveryAllocations?: DeliveryAllocation[];\n  /** If the delivery solution is a partial and doesn't apply to all items. */\n  partial?: boolean | null;\n}\n\nexport interface DeliveryLogistics {\n  /** Expected delivery time, in free text. For example, \"3-5 business days\". */\n  deliveryTime?: string | null;\n  /** Instructions for caller, e.g for pickup: \"Please deliver during opening hours, and please don't park in disabled parking spot\". */\n  instructions?: string | null;\n  /** Pickup details. */\n  pickupDetails?: PickupDetails;\n}\n\nexport interface PickupDetails {\n  /** Pickup address. */\n  address?: ApiAddress;\n  /**\n   * Whether the pickup address is that of a business - this may effect tax calculation.\n   * @deprecated\n   */\n  businessLocation?: boolean;\n  /** Pickup method */\n  pickupMethod?: PickupMethod;\n}\n\nexport enum PickupMethod {\n  UNKNOWN_METHOD = 'UNKNOWN_METHOD',\n  STORE_PICKUP = 'STORE_PICKUP',\n  PICKUP_POINT = 'PICKUP_POINT',\n}\n\nexport interface DeliveryTimeSlot {\n  /** starting time of the delivery time slot */\n  from?: Date | null;\n  /** ending time of the delivery time slot */\n  to?: Date | null;\n}\n\nexport interface SelectedCarrierServiceOptionPrices {\n  /** Total shipping price, after discount and after tax. */\n  totalPriceAfterTax?: MultiCurrencyPrice;\n  /** Total price of shipping after discounts (when relevant), and before tax. */\n  totalPriceBeforeTax?: MultiCurrencyPrice;\n  /** Tax details. */\n  taxDetails?: ItemTaxFullDetails;\n  /** Shipping discount before tax. */\n  totalDiscount?: MultiCurrencyPrice;\n  /** Shipping price before discount and before tax. */\n  price?: MultiCurrencyPrice;\n}\n\nexport interface SelectedCarrierServiceOptionOtherCharge {\n  /** Type of additional cost. */\n  type?: ChargeType;\n  /** Details of the charge, such as 'Full Coverage Insurance of up to 80% of value of shipment'. */\n  details?: string | null;\n  /** Price of added charge. */\n  cost?: SelectedCarrierServiceOptionPrices;\n}\n\nexport enum ChargeType {\n  HANDLING_FEE = 'HANDLING_FEE',\n  INSURANCE = 'INSURANCE',\n}\n\nexport interface DeliveryAllocation {\n  /** The delivery option's carrier details, could be multiple if the delivery option is a combination of multiple carriers */\n  deliveryCarrier?: Carrier;\n  /** The delivery region that are relevant for this delivery solution. */\n  deliveryRegion?: Region;\n  /** Populated if the delivery solution is a partially supplied by this carrier. */\n  applicableLineItems?: ApplicableLineItems;\n}\n\nexport interface Carrier {\n  /** The carrier app id */\n  appId?: string | null;\n  /** Unique code that acts as an ID for a shipping rate. For example, `\"usps_std_overnight\"`. */\n  code?: string;\n}\n\nexport interface Region {\n  /** The delivery region id. */\n  _id?: string | null;\n  /** The delivery region name. */\n  name?: string | null;\n}\n\nexport interface ApplicableLineItems {\n  /** Line items that the delivery solution is for. */\n  lineItemIds?: string[];\n}\n\nexport interface ShippingRegion {\n  /**\n   * Shipping region ID.\n   * @readonly\n   */\n  _id?: string;\n  /** Shipping region name. */\n  name?: string;\n}\n\nexport interface CarrierServiceOption {\n  /** Carrier ID. */\n  carrierId?: string;\n  /** Shipping options offered by this carrier for this request. */\n  shippingOptions?: ShippingOption[];\n}\n\nexport interface ShippingOption {\n  /**\n   * Unique code of provided shipping option like \"usps_std_overnight\".\n   * For legacy calculators this would be the UUID of the option.\n   */\n  code?: string;\n  /**\n   * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale).\n   * For example, \"Standard\" or \"First-Class Package International\".\n   */\n  title?: string;\n  /** Delivery logistics. */\n  logistics?: DeliveryLogistics;\n  /** Sipping price information. */\n  cost?: ShippingPrice;\n  /** Delivery solution allocations to different delivery carriers and delivery regions */\n  deliveryAllocations?: DeliveryAllocation[];\n  /** If the delivery solution is a partial and doesn't apply to all items. */\n  partial?: boolean | null;\n}\n\nexport interface ShippingPrice {\n  /** Shipping price. */\n  price?: MultiCurrencyPrice;\n  /** Other costs such as insurance, handling & packaging for fragile items, etc. */\n  otherCharges?: OtherCharge[];\n}\n\nexport interface OtherCharge {\n  /** Type of additional cost. */\n  type?: ChargeType;\n  /** Price of added cost. */\n  price?: MultiCurrencyPrice;\n}\n\nexport interface BuyerInfo extends BuyerInfoIdOneOf {\n  /**\n   * Visitor ID - if the buyer is **not** a site member.\n   * @readonly\n   */\n  visitorId?: string;\n  /**\n   * Member ID - If the buyer is a site member.\n   * @readonly\n   */\n  memberId?: string;\n  /**\n   * Contact ID. For more information, see the Contacts API.\n   * @readonly\n   */\n  contactId?: string | null;\n  /** Buyer email address. */\n  email?: string | null;\n}\n\n/** @oneof */\nexport interface BuyerInfoIdOneOf {\n  /**\n   * Visitor ID - if the buyer is **not** a site member.\n   * @readonly\n   */\n  visitorId?: string;\n  /**\n   * Member ID - If the buyer is a site member.\n   * @readonly\n   */\n  memberId?: string;\n}\n\nexport interface PriceSummary {\n  /** Subtotal of all line items, before discounts and before tax. */\n  subtotal?: MultiCurrencyPrice;\n  /** Total shipping price, before discounts and before tax. */\n  shipping?: MultiCurrencyPrice;\n  /** Total tax. */\n  tax?: MultiCurrencyPrice;\n  /** Total calculated discount value. */\n  discount?: MultiCurrencyPrice;\n  /** Total price after discounts, gift cards, and tax. */\n  total?: MultiCurrencyPrice;\n  /** Total additional fees price before tax. */\n  additionalFees?: MultiCurrencyPrice;\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  /** Order validation errors. */\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\nexport interface FieldViolation {\n  field?: string;\n  description?: string;\n  violatedRule?: RuleType;\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  /** Carrier errors. */\n  errors?: CarrierError[];\n}\n\nexport interface CarrierError {\n  /** Carrier ID. */\n  carrierId?: string;\n  /** Error details. */\n  error?: Details;\n}\n\nexport interface GiftCard {\n  /**\n   * Gift Card ID.\n   * @deprecated\n   */\n  _id?: string;\n  /** Gift card obfuscated code. */\n  obfuscatedCode?: string;\n  /** Gift card value. */\n  amount?: MultiCurrencyPrice;\n  /** App ID of the gift card provider. */\n  appId?: string;\n  /**\n   * External ID in the gift card provider's system.\n   * Used for integration and tracking across different platforms.\n   */\n  externalId?: string | null;\n}\n\nexport interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {\n  /** Coupon details. */\n  coupon?: Coupon;\n  /** Merchant discount. */\n  merchantDiscount?: MerchantDiscount;\n  /** Discount rule */\n  discountRule?: DiscountRule;\n  /** Discount type. */\n  discountType?: DiscountType;\n  /**\n   * IDs of the line items the discount applies to.\n   * @deprecated IDs of line items the discount applies to.\n   * @replacedBy line_items_discounts\n   * @targetRemovalDate 2024-06-01\n   */\n  lineItemIds?: string[];\n  /**\n   * Number of subscription cycle this discount applies to\n   * default None - all billing cycle\n   * @internal\n   */\n  subscriptionCycles?: number | null;\n}\n\n/** @oneof */\nexport interface AppliedDiscountDiscountSourceOneOf {\n  /** Coupon details. */\n  coupon?: Coupon;\n  /** Merchant discount. */\n  merchantDiscount?: MerchantDiscount;\n  /** Discount rule */\n  discountRule?: DiscountRule;\n}\n\nexport enum DiscountType {\n  GLOBAL = 'GLOBAL',\n  SPECIFIC_ITEMS = 'SPECIFIC_ITEMS',\n  SHIPPING = 'SHIPPING',\n}\n\n/** Coupon */\nexport interface Coupon {\n  /** Coupon ID. */\n  _id?: string;\n  /** Coupon code. */\n  code?: string;\n  /** Coupon value. */\n  amount?: MultiCurrencyPrice;\n  /** Coupon name. */\n  name?: string;\n}\n\nexport interface MerchantDiscount {\n  /** Discount value. */\n  amount?: MultiCurrencyPrice;\n  /** Discount Percentage. Will be calculated from items price before other discounts. */\n  percentage?: number | null;\n}\n\nexport interface DiscountRule {\n  /** Discount rule ID */\n  _id?: string;\n  /** Discount rule name */\n  name?: DiscountRuleName;\n  /** Discount value. */\n  amount?: MultiCurrencyPrice;\n}\n\nexport interface DiscountRuleName {\n  /** Original discount rule name (in site's default language). */\n  original?: string;\n  /** Translated discount rule name according to buyer language. Defaults to `original` when not provided. */\n  translated?: string | null;\n}\n\nexport interface LineItemDiscount {\n  /** ID of line item the discount applies to. */\n  _id?: string;\n  /** Discount value. */\n  totalDiscountAmount?: MultiCurrencyPrice;\n}\n\nexport interface CustomField {\n  /** Custom field value. */\n  value?: any;\n  /** Custom field title. */\n  title?: string;\n  /** Translated custom field title. */\n  translatedTitle?: string | null;\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\nexport interface TaxSummary {\n  /**\n   * Amount for which tax is calculated, added from line items.\n   * @readonly\n   */\n  taxableAmount?: MultiCurrencyPrice;\n  /**\n   * Calculated tax, added from line items.\n   * @readonly\n   */\n  totalTax?: MultiCurrencyPrice;\n  /**\n   * Tax calculator that was active when the order was created.\n   * @deprecated\n   */\n  calculationDetails?: TaxCalculationDetails;\n}\n\nexport interface TaxCalculationDetails\n  extends TaxCalculationDetailsCalculationDetailsOneOf {\n  /** Reason the manual calculation was used. */\n  manualRateReason?: ManualCalculationReason;\n  /** Details of the fallback rate calculation. */\n  autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetails;\n  /** Rate calculation type. */\n  rateType?: RateType;\n}\n\n/** @oneof */\nexport interface TaxCalculationDetailsCalculationDetailsOneOf {\n  /** Reason the manual calculation was used. */\n  manualRateReason?: ManualCalculationReason;\n  /** Details of the fallback rate calculation. */\n  autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetails;\n}\n\nexport enum RateType {\n  /** no tax being collected for this request due to location of purchase */\n  NO_TAX_COLLECTED = 'NO_TAX_COLLECTED',\n  /** manual rate used for calculation */\n  MANUAL_RATE = 'MANUAL_RATE',\n  /** autotax rate used for calculation */\n  AUTO_RATE = 'AUTO_RATE',\n  /** fallback rate used for calculation */\n  FALLBACK_RATE = 'FALLBACK_RATE',\n}\n\nexport enum ManualCalculationReason {\n  /** user set calculator in Business Manager to be Manual */\n  GLOBAL_SETTING_TO_MANUAL = 'GLOBAL_SETTING_TO_MANUAL',\n  /** specific region is on manual even though Global setting is Auto-tax */\n  REGION_SETTING_TO_MANUAL = 'REGION_SETTING_TO_MANUAL',\n}\n\nexport interface AutoTaxFallbackCalculationDetails {\n  /** reason for fallback */\n  fallbackReason?: FallbackReason;\n  /** invalid request (i.e. address), timeout, internal error, license error, and others will be encoded here */\n  error?: ApplicationError;\n}\n\nexport enum FallbackReason {\n  /** auto-tax failed to be calculated */\n  AUTO_TAX_FAILED = 'AUTO_TAX_FAILED',\n  /** auto-tax was temporarily deactivated on a system-level */\n  AUTO_TAX_DEACTIVATED = 'AUTO_TAX_DEACTIVATED',\n}\n\n/**\n * The summary of the tax breakdown for all the line items. It will hold for each tax name, the aggregated tax amount paid for it and the tax rate.\n * Tax breakdown is the tax amount split to the tax authorities that applied on the line item.\n */\nexport interface AggregatedTaxBreakdown {\n  /** The name of the tax against which this tax amount was calculated. */\n  taxName?: string;\n  /** The type of tax that was calculated. Depends on the company's nexus settings as well as the jurisdiction's tax laws. */\n  taxType?: string;\n  /** The name of the jurisdiction in which this tax detail applies. */\n  jurisdiction?: string;\n  /** The type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */\n  jurisdictionTypeEnum?: JurisdictionType;\n  /** The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.000 signifies 200% tax. (Decimal value) */\n  rate?: string;\n  /** The sum of all the tax from line items that calculated by the tax identifiers. */\n  aggregatedTaxAmount?: MultiCurrencyPrice;\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}\n\nexport interface CreatedBy extends CreatedByIdOneOf {\n  /**\n   * User ID - when the order was created by a Wix user on behalf of a buyer.\n   * For example, via POS (point of service).\n   */\n  userId?: string;\n  /** Member ID - when the order was created by a **logged in** site visitor. */\n  memberId?: string;\n  /** Visitor ID - when the order was created by a site visitor that was **not** logged in. */\n  visitorId?: string;\n  /** App ID - when the order was created by an external application or Wix service. */\n  appId?: string;\n}\n\n/** @oneof */\nexport interface CreatedByIdOneOf {\n  /**\n   * User ID - when the order was created by a Wix user on behalf of a buyer.\n   * For example, via POS (point of service).\n   */\n  userId?: string;\n  /** Member ID - when the order was created by a **logged in** site visitor. */\n  memberId?: string;\n  /** Visitor ID - when the order was created by a site visitor that was **not** logged in. */\n  visitorId?: string;\n  /** App ID - when the order was created by an external application or Wix service. */\n  appId?: string;\n}\n\n/** Reserved for internal use. */\nexport interface MembershipOptions {\n  /**\n   * Reserved for internal use.\n   * @readonly\n   */\n  eligibleMemberships?: Membership[];\n  /**\n   * Reserved for internal use.\n   * @readonly\n   */\n  invalidMemberships?: InvalidMembership[];\n  /** Selected membership to apply to this checkout. */\n  selectedMemberships?: SelectedMemberships;\n}\n\nexport interface Membership {\n  /** Membership ID. */\n  _id?: string;\n  /** ID of the application providing this payment option. */\n  appId?: string;\n  /** The name of this membership. */\n  name?: MembershipName;\n  /** Line item IDs which are \"paid for\" by this membership. */\n  lineItemIds?: string[];\n  /** Optional - For a membership that has limited credits, information about credit usage. */\n  credits?: MembershipPaymentCredits;\n  /** Optional - TMembership expiry date. */\n  expirationDate?: Date | null;\n  /** Additional data about this membership. */\n  additionalData?: Record<string, any> | null;\n}\n\nexport interface MembershipName {\n  /** Membership name. */\n  original?: string;\n  /** Translated membership name. Defaults to `original` when not provided. */\n  translated?: string | null;\n}\n\nexport interface MembershipPaymentCredits {\n  /** Membership's total amount of credits. */\n  total?: number;\n  /** Membership's remaining amount of credits. */\n  remaining?: number;\n}\n\nexport interface InvalidMembership {\n  /** Membership details. */\n  membership?: Membership;\n  /** Reason why this membership is invalid and cannot be used. */\n  reason?: string;\n}\n\nexport interface SelectedMemberships {\n  /** Selected memberships. */\n  memberships?: SelectedMembership[];\n}\n\nexport interface SelectedMembership {\n  /** Membership ID. */\n  _id?: string;\n  /** ID of the app providing this payment option. */\n  appId?: string;\n  /** IDs of the line items this membership applies to. */\n  lineItemIds?: string[];\n}\n\nexport interface AdditionalFee {\n  /** Additional fee's unique code (or ID) for future processing. */\n  code?: string | null;\n  /** Translated additional fee's name. */\n  name?: string;\n  /** Additional fee's price. */\n  price?: MultiCurrencyPrice;\n  /** Tax details. */\n  taxDetails?: ItemTaxFullDetails;\n  /** Provider's app id. */\n  providerAppId?: string | null;\n  /** Additional fee's price before tax. */\n  priceBeforeTax?: MultiCurrencyPrice;\n  /** Additional fee's price after tax. */\n  priceAfterTax?: MultiCurrencyPrice;\n  /**\n   * Optional - Line items associated with this additional fee.\n   * If no `lineItemIds` are provided, the fee will be associated with the whole cart/checkout/order.\n   */\n  lineItemIds?: string[];\n  /**\n   * Number of subscription cycle this fee applies to\n   * default None - all billing cycle\n   * @internal\n   */\n  subscriptionCycles?: number | null;\n  /** the source the additional fee was added from */\n  source?: AdditionalFeeSource;\n}\n\nexport enum AdditionalFeeSource {\n  UNKNOWN_ADDITIONAL_FEE_SOURCE = 'UNKNOWN_ADDITIONAL_FEE_SOURCE',\n  /** The additional fee was added by an additional fee service plugin */\n  SERVICE_PLUGIN = 'SERVICE_PLUGIN',\n  /** The additional fee was added on the item either via the catalog or on custom line item */\n  ITEM = 'ITEM',\n  /** The additional fee was added manually on the request */\n  MANUAL = 'MANUAL',\n}\n\nexport interface ConversionInfo {\n  /**\n   * The site currency.\n   * @readonly\n   */\n  siteCurrency?: string;\n  /**\n   * The rate used when converting from the site currency to the checkout currency.\n   * @readonly\n   */\n  conversionRate?: string;\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?: Severity;\n  /** Target location on a checkout or cart page where the violation will be displayed. */\n  target?: Target;\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  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\nexport interface Target extends TargetTargetTypeOneOf {\n  /** General (other) violation. */\n  other?: Other;\n  /** Specific line item violation. */\n  lineItem?: TargetLineItem;\n}\n\n/** @oneof */\nexport interface TargetTargetTypeOneOf {\n  /** General (other) violation. */\n  other?: Other;\n  /** Specific line item violation. */\n  lineItem?: TargetLineItem;\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/** 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\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/** 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?: NameInOther;\n}\n\n/** Specific line item violation. */\nexport interface TargetLineItem {\n  /** Location on a checkout or a cart page where the specific line item violation will be displayed. */\n  name?: NameInLineItem;\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?: SuggestedFix;\n}\n\nexport interface CustomSettings {\n  /**\n   * Whether to restrict the option to add or remove a gift card on the checkout page.\n   *\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   *\n   * Default: `false`\n   */\n  lockCouponCode?: boolean;\n  /**\n   * Whether to disable policy agreement checkout in the checkout page\n   *\n   * Default: `false`\n   */\n  disabledPolicyAgreementCheckbox?: boolean;\n  /**\n   * Whether to disable manual payment option for this checkout.\n   *\n   * Default: `false`\n   */\n  disabledManualPayment?: boolean;\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   */\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   */\n  componentId?: string;\n}\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   */\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   */\n  resourceId?: string | null;\n}\n\nexport interface SubscriptionCharges {\n  /** ids of the items the subscription is defined on */\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   */\n  description?: string | null;\n  /** Charges for subscription. */\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 UpdatedCheckoutMessage {\n  /** Previous checkout. */\n  oldCheckout?: Checkout;\n  /** Updated checkout. */\n  updatedCheckout?: Checkout;\n}\n\nexport interface CreateCheckoutRequest {\n  /** Checkout information. */\n  checkoutInfo?: Checkout;\n  /** The code of an existing coupon to apply to checkout. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */\n  couponCode?: string | null;\n  /** Catalog line items to add to the checkout. */\n  lineItems?: LineItem[];\n  /**\n   * Custom line items to add to the checkout. 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   */\n  customLineItems?: CustomLineItem[];\n  /** Sales channel that submitted the order. */\n  channelType: ChannelType;\n  /**\n   * Gift card code.\n   *\n   * The checkout can only hold 1 `giftCardCode` at a time. If an additional `giftCardCode` is added, it will override the existing `giftCardCode`.\n   *\n   * >**Note:** Gift cards are supported through the Wix UI, though the service plugin is not currently available. Learn more about [Wix Gift Cards](https://support.wix.com/en/article/wix-stores-setting-up-wix-gift-cards).\n   */\n  giftCardCode?: string | null;\n  /**\n   * `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page.\n   *\n   * This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.\n   */\n  overrideCheckoutUrl?: string | null;\n}\n\nexport interface CustomLineItem {\n  /**\n   * Custom line item quantity.\n   *\n   * Min: `1`\n   * Max: `100000`\n   */\n  quantity?: number;\n  /** Custom line item price. For security reasons, the `price` field should come from backend Velo code, and not be passed from the frontend. */\n  price?: string;\n  /** Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - \"Starts at $67\". */\n  priceDescription?: PriceDescription;\n  /** Custom line item description lines. Used for displaying the cart, checkout and order. */\n  descriptionLines?: DescriptionLine[];\n  /**\n   * Custom line item media.\n   * + Link to an image/video from the [Wix Media Manager](https://support.wix.com/en/article/wix-media-about-the-media-manager) - `\"wix:image://v1/3c76e2_c53...4ea4~mv2.jpg#originWidth=1000&originHeight=1000\"`.\n   * + An image from the web - `\"http(s)://<image url>\"`.\n   */\n  media?: string;\n  /**\n   * Custom line item ID. If passed, `id` must be unique.\n   *\n   * Default: auto-generated ID\n   */\n  _id?: string | null;\n  /** Tax group ID for this custom line item. */\n  taxGroupId?: string | null;\n  /** Name of the item or product. */\n  productName?: ProductName;\n  /** URL to the item's page on the site. When not provided, the link back from the cart page to the relevant product page will not work. */\n  url?: string;\n  /** Item type. Either a preset type or custom. */\n  itemType?: ItemType;\n  /** Item price **before** catalog-defined discount. Defaults to `price` when not provided. */\n  fullPrice?: string | null;\n  /**\n   * Item quantity available for purchase. Only return this if inventory is managed.\n   * Not returning this field means that the buyer can \"infinitely\" tick up the number of items in the cart.\n   */\n  quantityAvailable?: number | null;\n  /** Physical properties of the item. */\n  physicalProperties?: PhysicalProperties;\n  /**\n   * Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`.\n   *\n   * + `FULL_PAYMENT_ONLINE` - Entire payment for this item happens as part of the checkout.\n   * + `FULL_PAYMENT_OFFLINE` - Entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods.\n   * + `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0.\n   * + `DEPOSIT_ONLINE` -  Partial payment for the given item to be paid upfront during the checkout. Amount to be paid is defined by deposit_amount field.\n   */\n  paymentOption?: PaymentOptionType;\n  /**\n   * Service properties. When relevant, this contains information such as date and number of participants.\n   * Used, among other things, when checking for valid memberships.\n   */\n  serviceProperties?: ServiceProperties;\n  /**\n   * In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID.\n   *\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   */\n  rootCatalogItemId?: string | null;\n  /**\n   * Partial payment for the given item to be paid upfront during the checkout.\n   *\n   * Eligible for catalog items with type `DEPOSIT_ONLINE`.\n   * When omitted, the item's price will not be split and is expected to be paid in a single installment.\n   */\n  depositAmount?: string | null;\n  /** Delivery profile ID. */\n  deliveryProfileId?: string | null;\n  /** Catalog and item reference. Includes IDs for the item and the catalog it came from, as well as further optional info. Optional for custom line items, which don't trigger the Catalog service plugin. */\n  catalogReference?: CatalogReference;\n  /**\n   * Whether the price is not yet defined, and will be updated after the order is created.\n   *\n   * Default: `false`\n   * @internal\n   */\n  priceUndetermined?: boolean;\n  /**\n   * Whether the line item quantity is fixed and cannot be changed.\n   *\n   * Default: `false`\n   * @internal\n   */\n  fixedQuantity?: boolean;\n  /**\n   * Item payment policy that requires customer consent to complete purchase. The payment policy will be displayed on the checkout page.\n   * @readonly\n   */\n  consentRequiredPaymentPolicy?: string | null;\n  /**\n   * Whether to save the payment method on the order.\n   *\n   * Default: `false`\n   * @readonly\n   */\n  savePaymentMethod?: boolean;\n  /**\n   * Policies to be displayed to the customer on the checkout page.\n   * @internal\n   */\n  policies?: Policy[];\n  /**\n   * ID of the app managing the inventory.\n   * @internal\n   */\n  inventoryAppId?: string | null;\n  /**\n   * Whether the item can only be purchased by site members.\n   *\n   * Default: `false`\n   * @internal\n   */\n  membersOnly?: boolean;\n  /**\n   * Address to use for tax calculation purposes.\n   * @internal\n   */\n  taxableAddress?: TaxableAddress;\n}\n\nexport interface MerchantDiscountInput {\n  /** Discount amount. */\n  amount?: string;\n  /** IDs of the line items the discount applies to. */\n  lineItemIds?: string[];\n}\n\nexport interface CreateCheckoutResponse {\n  /** Newly created checkout. */\n  checkout?: Checkout;\n}\n\nexport interface ShippingCalculationErrorData\n  extends ShippingCalculationErrorDataShippingCalculationErrorOneOf {\n  generalShippingCalculationError?: Details;\n  carrierErrors?: CarrierErrors;\n}\n\n/** @oneof */\nexport interface ShippingCalculationErrorDataShippingCalculationErrorOneOf {\n  generalShippingCalculationError?: Details;\n  carrierErrors?: CarrierErrors;\n}\n\nexport interface GetCheckoutRequest {\n  /** Checkout ID. */\n  _id: string;\n}\n\nexport interface GetCheckoutResponse {\n  /** The requested checkout. */\n  checkout?: Checkout;\n}\n\nexport interface GetCheckoutWithAllExtendedFieldsRequest {\n  /** Checkout ID. */\n  _id?: string;\n}\n\nexport interface GetCheckoutWithAllExtendedFieldsResponse {\n  /** The requested checkout. */\n  checkout?: Checkout;\n}\n\nexport interface GetCheckoutByCartIdRequest {\n  /** Cart ID. */\n  _id: string;\n}\n\nexport interface GetCheckoutByCartIdResponse {\n  /** The requested checkout. */\n  checkout?: Checkout;\n}\n\nexport interface GetWixCheckoutURLRequest {\n  /** Checkout ID. */\n  _id: string;\n}\n\nexport interface GetWixCheckoutURLResponse {\n  /** Checkout URL. */\n  checkoutUrl?: string;\n}\n\nexport interface GetCheckoutURLRequest {\n  /** Checkout ID. */\n  _id: string;\n}\n\nexport interface GetCheckoutURLResponse {\n  /** Checkout URL. */\n  checkoutUrl?: string;\n}\n\nexport interface UpdateCheckoutRequest {\n  /** Checkout information. */\n  checkout: Checkout;\n  /** The code of an existing coupon to apply to checkout. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */\n  couponCode?: string | null;\n  /** Gift card code. */\n  giftCardCode?: string | null;\n  /**\n   * `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page.\n   *\n   * This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.\n   */\n  overrideCheckoutUrl?: string | null;\n  /** Catalog line items. */\n  lineItems?: LineItem[];\n  /**\n   * Custom line items. 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   */\n  customLineItems?: CustomLineItem[];\n}\n\nexport interface UpdateCheckoutResponse {\n  /** Updated checkout. */\n  checkout?: Checkout;\n}\n\nexport interface RemoveCouponRequest {\n  /** ID of the checkout to remove the coupon from. */\n  _id: string;\n}\n\nexport interface RemoveCouponResponse {\n  /** Updated checkout after removal of coupon. */\n  checkout?: Checkout;\n}\n\nexport interface RemoveGiftCardRequest {\n  /** ID of the checkout to remove the gift card from. */\n  _id: string;\n}\n\nexport interface RemoveGiftCardResponse {\n  /** Updated checkout after removal of gift card. */\n  checkout?: Checkout;\n}\n\nexport interface RemoveOverrideCheckoutUrlRequest {\n  /** ID of the checkout to remove the override checkout url from. */\n  _id: string;\n}\n\nexport interface RemoveOverrideCheckoutUrlResponse {\n  /** Updated checkout after removal of override checkout url. */\n  checkout?: Checkout;\n}\n\nexport interface AddToCheckoutRequest {\n  /** Checkout ID. */\n  _id: string;\n  /** Catalog line items. */\n  lineItems?: LineItem[];\n  /**\n   * Custom line items. 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   */\n  customLineItems?: CustomLineItem[];\n}\n\nexport interface AddToCheckoutResponse {\n  /** Updated checkout. */\n  checkout?: Checkout;\n}\n\nexport interface RemoveLineItemsRequest {\n  /** ID of the checkout to remove line items from. */\n  _id: string;\n  /** IDs of the line items to remove from the checkout. */\n  lineItemIds: string[];\n}\n\nexport interface RemoveLineItemsResponse {\n  /** Updated checkout after removal of line items. */\n  checkout?: Checkout;\n}\n\nexport interface CreateOrderRequest {\n  /** Checkout ID. */\n  _id: string;\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 CreateOrderResponse extends CreateOrderResponseIdOneOf {\n  /** ID of the newly created order. */\n  orderId?: string;\n  /** ID of newly created subscription. Learn more about your site's [Subscriptions](https://support.wix.com/en/article/wix-stores-managing-product-subscriptions). */\n  subscriptionId?: string;\n  /**\n   * Payment gateway order ID.\n   *\n   * For online orders, pass this value as the `paymentId` parameter to the Wix Pay [`startPayment()`](https://www.wix.com/velo/reference/wix-pay-frontend/startpayment) function so your customer can pay for the order.\n   *\n   * This field will be returned if money needs to be charged. In some cases, money cannot be charged:\n   * + When the total price (the `priceSummary.total.amount` field in the checkout/order objects) is 0. For example, in the case of a free item or an item with a 100% discount.\n   * + If the total price is not 0, but the payment is covered by alternative payment methods, such as a gift card.\n   */\n  paymentGatewayOrderId?: string | null;\n}\n\n/** @oneof */\nexport interface CreateOrderResponseIdOneOf {\n  /** ID of newly created order. */\n  orderId?: string;\n  /** ID of newly created subscription. Learn more about your site's [Subscriptions](https://support.wix.com/en/article/wix-stores-managing-product-subscriptions). */\n  subscriptionId?: string;\n}\n\nexport interface PaymentErrorResponseData {\n  paymentResponseToken?: string | null;\n  transactionStatus?: string;\n  failureDetails?: string | null;\n}\n\nexport interface DoublePaymentErrorData extends DoublePaymentErrorDataIdOneOf {\n  orderId?: string;\n  subscriptionId?: string;\n}\n\n/** @oneof */\nexport interface DoublePaymentErrorDataIdOneOf {\n  orderId?: string;\n  subscriptionId?: string;\n}\n\nexport interface RedeemErrorData {\n  reason?: string;\n}\n\nexport interface ViolationsList {\n  /** Violations risen by ValidationsSPI implementers. */\n  violations?: Violation[];\n}\n\nexport interface CreateOrderAndChargeRequest {\n  /** Checkout ID. */\n  _id: string;\n  /** Payment token. */\n  paymentToken?: string | null;\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 CreateOrderAndChargeResponse\n  extends CreateOrderAndChargeResponseIdOneOf {\n  /** ID of newly created order. */\n  orderId?: string;\n  /** ID of newly created subscription. */\n  subscriptionId?: string;\n  /** Payment response token. */\n  paymentResponseToken?: string | null;\n  /**\n   * For online orders, send this value as a parameter to the Wix Pay [`startPayment()`](https://www.wix.com/velo/reference/wix-pay/startpayment) function to enable your buyer to pay for the order.\n   * `paymentGatewayOrderId` will be returned if money needs to be charged.\n   *\n   * In some cases, money should not be charged:\n   * + If the total price is 0. For example, in the case of a free item or an item with 100% discount.\n   * + If the total price is not 0, but the payment is covered by alternative payment methods, such as a gift card.\n   */\n  paymentGatewayOrderId?: string | null;\n}\n\n/** @oneof */\nexport interface CreateOrderAndChargeResponseIdOneOf {\n  /** ID of newly created order. */\n  orderId?: string;\n  /** ID of newly created subscription. */\n  subscriptionId?: string;\n}\n\nexport interface MarkCheckoutAsCompletedRequest {\n  /** Checkout ID. */\n  _id: string;\n  /**\n   * Order ID.\n   * @internal\n   */\n  orderId?: string | null;\n}\n\nexport interface MarkCheckoutAsCompletedResponse {}\n\n/** Triggered when buyer successfully completed checkout flow */\nexport interface CheckoutMarkedAsCompleted {\n  checkout?: Checkout;\n}\n\nexport interface UpdateLineItemsQuantityRequest {\n  /** Checkout ID. */\n  _id: string;\n  /** Line item info to update. */\n  lineItems: LineItemQuantityUpdate[];\n}\n\nexport interface LineItemQuantityUpdate {\n  /** ID of the line item to update. */\n  _id?: string;\n  /**\n   * New total amount of the line item,\n   * not the amount to add to the current `quantity`.\n   *\n   * Min: `1`\n   *\n   * Max: `100000`\n   */\n  quantity?: number;\n}\n\nexport interface UpdateLineItemsQuantityResponse {\n  /** Updated checkout. */\n  checkout?: Checkout;\n}\n\nexport interface GetCheckoutPaymentSettingsRequest {\n  /** Checkout ID. */\n  _id: string;\n}\n\nexport interface GetCheckoutPaymentSettingsResponse {\n  blockedPaymentOptions?: GetCheckoutPaymentSettingsResponsePaymentOption[];\n}\n\nexport enum GetCheckoutPaymentSettingsResponsePaymentOption {\n  UNKNOWN_PAYMENT_OPTION = 'UNKNOWN_PAYMENT_OPTION',\n  MANUAL = 'MANUAL',\n}\n\nexport interface DeleteCheckoutRequest {\n  /** ID of the checkout to delete. */\n  _id?: string;\n}\n\nexport interface DeleteCheckoutResponse {}\n\nexport interface SubscriptionCreated {\n  subscription?: Subscription;\n}\n\nexport interface Subscription {\n  /**\n   * Subscription id (auto-generated upon subscription creation)\n   * @readonly\n   */\n  _id?: string;\n  /** id of subscription in external system */\n  externalId?: string | null;\n  /**\n   * Subscription creation date\n   * @readonly\n   */\n  dateCreated?: Date | null;\n  /** The id of the cart this order was created from */\n  cartId?: string | null;\n  /** The id of the checkout this subscriptions was created from */\n  checkoutId?: string | null;\n  /** member or contact */\n  buyerInfo?: V1BuyerInfo;\n  /** Line items ordered */\n  lineItems?: V1LineItem[];\n  /** Totals for subscription's line items */\n  totals?: Totals;\n  /** site settings at the moment when subscription created */\n  storeSettings?: StoreSettings;\n  /** Full billing address */\n  billingAddress?: Address;\n  /** Delivery information */\n  shippingInfo?: V1ShippingInfo;\n  /** Coupon that was applied to subscription */\n  appliedCoupon?: AppliedCoupon;\n  /** Message from the customer (e.g., customization request) */\n  buyerNote?: string | null;\n  /** Custom field */\n  customField?: V1CustomField;\n  /** Information about subscription option from which subscription was created */\n  subscriptionOptionInfo?: V1SubscriptionOptionInfo;\n  /** Sales channel that submitted this subscription */\n  channelInfo?: ChannelInfo;\n  /** defines when subscriber will be charged: for frequency=MONTH, billingCycles=6, interval=2 payment will be done every 2 month during one year */\n  subscriptionSettings?: V1SubscriptionSettings;\n  /**\n   * information about first subscription payment\n   * @readonly\n   */\n  billingInfo?: BillingInfo;\n}\n\n/** Buyer Info */\nexport interface V1BuyerInfo {\n  /** Wix customer ID */\n  _id?: string;\n  /** Customer type */\n  identityType?: IdentityType;\n}\n\nexport enum IdentityType {\n  UNSPECIFIED_IDENTITY_TYPE = 'UNSPECIFIED_IDENTITY_TYPE',\n  /** Site member */\n  MEMBER = 'MEMBER',\n  /** Contact */\n  CONTACT = 'CONTACT',\n}\n\nexport interface V1LineItem {\n  /** Line item ID (auto-generated) */\n  index?: number;\n  /** Line item quantity */\n  quantity?: number;\n  /** Line item variantId (from Stores Catalog) */\n  variantId?: string | null;\n  /** Line item options ordered */\n  options?: OptionSelection[];\n  /** Line item custom text field selections */\n  customTextFields?: CustomTextFieldSelection[];\n  /** Charges details */\n  chargeDetails?: ChargeDetails;\n  /** Product details */\n  productDetails?: ProductDetails;\n}\n\nexport interface OptionSelection {\n  /** Option name */\n  option?: string;\n  /** Selected choice for this option */\n  selection?: string;\n}\n\nexport interface CustomTextFieldSelection {\n  /** Custom text field name */\n  title?: string;\n  /** Custom text field value */\n  value?: string;\n}\n\nexport interface ChargeDetails {\n  /** price of line item (depends on subscription option) */\n  price?: number;\n  /** Total price charged to the customer (for this line items) after computation of quantity and discount */\n  totalPrice?: number | null;\n  /** Discount applied for this line item */\n  discount?: number | null;\n  /** Tax applied for this line item */\n  tax?: number | null;\n  /** Is tax applied for this line item */\n  taxIncludedInPrice?: boolean;\n  /** Tax rate %, as a decimal point >= 0 */\n  taxRate?: string | null;\n}\n\nexport interface ProductDetails {\n  /** Line item product ID (optional for POS orders) */\n  productId?: string | null;\n  /** Line item name */\n  name?: string;\n  /** Line item name translated to buyer's language */\n  translatedName?: string | null;\n  /** Line item type (may be extended) */\n  lineItemType?: LineItemType;\n  /** Line item primary media for preview */\n  mediaItem?: MediaItem;\n  /** Line item SKU */\n  sku?: string | null;\n  /** Line item weight */\n  weight?: number | null;\n  /** Line item notes */\n  notes?: string | null;\n  /** Line item fulfillerId from stores fulfillers. No value means self fulfilled */\n  fulfillerId?: string | null;\n  /** Tax group id */\n  taxGroupId?: string | null;\n  /** App id from the catalog reference */\n  appId?: string | null;\n}\n\nexport enum LineItemType {\n  /** Line item type can't be classified, due to an error */\n  UNSPECIFIED_LINE_ITEM_TYPE = 'UNSPECIFIED_LINE_ITEM_TYPE',\n  /** Physical item type */\n  PHYSICAL = 'PHYSICAL',\n  /** Digital item type */\n  DIGITAL = 'DIGITAL',\n  /** Custom item price */\n  CUSTOM_AMOUNT_ITEM = 'CUSTOM_AMOUNT_ITEM',\n}\n\nexport interface MediaItem {\n  /**\n   * Media type\n   * @readonly\n   */\n  mediaType?: MediaItemType;\n  /**\n   * Media URL\n   * @readonly\n   */\n  url?: string;\n  /**\n   * Media item width\n   * @readonly\n   */\n  width?: number;\n  /**\n   * Media item height\n   * @readonly\n   */\n  height?: number;\n  /** Media ID (for media items previously saved in Wix Media) */\n  _id?: string | null;\n  /** Media external URL */\n  externalImageUrl?: string | null;\n  /** Alternative text for presentation when media cannot be displayed */\n  altText?: string | null;\n}\n\nexport enum MediaItemType {\n  /** Media item type can't be classified, due to an error */\n  UNSPECIFIED_MEDIA_TYPE_ITEM = 'UNSPECIFIED_MEDIA_TYPE_ITEM',\n  /** Image item type */\n  IMAGE = 'IMAGE',\n}\n\nexport interface Totals {\n  /** Subtotal of all line items, before tax */\n  subtotal?: number;\n  /** Total shipping price, including tax */\n  shipping?: number;\n  /** Total tax */\n  tax?: number;\n  /** Total calculated discount value */\n  discount?: number;\n  /** Total price */\n  total?: number;\n  /** Total weight */\n  weight?: number | null;\n  /**\n   * Total line items quantity\n   * @readonly\n   */\n  quantity?: number;\n}\n\nexport interface StoreSettings {\n  /** Currency used for pricing in this store */\n  currency?: string | null;\n  /** Weight unit used in this store */\n  weightUnit?: WeightUnit;\n  /**\n   * The language to be used when communicating with the buyer\n   * For a site that support multiple languages, this would be the language the buyer selected\n   * Otherwise this would be the site language\n   */\n  buyerLanguage?: string | null;\n}\n\nexport interface Address extends AddressAddressLine1OptionsOneOf {\n  /** Address line 1 (free text) */\n  addressLine1?: string;\n  /** Address line 1 (street) */\n  street?: Street;\n  /** Addressee name */\n  fullName?: FullName;\n  /** Country code (2 letters) */\n  country?: string | null;\n  /** State or district */\n  subdivision?: string | null;\n  /** City name */\n  city?: string | null;\n  /** ZIP/postal code */\n  zipCode?: string | null;\n  /** Phone number */\n  phone?: string | null;\n  /** Company name */\n  company?: string | null;\n  /** Email address */\n  email?: string | null;\n  /** address line */\n  addressLine2?: string | null;\n  /** Tax information (for Brazil only) */\n  vatId?: VatId;\n}\n\n/** @oneof */\nexport interface AddressAddressLine1OptionsOneOf {\n  /** Address line 1 (free text) */\n  addressLine1?: string;\n  /** Address line 1 (street) */\n  street?: Street;\n}\n\nexport interface FullName {\n  /** Customer's first name */\n  firstName?: string;\n  /** Customer's last name */\n  lastName?: string;\n}\n\nexport interface Street {\n  /** Street number */\n  number?: string;\n  /** Street name */\n  name?: string;\n}\n\nexport interface VatId {\n  /** Customer's tax ID. */\n  number?: string;\n  /**\n   * Tax type.\n   * + `CPF`: For individual tax payers.\n   * + `CNPJ`: For corporations.\n   */\n  type?: VatType;\n}\n\n/** Brazilian tax info types */\nexport enum VatType {\n  /** When the tax info type can't be classified, due to an error */\n  UNSPECIFIED_TAX_TYPE = 'UNSPECIFIED_TAX_TYPE',\n  /** CPF - for individual tax payers */\n  CPF = 'CPF',\n  /** CNPJ - for corporations */\n  CNPJ = 'CNPJ',\n}\n\nexport interface V1ShippingInfo extends V1ShippingInfoDetailsOneOf {\n  /** Shipment details (when this object describes shipment) */\n  shipmentDetails?: ShipmentDetails;\n  /** Pickup details (when this object describes pickup) */\n  pickupDetails?: V1PickupDetails;\n  /** Delivery option name */\n  deliveryOption?: string;\n  /** Delivery option delivery time */\n  estimatedDeliveryTime?: string | null;\n}\n\n/** @oneof */\nexport interface V1ShippingInfoDetailsOneOf {\n  /** Shipment details (when this object describes shipment) */\n  shipmentDetails?: ShipmentDetails;\n  /** Pickup details (when this object describes pickup) */\n  pickupDetails?: V1PickupDetails;\n}\n\nexport interface ShipmentDetails {\n  /** Shipping destination address */\n  address?: Address;\n  /** Discount applied for shipping */\n  discount?: number | null;\n  /** Tax applied for shipping */\n  tax?: number | null;\n  /** Whether tax is included in the price */\n  taxIncludedInPrice?: boolean;\n  /** Tax rate % for shipping, as a decimal point >= 0 */\n  taxRate?: string | null;\n}\n\nexport interface V1PickupDetails {\n  /** Pickup address */\n  address?: PickupAddress;\n  /** Store owner's pickup instructions */\n  pickupInstructions?: string | null;\n}\n\nexport interface PickupAddress {\n  /** Country code (2 letters) */\n  country?: string;\n  /** State/District */\n  subdivision?: string | null;\n  /** Address */\n  addressLine?: string;\n  /** City */\n  city?: string;\n  /** ZIP/postal code */\n  zipCode?: string;\n}\n\nexport interface AppliedCoupon {\n  /** Coupon ID */\n  couponId?: string;\n  /** Coupon name */\n  name?: string;\n  /** Coupon code */\n  code?: string;\n}\n\n/** Custom field */\nexport interface V1CustomField {\n  /** Free text that the customer entered in the custom field during the checkout process */\n  value?: string;\n  /** Title for the custom field */\n  title?: string;\n  /** The title translated according to the buyer language */\n  translatedTitle?: string;\n}\n\nexport interface V1SubscriptionOptionInfo {\n  _id?: string | null;\n  title?: string;\n  description?: string | null;\n  discount?: Discount;\n}\n\nexport interface Discount {\n  /** Discount type. */\n  type?: DiscountDiscountType;\n  /** Discount value. */\n  value?: number;\n}\n\nexport enum DiscountDiscountType {\n  UNDEFINED = 'UNDEFINED',\n  /** No discount */\n  AMOUNT = 'AMOUNT',\n  PERCENT = 'PERCENT',\n}\n\nexport interface ChannelInfo {\n  /** Sales channel that submitted the subscription */\n  type?: ChannelInfoChannelType;\n}\n\nexport enum ChannelInfoChannelType {\n  UNSPECIFIED = 'UNSPECIFIED',\n  WEB = 'WEB',\n  OTHER_PLATFORM = 'OTHER_PLATFORM',\n  WIX_APP_STORE = 'WIX_APP_STORE',\n}\n\nexport interface V1SubscriptionSettings {\n  /** Frequency of recurring payment. */\n  frequency?: SubscriptionFrequency;\n  /** Whether subscription is renewed automatically at the end of each period. */\n  autoRenewal?: boolean;\n  /** Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`. */\n  billingCycles?: number | null;\n}\n\nexport interface BillingInfo {\n  /** Payment method used for this order */\n  paymentMethod?: string | null;\n  /** Transaction ID from payment gateway (e.g., Wix Payments) */\n  paymentGatewayTransactionId?: string | null;\n  /** Order ID from payment gateway (e.g., Wix Payments) */\n  paymentGatewayOrderId?: string | null;\n}\n\nexport interface Empty {}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n  createdEvent?: EntityCreatedEvent;\n  updatedEvent?: EntityUpdatedEvent;\n  deletedEvent?: EntityDeletedEvent;\n  actionEvent?: ActionEvent;\n  /**\n   * Unique event ID.\n   * Allows clients to ignore duplicate webhooks.\n   */\n  _id?: string;\n  /**\n   * Assumes actions are also always typed to an entity_type\n   * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction\n   */\n  entityFqdn?: string;\n  /**\n   * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\n   * This is although the created/updated/deleted notion is duplication of the oneof types\n   * 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 defining the order of updates to the underlying entity.\n   * For example, given that some entity was updated at 16:00 and than again at 16:01,\n   * it is guaranteed that the sequence number of the second update is strictly higher than the first.\n   * As the consumer, you can use this value to ensure that you handle messages in the correct order.\n   * To do so, you will need to persist this number on your end, and compare the sequence number from the\n   * message against the one you have stored. Given that the stored number is higher, you should ignore the message.\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  /** App instance ID. */\n  instanceId?: string | null;\n  /** Event type. */\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  /** ID of a site visitor that has not logged in to the site. */\n  anonymousVisitorId?: string;\n  /** ID of a site visitor that has logged in to the site. */\n  memberId?: string;\n  /** ID of a Wix user (site owner, contributor, etc.). */\n  wixUserId?: string;\n  /** ID of an app. */\n  appId?: string;\n  /** @readonly */\n  identityType?: WebhookIdentityType;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n  /** ID of a site visitor that has not logged in to the site. */\n  anonymousVisitorId?: string;\n  /** ID of a site visitor that has logged in to the site. */\n  memberId?: string;\n  /** ID of a Wix user (site owner, contributor, etc.). */\n  wixUserId?: string;\n  /** ID of an app. */\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\ninterface CatalogReferenceNonNullableFields {\n  catalogItemId: string;\n  appId: string;\n}\n\ninterface ProductNameNonNullableFields {\n  original: string;\n}\n\ninterface MultiCurrencyPriceNonNullableFields {\n  amount: string;\n  convertedAmount: string;\n  formattedAmount: string;\n  formattedConvertedAmount: string;\n}\n\ninterface TaxRateBreakdownNonNullableFields {\n  name: string;\n  rate: string;\n  tax?: MultiCurrencyPriceNonNullableFields;\n  exemptAmount?: MultiCurrencyPriceNonNullableFields;\n  exemptionIds: number[];\n  taxableAmount?: MultiCurrencyPriceNonNullableFields;\n}\n\ninterface TaxBreakdownNonNullableFields {\n  nonTaxableAmount?: MultiCurrencyPriceNonNullableFields;\n  taxAmount?: MultiCurrencyPriceNonNullableFields;\n  taxableAmount?: MultiCurrencyPriceNonNullableFields;\n  jurisdictionType: JurisdictionType;\n}\n\ninterface ItemTaxFullDetailsNonNullableFields {\n  taxableAmount?: MultiCurrencyPriceNonNullableFields;\n  taxRate: string;\n  totalTax?: MultiCurrencyPriceNonNullableFields;\n  rateBreakdown: TaxRateBreakdownNonNullableFields[];\n  exemptAmount?: MultiCurrencyPriceNonNullableFields;\n  taxBreakdown: TaxBreakdownNonNullableFields[];\n}\n\ninterface PlainTextValueNonNullableFields {\n  original: string;\n}\n\ninterface ColorNonNullableFields {\n  original: string;\n}\n\ninterface DescriptionLineNameNonNullableFields {\n  original: string;\n}\n\ninterface DescriptionLineNonNullableFields {\n  plainText?: PlainTextValueNonNullableFields;\n  colorInfo?: ColorNonNullableFields;\n  plainTextValue?: PlainTextValueNonNullableFields;\n  color: string;\n  name?: DescriptionLineNameNonNullableFields;\n  lineType: DescriptionLineType;\n}\n\ninterface ItemAvailabilityInfoNonNullableFields {\n  status: ItemAvailabilityStatus;\n}\n\ninterface PhysicalPropertiesNonNullableFields {\n  shippable: boolean;\n}\n\ninterface GroupNonNullableFields {\n  name: string;\n}\n\ninterface ScopeNonNullableFields {\n  namespace: string;\n  group?: GroupNonNullableFields;\n}\n\ninterface ItemTypeNonNullableFields {\n  preset: ItemTypeItemType;\n  custom: string;\n}\n\ninterface FreeTrialPeriodNonNullableFields {\n  frequency: SubscriptionFrequency;\n  interval: number;\n}\n\ninterface SubscriptionSettingsNonNullableFields {\n  frequency: SubscriptionFrequency;\n  autoRenewal: boolean;\n  /** @internal */\n  enableCustomerCancellation: boolean;\n  /** @internal */\n  freeTrialPeriod?: FreeTrialPeriodNonNullableFields;\n}\n\ninterface TitleNonNullableFields {\n  original: string;\n}\n\ninterface DescriptionNonNullableFields {\n  original: string;\n}\n\ninterface SubscriptionOptionInfoNonNullableFields {\n  subscriptionSettings?: SubscriptionSettingsNonNullableFields;\n  title?: TitleNonNullableFields;\n  description?: DescriptionNonNullableFields;\n}\n\ninterface SecuredMediaNonNullableFields {\n  _id: string;\n  fileName: string;\n  fileType: FileType;\n}\n\ninterface PriceDescriptionNonNullableFields {\n  original: string;\n}\n\ninterface PaymentOptionNonNullableFields {\n  value: PaymentOptionType;\n}\n\ninterface CatalogOverrideFieldsNonNullableFields {\n  productName?: ProductNameNonNullableFields;\n  descriptionLines: DescriptionLineNonNullableFields[];\n  physicalProperties?: PhysicalPropertiesNonNullableFields;\n  image: string;\n  paymentOption?: PaymentOptionNonNullableFields;\n}\n\ninterface TaxableAddressNonNullableFields {\n  addressType: TaxableAddressType;\n}\n\ninterface PolicyNonNullableFields {\n  content: string;\n}\n\ninterface LineItemNonNullableFields {\n  quantity: number;\n  catalogReference?: CatalogReferenceNonNullableFields;\n  productName?: ProductNameNonNullableFields;\n  url: string;\n  price?: MultiCurrencyPriceNonNullableFields;\n  lineItemPrice?: MultiCurrencyPriceNonNullableFields;\n  fullPrice?: MultiCurrencyPriceNonNullableFields;\n  priceBeforeDiscounts?: MultiCurrencyPriceNonNullableFields;\n  totalPriceAfterTax?: MultiCurrencyPriceNonNullableFields;\n  totalPriceBeforeTax?: MultiCurrencyPriceNonNullableFields;\n  taxDetails?: ItemTaxFullDetailsNonNullableFields;\n  discount?: MultiCurrencyPriceNonNullableFields;\n  descriptionLines: DescriptionLineNonNullableFields[];\n  media: string;\n  availability?: ItemAvailabilityInfoNonNullableFields;\n  physicalProperties?: PhysicalPropertiesNonNullableFields;\n  /** @internal */\n  couponScopes: ScopeNonNullableFields[];\n  itemType?: ItemTypeNonNullableFields;\n  subscriptionOptionInfo?: SubscriptionOptionInfoNonNullableFields;\n  digitalFile?: SecuredMediaNonNullableFields;\n  paymentOption: PaymentOptionType;\n  priceDescription?: PriceDescriptionNonNullableFields;\n  depositAmount?: MultiCurrencyPriceNonNullableFields;\n  customLineItem: boolean;\n  catalogOverrideFields?: CatalogOverrideFieldsNonNullableFields;\n  /** @internal */\n  priceUndetermined: boolean;\n  /** @internal */\n  fixedQuantity: boolean;\n  savePaymentMethod: boolean;\n  /** @internal */\n  taxableAddress?: TaxableAddressNonNullableFields;\n  /** @internal */\n  policies: PolicyNonNullableFields[];\n  /** @internal */\n  membersOnly: boolean;\n}\n\ninterface StreetAddressNonNullableFields {\n  number: string;\n  name: string;\n  apt: string;\n}\n\ninterface ApiAddressNonNullableFields {\n  streetAddress?: StreetAddressNonNullableFields;\n}\n\ninterface CommonVatIdNonNullableFields {\n  _id: string;\n  type: CommonVatType;\n}\n\ninterface FullAddressContactDetailsNonNullableFields {\n  vatId?: CommonVatIdNonNullableFields;\n}\n\ninterface AddressWithContactNonNullableFields {\n  address?: ApiAddressNonNullableFields;\n  contactDetails?: FullAddressContactDetailsNonNullableFields;\n}\n\ninterface PickupDetailsNonNullableFields {\n  address?: ApiAddressNonNullableFields;\n  businessLocation: boolean;\n  pickupMethod: PickupMethod;\n}\n\ninterface DeliveryLogisticsNonNullableFields {\n  pickupDetails?: PickupDetailsNonNullableFields;\n}\n\ninterface SelectedCarrierServiceOptionPricesNonNullableFields {\n  totalPriceAfterTax?: MultiCurrencyPriceNonNullableFields;\n  totalPriceBeforeTax?: MultiCurrencyPriceNonNullableFields;\n  taxDetails?: ItemTaxFullDetailsNonNullableFields;\n  totalDiscount?: MultiCurrencyPriceNonNullableFields;\n  price?: MultiCurrencyPriceNonNullableFields;\n}\n\ninterface SelectedCarrierServiceOptionOtherChargeNonNullableFields {\n  type: ChargeType;\n  cost?: SelectedCarrierServiceOptionPricesNonNullableFields;\n}\n\ninterface CarrierNonNullableFields {\n  code: string;\n}\n\ninterface ApplicableLineItemsNonNullableFields {\n  lineItemIds: string[];\n}\n\ninterface DeliveryAllocationNonNullableFields {\n  deliveryCarrier?: CarrierNonNullableFields;\n  applicableLineItems?: ApplicableLineItemsNonNullableFields;\n}\n\ninterface SelectedCarrierServiceOptionNonNullableFields {\n  code: string;\n  title: string;\n  logistics?: DeliveryLogisticsNonNullableFields;\n  cost?: SelectedCarrierServiceOptionPricesNonNullableFields;\n  requestedShippingOption: boolean;\n  otherCharges: SelectedCarrierServiceOptionOtherChargeNonNullableFields[];\n  deliveryAllocations: DeliveryAllocationNonNullableFields[];\n}\n\ninterface ShippingRegionNonNullableFields {\n  _id: string;\n  name: string;\n}\n\ninterface OtherChargeNonNullableFields {\n  type: ChargeType;\n  price?: MultiCurrencyPriceNonNullableFields;\n}\n\ninterface ShippingPriceNonNullableFields {\n  price?: MultiCurrencyPriceNonNullableFields;\n  otherCharges: OtherChargeNonNullableFields[];\n}\n\ninterface ShippingOptionNonNullableFields {\n  code: string;\n  title: string;\n  logistics?: DeliveryLogisticsNonNullableFields;\n  cost?: ShippingPriceNonNullableFields;\n  deliveryAllocations: DeliveryAllocationNonNullableFields[];\n}\n\ninterface CarrierServiceOptionNonNullableFields {\n  carrierId: string;\n  shippingOptions: ShippingOptionNonNullableFields[];\n}\n\ninterface ShippingInfoNonNullableFields {\n  shippingDestination?: AddressWithContactNonNullableFields;\n  selectedCarrierServiceOption?: SelectedCarrierServiceOptionNonNullableFields;\n  region?: ShippingRegionNonNullableFields;\n  carrierServiceOptions: CarrierServiceOptionNonNullableFields[];\n}\n\ninterface BuyerInfoNonNullableFields {\n  visitorId: string;\n  memberId: string;\n  openAccess: boolean;\n}\n\ninterface PriceSummaryNonNullableFields {\n  subtotal?: MultiCurrencyPriceNonNullableFields;\n  shipping?: MultiCurrencyPriceNonNullableFields;\n  tax?: MultiCurrencyPriceNonNullableFields;\n  discount?: MultiCurrencyPriceNonNullableFields;\n  total?: MultiCurrencyPriceNonNullableFields;\n  additionalFees?: MultiCurrencyPriceNonNullableFields;\n}\n\ninterface ApplicationErrorNonNullableFields {\n  code: string;\n  description: string;\n}\n\ninterface FieldViolationNonNullableFields {\n  field: string;\n  description: string;\n  violatedRule: RuleType;\n}\n\ninterface ValidationErrorNonNullableFields {\n  fieldViolations: FieldViolationNonNullableFields[];\n}\n\ninterface DetailsNonNullableFields {\n  applicationError?: ApplicationErrorNonNullableFields;\n  validationError?: ValidationErrorNonNullableFields;\n}\n\ninterface CarrierErrorNonNullableFields {\n  carrierId: string;\n  error?: DetailsNonNullableFields;\n}\n\ninterface CarrierErrorsNonNullableFields {\n  errors: CarrierErrorNonNullableFields[];\n}\n\ninterface CalculationErrorsNonNullableFields {\n  generalShippingCalculationError?: DetailsNonNullableFields;\n  carrierErrors?: CarrierErrorsNonNullableFields;\n  taxCalculationError?: DetailsNonNullableFields;\n  couponCalculationError?: DetailsNonNullableFields;\n  giftCardCalculationError?: DetailsNonNullableFields;\n  orderValidationErrors: ApplicationErrorNonNullableFields[];\n  membershipError?: DetailsNonNullableFields;\n  discountsCalculationError?: DetailsNonNullableFields;\n}\n\ninterface GiftCardNonNullableFields {\n  _id: string;\n  obfuscatedCode: string;\n  amount?: MultiCurrencyPriceNonNullableFields;\n  appId: string;\n}\n\ninterface CouponNonNullableFields {\n  _id: string;\n  code: string;\n  amount?: MultiCurrencyPriceNonNullableFields;\n  name: string;\n  couponType: string;\n}\n\ninterface MerchantDiscountNonNullableFields {\n  amount?: MultiCurrencyPriceNonNullableFields;\n}\n\ninterface DiscountRuleNameNonNullableFields {\n  original: string;\n}\n\ninterface DiscountRuleNonNullableFields {\n  _id: string;\n  name?: DiscountRuleNameNonNullableFields;\n  amount?: MultiCurrencyPriceNonNullableFields;\n}\n\ninterface LineItemDiscountNonNullableFields {\n  _id: string;\n  totalDiscountAmount?: MultiCurrencyPriceNonNullableFields;\n}\n\ninterface AppliedDiscountNonNullableFields {\n  coupon?: CouponNonNullableFields;\n  merchantDiscount?: MerchantDiscountNonNullableFields;\n  discountRule?: DiscountRuleNonNullableFields;\n  discountType: DiscountType;\n  lineItemIds: string[];\n  lineItemDiscounts: LineItemDiscountNonNullableFields[];\n}\n\ninterface CustomFieldNonNullableFields {\n  title: string;\n}\n\ninterface AutoTaxFallbackCalculationDetailsNonNullableFields {\n  fallbackReason: FallbackReason;\n  error?: ApplicationErrorNonNullableFields;\n}\n\ninterface TaxCalculationDetailsNonNullableFields {\n  manualRateReason: ManualCalculationReason;\n  autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetailsNonNullableFields;\n  rateType: RateType;\n}\n\ninterface AggregatedTaxBreakdownNonNullableFields {\n  taxName: string;\n  taxType: string;\n  jurisdiction: string;\n  jurisdictionTypeEnum: JurisdictionType;\n  rate: string;\n  aggregatedTaxAmount?: MultiCurrencyPriceNonNullableFields;\n  aggregatedTaxableAmount?: MultiCurrencyPriceNonNullableFields;\n}\n\ninterface TaxSummaryNonNullableFields {\n  taxableAmount?: MultiCurrencyPriceNonNullableFields;\n  totalTax?: MultiCurrencyPriceNonNullableFields;\n  manualTaxRate: string;\n  calculationDetails?: TaxCalculationDetailsNonNullableFields;\n  totalExempt?: MultiCurrencyPriceNonNullableFields;\n  aggregatedTaxBreakdown: AggregatedTaxBreakdownNonNullableFields[];\n}\n\ninterface CreatedByNonNullableFields {\n  userId: string;\n  memberId: string;\n  visitorId: string;\n  appId: string;\n}\n\ninterface MembershipNameNonNullableFields {\n  original: string;\n}\n\ninterface MembershipPaymentCreditsNonNullableFields {\n  total: number;\n  remaining: number;\n}\n\ninterface MembershipNonNullableFields {\n  _id: string;\n  appId: string;\n  name?: MembershipNameNonNullableFields;\n  lineItemIds: string[];\n  credits?: MembershipPaymentCreditsNonNullableFields;\n}\n\ninterface InvalidMembershipNonNullableFields {\n  membership?: MembershipNonNullableFields;\n  reason: string;\n}\n\ninterface SelectedMembershipNonNullableFields {\n  _id: string;\n  appId: string;\n  lineItemIds: string[];\n}\n\ninterface SelectedMembershipsNonNullableFields {\n  memberships: SelectedMembershipNonNullableFields[];\n}\n\ninterface MembershipOptionsNonNullableFields {\n  eligibleMemberships: MembershipNonNullableFields[];\n  invalidMemberships: InvalidMembershipNonNullableFields[];\n  selectedMemberships?: SelectedMembershipsNonNullableFields;\n}\n\ninterface AdditionalFeeNonNullableFields {\n  name: string;\n  price?: MultiCurrencyPriceNonNullableFields;\n  taxDetails?: ItemTaxFullDetailsNonNullableFields;\n  priceBeforeTax?: MultiCurrencyPriceNonNullableFields;\n  priceAfterTax?: MultiCurrencyPriceNonNullableFields;\n  lineItemIds: string[];\n  source: AdditionalFeeSource;\n}\n\ninterface ConversionInfoNonNullableFields {\n  siteCurrency: string;\n  conversionRate: string;\n}\n\ninterface OtherNonNullableFields {\n  name: NameInOther;\n}\n\ninterface TargetLineItemNonNullableFields {\n  name: NameInLineItem;\n  /** @internal */\n  suggestedFix: SuggestedFix;\n}\n\ninterface TargetNonNullableFields {\n  other?: OtherNonNullableFields;\n  lineItem?: TargetLineItemNonNullableFields;\n}\n\ninterface ViolationNonNullableFields {\n  severity: Severity;\n  target?: TargetNonNullableFields;\n}\n\ninterface CustomSettingsNonNullableFields {\n  lockGiftCard: boolean;\n  lockCouponCode: boolean;\n  disabledPolicyAgreementCheckbox: boolean;\n  disabledManualPayment: boolean;\n}\n\ninterface CustomContentReferenceNonNullableFields {\n  appId: string;\n  componentId: string;\n}\n\ninterface ExternalReferenceNonNullableFields {\n  appId: string;\n}\n\ninterface ChargeNonNullableFields {\n  cycleFrom: number;\n  priceSummary?: PriceSummaryNonNullableFields;\n}\n\ninterface SubscriptionChargesNonNullableFields {\n  lineItemIds: string[];\n  charges: ChargeNonNullableFields[];\n}\n\nexport interface CheckoutNonNullableFields {\n  lineItems: LineItemNonNullableFields[];\n  billingInfo?: AddressWithContactNonNullableFields;\n  shippingInfo?: ShippingInfoNonNullableFields;\n  buyerInfo?: BuyerInfoNonNullableFields;\n  conversionCurrency: string;\n  priceSummary?: PriceSummaryNonNullableFields;\n  calculationErrors?: CalculationErrorsNonNullableFields;\n  giftCard?: GiftCardNonNullableFields;\n  appliedDiscounts: AppliedDiscountNonNullableFields[];\n  customFields: CustomFieldNonNullableFields[];\n  weightUnit: WeightUnit;\n  taxSummary?: TaxSummaryNonNullableFields;\n  currency: string;\n  channelType: ChannelType;\n  siteLanguage: string;\n  buyerLanguage: string;\n  completed: boolean;\n  taxIncludedInPrice: boolean;\n  createdBy?: CreatedByNonNullableFields;\n  payNow?: PriceSummaryNonNullableFields;\n  payLater?: PriceSummaryNonNullableFields;\n  membershipOptions?: MembershipOptionsNonNullableFields;\n  additionalFees: AdditionalFeeNonNullableFields[];\n  conversionInfo?: ConversionInfoNonNullableFields;\n  payNowTotalAfterGiftCard?: MultiCurrencyPriceNonNullableFields;\n  violations: ViolationNonNullableFields[];\n  totalAfterGiftCard?: MultiCurrencyPriceNonNullableFields;\n  customSettings?: CustomSettingsNonNullableFields;\n  customContentReference?: CustomContentReferenceNonNullableFields;\n  externalReference?: ExternalReferenceNonNullableFields;\n  /** @internal */\n  payAfterFreeTrial?: PriceSummaryNonNullableFields;\n  /** @internal */\n  paymentRequired: boolean;\n  /** @internal */\n  subscriptionCharges: SubscriptionChargesNonNullableFields[];\n}\n\nexport interface CreateCheckoutResponseNonNullableFields {\n  checkout?: CheckoutNonNullableFields;\n}\n\nexport interface GetCheckoutResponseNonNullableFields {\n  checkout?: CheckoutNonNullableFields;\n}\n\nexport interface GetCheckoutByCartIdResponseNonNullableFields {\n  checkout?: CheckoutNonNullableFields;\n}\n\nexport interface GetWixCheckoutURLResponseNonNullableFields {\n  checkoutUrl: string;\n}\n\nexport interface GetCheckoutURLResponseNonNullableFields {\n  checkoutUrl: string;\n}\n\nexport interface UpdateCheckoutResponseNonNullableFields {\n  checkout?: CheckoutNonNullableFields;\n}\n\nexport interface RemoveCouponResponseNonNullableFields {\n  checkout?: CheckoutNonNullableFields;\n}\n\nexport interface RemoveGiftCardResponseNonNullableFields {\n  checkout?: CheckoutNonNullableFields;\n}\n\nexport interface RemoveOverrideCheckoutUrlResponseNonNullableFields {\n  checkout?: CheckoutNonNullableFields;\n}\n\nexport interface AddToCheckoutResponseNonNullableFields {\n  checkout?: CheckoutNonNullableFields;\n}\n\nexport interface RemoveLineItemsResponseNonNullableFields {\n  checkout?: CheckoutNonNullableFields;\n}\n\nexport interface CreateOrderResponseNonNullableFields {\n  orderId: string;\n  subscriptionId: string;\n}\n\nexport interface CreateOrderAndChargeResponseNonNullableFields {\n  orderId: string;\n  subscriptionId: string;\n}\n\nexport interface UpdateLineItemsQuantityResponseNonNullableFields {\n  checkout?: CheckoutNonNullableFields;\n}\n\nexport interface GetCheckoutPaymentSettingsResponseNonNullableFields {\n  blockedPaymentOptions: GetCheckoutPaymentSettingsResponsePaymentOption[];\n}\n\nexport interface BaseEventMetadata {\n  /** App instance ID. */\n  instanceId?: string | null;\n  /** Event type. */\n  eventType?: string;\n  /** The identification type and identity data. */\n  identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n  /**\n   * Unique event ID.\n   * Allows clients to ignore duplicate webhooks.\n   */\n  _id?: string;\n  /**\n   * Assumes actions are also always typed to an entity_type\n   * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction\n   */\n  entityFqdn?: string;\n  /**\n   * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\n   * This is although the created/updated/deleted notion is duplication of the oneof types\n   * 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 defining the order of updates to the underlying entity.\n   * For example, given that some entity was updated at 16:00 and than again at 16:01,\n   * it is guaranteed that the sequence number of the second update is strictly higher than the first.\n   * As the consumer, you can use this value to ensure that you handle messages in the correct order.\n   * To do so, you will need to persist this number on your end, and compare the sequence number from the\n   * message against the one you have stored. Given that the stored number is higher, you should ignore the message.\n   */\n  entityEventSequence?: string | null;\n}\n\nexport interface CheckoutCompletedEnvelope {\n  data: CheckoutMarkedAsCompleted;\n  metadata: EventMetadata;\n}\n\n/**\n * Triggered when an order created from this checkout is\n * successfully paid for or when a checkout is marked as completed.\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Read eCommerce - all read permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM\n * @permissionScope Read Orders\n * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS\n * @permissionScope Read Stores - all read permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS\n * @permissionId ECOM.READ_CHECKOUTS\n * @webhook\n * @eventType wix.ecom.v1.checkout_completed\n */\nexport declare function onCheckoutCompleted(\n  handler: (event: CheckoutCompletedEnvelope) => void | Promise<void>\n): void;\n\nexport interface CheckoutCreatedEnvelope {\n  entity: Checkout;\n  metadata: EventMetadata;\n}\n\n/**\n * Triggered when a checkout is created.\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Read eCommerce - all read permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM\n * @permissionScope Read Orders\n * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS\n * @permissionScope Read Stores - all read permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS\n * @permissionId ECOM.READ_CHECKOUTS\n * @webhook\n * @eventType wix.ecom.v1.checkout_created\n */\nexport declare function onCheckoutCreated(\n  handler: (event: CheckoutCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface CheckoutUpdatedEnvelope {\n  entity: Checkout;\n  metadata: EventMetadata;\n}\n\n/**\n * Triggered when a checkout is updated.\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Read eCommerce - all read permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM\n * @permissionScope Read Orders\n * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS\n * @permissionScope Read Stores - all read permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS\n * @permissionId ECOM.READ_CHECKOUTS\n * @webhook\n * @eventType wix.ecom.v1.checkout_updated\n */\nexport declare function onCheckoutUpdated(\n  handler: (event: CheckoutUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Creates a checkout.\n *\n *\n * The `createCheckout()` function returns a Promise that resolves to the new checkout when it's created.\n *\n * > **Notes:**\n * > + Checkout must include at least 1 item in the `options.lineItems` array.\n * > + `options.channelType` is required.\n * > + If `_id` for `options.lineItems` is added, make sure that each `_id` is unique.\n * > + If `options.checkoutInfo.customFields` are added, then `options.checkoutInfo.customFields.value` is required.\n * @public\n * @requiredField options.channelType\n * @requiredField options.checkoutInfo.customFields.value\n * @requiredField options.checkoutInfo.membershipOptions.selectedMemberships.memberships._id\n * @requiredField options.checkoutInfo.membershipOptions.selectedMemberships.memberships.appId\n * @requiredField options.checkoutInfo.membershipOptions.selectedMemberships.memberships.lineItemIds\n * @requiredField options.customLineItems.descriptionLines\n * @requiredField options.customLineItems.descriptionLines.name\n * @requiredField options.customLineItems.itemType\n * @requiredField options.customLineItems.price\n * @requiredField options.customLineItems.productName\n * @requiredField options.customLineItems.quantity\n * @requiredField options.lineItems.catalogReference\n * @requiredField options.lineItems.catalogReference.appId\n * @requiredField options.lineItems.catalogReference.catalogItemId\n * @requiredField options.lineItems.quantity\n * @param options - Checkout creation options.\n * @permissionId ECOM.MODIFY_CHECKOUTS\n * @permissionId ECOM.ADMIN_MODIFY_CHECKOUTS\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage eCommerce - Admin Permissions\n * @permissionScopeId SCOPE.ECOM.MANAGE-ADMIN\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @returns Fulfilled - the newly created checkout.\n * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.CreateCheckout\n */\nexport async function createCheckout(\n  options?: CreateCheckoutOptions\n): Promise<Checkout & CheckoutNonNullableFields> {\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      checkoutInfo: options?.checkoutInfo,\n      couponCode: options?.couponCode,\n      lineItems: options?.lineItems,\n      customLineItems: options?.customLineItems,\n      channelType: options?.channelType,\n      giftCardCode: options?.giftCardCode,\n      overrideCheckoutUrl: options?.overrideCheckoutUrl,\n    }),\n    [\n      {\n        transformFn: transformSDKPageURLV2ToRESTPageURLV2,\n        paths: [\n          { path: 'checkoutInfo.lineItems.url' },\n          { path: 'lineItems.url' },\n          { path: 'customLineItems.url' },\n        ],\n      },\n      {\n        transformFn: transformSDKImageToRESTImage,\n        paths: [\n          { path: 'checkoutInfo.lineItems.media' },\n          { path: 'checkoutInfo.lineItems.catalogOverrideFields.image' },\n          { path: 'lineItems.media' },\n          { path: 'lineItems.catalogOverrideFields.image' },\n          { path: 'customLineItems.media' },\n        ],\n      },\n      {\n        transformFn: transformSDKAddressToRESTAddress,\n        paths: [\n          { path: 'checkoutInfo.billingInfo.address' },\n          { path: 'checkoutInfo.shippingInfo.shippingDestination.address' },\n          {\n            path: 'checkoutInfo.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address',\n          },\n          {\n            path: 'checkoutInfo.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address',\n          },\n        ],\n      },\n    ]\n  );\n\n  const reqOpts = ambassadorWixEcomV1Checkout.createCheckout(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: transformRESTPageURLV2ToSDKPageURLV2,\n          paths: [{ path: 'checkout.lineItems.url' }],\n        },\n        {\n          transformFn: transformRESTImageToSDKImage,\n          paths: [\n            { path: 'checkout.lineItems.media' },\n            { path: 'checkout.lineItems.catalogOverrideFields.image' },\n          ],\n        },\n        {\n          transformFn: transformRESTAddressToSDKAddress,\n          paths: [\n            { path: 'checkout.billingInfo.address' },\n            { path: 'checkout.shippingInfo.shippingDestination.address' },\n            {\n              path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address',\n            },\n            {\n              path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address',\n            },\n          ],\n        },\n      ])\n    )?.checkout!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          checkoutInfo: '$[0].checkoutInfo',\n          couponCode: '$[0].couponCode',\n          lineItems: '$[0].lineItems',\n          customLineItems: '$[0].customLineItems',\n          channelType: '$[0].channelType',\n          giftCardCode: '$[0].giftCardCode',\n          overrideCheckoutUrl: '$[0].overrideCheckoutUrl',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface CreateCheckoutOptions {\n  /** Checkout information. */\n  checkoutInfo?: Checkout;\n  /** The code of an existing coupon to apply to checkout. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */\n  couponCode?: string | null;\n  /** Catalog line items to add to the checkout. */\n  lineItems?: LineItem[];\n  /**\n   * Custom line items to add to the checkout. 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   */\n  customLineItems?: CustomLineItem[];\n  /** Sales channel that submitted the order. */\n  channelType: ChannelType;\n  /**\n   * Gift card code.\n   *\n   * The checkout can only hold 1 `giftCardCode` at a time. If an additional `giftCardCode` is added, it will override the existing `giftCardCode`.\n   *\n   * >**Note:** Gift cards are supported through the Wix UI, though the service plugin is not currently available. Learn more about [Wix Gift Cards](https://support.wix.com/en/article/wix-stores-setting-up-wix-gift-cards).\n   */\n  giftCardCode?: string | null;\n  /**\n   * `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page.\n   *\n   * This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.\n   */\n  overrideCheckoutUrl?: string | null;\n}\n\n/**\n * Retrieves a checkout.\n *\n *\n * The `getCheckout()` function returns a Promise that resolves when the specified checkout is retrieved.\n * @param _id - Checkout ID.\n * @public\n * @requiredField _id\n * @permissionId ECOM.READ_CHECKOUTS\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Read eCommerce - all read permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM\n * @permissionScope Read Orders\n * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS\n * @permissionScope Read Stores - all read permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @returns Fulfilled - the requested checkout.\n * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.GetCheckout\n */\nexport async function getCheckout(\n  _id: string\n): Promise<Checkout & CheckoutNonNullableFields> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });\n\n  const reqOpts = ambassadorWixEcomV1Checkout.getCheckout(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: transformRESTPageURLV2ToSDKPageURLV2,\n          paths: [{ path: 'checkout.lineItems.url' }],\n        },\n        {\n          transformFn: transformRESTImageToSDKImage,\n          paths: [\n            { path: 'checkout.lineItems.media' },\n            { path: 'checkout.lineItems.catalogOverrideFields.image' },\n          ],\n        },\n        {\n          transformFn: transformRESTAddressToSDKAddress,\n          paths: [\n            { path: 'checkout.billingInfo.address' },\n            { path: 'checkout.shippingInfo.shippingDestination.address' },\n            {\n              path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address',\n            },\n            {\n              path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address',\n            },\n          ],\n        },\n      ])\n    )?.checkout!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { id: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['_id']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Retrieves the checkout associated with a specified cart.\n * @param _id - Cart ID.\n * @public\n * @requiredField _id\n * @permissionId ECOM.READ_CHECKOUTS\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Read eCommerce - all read permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM\n * @permissionScope Read Orders\n * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS\n * @permissionScope Read Stores - all read permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.GetCheckoutByCartId\n */\nexport async function getCheckoutByCartId(\n  _id: string\n): Promise<\n  GetCheckoutByCartIdResponse & GetCheckoutByCartIdResponseNonNullableFields\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });\n\n  const reqOpts = ambassadorWixEcomV1Checkout.getCheckoutByCartId(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: transformRESTPageURLV2ToSDKPageURLV2,\n          paths: [{ path: 'checkout.lineItems.url' }],\n        },\n        {\n          transformFn: transformRESTImageToSDKImage,\n          paths: [\n            { path: 'checkout.lineItems.media' },\n            { path: 'checkout.lineItems.catalogOverrideFields.image' },\n          ],\n        },\n        {\n          transformFn: transformRESTAddressToSDKAddress,\n          paths: [\n            { path: 'checkout.billingInfo.address' },\n            { path: 'checkout.shippingInfo.shippingDestination.address' },\n            {\n              path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address',\n            },\n            {\n              path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address',\n            },\n          ],\n        },\n      ])\n    )!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { id: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['_id']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Deprecated and will be removed soon, use GetCheckoutURL\n * @param _id - Checkout ID.\n * @internal\n * @documentationMaturity preview\n * @requiredField _id\n * @permissionId ECOM.READ_CHECKOUTS\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Read eCommerce - all read permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM\n * @permissionScope Read Orders\n * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS\n * @permissionScope Read Stores - all read permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.GetWixCheckoutURL\n */\nexport async function getWixCheckoutUrl(\n  _id: string\n): Promise<\n  GetWixCheckoutURLResponse & GetWixCheckoutURLResponseNonNullableFields\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });\n\n  const reqOpts = ambassadorWixEcomV1Checkout.getWixCheckoutUrl(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: { id: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['_id']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Retrieves the checkout page URL of a specified checkout.\n *\n * By default, a `checkoutUrl` generates for a checkout and directs to a standard Wix checkout page.\n * However, if `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.\n * @param _id - Checkout ID.\n * @public\n * @requiredField _id\n * @permissionId ECOM.READ_CHECKOUTS\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Read eCommerce - all read permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM\n * @permissionScope Read Orders\n * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS\n * @permissionScope Read Stores - all read permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.GetCheckoutURL\n */\nexport async function getCheckoutUrl(\n  _id: string\n): Promise<GetCheckoutURLResponse & GetCheckoutURLResponseNonNullableFields> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });\n\n  const reqOpts = ambassadorWixEcomV1Checkout.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: { id: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['_id']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Updates a checkout.\n *\n *\n * The `updateCheckout()` function returns a Promise that resolves to the updated checkout when the specified properties are updated.\n *\n * >**Notes:**\n * > + If nothing is passed in the request, the call will fail.\n * > + The `checkout.buyerInfo.email` may not be removed once it is set.\n * @param _id - Checkout ID.\n * @public\n * @requiredField _id\n * @requiredField checkout\n * @requiredField checkout.customFields.value\n * @requiredField checkout.membershipOptions.selectedMemberships.memberships._id\n * @requiredField checkout.membershipOptions.selectedMemberships.memberships.appId\n * @requiredField checkout.membershipOptions.selectedMemberships.memberships.lineItemIds\n * @requiredField options.customLineItems.descriptionLines\n * @requiredField options.customLineItems.descriptionLines.name\n * @requiredField options.customLineItems.itemType\n * @requiredField options.customLineItems.productName\n * @requiredField options.customLineItems.quantity\n * @requiredField options.lineItems.catalogReference\n * @requiredField options.lineItems.catalogReference.appId\n * @requiredField options.lineItems.catalogReference.catalogItemId\n * @requiredField options.lineItems.quantity\n * @param options - Checkout update options.\n * @permissionId ECOM.MODIFY_CHECKOUTS\n * @permissionId ECOM.ADMIN_MODIFY_CHECKOUTS\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage eCommerce - Admin Permissions\n * @permissionScopeId SCOPE.ECOM.MANAGE-ADMIN\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @returns Updated checkout.\n * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.UpdateCheckout\n */\nexport async function updateCheckout(\n  _id: string | null,\n  checkout: UpdateCheckout,\n  options?: UpdateCheckoutOptions\n): Promise<Checkout & CheckoutNonNullableFields> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[3] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = transformPaths(\n    renameKeysFromSDKRequestToRESTRequest({\n      checkout: { ...checkout, id: _id },\n      couponCode: options?.couponCode,\n      giftCardCode: options?.giftCardCode,\n      overrideCheckoutUrl: options?.overrideCheckoutUrl,\n      lineItems: options?.lineItems,\n      customLineItems: options?.customLineItems,\n    }),\n    [\n      {\n        transformFn: transformSDKPageURLV2ToRESTPageURLV2,\n        paths: [\n          { path: 'checkout.lineItems.url' },\n          { path: 'lineItems.url' },\n          { path: 'customLineItems.url' },\n        ],\n      },\n      {\n        transformFn: transformSDKImageToRESTImage,\n        paths: [\n          { path: 'checkout.lineItems.media' },\n          { path: 'checkout.lineItems.catalogOverrideFields.image' },\n          { path: 'lineItems.media' },\n          { path: 'lineItems.catalogOverrideFields.image' },\n          { path: 'customLineItems.media' },\n        ],\n      },\n      {\n        transformFn: transformSDKAddressToRESTAddress,\n        paths: [\n          { path: 'checkout.billingInfo.address' },\n          { path: 'checkout.shippingInfo.shippingDestination.address' },\n          {\n            path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address',\n          },\n          {\n            path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address',\n          },\n        ],\n      },\n    ]\n  );\n\n  const reqOpts = ambassadorWixEcomV1Checkout.updateCheckout(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: transformRESTPageURLV2ToSDKPageURLV2,\n          paths: [{ path: 'checkout.lineItems.url' }],\n        },\n        {\n          transformFn: transformRESTImageToSDKImage,\n          paths: [\n            { path: 'checkout.lineItems.media' },\n            { path: 'checkout.lineItems.catalogOverrideFields.image' },\n          ],\n        },\n        {\n          transformFn: transformRESTAddressToSDKAddress,\n          paths: [\n            { path: 'checkout.billingInfo.address' },\n            { path: 'checkout.shippingInfo.shippingDestination.address' },\n            {\n              path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address',\n            },\n            {\n              path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address',\n            },\n          ],\n        },\n      ])\n    )?.checkout!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: { checkout: '$[1]' },\n        explicitPathsToArguments: {\n          'checkout.id': '$[0]',\n          couponCode: '$[2].couponCode',\n          giftCardCode: '$[2].giftCardCode',\n          overrideCheckoutUrl: '$[2].overrideCheckoutUrl',\n          lineItems: '$[2].lineItems',\n          customLineItems: '$[2].customLineItems',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['_id', 'checkout', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface UpdateCheckout {\n  /**\n   * Checkout ID.\n   * @readonly\n   */\n  _id?: string | null;\n  /**\n   * Line items.\n   *\n   * Max: 300 items\n   * @readonly\n   */\n  lineItems?: LineItem[];\n  /** Billing information. */\n  billingInfo?: AddressWithContact;\n  /** Shipping information. */\n  shippingInfo?: ShippingInfo;\n  /** [Buyer note](https://support.wix.com/en/article/wix-stores-viewing-buyer-notes) left by the customer. */\n  buyerNote?: string | null;\n  /** Buyer information. */\n  buyerInfo?: BuyerInfo;\n  /**\n   * All converted prices are displayed in this currency in three-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.\n   * @readonly\n   */\n  conversionCurrency?: string;\n  /**\n   * Calculated price summary for the checkout.\n   * @readonly\n   */\n  priceSummary?: PriceSummary;\n  /**\n   * Errors when calculating totals.\n   * @readonly\n   */\n  calculationErrors?: CalculationErrors;\n  /**\n   * Applied gift card details.\n   *\n   * >**Note:** Gift cards are supported through the Wix UI, though the service plugin is not currently available. Learn more about [Wix Gift Cards](https://support.wix.com/en/article/wix-stores-setting-up-wix-gift-cards).\n   * @readonly\n   */\n  giftCard?: GiftCard;\n  /**\n   * Applied discounts.\n   * @readonly\n   */\n  appliedDiscounts?: AppliedDiscount[];\n  /** Custom fields. */\n  customFields?: CustomField[];\n  /**\n   * Weight measurement unit - defaults to site's weight unit.\n   * @readonly\n   */\n  weightUnit?: WeightUnit;\n  /**\n   * Tax summary.\n   * @readonly\n   */\n  taxSummary?: TaxSummary;\n  /**\n   * The currency used when submitting the order.\n   * @readonly\n   */\n  currency?: string;\n  /**\n   * Sales channel that submitted the order.\n   * @readonly\n   */\n  channelType?: ChannelType;\n  /**\n   * Site language in which original values are shown.\n   * @readonly\n   */\n  siteLanguage?: string;\n  /**\n   * Language for communication with the buyer. Defaults to the site language.\n   * For a site that supports multiple languages, this is the language the buyer selected.\n   * @readonly\n   */\n  buyerLanguage?: string;\n  /**\n   * Whether an order was successfully created from this checkout.\n   * For an order to be successful, it must be successfully paid for (unless the total is 0).\n   * @readonly\n   */\n  completed?: boolean;\n  /**\n   * Whether tax is included in line item prices.\n   * @readonly\n   */\n  taxIncludedInPrice?: boolean;\n  /**\n   * ID of the checkout's initiator.\n   * @readonly\n   */\n  createdBy?: CreatedBy;\n  /**\n   * Date and time the checkout was created.\n   * @readonly\n   */\n  _createdDate?: Date | null;\n  /**\n   * Date and time the checkout was updated.\n   * @readonly\n   */\n  _updatedDate?: Date | null;\n  /**\n   * Minimal amount to pay in order to place the order.\n   * @readonly\n   */\n  payNow?: PriceSummary;\n  /**\n   * Remaining amount for the order to be fully paid.\n   * @readonly\n   */\n  payLater?: PriceSummary;\n  /** Memberships to apply when creating the order. */\n  membershipOptions?: MembershipOptions;\n  /** Additional Fees. */\n  additionalFees?: AdditionalFee[];\n  /** Cart ID that this checkout was created from. Empty if this checkout wasn't created from a cart. */\n  cartId?: string | null;\n  /**\n   * List of validation violations raised by the [Validations Custom Extension SPI](https://www.wix.com/velo/reference/spis/wix-ecom/ecom-validations/introduction).\n   * @readonly\n   */\n  violations?: Violation[];\n  /**\n   * Custom field data for the checkout 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   * Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.\n   * @readonly\n   */\n  purchaseFlowId?: string | null;\n  /**\n   * Additional settings for customization of the checkout process.\n   *\n   * Custom settings can only be defined when [creating a checkout](https://www.wix.com/velo/reference/wix-ecom-backend/checkout/createcheckout).\n   */\n  customSettings?: CustomSettings;\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   * Order ID.\n   *\n   * This field is empty until the checkout completes and becomes an order.\n   * @internal\n   * @readonly\n   */\n  orderId?: string | null;\n  /**\n   * Payment for subscriptions after free trial period.\n   * @internal\n   * @readonly\n   */\n  payAfterFreeTrial?: PriceSummary;\n  /**\n   * The business location ID associated with the checkout.\n   * Learn more about the [Locations API](https://dev.wix.com/docs/rest/business-management/locations/introduction).\n   */\n  businessLocationId?: string | null;\n  /**\n   * Whether payment is required to create an order.\n   *\n   * Payment is required if any of the following conditions are met:\n   * 1. At least one item requires a payment method. This can be because the item has the `savePaymentMethod` field set to `true`, or the item is a subscription with a price greater than zero.\n   * 2. The calculated total amount due for immediate payment is greater than zero - `checkout.payNow > 0`.\n   * @internal\n   * @readonly\n   */\n  paymentRequired?: boolean;\n  /**\n   * Charges information for each subscription in the Checkout.\n   * @internal\n   * @readonly\n   */\n  subscriptionCharges?: SubscriptionCharges[];\n}\n\nexport interface UpdateCheckoutOptions {\n  /** The code of an existing coupon to apply to checkout. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */\n  couponCode?: string | null;\n  /** Gift card code. */\n  giftCardCode?: string | null;\n  /**\n   * `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page.\n   *\n   * This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.\n   */\n  overrideCheckoutUrl?: string | null;\n  /** Catalog line items. */\n  lineItems?: LineItem[];\n  /**\n   * Custom line items. 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   */\n  customLineItems?: CustomLineItem[];\n}\n\n/**\n * Removes the coupon from a specified checkout.\n *\n *\n * The `removeCoupon()` function returns a Promise that resolves to the updated checkout when the coupon is removed from the specified checkout.\n *\n * >**Note:** A checkout can only hold 1 coupon.\n * @param _id - ID of the checkout to remove the coupon from.\n * @public\n * @requiredField _id\n * @permissionId ECOM.MODIFY_CHECKOUTS\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.RemoveCoupon\n */\nexport async function removeCoupon(\n  _id: string\n): Promise<RemoveCouponResponse & RemoveCouponResponseNonNullableFields> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });\n\n  const reqOpts = ambassadorWixEcomV1Checkout.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: transformRESTPageURLV2ToSDKPageURLV2,\n          paths: [{ path: 'checkout.lineItems.url' }],\n        },\n        {\n          transformFn: transformRESTImageToSDKImage,\n          paths: [\n            { path: 'checkout.lineItems.media' },\n            { path: 'checkout.lineItems.catalogOverrideFields.image' },\n          ],\n        },\n        {\n          transformFn: transformRESTAddressToSDKAddress,\n          paths: [\n            { path: 'checkout.billingInfo.address' },\n            { path: 'checkout.shippingInfo.shippingDestination.address' },\n            {\n              path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address',\n            },\n            {\n              path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address',\n            },\n          ],\n        },\n      ])\n    )!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { id: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['_id']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Removes the gift card from a specified checkout.\n *\n *\n * The `removeGiftCard()` function returns a Promise that resolves to the updated checkout when the gift card is removed from the specified checkout.\n *\n * >**Note:** A checkout can only hold 1 gift card.\n * @param _id - ID of the checkout to remove the gift card from.\n * @public\n * @requiredField _id\n * @permissionId ECOM.MODIFY_CHECKOUTS\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.RemoveGiftCard\n */\nexport async function removeGiftCard(\n  _id: string\n): Promise<RemoveGiftCardResponse & RemoveGiftCardResponseNonNullableFields> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });\n\n  const reqOpts = ambassadorWixEcomV1Checkout.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: transformRESTPageURLV2ToSDKPageURLV2,\n          paths: [{ path: 'checkout.lineItems.url' }],\n        },\n        {\n          transformFn: transformRESTImageToSDKImage,\n          paths: [\n            { path: 'checkout.lineItems.media' },\n            { path: 'checkout.lineItems.catalogOverrideFields.image' },\n          ],\n        },\n        {\n          transformFn: transformRESTAddressToSDKAddress,\n          paths: [\n            { path: 'checkout.billingInfo.address' },\n            { path: 'checkout.shippingInfo.shippingDestination.address' },\n            {\n              path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address',\n            },\n            {\n              path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address',\n            },\n          ],\n        },\n      ])\n    )!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { id: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['_id']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Removes the `overrideCheckoutUrl` from a specified checkout.\n *\n * When `overrideCheckoutUrl` is removed, the `checkoutUrl` will be set to the default, standard\n * Wix checkout page URL.\n * @param _id - ID of the checkout to remove the override checkout url from.\n * @public\n * @requiredField _id\n * @permissionId ECOM.MODIFY_CHECKOUTS\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.RemoveOverrideCheckoutUrl\n */\nexport async function removeOverrideCheckoutUrl(\n  _id: string\n): Promise<\n  RemoveOverrideCheckoutUrlResponse &\n    RemoveOverrideCheckoutUrlResponseNonNullableFields\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });\n\n  const reqOpts =\n    ambassadorWixEcomV1Checkout.removeOverrideCheckoutUrl(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: transformRESTPageURLV2ToSDKPageURLV2,\n          paths: [{ path: 'checkout.lineItems.url' }],\n        },\n        {\n          transformFn: transformRESTImageToSDKImage,\n          paths: [\n            { path: 'checkout.lineItems.media' },\n            { path: 'checkout.lineItems.catalogOverrideFields.image' },\n          ],\n        },\n        {\n          transformFn: transformRESTAddressToSDKAddress,\n          paths: [\n            { path: 'checkout.billingInfo.address' },\n            { path: 'checkout.shippingInfo.shippingDestination.address' },\n            {\n              path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address',\n            },\n            {\n              path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address',\n            },\n          ],\n        },\n      ])\n    )!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { id: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['_id']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Adds catalog line items and/or custom line items to a checkout.\n *\n *\n * The `addToCheckout()` function returns a Promise that resolves to the updated checkout when the specified items have been added.\n * > **Note:** When adding catalog items, `options.lineItems.catalogReference` is required.\n * @param _id - Checkout ID.\n * @public\n * @requiredField _id\n * @requiredField options.customLineItems.descriptionLines\n * @requiredField options.customLineItems.descriptionLines.name\n * @requiredField options.customLineItems.itemType\n * @requiredField options.customLineItems.productName\n * @requiredField options.customLineItems.quantity\n * @requiredField options.lineItems.catalogReference\n * @requiredField options.lineItems.catalogReference.appId\n * @requiredField options.lineItems.catalogReference.catalogItemId\n * @requiredField options.lineItems.quantity\n * @param options - Items to be added to checkout.\n * @permissionId ECOM.MODIFY_CHECKOUTS\n * @permissionId ECOM.ADMIN_MODIFY_CHECKOUTS\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage eCommerce - Admin Permissions\n * @permissionScopeId SCOPE.ECOM.MANAGE-ADMIN\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.AddToCheckout\n */\nexport async function addToCheckout(\n  _id: string,\n  options?: AddToCheckoutOptions\n): Promise<AddToCheckoutResponse & AddToCheckoutResponseNonNullableFields> {\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      id: _id,\n      lineItems: options?.lineItems,\n      customLineItems: options?.customLineItems,\n    }),\n    [\n      {\n        transformFn: transformSDKPageURLV2ToRESTPageURLV2,\n        paths: [{ path: 'lineItems.url' }, { path: 'customLineItems.url' }],\n      },\n      {\n        transformFn: transformSDKImageToRESTImage,\n        paths: [\n          { path: 'lineItems.media' },\n          { path: 'lineItems.catalogOverrideFields.image' },\n          { path: 'customLineItems.media' },\n        ],\n      },\n    ]\n  );\n\n  const reqOpts = ambassadorWixEcomV1Checkout.addToCheckout(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: transformRESTPageURLV2ToSDKPageURLV2,\n          paths: [{ path: 'checkout.lineItems.url' }],\n        },\n        {\n          transformFn: transformRESTImageToSDKImage,\n          paths: [\n            { path: 'checkout.lineItems.media' },\n            { path: 'checkout.lineItems.catalogOverrideFields.image' },\n          ],\n        },\n        {\n          transformFn: transformRESTAddressToSDKAddress,\n          paths: [\n            { path: 'checkout.billingInfo.address' },\n            { path: 'checkout.shippingInfo.shippingDestination.address' },\n            {\n              path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address',\n            },\n            {\n              path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address',\n            },\n          ],\n        },\n      ])\n    )!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          id: '$[0]',\n          lineItems: '$[1].lineItems',\n          customLineItems: '$[1].customLineItems',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['_id', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface AddToCheckoutOptions {\n  /** Catalog line items. */\n  lineItems?: LineItem[];\n  /**\n   * Custom line items. 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   */\n  customLineItems?: CustomLineItem[];\n}\n\n/**\n * Removes line items from the specified checkout.\n *\n *\n * The `removeLineItems()` function returns a Promise that resolves to the updated checkout when the line items are removed from the specified checkout.\n * @param _id - ID of the checkout to remove line items from.\n * @public\n * @requiredField _id\n * @requiredField lineItemIds\n * @param lineItemIds - IDs of the line items to be removed.\n * To find the IDs of the checkout line items you'd like to remove, pass the `checkout._id` to [getCheckout()](https://www.wix.com/velo/reference/wix-ecom-backend/checkout/getcheckout) and look for the IDs under `lineItems` and/or `customLineItems`.\n * @permissionId ECOM.MODIFY_CHECKOUTS\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.RemoveLineItems\n */\nexport async function removeLineItems(\n  _id: string,\n  lineItemIds: string[]\n): Promise<RemoveLineItemsResponse & RemoveLineItemsResponseNonNullableFields> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    id: _id,\n    lineItemIds: lineItemIds,\n  });\n\n  const reqOpts = ambassadorWixEcomV1Checkout.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: transformRESTPageURLV2ToSDKPageURLV2,\n          paths: [{ path: 'checkout.lineItems.url' }],\n        },\n        {\n          transformFn: transformRESTImageToSDKImage,\n          paths: [\n            { path: 'checkout.lineItems.media' },\n            { path: 'checkout.lineItems.catalogOverrideFields.image' },\n          ],\n        },\n        {\n          transformFn: transformRESTAddressToSDKAddress,\n          paths: [\n            { path: 'checkout.billingInfo.address' },\n            { path: 'checkout.shippingInfo.shippingDestination.address' },\n            {\n              path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address',\n            },\n            {\n              path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address',\n            },\n          ],\n        },\n      ])\n    )!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { id: '$[0]', lineItemIds: '$[1]' },\n        singleArgumentUnchanged: false,\n      },\n      ['_id', 'lineItemIds']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Creates an order from a specified checkout.\n *\n * The `createOrder()` function returns a Promise that resolves to the new order's ID and `paymentGatewayOrderID` when the order is created.\n * Pass the `paymentGatewayOrderId` as the `paymentId` param to the [`startPayment()`](https://www.wix.com/velo/reference/wix-pay-frontend/startpayment) function to allow a customer to pay for their order.\n *\n * > **Note:** The following requirements must be met for an order to be created from a checkout.\n * > + A checkout cannot have calculation errors. Pass the `checkout._id` to [Get Checkout](https://www.wix.com/velo/reference/wix-ecom-backend/checkout/getcheckout) and take a look at the `calculationErrors` field.\n * > + A checkout must have at least 1 line item.\n * > + All of the line Items have an `availability.status` of `\"AVAILABLE\"` or `\"PARTIALLY_AVAILABLE\"`.\n * > + If there is a payment to be made, meaning that `priceSummary.total` is greater than 0, the `billingInfo.address` field must be provided.\n * > + When a checkout has line items to be shipped, the `shippingInfo.shippingDestination.address` and `shippingInfo.selectedCarrierServiceOption` fields must be provided.\n * > + When a checkout has line items for pickup, the `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails` field must be provided.\n * @param _id - Checkout ID.\n * @public\n * @requiredField _id\n * @param options - Further order creation options.\n * @permissionId ECOM.CREATE_ORDER_FROM_CHECKOUT\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.CreateOrder\n */\nexport async function createOrder(\n  _id: string,\n  options?: CreateOrderOptions\n): Promise<CreateOrderResponse & CreateOrderResponseNonNullableFields> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    id: _id,\n    savePaymentMethod: options?.savePaymentMethod,\n    delayCapture: options?.delayCapture,\n  });\n\n  const reqOpts = ambassadorWixEcomV1Checkout.createOrder(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          id: '$[0]',\n          savePaymentMethod: '$[1].savePaymentMethod',\n          delayCapture: '$[1].delayCapture',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['_id', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface CreateOrderOptions {\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 * Deprecated (use createOrder instead)\n * @param _id - Checkout ID.\n * @internal\n * @documentationMaturity preview\n * @requiredField _id\n * @permissionId ECOM.CREATE_ORDER_FROM_CHECKOUT\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.CreateOrderAndCharge\n */\nexport async function createOrderAndCharge(\n  _id: string,\n  options?: CreateOrderAndChargeOptions\n): Promise<\n  CreateOrderAndChargeResponse & CreateOrderAndChargeResponseNonNullableFields\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    id: _id,\n    paymentToken: options?.paymentToken,\n    savePaymentMethod: options?.savePaymentMethod,\n    delayCapture: options?.delayCapture,\n  });\n\n  const reqOpts = ambassadorWixEcomV1Checkout.createOrderAndCharge(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          id: '$[0]',\n          paymentToken: '$[1].paymentToken',\n          savePaymentMethod: '$[1].savePaymentMethod',\n          delayCapture: '$[1].delayCapture',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['_id', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface CreateOrderAndChargeOptions {\n  /** Payment token. */\n  paymentToken?: string | null;\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 * Marks a checkout as completed - `checkout.complete` boolean is set to `true`.\n *\n *\n * The `markCheckoutAsCompleted()` function returns a Promise that resolves when the specified checkout is marked as completed.\n * @param _id - Checkout ID.\n * @public\n * @requiredField _id\n * @permissionId ECOM.MODIFY_CHECKOUTS\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.MarkCheckoutAsCompleted\n */\nexport async function markCheckoutAsCompleted(_id: 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({ id: _id });\n\n  const reqOpts = ambassadorWixEcomV1Checkout.markCheckoutAsCompleted(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: { id: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['_id']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Updates the quantity of one or more line items in a checkout.\n *\n * This endpoint is only for updating the quantity of line items. To entirely remove a line item from\n * the checkout, use [`removeLineItems()`](#removelineitems).\n * To add a new line item to the checkout, use [`addToCheckout()`](#addtocheckout).\n *\n * This endpoint checks the amount of stock remaining for this line item. If the specified `quantity`\n * is greater than the remaining stock, then the `quantity` returned in the response is the total amount\n * of remaining stock.\n * @param _id - Checkout ID.\n * @param lineItems - Line item info to update.\n * @public\n * @requiredField _id\n * @requiredField lineItems\n * @requiredField lineItems._id\n * @requiredField lineItems.quantity\n * @permissionId ECOM.MODIFY_CHECKOUTS\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.UpdateLineItemsQuantity\n */\nexport async function updateLineItemsQuantity(\n  _id: string,\n  lineItems: LineItemQuantityUpdate[]\n): Promise<\n  UpdateLineItemsQuantityResponse &\n    UpdateLineItemsQuantityResponseNonNullableFields\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    id: _id,\n    lineItems: lineItems,\n  });\n\n  const reqOpts = ambassadorWixEcomV1Checkout.updateLineItemsQuantity(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: transformRESTPageURLV2ToSDKPageURLV2,\n          paths: [{ path: 'checkout.lineItems.url' }],\n        },\n        {\n          transformFn: transformRESTImageToSDKImage,\n          paths: [\n            { path: 'checkout.lineItems.media' },\n            { path: 'checkout.lineItems.catalogOverrideFields.image' },\n          ],\n        },\n        {\n          transformFn: transformRESTAddressToSDKAddress,\n          paths: [\n            { path: 'checkout.billingInfo.address' },\n            { path: 'checkout.shippingInfo.shippingDestination.address' },\n            {\n              path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address',\n            },\n            {\n              path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address',\n            },\n          ],\n        },\n      ])\n    )!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { id: '$[0]', lineItems: '$[1]' },\n        singleArgumentUnchanged: false,\n      },\n      ['_id', 'lineItems']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/** @param _id - Checkout ID.\n * @internal\n * @documentationMaturity preview\n * @requiredField _id\n * @permissionId ECOM.READ_PAYMENT_SETTINGS\n * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.GetCheckoutPaymentSettings\n */\nexport async function getCheckoutPaymentSettings(\n  _id: string\n): Promise<\n  GetCheckoutPaymentSettingsResponse &\n    GetCheckoutPaymentSettingsResponseNonNullableFields\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });\n\n  const reqOpts =\n    ambassadorWixEcomV1Checkout.getCheckoutPaymentSettings(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: { id: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['_id']\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 { 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 resolveComWixEcomCheckoutApiV1CheckoutServiceUrl(\n  opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n  const domainToMappings = {\n    'www.wixapis.com': [\n      {\n        srcPath: '/ecom/v1/checkouts',\n        destPath: '/v1/checkouts',\n      },\n    ],\n    'api._api_base_domain_': [\n      {\n        srcPath: '/checkout',\n        destPath: '',\n      },\n    ],\n    _: [\n      {\n        srcPath: '/ecom/v1/checkouts',\n        destPath: '/v1/checkouts',\n      },\n    ],\n    'manage._base_domain_': [\n      {\n        srcPath: '/ecom/v1/checkouts',\n        destPath: '/v1/checkouts',\n      },\n    ],\n    'www._base_domain_': [\n      {\n        srcPath: '/ecom/v1/checkouts',\n        destPath: '/v1/checkouts',\n      },\n    ],\n    'bo._base_domain_': [\n      {\n        srcPath: '/ecom/v1/checkouts',\n        destPath: '/v1/checkouts',\n      },\n    ],\n    'wixbo.ai': [\n      {\n        srcPath: '/ecom/v1/checkouts',\n        destPath: '/v1/checkouts',\n      },\n    ],\n    'wix-bo.com': [\n      {\n        srcPath: '/ecom/v1/checkouts',\n        destPath: '/v1/checkouts',\n      },\n    ],\n  };\n\n  return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_ecom_checkout';\n\n/**\n * Creates a checkout.\n *\n *\n * The `createCheckout()` function returns a Promise that resolves to the new checkout when it's created.\n *\n * > **Notes:**\n * > + Checkout must include at least 1 item in the `options.lineItems` array.\n * > + `options.channelType` is required.\n * > + If `_id` for `options.lineItems` is added, make sure that each `_id` is unique.\n * > + If `options.checkoutInfo.customFields` are added, then `options.checkoutInfo.customFields.value` is required.\n */\nexport function createCheckout(payload: object): RequestOptionsFactory<any> {\n  function __createCheckout({ host }: any) {\n    const serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKTimestampToRESTTimestamp,\n        paths: [\n          { path: 'checkoutInfo.createdDate' },\n          { path: 'checkoutInfo.updatedDate' },\n          { path: 'checkoutInfo.lineItems.media.urlExpirationDate' },\n          {\n            path: 'checkoutInfo.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate',\n          },\n          { path: 'checkoutInfo.lineItems.serviceProperties.scheduledDate' },\n          {\n            path: 'checkoutInfo.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.from',\n          },\n          {\n            path: 'checkoutInfo.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.to',\n          },\n          {\n            path: 'checkoutInfo.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.from',\n          },\n          {\n            path: 'checkoutInfo.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.to',\n          },\n          {\n            path: 'checkoutInfo.membershipOptions.eligibleMemberships.expirationDate',\n          },\n          {\n            path: 'checkoutInfo.membershipOptions.invalidMemberships.membership.expirationDate',\n          },\n          { path: 'checkoutInfo.subscriptionCharges.charges.cycleBillingDate' },\n          { path: 'lineItems.media.urlExpirationDate' },\n          {\n            path: 'lineItems.subscriptionOptionInfo.subscriptionSettings.startDate',\n          },\n          { path: 'lineItems.serviceProperties.scheduledDate' },\n          {\n            path: 'customLineItems.subscriptionOptionInfo.subscriptionSettings.startDate',\n          },\n          { path: 'customLineItems.serviceProperties.scheduledDate' },\n        ],\n      },\n      {\n        transformFn: transformSDKFloatToRESTFloat,\n        paths: [\n          { path: 'checkoutInfo.lineItems.media.focalPoint.x' },\n          { path: 'checkoutInfo.lineItems.media.focalPoint.y' },\n          { path: 'lineItems.media.focalPoint.x' },\n          { path: 'lineItems.media.focalPoint.y' },\n          { path: 'checkoutInfo.lineItems.physicalProperties.weight' },\n          {\n            path: 'checkoutInfo.lineItems.catalogOverrideFields.physicalProperties.weight',\n          },\n          { path: 'checkoutInfo.billingInfo.address.geocode.latitude' },\n          { path: 'checkoutInfo.billingInfo.address.geocode.longitude' },\n          {\n            path: 'checkoutInfo.shippingInfo.shippingDestination.address.geocode.latitude',\n          },\n          {\n            path: 'checkoutInfo.shippingInfo.shippingDestination.address.geocode.longitude',\n          },\n          {\n            path: 'checkoutInfo.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.latitude',\n          },\n          {\n            path: 'checkoutInfo.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.longitude',\n          },\n          {\n            path: 'checkoutInfo.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.latitude',\n          },\n          {\n            path: 'checkoutInfo.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.longitude',\n          },\n          { path: 'checkoutInfo.appliedDiscounts.merchantDiscount.percentage' },\n          { path: 'lineItems.physicalProperties.weight' },\n          { path: 'lineItems.catalogOverrideFields.physicalProperties.weight' },\n          { path: 'customLineItems.physicalProperties.weight' },\n        ],\n      },\n    ]);\n    const metadata = {\n      entityFqdn: 'wix.ecom.v1.checkout',\n      method: 'POST' as any,\n      methodFqn: 'com.wix.ecom.checkout.api.v1.CheckoutService.CreateCheckout',\n      packageName: PACKAGE_NAME,\n      url: resolveComWixEcomCheckoutApiV1CheckoutServiceUrl({\n        protoPath: '/v1/checkouts',\n        data: serializedData,\n        host,\n      }),\n      data: serializedData,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'checkout.createdDate' },\n              { path: 'checkout.updatedDate' },\n              { path: 'checkout.lineItems.media.urlExpirationDate' },\n              {\n                path: 'checkout.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate',\n              },\n              { path: 'checkout.lineItems.serviceProperties.scheduledDate' },\n              {\n                path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.from',\n              },\n              {\n                path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.to',\n              },\n              {\n                path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.from',\n              },\n              {\n                path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.to',\n              },\n              {\n                path: 'checkout.membershipOptions.eligibleMemberships.expirationDate',\n              },\n              {\n                path: 'checkout.membershipOptions.invalidMemberships.membership.expirationDate',\n              },\n              { path: 'checkout.subscriptionCharges.charges.cycleBillingDate' },\n            ],\n          },\n          {\n            transformFn: transformRESTFloatToSDKFloat,\n            paths: [\n              { path: 'checkout.lineItems.media.focalPoint.x' },\n              { path: 'checkout.lineItems.media.focalPoint.y' },\n              { path: 'checkout.lineItems.physicalProperties.weight' },\n              {\n                path: 'checkout.lineItems.catalogOverrideFields.physicalProperties.weight',\n              },\n              { path: 'checkout.billingInfo.address.geocode.latitude' },\n              { path: 'checkout.billingInfo.address.geocode.longitude' },\n              {\n                path: 'checkout.shippingInfo.shippingDestination.address.geocode.latitude',\n              },\n              {\n                path: 'checkout.shippingInfo.shippingDestination.address.geocode.longitude',\n              },\n              {\n                path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.latitude',\n              },\n              {\n                path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.longitude',\n              },\n              {\n                path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.latitude',\n              },\n              {\n                path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.longitude',\n              },\n              { path: 'checkout.appliedDiscounts.merchantDiscount.percentage' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __createCheckout;\n}\n\n/**\n * Retrieves a checkout.\n *\n *\n * The `getCheckout()` function returns a Promise that resolves when the specified checkout is retrieved.\n */\nexport function getCheckout(payload: object): RequestOptionsFactory<any> {\n  function __getCheckout({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.ecom.v1.checkout',\n      method: 'GET' as any,\n      methodFqn: 'com.wix.ecom.checkout.api.v1.CheckoutService.GetCheckout',\n      packageName: PACKAGE_NAME,\n      url: resolveComWixEcomCheckoutApiV1CheckoutServiceUrl({\n        protoPath: '/v1/checkouts/{id}',\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: 'checkout.createdDate' },\n              { path: 'checkout.updatedDate' },\n              { path: 'checkout.lineItems.media.urlExpirationDate' },\n              {\n                path: 'checkout.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate',\n              },\n              { path: 'checkout.lineItems.serviceProperties.scheduledDate' },\n              {\n                path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.from',\n              },\n              {\n                path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.to',\n              },\n              {\n                path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.from',\n              },\n              {\n                path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.to',\n              },\n              {\n                path: 'checkout.membershipOptions.eligibleMemberships.expirationDate',\n              },\n              {\n                path: 'checkout.membershipOptions.invalidMemberships.membership.expirationDate',\n              },\n              { path: 'checkout.subscriptionCharges.charges.cycleBillingDate' },\n            ],\n          },\n          {\n            transformFn: transformRESTFloatToSDKFloat,\n            paths: [\n              { path: 'checkout.lineItems.media.focalPoint.x' },\n              { path: 'checkout.lineItems.media.focalPoint.y' },\n              { path: 'checkout.lineItems.physicalProperties.weight' },\n              {\n                path: 'checkout.lineItems.catalogOverrideFields.physicalProperties.weight',\n              },\n              { path: 'checkout.billingInfo.address.geocode.latitude' },\n              { path: 'checkout.billingInfo.address.geocode.longitude' },\n              {\n                path: 'checkout.shippingInfo.shippingDestination.address.geocode.latitude',\n              },\n              {\n                path: 'checkout.shippingInfo.shippingDestination.address.geocode.longitude',\n              },\n              {\n                path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.latitude',\n              },\n              {\n                path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.longitude',\n              },\n              {\n                path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.latitude',\n              },\n              {\n                path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.longitude',\n              },\n              { path: 'checkout.appliedDiscounts.merchantDiscount.percentage' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __getCheckout;\n}\n\n/** Retrieves the checkout associated with a specified cart. */\nexport function getCheckoutByCartId(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __getCheckoutByCartId({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.ecom.v1.checkout',\n      method: 'GET' as any,\n      methodFqn:\n        'com.wix.ecom.checkout.api.v1.CheckoutService.GetCheckoutByCartId',\n      packageName: PACKAGE_NAME,\n      url: resolveComWixEcomCheckoutApiV1CheckoutServiceUrl({\n        protoPath: '/v1/checkouts/by-cart-id/{id}',\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: 'checkout.createdDate' },\n              { path: 'checkout.updatedDate' },\n              { path: 'checkout.lineItems.media.urlExpirationDate' },\n              {\n                path: 'checkout.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate',\n              },\n              { path: 'checkout.lineItems.serviceProperties.scheduledDate' },\n              {\n                path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.from',\n              },\n              {\n                path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.to',\n              },\n              {\n                path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.from',\n              },\n              {\n                path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.to',\n              },\n              {\n                path: 'checkout.membershipOptions.eligibleMemberships.expirationDate',\n              },\n              {\n                path: 'checkout.membershipOptions.invalidMemberships.membership.expirationDate',\n              },\n              { path: 'checkout.subscriptionCharges.charges.cycleBillingDate' },\n            ],\n          },\n          {\n            transformFn: transformRESTFloatToSDKFloat,\n            paths: [\n              { path: 'checkout.lineItems.media.focalPoint.x' },\n              { path: 'checkout.lineItems.media.focalPoint.y' },\n              { path: 'checkout.lineItems.physicalProperties.weight' },\n              {\n                path: 'checkout.lineItems.catalogOverrideFields.physicalProperties.weight',\n              },\n              { path: 'checkout.billingInfo.address.geocode.latitude' },\n              { path: 'checkout.billingInfo.address.geocode.longitude' },\n              {\n                path: 'checkout.shippingInfo.shippingDestination.address.geocode.latitude',\n              },\n              {\n                path: 'checkout.shippingInfo.shippingDestination.address.geocode.longitude',\n              },\n              {\n                path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.latitude',\n              },\n              {\n                path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.longitude',\n              },\n              {\n                path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.latitude',\n              },\n              {\n                path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.longitude',\n              },\n              { path: 'checkout.appliedDiscounts.merchantDiscount.percentage' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __getCheckoutByCartId;\n}\n\n/** Deprecated and will be removed soon, use GetCheckoutURL */\nexport function getWixCheckoutUrl(payload: object): RequestOptionsFactory<any> {\n  function __getWixCheckoutUrl({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.ecom.v1.checkout',\n      method: 'GET' as any,\n      methodFqn:\n        'com.wix.ecom.checkout.api.v1.CheckoutService.GetWixCheckoutURL',\n      packageName: PACKAGE_NAME,\n      url: resolveComWixEcomCheckoutApiV1CheckoutServiceUrl({\n        protoPath: '/v1/checkouts/{id}/wix-checkout-url',\n        data: payload,\n        host,\n      }),\n      params: toURLSearchParams(payload),\n    };\n\n    return metadata;\n  }\n\n  return __getWixCheckoutUrl;\n}\n\n/**\n * Retrieves the checkout page URL of a specified checkout.\n *\n * By default, a `checkoutUrl` generates for a checkout and directs to a standard Wix checkout page.\n * However, if `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.\n */\nexport function getCheckoutUrl(payload: object): RequestOptionsFactory<any> {\n  function __getCheckoutUrl({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.ecom.v1.checkout',\n      method: 'GET' as any,\n      methodFqn: 'com.wix.ecom.checkout.api.v1.CheckoutService.GetCheckoutURL',\n      packageName: PACKAGE_NAME,\n      url: resolveComWixEcomCheckoutApiV1CheckoutServiceUrl({\n        protoPath: '/v1/checkouts/{id}/checkout-url',\n        data: payload,\n        host,\n      }),\n      params: toURLSearchParams(payload),\n    };\n\n    return metadata;\n  }\n\n  return __getCheckoutUrl;\n}\n\n/**\n * Updates a checkout.\n *\n *\n * The `updateCheckout()` function returns a Promise that resolves to the updated checkout when the specified properties are updated.\n *\n * >**Notes:**\n * > + If nothing is passed in the request, the call will fail.\n * > + The `checkout.buyerInfo.email` may not be removed once it is set.\n */\nexport function updateCheckout(payload: object): RequestOptionsFactory<any> {\n  function __updateCheckout({ host }: any) {\n    const serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKFieldMaskToRESTFieldMask,\n        paths: [{ path: 'fieldMask' }],\n      },\n      {\n        transformFn: transformSDKTimestampToRESTTimestamp,\n        paths: [\n          { path: 'checkout.createdDate' },\n          { path: 'checkout.updatedDate' },\n          { path: 'checkout.lineItems.media.urlExpirationDate' },\n          {\n            path: 'checkout.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate',\n          },\n          { path: 'checkout.lineItems.serviceProperties.scheduledDate' },\n          {\n            path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.from',\n          },\n          {\n            path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.to',\n          },\n          {\n            path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.from',\n          },\n          {\n            path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.to',\n          },\n          {\n            path: 'checkout.membershipOptions.eligibleMemberships.expirationDate',\n          },\n          {\n            path: 'checkout.membershipOptions.invalidMemberships.membership.expirationDate',\n          },\n          { path: 'checkout.subscriptionCharges.charges.cycleBillingDate' },\n          { path: 'lineItems.media.urlExpirationDate' },\n          {\n            path: 'lineItems.subscriptionOptionInfo.subscriptionSettings.startDate',\n          },\n          { path: 'lineItems.serviceProperties.scheduledDate' },\n          {\n            path: 'customLineItems.subscriptionOptionInfo.subscriptionSettings.startDate',\n          },\n          { path: 'customLineItems.serviceProperties.scheduledDate' },\n        ],\n      },\n      {\n        transformFn: transformSDKFloatToRESTFloat,\n        paths: [\n          { path: 'checkout.lineItems.media.focalPoint.x' },\n          { path: 'checkout.lineItems.media.focalPoint.y' },\n          { path: 'lineItems.media.focalPoint.x' },\n          { path: 'lineItems.media.focalPoint.y' },\n          { path: 'checkout.lineItems.physicalProperties.weight' },\n          {\n            path: 'checkout.lineItems.catalogOverrideFields.physicalProperties.weight',\n          },\n          { path: 'checkout.billingInfo.address.geocode.latitude' },\n          { path: 'checkout.billingInfo.address.geocode.longitude' },\n          {\n            path: 'checkout.shippingInfo.shippingDestination.address.geocode.latitude',\n          },\n          {\n            path: 'checkout.shippingInfo.shippingDestination.address.geocode.longitude',\n          },\n          {\n            path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.latitude',\n          },\n          {\n            path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.longitude',\n          },\n          {\n            path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.latitude',\n          },\n          {\n            path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.longitude',\n          },\n          { path: 'checkout.appliedDiscounts.merchantDiscount.percentage' },\n          { path: 'lineItems.physicalProperties.weight' },\n          { path: 'lineItems.catalogOverrideFields.physicalProperties.weight' },\n          { path: 'customLineItems.physicalProperties.weight' },\n        ],\n      },\n    ]);\n    const metadata = {\n      entityFqdn: 'wix.ecom.v1.checkout',\n      method: 'PATCH' as any,\n      methodFqn: 'com.wix.ecom.checkout.api.v1.CheckoutService.UpdateCheckout',\n      packageName: PACKAGE_NAME,\n      url: resolveComWixEcomCheckoutApiV1CheckoutServiceUrl({\n        protoPath: '/v1/checkouts/{checkout.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: 'checkout.createdDate' },\n              { path: 'checkout.updatedDate' },\n              { path: 'checkout.lineItems.media.urlExpirationDate' },\n              {\n                path: 'checkout.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate',\n              },\n              { path: 'checkout.lineItems.serviceProperties.scheduledDate' },\n              {\n                path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.from',\n              },\n              {\n                path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.to',\n              },\n              {\n                path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.from',\n              },\n              {\n                path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.to',\n              },\n              {\n                path: 'checkout.membershipOptions.eligibleMemberships.expirationDate',\n              },\n              {\n                path: 'checkout.membershipOptions.invalidMemberships.membership.expirationDate',\n              },\n              { path: 'checkout.subscriptionCharges.charges.cycleBillingDate' },\n            ],\n          },\n          {\n            transformFn: transformRESTFloatToSDKFloat,\n            paths: [\n              { path: 'checkout.lineItems.media.focalPoint.x' },\n              { path: 'checkout.lineItems.media.focalPoint.y' },\n              { path: 'checkout.lineItems.physicalProperties.weight' },\n              {\n                path: 'checkout.lineItems.catalogOverrideFields.physicalProperties.weight',\n              },\n              { path: 'checkout.billingInfo.address.geocode.latitude' },\n              { path: 'checkout.billingInfo.address.geocode.longitude' },\n              {\n                path: 'checkout.shippingInfo.shippingDestination.address.geocode.latitude',\n              },\n              {\n                path: 'checkout.shippingInfo.shippingDestination.address.geocode.longitude',\n              },\n              {\n                path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.latitude',\n              },\n              {\n                path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.longitude',\n              },\n              {\n                path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.latitude',\n              },\n              {\n                path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.longitude',\n              },\n              { path: 'checkout.appliedDiscounts.merchantDiscount.percentage' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __updateCheckout;\n}\n\n/**\n * Removes the coupon from a specified checkout.\n *\n *\n * The `removeCoupon()` function returns a Promise that resolves to the updated checkout when the coupon is removed from the specified checkout.\n *\n * >**Note:** A checkout can only hold 1 coupon.\n */\nexport function removeCoupon(payload: object): RequestOptionsFactory<any> {\n  function __removeCoupon({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.ecom.v1.checkout',\n      method: 'POST' as any,\n      methodFqn: 'com.wix.ecom.checkout.api.v1.CheckoutService.RemoveCoupon',\n      packageName: PACKAGE_NAME,\n      url: resolveComWixEcomCheckoutApiV1CheckoutServiceUrl({\n        protoPath: '/v1/checkouts/{id}/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: 'checkout.createdDate' },\n              { path: 'checkout.updatedDate' },\n              { path: 'checkout.lineItems.media.urlExpirationDate' },\n              {\n                path: 'checkout.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate',\n              },\n              { path: 'checkout.lineItems.serviceProperties.scheduledDate' },\n              {\n                path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.from',\n              },\n              {\n                path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.to',\n              },\n              {\n                path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.from',\n              },\n              {\n                path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.to',\n              },\n              {\n                path: 'checkout.membershipOptions.eligibleMemberships.expirationDate',\n              },\n              {\n                path: 'checkout.membershipOptions.invalidMemberships.membership.expirationDate',\n              },\n              { path: 'checkout.subscriptionCharges.charges.cycleBillingDate' },\n            ],\n          },\n          {\n            transformFn: transformRESTFloatToSDKFloat,\n            paths: [\n              { path: 'checkout.lineItems.media.focalPoint.x' },\n              { path: 'checkout.lineItems.media.focalPoint.y' },\n              { path: 'checkout.lineItems.physicalProperties.weight' },\n              {\n                path: 'checkout.lineItems.catalogOverrideFields.physicalProperties.weight',\n              },\n              { path: 'checkout.billingInfo.address.geocode.latitude' },\n              { path: 'checkout.billingInfo.address.geocode.longitude' },\n              {\n                path: 'checkout.shippingInfo.shippingDestination.address.geocode.latitude',\n              },\n              {\n                path: 'checkout.shippingInfo.shippingDestination.address.geocode.longitude',\n              },\n              {\n                path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.latitude',\n              },\n              {\n                path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.longitude',\n              },\n              {\n                path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.latitude',\n              },\n              {\n                path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.longitude',\n              },\n              { path: 'checkout.appliedDiscounts.merchantDiscount.percentage' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __removeCoupon;\n}\n\n/**\n * Removes the gift card from a specified checkout.\n *\n *\n * The `removeGiftCard()` function returns a Promise that resolves to the updated checkout when the gift card is removed from the specified checkout.\n *\n * >**Note:** A checkout can only hold 1 gift card.\n */\nexport function removeGiftCard(payload: object): RequestOptionsFactory<any> {\n  function __removeGiftCard({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.ecom.v1.checkout',\n      method: 'POST' as any,\n      methodFqn: 'com.wix.ecom.checkout.api.v1.CheckoutService.RemoveGiftCard',\n      packageName: PACKAGE_NAME,\n      url: resolveComWixEcomCheckoutApiV1CheckoutServiceUrl({\n        protoPath: '/v1/checkouts/{id}/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: 'checkout.createdDate' },\n              { path: 'checkout.updatedDate' },\n              { path: 'checkout.lineItems.media.urlExpirationDate' },\n              {\n                path: 'checkout.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate',\n              },\n              { path: 'checkout.lineItems.serviceProperties.scheduledDate' },\n              {\n                path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.from',\n              },\n              {\n                path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.to',\n              },\n              {\n                path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.from',\n              },\n              {\n                path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.to',\n              },\n              {\n                path: 'checkout.membershipOptions.eligibleMemberships.expirationDate',\n              },\n              {\n                path: 'checkout.membershipOptions.invalidMemberships.membership.expirationDate',\n              },\n              { path: 'checkout.subscriptionCharges.charges.cycleBillingDate' },\n            ],\n          },\n          {\n            transformFn: transformRESTFloatToSDKFloat,\n            paths: [\n              { path: 'checkout.lineItems.media.focalPoint.x' },\n              { path: 'checkout.lineItems.media.focalPoint.y' },\n              { path: 'checkout.lineItems.physicalProperties.weight' },\n              {\n                path: 'checkout.lineItems.catalogOverrideFields.physicalProperties.weight',\n              },\n              { path: 'checkout.billingInfo.address.geocode.latitude' },\n              { path: 'checkout.billingInfo.address.geocode.longitude' },\n              {\n                path: 'checkout.shippingInfo.shippingDestination.address.geocode.latitude',\n              },\n              {\n                path: 'checkout.shippingInfo.shippingDestination.address.geocode.longitude',\n              },\n              {\n                path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.latitude',\n              },\n              {\n                path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.longitude',\n              },\n              {\n                path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.latitude',\n              },\n              {\n                path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.longitude',\n              },\n              { path: 'checkout.appliedDiscounts.merchantDiscount.percentage' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __removeGiftCard;\n}\n\n/**\n * Removes the `overrideCheckoutUrl` from a specified checkout.\n *\n * When `overrideCheckoutUrl` is removed, the `checkoutUrl` will be set to the default, standard\n * Wix checkout page URL.\n */\nexport function removeOverrideCheckoutUrl(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __removeOverrideCheckoutUrl({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.ecom.v1.checkout',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wix.ecom.checkout.api.v1.CheckoutService.RemoveOverrideCheckoutUrl',\n      packageName: PACKAGE_NAME,\n      url: resolveComWixEcomCheckoutApiV1CheckoutServiceUrl({\n        protoPath: '/v1/checkouts/{id}/remove-override-checkout-url',\n        data: payload,\n        host,\n      }),\n      data: payload,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'checkout.createdDate' },\n              { path: 'checkout.updatedDate' },\n              { path: 'checkout.lineItems.media.urlExpirationDate' },\n              {\n                path: 'checkout.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate',\n              },\n              { path: 'checkout.lineItems.serviceProperties.scheduledDate' },\n              {\n                path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.from',\n              },\n              {\n                path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.to',\n              },\n              {\n                path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.from',\n              },\n              {\n                path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.to',\n              },\n              {\n                path: 'checkout.membershipOptions.eligibleMemberships.expirationDate',\n              },\n              {\n                path: 'checkout.membershipOptions.invalidMemberships.membership.expirationDate',\n              },\n              { path: 'checkout.subscriptionCharges.charges.cycleBillingDate' },\n            ],\n          },\n          {\n            transformFn: transformRESTFloatToSDKFloat,\n            paths: [\n              { path: 'checkout.lineItems.media.focalPoint.x' },\n              { path: 'checkout.lineItems.media.focalPoint.y' },\n              { path: 'checkout.lineItems.physicalProperties.weight' },\n              {\n                path: 'checkout.lineItems.catalogOverrideFields.physicalProperties.weight',\n              },\n              { path: 'checkout.billingInfo.address.geocode.latitude' },\n              { path: 'checkout.billingInfo.address.geocode.longitude' },\n              {\n                path: 'checkout.shippingInfo.shippingDestination.address.geocode.latitude',\n              },\n              {\n                path: 'checkout.shippingInfo.shippingDestination.address.geocode.longitude',\n              },\n              {\n                path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.latitude',\n              },\n              {\n                path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.longitude',\n              },\n              {\n                path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.latitude',\n              },\n              {\n                path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.longitude',\n              },\n              { path: 'checkout.appliedDiscounts.merchantDiscount.percentage' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __removeOverrideCheckoutUrl;\n}\n\n/**\n * Adds catalog line items and/or custom line items to a checkout.\n *\n *\n * The `addToCheckout()` function returns a Promise that resolves to the updated checkout when the specified items have been added.\n * > **Note:** When adding catalog items, `options.lineItems.catalogReference` is required.\n */\nexport function addToCheckout(payload: object): RequestOptionsFactory<any> {\n  function __addToCheckout({ host }: any) {\n    const serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKTimestampToRESTTimestamp,\n        paths: [\n          { path: 'lineItems.media.urlExpirationDate' },\n          {\n            path: 'lineItems.subscriptionOptionInfo.subscriptionSettings.startDate',\n          },\n          { path: 'lineItems.serviceProperties.scheduledDate' },\n          {\n            path: 'customLineItems.subscriptionOptionInfo.subscriptionSettings.startDate',\n          },\n          { path: 'customLineItems.serviceProperties.scheduledDate' },\n        ],\n      },\n      {\n        transformFn: transformSDKFloatToRESTFloat,\n        paths: [\n          { path: 'lineItems.media.focalPoint.x' },\n          { path: 'lineItems.media.focalPoint.y' },\n          { path: 'lineItems.physicalProperties.weight' },\n          { path: 'lineItems.catalogOverrideFields.physicalProperties.weight' },\n          { path: 'customLineItems.physicalProperties.weight' },\n        ],\n      },\n    ]);\n    const metadata = {\n      entityFqdn: 'wix.ecom.v1.checkout',\n      method: 'POST' as any,\n      methodFqn: 'com.wix.ecom.checkout.api.v1.CheckoutService.AddToCheckout',\n      packageName: PACKAGE_NAME,\n      url: resolveComWixEcomCheckoutApiV1CheckoutServiceUrl({\n        protoPath: '/v1/checkouts/{id}/add-to-checkout',\n        data: serializedData,\n        host,\n      }),\n      data: serializedData,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'checkout.createdDate' },\n              { path: 'checkout.updatedDate' },\n              { path: 'checkout.lineItems.media.urlExpirationDate' },\n              {\n                path: 'checkout.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate',\n              },\n              { path: 'checkout.lineItems.serviceProperties.scheduledDate' },\n              {\n                path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.from',\n              },\n              {\n                path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.to',\n              },\n              {\n                path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.from',\n              },\n              {\n                path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.to',\n              },\n              {\n                path: 'checkout.membershipOptions.eligibleMemberships.expirationDate',\n              },\n              {\n                path: 'checkout.membershipOptions.invalidMemberships.membership.expirationDate',\n              },\n              { path: 'checkout.subscriptionCharges.charges.cycleBillingDate' },\n            ],\n          },\n          {\n            transformFn: transformRESTFloatToSDKFloat,\n            paths: [\n              { path: 'checkout.lineItems.media.focalPoint.x' },\n              { path: 'checkout.lineItems.media.focalPoint.y' },\n              { path: 'checkout.lineItems.physicalProperties.weight' },\n              {\n                path: 'checkout.lineItems.catalogOverrideFields.physicalProperties.weight',\n              },\n              { path: 'checkout.billingInfo.address.geocode.latitude' },\n              { path: 'checkout.billingInfo.address.geocode.longitude' },\n              {\n                path: 'checkout.shippingInfo.shippingDestination.address.geocode.latitude',\n              },\n              {\n                path: 'checkout.shippingInfo.shippingDestination.address.geocode.longitude',\n              },\n              {\n                path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.latitude',\n              },\n              {\n                path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.longitude',\n              },\n              {\n                path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.latitude',\n              },\n              {\n                path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.longitude',\n              },\n              { path: 'checkout.appliedDiscounts.merchantDiscount.percentage' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __addToCheckout;\n}\n\n/**\n * Removes line items from the specified checkout.\n *\n *\n * The `removeLineItems()` function returns a Promise that resolves to the updated checkout when the line items are removed from the specified checkout.\n */\nexport function removeLineItems(payload: object): RequestOptionsFactory<any> {\n  function __removeLineItems({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.ecom.v1.checkout',\n      method: 'POST' as any,\n      methodFqn: 'com.wix.ecom.checkout.api.v1.CheckoutService.RemoveLineItems',\n      packageName: PACKAGE_NAME,\n      url: resolveComWixEcomCheckoutApiV1CheckoutServiceUrl({\n        protoPath: '/v1/checkouts/{id}/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: 'checkout.createdDate' },\n              { path: 'checkout.updatedDate' },\n              { path: 'checkout.lineItems.media.urlExpirationDate' },\n              {\n                path: 'checkout.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate',\n              },\n              { path: 'checkout.lineItems.serviceProperties.scheduledDate' },\n              {\n                path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.from',\n              },\n              {\n                path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.to',\n              },\n              {\n                path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.from',\n              },\n              {\n                path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.to',\n              },\n              {\n                path: 'checkout.membershipOptions.eligibleMemberships.expirationDate',\n              },\n              {\n                path: 'checkout.membershipOptions.invalidMemberships.membership.expirationDate',\n              },\n              { path: 'checkout.subscriptionCharges.charges.cycleBillingDate' },\n            ],\n          },\n          {\n            transformFn: transformRESTFloatToSDKFloat,\n            paths: [\n              { path: 'checkout.lineItems.media.focalPoint.x' },\n              { path: 'checkout.lineItems.media.focalPoint.y' },\n              { path: 'checkout.lineItems.physicalProperties.weight' },\n              {\n                path: 'checkout.lineItems.catalogOverrideFields.physicalProperties.weight',\n              },\n              { path: 'checkout.billingInfo.address.geocode.latitude' },\n              { path: 'checkout.billingInfo.address.geocode.longitude' },\n              {\n                path: 'checkout.shippingInfo.shippingDestination.address.geocode.latitude',\n              },\n              {\n                path: 'checkout.shippingInfo.shippingDestination.address.geocode.longitude',\n              },\n              {\n                path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.latitude',\n              },\n              {\n                path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.longitude',\n              },\n              {\n                path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.latitude',\n              },\n              {\n                path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.longitude',\n              },\n              { path: 'checkout.appliedDiscounts.merchantDiscount.percentage' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __removeLineItems;\n}\n\n/**\n * Creates an order from a specified checkout.\n *\n * The `createOrder()` function returns a Promise that resolves to the new order's ID and `paymentGatewayOrderID` when the order is created.\n * Pass the `paymentGatewayOrderId` as the `paymentId` param to the [`startPayment()`](https://www.wix.com/velo/reference/wix-pay-frontend/startpayment) function to allow a customer to pay for their order.\n *\n * > **Note:** The following requirements must be met for an order to be created from a checkout.\n * > + A checkout cannot have calculation errors. Pass the `checkout._id` to [Get Checkout](https://www.wix.com/velo/reference/wix-ecom-backend/checkout/getcheckout) and take a look at the `calculationErrors` field.\n * > + A checkout must have at least 1 line item.\n * > + All of the line Items have an `availability.status` of `\"AVAILABLE\"` or `\"PARTIALLY_AVAILABLE\"`.\n * > + If there is a payment to be made, meaning that `priceSummary.total` is greater than 0, the `billingInfo.address` field must be provided.\n * > + When a checkout has line items to be shipped, the `shippingInfo.shippingDestination.address` and `shippingInfo.selectedCarrierServiceOption` fields must be provided.\n * > + When a checkout has line items for pickup, the `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails` field must be provided.\n */\nexport function createOrder(payload: object): RequestOptionsFactory<any> {\n  function __createOrder({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.ecom.v1.checkout',\n      method: 'POST' as any,\n      methodFqn: 'com.wix.ecom.checkout.api.v1.CheckoutService.CreateOrder',\n      packageName: PACKAGE_NAME,\n      url: resolveComWixEcomCheckoutApiV1CheckoutServiceUrl({\n        protoPath: '/v1/checkouts/{id}/create-order',\n        data: payload,\n        host,\n      }),\n      data: payload,\n    };\n\n    return metadata;\n  }\n\n  return __createOrder;\n}\n\n/** Deprecated (use createOrder instead) */\nexport function createOrderAndCharge(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __createOrderAndCharge({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.ecom.v1.checkout',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wix.ecom.checkout.api.v1.CheckoutService.CreateOrderAndCharge',\n      packageName: PACKAGE_NAME,\n      url: resolveComWixEcomCheckoutApiV1CheckoutServiceUrl({\n        protoPath: '/v1/checkouts/{id}/create-order-and-charge',\n        data: payload,\n        host,\n      }),\n      data: payload,\n    };\n\n    return metadata;\n  }\n\n  return __createOrderAndCharge;\n}\n\n/**\n * Marks a checkout as completed - `checkout.complete` boolean is set to `true`.\n *\n *\n * The `markCheckoutAsCompleted()` function returns a Promise that resolves when the specified checkout is marked as completed.\n */\nexport function markCheckoutAsCompleted(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __markCheckoutAsCompleted({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.ecom.v1.checkout',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wix.ecom.checkout.api.v1.CheckoutService.MarkCheckoutAsCompleted',\n      packageName: PACKAGE_NAME,\n      url: resolveComWixEcomCheckoutApiV1CheckoutServiceUrl({\n        protoPath: '/v1/checkouts/{id}/mark-as-completed',\n        data: payload,\n        host,\n      }),\n      data: payload,\n    };\n\n    return metadata;\n  }\n\n  return __markCheckoutAsCompleted;\n}\n\n/**\n * Updates the quantity of one or more line items in a checkout.\n *\n * This endpoint is only for updating the quantity of line items. To entirely remove a line item from\n * the checkout, use [`removeLineItems()`](#removelineitems).\n * To add a new line item to the checkout, use [`addToCheckout()`](#addtocheckout).\n *\n * This endpoint checks the amount of stock remaining for this line item. If the specified `quantity`\n * is greater than the remaining stock, then the `quantity` returned in the response is the total amount\n * of remaining stock.\n */\nexport function updateLineItemsQuantity(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __updateLineItemsQuantity({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.ecom.v1.checkout',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wix.ecom.checkout.api.v1.CheckoutService.UpdateLineItemsQuantity',\n      packageName: PACKAGE_NAME,\n      url: resolveComWixEcomCheckoutApiV1CheckoutServiceUrl({\n        protoPath: '/v1/checkouts/{id}/update-line-items-quantity',\n        data: payload,\n        host,\n      }),\n      data: payload,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'checkout.createdDate' },\n              { path: 'checkout.updatedDate' },\n              { path: 'checkout.lineItems.media.urlExpirationDate' },\n              {\n                path: 'checkout.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate',\n              },\n              { path: 'checkout.lineItems.serviceProperties.scheduledDate' },\n              {\n                path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.from',\n              },\n              {\n                path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.to',\n              },\n              {\n                path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.from',\n              },\n              {\n                path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.to',\n              },\n              {\n                path: 'checkout.membershipOptions.eligibleMemberships.expirationDate',\n              },\n              {\n                path: 'checkout.membershipOptions.invalidMemberships.membership.expirationDate',\n              },\n              { path: 'checkout.subscriptionCharges.charges.cycleBillingDate' },\n            ],\n          },\n          {\n            transformFn: transformRESTFloatToSDKFloat,\n            paths: [\n              { path: 'checkout.lineItems.media.focalPoint.x' },\n              { path: 'checkout.lineItems.media.focalPoint.y' },\n              { path: 'checkout.lineItems.physicalProperties.weight' },\n              {\n                path: 'checkout.lineItems.catalogOverrideFields.physicalProperties.weight',\n              },\n              { path: 'checkout.billingInfo.address.geocode.latitude' },\n              { path: 'checkout.billingInfo.address.geocode.longitude' },\n              {\n                path: 'checkout.shippingInfo.shippingDestination.address.geocode.latitude',\n              },\n              {\n                path: 'checkout.shippingInfo.shippingDestination.address.geocode.longitude',\n              },\n              {\n                path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.latitude',\n              },\n              {\n                path: 'checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.longitude',\n              },\n              {\n                path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.latitude',\n              },\n              {\n                path: 'checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.longitude',\n              },\n              { path: 'checkout.appliedDiscounts.merchantDiscount.percentage' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __updateLineItemsQuantity;\n}\n\nexport function getCheckoutPaymentSettings(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __getCheckoutPaymentSettings({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.ecom.v1.checkout',\n      method: 'GET' as any,\n      methodFqn:\n        'com.wix.ecom.checkout.api.v1.CheckoutService.GetCheckoutPaymentSettings',\n      packageName: PACKAGE_NAME,\n      url: resolveComWixEcomCheckoutApiV1CheckoutServiceUrl({\n        protoPath: '/v1/checkouts/{id}/payment-settings',\n        data: payload,\n        host,\n      }),\n      params: toURLSearchParams(payload),\n    };\n\n    return metadata;\n  }\n\n  return __getCheckoutPaymentSettings;\n}\n","import {\n  createCheckout as publicCreateCheckout,\n  getCheckout as publicGetCheckout,\n  getCheckoutByCartId as publicGetCheckoutByCartId,\n  getWixCheckoutUrl as publicGetWixCheckoutUrl,\n  getCheckoutUrl as publicGetCheckoutUrl,\n  updateCheckout as publicUpdateCheckout,\n  removeCoupon as publicRemoveCoupon,\n  removeGiftCard as publicRemoveGiftCard,\n  removeOverrideCheckoutUrl as publicRemoveOverrideCheckoutUrl,\n  addToCheckout as publicAddToCheckout,\n  removeLineItems as publicRemoveLineItems,\n  createOrder as publicCreateOrder,\n  createOrderAndCharge as publicCreateOrderAndCharge,\n  markCheckoutAsCompleted as publicMarkCheckoutAsCompleted,\n  updateLineItemsQuantity as publicUpdateLineItemsQuantity,\n  getCheckoutPaymentSettings as publicGetCheckoutPaymentSettings,\n} from './ecom-v1-checkout-checkout.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\nimport { onCheckoutCompleted as publicOnCheckoutCompleted } from './ecom-v1-checkout-checkout.public.js';\nimport { onCheckoutCreated as publicOnCheckoutCreated } from './ecom-v1-checkout-checkout.public.js';\nimport { onCheckoutUpdated as publicOnCheckoutUpdated } from './ecom-v1-checkout-checkout.public.js';\n\nexport const createCheckout: MaybeContext<\n  BuildRESTFunction<typeof publicCreateCheckout> & typeof publicCreateCheckout\n> = /*#__PURE__*/ createRESTModule(publicCreateCheckout);\nexport const getCheckout: MaybeContext<\n  BuildRESTFunction<typeof publicGetCheckout> & typeof publicGetCheckout\n> = /*#__PURE__*/ createRESTModule(publicGetCheckout);\nexport const getCheckoutByCartId: MaybeContext<\n  BuildRESTFunction<typeof publicGetCheckoutByCartId> &\n    typeof publicGetCheckoutByCartId\n> = /*#__PURE__*/ createRESTModule(publicGetCheckoutByCartId);\n/** @internal */\nexport const getWixCheckoutUrl: MaybeContext<\n  BuildRESTFunction<typeof publicGetWixCheckoutUrl> &\n    typeof publicGetWixCheckoutUrl\n> = /*#__PURE__*/ createRESTModule(publicGetWixCheckoutUrl);\nexport const getCheckoutUrl: MaybeContext<\n  BuildRESTFunction<typeof publicGetCheckoutUrl> & typeof publicGetCheckoutUrl\n> = /*#__PURE__*/ createRESTModule(publicGetCheckoutUrl);\nexport const updateCheckout: MaybeContext<\n  BuildRESTFunction<typeof publicUpdateCheckout> & typeof publicUpdateCheckout\n> = /*#__PURE__*/ createRESTModule(publicUpdateCheckout);\nexport const removeCoupon: MaybeContext<\n  BuildRESTFunction<typeof publicRemoveCoupon> & typeof publicRemoveCoupon\n> = /*#__PURE__*/ createRESTModule(publicRemoveCoupon);\nexport const removeGiftCard: MaybeContext<\n  BuildRESTFunction<typeof publicRemoveGiftCard> & typeof publicRemoveGiftCard\n> = /*#__PURE__*/ createRESTModule(publicRemoveGiftCard);\nexport const removeOverrideCheckoutUrl: MaybeContext<\n  BuildRESTFunction<typeof publicRemoveOverrideCheckoutUrl> &\n    typeof publicRemoveOverrideCheckoutUrl\n> = /*#__PURE__*/ createRESTModule(publicRemoveOverrideCheckoutUrl);\nexport const addToCheckout: MaybeContext<\n  BuildRESTFunction<typeof publicAddToCheckout> & typeof publicAddToCheckout\n> = /*#__PURE__*/ createRESTModule(publicAddToCheckout);\nexport const removeLineItems: MaybeContext<\n  BuildRESTFunction<typeof publicRemoveLineItems> & typeof publicRemoveLineItems\n> = /*#__PURE__*/ createRESTModule(publicRemoveLineItems);\nexport const createOrder: MaybeContext<\n  BuildRESTFunction<typeof publicCreateOrder> & typeof publicCreateOrder\n> = /*#__PURE__*/ createRESTModule(publicCreateOrder);\n/** @internal */\nexport const createOrderAndCharge: MaybeContext<\n  BuildRESTFunction<typeof publicCreateOrderAndCharge> &\n    typeof publicCreateOrderAndCharge\n> = /*#__PURE__*/ createRESTModule(publicCreateOrderAndCharge);\nexport const markCheckoutAsCompleted: MaybeContext<\n  BuildRESTFunction<typeof publicMarkCheckoutAsCompleted> &\n    typeof publicMarkCheckoutAsCompleted\n> = /*#__PURE__*/ createRESTModule(publicMarkCheckoutAsCompleted);\nexport const updateLineItemsQuantity: MaybeContext<\n  BuildRESTFunction<typeof publicUpdateLineItemsQuantity> &\n    typeof publicUpdateLineItemsQuantity\n> = /*#__PURE__*/ createRESTModule(publicUpdateLineItemsQuantity);\n/** @internal */\nexport const getCheckoutPaymentSettings: MaybeContext<\n  BuildRESTFunction<typeof publicGetCheckoutPaymentSettings> &\n    typeof publicGetCheckoutPaymentSettings\n> = /*#__PURE__*/ createRESTModule(publicGetCheckoutPaymentSettings);\n/**\n * Triggered when an order created from this checkout is\n * successfully paid for or when a checkout is marked as completed.\n */\nexport const onCheckoutCompleted: ReturnType<\n  typeof createEventModule<typeof publicOnCheckoutCompleted>\n> = createEventModule(publicOnCheckoutCompleted);\n/**\n * Triggered when a checkout is created.\n */\nexport const onCheckoutCreated: ReturnType<\n  typeof createEventModule<typeof publicOnCheckoutCreated>\n> = createEventModule(publicOnCheckoutCreated);\n/**\n * Triggered when a checkout is updated.\n */\nexport const onCheckoutUpdated: ReturnType<\n  typeof createEventModule<typeof publicOnCheckoutUpdated>\n> = createEventModule(publicOnCheckoutUpdated);\n\nexport {\n  JurisdictionType,\n  DescriptionLineType,\n  ItemAvailabilityStatus,\n  ItemTypeItemType,\n  SubscriptionFrequency,\n  FileType,\n  PaymentOptionType,\n  TaxableAddressType,\n  CommonVatType,\n  PickupMethod,\n  ChargeType,\n  RuleType,\n  DiscountType,\n  WeightUnit,\n  RateType,\n  ManualCalculationReason,\n  FallbackReason,\n  ChannelType,\n  AdditionalFeeSource,\n  Severity,\n  NameInOther,\n  NameInLineItem,\n  SuggestedFix,\n  GetCheckoutPaymentSettingsResponsePaymentOption,\n  IdentityType,\n  LineItemType,\n  MediaItemType,\n  VatType,\n  DiscountDiscountType,\n  ChannelInfoChannelType,\n  WebhookIdentityType,\n} from './ecom-v1-checkout-checkout.universal.js';\nexport {\n  Checkout,\n  LineItem,\n  CatalogReference,\n  ProductName,\n  MultiCurrencyPrice,\n  ItemTaxFullDetails,\n  TaxRateBreakdown,\n  TaxBreakdown,\n  DescriptionLine,\n  DescriptionLineValueOneOf,\n  DescriptionLineDescriptionLineValueOneOf,\n  DescriptionLineName,\n  PlainTextValue,\n  Color,\n  FocalPoint,\n  ItemAvailabilityInfo,\n  PhysicalProperties,\n  Scope,\n  Group,\n  ItemType,\n  ItemTypeItemTypeDataOneOf,\n  SubscriptionOptionInfo,\n  SubscriptionSettings,\n  FreeTrialPeriod,\n  Title,\n  Description,\n  SecuredMedia,\n  ServiceProperties,\n  PriceDescription,\n  CatalogOverrideFields,\n  PaymentOption,\n  TaxableAddress,\n  TaxableAddressTaxableAddressDataOneOf,\n  ExtendedFields,\n  Policy,\n  AddressWithContact,\n  ApiAddress,\n  StreetAddress,\n  AddressLocation,\n  FullAddressContactDetails,\n  CommonVatId,\n  ShippingInfo,\n  SelectedCarrierServiceOption,\n  DeliveryLogistics,\n  PickupDetails,\n  DeliveryTimeSlot,\n  SelectedCarrierServiceOptionPrices,\n  SelectedCarrierServiceOptionOtherCharge,\n  DeliveryAllocation,\n  Carrier,\n  Region,\n  ApplicableLineItems,\n  ShippingRegion,\n  CarrierServiceOption,\n  ShippingOption,\n  ShippingPrice,\n  OtherCharge,\n  BuyerInfo,\n  BuyerInfoIdOneOf,\n  PriceSummary,\n  CalculationErrors,\n  CalculationErrorsShippingCalculationErrorOneOf,\n  Details,\n  DetailsKindOneOf,\n  ApplicationError,\n  ValidationError,\n  FieldViolation,\n  SystemError,\n  CarrierErrors,\n  CarrierError,\n  GiftCard,\n  AppliedDiscount,\n  AppliedDiscountDiscountSourceOneOf,\n  Coupon,\n  MerchantDiscount,\n  DiscountRule,\n  DiscountRuleName,\n  LineItemDiscount,\n  CustomField,\n  TaxSummary,\n  TaxCalculationDetails,\n  TaxCalculationDetailsCalculationDetailsOneOf,\n  AutoTaxFallbackCalculationDetails,\n  AggregatedTaxBreakdown,\n  CreatedBy,\n  CreatedByIdOneOf,\n  MembershipOptions,\n  Membership,\n  MembershipName,\n  MembershipPaymentCredits,\n  InvalidMembership,\n  SelectedMemberships,\n  SelectedMembership,\n  AdditionalFee,\n  ConversionInfo,\n  Violation,\n  Target,\n  TargetTargetTypeOneOf,\n  Other,\n  TargetLineItem,\n  CustomSettings,\n  CustomContentReference,\n  ExternalReference,\n  SubscriptionCharges,\n  Charge,\n  UpdatedCheckoutMessage,\n  CreateCheckoutRequest,\n  CustomLineItem,\n  MerchantDiscountInput,\n  CreateCheckoutResponse,\n  ShippingCalculationErrorData,\n  ShippingCalculationErrorDataShippingCalculationErrorOneOf,\n  GetCheckoutRequest,\n  GetCheckoutResponse,\n  GetCheckoutWithAllExtendedFieldsRequest,\n  GetCheckoutWithAllExtendedFieldsResponse,\n  GetCheckoutByCartIdRequest,\n  GetCheckoutByCartIdResponse,\n  GetWixCheckoutURLRequest,\n  GetWixCheckoutURLResponse,\n  GetCheckoutURLRequest,\n  GetCheckoutURLResponse,\n  UpdateCheckoutRequest,\n  UpdateCheckoutResponse,\n  RemoveCouponRequest,\n  RemoveCouponResponse,\n  RemoveGiftCardRequest,\n  RemoveGiftCardResponse,\n  RemoveOverrideCheckoutUrlRequest,\n  RemoveOverrideCheckoutUrlResponse,\n  AddToCheckoutRequest,\n  AddToCheckoutResponse,\n  RemoveLineItemsRequest,\n  RemoveLineItemsResponse,\n  CreateOrderRequest,\n  CreateOrderResponse,\n  CreateOrderResponseIdOneOf,\n  PaymentErrorResponseData,\n  DoublePaymentErrorData,\n  DoublePaymentErrorDataIdOneOf,\n  RedeemErrorData,\n  ViolationsList,\n  CreateOrderAndChargeRequest,\n  CreateOrderAndChargeResponse,\n  CreateOrderAndChargeResponseIdOneOf,\n  MarkCheckoutAsCompletedRequest,\n  MarkCheckoutAsCompletedResponse,\n  CheckoutMarkedAsCompleted,\n  UpdateLineItemsQuantityRequest,\n  LineItemQuantityUpdate,\n  UpdateLineItemsQuantityResponse,\n  GetCheckoutPaymentSettingsRequest,\n  GetCheckoutPaymentSettingsResponse,\n  DeleteCheckoutRequest,\n  DeleteCheckoutResponse,\n  SubscriptionCreated,\n  Subscription,\n  V1BuyerInfo,\n  V1LineItem,\n  OptionSelection,\n  CustomTextFieldSelection,\n  ChargeDetails,\n  ProductDetails,\n  MediaItem,\n  Totals,\n  StoreSettings,\n  Address,\n  AddressAddressLine1OptionsOneOf,\n  FullName,\n  Street,\n  VatId,\n  V1ShippingInfo,\n  V1ShippingInfoDetailsOneOf,\n  ShipmentDetails,\n  V1PickupDetails,\n  PickupAddress,\n  AppliedCoupon,\n  V1CustomField,\n  V1SubscriptionOptionInfo,\n  Discount,\n  ChannelInfo,\n  V1SubscriptionSettings,\n  BillingInfo,\n  Empty,\n  DomainEvent,\n  DomainEventBodyOneOf,\n  EntityCreatedEvent,\n  RestoreInfo,\n  EntityUpdatedEvent,\n  EntityDeletedEvent,\n  ActionEvent,\n  MessageEnvelope,\n  IdentificationData,\n  IdentificationDataIdOneOf,\n  CheckoutNonNullableFields,\n  CreateCheckoutResponseNonNullableFields,\n  GetCheckoutResponseNonNullableFields,\n  GetCheckoutByCartIdResponseNonNullableFields,\n  GetWixCheckoutURLResponseNonNullableFields,\n  GetCheckoutURLResponseNonNullableFields,\n  UpdateCheckoutResponseNonNullableFields,\n  RemoveCouponResponseNonNullableFields,\n  RemoveGiftCardResponseNonNullableFields,\n  RemoveOverrideCheckoutUrlResponseNonNullableFields,\n  AddToCheckoutResponseNonNullableFields,\n  RemoveLineItemsResponseNonNullableFields,\n  CreateOrderResponseNonNullableFields,\n  CreateOrderAndChargeResponseNonNullableFields,\n  UpdateLineItemsQuantityResponseNonNullableFields,\n  GetCheckoutPaymentSettingsResponseNonNullableFields,\n  BaseEventMetadata,\n  EventMetadata,\n  CheckoutCompletedEnvelope,\n  CheckoutCreatedEnvelope,\n  CheckoutUpdatedEnvelope,\n  CreateCheckoutOptions,\n  UpdateCheckout,\n  UpdateCheckoutOptions,\n  AddToCheckoutOptions,\n  CreateOrderOptions,\n  CreateOrderAndChargeOptions,\n} from './ecom-v1-checkout-checkout.universal.js';\n"]}