{"version":3,"sources":["../src/ecom-v1-checkout-template-checkout-templates.public.ts","../src/ecom-v1-checkout-template-checkout-templates.universal.ts","../src/ecom-v1-checkout-template-checkout-templates.http.ts","../src/ecom-v1-checkout-template-checkout-templates.context.ts"],"sourcesContent":["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  CheckoutTemplate,\n  CheckoutTemplateCreatedEnvelope,\n  CheckoutTemplateDeletedEnvelope,\n  CheckoutTemplateNonNullableFields,\n  CheckoutTemplateUpdatedEnvelope,\n  CheckoutTemplateUsedEnvelope,\n  CheckoutTemplatesQueryBuilder,\n  CreateCheckoutFromTemplateResponse,\n  CreateCheckoutFromTemplateResponseNonNullableFields,\n  RawHttpResponse,\n  RawHttpResponseNonNullableFields,\n  UpdateCheckoutTemplate,\n  createAndRedirectToCheckout as universalCreateAndRedirectToCheckout,\n  createCheckoutFromTemplate as universalCreateCheckoutFromTemplate,\n  createCheckoutTemplate as universalCreateCheckoutTemplate,\n  deleteCheckoutTemplate as universalDeleteCheckoutTemplate,\n  getCheckoutTemplate as universalGetCheckoutTemplate,\n  queryCheckoutTemplates as universalQueryCheckoutTemplates,\n  updateCheckoutTemplate as universalUpdateCheckoutTemplate,\n} from './ecom-v1-checkout-template-checkout-templates.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/ecom' };\n\nexport function createCheckoutTemplate(\n  httpClient: HttpClient\n): CreateCheckoutTemplateSignature {\n  return (checkoutTemplate: CheckoutTemplate) =>\n    universalCreateCheckoutTemplate(\n      checkoutTemplate,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface CreateCheckoutTemplateSignature {\n  /**\n   * Creates a checkout template.\n   *\n   * A checkout template is used to create a new checkout that will include predefined information. For example, a single link with\n   * a `checkoutTemplateId` can be shared with customers and each time the link is clicked, a new checkout page will be created\n   * for that customer with certain checkout information already populated.\n   *\n   * The customizable features include the option to allow or to lock coupon codes or gift cards. For example, if a store owner is\n   * using the checkout template to offer a flash sale to their social media followers, they may want to lock the option to apply an\n   * additional coupon on top of the sale being offered. If so, they can set `customization.lockedCoupon` to `true`.\n   *\n   * A checkout can be created with a checkout template by calling `createCheckoutFromTemplate()`. The site may add further customizations to the new checkout and then redirect the customer using the new checkout's `checkoutUrl`.\n   * @param - Checkout template to create.\n   * @returns Created checkout template.\n   */\n  (checkoutTemplate: CheckoutTemplate): Promise<\n    CheckoutTemplate & CheckoutTemplateNonNullableFields\n  >;\n}\n\nexport function getCheckoutTemplate(\n  httpClient: HttpClient\n): GetCheckoutTemplateSignature {\n  return (checkoutTemplateId: string) =>\n    universalGetCheckoutTemplate(\n      checkoutTemplateId,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface GetCheckoutTemplateSignature {\n  /**\n   * Retrieves a checkout template.\n   * @param - ID of the checkout template to retrieve.\n   * @returns Retrieved checkout template.\n   */\n  (checkoutTemplateId: string): Promise<\n    CheckoutTemplate & CheckoutTemplateNonNullableFields\n  >;\n}\n\nexport function updateCheckoutTemplate(\n  httpClient: HttpClient\n): UpdateCheckoutTemplateSignature {\n  return (_id: string | null, checkoutTemplate: UpdateCheckoutTemplate) =>\n    universalUpdateCheckoutTemplate(\n      _id,\n      checkoutTemplate,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface UpdateCheckoutTemplateSignature {\n  /**\n   * Updates a checkout template.\n   *\n   * If the info in a checkout template is updated, only new checkouts created from this template will include the updated items. Checkouts previously\n   * created from this template before the update will not be affected.\n   * @param - Checkout template ID.\n   * @param - Checkout template info to update.\n   * @returns Updated checkout template.\n   */\n  (_id: string | null, checkoutTemplate: UpdateCheckoutTemplate): Promise<\n    CheckoutTemplate & CheckoutTemplateNonNullableFields\n  >;\n}\n\nexport function deleteCheckoutTemplate(\n  httpClient: HttpClient\n): DeleteCheckoutTemplateSignature {\n  return (checkoutTemplateId: string) =>\n    universalDeleteCheckoutTemplate(\n      checkoutTemplateId,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface DeleteCheckoutTemplateSignature {\n  /**\n   * Deletes a checkout template.\n   *\n   * If a checkout template is deleted and a customer attempts to create a checkout with that `checkoutTemplateId` then\n   * the customer will be redirected to the domain site.\n   * @param - ID of the checkout template to delete.\n   */\n  (checkoutTemplateId: string): Promise<void>;\n}\n\nexport function queryCheckoutTemplates(\n  httpClient: HttpClient\n): QueryCheckoutTemplatesSignature {\n  return () =>\n    universalQueryCheckoutTemplates(\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface QueryCheckoutTemplatesSignature {\n  /**\n   * Creates a query to retrieve a list of checkout templates.\n   *\n   * The `queryCheckoutTemplates()` function builds a query to retrieve a list of checkout templates and returns a `CheckoutTemplatesQueryBuilder` object.\n   *\n   * The returned object contains the query definition, which is typically used to run the query using the `find()` function.\n   *\n   * You can refine the query by chaining `CheckoutTemplatesQueryBuilder` functions onto the query. `CheckoutTemplatesQueryBuilder` functions enable you to sort, filter, and control the results that `queryCheckoutTemplates()` returns.\n   *\n   * `queryCheckoutTemplates()` runs with the following `CheckoutTemplatesQueryBuilder` default that you can override:\n   * + `ascending(\"_id\")`\n   *\n   * The functions that are chained to `queryCheckoutTemplates()` are applied in the order they are called. For example, if you apply `ascending(\"status\")` and then `ascending(\"_id\")`, the results are sorted first by the `\"status\"`, and then, if there are multiple results with the same `\"status\"`, the items are sorted by `\"_id\"`.\n   *\n   * The following `CheckoutTemplatesQueryBuilder` functions are supported for the `queryCheckoutTemplates()` function. For a full description of the checkout template object, see the object returned for the `items` property in `CheckoutTemplatesQueryResult`.\n   */\n  (): CheckoutTemplatesQueryBuilder;\n}\n\nexport function createCheckoutFromTemplate(\n  httpClient: HttpClient\n): CreateCheckoutFromTemplateSignature {\n  return (checkoutTemplateId: string, siteId: string) =>\n    universalCreateCheckoutFromTemplate(\n      checkoutTemplateId,\n      siteId,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface CreateCheckoutFromTemplateSignature {\n  /**\n   * Creates a new checkout based on the checkout template.\n   *\n   * Before using this function, you must have a checkout template available. Create a checkout template with `createCheckoutTemplate()`.\n   *\n   * The customer can be directed to the new checkout using the checkout's `checkoutUrl`.\n   * @param - ID of the checkout template to use to create a checkout from.\n   * @param - ID of the site associated with the checkout template.\n   */\n  (checkoutTemplateId: string, siteId: string): Promise<\n    CreateCheckoutFromTemplateResponse &\n      CreateCheckoutFromTemplateResponseNonNullableFields\n  >;\n}\n\nexport function createAndRedirectToCheckout(\n  httpClient: HttpClient\n): CreateAndRedirectToCheckoutSignature {\n  return (checkoutTemplateId: string, siteId: string) =>\n    universalCreateAndRedirectToCheckout(\n      checkoutTemplateId,\n      siteId,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface CreateAndRedirectToCheckoutSignature {\n  /**\n   * Creates a new checkout based on the checkout template and redirects to the new checkout page.\n   *\n   * Before using this function, you must have a checkout template available. Create a checkout template with `createCheckoutTemplate()`.\n   *\n   * To build a URL that uses this function, follow this format:\n   * `https://www.wixapis.com/ecom/v1/checkout-templates/{checkoutTemplateId}/create-and-redirect-to-checkout?siteId={siteId}`\n   *\n   * To create a checkout but not automatically redirect to the checkout page, use `createCheckoutFromTemplate()`.\n   * @param - ID of the checkout template to use to create a checkout.\n   * @param - ID of the site associated with the checkout template.\n   */\n  (checkoutTemplateId: string, siteId: string): Promise<\n    RawHttpResponse & RawHttpResponseNonNullableFields\n  >;\n}\n\nexport const onCheckoutTemplateCreated = EventDefinition(\n  'wix.ecom.v1.checkout_template_created',\n  true,\n  (event: CheckoutTemplateCreatedEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTImageToSDKImage,\n          paths: [\n            { path: 'entity.lineItems.catalogOverrideFields.image' },\n            { path: 'entity.customLineItems.media' },\n          ],\n        },\n        {\n          transformFn: transformRESTFloatToSDKFloat,\n          paths: [\n            {\n              path: 'entity.lineItems.catalogOverrideFields.physicalProperties.weight',\n            },\n            { path: 'entity.customLineItems.physicalProperties.weight' },\n          ],\n        },\n        {\n          transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n          paths: [{ path: 'entity.customLineItems.url' }],\n        },\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [\n            {\n              path: 'entity.customLineItems.subscriptionOptionInfo.subscriptionSettings.startDate',\n            },\n            { path: 'entity.customLineItems.serviceProperties.scheduledDate' },\n            { path: 'metadata.eventTime' },\n          ],\n        },\n      ])\n    )\n)<CheckoutTemplateCreatedEnvelope>();\nexport const onCheckoutTemplateDeleted = EventDefinition(\n  'wix.ecom.v1.checkout_template_deleted',\n  true,\n  (event: CheckoutTemplateDeletedEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTImageToSDKImage,\n          paths: [\n            { path: 'undefined.lineItems.catalogOverrideFields.image' },\n            { path: 'undefined.customLineItems.media' },\n          ],\n        },\n        {\n          transformFn: transformRESTFloatToSDKFloat,\n          paths: [\n            {\n              path: 'undefined.lineItems.catalogOverrideFields.physicalProperties.weight',\n            },\n            { path: 'undefined.customLineItems.physicalProperties.weight' },\n          ],\n        },\n        {\n          transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n          paths: [{ path: 'undefined.customLineItems.url' }],\n        },\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [\n            {\n              path: 'undefined.customLineItems.subscriptionOptionInfo.subscriptionSettings.startDate',\n            },\n            {\n              path: 'undefined.customLineItems.serviceProperties.scheduledDate',\n            },\n            { path: 'metadata.eventTime' },\n          ],\n        },\n      ])\n    )\n)<CheckoutTemplateDeletedEnvelope>();\nexport const onCheckoutTemplateUpdated = EventDefinition(\n  'wix.ecom.v1.checkout_template_updated',\n  true,\n  (event: CheckoutTemplateUpdatedEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTImageToSDKImage,\n          paths: [\n            { path: 'entity.lineItems.catalogOverrideFields.image' },\n            { path: 'entity.customLineItems.media' },\n          ],\n        },\n        {\n          transformFn: transformRESTFloatToSDKFloat,\n          paths: [\n            {\n              path: 'entity.lineItems.catalogOverrideFields.physicalProperties.weight',\n            },\n            { path: 'entity.customLineItems.physicalProperties.weight' },\n          ],\n        },\n        {\n          transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n          paths: [{ path: 'entity.customLineItems.url' }],\n        },\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [\n            {\n              path: 'entity.customLineItems.subscriptionOptionInfo.subscriptionSettings.startDate',\n            },\n            { path: 'entity.customLineItems.serviceProperties.scheduledDate' },\n            { path: 'metadata.eventTime' },\n          ],\n        },\n      ])\n    )\n)<CheckoutTemplateUpdatedEnvelope>();\nexport const onCheckoutTemplateUsed = EventDefinition(\n  'wix.ecom.v1.checkout_template_used',\n  true,\n  (event: CheckoutTemplateUsedEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTImageToSDKImage,\n          paths: [\n            {\n              path: 'data.checkoutTemplate.lineItems.catalogOverrideFields.image',\n            },\n            { path: 'data.checkoutTemplate.customLineItems.media' },\n            { path: 'data.checkout.lineItems.media' },\n            { path: 'data.checkout.lineItems.catalogOverrideFields.image' },\n          ],\n        },\n        {\n          transformFn: transformRESTFloatToSDKFloat,\n          paths: [\n            {\n              path: 'data.checkoutTemplate.lineItems.catalogOverrideFields.physicalProperties.weight',\n            },\n            {\n              path: 'data.checkoutTemplate.customLineItems.physicalProperties.weight',\n            },\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: transformRESTPageURLV2ToSDKPageURLV2,\n          paths: [\n            { path: 'data.checkoutTemplate.customLineItems.url' },\n            { path: 'data.checkout.lineItems.url' },\n          ],\n        },\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [\n            {\n              path: 'data.checkoutTemplate.customLineItems.subscriptionOptionInfo.subscriptionSettings.startDate',\n            },\n            {\n              path: 'data.checkoutTemplate.customLineItems.serviceProperties.scheduledDate',\n            },\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: 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)<CheckoutTemplateUsedEnvelope>();\n\nexport {\n  ActionEvent,\n  AdditionalFee,\n  AdditionalFeeSource,\n  Address,\n  AddressLocation,\n  AddressWithContact,\n  AggregatedTaxBreakdown,\n  ApplicableLineItems,\n  ApplicationError,\n  AppliedDiscount,\n  AppliedDiscountDiscountSourceOneOf,\n  AutoTaxFallbackCalculationDetails,\n  BaseEventMetadata,\n  BuyerInfo,\n  BuyerInfoIdOneOf,\n  CalculationErrors,\n  CalculationErrorsShippingCalculationErrorOneOf,\n  Carrier,\n  CarrierError,\n  CarrierErrors,\n  CarrierServiceOption,\n  CatalogOverrideFields,\n  CatalogReference,\n  ChannelType,\n  Charge,\n  ChargeType,\n  Checkout,\n  CheckoutCustomization,\n  CheckoutTemplate,\n  CheckoutTemplateCreatedEnvelope,\n  CheckoutTemplateDeletedEnvelope,\n  CheckoutTemplateNonNullableFields,\n  CheckoutTemplateUpdatedEnvelope,\n  CheckoutTemplateUsed,\n  CheckoutTemplateUsedEnvelope,\n  CheckoutTemplatesQueryBuilder,\n  CheckoutTemplatesQueryResult,\n  Color,\n  ConversionInfo,\n  Coupon,\n  CreateAndRedirectToCheckoutRequest,\n  CreateCheckoutFromTemplateRequest,\n  CreateCheckoutFromTemplateResponse,\n  CreateCheckoutFromTemplateResponseNonNullableFields,\n  CreateCheckoutTemplateRequest,\n  CreateCheckoutTemplateResponse,\n  CreateCheckoutTemplateResponseNonNullableFields,\n  CreatedBy,\n  CreatedByIdOneOf,\n  CursorPaging,\n  CursorPagingMetadata,\n  CursorQuery,\n  CursorQueryPagingMethodOneOf,\n  Cursors,\n  CustomContentReference,\n  CustomField,\n  CustomLineItem,\n  CustomSettings,\n  DeleteCheckoutTemplateRequest,\n  DeleteCheckoutTemplateResponse,\n  DeliveryAllocation,\n  DeliveryLogistics,\n  DeliveryTimeSlot,\n  Description,\n  DescriptionLine,\n  DescriptionLineDescriptionLineValueOneOf,\n  DescriptionLineName,\n  DescriptionLineType,\n  DescriptionLineValueOneOf,\n  Details,\n  DetailsKindOneOf,\n  DiscountRule,\n  DiscountRuleName,\n  DiscountType,\n  DomainEvent,\n  DomainEventBodyOneOf,\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  GetCheckoutTemplateRequest,\n  GetCheckoutTemplateResponse,\n  GetCheckoutTemplateResponseNonNullableFields,\n  GiftCard,\n  Group,\n  HeadersEntry,\n  IdentificationData,\n  IdentificationDataIdOneOf,\n  InvalidMembership,\n  ItemAvailabilityInfo,\n  ItemAvailabilityStatus,\n  ItemTaxFullDetails,\n  ItemType,\n  ItemTypeItemType,\n  ItemTypeItemTypeDataOneOf,\n  JurisdictionType,\n  LineItem,\n  LineItemDiscount,\n  ManualCalculationReason,\n  Membership,\n  MembershipName,\n  MembershipOptions,\n  MembershipPaymentCredits,\n  MerchantDiscount,\n  MessageEnvelope,\n  MultiCurrencyPrice,\n  NameInLineItem,\n  NameInOther,\n  Other,\n  OtherCharge,\n  PaymentOption,\n  PaymentOptionType,\n  PhysicalProperties,\n  PickupDetails,\n  PickupMethod,\n  PlainTextValue,\n  Policy,\n  PriceDescription,\n  PriceSummary,\n  ProductName,\n  QueryCheckoutTemplatesRequest,\n  QueryCheckoutTemplatesResponse,\n  QueryCheckoutTemplatesResponseNonNullableFields,\n  RateType,\n  RawHttpResponse,\n  RawHttpResponseNonNullableFields,\n  Region,\n  RestoreInfo,\n  RuleType,\n  Scope,\n  SecuredMedia,\n  SelectedCarrierServiceOption,\n  SelectedCarrierServiceOptionOtherCharge,\n  SelectedCarrierServiceOptionPrices,\n  SelectedMembership,\n  SelectedMemberships,\n  ServiceProperties,\n  Severity,\n  ShippingInfo,\n  ShippingOption,\n  ShippingPrice,\n  ShippingRegion,\n  SortOrder,\n  Sorting,\n  Status,\n  StreetAddress,\n  SubscriptionCharges,\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  UpdateCheckoutTemplate,\n  UpdateCheckoutTemplateRequest,\n  UpdateCheckoutTemplateResponse,\n  UpdateCheckoutTemplateResponseNonNullableFields,\n  V1LineItem,\n  ValidationError,\n  VatId,\n  VatType,\n  Violation,\n  WebClientCustomization,\n  WebhookIdentityType,\n  WeightUnit,\n} from './ecom-v1-checkout-template-checkout-templates.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n  renameKeysFromSDKRequestToRESTRequest,\n  renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, HttpResponse } from '@wix/sdk-types';\nimport * as ambassadorWixEcomV1CheckoutTemplate from './ecom-v1-checkout-template-checkout-templates.http.js';\n// @ts-ignore\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 CheckoutTemplate {\n  /**\n   * Checkout template ID.\n   * @readonly\n   */\n  _id?: string | null;\n  /**\n   * Status of the checkout template.\n   *\n   * When `status` is `INACTIVE` checkouts will not be created with this template `_id`. Instead, the function will redirect to the domain site.\n   *\n   * Default: `ACTIVE`\n   */\n  status?: Status;\n  /** Custom settings to apply to the checkout page created from this template. */\n  customization?: CheckoutCustomization;\n  /**\n   * Catalog line items.\n   *\n   * Max: 300 items\n   */\n  lineItems?: V1LineItem[];\n  /**\n   * Custom line items. Custom line items don't trigger the Catalog service plugin.\n   *\n   * Max: 300 items\n   */\n  customLineItems?: CustomLineItem[];\n  /**\n   * Coupon code.\n   *\n   * Note that a checkout can only hold one `couponCode` at a time. If an additional `couponCode` is added, it will override the existing `couponCode`.\n   * For additional information, see the Coupons API.\n   */\n  couponCode?: string | null;\n  /**\n   * Reference IDs for the app and component providing custom checkout page content.\n   *\n   * To access and manage custom checkout page content, your app must have the permission scope named \"Manage eCommerce - Admin Permissions\".\n   * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).\n   */\n  customContentReference?: CustomContentReference;\n}\n\nexport enum Status {\n  UNKNOWN_STATUS = 'UNKNOWN_STATUS',\n  ACTIVE = 'ACTIVE',\n  INACTIVE = 'INACTIVE',\n}\n\nexport interface CheckoutCustomization {\n  /** Web client customizations. These customizations only apply to the standard Wix checkout page. */\n  webClient?: WebClientCustomization;\n  /**\n   * Whether to lock the ability to add or remove a gift card.\n   *\n   * Default: `false`\n   */\n  lockedGiftCard?: boolean;\n  /**\n   * Whether to lock the ability to apply or remove a coupon code.\n   *\n   * Default: `false`\n   */\n  lockedCoupon?: boolean;\n  /**\n   * Whether to disable manual payment option for this checkout.\n   *\n   * Default: `false`\n   */\n  disabledManualPayment?: boolean;\n}\n\nexport interface WebClientCustomization {\n  /**\n   * Whether to disable the \"Continue shopping\" button.\n   *\n   * Default: `false`\n   */\n  disabledContinueShoppingButton?: boolean;\n  /**\n   * Whether to disable policy agreement checkout in the checkout page\n   *\n   * Default: `false`\n   */\n  disabledPolicyAgreementCheckbox?: boolean;\n}\n\nexport interface V1LineItem {\n  /**\n   * Item quantity.\n   *\n   * Min: `1` <br />\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  /** Overriding values for catalog item properties. */\n  catalogOverrideFields?: CatalogOverrideFields;\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. Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items.\n   *\n   * For products and variants from a Wix Stores catalog, learn more about [eCommerce integration](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration).\n   */\n  options?: Record<string, any> | null;\n}\n\nexport interface CatalogOverrideFields {\n  /** 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 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 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 PhysicalProperties {\n  /** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */\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 PaymentOption {\n  /**\n   * Type of selected payment option for current item.\n   *\n   * Default: `FULL_PAYMENT_ONLINE`\n   */\n  value?: PaymentOptionType;\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 CustomLineItem {\n  /**\n   * Custom line item quantity.\n   *\n   * Min: `1`\n   * Max: `100000`\n   */\n  quantity?: number;\n  /**\n   * Custom line item price.\n   *\n   * Must be a number or a decimal without symbols.\n   */\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 display purposes for the cart, checkout and order. */\n  descriptionLines?: DescriptionLine[];\n  /** Custom line item's media. */\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 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 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\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 Policy {\n  /** Policy title - should be translated */\n  title?: string | null;\n  /** Policy content - should be translated */\n  content?: string;\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 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\n/** Triggered when newly checkout created successfully from checkout template */\nexport interface CheckoutTemplateUsed {\n  /** checkout template */\n  checkoutTemplate?: CheckoutTemplate;\n  /** newly created checkout */\n  checkout?: Checkout;\n}\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 service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/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   * > **Notes:**\n   * > * Custom settings can only be set when [creating a checkout](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/checkout/create-checkout).\n   * > * To access and manage custom checkout page content, your app must have the permission scope named \"Manage eCommerce - Admin Permissions\". Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).\n   */\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. 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   * 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 display purposes for 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.\n   *\n   * Default: `FULL_PAYMENT_ONLINE`\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\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 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 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\n/** Billing Info and shipping details */\nexport interface AddressWithContact {\n  /** Address. */\n  address?: Address;\n  /** Contact details. */\n  contactDetails?: FullAddressContactDetails;\n}\n\n/** Physical address */\nexport interface Address {\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?: VatId;\n}\n\nexport interface VatId {\n  /** Customer's tax ID. */\n  _id?: string;\n  /**\n   * Tax type.\n   *\n   * Supported values:\n   * + `CPF`: for individual tax payers\n   * + `CNPJ`: for corporations\n   */\n  type?: VatType;\n}\n\n/** tax info types */\nexport enum VatType {\n  UNSPECIFIED = 'UNSPECIFIED',\n  /** CPF - for individual tax payers. */\n  CPF = 'CPF',\n  /** CNPJ - for corporations */\n  CNPJ = 'CNPJ',\n}\n\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?: Address;\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 site visitor is **not** a member).\n   * @readonly\n   */\n  visitorId?: string;\n  /**\n   * Member ID (if site visitor is a site member).\n   * @readonly\n   */\n  memberId?: string;\n  /**\n   * Contact ID. Auto-created if one does not yet exist. For more information, see [Contacts API](https://dev.wix.com/api/rest/contacts/contacts/introduction).\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 site visitor is **not** a member).\n   * @readonly\n   */\n  visitorId?: string;\n  /**\n   * Member ID (if site visitor 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 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 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 CreateCheckoutTemplateRequest {\n  /** Checkout template to create. */\n  checkoutTemplate: CheckoutTemplate;\n}\n\nexport interface CreateCheckoutTemplateResponse {\n  /** Created checkout template. */\n  checkoutTemplate?: CheckoutTemplate;\n}\n\nexport interface GetCheckoutTemplateRequest {\n  /** ID of the checkout template to retrieve. */\n  checkoutTemplateId: string;\n}\n\nexport interface GetCheckoutTemplateResponse {\n  /** Retrieved checkout template. */\n  checkoutTemplate?: CheckoutTemplate;\n}\n\nexport interface UpdateCheckoutTemplateRequest {\n  /** Checkout template info to update. */\n  checkoutTemplate: CheckoutTemplate;\n}\n\nexport interface UpdateCheckoutTemplateResponse {\n  /** Updated checkout template. */\n  checkoutTemplate?: CheckoutTemplate;\n}\n\nexport interface DeleteCheckoutTemplateRequest {\n  /** ID of the checkout template to delete. */\n  checkoutTemplateId: string;\n}\n\nexport interface DeleteCheckoutTemplateResponse {}\n\nexport interface QueryCheckoutTemplatesRequest {\n  /** Query options. */\n  query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n  /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n  cursorPaging?: CursorPaging;\n  /**\n   * Filter object in the following format:\n   * `\"filter\" : {\n   * \"fieldName1\": \"value1\",\n   * \"fieldName2\":{\"$operator\":\"value2\"}\n   * }`\n   *\n   * Example of operators: `$eq`, `$ne`, `$in`, `$startsWith`, `$exists`, `$hasSome`\n   */\n  filter?: Record<string, any> | null;\n  /**\n   * Sort object in the following format:\n   * `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`\n   */\n  sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n  /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n  cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n  /** Name of the field to sort by. */\n  fieldName?: string;\n  /** Sort order. */\n  order?: SortOrder;\n}\n\nexport enum SortOrder {\n  /** Ascending order. */\n  ASC = 'ASC',\n  /** Descending order. */\n  DESC = 'DESC',\n}\n\nexport interface CursorPaging {\n  /** Number of items to load. */\n  limit?: number | null;\n  /**\n   * Pointer to the next or previous page in the list of results. </ br>\n   *\n   * You can get the relevant cursor token\n   * from the `pagingMetadata` object in the previous call's response.\n   * Not relevant for the first request.\n   */\n  cursor?: string | null;\n}\n\nexport interface QueryCheckoutTemplatesResponse {\n  /** Retrieved checkout templates. */\n  checkoutTemplates?: CheckoutTemplate[];\n  /** Paging metadata. */\n  pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n  /** Number of items returned in the response. */\n  count?: number | null;\n  /** Offset that was requested. */\n  cursors?: Cursors;\n  /**\n   * Indicates if there are more results after the current page.\n   * If `true`, another page of results can be retrieved.\n   * If `false`, this is the last page.\n   */\n  hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n  /** Cursor pointing to next page in the list of results. */\n  next?: string | null;\n  /** Cursor pointing to previous page in the list of results. */\n  prev?: string | null;\n}\n\nexport interface CreateCheckoutFromTemplateRequest {\n  /** ID of the checkout template to use to create a checkout from. */\n  checkoutTemplateId: string;\n  /** ID of the site associated with the checkout template. */\n  siteId: string;\n}\n\nexport interface CreateCheckoutFromTemplateResponse {\n  /** ID of the created checkout. */\n  checkoutId?: string;\n  /** URL of the created checkout page. */\n  checkoutUrl?: string;\n  /** Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order. */\n  purchaseFlowId?: string | null;\n}\n\nexport interface CreateAndRedirectToCheckoutRequest {\n  /** ID of the checkout template to use to create a checkout. */\n  checkoutTemplateId: string;\n  /** ID of the site associated with the checkout template. */\n  siteId: string;\n}\n\nexport interface RawHttpResponse {\n  body?: Uint8Array;\n  statusCode?: number | null;\n  headers?: HeadersEntry[];\n}\n\nexport interface HeadersEntry {\n  key?: string;\n  value?: string;\n}\n\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 WebClientCustomizationNonNullableFields {\n  disabledContinueShoppingButton: boolean;\n  disabledPolicyAgreementCheckbox: boolean;\n}\n\ninterface CheckoutCustomizationNonNullableFields {\n  webClient?: WebClientCustomizationNonNullableFields;\n  lockedGiftCard: boolean;\n  lockedCoupon: boolean;\n  disabledManualPayment: boolean;\n}\n\ninterface CatalogReferenceNonNullableFields {\n  catalogItemId: string;\n  appId: string;\n}\n\ninterface ProductNameNonNullableFields {\n  original: string;\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 PhysicalPropertiesNonNullableFields {\n  shippable: boolean;\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 V1LineItemNonNullableFields {\n  quantity: number;\n  catalogReference?: CatalogReferenceNonNullableFields;\n  catalogOverrideFields?: CatalogOverrideFieldsNonNullableFields;\n}\n\ninterface PriceDescriptionNonNullableFields {\n  original: string;\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 PolicyNonNullableFields {\n  content: string;\n}\n\ninterface TaxableAddressNonNullableFields {\n  addressType: TaxableAddressType;\n}\n\ninterface CustomLineItemNonNullableFields {\n  quantity: number;\n  price: string;\n  priceDescription?: PriceDescriptionNonNullableFields;\n  descriptionLines: DescriptionLineNonNullableFields[];\n  media: string;\n  productName?: ProductNameNonNullableFields;\n  url: string;\n  itemType?: ItemTypeNonNullableFields;\n  physicalProperties?: PhysicalPropertiesNonNullableFields;\n  subscriptionOptionInfo?: SubscriptionOptionInfoNonNullableFields;\n  digitalFile?: SecuredMediaNonNullableFields;\n  paymentOption: PaymentOptionType;\n  catalogReference?: CatalogReferenceNonNullableFields;\n  /** @internal */\n  priceUndetermined: boolean;\n  /** @internal */\n  fixedQuantity: boolean;\n  savePaymentMethod: boolean;\n  /** @internal */\n  policies: PolicyNonNullableFields[];\n  /** @internal */\n  membersOnly: boolean;\n  /** @internal */\n  taxableAddress?: TaxableAddressNonNullableFields;\n}\n\ninterface CustomContentReferenceNonNullableFields {\n  appId: string;\n  componentId: string;\n}\n\ninterface ExternalReferenceNonNullableFields {\n  appId: string;\n}\n\nexport interface CheckoutTemplateNonNullableFields {\n  status: Status;\n  customization?: CheckoutCustomizationNonNullableFields;\n  lineItems: V1LineItemNonNullableFields[];\n  customLineItems: CustomLineItemNonNullableFields[];\n  customContentReference?: CustomContentReferenceNonNullableFields;\n  externalReference?: ExternalReferenceNonNullableFields;\n}\n\nexport interface CreateCheckoutTemplateResponseNonNullableFields {\n  checkoutTemplate?: CheckoutTemplateNonNullableFields;\n}\n\nexport interface GetCheckoutTemplateResponseNonNullableFields {\n  checkoutTemplate?: CheckoutTemplateNonNullableFields;\n}\n\nexport interface UpdateCheckoutTemplateResponseNonNullableFields {\n  checkoutTemplate?: CheckoutTemplateNonNullableFields;\n}\n\nexport interface QueryCheckoutTemplatesResponseNonNullableFields {\n  checkoutTemplates: CheckoutTemplateNonNullableFields[];\n}\n\nexport interface CreateCheckoutFromTemplateResponseNonNullableFields {\n  checkoutId: string;\n  checkoutUrl: string;\n}\n\ninterface HeadersEntryNonNullableFields {\n  key: string;\n  value: string;\n}\n\nexport interface RawHttpResponseNonNullableFields {\n  body: Uint8Array;\n  headers: HeadersEntryNonNullableFields[];\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 CheckoutTemplateCreatedEnvelope {\n  entity: CheckoutTemplate;\n  metadata: EventMetadata;\n}\n\n/** @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionId ECOM.CHECKOUT_TEMPLATE_READ\n * @webhook\n * @eventType wix.ecom.v1.checkout_template_created\n */\nexport declare function onCheckoutTemplateCreated(\n  handler: (event: CheckoutTemplateCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface CheckoutTemplateDeletedEnvelope {\n  metadata: EventMetadata;\n}\n\n/** @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionId ECOM.CHECKOUT_TEMPLATE_READ\n * @webhook\n * @eventType wix.ecom.v1.checkout_template_deleted\n */\nexport declare function onCheckoutTemplateDeleted(\n  handler: (event: CheckoutTemplateDeletedEnvelope) => void | Promise<void>\n): void;\n\nexport interface CheckoutTemplateUpdatedEnvelope {\n  entity: CheckoutTemplate;\n  metadata: EventMetadata;\n}\n\n/** @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionId ECOM.CHECKOUT_TEMPLATE_READ\n * @webhook\n * @eventType wix.ecom.v1.checkout_template_updated\n */\nexport declare function onCheckoutTemplateUpdated(\n  handler: (event: CheckoutTemplateUpdatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface CheckoutTemplateUsedEnvelope {\n  data: CheckoutTemplateUsed;\n  metadata: EventMetadata;\n}\n\n/** @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionId ECOM.CHECKOUT_TEMPLATE_READ\n * @webhook\n * @eventType wix.ecom.v1.checkout_template_used\n */\nexport declare function onCheckoutTemplateUsed(\n  handler: (event: CheckoutTemplateUsedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Creates a checkout template.\n *\n * A checkout template is used to create a new checkout that will include predefined information. For example, a single link with\n * a `checkoutTemplateId` can be shared with customers and each time the link is clicked, a new checkout page will be created\n * for that customer with certain checkout information already populated.\n *\n * The customizable features include the option to allow or to lock coupon codes or gift cards. For example, if a store owner is\n * using the checkout template to offer a flash sale to their social media followers, they may want to lock the option to apply an\n * additional coupon on top of the sale being offered. If so, they can set `customization.lockedCoupon` to `true`.\n *\n * A checkout can be created with a checkout template by calling `createCheckoutFromTemplate()`. The site may add further customizations to the new checkout and then redirect the customer using the new checkout's `checkoutUrl`.\n * @param checkoutTemplate - Checkout template to create.\n * @public\n * @requiredField checkoutTemplate\n * @requiredField checkoutTemplate.customLineItems.descriptionLines\n * @requiredField checkoutTemplate.customLineItems.descriptionLines.name\n * @requiredField checkoutTemplate.customLineItems.itemType\n * @requiredField checkoutTemplate.customLineItems.productName\n * @requiredField checkoutTemplate.customLineItems.quantity\n * @requiredField checkoutTemplate.lineItems.catalogReference\n * @requiredField checkoutTemplate.lineItems.catalogReference.appId\n * @requiredField checkoutTemplate.lineItems.catalogReference.catalogItemId\n * @requiredField checkoutTemplate.lineItems.quantity\n * @permissionId ECOM.CHECKOUT_TEMPLATE_CREATE\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @applicableIdentity APP\n * @returns Created checkout template.\n * @fqn wix.ecom.checkout_template.api.v1.CheckoutTemplateService.CreateCheckoutTemplate\n */\nexport async function createCheckoutTemplate(\n  checkoutTemplate: CheckoutTemplate\n): Promise<CheckoutTemplate & CheckoutTemplateNonNullableFields> {\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      checkoutTemplate: checkoutTemplate,\n    }),\n    [\n      {\n        transformFn: transformSDKImageToRESTImage,\n        paths: [\n          { path: 'checkoutTemplate.lineItems.catalogOverrideFields.image' },\n          { path: 'checkoutTemplate.customLineItems.media' },\n        ],\n      },\n      {\n        transformFn: transformSDKPageURLV2ToRESTPageURLV2,\n        paths: [{ path: 'checkoutTemplate.customLineItems.url' }],\n      },\n    ]\n  );\n\n  const reqOpts =\n    ambassadorWixEcomV1CheckoutTemplate.createCheckoutTemplate(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(result.data, [\n        {\n          transformFn: transformRESTImageToSDKImage,\n          paths: [\n            { path: 'checkoutTemplate.lineItems.catalogOverrideFields.image' },\n            { path: 'checkoutTemplate.customLineItems.media' },\n          ],\n        },\n        {\n          transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n          paths: [{ path: 'checkoutTemplate.customLineItems.url' }],\n        },\n      ])\n    )?.checkoutTemplate!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { checkoutTemplate: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['checkoutTemplate']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Retrieves a checkout template.\n * @param checkoutTemplateId - ID of the checkout template to retrieve.\n * @public\n * @requiredField checkoutTemplateId\n * @permissionId ECOM.CHECKOUT_TEMPLATE_READ\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @applicableIdentity APP\n * @returns Retrieved checkout template.\n * @fqn wix.ecom.checkout_template.api.v1.CheckoutTemplateService.GetCheckoutTemplate\n */\nexport async function getCheckoutTemplate(\n  checkoutTemplateId: string\n): Promise<CheckoutTemplate & CheckoutTemplateNonNullableFields> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    checkoutTemplateId: checkoutTemplateId,\n  });\n\n  const reqOpts =\n    ambassadorWixEcomV1CheckoutTemplate.getCheckoutTemplate(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(result.data, [\n        {\n          transformFn: transformRESTImageToSDKImage,\n          paths: [\n            { path: 'checkoutTemplate.lineItems.catalogOverrideFields.image' },\n            { path: 'checkoutTemplate.customLineItems.media' },\n          ],\n        },\n        {\n          transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n          paths: [{ path: 'checkoutTemplate.customLineItems.url' }],\n        },\n      ])\n    )?.checkoutTemplate!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { checkoutTemplateId: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['checkoutTemplateId']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Updates a checkout template.\n *\n * If the info in a checkout template is updated, only new checkouts created from this template will include the updated items. Checkouts previously\n * created from this template before the update will not be affected.\n * @param _id - Checkout template ID.\n * @public\n * @requiredField _id\n * @requiredField checkoutTemplate\n * @param checkoutTemplate - Checkout template info to update.\n * @permissionId ECOM.CHECKOUT_TEMPLATE_UPDATE\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @applicableIdentity APP\n * @returns Updated checkout template.\n * @fqn wix.ecom.checkout_template.api.v1.CheckoutTemplateService.UpdateCheckoutTemplate\n */\nexport async function updateCheckoutTemplate(\n  _id: string | null,\n  checkoutTemplate: UpdateCheckoutTemplate\n): Promise<CheckoutTemplate & CheckoutTemplateNonNullableFields> {\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      checkoutTemplate: { ...checkoutTemplate, id: _id },\n    }),\n    [\n      {\n        transformFn: transformSDKImageToRESTImage,\n        paths: [\n          { path: 'checkoutTemplate.lineItems.catalogOverrideFields.image' },\n          { path: 'checkoutTemplate.customLineItems.media' },\n        ],\n      },\n      {\n        transformFn: transformSDKPageURLV2ToRESTPageURLV2,\n        paths: [{ path: 'checkoutTemplate.customLineItems.url' }],\n      },\n    ]\n  );\n\n  const reqOpts =\n    ambassadorWixEcomV1CheckoutTemplate.updateCheckoutTemplate(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(result.data, [\n        {\n          transformFn: transformRESTImageToSDKImage,\n          paths: [\n            { path: 'checkoutTemplate.lineItems.catalogOverrideFields.image' },\n            { path: 'checkoutTemplate.customLineItems.media' },\n          ],\n        },\n        {\n          transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n          paths: [{ path: 'checkoutTemplate.customLineItems.url' }],\n        },\n      ])\n    )?.checkoutTemplate!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: { checkoutTemplate: '$[1]' },\n        explicitPathsToArguments: { 'checkoutTemplate.id': '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['_id', 'checkoutTemplate']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface UpdateCheckoutTemplate {\n  /**\n   * Checkout template ID.\n   * @readonly\n   */\n  _id?: string | null;\n  /**\n   * Status of the checkout template.\n   *\n   * When `status` is `INACTIVE` checkouts will not be created with this template `_id`. Instead, the function will redirect to the domain site.\n   *\n   * Default: `ACTIVE`\n   */\n  status?: Status;\n  /** Custom settings to apply to the checkout page created from this template. */\n  customization?: CheckoutCustomization;\n  /**\n   * Catalog line items.\n   *\n   * Max: 300 items\n   */\n  lineItems?: V1LineItem[];\n  /**\n   * Custom line items. Custom line items don't trigger the Catalog service plugin.\n   *\n   * Max: 300 items\n   */\n  customLineItems?: CustomLineItem[];\n  /**\n   * Coupon code.\n   *\n   * Note that a checkout can only hold one `couponCode` at a time. If an additional `couponCode` is added, it will override the existing `couponCode`.\n   * For additional information, see the Coupons API.\n   */\n  couponCode?: string | null;\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\n/**\n * Deletes a checkout template.\n *\n * If a checkout template is deleted and a customer attempts to create a checkout with that `checkoutTemplateId` then\n * the customer will be redirected to the domain site.\n * @param checkoutTemplateId - ID of the checkout template to delete.\n * @public\n * @requiredField checkoutTemplateId\n * @permissionId ECOM.CHECKOUT_TEMPLATE_DELETE\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @applicableIdentity APP\n * @fqn wix.ecom.checkout_template.api.v1.CheckoutTemplateService.DeleteCheckoutTemplate\n */\nexport async function deleteCheckoutTemplate(\n  checkoutTemplateId: string\n): Promise<void> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    checkoutTemplateId: checkoutTemplateId,\n  });\n\n  const reqOpts =\n    ambassadorWixEcomV1CheckoutTemplate.deleteCheckoutTemplate(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: { checkoutTemplateId: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['checkoutTemplateId']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Creates a query to retrieve a list of checkout templates.\n *\n * The `queryCheckoutTemplates()` function builds a query to retrieve a list of checkout templates and returns a `CheckoutTemplatesQueryBuilder` object.\n *\n * The returned object contains the query definition, which is typically used to run the query using the `find()` function.\n *\n * You can refine the query by chaining `CheckoutTemplatesQueryBuilder` functions onto the query. `CheckoutTemplatesQueryBuilder` functions enable you to sort, filter, and control the results that `queryCheckoutTemplates()` returns.\n *\n * `queryCheckoutTemplates()` runs with the following `CheckoutTemplatesQueryBuilder` default that you can override:\n * + `ascending(\"_id\")`\n *\n * The functions that are chained to `queryCheckoutTemplates()` are applied in the order they are called. For example, if you apply `ascending(\"status\")` and then `ascending(\"_id\")`, the results are sorted first by the `\"status\"`, and then, if there are multiple results with the same `\"status\"`, the items are sorted by `\"_id\"`.\n *\n * The following `CheckoutTemplatesQueryBuilder` functions are supported for the `queryCheckoutTemplates()` function. For a full description of the checkout template object, see the object returned for the `items` property in `CheckoutTemplatesQueryResult`.\n * @public\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionId ECOM.CHECKOUT_TEMPLATE_READ\n * @applicableIdentity APP\n * @fqn wix.ecom.checkout_template.api.v1.CheckoutTemplateService.QueryCheckoutTemplates\n */\nexport function queryCheckoutTemplates(): CheckoutTemplatesQueryBuilder {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[0] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  return queryBuilder<\n    CheckoutTemplate,\n    'CURSOR',\n    QueryCheckoutTemplatesRequest,\n    QueryCheckoutTemplatesResponse\n  >({\n    func: async (payload: QueryCheckoutTemplatesRequest) => {\n      const reqOpts =\n        ambassadorWixEcomV1CheckoutTemplate.queryCheckoutTemplates(payload);\n\n      sideEffects?.onSiteCall?.();\n      try {\n        const result = await httpClient.request(reqOpts);\n        sideEffects?.onSuccess?.(result);\n        return result;\n      } catch (err) {\n        sideEffects?.onError?.(err);\n        throw err;\n      }\n    },\n    requestTransformer: (query: QueryCheckoutTemplatesRequest['query']) => {\n      const args = [query, {}] as [QueryCheckoutTemplatesRequest['query'], {}];\n      return renameKeysFromSDKRequestToRESTRequest({\n        ...args?.[1],\n        query: args?.[0],\n      });\n    },\n    responseTransformer: ({\n      data,\n    }: HttpResponse<QueryCheckoutTemplatesResponse>) => {\n      const transformedData = renameKeysFromRESTResponseToSDKResponse(\n        transformPaths(data, [\n          {\n            transformFn: transformRESTImageToSDKImage,\n            paths: [\n              {\n                path: 'checkoutTemplates.lineItems.catalogOverrideFields.image',\n              },\n              { path: 'checkoutTemplates.customLineItems.media' },\n            ],\n          },\n          {\n            transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n            paths: [{ path: 'checkoutTemplates.customLineItems.url' }],\n          },\n        ])\n      );\n\n      return {\n        items: transformedData?.checkoutTemplates,\n        pagingMetadata: transformedData?.pagingMetadata,\n      };\n    },\n    errorTransformer: (err: unknown) => {\n      const transformedError = sdkTransformError(err, {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { query: '$[0]' },\n        singleArgumentUnchanged: false,\n      });\n\n      throw transformedError;\n    },\n    pagingMethod: 'CURSOR',\n    transformationPaths: {},\n  });\n}\n\ninterface QueryCursorResult {\n  cursors: Cursors;\n  hasNext: () => boolean;\n  hasPrev: () => boolean;\n  length: number;\n  pageSize: number;\n}\n\nexport interface CheckoutTemplatesQueryResult extends QueryCursorResult {\n  items: CheckoutTemplate[];\n  query: CheckoutTemplatesQueryBuilder;\n  next: () => Promise<CheckoutTemplatesQueryResult>;\n  prev: () => Promise<CheckoutTemplatesQueryResult>;\n}\n\nexport interface CheckoutTemplatesQueryBuilder {\n  /** @param propertyName - Property whose value is compared with `value`.\n   * @param value - Value to compare against.\n   */\n  eq: (\n    propertyName: '_id' | 'status',\n    value: any\n  ) => CheckoutTemplatesQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `value`.\n   * @param value - Value to compare against.\n   */\n  ne: (\n    propertyName: '_id' | 'status',\n    value: any\n  ) => CheckoutTemplatesQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `string`.\n   * @param string - String to compare against. Case-insensitive.\n   */\n  startsWith: (\n    propertyName: '_id',\n    value: string\n  ) => CheckoutTemplatesQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `values`.\n   * @param values - List of values to compare against.\n   */\n  hasSome: (\n    propertyName: '_id' | 'status',\n    value: any[]\n  ) => CheckoutTemplatesQueryBuilder;\n  in: (\n    propertyName: '_id' | 'status',\n    value: any\n  ) => CheckoutTemplatesQueryBuilder;\n  exists: (\n    propertyName: '_id' | 'status',\n    value: boolean\n  ) => CheckoutTemplatesQueryBuilder;\n  /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n  ascending: (\n    ...propertyNames: Array<'_id' | 'status'>\n  ) => CheckoutTemplatesQueryBuilder;\n  /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n  descending: (\n    ...propertyNames: Array<'_id' | 'status'>\n  ) => CheckoutTemplatesQueryBuilder;\n  /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */\n  limit: (limit: number) => CheckoutTemplatesQueryBuilder;\n  /** @param cursor - A pointer to specific record */\n  skipTo: (cursor: string) => CheckoutTemplatesQueryBuilder;\n  find: () => Promise<CheckoutTemplatesQueryResult>;\n}\n\n/**\n * Creates a new checkout based on the checkout template.\n *\n * Before using this function, you must have a checkout template available. Create a checkout template with `createCheckoutTemplate()`.\n *\n * The customer can be directed to the new checkout using the checkout's `checkoutUrl`.\n * @param checkoutTemplateId - ID of the checkout template to use to create a checkout from.\n * @param siteId - ID of the site associated with the checkout template.\n * @public\n * @requiredField checkoutTemplateId\n * @requiredField siteId\n * @permissionId ECOM.CHECKOUT_TEMPLATE_CREATE_CHECKOUT\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn wix.ecom.checkout_template.api.v1.CheckoutTemplateService.CreateCheckoutFromTemplate\n */\nexport async function createCheckoutFromTemplate(\n  checkoutTemplateId: string,\n  siteId: string\n): Promise<\n  CreateCheckoutFromTemplateResponse &\n    CreateCheckoutFromTemplateResponseNonNullableFields\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    checkoutTemplateId: checkoutTemplateId,\n    siteId: siteId,\n  });\n\n  const reqOpts =\n    ambassadorWixEcomV1CheckoutTemplate.createCheckoutFromTemplate(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          checkoutTemplateId: '$[0]',\n          siteId: '$[1]',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['checkoutTemplateId', 'siteId']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Creates a new checkout based on the checkout template and redirects to the new checkout page.\n *\n * Before using this function, you must have a checkout template available. Create a checkout template with `createCheckoutTemplate()`.\n *\n * To build a URL that uses this function, follow this format:\n * `https://www.wixapis.com/ecom/v1/checkout-templates/{checkoutTemplateId}/create-and-redirect-to-checkout?siteId={siteId}`\n *\n * To create a checkout but not automatically redirect to the checkout page, use `createCheckoutFromTemplate()`.\n * @param checkoutTemplateId - ID of the checkout template to use to create a checkout.\n * @param siteId - ID of the site associated with the checkout template.\n * @public\n * @requiredField checkoutTemplateId\n * @requiredField siteId\n * @fqn wix.ecom.checkout_template.api.v1.CheckoutTemplateService.CreateAndRedirectToCheckout\n */\nexport async function createAndRedirectToCheckout(\n  checkoutTemplateId: string,\n  siteId: string\n): Promise<RawHttpResponse & RawHttpResponseNonNullableFields> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    checkoutTemplateId: checkoutTemplateId,\n    siteId: siteId,\n  });\n\n  const reqOpts =\n    ambassadorWixEcomV1CheckoutTemplate.createAndRedirectToCheckout(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          checkoutTemplateId: '$[0]',\n          siteId: '$[1]',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['checkoutTemplateId', 'siteId']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTBytesToSDKBytes } from '@wix/sdk-runtime/transformations/bytes';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixEcomCheckoutTemplateApiV1CheckoutTemplateServiceUrl(\n  opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n  const domainToMappings = {\n    'www._base_domain_': [\n      {\n        srcPath: '/ecom/v1/checkout-templates',\n        destPath: '/v1/checkout-templates',\n      },\n    ],\n    'www.wixapis.com': [\n      {\n        srcPath: '/ecom/v1/checkout-templates',\n        destPath: '/v1/checkout-templates',\n      },\n    ],\n  };\n\n  return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_ecom_checkout-templates';\n\n/**\n * Creates a checkout template.\n *\n * A checkout template is used to create a new checkout that will include predefined information. For example, a single link with\n * a `checkoutTemplateId` can be shared with customers and each time the link is clicked, a new checkout page will be created\n * for that customer with certain checkout information already populated.\n *\n * The customizable features include the option to allow or to lock coupon codes or gift cards. For example, if a store owner is\n * using the checkout template to offer a flash sale to their social media followers, they may want to lock the option to apply an\n * additional coupon on top of the sale being offered. If so, they can set `customization.lockedCoupon` to `true`.\n *\n * A checkout can be created with a checkout template by calling `createCheckoutFromTemplate()`. The site may add further customizations to the new checkout and then redirect the customer using the new checkout's `checkoutUrl`.\n */\nexport function createCheckoutTemplate(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __createCheckoutTemplate({ host }: any) {\n    const serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKFloatToRESTFloat,\n        paths: [\n          {\n            path: 'checkoutTemplate.lineItems.catalogOverrideFields.physicalProperties.weight',\n          },\n          {\n            path: 'checkoutTemplate.customLineItems.physicalProperties.weight',\n          },\n        ],\n      },\n      {\n        transformFn: transformSDKTimestampToRESTTimestamp,\n        paths: [\n          {\n            path: 'checkoutTemplate.customLineItems.subscriptionOptionInfo.subscriptionSettings.startDate',\n          },\n          {\n            path: 'checkoutTemplate.customLineItems.serviceProperties.scheduledDate',\n          },\n        ],\n      },\n    ]);\n    const metadata = {\n      entityFqdn: 'wix.ecom.v1.checkout_template',\n      method: 'POST' as any,\n      methodFqn:\n        'wix.ecom.checkout_template.api.v1.CheckoutTemplateService.CreateCheckoutTemplate',\n      packageName: PACKAGE_NAME,\n      url: resolveWixEcomCheckoutTemplateApiV1CheckoutTemplateServiceUrl({\n        protoPath: '/v1/checkout-templates',\n        data: serializedData,\n        host,\n      }),\n      data: serializedData,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTFloatToSDKFloat,\n            paths: [\n              {\n                path: 'checkoutTemplate.lineItems.catalogOverrideFields.physicalProperties.weight',\n              },\n              {\n                path: 'checkoutTemplate.customLineItems.physicalProperties.weight',\n              },\n            ],\n          },\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              {\n                path: 'checkoutTemplate.customLineItems.subscriptionOptionInfo.subscriptionSettings.startDate',\n              },\n              {\n                path: 'checkoutTemplate.customLineItems.serviceProperties.scheduledDate',\n              },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __createCheckoutTemplate;\n}\n\n/** Retrieves a checkout template. */\nexport function getCheckoutTemplate(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __getCheckoutTemplate({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.ecom.v1.checkout_template',\n      method: 'GET' as any,\n      methodFqn:\n        'wix.ecom.checkout_template.api.v1.CheckoutTemplateService.GetCheckoutTemplate',\n      packageName: PACKAGE_NAME,\n      url: resolveWixEcomCheckoutTemplateApiV1CheckoutTemplateServiceUrl({\n        protoPath: '/v1/checkout-templates/{checkoutTemplateId}',\n        data: payload,\n        host,\n      }),\n      params: toURLSearchParams(payload),\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTFloatToSDKFloat,\n            paths: [\n              {\n                path: 'checkoutTemplate.lineItems.catalogOverrideFields.physicalProperties.weight',\n              },\n              {\n                path: 'checkoutTemplate.customLineItems.physicalProperties.weight',\n              },\n            ],\n          },\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              {\n                path: 'checkoutTemplate.customLineItems.subscriptionOptionInfo.subscriptionSettings.startDate',\n              },\n              {\n                path: 'checkoutTemplate.customLineItems.serviceProperties.scheduledDate',\n              },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __getCheckoutTemplate;\n}\n\n/**\n * Updates a checkout template.\n *\n * If the info in a checkout template is updated, only new checkouts created from this template will include the updated items. Checkouts previously\n * created from this template before the update will not be affected.\n */\nexport function updateCheckoutTemplate(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __updateCheckoutTemplate({ host }: any) {\n    const serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKFieldMaskToRESTFieldMask,\n        paths: [{ path: 'fieldMask' }],\n      },\n      {\n        transformFn: transformSDKFloatToRESTFloat,\n        paths: [\n          {\n            path: 'checkoutTemplate.lineItems.catalogOverrideFields.physicalProperties.weight',\n          },\n          {\n            path: 'checkoutTemplate.customLineItems.physicalProperties.weight',\n          },\n        ],\n      },\n      {\n        transformFn: transformSDKTimestampToRESTTimestamp,\n        paths: [\n          {\n            path: 'checkoutTemplate.customLineItems.subscriptionOptionInfo.subscriptionSettings.startDate',\n          },\n          {\n            path: 'checkoutTemplate.customLineItems.serviceProperties.scheduledDate',\n          },\n        ],\n      },\n    ]);\n    const metadata = {\n      entityFqdn: 'wix.ecom.v1.checkout_template',\n      method: 'PATCH' as any,\n      methodFqn:\n        'wix.ecom.checkout_template.api.v1.CheckoutTemplateService.UpdateCheckoutTemplate',\n      packageName: PACKAGE_NAME,\n      url: resolveWixEcomCheckoutTemplateApiV1CheckoutTemplateServiceUrl({\n        protoPath: '/v1/checkout-templates/{checkoutTemplate.id}',\n        data: serializedData,\n        host,\n      }),\n      data: serializedData,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTFloatToSDKFloat,\n            paths: [\n              {\n                path: 'checkoutTemplate.lineItems.catalogOverrideFields.physicalProperties.weight',\n              },\n              {\n                path: 'checkoutTemplate.customLineItems.physicalProperties.weight',\n              },\n            ],\n          },\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              {\n                path: 'checkoutTemplate.customLineItems.subscriptionOptionInfo.subscriptionSettings.startDate',\n              },\n              {\n                path: 'checkoutTemplate.customLineItems.serviceProperties.scheduledDate',\n              },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __updateCheckoutTemplate;\n}\n\n/**\n * Deletes a checkout template.\n *\n * If a checkout template is deleted and a customer attempts to create a checkout with that `checkoutTemplateId` then\n * the customer will be redirected to the domain site.\n */\nexport function deleteCheckoutTemplate(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __deleteCheckoutTemplate({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.ecom.v1.checkout_template',\n      method: 'DELETE' as any,\n      methodFqn:\n        'wix.ecom.checkout_template.api.v1.CheckoutTemplateService.DeleteCheckoutTemplate',\n      packageName: PACKAGE_NAME,\n      url: resolveWixEcomCheckoutTemplateApiV1CheckoutTemplateServiceUrl({\n        protoPath: '/v1/checkout-templates/{checkoutTemplateId}',\n        data: payload,\n        host,\n      }),\n      params: toURLSearchParams(payload),\n    };\n\n    return metadata;\n  }\n\n  return __deleteCheckoutTemplate;\n}\n\n/**\n * Creates a query to retrieve a list of checkout templates.\n *\n * The `queryCheckoutTemplates()` function builds a query to retrieve a list of checkout templates and returns a `CheckoutTemplatesQueryBuilder` object.\n *\n * The returned object contains the query definition, which is typically used to run the query using the `find()` function.\n *\n * You can refine the query by chaining `CheckoutTemplatesQueryBuilder` functions onto the query. `CheckoutTemplatesQueryBuilder` functions enable you to sort, filter, and control the results that `queryCheckoutTemplates()` returns.\n *\n * `queryCheckoutTemplates()` runs with the following `CheckoutTemplatesQueryBuilder` default that you can override:\n * + `ascending(\"_id\")`\n *\n * The functions that are chained to `queryCheckoutTemplates()` are applied in the order they are called. For example, if you apply `ascending(\"status\")` and then `ascending(\"_id\")`, the results are sorted first by the `\"status\"`, and then, if there are multiple results with the same `\"status\"`, the items are sorted by `\"_id\"`.\n *\n * The following `CheckoutTemplatesQueryBuilder` functions are supported for the `queryCheckoutTemplates()` function. For a full description of the checkout template object, see the object returned for the `items` property in `CheckoutTemplatesQueryResult`.\n */\nexport function queryCheckoutTemplates(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __queryCheckoutTemplates({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.ecom.v1.checkout_template',\n      method: 'POST' as any,\n      methodFqn:\n        'wix.ecom.checkout_template.api.v1.CheckoutTemplateService.QueryCheckoutTemplates',\n      packageName: PACKAGE_NAME,\n      url: resolveWixEcomCheckoutTemplateApiV1CheckoutTemplateServiceUrl({\n        protoPath: '/v1/checkout-templates/query',\n        data: payload,\n        host,\n      }),\n      data: payload,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTFloatToSDKFloat,\n            paths: [\n              {\n                path: 'checkoutTemplates.lineItems.catalogOverrideFields.physicalProperties.weight',\n              },\n              {\n                path: 'checkoutTemplates.customLineItems.physicalProperties.weight',\n              },\n            ],\n          },\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              {\n                path: 'checkoutTemplates.customLineItems.subscriptionOptionInfo.subscriptionSettings.startDate',\n              },\n              {\n                path: 'checkoutTemplates.customLineItems.serviceProperties.scheduledDate',\n              },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __queryCheckoutTemplates;\n}\n\n/**\n * Creates a new checkout based on the checkout template.\n *\n * Before using this function, you must have a checkout template available. Create a checkout template with `createCheckoutTemplate()`.\n *\n * The customer can be directed to the new checkout using the checkout's `checkoutUrl`.\n */\nexport function createCheckoutFromTemplate(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __createCheckoutFromTemplate({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.ecom.v1.checkout_template',\n      method: 'POST' as any,\n      methodFqn:\n        'wix.ecom.checkout_template.api.v1.CheckoutTemplateService.CreateCheckoutFromTemplate',\n      packageName: PACKAGE_NAME,\n      url: resolveWixEcomCheckoutTemplateApiV1CheckoutTemplateServiceUrl({\n        protoPath:\n          '/v1/checkout-templates/{checkoutTemplateId}/create-checkout-from-template',\n        data: payload,\n        host,\n      }),\n      data: payload,\n    };\n\n    return metadata;\n  }\n\n  return __createCheckoutFromTemplate;\n}\n\n/**\n * Creates a new checkout based on the checkout template and redirects to the new checkout page.\n *\n * Before using this function, you must have a checkout template available. Create a checkout template with `createCheckoutTemplate()`.\n *\n * To build a URL that uses this function, follow this format:\n * `https://www.wixapis.com/ecom/v1/checkout-templates/{checkoutTemplateId}/create-and-redirect-to-checkout?siteId={siteId}`\n *\n * To create a checkout but not automatically redirect to the checkout page, use `createCheckoutFromTemplate()`.\n */\nexport function createAndRedirectToCheckout(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __createAndRedirectToCheckout({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.ecom.v1.checkout_template',\n      method: 'GET' as any,\n      methodFqn:\n        'wix.ecom.checkout_template.api.v1.CheckoutTemplateService.CreateAndRedirectToCheckout',\n      packageName: PACKAGE_NAME,\n      url: resolveWixEcomCheckoutTemplateApiV1CheckoutTemplateServiceUrl({\n        protoPath:\n          '/v1/checkout-templates/{checkoutTemplateId}/create-and-redirect-to-checkout',\n        data: payload,\n        host,\n      }),\n      params: toURLSearchParams(payload),\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTBytesToSDKBytes,\n            paths: [{ path: 'body' }],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __createAndRedirectToCheckout;\n}\n","import {\n  createCheckoutTemplate as publicCreateCheckoutTemplate,\n  getCheckoutTemplate as publicGetCheckoutTemplate,\n  updateCheckoutTemplate as publicUpdateCheckoutTemplate,\n  deleteCheckoutTemplate as publicDeleteCheckoutTemplate,\n  queryCheckoutTemplates as publicQueryCheckoutTemplates,\n  createCheckoutFromTemplate as publicCreateCheckoutFromTemplate,\n  createAndRedirectToCheckout as publicCreateAndRedirectToCheckout,\n} from './ecom-v1-checkout-template-checkout-templates.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 { onCheckoutTemplateCreated as publicOnCheckoutTemplateCreated } from './ecom-v1-checkout-template-checkout-templates.public.js';\nimport { onCheckoutTemplateDeleted as publicOnCheckoutTemplateDeleted } from './ecom-v1-checkout-template-checkout-templates.public.js';\nimport { onCheckoutTemplateUpdated as publicOnCheckoutTemplateUpdated } from './ecom-v1-checkout-template-checkout-templates.public.js';\nimport { onCheckoutTemplateUsed as publicOnCheckoutTemplateUsed } from './ecom-v1-checkout-template-checkout-templates.public.js';\n\nexport const createCheckoutTemplate: MaybeContext<\n  BuildRESTFunction<typeof publicCreateCheckoutTemplate> &\n    typeof publicCreateCheckoutTemplate\n> = /*#__PURE__*/ createRESTModule(publicCreateCheckoutTemplate);\nexport const getCheckoutTemplate: MaybeContext<\n  BuildRESTFunction<typeof publicGetCheckoutTemplate> &\n    typeof publicGetCheckoutTemplate\n> = /*#__PURE__*/ createRESTModule(publicGetCheckoutTemplate);\nexport const updateCheckoutTemplate: MaybeContext<\n  BuildRESTFunction<typeof publicUpdateCheckoutTemplate> &\n    typeof publicUpdateCheckoutTemplate\n> = /*#__PURE__*/ createRESTModule(publicUpdateCheckoutTemplate);\nexport const deleteCheckoutTemplate: MaybeContext<\n  BuildRESTFunction<typeof publicDeleteCheckoutTemplate> &\n    typeof publicDeleteCheckoutTemplate\n> = /*#__PURE__*/ createRESTModule(publicDeleteCheckoutTemplate);\nexport const queryCheckoutTemplates: MaybeContext<\n  BuildRESTFunction<typeof publicQueryCheckoutTemplates> &\n    typeof publicQueryCheckoutTemplates\n> = /*#__PURE__*/ createRESTModule(publicQueryCheckoutTemplates);\nexport const createCheckoutFromTemplate: MaybeContext<\n  BuildRESTFunction<typeof publicCreateCheckoutFromTemplate> &\n    typeof publicCreateCheckoutFromTemplate\n> = /*#__PURE__*/ createRESTModule(publicCreateCheckoutFromTemplate);\nexport const createAndRedirectToCheckout: MaybeContext<\n  BuildRESTFunction<typeof publicCreateAndRedirectToCheckout> &\n    typeof publicCreateAndRedirectToCheckout\n> = /*#__PURE__*/ createRESTModule(publicCreateAndRedirectToCheckout);\n/** */\nexport const onCheckoutTemplateCreated: ReturnType<\n  typeof createEventModule<typeof publicOnCheckoutTemplateCreated>\n> = createEventModule(publicOnCheckoutTemplateCreated);\n/** */\nexport const onCheckoutTemplateDeleted: ReturnType<\n  typeof createEventModule<typeof publicOnCheckoutTemplateDeleted>\n> = createEventModule(publicOnCheckoutTemplateDeleted);\n/** */\nexport const onCheckoutTemplateUpdated: ReturnType<\n  typeof createEventModule<typeof publicOnCheckoutTemplateUpdated>\n> = createEventModule(publicOnCheckoutTemplateUpdated);\n/** */\nexport const onCheckoutTemplateUsed: ReturnType<\n  typeof createEventModule<typeof publicOnCheckoutTemplateUsed>\n> = createEventModule(publicOnCheckoutTemplateUsed);\n\nexport {\n  Status,\n  DescriptionLineType,\n  PaymentOptionType,\n  ItemTypeItemType,\n  SubscriptionFrequency,\n  FileType,\n  TaxableAddressType,\n  JurisdictionType,\n  ItemAvailabilityStatus,\n  VatType,\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  SortOrder,\n  WebhookIdentityType,\n} from './ecom-v1-checkout-template-checkout-templates.universal.js';\nexport {\n  CheckoutTemplate,\n  CheckoutCustomization,\n  WebClientCustomization,\n  V1LineItem,\n  CatalogReference,\n  CatalogOverrideFields,\n  ProductName,\n  DescriptionLine,\n  DescriptionLineValueOneOf,\n  DescriptionLineDescriptionLineValueOneOf,\n  DescriptionLineName,\n  PlainTextValue,\n  Color,\n  PhysicalProperties,\n  PaymentOption,\n  CustomLineItem,\n  PriceDescription,\n  ItemType,\n  ItemTypeItemTypeDataOneOf,\n  SubscriptionOptionInfo,\n  SubscriptionSettings,\n  FreeTrialPeriod,\n  Title,\n  Description,\n  SecuredMedia,\n  ServiceProperties,\n  Policy,\n  TaxableAddress,\n  TaxableAddressTaxableAddressDataOneOf,\n  ExtendedFields,\n  CustomContentReference,\n  ExternalReference,\n  CheckoutTemplateUsed,\n  Checkout,\n  LineItem,\n  MultiCurrencyPrice,\n  ItemTaxFullDetails,\n  TaxRateBreakdown,\n  TaxBreakdown,\n  FocalPoint,\n  ItemAvailabilityInfo,\n  Scope,\n  Group,\n  AddressWithContact,\n  Address,\n  StreetAddress,\n  AddressLocation,\n  FullAddressContactDetails,\n  VatId,\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  SubscriptionCharges,\n  Charge,\n  CreateCheckoutTemplateRequest,\n  CreateCheckoutTemplateResponse,\n  GetCheckoutTemplateRequest,\n  GetCheckoutTemplateResponse,\n  UpdateCheckoutTemplateRequest,\n  UpdateCheckoutTemplateResponse,\n  DeleteCheckoutTemplateRequest,\n  DeleteCheckoutTemplateResponse,\n  QueryCheckoutTemplatesRequest,\n  CursorQuery,\n  CursorQueryPagingMethodOneOf,\n  Sorting,\n  CursorPaging,\n  QueryCheckoutTemplatesResponse,\n  CursorPagingMetadata,\n  Cursors,\n  CreateCheckoutFromTemplateRequest,\n  CreateCheckoutFromTemplateResponse,\n  CreateAndRedirectToCheckoutRequest,\n  RawHttpResponse,\n  HeadersEntry,\n  DomainEvent,\n  DomainEventBodyOneOf,\n  EntityCreatedEvent,\n  RestoreInfo,\n  EntityUpdatedEvent,\n  EntityDeletedEvent,\n  ActionEvent,\n  MessageEnvelope,\n  IdentificationData,\n  IdentificationDataIdOneOf,\n  CheckoutTemplateNonNullableFields,\n  CreateCheckoutTemplateResponseNonNullableFields,\n  GetCheckoutTemplateResponseNonNullableFields,\n  UpdateCheckoutTemplateResponseNonNullableFields,\n  QueryCheckoutTemplatesResponseNonNullableFields,\n  CreateCheckoutFromTemplateResponseNonNullableFields,\n  RawHttpResponseNonNullableFields,\n  BaseEventMetadata,\n  EventMetadata,\n  CheckoutTemplateCreatedEnvelope,\n  CheckoutTemplateDeletedEnvelope,\n  CheckoutTemplateUpdatedEnvelope,\n  CheckoutTemplateUsedEnvelope,\n  UpdateCheckoutTemplate,\n  CheckoutTemplatesQueryResult,\n  CheckoutTemplatesQueryBuilder,\n} from './ecom-v1-checkout-template-checkout-templates.universal.js';\n"],"mappings":";AAAA,SAAS,2CAAAA,gDAA+C;AACxD,SAAS,wCAAwC;AACjD,SAAS,gCAAAC,qCAAoC;AAC7C,SAAS,gCAAAC,qCAAoC;AAC7C,SAAS,wCAAAC,6CAA4C;AACrD,SAAS,wCAAAC,6CAA4C;AACrD,SAAS,kBAAAC,uBAAsB;AAC/B,SAAS,uBAAmC;;;ACP5C,SAAS,kBAAkB,yBAAyB;AACpD,SAAS,oBAAoB;AAC7B;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACLP,SAAS,yBAAyB;AAClC,SAAS,oC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,UACR;AAAA,UACA;AAAA,YACE,MAAM;AAAA,UACR;AAAA,UACA;AAAA,YACE,MAAM;AAAA,UACR;AAAA,UACA;AAAA,YACE,MAAM;AAAA,UACR;AAAA,UACA;AAAA,YACE,MAAM;AAAA,UACR;AAAA,UACA,EAAE,MAAM,qBAAqB;AAAA,QAC/B;AAAA,MACF;AAAA,MACA;AAAA,QACE,aAAa;AAAA,QACb,OAAO;AAAA,UACL,EAAE,MAAM,oCAAoC;AAAA,UAC5C,EAAE,MAAM,yDAAyD;AAAA,UACjE;AAAA,YACE,MAAM;AAAA,UACR;AAAA,UACA;AAAA,YACE,MAAM;AAAA,UACR;AAAA,QACF;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAAgC;;;AG7ahC,SAAS,wBAAwB;AACjC,SAAS,yBAAyB;AAO3B,IAAMC,0BAGK,iCAAiBA,uBAA4B;AACxD,IAAMC,uBAGK,iCAAiBA,oBAAyB;AACrD,IAAMC,0BAGK,iCAAiBA,uBAA4B;AACxD,IAAMC,0BAGK,iCAAiBA,uBAA4B;AACxD,IAAMC,0BAGK,iCAAiBA,uBAA4B;AACxD,IAAMC,8BAGK,iCAAiBA,2BAAgC;AAC5D,IAAMC,+BAGK,iCAAiBA,4BAAiC;AAE7D,IAAMC,6BAET,kBAAkB,yBAA+B;AAE9C,IAAMC,6BAET,kBAAkB,yBAA+B;AAE9C,IAAMC,6BAET,kBAAkB,yBAA+B;AAE9C,IAAMC,0BAET,kBAAkB,sBAA4B;","names":["renameKeysFromRESTResponseToSDKResponse","transformRESTFloatToSDKFloat","transformRESTImageToSDKImage","transformRESTPageURLV2ToSDKPageURLV2","transformRESTTimestampToSDKTimestamp","transformPaths","payload","transformPaths","Status","DescriptionLineType","PaymentOptionType","ItemTypeItemType","SubscriptionFrequency","FileType","TaxableAddressType","JurisdictionType","ItemAvailabilityStatus","VatType","PickupMethod","ChargeType","RuleType","DiscountType","WeightUnit","RateType","ManualCalculationReason","FallbackReason","ChannelType","AdditionalFeeSource","Severity","NameInOther","NameInLineItem","SuggestedFix","SortOrder","WebhookIdentityType","createCheckoutTemplate","getCheckoutTemplate","updateCheckoutTemplate","deleteCheckoutTemplate","queryCheckoutTemplates","createCheckoutFromTemplate","createAndRedirectToCheckout","createCheckoutTemplate","getCheckoutTemplate","updateCheckoutTemplate","deleteCheckoutTemplate","queryCheckoutTemplates","createCheckoutFromTemplate","createAndRedirectToCheckout","renameKeysFromRESTResponseToSDKResponse","transformPaths","transformRESTImageToSDKImage","transformRESTFloatToSDKFloat","transformRESTPageURLV2ToSDKPageURLV2","transformRESTTimestampToSDKTimestamp","createCheckoutTemplate","getCheckoutTemplate","updateCheckoutTemplate","deleteCheckoutTemplate","queryCheckoutTemplates","createCheckoutFromTemplate","createAndRedirectToCheckout","onCheckoutTemplateCreated","onCheckoutTemplateDeleted","onCheckoutTemplateUpdated","onCheckoutTemplateUsed"]}