@wix/auto_sdk_ecom_checkout-templates 1.0.96 → 1.0.97

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.typings.ts","../../src/ecom-v1-checkout-template-checkout-templates.universal.ts","../../src/ecom-v1-checkout-template-checkout-templates.http.ts"],"sourcesContent":["export * from './src/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 {\n HttpClient,\n HttpResponse,\n NonNullablePaths,\n QuerySpec,\n Query as QuerySdkType,\n} 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 * @format GUID\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 endpoint will redirect to the domain site.\n *\n * Default: `ACTIVE`\n */\n status?: StatusWithLiterals;\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 * @maxSize 300\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 * @maxSize 300\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 * References to an external app and resource associated with the checkout.\n * Used for integration and tracking across different platforms.\n * @immutable\n */\n externalReference?: ExternalReference;\n}\n\nexport enum Status {\n UNKNOWN_STATUS = 'UNKNOWN_STATUS',\n ACTIVE = 'ACTIVE',\n INACTIVE = 'INACTIVE',\n}\n\n/** @enumType */\nexport type StatusWithLiterals =\n | Status\n | 'UNKNOWN_STATUS'\n | 'ACTIVE'\n | 'INACTIVE';\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 * @min 1\n * @max 100000\n */\n quantity?: number;\n /** Catalog and item reference. Holds IDs for the item and the catalog it came from, as well as further optional info. Optional for custom line items, which don't trigger the Catalog service plugin. */\n catalogReference?: CatalogReference;\n /** 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 /**\n * ID of the item within the catalog it belongs to.\n * @minLength 1\n * @maxLength 36\n */\n catalogItemId?: string;\n /**\n * ID of the app providing the catalog.\n *\n * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).\n *\n * For items from Wix catalogs, the following values always apply:\n * + Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n * + Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`\n * + Wix Restaurants: `\"9a5d83fd-8570-482e-81ab-cfa88942ee60\"`\n * @minLength 1\n */\n appId?: string;\n /**\n * Additional item details in key:value pairs. Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items.\n *\n * For products and variants from a Wix Stores catalog, learn more about [eCommerce integration](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 /**\n * Item price **after** discounts.\n * @decimalValue options { gte:0, lte:999999999, maxScale:3 }\n */\n price?: string | null;\n /**\n * Item price **before** discounts.\n * @decimalValue options { gte:0, lte:999999999, maxScale:3 }\n */\n fullPrice?: string | null;\n /**\n * Item description lines. Used when displaying the line item to customers.\n * @maxSize 20\n */\n descriptionLines?: DescriptionLine[];\n /** Physical properties of the item. */\n physicalProperties?: PhysicalProperties;\n /** Item image. */\n image?: string;\n /** Payment method selected for the item. */\n paymentOption?: PaymentOption;\n /**\n * Only eligible for catalog items with `lineItem.paymentOption.value` type of `DEPOSIT_ONLINE`.\n * @format DECIMAL_VALUE\n * @decimalValue options { gt:0, lte:999999999, maxScale:3 }\n */\n depositAmount?: string | null;\n /**\n * Whether to save the payment method on the order.\n *\n * Default: `false`\n */\n savePaymentMethod?: boolean | null;\n /**\n * ID of the app managing the inventory.\n * @internal\n * @format GUID\n */\n inventoryAppId?: string | 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 * @minLength 1\n * @maxLength 200\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 * @minLength 1\n * @maxLength 400\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 * Whether the description line originates from a modifier.\n * @internal\n * @deprecated Whether the description line originates from a modifier.\n * @replacedBy none\n * @targetRemovalDate 2025-12-31\n */\n modifierDescriptionLine?: boolean;\n}\n\n/** @oneof */\nexport interface DescriptionLineValueOneOf {\n /** Description line plain text value. */\n plainText?: PlainTextValue;\n /** Description line color value. */\n colorInfo?: Color;\n}\n\n/** @oneof */\nexport interface DescriptionLineDescriptionLineValueOneOf {}\n\nexport interface DescriptionLineName {\n /**\n * Description line name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n * @maxLength 100\n */\n original?: string;\n /**\n * Description line name translated into the buyer's language.\n *\n * Default: Same as `original`.\n * @maxLength 200\n */\n translated?: string | null;\n}\n\nexport interface PlainTextValue {\n /**\n * Description line plain text value in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n * @maxLength 600\n */\n original?: string;\n /**\n * Description line plain text value translated into the buyer's language.\n *\n * Default: Same as `original`.\n * @maxLength 600\n */\n translated?: string | null;\n}\n\nexport interface Color {\n /**\n * Description line color name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n * @maxLength 500\n */\n original?: string;\n /**\n * Description line color name translated into the buyer's language.\n *\n * Default: Same as `original`.\n * @maxLength 500\n */\n translated?: string | null;\n /** HEX or RGB color code for display. */\n code?: string | null;\n}\n\nexport enum DescriptionLineType {\n /** Unrecognized type. */\n UNRECOGNISED = 'UNRECOGNISED',\n /** Plain text type. */\n PLAIN_TEXT = 'PLAIN_TEXT',\n /** Color type. */\n COLOR = 'COLOR',\n}\n\n/** @enumType */\nexport type DescriptionLineTypeWithLiterals =\n | DescriptionLineType\n | 'UNRECOGNISED'\n | 'PLAIN_TEXT'\n | 'COLOR';\n\nexport interface PhysicalProperties {\n /** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */\n weight?: number | null;\n /**\n * Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku).\n * @maxLength 40\n */\n sku?: string | null;\n /** Whether this line item is shippable. */\n shippable?: boolean;\n}\n\nexport interface PaymentOption {\n /**\n * Type of selected payment option for current item.\n *\n * Default: `FULL_PAYMENT_ONLINE`\n */\n value?: PaymentOptionTypeWithLiterals;\n}\n\n/** Type of selected payment option for catalog item */\nexport enum PaymentOptionType {\n /** The entire payment for this item happens as part of the checkout. */\n FULL_PAYMENT_ONLINE = 'FULL_PAYMENT_ONLINE',\n /** The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. */\n FULL_PAYMENT_OFFLINE = 'FULL_PAYMENT_OFFLINE',\n /** Payment for this item is done by charging a membership. Any remaining amount not covered by the membership, such as item modifiers, is paid online. */\n MEMBERSHIP = 'MEMBERSHIP',\n /** Partial payment to be paid upfront during checkout. The initial amount to be paid for each line item is specified in `depositAmount`. */\n DEPOSIT_ONLINE = 'DEPOSIT_ONLINE',\n /** Payment for this item can only be done by charging a membership and must be manually redeemed in the dashboard by the site admin. When selected, `price` is `0`. */\n MEMBERSHIP_OFFLINE = 'MEMBERSHIP_OFFLINE',\n /**\n * Item price is charged to online membership. Any remaining amount not covered by the membership, such as item modifiers, is paid offline.\n * @documentationMaturity preview\n */\n MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER = 'MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER',\n}\n\n/** @enumType */\nexport type PaymentOptionTypeWithLiterals =\n | PaymentOptionType\n | 'FULL_PAYMENT_ONLINE'\n | 'FULL_PAYMENT_OFFLINE'\n | 'MEMBERSHIP'\n | 'DEPOSIT_ONLINE'\n | 'MEMBERSHIP_OFFLINE'\n | 'MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER';\n\nexport interface CustomLineItem {\n /**\n * Custom line item quantity.\n *\n * Min: `1`\n * Max: `100000`\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 * @format DECIMAL_VALUE\n * @decimalValue options { gte:0, lte:1000000000000000 }\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 /**\n * Custom line item description lines. Used for display purposes for the cart, checkout and order.\n * @maxSize 10\n */\n descriptionLines?: DescriptionLine[];\n /** Custom line item's media. */\n media?: string;\n /**\n * Deprecated. Custom line item ID.\n *\n * To maintain a unique value for a custom line item across multiple carts and orders, pass `catalogReference` instead.\n * Learn more about [custom items with catalog reference](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/catalogs/catalog-and-custom-items#custom-item-with-catalog-reference).\n * @format GUID\n * @readonly\n * @deprecated Deprecated. Custom line item ID.\n *\n * To maintain a unique value for a custom line item across multiple carts and orders, pass `catalogReference` instead.\n * Learn more about [custom items with catalog reference](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/catalogs/catalog-and-custom-items#custom-item-with-catalog-reference).\n * @targetRemovalDate 2026-05-01\n */\n _id?: string | null;\n /**\n * Tax group ID for this custom line item.\n * @format GUID\n */\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 /**\n * Item price **before** catalog-defined discount. Defaults to `price` when not provided.\n * @format DECIMAL_VALUE\n */\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 * @max 100000\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?: PaymentOptionTypeWithLiterals;\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 * @minLength 1\n * @maxLength 36\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 * @format DECIMAL_VALUE\n */\n depositAmount?: string | null;\n /**\n * Delivery profile ID.\n * @format GUID\n */\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 */\n priceUndetermined?: boolean;\n /**\n * Whether the line item quantity is fixed and cannot be changed.\n *\n * Default: `false`\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 * @minLength 1\n * @maxLength 1000\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 * @maxSize 5\n */\n policies?: Policy[];\n /**\n * ID of the app managing the inventory.\n * @internal\n * @format GUID\n */\n inventoryAppId?: string | null;\n /**\n * Whether the item can only be purchased by site members.\n *\n * Default: `false`\n */\n membersOnly?: boolean;\n /** Address to use for tax calculation purposes. */\n taxableAddress?: TaxableAddress;\n /**\n * Modifier groups that were added to the item.\n * @maxSize 25\n */\n modifierGroups?: V1ModifierGroup[];\n}\n\nexport interface PriceDescription {\n /**\n * __Required.__ Price description in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n * @minLength 1\n * @maxLength 100\n */\n original?: string;\n /**\n * Price description translated into the buyer's language.\n *\n * Default: Same as `original`.\n * @minLength 1\n * @maxLength 100\n */\n translated?: string | null;\n}\n\nexport interface ItemType extends ItemTypeItemTypeDataOneOf {\n /** Preset item type. */\n preset?: ItemTypePresetWithLiterals;\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?: ItemTypePresetWithLiterals;\n /** Custom item type. When none of the preset types are suitable, specifies the custom type. */\n custom?: string;\n}\n\nexport enum ItemTypePreset {\n UNRECOGNISED = 'UNRECOGNISED',\n PHYSICAL = 'PHYSICAL',\n DIGITAL = 'DIGITAL',\n GIFT_CARD = 'GIFT_CARD',\n SERVICE = 'SERVICE',\n}\n\n/** @enumType */\nexport type ItemTypePresetWithLiterals =\n | ItemTypePreset\n | 'UNRECOGNISED'\n | 'PHYSICAL'\n | 'DIGITAL'\n | 'GIFT_CARD'\n | 'SERVICE';\n\nexport interface SubscriptionOptionInfo {\n /** Subscription option settings. */\n subscriptionSettings?: SubscriptionSettings;\n /** Subscription option title. */\n title?: Title;\n /** Subscription option description. */\n description?: Description;\n}\n\nexport interface SubscriptionSettings {\n /** Frequency of recurring payment. */\n frequency?: SubscriptionFrequencyWithLiterals;\n /**\n * Interval of recurring payment.\n *\n * Default: `1`.\n * If SubscriptionFrequency is Day the minimum interval is 7\n * @min 1\n * @max 3650\n */\n interval?: number | null;\n /** Whether subscription is renewed automatically at the end of each period. */\n autoRenewal?: boolean;\n /**\n * Number of billing cycles before subscription ends. Ignored if `autoRenewal` is `true`.\n * @min 1\n */\n billingCycles?: number | null;\n /** Whether to allow the customer to cancel the subscription.. */\n enableCustomerCancellation?: boolean;\n /**\n * Period until first cycle starts. If applied payNow will be 0\n * If None => no free trial\n */\n freeTrialPeriod?: FreeTrialPeriod;\n /**\n * The date the subscription will start. The subscription will be charged either now or according to freeTrialDays.\n * @internal\n */\n startDate?: Date | null;\n}\n\n/** Frequency unit of recurring payment */\nexport enum SubscriptionFrequency {\n UNDEFINED = 'UNDEFINED',\n DAY = 'DAY',\n WEEK = 'WEEK',\n MONTH = 'MONTH',\n YEAR = 'YEAR',\n}\n\n/** @enumType */\nexport type SubscriptionFrequencyWithLiterals =\n | SubscriptionFrequency\n | 'UNDEFINED'\n | 'DAY'\n | 'WEEK'\n | 'MONTH'\n | 'YEAR';\n\nexport interface FreeTrialPeriod {\n /** Frequency of period. Values: DAY, WEEK, MONTH, YEAR */\n frequency?: SubscriptionFrequencyWithLiterals;\n /**\n * interval of period\n * @min 1\n * @max 999\n */\n interval?: number;\n}\n\nexport interface Title {\n /**\n * Subscription option name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n * @minLength 1\n * @maxLength 150\n */\n original?: string;\n /**\n * Subscription option name translated into the buyer's language.\n *\n * Default: Same as `original`.\n * @minLength 1\n * @maxLength 150\n */\n translated?: string | null;\n}\n\nexport interface Description {\n /**\n * Subscription option description.\n * @maxLength 500\n */\n original?: string;\n /**\n * Translated subscription option description.\n * @maxLength 500\n */\n translated?: string | null;\n}\n\nexport interface SecuredMedia {\n /**\n * Media ID in Wix Media Manager.\n * @minLength 1\n * @maxLength 100\n */\n _id?: string;\n /**\n * Original filename.\n * @minLength 1\n * @maxLength 1000\n */\n fileName?: string;\n /** File type. */\n fileType?: FileTypeWithLiterals;\n}\n\nexport enum FileType {\n UNSPECIFIED = 'UNSPECIFIED',\n SECURE_PICTURE = 'SECURE_PICTURE',\n SECURE_VIDEO = 'SECURE_VIDEO',\n SECURE_DOCUMENT = 'SECURE_DOCUMENT',\n SECURE_MUSIC = 'SECURE_MUSIC',\n SECURE_ARCHIVE = 'SECURE_ARCHIVE',\n}\n\n/** @enumType */\nexport type FileTypeWithLiterals =\n | FileType\n | 'UNSPECIFIED'\n | 'SECURE_PICTURE'\n | 'SECURE_VIDEO'\n | 'SECURE_DOCUMENT'\n | 'SECURE_MUSIC'\n | 'SECURE_ARCHIVE';\n\nexport interface ServiceProperties {\n /**\n * Date and time the service is to be provided, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.\n * For example, the start time of a class.\n */\n scheduledDate?: Date | null;\n /**\n * The number of people participating in the service. For example, the number of people attending a class or the number of people per hotel room.\n * @min 1\n * @max 10000\n */\n numberOfParticipants?: number | null;\n /**\n * Date and time the service is to be ended, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.\n * For example, the date and time a class will end.\n * @internal\n */\n endDate?: Date | null;\n}\n\nexport interface Policy {\n /**\n * Policy title - should be translated\n * @minLength 1\n * @maxLength 29\n */\n title?: string | null;\n /**\n * Policy content - should be translated\n * @minLength 1\n * @maxLength 3000\n */\n content?: string;\n}\n\nexport interface TaxableAddress extends TaxableAddressTaxableAddressDataOneOf {\n /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */\n addressType?: TaxableAddressTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface TaxableAddressTaxableAddressDataOneOf {\n /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */\n addressType?: TaxableAddressTypeWithLiterals;\n}\n\nexport enum TaxableAddressType {\n UNKNOWN_TAXABLE_ADDRESS = 'UNKNOWN_TAXABLE_ADDRESS',\n BUSINESS = 'BUSINESS',\n BILLING = 'BILLING',\n SHIPPING = 'SHIPPING',\n}\n\n/** @enumType */\nexport type TaxableAddressTypeWithLiterals =\n | TaxableAddressType\n | 'UNKNOWN_TAXABLE_ADDRESS'\n | 'BUSINESS'\n | 'BILLING'\n | 'SHIPPING';\n\nexport interface V1ModifierGroup {\n /**\n * Modifier group ID.\n * @minLength 1\n * @maxLength 36\n */\n _id?: string;\n /** Modifier group name. */\n name?: TranslatableString;\n /**\n * List of modifiers in this group.\n * @minSize 1\n * @maxSize 25\n */\n modifiers?: V1ItemModifier[];\n}\n\nexport interface TranslatableString {\n /**\n * __Required.__ String in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n *\n * Min: 1 character.\n * Max: 200 characters.\n * @minLength 1\n * @maxLength 200\n */\n original?: string;\n /**\n * String translated into the buyer's language.\n *\n * Min: 1 character.\n * Max: 400 characters.\n * Default: Same as `original`.\n * @minLength 1\n * @maxLength 400\n */\n translated?: string | null;\n}\n\nexport interface V1ItemModifier {\n /**\n * Modifier ID.\n * @minLength 1\n * @maxLength 36\n */\n _id?: string;\n /**\n * The quantity of this modifier.\n * @min 1\n * @max 100000\n */\n quantity?: number | null;\n /** Primary display label for the modifier. */\n label?: TranslatableString;\n /** Additional details. */\n details?: TranslatableString;\n /**\n * The price of the modifier.\n * @decimalValue options { gte:0, lte:1000000000000000, maxScale:3 }\n */\n price?: string | null;\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 * @format GUID\n */\n appId?: string;\n /**\n * ID of the component within the app it belongs to.\n *\n * You can get your component's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).\n * @format GUID\n */\n componentId?: string;\n}\n\nexport interface ExternalReference {\n /**\n * ID of the app associated with the purchase flow.\n * For example, the Wix Pay Links app ID.\n * @format GUID\n * @immutable\n */\n appId?: string;\n /**\n * Reference to an external resource ID. Used to link the purchase flow to a specific entity in an external system.\n * For example, a Wix Pay Link ID.\n * @minLength 1\n * @maxLength 100\n * @immutable\n */\n resourceId?: string | null;\n}\n\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 * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Line items.\n *\n * Max: 300 items\n * @minSize 1\n * @maxSize 300\n * @readonly\n */\n lineItems?: LineItem[];\n /** Billing information. */\n billingInfo?: AddressWithContact;\n /** Shipping information. */\n shippingInfo?: ShippingInfo;\n /**\n * [Buyer note](https://support.wix.com/en/article/collecting-and-viewing-buyer-notes) left by the customer.\n * @maxLength 1000\n */\n buyerNote?: string | null;\n /** Buyer information. */\n buyerInfo?: BuyerInfo;\n /**\n * The currency [selected by the customer](https://support.wix.com/en/article/multicurrency-an-overview) during the purchase flow, in three-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.\n *\n * This reflects the customer’s preferred display currency and may differ from the site’s default currency.\n * When no specific currency is selected by the customer, this matches the `currency` property.\n * @readonly\n * @format CURRENCY\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/setting-up-wix-gift-cards-9451439).\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 a site's weight unit.\n * @readonly\n */\n weightUnit?: WeightUnitWithLiterals;\n /**\n * Tax summary.\n * @readonly\n */\n taxSummary?: TaxSummary;\n /**\n * The site’s default currency, in three-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. This represents the base currency configured for the site and remains constant regardless of the customer’s currency selection.\n * @format CURRENCY\n * @readonly\n */\n currency?: string;\n /**\n * Sales channel that submitted the order.\n * @readonly\n */\n channelType?: ChannelTypeWithLiterals;\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 *\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 *\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 /**\n * Additional Fees.\n * @maxSize 100\n */\n additionalFees?: AdditionalFee[];\n /**\n * Cart ID that this checkout was created from. Empty if this checkout wasn't created from a cart.\n * @format GUID\n */\n cartId?: string | null;\n /**\n * List of validation violations raised by the [Validations service plugin](https://dev.wix.com/docs/rest/business-solutions/e-commerce/service-plugins/validations-integration-service-plugin/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 * @format GUID\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.\n * > * To access and manage custom checkout page content, your app must have the permission scope named \"Manage eCommerce - Admin Permissions\". Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).\n * @immutable\n */\n 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 * References to an external app and resource associated with this checkout.\n * Used for integration and tracking across different platforms.\n * @immutable\n */\n externalReference?: ExternalReference;\n /**\n * Order ID.\n *\n * This field is empty until the checkout completes and becomes an order.\n * @internal\n * @format GUID\n * @readonly\n */\n orderId?: string | null;\n /**\n * Payment for subscriptions after free trial period.\n * @readonly\n */\n payAfterFreeTrial?: PriceSummary;\n /**\n * The business location ID associated with the checkout.\n *\n * To learn more, see the Locations API.\n * @format GUID\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 * @maxSize 100\n */\n subscriptionCharges?: SubscriptionCharges[];\n /**\n * The currency used for payment, in three-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.\n *\n * This is determined by the [customer's selected currency](https://support.wix.com/en/article/multicurrency-an-overview) and the site’s supported payment currencies.\n * If the customer’s selected currency is supported for payment, this matches the `conversionCurrency` property. If not supported, this falls back to the `currency` property.\n * @readonly\n * @format CURRENCY\n */\n paymentCurrency?: string;\n /**\n * Tax exempt group ID to use for tax exemptions.\n * @format GUID\n */\n taxExemptGroupId?: string | null;\n}\n\nexport interface LineItem {\n /**\n * Line item ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Item quantity.\n *\n * Min: `\"1\"`\n * Max: `\"100000\"`\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?: PaymentOptionTypeWithLiterals;\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 * @minLength 1\n * @maxLength 36\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 * @format GUID\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 * @minLength 1\n * @maxLength 2500\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 * @readonly\n */\n priceUndetermined?: boolean;\n /**\n * Whether the line item quantity is fixed and cannot be changed.\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 /** Address to use for tax calculation purposes. */\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 using the 'Checkout & Orders - Line Items Schema Plugin' in the app dashboard before they can be accessed with API calls.\n */\n extendedFields?: ExtendedFields;\n /**\n * Policies to be displayed to the customer on the checkout page.\n * @readonly\n * @maxSize 5\n */\n policies?: Policy[];\n /**\n * ID of the app managing the inventory.\n * @internal\n * @format GUID\n */\n inventoryAppId?: string | null;\n /**\n * Whether the item can only be purchased by site members.\n *\n * Default: `false`\n * @readonly\n */\n membersOnly?: boolean;\n /**\n * Modifier groups that were added to the item.\n * @readonly\n * @maxSize 25\n */\n modifierGroups?: ModifierGroup[];\n /**\n * Total price of all item modifiers. Included in the item price.\n * @readonly\n */\n modifiersTotalPrice?: MultiCurrencyPrice;\n}\n\nexport interface MultiCurrencyPrice {\n /**\n * Amount.\n * @decimalValue options { gte:0, lte:1000000000000000 }\n */\n amount?: string;\n /**\n * Converted amount.\n * @readonly\n * @decimalValue options { gte:0, lte:1000000000000000 }\n */\n convertedAmount?: string;\n /**\n * Amount formatted with currency symbol.\n * @readonly\n */\n formattedAmount?: string;\n /**\n * Converted amount formatted with currency symbol.\n * @readonly\n */\n formattedConvertedAmount?: string;\n}\n\nexport interface ItemTaxFullDetails {\n /** Amount for which tax is calculated. */\n taxableAmount?: MultiCurrencyPrice;\n /**\n * Tax rate %, as a decimal point between 0 and 1.\n * @decimalValue options { gte:0, lte:1, maxScale:6 }\n */\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 * The amount of this line item that was exempt.\n * @internal\n */\n exemptAmount?: MultiCurrencyPrice;\n /**\n * tax information for a line item.\n * @maxSize 1000\n * @readonly\n */\n taxBreakdown?: TaxBreakdown[];\n}\n\nexport interface TaxRateBreakdown {\n /**\n * Name of tax against which the calculation was performed.\n * @maxLength 100\n */\n name?: string;\n /**\n * Rate at which this tax detail was calculated.\n * @decimalValue options { gte:0, lte:1, maxScale:6 }\n */\n rate?: string;\n /** Amount of tax for this tax detail. */\n tax?: MultiCurrencyPrice;\n /**\n * The amount of this line item that was exempt from this authority.\n * @internal\n */\n exemptAmount?: 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 /**\n * The name of the jurisdiction to which this tax detail applies. For example, \"New York\" or \"Quebec\".\n * @maxLength 200\n */\n jurisdiction?: string | null;\n /** The amount of this line item price that was considered nontaxable. (Decimal value) */\n nonTaxableAmount?: MultiCurrencyPrice;\n /**\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 * @decimalValue options { gte:0, maxScale:6 }\n */\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 /**\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 * @maxLength 200\n */\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 * @maxLength 200\n */\n taxName?: string | null;\n /** The type of the jurisdiction in which this tax detail applies. */\n jurisdictionType?: JurisdictionTypeWithLiterals;\n /**\n * The amount of this line item that was exempt from this authority.\n * @internal\n */\n exemptAmount?: MultiCurrencyPrice;\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\n/** @enumType */\nexport type JurisdictionTypeWithLiterals =\n | JurisdictionType\n | 'UNDEFINED'\n | 'COUNTRY'\n | 'STATE'\n | 'COUNTY'\n | 'CITY'\n | 'SPECIAL';\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?: ItemAvailabilityStatusWithLiterals;\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 is not in stock. */\n NOT_AVAILABLE = 'NOT_AVAILABLE',\n /** Available quantity is less than requested. */\n PARTIALLY_AVAILABLE = 'PARTIALLY_AVAILABLE',\n}\n\n/** @enumType */\nexport type ItemAvailabilityStatusWithLiterals =\n | ItemAvailabilityStatus\n | 'AVAILABLE'\n | 'NOT_FOUND'\n | 'NOT_AVAILABLE'\n | 'PARTIALLY_AVAILABLE';\n\nexport interface Scope {\n /** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */\n namespace?: string;\n /** Coupon scope's applied group (e.g., event or ticket in Wix Events) */\n group?: Group;\n}\n\nexport interface Group {\n /** Coupon scope's group (e.g., product or collection in Wix Stores). See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */\n name?: string;\n /** Item ID (when the coupon scope is limited to just one item). */\n entityId?: string | null;\n}\n\nexport interface ModifierGroup {\n /**\n * Modifier group ID.\n * @minLength 1\n * @maxLength 36\n */\n _id?: string;\n /** Modifier group name. */\n name?: TranslatableString;\n /**\n * List of modifiers in this group.\n * @minSize 1\n * @maxSize 25\n */\n modifiers?: ItemModifier[];\n}\n\nexport interface ItemModifier {\n /**\n * Modifier ID.\n * @minLength 1\n * @maxLength 36\n */\n _id?: string;\n /**\n * The quantity of this modifier.\n * @min 1\n * @max 100000\n */\n quantity?: number | null;\n /** Primary display label for the modifier. */\n label?: TranslatableString;\n /** Additional details. */\n details?: TranslatableString;\n /** The price of the modifier. */\n price?: MultiCurrencyPrice;\n}\n\nexport interface PlatformFee {\n /** __Required.__ Platform fee name. */\n name?: TranslatableString;\n /** Platform fee charge type. */\n chargeType?: PlatformFeeChargeTypeWithLiterals;\n /**\n * Percentage rate charged as platform fee.\n *\n * The fee rate expressed as a decimal fraction between 0 and 1. For example, `0.05` for 5%.\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0, lte:1, maxScale:4 }\n */\n percentageRate?: string;\n}\n\nexport enum PlatformFeeChargeType {\n UNKNOWN_CHARGE_TYPE = 'UNKNOWN_CHARGE_TYPE',\n /** The platform fee is passed on to the customer. */\n PASS_ON = 'PASS_ON',\n /** The platform fee is absorbed by the merchant. */\n ABSORBED = 'ABSORBED',\n}\n\n/** @enumType */\nexport type PlatformFeeChargeTypeWithLiterals =\n | PlatformFeeChargeType\n | 'UNKNOWN_CHARGE_TYPE'\n | 'PASS_ON'\n | 'ABSORBED';\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 /**\n * Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.\n * @format COUNTRY\n */\n country?: string | null;\n /**\n * Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format.\n * @maxLength 50\n */\n subdivision?: string | null;\n /**\n * City name.\n * @maxLength 50\n */\n city?: string | null;\n /**\n * Postal or zip code.\n * @maxLength 50\n */\n postalCode?: string | null;\n /** Street address. */\n streetAddress?: StreetAddress;\n /**\n * Main address line (usually street name and number).\n * @maxLength 150\n */\n addressLine1?: string | null;\n /**\n * Free text providing more detailed address info. Usually contains apt, suite, floor.\n * @maxLength 100\n */\n addressLine2?: string | null;\n /** Geocode object containing latitude and longitude coordinates. */\n location?: AddressLocation;\n /**\n * Country's full name.\n * @readonly\n */\n countryFullname?: string | null;\n /**\n * Subdivision full-name.\n * @readonly\n */\n subdivisionFullname?: string | null;\n}\n\nexport interface StreetAddress {\n /** Street number. */\n number?: string;\n /** Street name. */\n name?: string;\n}\n\nexport interface AddressLocation {\n /** Address latitude. */\n latitude?: number | null;\n /** Address longitude. */\n longitude?: number | null;\n}\n\n/** Full contact details for an address */\nexport interface FullAddressContactDetails {\n /**\n * First name.\n * @maxLength 100\n */\n firstName?: string | null;\n /**\n * Last name.\n * @maxLength 100\n */\n lastName?: string | null;\n /**\n * Phone number.\n * @format PHONE\n */\n phone?: string | null;\n /**\n * Company name.\n * @maxLength 1000\n */\n company?: string | null;\n /** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */\n vatId?: VatId;\n}\n\nexport interface VatId {\n /** Customer's tax ID. */\n _id?: string;\n /**\n * Tax type.\n *\n * Supported values:\n * + `CPF`: for individual tax payers\n * + `CNPJ`: for corporations\n */\n type?: VatTypeWithLiterals;\n}\n\n/** tax info types */\nexport enum VatType {\n UNSPECIFIED = 'UNSPECIFIED',\n /** CPF - for individual tax payers. */\n CPF = 'CPF',\n /** CNPJ - for corporations */\n CNPJ = 'CNPJ',\n}\n\n/** @enumType */\nexport type VatTypeWithLiterals = VatType | 'UNSPECIFIED' | 'CPF' | 'CNPJ';\n\nexport interface 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 /**\n * Unique identifier of selected option. For example, \"usps_std_overnight\".\n * @maxLength 100\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 * @maxLength 250\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 /**\n * Other charges\n * @deprecated Other charges\n * @replacedBy additional_fees\n * @targetRemovalDate 2025-10-01\n */\n otherCharges?: SelectedCarrierServiceOptionOtherCharge[];\n /**\n * This carrier's unique ID\n * @format GUID\n */\n carrierId?: string | null;\n /**\n * Delivery solution allocations to different delivery carriers and delivery regions\n * @maxSize 300\n */\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 /**\n * Expected delivery time, in free text. For example, \"3-5 business days\".\n * @maxLength 500\n */\n deliveryTime?: string | null;\n /**\n * Instructions for caller, e.g for pickup: \"Please deliver during opening hours, and please don't park in disabled parking spot\".\n * @maxLength 1000\n */\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?: PickupMethodWithLiterals;\n}\n\nexport enum PickupMethod {\n UNKNOWN_METHOD = 'UNKNOWN_METHOD',\n STORE_PICKUP = 'STORE_PICKUP',\n PICKUP_POINT = 'PICKUP_POINT',\n}\n\n/** @enumType */\nexport type PickupMethodWithLiterals =\n | PickupMethod\n | 'UNKNOWN_METHOD'\n | 'STORE_PICKUP'\n | 'PICKUP_POINT';\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?: ChargeTypeWithLiterals;\n /**\n * Details of the charge, such as 'Full Coverage Insurance of up to 80% of value of shipment'.\n * @maxLength 200\n */\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\n/** @enumType */\nexport type ChargeTypeWithLiterals = ChargeType | 'HANDLING_FEE' | 'INSURANCE';\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 /**\n * The carrier app id\n * @format GUID\n */\n appId?: string | null;\n /**\n * Unique code that acts as an ID for a shipping rate. For example, `\"usps_std_overnight\"`.\n * @maxLength 250\n */\n code?: string;\n}\n\nexport interface Region {\n /**\n * The delivery region id.\n * @format GUID\n */\n _id?: string | null;\n /**\n * The delivery region name.\n * @maxLength 100\n */\n name?: string | null;\n}\n\nexport interface ApplicableLineItems {\n /**\n * Line items that the delivery solution is for.\n * @maxSize 300\n * @minLength 1\n * @maxLength 100\n */\n lineItemIds?: string[];\n}\n\nexport interface ShippingRegion {\n /**\n * Shipping region ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * Shipping region name.\n * @maxLength 100\n */\n name?: string;\n}\n\nexport interface CarrierServiceOption {\n /**\n * Carrier ID.\n * @format GUID\n */\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 * @maxLength 100\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 * @maxLength 250\n */\n title?: string;\n /** Delivery logistics. */\n logistics?: DeliveryLogistics;\n /** Sipping price information. */\n cost?: ShippingPrice;\n /**\n * Delivery solution allocations to different delivery carriers and delivery regions\n * @maxSize 300\n */\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?: ChargeTypeWithLiterals;\n /** Price of added cost. */\n price?: MultiCurrencyPrice;\n /**\n * Description of the additional charge. For example, `\"Handling fee of $5 applied for gift wrapping\"`.\n * @maxLength 250\n */\n details?: string | null;\n}\n\nexport interface BuyerInfo extends BuyerInfoIdOneOf {\n /**\n * Visitor ID (if site visitor is **not** a member).\n * @format GUID\n * @readonly\n */\n visitorId?: string;\n /**\n * Member ID (if site visitor is a site member).\n * @format GUID\n * @readonly\n */\n memberId?: string;\n /**\n * Contact ID. Auto-created if one does not yet exist. For more information, see the Contacts API.\n * @format GUID\n * @readonly\n */\n contactId?: string | null;\n /**\n * Buyer email address.\n * @format EMAIL\n */\n email?: string | null;\n}\n\n/** @oneof */\nexport interface BuyerInfoIdOneOf {\n /**\n * Visitor ID (if site visitor is **not** a member).\n * @format GUID\n * @readonly\n */\n visitorId?: string;\n /**\n * Member ID (if site visitor is a site member).\n * @format GUID\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\n/** @enumType */\nexport type RuleTypeWithLiterals =\n | RuleType\n | 'VALIDATION'\n | 'OTHER'\n | 'MAX'\n | 'MIN'\n | 'MAX_LENGTH'\n | 'MIN_LENGTH'\n | 'MAX_SIZE'\n | 'MIN_SIZE'\n | 'FORMAT'\n | 'DECIMAL_LTE'\n | 'DECIMAL_GTE'\n | 'DECIMAL_LT'\n | 'DECIMAL_GT'\n | 'DECIMAL_MAX_SCALE'\n | 'INVALID_ENUM_VALUE'\n | 'REQUIRED_FIELD'\n | 'FIELD_NOT_ALLOWED'\n | 'ONE_OF_ALIGNMENT'\n | 'EXACT_LENGTH'\n | 'EXACT_SIZE'\n | 'REQUIRED_ONE_OF_FIELD';\n\nexport interface FieldViolation {\n field?: string;\n description?: string;\n violatedRule?: RuleTypeWithLiterals;\n /** applicable when violated_rule=OTHER */\n ruleName?: string | null;\n data?: Record<string, any> | null;\n}\n\nexport interface SystemError {\n /** Error code. */\n errorCode?: string | null;\n}\n\nexport interface CarrierErrors {\n /** 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 /** Actual amount to be redeemed from the gift card. */\n amount?: MultiCurrencyPrice;\n /**\n * App ID of the gift card provider.\n * @format GUID\n */\n appId?: string;\n /**\n * External ID in the gift card provider's system.\n * Used for integration and tracking across different platforms.\n * @minLength 1\n * @maxLength 50\n */\n externalId?: string | null;\n /** Requested amount to redeem from the gift card. */\n requestedAmount?: MultiCurrencyPrice;\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?: DiscountTypeWithLiterals;\n /**\n * IDs of line items the discount applies to.\n * @format GUID\n * @deprecated IDs of line items the discount applies to.\n * @replacedBy line_items_discounts\n * @targetRemovalDate 2025-12-31\n */\n lineItemIds?: string[];\n /**\n * Number of subscription cycle this discount applies to\n * default None - all billing cycle\n * @internal\n * @min 1\n * @max 999\n */\n subscriptionCycles?: number | null;\n /**\n * A list of item combinations for this applied discount.\n * Each entry represents a unique combination of line items that triggered\n * or received this discount, along with how many times that combination was applied together.\n * Relevant ONLY for BXGY and Quantity-based promotions.\n * In BXGY the combination will contain the \"X\" items with discount amount of 0.\n * @internal\n * @maxSize 1000\n */\n itemCombinations?: ItemCombination[];\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/** @enumType */\nexport type DiscountTypeWithLiterals =\n | DiscountType\n | 'GLOBAL'\n | 'SPECIFIC_ITEMS'\n | 'SHIPPING';\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 /**\n * Discount Percentage. Will be calculated from items price before other discounts.\n * @min 1\n * @max 100\n */\n percentage?: number | null;\n}\n\nexport interface DiscountRule {\n /**\n * Discount rule ID\n * @format GUID\n */\n _id?: string;\n /** Discount rule name */\n name?: DiscountRuleName;\n /** Discount value. */\n amount?: MultiCurrencyPrice;\n}\n\nexport interface DiscountRuleName {\n /**\n * Original discount rule name (in site's default language).\n * @minLength 1\n * @maxLength 256\n */\n original?: string;\n /**\n * Translated discount rule name according to buyer language. Defaults to `original` when not provided.\n * @minLength 1\n * @maxLength 500\n */\n translated?: string | null;\n}\n\nexport interface LineItemDiscount {\n /**\n * ID of line item the discount applies to.\n * @format GUID\n */\n _id?: string;\n /** Discount value. */\n totalDiscountAmount?: MultiCurrencyPrice;\n}\n\nexport interface ItemCombination {\n /**\n * The number of times this exact combination of items (with the specified quantities) was applied together in the order.\n * @min 1\n * @max 100000\n */\n count?: number;\n /**\n * Line items that participated together in this combination.\n * @minSize 1\n * @maxSize 100\n */\n lineItems?: ItemCombinationLineItem[];\n}\n\nexport interface ItemCombinationLineItem {\n /**\n * The unique ID of the line item to which this discount applies.\n * @format GUID\n */\n lineItemId?: string;\n /** Total discount amount for all units (quantity) of this line item in this combination. */\n discountAmount?: MultiCurrencyPrice;\n /**\n * Number of units from this line item that participated in a single combination.\n * @min 1\n * @max 100000\n */\n quantity?: number;\n}\n\nexport interface CustomField {\n /** Custom field value. */\n value?: any;\n /**\n * Custom field title.\n * @minLength 1\n * @maxLength 500\n */\n title?: string;\n /**\n * Translated custom field title.\n * @minLength 1\n * @maxLength 500\n */\n translatedTitle?: string | null;\n}\n\nexport enum WeightUnit {\n /** Weight unit can't be classified due to an error. */\n UNSPECIFIED_WEIGHT_UNIT = 'UNSPECIFIED_WEIGHT_UNIT',\n /** Kilograms. */\n KG = 'KG',\n /** Pounds. */\n LB = 'LB',\n}\n\n/** @enumType */\nexport type WeightUnitWithLiterals =\n | WeightUnit\n | 'UNSPECIFIED_WEIGHT_UNIT'\n | 'KG'\n | 'LB';\n\nexport interface 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 * The amount of this estimate that was exempt (for all line items).\n * @internal\n * @readonly\n */\n totalExempt?: MultiCurrencyPrice;\n /**\n * Default name of the tax that was calculated.\n * @internal\n * @maxLength 200\n */\n taxName?: string | null;\n}\n\nexport interface TaxCalculationDetails\n extends TaxCalculationDetailsCalculationDetailsOneOf {\n /** Reason the manual calculation was used. */\n manualRateReason?: ManualCalculationReasonWithLiterals;\n /** Details of the fallback rate calculation. */\n autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetails;\n /** Rate calculation type. */\n rateType?: RateTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface TaxCalculationDetailsCalculationDetailsOneOf {\n /** Reason the manual calculation was used. */\n manualRateReason?: ManualCalculationReasonWithLiterals;\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\n/** @enumType */\nexport type RateTypeWithLiterals =\n | RateType\n | 'NO_TAX_COLLECTED'\n | 'MANUAL_RATE'\n | 'AUTO_RATE'\n | 'FALLBACK_RATE';\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\n/** @enumType */\nexport type ManualCalculationReasonWithLiterals =\n | ManualCalculationReason\n | 'GLOBAL_SETTING_TO_MANUAL'\n | 'REGION_SETTING_TO_MANUAL';\n\nexport interface AutoTaxFallbackCalculationDetails {\n /** reason for fallback */\n fallbackReason?: FallbackReasonWithLiterals;\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/** @enumType */\nexport type FallbackReasonWithLiterals =\n | FallbackReason\n | 'AUTO_TAX_FAILED'\n | 'AUTO_TAX_DEACTIVATED';\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 /**\n * The name of the tax against which this tax amount was calculated.\n * @maxLength 200\n */\n taxName?: string;\n /**\n * The type of tax that was calculated. Depends on the company's nexus settings as well as the jurisdiction's tax laws.\n * @maxLength 200\n */\n taxType?: string;\n /**\n * The name of the jurisdiction in which this tax detail applies.\n * @maxLength 200\n */\n jurisdiction?: string;\n /** The type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */\n jurisdictionTypeEnum?: JurisdictionTypeWithLiterals;\n /**\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 * @decimalValue options { gte:0, maxScale:6 }\n */\n rate?: string;\n /** The sum of all the tax from line items that calculated by the tax identifiers. */\n aggregatedTaxAmount?: MultiCurrencyPrice;\n /** The sum of all the taxable amount from line items for tax identifiers. */\n aggregatedTaxableAmount?: MultiCurrencyPrice;\n /**\n * The aggregated exempt amount from all line items for tax identifiers.\n * @internal\n */\n aggregatedExemptAmount?: 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 /** PayPal Agentic Checkout sales channel. */\n PAYPAL_AGENTIC_CHECKOUT = 'PAYPAL_AGENTIC_CHECKOUT',\n}\n\n/** @enumType */\nexport type ChannelTypeWithLiterals =\n | ChannelType\n | 'UNSPECIFIED'\n | 'WEB'\n | 'POS'\n | 'EBAY'\n | 'AMAZON'\n | 'OTHER_PLATFORM'\n | 'WIX_APP_STORE'\n | 'WIX_INVOICES'\n | 'BACKOFFICE_MERCHANT'\n | 'WISH'\n | 'CLASS_PASS'\n | 'GLOBAL_E'\n | 'FACEBOOK'\n | 'ETSY'\n | 'TIKTOK'\n | 'FAIRE_COM'\n | 'PAYPAL_AGENTIC_CHECKOUT';\n\nexport interface 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 * @format GUID\n */\n userId?: string;\n /**\n * Member ID. When the order was created by a **logged in** site visitor.\n * @format GUID\n */\n memberId?: string;\n /**\n * Visitor ID. When the order was created by a site visitor that was **not** logged in.\n * @format GUID\n */\n visitorId?: string;\n /**\n * App ID. When the order was created by an external application or Wix service.\n * @format GUID\n */\n appId?: string;\n}\n\n/** @oneof */\nexport interface CreatedByIdOneOf {\n /**\n * 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 * @format GUID\n */\n userId?: string;\n /**\n * Member ID. When the order was created by a **logged in** site visitor.\n * @format GUID\n */\n memberId?: string;\n /**\n * Visitor ID. When the order was created by a site visitor that was **not** logged in.\n * @format GUID\n */\n visitorId?: string;\n /**\n * App ID. When the order was created by an external application or Wix service.\n * @format GUID\n */\n appId?: string;\n}\n\n/** Reserved for internal use. */\nexport interface MembershipOptions {\n /**\n * Reserved for internal use.\n * @readonly\n * @maxSize 300\n */\n eligibleMemberships?: Membership[];\n /**\n * Reserved for internal use.\n * @readonly\n * @maxSize 300\n */\n invalidMemberships?: InvalidMembership[];\n /** Selected membership to apply to this checkout. */\n selectedMemberships?: SelectedMemberships;\n}\n\nexport interface Membership {\n /**\n * Membership ID.\n * @minLength 1\n * @maxLength 100\n */\n _id?: string;\n /**\n * ID of the application providing this payment option.\n * @format GUID\n */\n appId?: string;\n /** The name of this membership. */\n name?: MembershipName;\n /**\n * Line item IDs which are \"paid\" for by this membership.\n * @minSize 1\n * @maxSize 300\n * @minLength 1\n * @maxLength 100\n */\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 /**\n * Membership name.\n * @maxLength 100\n */\n original?: string;\n /**\n * Translated membership name. Defaults to `original` when not provided.\n * @maxLength 100\n */\n translated?: string | null;\n}\n\nexport interface MembershipPaymentCredits {\n /**\n * Membership's initial value.\n * @min 1\n */\n total?: number;\n /** Membership's remaining value. */\n remaining?: number;\n /**\n * The amount to be deducted from the `remaining` balance.\n * @internal\n * @min 1\n */\n redemptionCost?: number;\n /**\n * Membership's balance type.\n * @internal\n */\n balanceType?: BalanceTypeWithLiterals;\n}\n\nexport enum BalanceType {\n /** Balance is measured in discrete uses (e.g., sessions, visits). */\n PUNCH_CARD = 'PUNCH_CARD',\n /** Balance is measured in a currency-like value (e.g., points). */\n CREDIT = 'CREDIT',\n}\n\n/** @enumType */\nexport type BalanceTypeWithLiterals = BalanceType | 'PUNCH_CARD' | 'CREDIT';\n\nexport interface InvalidMembership {\n /** Membership details. */\n membership?: Membership;\n /**\n * Reason why this membership is invalid and cannot be used.\n * @minLength 1\n * @maxLength 100\n */\n reason?: string;\n}\n\nexport interface SelectedMemberships {\n /**\n * Selected memberships.\n * @maxSize 300\n */\n memberships?: SelectedMembership[];\n}\n\nexport interface SelectedMembership {\n /**\n * Membership ID.\n * @minLength 1\n * @maxLength 100\n */\n _id?: string;\n /**\n * ID of the app providing this payment option.\n * @format GUID\n */\n appId?: string;\n /**\n * IDs of the line items this membership applies to.\n * @minSize 1\n * @maxSize 300\n * @minLength 1\n * @maxLength 100\n */\n lineItemIds?: string[];\n}\n\nexport interface AdditionalFee {\n /**\n * Additional fee's unique code (or ID) for future processing.\n * @minLength 1\n * @maxLength 100\n */\n code?: string | null;\n /**\n * Translated additional fee's name.\n * @minLength 1\n * @maxLength 50\n */\n name?: string;\n /** Additional fee's price. */\n price?: MultiCurrencyPrice;\n /** Tax details. */\n taxDetails?: ItemTaxFullDetails;\n /**\n * Provider's app id.\n * @minLength 1\n * @maxLength 100\n */\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 * @format GUID\n */\n lineItemIds?: string[];\n /**\n * Number of subscription cycle this fee applies to\n * default None - all billing cycle\n * @internal\n * @min 1\n * @max 999\n */\n subscriptionCycles?: number | null;\n /** the source the additional fee was added from */\n source?: AdditionalFeeSourceWithLiterals;\n /**\n * The translated name of the additional fee. The translation language is determined by the `languages` field in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n * @minLength 1\n * @maxLength 50\n */\n translatedName?: string | null;\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 /** The additional fee was added by the shipping provider */\n SHIPPING = 'SHIPPING',\n /** The additional fee was added by a Wix vertical and represents a Wix platform fee */\n PLATFORM = 'PLATFORM',\n}\n\n/** @enumType */\nexport type AdditionalFeeSourceWithLiterals =\n | AdditionalFeeSource\n | 'UNKNOWN_ADDITIONAL_FEE_SOURCE'\n | 'SERVICE_PLUGIN'\n | 'ITEM'\n | 'MANUAL'\n | 'SHIPPING'\n | 'PLATFORM';\n\nexport interface ConversionInfo {\n /**\n * The site currency.\n * @readonly\n * @format CURRENCY\n */\n siteCurrency?: string;\n /**\n * The rate used when converting from the site currency to the checkout currency.\n * @readonly\n * @decimalValue options { gt:0, lte:1000000000000000 }\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?: SeverityWithLiterals;\n /** Target location on a checkout or cart page where the violation will be displayed. */\n target?: Target;\n /**\n * Violation description. Can include rich text. Only HTTP or HTTPS links in the following format are allowed: `<a href=\"https://www.wix.com\">Click me</a>`.\n * @minLength 1\n * @maxLength 1000\n */\n description?: string | null;\n}\n\nexport enum Severity {\n /** The user is allowed to move forward in the flow. */\n WARNING = 'WARNING',\n /**\n * The user is blocked from moving forward in the flow.\n * For example, if callerContext is CART - moving to checkout is blocked. if callerContext is CHECKOUT, placing an order is blocked.\n */\n ERROR = 'ERROR',\n}\n\n/** @enumType */\nexport type SeverityWithLiterals = Severity | 'WARNING' | 'ERROR';\n\nexport interface Target extends TargetTargetTypeOneOf {\n /** General (other) violation. */\n other?: Other;\n /** Specific line item violation. */\n lineItem?: 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/** @enumType */\nexport type NameInOtherWithLiterals = NameInOther | 'OTHER_DEFAULT';\n\n/** Available locations on the line item */\nexport enum NameInLineItem {\n /** Default location, in case no specific location is specified. */\n LINE_ITEM_DEFAULT = 'LINE_ITEM_DEFAULT',\n}\n\n/** @enumType */\nexport type NameInLineItemWithLiterals = NameInLineItem | 'LINE_ITEM_DEFAULT';\n\nexport enum SuggestedFix {\n /** No suggested fix is specified. The user should refer to the violation description to resolve the issue. */\n UNKNOWN_SUGGESTED_FIX = 'UNKNOWN_SUGGESTED_FIX',\n /** The line item should be removed from the cart or checkout to resolve the violation. */\n REMOVE_LINE_ITEM = 'REMOVE_LINE_ITEM',\n}\n\n/** @enumType */\nexport type SuggestedFixWithLiterals =\n | SuggestedFix\n | 'UNKNOWN_SUGGESTED_FIX'\n | 'REMOVE_LINE_ITEM';\n\n/** General (other) violation. */\nexport interface Other {\n /** Location on a checkout or a cart page where a general (other) violation will be displayed. */\n name?: NameInOtherWithLiterals;\n}\n\n/** Specific line item violation. */\nexport interface TargetLineItem {\n /** Location on a checkout or a cart page where the specific line item violation will be displayed. */\n name?: NameInLineItemWithLiterals;\n /** ID of the line item containing the violation. */\n _id?: string | null;\n /**\n * Suggested fix for resolving the line item violation.\n * @internal\n */\n suggestedFix?: SuggestedFixWithLiterals;\n}\n\nexport interface 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 /**\n * ids of the items the subscription is defined on\n * @format GUID\n * @minSize 1\n * @maxSize 300\n */\n lineItemIds?: string[];\n /**\n * Generated description explaining future charges amount and schedule.\n * Translated to subscription order buyer language, or to site language if was not provided.\n * @maxLength 1000\n */\n description?: string | null;\n /**\n * Charges for subscription.\n * @maxSize 50\n */\n charges?: Charge[];\n}\n\nexport interface Charge {\n /** The cycle number from which the charge starts. */\n cycleFrom?: number;\n /** The number of cycles for which the charge is applicable. */\n cycleCount?: number | null;\n /** Charge summary. */\n priceSummary?: PriceSummary;\n /** The billing date from which the charge starts. */\n cycleBillingDate?: Date | null;\n}\n\nexport interface 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 /**\n * ID of the checkout template to retrieve.\n * @format GUID\n */\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 /**\n * ID of the checkout template to delete.\n * @format GUID\n */\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?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n /** Ascending order. */\n ASC = 'ASC',\n /** Descending order. */\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Number of items to load.\n * @max 100\n */\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 /**\n * ID of the checkout template to use to create a checkout from.\n * @format GUID\n */\n checkoutTemplateId: string;\n /**\n * ID of the site associated with the checkout template.\n * @format GUID\n */\n siteId: string;\n}\n\nexport interface CreateCheckoutFromTemplateResponse {\n /**\n * ID of the created checkout.\n * @format GUID\n */\n checkoutId?: string;\n /** URL of the created checkout page. */\n checkoutUrl?: string;\n /**\n * Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.\n * @format GUID\n */\n purchaseFlowId?: string | null;\n}\n\nexport interface CreateAndRedirectToCheckoutRequest {\n /**\n * ID of the checkout template to use to create a checkout.\n * @format GUID\n */\n checkoutTemplateId: string;\n /**\n * ID of the site associated with the checkout template.\n * @format GUID\n */\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 /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n/** @docsIgnore */\nexport type CreateCheckoutTemplateApplicationErrors = {\n code?: 'CANNOT_CREATE_CHECKOUT_TEMPLATE_WITHOUT_ITEMS';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type UpdateCheckoutTemplateApplicationErrors =\n | {\n code?: 'CANNOT_UPDATE_CHECKOUT_TEMPLATE_WITHOUT_SPECIFIED_FIELDS';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CANNOT_UPDATE_CHECKOUT_TEMPLATE_WITH_UNSUPPORTED_FIELD';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CANNOT_UPDATE_CHECKOUT_UPDATE_TEMPLATE_WITH_UNKNOWN_STATUS';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CANNOT_UPDATE_CHECKOUT_TEMPLATE_WITH_EMPTY_ITEMS';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type CreateCheckoutFromTemplateApplicationErrors = {\n code?: 'CANNOT_CREATE_CHECKOUT_FROM_INACTIVE_TEMPLATE';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type CreateAndRedirectToCheckoutApplicationErrors = {\n code?: 'CANNOT_CREATE_CHECKOUT_FROM_INACTIVE_TEMPLATE';\n description?: string;\n data?: Record<string, any>;\n};\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface CheckoutTemplateCreatedEnvelope {\n entity: CheckoutTemplate;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a checkout template is created.\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionId ECOM.CHECKOUT_TEMPLATE_READ\n * @webhook\n * @eventType wix.ecom.v1.checkout_template_created\n * @slug 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/**\n * Triggered when a checkout template is deleted.\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionId ECOM.CHECKOUT_TEMPLATE_READ\n * @webhook\n * @eventType wix.ecom.v1.checkout_template_deleted\n * @slug 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/**\n * Triggered when a checkout template is updated.\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionId ECOM.CHECKOUT_TEMPLATE_READ\n * @webhook\n * @eventType wix.ecom.v1.checkout_template_updated\n * @slug 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/**\n * Triggered when a checkout is created from a checkout template.\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionId ECOM.CHECKOUT_TEMPLATE_READ\n * @webhook\n * @eventType wix.ecom.v1.checkout_template_used\n * @slug 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 Create Checkout From Template.\n * 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.itemType\n * @requiredField checkoutTemplate.customLineItems.productName\n * @requiredField checkoutTemplate.lineItems.catalogReference\n * @requiredField checkoutTemplate.lineItems.catalogReference.appId\n * @requiredField checkoutTemplate.lineItems.quantity\n * @permissionId ECOM.CHECKOUT_TEMPLATE_CREATE\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: NonNullablePaths<\n CheckoutTemplate,\n | `customLineItems.${number}.descriptionLines.${number}.name`\n | `customLineItems.${number}.itemType`\n | `customLineItems.${number}.productName`\n | `customLineItems.${number}.quantity`\n | `lineItems.${number}.catalogReference`\n | `lineItems.${number}.catalogReference.appId`\n | `lineItems.${number}.catalogReference.catalogItemId`\n | `lineItems.${number}.quantity`,\n 6\n >\n): Promise<\n NonNullablePaths<\n CheckoutTemplate,\n | `status`\n | `customization.webClient.disabledContinueShoppingButton`\n | `customization.webClient.disabledPolicyAgreementCheckbox`\n | `customization.lockedGiftCard`\n | `customization.lockedCoupon`\n | `customization.disabledManualPayment`\n | `lineItems`\n | `lineItems.${number}.quantity`\n | `lineItems.${number}.catalogReference.catalogItemId`\n | `lineItems.${number}.catalogReference.appId`\n | `lineItems.${number}.catalogOverrideFields.productName.original`\n | `lineItems.${number}.catalogOverrideFields.physicalProperties.shippable`\n | `lineItems.${number}.catalogOverrideFields.paymentOption.value`\n | `customLineItems`\n | `customLineItems.${number}.quantity`\n | `customLineItems.${number}.price`\n | `customLineItems.${number}.priceDescription.original`\n | `customLineItems.${number}.itemType.preset`\n | `customLineItems.${number}.itemType.custom`\n | `customLineItems.${number}.paymentOption`\n | `customLineItems.${number}.priceUndetermined`\n | `customLineItems.${number}.fixedQuantity`\n | `customLineItems.${number}.savePaymentMethod`\n | `customLineItems.${number}.membersOnly`\n | `customLineItems.${number}.taxableAddress.addressType`\n | `customContentReference.appId`\n | `customContentReference.componentId`\n | `externalReference.appId`,\n 6\n > & {\n __applicationErrorsType?: CreateCheckoutTemplateApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n 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 * @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<\n NonNullablePaths<\n CheckoutTemplate,\n | `status`\n | `customization.webClient.disabledContinueShoppingButton`\n | `customization.webClient.disabledPolicyAgreementCheckbox`\n | `customization.lockedGiftCard`\n | `customization.lockedCoupon`\n | `customization.disabledManualPayment`\n | `lineItems`\n | `lineItems.${number}.quantity`\n | `lineItems.${number}.catalogReference.catalogItemId`\n | `lineItems.${number}.catalogReference.appId`\n | `lineItems.${number}.catalogOverrideFields.productName.original`\n | `lineItems.${number}.catalogOverrideFields.physicalProperties.shippable`\n | `lineItems.${number}.catalogOverrideFields.paymentOption.value`\n | `customLineItems`\n | `customLineItems.${number}.quantity`\n | `customLineItems.${number}.price`\n | `customLineItems.${number}.priceDescription.original`\n | `customLineItems.${number}.itemType.preset`\n | `customLineItems.${number}.itemType.custom`\n | `customLineItems.${number}.paymentOption`\n | `customLineItems.${number}.priceUndetermined`\n | `customLineItems.${number}.fixedQuantity`\n | `customLineItems.${number}.savePaymentMethod`\n | `customLineItems.${number}.membersOnly`\n | `customLineItems.${number}.taxableAddress.addressType`\n | `customContentReference.appId`\n | `customContentReference.componentId`\n | `externalReference.appId`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\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 * @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,\n checkoutTemplate: UpdateCheckoutTemplate\n): Promise<\n NonNullablePaths<\n CheckoutTemplate,\n | `status`\n | `customization.webClient.disabledContinueShoppingButton`\n | `customization.webClient.disabledPolicyAgreementCheckbox`\n | `customization.lockedGiftCard`\n | `customization.lockedCoupon`\n | `customization.disabledManualPayment`\n | `lineItems`\n | `lineItems.${number}.quantity`\n | `lineItems.${number}.catalogReference.catalogItemId`\n | `lineItems.${number}.catalogReference.appId`\n | `lineItems.${number}.catalogOverrideFields.productName.original`\n | `lineItems.${number}.catalogOverrideFields.physicalProperties.shippable`\n | `lineItems.${number}.catalogOverrideFields.paymentOption.value`\n | `customLineItems`\n | `customLineItems.${number}.quantity`\n | `customLineItems.${number}.price`\n | `customLineItems.${number}.priceDescription.original`\n | `customLineItems.${number}.itemType.preset`\n | `customLineItems.${number}.itemType.custom`\n | `customLineItems.${number}.paymentOption`\n | `customLineItems.${number}.priceUndetermined`\n | `customLineItems.${number}.fixedQuantity`\n | `customLineItems.${number}.savePaymentMethod`\n | `customLineItems.${number}.membersOnly`\n | `customLineItems.${number}.taxableAddress.addressType`\n | `customContentReference.appId`\n | `customContentReference.componentId`\n | `externalReference.appId`,\n 6\n > & {\n __applicationErrorsType?: UpdateCheckoutTemplateApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n 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 * @format GUID\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 endpoint will redirect to the domain site.\n *\n * Default: `ACTIVE`\n */\n status?: StatusWithLiterals;\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 * @maxSize 300\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 * @maxSize 300\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 * References to an external app and resource associated with the checkout.\n * Used for integration and tracking across different platforms.\n * @immutable\n */\n externalReference?: ExternalReference;\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 * @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 * @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 `value`.\n * @param value - Value to compare against.\n */\n ge: (propertyName: '_id', value: any) => CheckoutTemplatesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n gt: (propertyName: '_id', value: any) => CheckoutTemplatesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n le: (propertyName: '_id', value: any) => CheckoutTemplatesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n lt: (propertyName: '_id', value: any) => 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 * @hidden\n * @fqn wix.ecom.checkout_template.api.v1.CheckoutTemplateService.QueryCheckoutTemplates\n * @requiredField query\n */\nexport async function typedQueryCheckoutTemplates(\n query: CheckoutTemplateQuery\n): Promise<\n NonNullablePaths<\n QueryCheckoutTemplatesResponse,\n | `checkoutTemplates`\n | `checkoutTemplates.${number}.status`\n | `checkoutTemplates.${number}.customization.webClient.disabledContinueShoppingButton`\n | `checkoutTemplates.${number}.customization.webClient.disabledPolicyAgreementCheckbox`\n | `checkoutTemplates.${number}.customization.lockedGiftCard`\n | `checkoutTemplates.${number}.customization.lockedCoupon`\n | `checkoutTemplates.${number}.customization.disabledManualPayment`\n | `checkoutTemplates.${number}.customContentReference.appId`\n | `checkoutTemplates.${number}.customContentReference.componentId`\n | `checkoutTemplates.${number}.externalReference.appId`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ query: query });\n\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\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'checkoutTemplates.lineItems.catalogOverrideFields.image' },\n { path: 'checkoutTemplates.customLineItems.media' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [{ path: 'checkoutTemplates.customLineItems.url' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CheckoutTemplateQuerySpec extends QuerySpec {\n paging: 'cursor';\n wql: [\n {\n fields: ['_id', 'status'];\n operators: '*';\n sort: 'BOTH';\n }\n ];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<\n CheckoutTemplate,\n CheckoutTemplateQuerySpec\n>;\nexport type CheckoutTemplateQuery = {\n /** \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 */\n cursorPaging?: {\n /** \n Number of items to load. \n @max: 100 \n */\n limit?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit']\n | 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?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor']\n | null;\n };\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?: CommonQueryWithEntityContext['filter'] | null;\n /** \n Sort object in the following format:\n `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]` \n */\n sort?: {\n /** \n Name of the field to sort by. \n */\n fieldName?: NonNullable<\n CommonQueryWithEntityContext['sort']\n >[number]['fieldName'];\n /** \n Sort order. \n */\n order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];\n }[];\n};\n\n/**\n * Creates a new checkout based on the checkout template.\n *\n * Before using this method, you must have a checkout template available. Create a checkout template with Create Checkout Template.\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 * @applicableIdentity APP\n * @fqn wix.ecom.checkout_template.api.v1.CheckoutTemplateService.CreateCheckoutFromTemplate\n */\nexport async function createCheckoutFromTemplate(\n checkoutTemplateId: string,\n siteId: string\n): Promise<\n NonNullablePaths<\n CreateCheckoutFromTemplateResponse,\n `checkoutId` | `checkoutUrl`,\n 2\n > & {\n __applicationErrorsType?: CreateCheckoutFromTemplateApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n 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 method, you must have a checkout template available. Create a checkout template with Create Checkout Template.\n *\n * To build a URL that uses this method, 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 Create Checkout From Template.\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<\n NonNullablePaths<\n RawHttpResponse,\n `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`,\n 4\n > & {\n __applicationErrorsType?: CreateAndRedirectToCheckoutApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n 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 '*.dev.wix-code.com': [\n {\n srcPath: '/ecom/v1/checkout-templates',\n destPath: '/v1/checkout-templates',\n },\n ],\n _: [\n {\n srcPath: '/ecom/v1/checkout-templates',\n destPath: '/v1/checkout-templates',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/checkout-template',\n destPath: '',\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 Create Checkout From Template.\n * 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 path: 'checkoutTemplate.customLineItems.serviceProperties.endDate',\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 migrationOptions: {\n optInTransformResponse: true,\n },\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 path: 'checkoutTemplate.customLineItems.serviceProperties.endDate',\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 migrationOptions: {\n optInTransformResponse: true,\n },\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 path: 'checkoutTemplate.customLineItems.serviceProperties.endDate',\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 path: 'checkoutTemplate.customLineItems.serviceProperties.endDate',\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 migrationOptions: {\n optInTransformResponse: true,\n },\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 path: 'checkoutTemplate.customLineItems.serviceProperties.endDate',\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 migrationOptions: {\n optInTransformResponse: true,\n },\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 migrationOptions: {\n optInTransformResponse: true,\n },\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 path: 'checkoutTemplates.customLineItems.serviceProperties.endDate',\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 method, you must have a checkout template available. Create a checkout template with Create Checkout Template.\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 migrationOptions: {\n optInTransformResponse: true,\n },\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 method, you must have a checkout template available. Create a checkout template with Create Checkout Template.\n *\n * To build a URL that uses this method, 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 Create Checkout From Template.\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 migrationOptions: {\n optInTransformResponse: true,\n },\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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qCAAAA;AAAA,EAAA,kCAAAC;AAAA,EAAA,8BAAAC;AAAA,EAAA,8BAAAC;AAAA,EAAA,2BAAAC;AAAA,EAAA,8BAAAC;AAAA,EAAA;AAAA,gCAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,2BAA6B;AAC7B,oCAGO;;;ACLP,0BAAkC;AAClC,mBAA6C;AAC7C,IAAAC,gBAA6C;AAC7C,mBAA6C;AAC7C,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,wBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,8DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,Q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a;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAN;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,oBAAoB;AAAA,UACpB,QAAQ;AAAA,QACV;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,sBAAsB,QAAQ;AAAA,IACjC;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["createAndRedirectToCheckout","createCheckoutFromTemplate","createCheckoutTemplate","deleteCheckoutTemplate","getCheckoutTemplate","queryCheckoutTemplates","updateCheckoutTemplate","import_float","import_timestamp","import_rest_modules","payload","import_image","import_page_url_v2","import_transform_paths","Status","DescriptionLineType","PaymentOptionType","ItemTypePreset","SubscriptionFrequency","FileType","TaxableAddressType","JurisdictionType","ItemAvailabilityStatus","PlatformFeeChargeType","VatType","PickupMethod","ChargeType","RuleType","DiscountType","WeightUnit","RateType","ManualCalculationReason","FallbackReason","ChannelType","BalanceType","AdditionalFeeSource","Severity","NameInOther","NameInLineItem","SuggestedFix","SortOrder","WebhookIdentityType","createCheckoutTemplate","sdkTransformError","getCheckoutTemplate","updateCheckoutTemplate","deleteCheckoutTemplate","queryCheckoutTemplates","createCheckoutFromTemplate","createAndRedirectToCheckout"]}
1
+ {"version":3,"sources":["../../index.typings.ts","../../src/ecom-v1-checkout-template-checkout-templates.universal.ts","../../src/ecom-v1-checkout-template-checkout-templates.http.ts"],"sourcesContent":["export * from './src/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 {\n HttpClient,\n HttpResponse,\n NonNullablePaths,\n QuerySpec,\n Query as QuerySdkType,\n} 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 * @format GUID\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 endpoint will redirect to the domain site.\n *\n * Default: `ACTIVE`\n */\n status?: StatusWithLiterals;\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 * @maxSize 300\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 * @maxSize 300\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 * References to an external app and resource associated with the checkout.\n * Used for integration and tracking across different platforms.\n * @immutable\n */\n externalReference?: ExternalReference;\n}\n\nexport enum Status {\n UNKNOWN_STATUS = 'UNKNOWN_STATUS',\n ACTIVE = 'ACTIVE',\n INACTIVE = 'INACTIVE',\n}\n\n/** @enumType */\nexport type StatusWithLiterals =\n | Status\n | 'UNKNOWN_STATUS'\n | 'ACTIVE'\n | 'INACTIVE';\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 * @min 1\n * @max 100000\n */\n quantity?: number;\n /** Catalog and item reference. Holds IDs for the item and the catalog it came from, as well as further optional info. Optional for custom line items, which don't trigger the Catalog service plugin. */\n catalogReference?: CatalogReference;\n /** 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 /**\n * ID of the item within the catalog it belongs to.\n * @minLength 1\n * @maxLength 36\n */\n catalogItemId?: string;\n /**\n * ID of the app providing the catalog.\n *\n * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).\n *\n * For items from Wix catalogs, the following values always apply:\n * + Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n * + Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`\n * + Wix Restaurants: `\"9a5d83fd-8570-482e-81ab-cfa88942ee60\"`\n * @minLength 1\n */\n appId?: string;\n /**\n * Additional item details in key:value pairs. Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items.\n *\n * For products and variants from a Wix Stores catalog, learn more about [eCommerce integration](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 /**\n * Item price **after** discounts.\n * @decimalValue options { gte:0, lte:999999999, maxScale:3 }\n */\n price?: string | null;\n /**\n * Item price **before** discounts.\n * @decimalValue options { gte:0, lte:999999999, maxScale:3 }\n */\n fullPrice?: string | null;\n /**\n * Item description lines. Used when displaying the line item to customers.\n * @maxSize 20\n */\n descriptionLines?: DescriptionLine[];\n /** Physical properties of the item. */\n physicalProperties?: PhysicalProperties;\n /** Item image. */\n image?: string;\n /** Payment method selected for the item. */\n paymentOption?: PaymentOption;\n /**\n * Only eligible for catalog items with `lineItem.paymentOption.value` type of `DEPOSIT_ONLINE`.\n * @format DECIMAL_VALUE\n * @decimalValue options { gt:0, lte:999999999, maxScale:3 }\n */\n depositAmount?: string | null;\n /**\n * Whether to save the payment method on the order.\n *\n * Default: `false`\n */\n savePaymentMethod?: boolean | null;\n /**\n * ID of the app managing the inventory.\n * @format GUID\n */\n inventoryAppId?: string | 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 * @minLength 1\n * @maxLength 200\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 * @minLength 1\n * @maxLength 400\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 * Whether the description line originates from a modifier.\n * @internal\n * @deprecated Whether the description line originates from a modifier.\n * @replacedBy none\n * @targetRemovalDate 2025-12-31\n */\n modifierDescriptionLine?: boolean;\n}\n\n/** @oneof */\nexport interface DescriptionLineValueOneOf {\n /** Description line plain text value. */\n plainText?: PlainTextValue;\n /** Description line color value. */\n colorInfo?: Color;\n}\n\n/** @oneof */\nexport interface DescriptionLineDescriptionLineValueOneOf {}\n\nexport interface DescriptionLineName {\n /**\n * Description line name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n * @maxLength 100\n */\n original?: string;\n /**\n * Description line name translated into the buyer's language.\n *\n * Default: Same as `original`.\n * @maxLength 200\n */\n translated?: string | null;\n}\n\nexport interface PlainTextValue {\n /**\n * Description line plain text value in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n * @maxLength 600\n */\n original?: string;\n /**\n * Description line plain text value translated into the buyer's language.\n *\n * Default: Same as `original`.\n * @maxLength 600\n */\n translated?: string | null;\n}\n\nexport interface Color {\n /**\n * Description line color name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n * @maxLength 500\n */\n original?: string;\n /**\n * Description line color name translated into the buyer's language.\n *\n * Default: Same as `original`.\n * @maxLength 500\n */\n translated?: string | null;\n /** HEX or RGB color code for display. */\n code?: string | null;\n}\n\nexport enum DescriptionLineType {\n /** Unrecognized type. */\n UNRECOGNISED = 'UNRECOGNISED',\n /** Plain text type. */\n PLAIN_TEXT = 'PLAIN_TEXT',\n /** Color type. */\n COLOR = 'COLOR',\n}\n\n/** @enumType */\nexport type DescriptionLineTypeWithLiterals =\n | DescriptionLineType\n | 'UNRECOGNISED'\n | 'PLAIN_TEXT'\n | 'COLOR';\n\nexport interface PhysicalProperties {\n /** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */\n weight?: number | null;\n /**\n * Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku).\n * @maxLength 40\n */\n sku?: string | null;\n /** Whether this line item is shippable. */\n shippable?: boolean;\n}\n\nexport interface PaymentOption {\n /**\n * Type of selected payment option for current item.\n *\n * Default: `FULL_PAYMENT_ONLINE`\n */\n value?: PaymentOptionTypeWithLiterals;\n}\n\n/** Type of selected payment option for catalog item */\nexport enum PaymentOptionType {\n /** The entire payment for this item happens as part of the checkout. */\n FULL_PAYMENT_ONLINE = 'FULL_PAYMENT_ONLINE',\n /** The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. */\n FULL_PAYMENT_OFFLINE = 'FULL_PAYMENT_OFFLINE',\n /** Payment for this item is done by charging a membership. Any remaining amount not covered by the membership, such as item modifiers, is paid online. */\n MEMBERSHIP = 'MEMBERSHIP',\n /** Partial payment to be paid upfront during checkout. The initial amount to be paid for each line item is specified in `depositAmount`. */\n DEPOSIT_ONLINE = 'DEPOSIT_ONLINE',\n /** Payment for this item can only be done by charging a membership and must be manually redeemed in the dashboard by the site admin. When selected, `price` is `0`. */\n MEMBERSHIP_OFFLINE = 'MEMBERSHIP_OFFLINE',\n /**\n * Item price is charged to online membership. Any remaining amount not covered by the membership, such as item modifiers, is paid offline.\n * @documentationMaturity preview\n */\n MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER = 'MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER',\n}\n\n/** @enumType */\nexport type PaymentOptionTypeWithLiterals =\n | PaymentOptionType\n | 'FULL_PAYMENT_ONLINE'\n | 'FULL_PAYMENT_OFFLINE'\n | 'MEMBERSHIP'\n | 'DEPOSIT_ONLINE'\n | 'MEMBERSHIP_OFFLINE'\n | 'MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER';\n\nexport interface CustomLineItem {\n /**\n * Custom line item quantity.\n *\n * Min: `1`\n * Max: `100000`\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 * @format DECIMAL_VALUE\n * @decimalValue options { gte:0, lte:1000000000000000 }\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 /**\n * Custom line item description lines. Used for display purposes for the cart, checkout and order.\n * @maxSize 10\n */\n descriptionLines?: DescriptionLine[];\n /** Custom line item's media. */\n media?: string;\n /**\n * Deprecated. Custom line item ID.\n *\n * To maintain a unique value for a custom line item across multiple carts and orders, pass `catalogReference` instead.\n * Learn more about [custom items with catalog reference](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/catalogs/catalog-and-custom-items#custom-item-with-catalog-reference).\n * @format GUID\n * @readonly\n * @deprecated Deprecated. Custom line item ID.\n *\n * To maintain a unique value for a custom line item across multiple carts and orders, pass `catalogReference` instead.\n * Learn more about [custom items with catalog reference](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/catalogs/catalog-and-custom-items#custom-item-with-catalog-reference).\n * @targetRemovalDate 2026-05-01\n */\n _id?: string | null;\n /**\n * Tax group ID for this custom line item.\n * @format GUID\n */\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 /**\n * Item price **before** catalog-defined discount. Defaults to `price` when not provided.\n * @format DECIMAL_VALUE\n */\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 * @max 100000\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?: PaymentOptionTypeWithLiterals;\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 * @minLength 1\n * @maxLength 36\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 * @format DECIMAL_VALUE\n */\n depositAmount?: string | null;\n /**\n * Delivery profile ID.\n * @format GUID\n */\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 */\n priceUndetermined?: boolean;\n /**\n * Whether the line item quantity is fixed and cannot be changed.\n *\n * Default: `false`\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 * @minLength 1\n * @maxLength 1000\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 * @maxSize 5\n */\n policies?: Policy[];\n /**\n * ID of the app managing the inventory.\n * @internal\n * @format GUID\n */\n inventoryAppId?: string | null;\n /**\n * Whether the item can only be purchased by site members.\n *\n * Default: `false`\n */\n membersOnly?: boolean;\n /** Address to use for tax calculation purposes. */\n taxableAddress?: TaxableAddress;\n /**\n * Modifier groups that were added to the item.\n * @maxSize 25\n */\n modifierGroups?: V1ModifierGroup[];\n}\n\nexport interface PriceDescription {\n /**\n * __Required.__ Price description in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n * @minLength 1\n * @maxLength 100\n */\n original?: string;\n /**\n * Price description translated into the buyer's language.\n *\n * Default: Same as `original`.\n * @minLength 1\n * @maxLength 100\n */\n translated?: string | null;\n}\n\nexport interface ItemType extends ItemTypeItemTypeDataOneOf {\n /** Preset item type. */\n preset?: ItemTypePresetWithLiterals;\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?: ItemTypePresetWithLiterals;\n /** Custom item type. When none of the preset types are suitable, specifies the custom type. */\n custom?: string;\n}\n\nexport enum ItemTypePreset {\n UNRECOGNISED = 'UNRECOGNISED',\n PHYSICAL = 'PHYSICAL',\n DIGITAL = 'DIGITAL',\n GIFT_CARD = 'GIFT_CARD',\n SERVICE = 'SERVICE',\n}\n\n/** @enumType */\nexport type ItemTypePresetWithLiterals =\n | ItemTypePreset\n | 'UNRECOGNISED'\n | 'PHYSICAL'\n | 'DIGITAL'\n | 'GIFT_CARD'\n | 'SERVICE';\n\nexport interface SubscriptionOptionInfo {\n /** Subscription option settings. */\n subscriptionSettings?: SubscriptionSettings;\n /** Subscription option title. */\n title?: Title;\n /** Subscription option description. */\n description?: Description;\n}\n\nexport interface SubscriptionSettings {\n /** Frequency of recurring payment. */\n frequency?: SubscriptionFrequencyWithLiterals;\n /**\n * Interval of recurring payment.\n *\n * Default: `1`.\n * If SubscriptionFrequency is Day the minimum interval is 7\n * @min 1\n * @max 3650\n */\n interval?: number | null;\n /** Whether subscription is renewed automatically at the end of each period. */\n autoRenewal?: boolean;\n /**\n * Number of billing cycles before subscription ends. Ignored if `autoRenewal` is `true`.\n * @min 1\n */\n billingCycles?: number | null;\n /** Whether to allow the customer to cancel the subscription.. */\n enableCustomerCancellation?: boolean;\n /**\n * Period until first cycle starts. If applied payNow will be 0\n * If None => no free trial\n */\n freeTrialPeriod?: FreeTrialPeriod;\n /**\n * The date the subscription will start. The subscription will be charged either now or according to freeTrialDays.\n * @internal\n */\n startDate?: Date | null;\n}\n\n/** Frequency unit of recurring payment */\nexport enum SubscriptionFrequency {\n UNDEFINED = 'UNDEFINED',\n DAY = 'DAY',\n WEEK = 'WEEK',\n MONTH = 'MONTH',\n YEAR = 'YEAR',\n}\n\n/** @enumType */\nexport type SubscriptionFrequencyWithLiterals =\n | SubscriptionFrequency\n | 'UNDEFINED'\n | 'DAY'\n | 'WEEK'\n | 'MONTH'\n | 'YEAR';\n\nexport interface FreeTrialPeriod {\n /** Frequency of period. Values: DAY, WEEK, MONTH, YEAR */\n frequency?: SubscriptionFrequencyWithLiterals;\n /**\n * interval of period\n * @min 1\n * @max 999\n */\n interval?: number;\n}\n\nexport interface Title {\n /**\n * Subscription option name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n * @minLength 1\n * @maxLength 150\n */\n original?: string;\n /**\n * Subscription option name translated into the buyer's language.\n *\n * Default: Same as `original`.\n * @minLength 1\n * @maxLength 150\n */\n translated?: string | null;\n}\n\nexport interface Description {\n /**\n * Subscription option description.\n * @maxLength 500\n */\n original?: string;\n /**\n * Translated subscription option description.\n * @maxLength 500\n */\n translated?: string | null;\n}\n\nexport interface SecuredMedia {\n /**\n * Media ID in Wix Media Manager.\n * @minLength 1\n * @maxLength 100\n */\n _id?: string;\n /**\n * Original filename.\n * @minLength 1\n * @maxLength 1000\n */\n fileName?: string;\n /** File type. */\n fileType?: FileTypeWithLiterals;\n}\n\nexport enum FileType {\n UNSPECIFIED = 'UNSPECIFIED',\n SECURE_PICTURE = 'SECURE_PICTURE',\n SECURE_VIDEO = 'SECURE_VIDEO',\n SECURE_DOCUMENT = 'SECURE_DOCUMENT',\n SECURE_MUSIC = 'SECURE_MUSIC',\n SECURE_ARCHIVE = 'SECURE_ARCHIVE',\n}\n\n/** @enumType */\nexport type FileTypeWithLiterals =\n | FileType\n | 'UNSPECIFIED'\n | 'SECURE_PICTURE'\n | 'SECURE_VIDEO'\n | 'SECURE_DOCUMENT'\n | 'SECURE_MUSIC'\n | 'SECURE_ARCHIVE';\n\nexport interface ServiceProperties {\n /**\n * Date and time the service is to be provided, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.\n * For example, the start time of a class.\n */\n scheduledDate?: Date | null;\n /**\n * The number of people participating in the service. For example, the number of people attending a class or the number of people per hotel room.\n * @min 1\n * @max 10000\n */\n numberOfParticipants?: number | null;\n /**\n * Date and time the service is to be ended, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.\n * For example, the date and time a class will end.\n * @internal\n */\n endDate?: Date | null;\n}\n\nexport interface Policy {\n /**\n * Policy title - should be translated\n * @minLength 1\n * @maxLength 29\n */\n title?: string | null;\n /**\n * Policy content - should be translated\n * @minLength 1\n * @maxLength 3000\n */\n content?: string;\n}\n\nexport interface TaxableAddress extends TaxableAddressTaxableAddressDataOneOf {\n /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */\n addressType?: TaxableAddressTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface TaxableAddressTaxableAddressDataOneOf {\n /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */\n addressType?: TaxableAddressTypeWithLiterals;\n}\n\nexport enum TaxableAddressType {\n UNKNOWN_TAXABLE_ADDRESS = 'UNKNOWN_TAXABLE_ADDRESS',\n BUSINESS = 'BUSINESS',\n BILLING = 'BILLING',\n SHIPPING = 'SHIPPING',\n}\n\n/** @enumType */\nexport type TaxableAddressTypeWithLiterals =\n | TaxableAddressType\n | 'UNKNOWN_TAXABLE_ADDRESS'\n | 'BUSINESS'\n | 'BILLING'\n | 'SHIPPING';\n\nexport interface V1ModifierGroup {\n /**\n * Modifier group ID.\n * @minLength 1\n * @maxLength 36\n */\n _id?: string;\n /** Modifier group name. */\n name?: TranslatableString;\n /**\n * List of modifiers in this group.\n * @minSize 1\n * @maxSize 25\n */\n modifiers?: V1ItemModifier[];\n}\n\nexport interface TranslatableString {\n /**\n * __Required.__ String in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n *\n * Min: 1 character.\n * Max: 200 characters.\n * @minLength 1\n * @maxLength 200\n */\n original?: string;\n /**\n * String translated into the buyer's language.\n *\n * Min: 1 character.\n * Max: 400 characters.\n * Default: Same as `original`.\n * @minLength 1\n * @maxLength 400\n */\n translated?: string | null;\n}\n\nexport interface V1ItemModifier {\n /**\n * Modifier ID.\n * @minLength 1\n * @maxLength 36\n */\n _id?: string;\n /**\n * The quantity of this modifier.\n * @min 1\n * @max 100000\n */\n quantity?: number | null;\n /** Primary display label for the modifier. */\n label?: TranslatableString;\n /** Additional details. */\n details?: TranslatableString;\n /**\n * The price of the modifier.\n * @decimalValue options { gte:0, lte:1000000000000000, maxScale:3 }\n */\n price?: string | null;\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 * @format GUID\n */\n appId?: string;\n /**\n * ID of the component within the app it belongs to.\n *\n * You can get your component's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).\n * @format GUID\n */\n componentId?: string;\n}\n\nexport interface ExternalReference {\n /**\n * ID of the app associated with the purchase flow.\n * For example, the Wix Pay Links app ID.\n * @format GUID\n * @immutable\n */\n appId?: string;\n /**\n * Reference to an external resource ID. Used to link the purchase flow to a specific entity in an external system.\n * For example, a Wix Pay Link ID.\n * @minLength 1\n * @maxLength 100\n * @immutable\n */\n resourceId?: string | null;\n}\n\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 * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Line items.\n *\n * Max: 300 items\n * @minSize 1\n * @maxSize 300\n * @readonly\n */\n lineItems?: LineItem[];\n /** Billing information. */\n billingInfo?: AddressWithContact;\n /** Shipping information. */\n shippingInfo?: ShippingInfo;\n /**\n * [Buyer note](https://support.wix.com/en/article/collecting-and-viewing-buyer-notes) left by the customer.\n * @maxLength 1000\n */\n buyerNote?: string | null;\n /** Buyer information. */\n buyerInfo?: BuyerInfo;\n /**\n * The currency [selected by the customer](https://support.wix.com/en/article/multicurrency-an-overview) during the purchase flow, in three-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.\n *\n * This reflects the customer’s preferred display currency and may differ from the site’s default currency.\n * When no specific currency is selected by the customer, this matches the `currency` property.\n * @readonly\n * @format CURRENCY\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/setting-up-wix-gift-cards-9451439).\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 a site's weight unit.\n * @readonly\n */\n weightUnit?: WeightUnitWithLiterals;\n /**\n * Tax summary.\n * @readonly\n */\n taxSummary?: TaxSummary;\n /**\n * The site’s default currency, in three-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. This represents the base currency configured for the site and remains constant regardless of the customer’s currency selection.\n * @format CURRENCY\n * @readonly\n */\n currency?: string;\n /**\n * Sales channel that submitted the order.\n * @readonly\n */\n channelType?: ChannelTypeWithLiterals;\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 *\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 *\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 /**\n * Additional Fees.\n * @maxSize 100\n */\n additionalFees?: AdditionalFee[];\n /**\n * Cart ID that this checkout was created from. Empty if this checkout wasn't created from a cart.\n * @format GUID\n */\n cartId?: string | null;\n /**\n * List of validation violations raised by the [Validations service plugin](https://dev.wix.com/docs/rest/business-solutions/e-commerce/service-plugins/validations-integration-service-plugin/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 * @format GUID\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.\n * > * To access and manage custom checkout page content, your app must have the permission scope named \"Manage eCommerce - Admin Permissions\". Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).\n * @immutable\n */\n 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 * References to an external app and resource associated with this checkout.\n * Used for integration and tracking across different platforms.\n * @immutable\n */\n externalReference?: ExternalReference;\n /**\n * Order ID.\n *\n * This field is empty until the checkout completes and becomes an order.\n * @internal\n * @format GUID\n * @readonly\n */\n orderId?: string | null;\n /**\n * Payment for subscriptions after free trial period.\n * @readonly\n */\n payAfterFreeTrial?: PriceSummary;\n /**\n * The business location ID associated with the checkout.\n *\n * To learn more, see the Locations API.\n * @format GUID\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 * @maxSize 100\n */\n subscriptionCharges?: SubscriptionCharges[];\n /**\n * The currency used for payment, in three-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.\n *\n * This is determined by the [customer's selected currency](https://support.wix.com/en/article/multicurrency-an-overview) and the site’s supported payment currencies.\n * If the customer’s selected currency is supported for payment, this matches the `conversionCurrency` property. If not supported, this falls back to the `currency` property.\n * @readonly\n * @format CURRENCY\n */\n paymentCurrency?: string;\n /**\n * Tax exempt group ID to use for tax exemptions.\n * @format GUID\n */\n taxExemptGroupId?: string | null;\n}\n\nexport interface LineItem {\n /**\n * Line item ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Item quantity.\n *\n * Min: `\"1\"`\n * Max: `\"100000\"`\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?: PaymentOptionTypeWithLiterals;\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 * @minLength 1\n * @maxLength 36\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 * @format GUID\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 * @minLength 1\n * @maxLength 2500\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 * @readonly\n */\n priceUndetermined?: boolean;\n /**\n * Whether the line item quantity is fixed and cannot be changed.\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 /** Address to use for tax calculation purposes. */\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 using the 'Checkout & Orders - Line Items Schema Plugin' in the app dashboard before they can be accessed with API calls.\n */\n extendedFields?: ExtendedFields;\n /**\n * Policies to be displayed to the customer on the checkout page.\n * @readonly\n * @maxSize 5\n */\n policies?: Policy[];\n /**\n * ID of the app managing the inventory.\n * @internal\n * @format GUID\n */\n inventoryAppId?: string | null;\n /**\n * Whether the item can only be purchased by site members.\n *\n * Default: `false`\n * @readonly\n */\n membersOnly?: boolean;\n /**\n * Modifier groups that were added to the item.\n * @readonly\n * @maxSize 25\n */\n modifierGroups?: ModifierGroup[];\n /**\n * Total price of all item modifiers. Included in the item price.\n * @readonly\n */\n modifiersTotalPrice?: MultiCurrencyPrice;\n}\n\nexport interface MultiCurrencyPrice {\n /**\n * Amount.\n * @decimalValue options { gte:0, lte:1000000000000000 }\n */\n amount?: string;\n /**\n * Converted amount.\n * @readonly\n * @decimalValue options { gte:0, lte:1000000000000000 }\n */\n convertedAmount?: string;\n /**\n * Amount formatted with currency symbol.\n * @readonly\n */\n formattedAmount?: string;\n /**\n * Converted amount formatted with currency symbol.\n * @readonly\n */\n formattedConvertedAmount?: string;\n}\n\nexport interface ItemTaxFullDetails {\n /** Amount for which tax is calculated. */\n taxableAmount?: MultiCurrencyPrice;\n /**\n * Tax rate %, as a decimal point between 0 and 1.\n * @decimalValue options { gte:0, lte:1, maxScale:6 }\n */\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 * The amount of this line item that was exempt.\n * @internal\n */\n exemptAmount?: MultiCurrencyPrice;\n /**\n * tax information for a line item.\n * @maxSize 1000\n * @readonly\n */\n taxBreakdown?: TaxBreakdown[];\n}\n\nexport interface TaxRateBreakdown {\n /**\n * Name of tax against which the calculation was performed.\n * @maxLength 100\n */\n name?: string;\n /**\n * Rate at which this tax detail was calculated.\n * @decimalValue options { gte:0, lte:1, maxScale:6 }\n */\n rate?: string;\n /** Amount of tax for this tax detail. */\n tax?: MultiCurrencyPrice;\n /**\n * The amount of this line item that was exempt from this authority.\n * @internal\n */\n exemptAmount?: 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 /**\n * The name of the jurisdiction to which this tax detail applies. For example, \"New York\" or \"Quebec\".\n * @maxLength 200\n */\n jurisdiction?: string | null;\n /** The amount of this line item price that was considered nontaxable. (Decimal value) */\n nonTaxableAmount?: MultiCurrencyPrice;\n /**\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 * @decimalValue options { gte:0, maxScale:6 }\n */\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 /**\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 * @maxLength 200\n */\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 * @maxLength 200\n */\n taxName?: string | null;\n /** The type of the jurisdiction in which this tax detail applies. */\n jurisdictionType?: JurisdictionTypeWithLiterals;\n /**\n * The amount of this line item that was exempt from this authority.\n * @internal\n */\n exemptAmount?: MultiCurrencyPrice;\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\n/** @enumType */\nexport type JurisdictionTypeWithLiterals =\n | JurisdictionType\n | 'UNDEFINED'\n | 'COUNTRY'\n | 'STATE'\n | 'COUNTY'\n | 'CITY'\n | 'SPECIAL';\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?: ItemAvailabilityStatusWithLiterals;\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 is not in stock. */\n NOT_AVAILABLE = 'NOT_AVAILABLE',\n /** Available quantity is less than requested. */\n PARTIALLY_AVAILABLE = 'PARTIALLY_AVAILABLE',\n}\n\n/** @enumType */\nexport type ItemAvailabilityStatusWithLiterals =\n | ItemAvailabilityStatus\n | 'AVAILABLE'\n | 'NOT_FOUND'\n | 'NOT_AVAILABLE'\n | 'PARTIALLY_AVAILABLE';\n\nexport interface Scope {\n /** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */\n namespace?: string;\n /** Coupon scope's applied group (e.g., event or ticket in Wix Events) */\n group?: Group;\n}\n\nexport interface Group {\n /** Coupon scope's group (e.g., product or collection in Wix Stores). See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */\n name?: string;\n /** Item ID (when the coupon scope is limited to just one item). */\n entityId?: string | null;\n}\n\nexport interface ModifierGroup {\n /**\n * Modifier group ID.\n * @minLength 1\n * @maxLength 36\n */\n _id?: string;\n /** Modifier group name. */\n name?: TranslatableString;\n /**\n * List of modifiers in this group.\n * @minSize 1\n * @maxSize 25\n */\n modifiers?: ItemModifier[];\n}\n\nexport interface ItemModifier {\n /**\n * Modifier ID.\n * @minLength 1\n * @maxLength 36\n */\n _id?: string;\n /**\n * The quantity of this modifier.\n * @min 1\n * @max 100000\n */\n quantity?: number | null;\n /** Primary display label for the modifier. */\n label?: TranslatableString;\n /** Additional details. */\n details?: TranslatableString;\n /** The price of the modifier. */\n price?: MultiCurrencyPrice;\n}\n\nexport interface PlatformFee {\n /** __Required.__ Platform fee name. */\n name?: TranslatableString;\n /** Platform fee charge type. */\n chargeType?: PlatformFeeChargeTypeWithLiterals;\n /**\n * Percentage rate charged as platform fee.\n *\n * The fee rate expressed as a decimal fraction between 0 and 1. For example, `0.05` for 5%.\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0, lte:1, maxScale:4 }\n */\n percentageRate?: string;\n}\n\nexport enum PlatformFeeChargeType {\n UNKNOWN_CHARGE_TYPE = 'UNKNOWN_CHARGE_TYPE',\n /** The platform fee is passed on to the customer. */\n PASS_ON = 'PASS_ON',\n /** The platform fee is absorbed by the merchant. */\n ABSORBED = 'ABSORBED',\n}\n\n/** @enumType */\nexport type PlatformFeeChargeTypeWithLiterals =\n | PlatformFeeChargeType\n | 'UNKNOWN_CHARGE_TYPE'\n | 'PASS_ON'\n | 'ABSORBED';\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 /**\n * Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.\n * @format COUNTRY\n */\n country?: string | null;\n /**\n * Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format.\n * @maxLength 50\n */\n subdivision?: string | null;\n /**\n * City name.\n * @maxLength 50\n */\n city?: string | null;\n /**\n * Postal or zip code.\n * @maxLength 50\n */\n postalCode?: string | null;\n /** Street address. */\n streetAddress?: StreetAddress;\n /**\n * Main address line (usually street name and number).\n * @maxLength 150\n */\n addressLine1?: string | null;\n /**\n * Free text providing more detailed address info. Usually contains apt, suite, floor.\n * @maxLength 100\n */\n addressLine2?: string | null;\n /** Geocode object containing latitude and longitude coordinates. */\n location?: AddressLocation;\n /**\n * Country's full name.\n * @readonly\n */\n countryFullname?: string | null;\n /**\n * Subdivision full-name.\n * @readonly\n */\n subdivisionFullname?: string | null;\n}\n\nexport interface StreetAddress {\n /** Street number. */\n number?: string;\n /** Street name. */\n name?: string;\n}\n\nexport interface AddressLocation {\n /** Address latitude. */\n latitude?: number | null;\n /** Address longitude. */\n longitude?: number | null;\n}\n\n/** Full contact details for an address */\nexport interface FullAddressContactDetails {\n /**\n * First name.\n * @maxLength 100\n */\n firstName?: string | null;\n /**\n * Last name.\n * @maxLength 100\n */\n lastName?: string | null;\n /**\n * Phone number.\n * @format PHONE\n */\n phone?: string | null;\n /**\n * Company name.\n * @maxLength 1000\n */\n company?: string | null;\n /** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */\n vatId?: VatId;\n}\n\nexport interface VatId {\n /** Customer's tax ID. */\n _id?: string;\n /**\n * Tax type.\n *\n * Supported values:\n * + `CPF`: for individual tax payers\n * + `CNPJ`: for corporations\n */\n type?: VatTypeWithLiterals;\n}\n\n/** tax info types */\nexport enum VatType {\n UNSPECIFIED = 'UNSPECIFIED',\n /** CPF - for individual tax payers. */\n CPF = 'CPF',\n /** CNPJ - for corporations */\n CNPJ = 'CNPJ',\n}\n\n/** @enumType */\nexport type VatTypeWithLiterals = VatType | 'UNSPECIFIED' | 'CPF' | 'CNPJ';\n\nexport interface 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 /**\n * Unique identifier of selected option. For example, \"usps_std_overnight\".\n * @maxLength 100\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 * @maxLength 250\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 /**\n * Other charges\n * @deprecated Other charges\n * @replacedBy additional_fees\n * @targetRemovalDate 2025-10-01\n */\n otherCharges?: SelectedCarrierServiceOptionOtherCharge[];\n /**\n * This carrier's unique ID\n * @format GUID\n */\n carrierId?: string | null;\n /**\n * Delivery solution allocations to different delivery carriers and delivery regions\n * @maxSize 300\n */\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 /**\n * Expected delivery time, in free text. For example, \"3-5 business days\".\n * @maxLength 500\n */\n deliveryTime?: string | null;\n /**\n * Instructions for caller, e.g for pickup: \"Please deliver during opening hours, and please don't park in disabled parking spot\".\n * @maxLength 1000\n */\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?: PickupMethodWithLiterals;\n}\n\nexport enum PickupMethod {\n UNKNOWN_METHOD = 'UNKNOWN_METHOD',\n STORE_PICKUP = 'STORE_PICKUP',\n PICKUP_POINT = 'PICKUP_POINT',\n}\n\n/** @enumType */\nexport type PickupMethodWithLiterals =\n | PickupMethod\n | 'UNKNOWN_METHOD'\n | 'STORE_PICKUP'\n | 'PICKUP_POINT';\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?: ChargeTypeWithLiterals;\n /**\n * Details of the charge, such as 'Full Coverage Insurance of up to 80% of value of shipment'.\n * @maxLength 200\n */\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\n/** @enumType */\nexport type ChargeTypeWithLiterals = ChargeType | 'HANDLING_FEE' | 'INSURANCE';\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 /**\n * The carrier app id\n * @format GUID\n */\n appId?: string | null;\n /**\n * Unique code that acts as an ID for a shipping rate. For example, `\"usps_std_overnight\"`.\n * @maxLength 250\n */\n code?: string;\n}\n\nexport interface Region {\n /**\n * The delivery region id.\n * @format GUID\n */\n _id?: string | null;\n /**\n * The delivery region name.\n * @maxLength 100\n */\n name?: string | null;\n}\n\nexport interface ApplicableLineItems {\n /**\n * Line items that the delivery solution is for.\n * @maxSize 300\n * @minLength 1\n * @maxLength 100\n */\n lineItemIds?: string[];\n}\n\nexport interface ShippingRegion {\n /**\n * Shipping region ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * Shipping region name.\n * @maxLength 100\n */\n name?: string;\n}\n\nexport interface CarrierServiceOption {\n /**\n * Carrier ID.\n * @format GUID\n */\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 * @maxLength 100\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 * @maxLength 250\n */\n title?: string;\n /** Delivery logistics. */\n logistics?: DeliveryLogistics;\n /** Sipping price information. */\n cost?: ShippingPrice;\n /**\n * Delivery solution allocations to different delivery carriers and delivery regions\n * @maxSize 300\n */\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?: ChargeTypeWithLiterals;\n /** Price of added cost. */\n price?: MultiCurrencyPrice;\n /**\n * Description of the additional charge. For example, `\"Handling fee of $5 applied for gift wrapping\"`.\n * @maxLength 250\n */\n details?: string | null;\n}\n\nexport interface BuyerInfo extends BuyerInfoIdOneOf {\n /**\n * Visitor ID (if site visitor is **not** a member).\n * @format GUID\n * @readonly\n */\n visitorId?: string;\n /**\n * Member ID (if site visitor is a site member).\n * @format GUID\n * @readonly\n */\n memberId?: string;\n /**\n * Contact ID. Auto-created if one does not yet exist. For more information, see the Contacts API.\n * @format GUID\n * @readonly\n */\n contactId?: string | null;\n /**\n * Buyer email address.\n * @format EMAIL\n */\n email?: string | null;\n}\n\n/** @oneof */\nexport interface BuyerInfoIdOneOf {\n /**\n * Visitor ID (if site visitor is **not** a member).\n * @format GUID\n * @readonly\n */\n visitorId?: string;\n /**\n * Member ID (if site visitor is a site member).\n * @format GUID\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\n/** @enumType */\nexport type RuleTypeWithLiterals =\n | RuleType\n | 'VALIDATION'\n | 'OTHER'\n | 'MAX'\n | 'MIN'\n | 'MAX_LENGTH'\n | 'MIN_LENGTH'\n | 'MAX_SIZE'\n | 'MIN_SIZE'\n | 'FORMAT'\n | 'DECIMAL_LTE'\n | 'DECIMAL_GTE'\n | 'DECIMAL_LT'\n | 'DECIMAL_GT'\n | 'DECIMAL_MAX_SCALE'\n | 'INVALID_ENUM_VALUE'\n | 'REQUIRED_FIELD'\n | 'FIELD_NOT_ALLOWED'\n | 'ONE_OF_ALIGNMENT'\n | 'EXACT_LENGTH'\n | 'EXACT_SIZE'\n | 'REQUIRED_ONE_OF_FIELD';\n\nexport interface FieldViolation {\n field?: string;\n description?: string;\n violatedRule?: RuleTypeWithLiterals;\n /** applicable when violated_rule=OTHER */\n ruleName?: string | null;\n data?: Record<string, any> | null;\n}\n\nexport interface SystemError {\n /** Error code. */\n errorCode?: string | null;\n}\n\nexport interface CarrierErrors {\n /** 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 /** Actual amount to be redeemed from the gift card. */\n amount?: MultiCurrencyPrice;\n /**\n * App ID of the gift card provider.\n * @format GUID\n */\n appId?: string;\n /**\n * External ID in the gift card provider's system.\n * Used for integration and tracking across different platforms.\n * @minLength 1\n * @maxLength 50\n */\n externalId?: string | null;\n /** Requested amount to redeem from the gift card. */\n requestedAmount?: MultiCurrencyPrice;\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?: DiscountTypeWithLiterals;\n /**\n * IDs of line items the discount applies to.\n * @format GUID\n * @deprecated IDs of line items the discount applies to.\n * @replacedBy line_items_discounts\n * @targetRemovalDate 2025-12-31\n */\n lineItemIds?: string[];\n /**\n * Number of subscription cycle this discount applies to\n * default None - all billing cycle\n * @internal\n * @min 1\n * @max 999\n */\n subscriptionCycles?: number | null;\n /**\n * A list of item combinations for this applied discount.\n * Each entry represents a unique combination of line items that triggered\n * or received this discount, along with how many times that combination was applied together.\n * Relevant ONLY for BXGY and Quantity-based promotions.\n * In BXGY the combination will contain the \"X\" items with discount amount of 0.\n * @internal\n * @maxSize 1000\n */\n itemCombinations?: ItemCombination[];\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/** @enumType */\nexport type DiscountTypeWithLiterals =\n | DiscountType\n | 'GLOBAL'\n | 'SPECIFIC_ITEMS'\n | 'SHIPPING';\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 /**\n * Discount Percentage. Will be calculated from items price before other discounts.\n * @min 1\n * @max 100\n */\n percentage?: number | null;\n}\n\nexport interface DiscountRule {\n /**\n * Discount rule ID\n * @format GUID\n */\n _id?: string;\n /** Discount rule name */\n name?: DiscountRuleName;\n /** Discount value. */\n amount?: MultiCurrencyPrice;\n}\n\nexport interface DiscountRuleName {\n /**\n * Original discount rule name (in site's default language).\n * @minLength 1\n * @maxLength 256\n */\n original?: string;\n /**\n * Translated discount rule name according to buyer language. Defaults to `original` when not provided.\n * @minLength 1\n * @maxLength 500\n */\n translated?: string | null;\n}\n\nexport interface LineItemDiscount {\n /**\n * ID of line item the discount applies to.\n * @format GUID\n */\n _id?: string;\n /** Discount value. */\n totalDiscountAmount?: MultiCurrencyPrice;\n}\n\nexport interface ItemCombination {\n /**\n * The number of times this exact combination of items (with the specified quantities) was applied together in the order.\n * @min 1\n * @max 100000\n */\n count?: number;\n /**\n * Line items that participated together in this combination.\n * @minSize 1\n * @maxSize 100\n */\n lineItems?: ItemCombinationLineItem[];\n}\n\nexport interface ItemCombinationLineItem {\n /**\n * The unique ID of the line item to which this discount applies.\n * @format GUID\n */\n lineItemId?: string;\n /** Total discount amount for all units (quantity) of this line item in this combination. */\n discountAmount?: MultiCurrencyPrice;\n /**\n * Number of units from this line item that participated in a single combination.\n * @min 1\n * @max 100000\n */\n quantity?: number;\n}\n\nexport interface CustomField {\n /** Custom field value. */\n value?: any;\n /**\n * Custom field title.\n * @minLength 1\n * @maxLength 500\n */\n title?: string;\n /**\n * Translated custom field title.\n * @minLength 1\n * @maxLength 500\n */\n translatedTitle?: string | null;\n}\n\nexport enum WeightUnit {\n /** Weight unit can't be classified due to an error. */\n UNSPECIFIED_WEIGHT_UNIT = 'UNSPECIFIED_WEIGHT_UNIT',\n /** Kilograms. */\n KG = 'KG',\n /** Pounds. */\n LB = 'LB',\n}\n\n/** @enumType */\nexport type WeightUnitWithLiterals =\n | WeightUnit\n | 'UNSPECIFIED_WEIGHT_UNIT'\n | 'KG'\n | 'LB';\n\nexport interface 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 * The amount of this estimate that was exempt (for all line items).\n * @internal\n * @readonly\n */\n totalExempt?: MultiCurrencyPrice;\n /**\n * Default name of the tax that was calculated.\n * @internal\n * @maxLength 200\n */\n taxName?: string | null;\n}\n\nexport interface TaxCalculationDetails\n extends TaxCalculationDetailsCalculationDetailsOneOf {\n /** Reason the manual calculation was used. */\n manualRateReason?: ManualCalculationReasonWithLiterals;\n /** Details of the fallback rate calculation. */\n autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetails;\n /** Rate calculation type. */\n rateType?: RateTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface TaxCalculationDetailsCalculationDetailsOneOf {\n /** Reason the manual calculation was used. */\n manualRateReason?: ManualCalculationReasonWithLiterals;\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\n/** @enumType */\nexport type RateTypeWithLiterals =\n | RateType\n | 'NO_TAX_COLLECTED'\n | 'MANUAL_RATE'\n | 'AUTO_RATE'\n | 'FALLBACK_RATE';\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\n/** @enumType */\nexport type ManualCalculationReasonWithLiterals =\n | ManualCalculationReason\n | 'GLOBAL_SETTING_TO_MANUAL'\n | 'REGION_SETTING_TO_MANUAL';\n\nexport interface AutoTaxFallbackCalculationDetails {\n /** reason for fallback */\n fallbackReason?: FallbackReasonWithLiterals;\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/** @enumType */\nexport type FallbackReasonWithLiterals =\n | FallbackReason\n | 'AUTO_TAX_FAILED'\n | 'AUTO_TAX_DEACTIVATED';\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 /**\n * The name of the tax against which this tax amount was calculated.\n * @maxLength 200\n */\n taxName?: string;\n /**\n * The type of tax that was calculated. Depends on the company's nexus settings as well as the jurisdiction's tax laws.\n * @maxLength 200\n */\n taxType?: string;\n /**\n * The name of the jurisdiction in which this tax detail applies.\n * @maxLength 200\n */\n jurisdiction?: string;\n /** The type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */\n jurisdictionTypeEnum?: JurisdictionTypeWithLiterals;\n /**\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 * @decimalValue options { gte:0, maxScale:6 }\n */\n rate?: string;\n /** The sum of all the tax from line items that calculated by the tax identifiers. */\n aggregatedTaxAmount?: MultiCurrencyPrice;\n /** The sum of all the taxable amount from line items for tax identifiers. */\n aggregatedTaxableAmount?: MultiCurrencyPrice;\n /**\n * The aggregated exempt amount from all line items for tax identifiers.\n * @internal\n */\n aggregatedExemptAmount?: 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 /** PayPal Agentic Checkout sales channel. */\n PAYPAL_AGENTIC_CHECKOUT = 'PAYPAL_AGENTIC_CHECKOUT',\n}\n\n/** @enumType */\nexport type ChannelTypeWithLiterals =\n | ChannelType\n | 'UNSPECIFIED'\n | 'WEB'\n | 'POS'\n | 'EBAY'\n | 'AMAZON'\n | 'OTHER_PLATFORM'\n | 'WIX_APP_STORE'\n | 'WIX_INVOICES'\n | 'BACKOFFICE_MERCHANT'\n | 'WISH'\n | 'CLASS_PASS'\n | 'GLOBAL_E'\n | 'FACEBOOK'\n | 'ETSY'\n | 'TIKTOK'\n | 'FAIRE_COM'\n | 'PAYPAL_AGENTIC_CHECKOUT';\n\nexport interface 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 * @format GUID\n */\n userId?: string;\n /**\n * Member ID. When the order was created by a **logged in** site visitor.\n * @format GUID\n */\n memberId?: string;\n /**\n * Visitor ID. When the order was created by a site visitor that was **not** logged in.\n * @format GUID\n */\n visitorId?: string;\n /**\n * App ID. When the order was created by an external application or Wix service.\n * @format GUID\n */\n appId?: string;\n}\n\n/** @oneof */\nexport interface CreatedByIdOneOf {\n /**\n * 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 * @format GUID\n */\n userId?: string;\n /**\n * Member ID. When the order was created by a **logged in** site visitor.\n * @format GUID\n */\n memberId?: string;\n /**\n * Visitor ID. When the order was created by a site visitor that was **not** logged in.\n * @format GUID\n */\n visitorId?: string;\n /**\n * App ID. When the order was created by an external application or Wix service.\n * @format GUID\n */\n appId?: string;\n}\n\n/** Reserved for internal use. */\nexport interface MembershipOptions {\n /**\n * Reserved for internal use.\n * @readonly\n * @maxSize 300\n */\n eligibleMemberships?: Membership[];\n /**\n * Reserved for internal use.\n * @readonly\n * @maxSize 300\n */\n invalidMemberships?: InvalidMembership[];\n /** Selected membership to apply to this checkout. */\n selectedMemberships?: SelectedMemberships;\n}\n\nexport interface Membership {\n /**\n * Membership ID.\n * @minLength 1\n * @maxLength 100\n */\n _id?: string;\n /**\n * ID of the application providing this payment option.\n * @format GUID\n */\n appId?: string;\n /** The name of this membership. */\n name?: MembershipName;\n /**\n * Line item IDs which are \"paid\" for by this membership.\n * @minSize 1\n * @maxSize 300\n * @minLength 1\n * @maxLength 100\n */\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 /**\n * Membership name.\n * @maxLength 100\n */\n original?: string;\n /**\n * Translated membership name. Defaults to `original` when not provided.\n * @maxLength 100\n */\n translated?: string | null;\n}\n\nexport interface MembershipPaymentCredits {\n /**\n * Membership's initial value.\n * @min 1\n */\n total?: number;\n /** Membership's remaining value. */\n remaining?: number;\n /**\n * The amount to be deducted from the `remaining` balance.\n * @internal\n * @min 1\n */\n redemptionCost?: number;\n /**\n * Membership's balance type.\n * @internal\n */\n balanceType?: BalanceTypeWithLiterals;\n}\n\nexport enum BalanceType {\n /** Balance is measured in discrete uses (e.g., sessions, visits). */\n PUNCH_CARD = 'PUNCH_CARD',\n /** Balance is measured in a currency-like value (e.g., points). */\n CREDIT = 'CREDIT',\n}\n\n/** @enumType */\nexport type BalanceTypeWithLiterals = BalanceType | 'PUNCH_CARD' | 'CREDIT';\n\nexport interface InvalidMembership {\n /** Membership details. */\n membership?: Membership;\n /**\n * Reason why this membership is invalid and cannot be used.\n * @minLength 1\n * @maxLength 100\n */\n reason?: string;\n}\n\nexport interface SelectedMemberships {\n /**\n * Selected memberships.\n * @maxSize 300\n */\n memberships?: SelectedMembership[];\n}\n\nexport interface SelectedMembership {\n /**\n * Membership ID.\n * @minLength 1\n * @maxLength 100\n */\n _id?: string;\n /**\n * ID of the app providing this payment option.\n * @format GUID\n */\n appId?: string;\n /**\n * IDs of the line items this membership applies to.\n * @minSize 1\n * @maxSize 300\n * @minLength 1\n * @maxLength 100\n */\n lineItemIds?: string[];\n}\n\nexport interface AdditionalFee {\n /**\n * Additional fee's unique code (or ID) for future processing.\n * @minLength 1\n * @maxLength 100\n */\n code?: string | null;\n /**\n * Translated additional fee's name.\n * @minLength 1\n * @maxLength 50\n */\n name?: string;\n /** Additional fee's price. */\n price?: MultiCurrencyPrice;\n /** Tax details. */\n taxDetails?: ItemTaxFullDetails;\n /**\n * Provider's app id.\n * @minLength 1\n * @maxLength 100\n */\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 * @format GUID\n */\n lineItemIds?: string[];\n /**\n * Number of subscription cycle this fee applies to\n * default None - all billing cycle\n * @internal\n * @min 1\n * @max 999\n */\n subscriptionCycles?: number | null;\n /** the source the additional fee was added from */\n source?: AdditionalFeeSourceWithLiterals;\n /**\n * The translated name of the additional fee. The translation language is determined by the `languages` field in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n * @minLength 1\n * @maxLength 50\n */\n translatedName?: string | null;\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 /** The additional fee was added by the shipping provider */\n SHIPPING = 'SHIPPING',\n /** The additional fee was added by a Wix vertical and represents a Wix platform fee */\n PLATFORM = 'PLATFORM',\n}\n\n/** @enumType */\nexport type AdditionalFeeSourceWithLiterals =\n | AdditionalFeeSource\n | 'UNKNOWN_ADDITIONAL_FEE_SOURCE'\n | 'SERVICE_PLUGIN'\n | 'ITEM'\n | 'MANUAL'\n | 'SHIPPING'\n | 'PLATFORM';\n\nexport interface ConversionInfo {\n /**\n * The site currency.\n * @readonly\n * @format CURRENCY\n */\n siteCurrency?: string;\n /**\n * The rate used when converting from the site currency to the checkout currency.\n * @readonly\n * @decimalValue options { gt:0, lte:1000000000000000 }\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?: SeverityWithLiterals;\n /** Target location on a checkout or cart page where the violation will be displayed. */\n target?: Target;\n /**\n * Violation description. Can include rich text. Only HTTP or HTTPS links in the following format are allowed: `<a href=\"https://www.wix.com\">Click me</a>`.\n * @minLength 1\n * @maxLength 1000\n */\n description?: string | null;\n}\n\nexport enum Severity {\n /** The user is allowed to move forward in the flow. */\n WARNING = 'WARNING',\n /**\n * The user is blocked from moving forward in the flow.\n * For example, if callerContext is CART - moving to checkout is blocked. if callerContext is CHECKOUT, placing an order is blocked.\n */\n ERROR = 'ERROR',\n}\n\n/** @enumType */\nexport type SeverityWithLiterals = Severity | 'WARNING' | 'ERROR';\n\nexport interface Target extends TargetTargetTypeOneOf {\n /** General (other) violation. */\n other?: Other;\n /** Specific line item violation. */\n lineItem?: 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/** @enumType */\nexport type NameInOtherWithLiterals = NameInOther | 'OTHER_DEFAULT';\n\n/** Available locations on the line item */\nexport enum NameInLineItem {\n /** Default location, in case no specific location is specified. */\n LINE_ITEM_DEFAULT = 'LINE_ITEM_DEFAULT',\n}\n\n/** @enumType */\nexport type NameInLineItemWithLiterals = NameInLineItem | 'LINE_ITEM_DEFAULT';\n\nexport enum SuggestedFix {\n /** No suggested fix is specified. The user should refer to the violation description to resolve the issue. */\n UNKNOWN_SUGGESTED_FIX = 'UNKNOWN_SUGGESTED_FIX',\n /** The line item should be removed from the cart or checkout to resolve the violation. */\n REMOVE_LINE_ITEM = 'REMOVE_LINE_ITEM',\n}\n\n/** @enumType */\nexport type SuggestedFixWithLiterals =\n | SuggestedFix\n | 'UNKNOWN_SUGGESTED_FIX'\n | 'REMOVE_LINE_ITEM';\n\n/** General (other) violation. */\nexport interface Other {\n /** Location on a checkout or a cart page where a general (other) violation will be displayed. */\n name?: NameInOtherWithLiterals;\n}\n\n/** Specific line item violation. */\nexport interface TargetLineItem {\n /** Location on a checkout or a cart page where the specific line item violation will be displayed. */\n name?: NameInLineItemWithLiterals;\n /** ID of the line item containing the violation. */\n _id?: string | null;\n /**\n * Suggested fix for resolving the line item violation.\n * @internal\n */\n suggestedFix?: SuggestedFixWithLiterals;\n}\n\nexport interface 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 /**\n * ids of the items the subscription is defined on\n * @format GUID\n * @minSize 1\n * @maxSize 300\n */\n lineItemIds?: string[];\n /**\n * Generated description explaining future charges amount and schedule.\n * Translated to subscription order buyer language, or to site language if was not provided.\n * @maxLength 1000\n */\n description?: string | null;\n /**\n * Charges for subscription.\n * @maxSize 50\n */\n charges?: Charge[];\n}\n\nexport interface Charge {\n /** The cycle number from which the charge starts. */\n cycleFrom?: number;\n /** The number of cycles for which the charge is applicable. */\n cycleCount?: number | null;\n /** Charge summary. */\n priceSummary?: PriceSummary;\n /** The billing date from which the charge starts. */\n cycleBillingDate?: Date | null;\n}\n\nexport interface 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 /**\n * ID of the checkout template to retrieve.\n * @format GUID\n */\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 /**\n * ID of the checkout template to delete.\n * @format GUID\n */\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?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n /** Ascending order. */\n ASC = 'ASC',\n /** Descending order. */\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Number of items to load.\n * @max 100\n */\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 /**\n * ID of the checkout template to use to create a checkout from.\n * @format GUID\n */\n checkoutTemplateId: string;\n /**\n * ID of the site associated with the checkout template.\n * @format GUID\n */\n siteId: string;\n}\n\nexport interface CreateCheckoutFromTemplateResponse {\n /**\n * ID of the created checkout.\n * @format GUID\n */\n checkoutId?: string;\n /** URL of the created checkout page. */\n checkoutUrl?: string;\n /**\n * Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.\n * @format GUID\n */\n purchaseFlowId?: string | null;\n}\n\nexport interface CreateAndRedirectToCheckoutRequest {\n /**\n * ID of the checkout template to use to create a checkout.\n * @format GUID\n */\n checkoutTemplateId: string;\n /**\n * ID of the site associated with the checkout template.\n * @format GUID\n */\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 /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n/** @docsIgnore */\nexport type CreateCheckoutTemplateApplicationErrors = {\n code?: 'CANNOT_CREATE_CHECKOUT_TEMPLATE_WITHOUT_ITEMS';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type UpdateCheckoutTemplateApplicationErrors =\n | {\n code?: 'CANNOT_UPDATE_CHECKOUT_TEMPLATE_WITHOUT_SPECIFIED_FIELDS';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CANNOT_UPDATE_CHECKOUT_TEMPLATE_WITH_UNSUPPORTED_FIELD';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CANNOT_UPDATE_CHECKOUT_UPDATE_TEMPLATE_WITH_UNKNOWN_STATUS';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CANNOT_UPDATE_CHECKOUT_TEMPLATE_WITH_EMPTY_ITEMS';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type CreateCheckoutFromTemplateApplicationErrors = {\n code?: 'CANNOT_CREATE_CHECKOUT_FROM_INACTIVE_TEMPLATE';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type CreateAndRedirectToCheckoutApplicationErrors = {\n code?: 'CANNOT_CREATE_CHECKOUT_FROM_INACTIVE_TEMPLATE';\n description?: string;\n data?: Record<string, any>;\n};\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface CheckoutTemplateCreatedEnvelope {\n entity: CheckoutTemplate;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a checkout template is created.\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionId ECOM.CHECKOUT_TEMPLATE_READ\n * @webhook\n * @eventType wix.ecom.v1.checkout_template_created\n * @slug 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/**\n * Triggered when a checkout template is deleted.\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionId ECOM.CHECKOUT_TEMPLATE_READ\n * @webhook\n * @eventType wix.ecom.v1.checkout_template_deleted\n * @slug 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/**\n * Triggered when a checkout template is updated.\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionId ECOM.CHECKOUT_TEMPLATE_READ\n * @webhook\n * @eventType wix.ecom.v1.checkout_template_updated\n * @slug 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/**\n * Triggered when a checkout is created from a checkout template.\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionId ECOM.CHECKOUT_TEMPLATE_READ\n * @webhook\n * @eventType wix.ecom.v1.checkout_template_used\n * @slug 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 Create Checkout From Template.\n * 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.itemType\n * @requiredField checkoutTemplate.customLineItems.productName\n * @requiredField checkoutTemplate.lineItems.catalogReference\n * @requiredField checkoutTemplate.lineItems.catalogReference.appId\n * @requiredField checkoutTemplate.lineItems.quantity\n * @permissionId ECOM.CHECKOUT_TEMPLATE_CREATE\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: NonNullablePaths<\n CheckoutTemplate,\n | `customLineItems.${number}.descriptionLines.${number}.name`\n | `customLineItems.${number}.itemType`\n | `customLineItems.${number}.productName`\n | `customLineItems.${number}.quantity`\n | `lineItems.${number}.catalogReference`\n | `lineItems.${number}.catalogReference.appId`\n | `lineItems.${number}.catalogReference.catalogItemId`\n | `lineItems.${number}.quantity`,\n 6\n >\n): Promise<\n NonNullablePaths<\n CheckoutTemplate,\n | `status`\n | `customization.webClient.disabledContinueShoppingButton`\n | `customization.webClient.disabledPolicyAgreementCheckbox`\n | `customization.lockedGiftCard`\n | `customization.lockedCoupon`\n | `customization.disabledManualPayment`\n | `lineItems`\n | `lineItems.${number}.quantity`\n | `lineItems.${number}.catalogReference.catalogItemId`\n | `lineItems.${number}.catalogReference.appId`\n | `lineItems.${number}.catalogOverrideFields.productName.original`\n | `lineItems.${number}.catalogOverrideFields.physicalProperties.shippable`\n | `lineItems.${number}.catalogOverrideFields.paymentOption.value`\n | `customLineItems`\n | `customLineItems.${number}.quantity`\n | `customLineItems.${number}.price`\n | `customLineItems.${number}.priceDescription.original`\n | `customLineItems.${number}.itemType.preset`\n | `customLineItems.${number}.itemType.custom`\n | `customLineItems.${number}.paymentOption`\n | `customLineItems.${number}.priceUndetermined`\n | `customLineItems.${number}.fixedQuantity`\n | `customLineItems.${number}.savePaymentMethod`\n | `customLineItems.${number}.membersOnly`\n | `customLineItems.${number}.taxableAddress.addressType`\n | `customContentReference.appId`\n | `customContentReference.componentId`\n | `externalReference.appId`,\n 6\n > & {\n __applicationErrorsType?: CreateCheckoutTemplateApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n 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 * @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<\n NonNullablePaths<\n CheckoutTemplate,\n | `status`\n | `customization.webClient.disabledContinueShoppingButton`\n | `customization.webClient.disabledPolicyAgreementCheckbox`\n | `customization.lockedGiftCard`\n | `customization.lockedCoupon`\n | `customization.disabledManualPayment`\n | `lineItems`\n | `lineItems.${number}.quantity`\n | `lineItems.${number}.catalogReference.catalogItemId`\n | `lineItems.${number}.catalogReference.appId`\n | `lineItems.${number}.catalogOverrideFields.productName.original`\n | `lineItems.${number}.catalogOverrideFields.physicalProperties.shippable`\n | `lineItems.${number}.catalogOverrideFields.paymentOption.value`\n | `customLineItems`\n | `customLineItems.${number}.quantity`\n | `customLineItems.${number}.price`\n | `customLineItems.${number}.priceDescription.original`\n | `customLineItems.${number}.itemType.preset`\n | `customLineItems.${number}.itemType.custom`\n | `customLineItems.${number}.paymentOption`\n | `customLineItems.${number}.priceUndetermined`\n | `customLineItems.${number}.fixedQuantity`\n | `customLineItems.${number}.savePaymentMethod`\n | `customLineItems.${number}.membersOnly`\n | `customLineItems.${number}.taxableAddress.addressType`\n | `customContentReference.appId`\n | `customContentReference.componentId`\n | `externalReference.appId`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\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 * @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,\n checkoutTemplate: UpdateCheckoutTemplate\n): Promise<\n NonNullablePaths<\n CheckoutTemplate,\n | `status`\n | `customization.webClient.disabledContinueShoppingButton`\n | `customization.webClient.disabledPolicyAgreementCheckbox`\n | `customization.lockedGiftCard`\n | `customization.lockedCoupon`\n | `customization.disabledManualPayment`\n | `lineItems`\n | `lineItems.${number}.quantity`\n | `lineItems.${number}.catalogReference.catalogItemId`\n | `lineItems.${number}.catalogReference.appId`\n | `lineItems.${number}.catalogOverrideFields.productName.original`\n | `lineItems.${number}.catalogOverrideFields.physicalProperties.shippable`\n | `lineItems.${number}.catalogOverrideFields.paymentOption.value`\n | `customLineItems`\n | `customLineItems.${number}.quantity`\n | `customLineItems.${number}.price`\n | `customLineItems.${number}.priceDescription.original`\n | `customLineItems.${number}.itemType.preset`\n | `customLineItems.${number}.itemType.custom`\n | `customLineItems.${number}.paymentOption`\n | `customLineItems.${number}.priceUndetermined`\n | `customLineItems.${number}.fixedQuantity`\n | `customLineItems.${number}.savePaymentMethod`\n | `customLineItems.${number}.membersOnly`\n | `customLineItems.${number}.taxableAddress.addressType`\n | `customContentReference.appId`\n | `customContentReference.componentId`\n | `externalReference.appId`,\n 6\n > & {\n __applicationErrorsType?: UpdateCheckoutTemplateApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n 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 * @format GUID\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 endpoint will redirect to the domain site.\n *\n * Default: `ACTIVE`\n */\n status?: StatusWithLiterals;\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 * @maxSize 300\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 * @maxSize 300\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 * References to an external app and resource associated with the checkout.\n * Used for integration and tracking across different platforms.\n * @immutable\n */\n externalReference?: ExternalReference;\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 * @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 * @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 `value`.\n * @param value - Value to compare against.\n */\n ge: (propertyName: '_id', value: any) => CheckoutTemplatesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n gt: (propertyName: '_id', value: any) => CheckoutTemplatesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n le: (propertyName: '_id', value: any) => CheckoutTemplatesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n lt: (propertyName: '_id', value: any) => 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 * @hidden\n * @fqn wix.ecom.checkout_template.api.v1.CheckoutTemplateService.QueryCheckoutTemplates\n * @requiredField query\n */\nexport async function typedQueryCheckoutTemplates(\n query: CheckoutTemplateQuery\n): Promise<\n NonNullablePaths<\n QueryCheckoutTemplatesResponse,\n | `checkoutTemplates`\n | `checkoutTemplates.${number}.status`\n | `checkoutTemplates.${number}.customization.webClient.disabledContinueShoppingButton`\n | `checkoutTemplates.${number}.customization.webClient.disabledPolicyAgreementCheckbox`\n | `checkoutTemplates.${number}.customization.lockedGiftCard`\n | `checkoutTemplates.${number}.customization.lockedCoupon`\n | `checkoutTemplates.${number}.customization.disabledManualPayment`\n | `checkoutTemplates.${number}.customContentReference.appId`\n | `checkoutTemplates.${number}.customContentReference.componentId`\n | `checkoutTemplates.${number}.externalReference.appId`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ query: query });\n\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\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'checkoutTemplates.lineItems.catalogOverrideFields.image' },\n { path: 'checkoutTemplates.customLineItems.media' },\n ],\n },\n {\n transformFn: transformRESTPageURLV2ToSDKPageURLV2,\n paths: [{ path: 'checkoutTemplates.customLineItems.url' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CheckoutTemplateQuerySpec extends QuerySpec {\n paging: 'cursor';\n wql: [\n {\n fields: ['_id', 'status'];\n operators: '*';\n sort: 'BOTH';\n }\n ];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<\n CheckoutTemplate,\n CheckoutTemplateQuerySpec\n>;\nexport type CheckoutTemplateQuery = {\n /** \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 */\n cursorPaging?: {\n /** \n Number of items to load. \n @max: 100 \n */\n limit?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit']\n | 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?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor']\n | null;\n };\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?: CommonQueryWithEntityContext['filter'] | null;\n /** \n Sort object in the following format:\n `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]` \n */\n sort?: {\n /** \n Name of the field to sort by. \n */\n fieldName?: NonNullable<\n CommonQueryWithEntityContext['sort']\n >[number]['fieldName'];\n /** \n Sort order. \n */\n order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];\n }[];\n};\n\n/**\n * Creates a new checkout based on the checkout template.\n *\n * Before using this method, you must have a checkout template available. Create a checkout template with Create Checkout Template.\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 * @applicableIdentity APP\n * @fqn wix.ecom.checkout_template.api.v1.CheckoutTemplateService.CreateCheckoutFromTemplate\n */\nexport async function createCheckoutFromTemplate(\n checkoutTemplateId: string,\n siteId: string\n): Promise<\n NonNullablePaths<\n CreateCheckoutFromTemplateResponse,\n `checkoutId` | `checkoutUrl`,\n 2\n > & {\n __applicationErrorsType?: CreateCheckoutFromTemplateApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n 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 method, you must have a checkout template available. Create a checkout template with Create Checkout Template.\n *\n * To build a URL that uses this method, 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 Create Checkout From Template.\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<\n NonNullablePaths<\n RawHttpResponse,\n `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`,\n 4\n > & {\n __applicationErrorsType?: CreateAndRedirectToCheckoutApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n 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 '*.dev.wix-code.com': [\n {\n srcPath: '/ecom/v1/checkout-templates',\n destPath: '/v1/checkout-templates',\n },\n ],\n _: [\n {\n srcPath: '/ecom/v1/checkout-templates',\n destPath: '/v1/checkout-templates',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/checkout-template',\n destPath: '',\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 Create Checkout From Template.\n * 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 path: 'checkoutTemplate.customLineItems.serviceProperties.endDate',\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 migrationOptions: {\n optInTransformResponse: true,\n },\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 path: 'checkoutTemplate.customLineItems.serviceProperties.endDate',\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 migrationOptions: {\n optInTransformResponse: true,\n },\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 path: 'checkoutTemplate.customLineItems.serviceProperties.endDate',\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 path: 'checkoutTemplate.customLineItems.serviceProperties.endDate',\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 migrationOptions: {\n optInTransformResponse: true,\n },\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 path: 'checkoutTemplate.customLineItems.serviceProperties.endDate',\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 migrationOptions: {\n optInTransformResponse: true,\n },\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 migrationOptions: {\n optInTransformResponse: true,\n },\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 path: 'checkoutTemplates.customLineItems.serviceProperties.endDate',\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 method, you must have a checkout template available. Create a checkout template with Create Checkout Template.\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 migrationOptions: {\n optInTransformResponse: true,\n },\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 method, you must have a checkout template available. Create a checkout template with Create Checkout Template.\n *\n * To build a URL that uses this method, 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 Create Checkout From Template.\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 migrationOptions: {\n optInTransformResponse: true,\n },\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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qCAAAA;AAAA,EAAA,kCAAAC;AAAA,EAAA,8BAAAC;AAAA,EAAA,8BAAAC;AAAA,EAAA,2BAAAC;AAAA,EAAA,8BAAAC;AAAA,EAAA;AAAA,gCAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,2BAA6B;AAC7B,oCAGO;;;ACLP,0BAAkC;AAClC,mBAA6C;AAC7C,IAAAC,gBAA6C;AAC7C,mBAA6C;AAC7C,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,wBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,8DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,aAAO,iCAAW,OAAO,OAAO,MAAM,EAAE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ectToCheckout","createCheckoutFromTemplate","createCheckoutTemplate","deleteCheckoutTemplate","getCheckoutTemplate","queryCheckoutTemplates","updateCheckoutTemplate","import_float","import_timestamp","import_rest_modules","payload","import_image","import_page_url_v2","import_transform_paths","Status","DescriptionLineType","PaymentOptionType","ItemTypePreset","SubscriptionFrequency","FileType","TaxableAddressType","JurisdictionType","ItemAvailabilityStatus","PlatformFeeChargeType","VatType","PickupMethod","ChargeType","RuleType","DiscountType","WeightUnit","RateType","ManualCalculationReason","FallbackReason","ChannelType","BalanceType","AdditionalFeeSource","Severity","NameInOther","NameInLineItem","SuggestedFix","SortOrder","WebhookIdentityType","createCheckoutTemplate","sdkTransformError","getCheckoutTemplate","updateCheckoutTemplate","deleteCheckoutTemplate","queryCheckoutTemplates","createCheckoutFromTemplate","createAndRedirectToCheckout"]}