@wix/auto_sdk_ecom_totals-calculator 1.0.77 → 1.0.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1 -1
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +1 -1
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +1 -1
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +1 -1
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +1 -1
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +1 -1
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +1 -1
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +1 -1
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts","../../src/ecom-v1-totals-calculation-totals-calculator.universal.ts","../../src/ecom-v1-totals-calculation-totals-calculator.http.ts","../../src/ecom-v1-totals-calculation-totals-calculator.public.ts","../../src/ecom-v1-totals-calculation-totals-calculator.context.ts"],"sourcesContent":["export * from './src/ecom-v1-totals-calculation-totals-calculator.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixEcomV1TotalsCalculation from './ecom-v1-totals-calculation-totals-calculator.http.js';\nimport { transformSDKAddressToRESTAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformRESTAddressToSDKAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\nexport interface TotalsCalculationEntity {}\n\nexport interface CalculateTotalsRequest\n extends CalculateTotalsRequestCouponOneOf,\n CalculateTotalsRequestGiftCardOneOf {\n /** Coupon ID. */\n couponId?: string | null;\n /** Coupon code. */\n couponCode?: string | null;\n /**\n * Gift card ID.\n * @format GUID\n * @deprecated Gift card ID.\n * @targetRemovalDate 2025-12-31\n */\n giftCardId?: string | null;\n /** Gift card code. */\n giftCardCode?: string | null;\n /**\n * Calculation ID. An identifier of the entity that you are calculating totals for, for example, cart ID or checkout ID.\n * This value will be used in order to optimise calculations by caching.\n * If not passed, calculation might be slower in some cases.\n * @minLength 1\n * @maxLength 100\n */\n calculationId?: string | null;\n /**\n * Line items for calculation.\n * @maxSize 300\n */\n lineItems?: LineItem[];\n /** Shipping address for tax and shipping calculation (if applicable). */\n shippingAddress?: Address;\n /** Billing address. Used for calculating tax if all the items in the cart are not shippable. */\n billingAddress?: Address;\n /** Details about selected shipping option. */\n selectedShippingOption?: SelectedShippingOption;\n /**\n * Buyer email. Used to enforce coupon [single-use per customer](https://support.wix.com/en/article/wix-stores-limiting-coupon-usage). If not passed, single coupon usage per customer will not be enforced.\n * @format EMAIL\n */\n buyerEmail?: string | null;\n /**\n * Member id to use for this calculation\n * When not provided, given that the caller is a member, its member id will be used\n * Providing this require elevated permissions - ECOM.ADMIN_CALCULATE_TOTALS\n */\n memberId?: string | null;\n /**\n * The selected memberships and which line items they apply to\n * When not provided, default selection will be returned\n * You can also set it to empty selection\n */\n selectedMemberships?: SelectedMemberships;\n /** Buyer phone number. Used to get shipping rates. */\n buyerPhone?: string | null;\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 * 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 * @maxSize 20\n */\n externalReferences?: ExternalReference[];\n /**\n * The business location ID to be used as the basis for some calculations.\n * Learn more about the [Locations API](https://dev.wix.com/docs/rest/business-management/locations/introduction).\n * @format GUID\n */\n businessLocationId?: string | null;\n /**\n * Amount to redeem from the gift card referenced in `gift_card_code`.\n * @decimalValue options { gte:0, lte:1000000000000000, maxScale:3 }\n */\n giftCardRedeemAmount?: string | null;\n /**\n * Buyer contact ID.\n * @internal\n * @format GUID\n */\n contactId?: string | null;\n /** [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields). */\n extendedFields?: ExtendedFields;\n /**\n * Exempt group to use for tax calculations.\n * @internal\n * @format GUID\n */\n taxExemptGroupId?: string | null;\n}\n\n/** @oneof */\nexport interface CalculateTotalsRequestCouponOneOf {\n /** Coupon ID. */\n couponId?: string | null;\n /** Coupon code. */\n couponCode?: string | null;\n}\n\n/** @oneof */\nexport interface CalculateTotalsRequestGiftCardOneOf {\n /**\n * Gift card ID.\n * @format GUID\n * @deprecated Gift card ID.\n * @targetRemovalDate 2025-12-31\n */\n giftCardId?: string | null;\n /** Gift card code. */\n giftCardCode?: string | null;\n}\n\nexport interface LineItem {\n /**\n * Line item ID.\n * @minLength 1\n * @maxLength 100\n */\n _id?: string;\n /**\n * Quantity.\n * @max 100000\n */\n quantity?: number | null;\n /**\n * Optional references to the line item's origin catalog.\n * See [Catalog SPI](https://bo.wix.com/wix-docs/rest/ecommerce/catalog-spi/introduction) for more details.\n * This field may be empty in the case of a custom line item.\n * currently we only use the catalog app id to set tax=0 for specific apps.\n */\n catalogReference?: CatalogReference;\n /**\n * Product/booking/event name.\n * @maxLength 200\n */\n productName?: string | null;\n /**\n * Catalog price.\n * @decimalValue options { gte:0 }\n */\n price?: string;\n /** Physical properties (if applicable). */\n physicalProperties?: PhysicalProperties;\n /** Subscription settings. */\n subscriptionSettings?: SubscriptionSettings;\n /**\n * Type of selected payment option for current item.\n *\n * Default: `FULL_PAYMENT_ONLINE`\n */\n paymentOption?: PaymentOptionTypeWithLiterals;\n /** Service properties. When relevant, this contains information such as date and number of participants. */\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 */\n rootCatalogItemId?: string | null;\n /**\n * Optional - partial amount of item's price to be paid now for checkout cases with DEPOSIT_ONLINE payment option\n * If omitted - item's price will not be split and is expected to be paid in single installment\n * @format DECIMAL_VALUE\n */\n depositAmount?: string | null;\n /**\n * full price of the item before all the discounts\n * @format DECIMAL_VALUE\n */\n fullPrice?: string | null;\n /**\n * The Item's Delivery Profile Id\n * @format GUID\n */\n deliveryProfileId?: string | null;\n /** Item type. Either a preset type or custom. */\n itemType?: ItemType;\n /** Address to use for tax calculation purposes. */\n taxableAddress?: TaxableAddress;\n /**\n * Additional Fees to be added to used for calculation.\n * @readonly\n * @maxSize 5\n */\n additionalFees?: ApiV1AdditionalFee[];\n /**\n * Modifier groups that were added to the item.\n * @maxSize 25\n */\n modifierGroups?: ModifierGroup[];\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 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 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 SubscriptionSettings {\n /** Frequency of recurring payment. Every day/week/month/year. */\n frequency?: SubscriptionFrequencyWithLiterals;\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\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 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 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 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 ApiV1AdditionalFee {\n /**\n * Additional fee's unique code or ID.\n * @minLength 1\n * @maxLength 100\n */\n code?: string | null;\n /**\n * Additional fee's name.\n *\n * Max: 50 characters\n * @minLength 1\n * @maxLength 50\n */\n name?: string;\n /**\n * Total additional fees. This `price` does not include any taxes that may apply to these additional fees.\n * @decimalValue options { gte:0, lte:1000000000000000, maxScale:2 }\n */\n price?: string;\n /**\n * Tax details.\n *\n * > **Note:** Tax is not calculated in the returned `price` even when `taxDetails.taxable` is `true`.\n */\n taxDetails?: V1TaxDetails;\n /**\n * Number of subscription cycle this fee applies to\n * default None - all billing cycle\n * @internal\n * @min 1\n * @max 999\n */\n subscriptionCycles?: number | null;\n}\n\n/** Tax details. */\nexport interface V1TaxDetails {\n /** Whether additional fee is taxable. */\n taxable?: boolean;\n /**\n * Reserved for internal use.\n * @format GUID\n */\n taxGroupId?: string | null;\n}\n\nexport interface ModifierGroup {\n /**\n * Modifier group ID.\n * @minLength 1\n * @maxLength 36\n */\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 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 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 /**\n * The price of the modifier.\n * @decimalValue options { gte:0, lte:1000000000000000, maxScale:3 }\n */\n price?: string | null;\n}\n\nexport interface PlatformFee {\n /** 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 percentage expressed as a decimal fraction between 0 and 1. For example, `0.05` for 5%.\n * @format DECIMAL_VALUE\n * @decimalValue options { gt: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/** Physical address */\nexport interface Address {\n /**\n * Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.\n * @format COUNTRY\n */\n country?: string | null;\n /**\n * Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format.\n * @maxLength 50\n */\n subdivision?: string | null;\n /**\n * City name.\n * @maxLength 50\n */\n city?: string | null;\n /**\n * Postal or zip code.\n * @maxLength 50\n */\n postalCode?: string | null;\n /** Street address. */\n streetAddress?: StreetAddress;\n /**\n * Main address line (usually street name and number).\n * @maxLength 150\n */\n addressLine1?: string | null;\n /**\n * Free text providing more detailed address info. Usually contains apt, suite, floor.\n * @maxLength 100\n */\n addressLine2?: string | null;\n /** Geocode object containing latitude and longitude coordinates. */\n location?: AddressLocation;\n /**\n * Country's full name.\n * @readonly\n */\n countryFullname?: string | null;\n /**\n * Subdivision full-name.\n * @readonly\n */\n subdivisionFullname?: string | null;\n}\n\nexport interface StreetAddress {\n /** Street number. */\n number?: string;\n /** Street name. */\n name?: string;\n}\n\nexport interface AddressLocation {\n /** Address latitude. */\n latitude?: number | null;\n /** Address longitude. */\n longitude?: number | null;\n}\n\nexport interface SelectedShippingOption {\n /**\n * Carrier ID.\n * @format GUID\n */\n carrierId?: string | null;\n /**\n * Selected shipping option code. For example, \"usps_std_overnight\".\n * @minLength 1\n * @maxLength 100\n */\n code?: 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 CarrierShippingOption {\n /**\n * This carrier's unique ID\n * @format GUID\n */\n carrierId?: string | null;\n /** Shipping service 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 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 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 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 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 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 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 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 * Name of the additional fee. For example, \"Gift wrapping\".\n * @minLength 1\n * @maxLength 50\n */\n name?: string;\n /**\n * Additional fee's price\n * @decimalValue options { gte:0, lte:1000000000000000 }\n */\n price?: string;\n /**\n * Currency\n * @format CURRENCY\n */\n currency?: string;\n /** Tax details */\n taxDetails?: TaxDetails;\n /**\n * Provider's app id\n * @minLength 1\n * @maxLength 100\n */\n providerAppId?: string | null;\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 /**\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\n/** Tax Details. */\nexport interface TaxDetails {\n /** Indication if additional fee is taxable or not */\n taxable?: boolean;\n /**\n * Optional tax group ID to use when calculating tax for this additional fee\n * @format GUID\n */\n taxGroupId?: string | null;\n}\n\nexport enum DataFetchType {\n SHIPPING = 'SHIPPING',\n DISCOUNT = 'DISCOUNT',\n ADDITIONAL_FEES = 'ADDITIONAL_FEES',\n ORDER_VALIDATION = 'ORDER_VALIDATION',\n}\n\n/** @enumType */\nexport type DataFetchTypeWithLiterals =\n | DataFetchType\n | 'SHIPPING'\n | 'DISCOUNT'\n | 'ADDITIONAL_FEES'\n | 'ORDER_VALIDATION';\n\nexport interface ExternalReference {\n /**\n * ID of the app associated with the purchase flow.\n * For example, the Wix Pay Links app ID.\n * @format GUID\n * @immutable\n */\n appId?: string;\n /**\n * Reference to an external resource ID. Used to link the purchase flow to a specific entity in an external system.\n * For example, a Wix Pay Link ID.\n * @minLength 1\n * @maxLength 100\n * @immutable\n */\n resourceId?: string | null;\n}\n\nexport interface 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 CalculateTotalsResponse {\n /** Calculate line items. */\n calculatedLineItems?: CalculatedLineItem[];\n /** Price summary. */\n priceSummary?: PriceSummary;\n /** Details of applied gift card. */\n giftCard?: GiftCard;\n /** Tax summary. */\n taxSummary?: TaxSummary;\n /** Shipping information. */\n shippingInfo?: ShippingInformation;\n /**\n * Applied discounts.\n * @maxSize 320\n */\n appliedDiscounts?: AppliedDiscount[];\n /** Calculation errors. */\n calculationErrors?: CalculationErrors;\n /** Weight unit. */\n weightUnit?: WeightUnitWithLiterals;\n /**\n * The business’s default currency. Used for price calculations.\n * This represents the base currency configured for the site and remains constant regardless of the [customer’s currency selection](https://support.wix.com/en/article/multicurrency-an-overview).\n * @format CURRENCY\n */\n currency?: string;\n /**\n * The currency [selected by the customer](https://support.wix.com/en/article/multicurrency-an-overview). Used for converted price calculations.\n * This reflects the customer’s preferred currency and may differ from the site’s default currency.\n * @readonly\n * @format CURRENCY\n */\n conversionCurrency?: string;\n /** Whether tax is included in price. */\n taxIncludedInPrice?: boolean;\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 /** Information about valid and invalid memberships, and which ones are selected for usage. */\n membershipOptions?: MembershipOptions;\n /**\n * Additional Fees\n * @maxSize 100\n */\n additionalFees?: V1AdditionalFee[];\n /**\n * The site currency.\n * @readonly\n * @format CURRENCY\n * @deprecated The site currency.\n * @replacedBy currency\n * @targetRemovalDate 2026-01-30\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 checkoutConversionRate?: string | null;\n /**\n * The pay now total amount after the gift card is applied.\n * @readonly\n */\n payNowTotalAfterGiftCard?: MultiCurrencyPrice;\n /**\n * The total amount after gift card is applied.\n * @readonly\n */\n totalAfterGiftCard?: MultiCurrencyPrice;\n /**\n * Payment for subscriptions after free trial period.\n * @readonly\n */\n payAfterFreeTrial?: PriceSummary;\n}\n\nexport interface CalculatedLineItem {\n /** Line item ID. */\n lineItemId?: string;\n /** Price breakdown for this line item. */\n pricesBreakdown?: LineItemPricesData;\n /**\n * Type of selected payment option for current item. Supported values:\n * + `\"FULL_PAYMENT_ONLINE\"` - The entire payment for this item will happen as part of the checkout\n * + `\"FULL_PAYMENT_OFFLINE\"` - The entire payment for this item will happen after the checkout\n * + `\"MEMBERSHIP\"` - This item cannot be paid via monetary payment options, only via non monetary option such membership. When this option is used, price must be set to 0\n * + `\"DEPOSIT_ONLINE\"` - Partial payment of the given item will happen as part of the checkout. Amount to be paid is defined by deposit_amount field.\n */\n paymentOption?: PaymentOptionTypeWithLiterals;\n /** tax calculation address. */\n taxableAddress?: TaxableAddress;\n /**\n * Calculated modifiers.\n * @internal\n * @maxSize 625\n */\n modifiers?: CalculatedItemModifier[];\n}\n\nexport interface LineItemPricesData {\n /** Total price after discounts, tax, and modifiers. */\n totalPriceAfterTax?: MultiCurrencyPrice;\n /** Total price after discounts and modifiers, and before tax. */\n totalPriceBeforeTax?: MultiCurrencyPrice;\n /** Tax details. */\n taxDetails?: ItemTaxFullDetails;\n /** Total discount applied for the line item. */\n totalDiscount?: MultiCurrencyPrice;\n /** Catalog price after catalog-defined discount, automatic discounts, and modifiers. */\n price?: MultiCurrencyPrice;\n /**\n * Item price before automatic discounts, coupons, and global discounts; after catalog-defined discounts and modifiers.\n * Defaults to `price` when not provided.\n */\n priceBeforeDiscounts?: MultiCurrencyPrice;\n /** Total line item price after catalog-defined discounts, automatic discounts, and modifiers. */\n lineItemPrice?: MultiCurrencyPrice;\n /**\n * Item price before all discounts and modifiers.\n * Defaults to `price` when not provided.\n */\n fullPrice?: MultiCurrencyPrice;\n /**\n * Total price of all item modifiers.\n * @internal\n */\n modifiers?: MultiCurrencyPrice;\n /**\n * Item price before tax, automatic discounts, coupons, and global discounts; after catalog-defined discounts and modifiers.\n * @internal\n */\n priceBeforeDiscountsAndTax?: MultiCurrencyPrice;\n /**\n * Partial payment to be paid upfront during the checkout.\n * Applies to catalog items with `lineItem.paymentOption` type `DEPOSIT_ONLINE` only.\n */\n depositAmount?: MultiCurrencyPrice;\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 CalculatedItemModifier {\n /**\n * Modifier ID.\n * @minLength 1\n * @maxLength 36\n */\n _id?: string;\n /**\n * ID of the group this modifier belongs to.\n * @minLength 1\n * @maxLength 36\n */\n groupId?: string;\n /**\n * Modifier price.\n * @readonly\n */\n price?: MultiCurrencyPrice;\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 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 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\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 * 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 interface ShippingInformation {\n /** Shipping region. */\n region?: ShippingRegion;\n /** Selected shipping option. */\n selectedCarrierServiceOption?: SelectedCarrierServiceOption;\n /** All shipping options. */\n carrierServiceOptions?: CarrierServiceOption[];\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 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 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 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 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\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 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 MembershipOptions {\n /**\n * List of payment options that can be used.\n * @maxSize 300\n */\n eligibleMemberships?: Membership[];\n /**\n * List of payment options that are owned by the member, but cannot be used due to reason provided.\n * @maxSize 300\n */\n invalidMemberships?: InvalidMembership[];\n /**\n * The selected membership payment options and which line items they apply to.\n * @maxSize 300\n */\n selectedMemberships?: SelectedMembership[];\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 V1AdditionalFee {\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 PlatformFeeSummary {\n /** Total platform fee amount. */\n total?: MultiCurrencyPrice;\n /** Total platform fee passed on to the customer. */\n totalPassOn?: MultiCurrencyPrice;\n /** Total platform fee absorbed by the merchant. */\n totalAbsorbed?: MultiCurrencyPrice;\n /**\n * Calculated platform fees.\n * @maxSize 100\n */\n calculatedPlatformFees?: CalculatedPlatformFee[];\n}\n\nexport interface CalculatedPlatformFee {\n /** Platform fee name. */\n name?: TranslatableString;\n /** Platform fee amount. */\n amount?: MultiCurrencyPrice;\n /**\n * ID of the line item the platform fee applies to.\n * @format GUID\n */\n lineItemId?: string;\n /** Platform fee charge type. */\n chargeType?: PlatformFeeChargeTypeWithLiterals;\n /**\n * Percentage rate charged as platform fee.\n * The fee rate percentage expressed as a decimal fraction between 0 and 1. For example, `0.05` for 5%.\n * @format DECIMAL_VALUE\n * @decimalValue options { gt:0, lte:1, maxScale:4 }\n */\n percentageRate?: string;\n}\n\n/**\n * Returns a totals calculation for specified line items.\n * @public\n * @documentationMaturity preview\n * @requiredField options.lineItems._id\n * @requiredField options.lineItems.price\n * @requiredField options.lineItems.quantity\n * @requiredField options.selectedMemberships.memberships._id\n * @requiredField options.selectedMemberships.memberships.appId\n * @requiredField options.selectedMemberships.memberships.lineItemIds\n * @requiredField options.selectedShippingOption.code\n * @permissionId ECOM.CALCULATE_TOTALS\n * @applicableIdentity APP\n * @fqn com.wix.ecom.totals_calculator.v1.TotalsCalculator.CalculateTotals\n */\nexport async function calculateTotals(\n options?: NonNullablePaths<\n CalculateTotalsOptions,\n | `lineItems.${number}._id`\n | `lineItems.${number}.price`\n | `lineItems.${number}.quantity`\n | `selectedMemberships.memberships.${number}._id`\n | `selectedMemberships.memberships.${number}.appId`\n | `selectedMemberships.memberships.${number}.lineItemIds`\n | `selectedShippingOption.code`,\n 5\n >\n): Promise<\n NonNullablePaths<\n CalculateTotalsResponse,\n | `calculatedLineItems`\n | `calculatedLineItems.${number}.lineItemId`\n | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.amount`\n | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.convertedAmount`\n | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.formattedAmount`\n | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.formattedConvertedAmount`\n | `calculatedLineItems.${number}.pricesBreakdown.taxDetails.taxRate`\n | `calculatedLineItems.${number}.paymentOption`\n | `calculatedLineItems.${number}.taxableAddress.addressType`\n | `priceSummary.subtotal.amount`\n | `priceSummary.subtotal.convertedAmount`\n | `priceSummary.subtotal.formattedAmount`\n | `priceSummary.subtotal.formattedConvertedAmount`\n | `giftCard._id`\n | `giftCard.obfuscatedCode`\n | `giftCard.amount.amount`\n | `giftCard.amount.convertedAmount`\n | `giftCard.amount.formattedAmount`\n | `giftCard.amount.formattedConvertedAmount`\n | `giftCard.appId`\n | `taxSummary.taxableAmount.amount`\n | `taxSummary.taxableAmount.convertedAmount`\n | `taxSummary.taxableAmount.formattedAmount`\n | `taxSummary.taxableAmount.formattedConvertedAmount`\n | `taxSummary.calculationDetails.manualRateReason`\n | `taxSummary.calculationDetails.autoTaxFallbackDetails.fallbackReason`\n | `taxSummary.calculationDetails.autoTaxFallbackDetails.error.code`\n | `taxSummary.calculationDetails.autoTaxFallbackDetails.error.description`\n | `taxSummary.calculationDetails.rateType`\n | `shippingInfo.region._id`\n | `shippingInfo.region.name`\n | `shippingInfo.selectedCarrierServiceOption.code`\n | `shippingInfo.selectedCarrierServiceOption.title`\n | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.streetAddress.number`\n | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.streetAddress.name`\n | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.businessLocation`\n | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.pickupMethod`\n | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.amount`\n | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.convertedAmount`\n | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.formattedAmount`\n | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.formattedConvertedAmount`\n | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.taxRate`\n | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown`\n | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown.${number}.name`\n | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown.${number}.rate`\n | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.taxBreakdown`\n | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.taxBreakdown.${number}.jurisdictionType`\n | `shippingInfo.selectedCarrierServiceOption.requestedShippingOption`\n | `shippingInfo.selectedCarrierServiceOption.otherCharges`\n | `shippingInfo.selectedCarrierServiceOption.otherCharges.${number}.type`\n | `shippingInfo.selectedCarrierServiceOption.deliveryAllocations`\n | `shippingInfo.selectedCarrierServiceOption.deliveryAllocations.${number}.deliveryCarrier.code`\n | `shippingInfo.carrierServiceOptions`\n | `shippingInfo.carrierServiceOptions.${number}.carrierId`\n | `appliedDiscounts`\n | `appliedDiscounts.${number}.coupon._id`\n | `appliedDiscounts.${number}.coupon.code`\n | `appliedDiscounts.${number}.coupon.amount.amount`\n | `appliedDiscounts.${number}.coupon.amount.convertedAmount`\n | `appliedDiscounts.${number}.coupon.amount.formattedAmount`\n | `appliedDiscounts.${number}.coupon.amount.formattedConvertedAmount`\n | `appliedDiscounts.${number}.coupon.name`\n | `appliedDiscounts.${number}.discountRule._id`\n | `appliedDiscounts.${number}.discountRule.name.original`\n | `appliedDiscounts.${number}.discountType`\n | `calculationErrors.generalShippingCalculationError.applicationError.code`\n | `calculationErrors.generalShippingCalculationError.applicationError.description`\n | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations`\n | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field`\n | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description`\n | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule`\n | `calculationErrors.carrierErrors.errors`\n | `calculationErrors.carrierErrors.errors.${number}.carrierId`\n | `calculationErrors.orderValidationErrors`\n | `weightUnit`\n | `currency`\n | `conversionCurrency`\n | `taxIncludedInPrice`\n | `payNow.subtotal.amount`\n | `payNow.subtotal.convertedAmount`\n | `payNow.subtotal.formattedAmount`\n | `payNow.subtotal.formattedConvertedAmount`\n | `payLater.subtotal.amount`\n | `payLater.subtotal.convertedAmount`\n | `payLater.subtotal.formattedAmount`\n | `payLater.subtotal.formattedConvertedAmount`\n | `membershipOptions.eligibleMemberships`\n | `membershipOptions.eligibleMemberships.${number}._id`\n | `membershipOptions.eligibleMemberships.${number}.appId`\n | `membershipOptions.eligibleMemberships.${number}.name.original`\n | `membershipOptions.eligibleMemberships.${number}.credits.total`\n | `membershipOptions.eligibleMemberships.${number}.credits.remaining`\n | `membershipOptions.invalidMemberships`\n | `membershipOptions.invalidMemberships.${number}.reason`\n | `membershipOptions.selectedMemberships`\n | `membershipOptions.selectedMemberships.${number}._id`\n | `membershipOptions.selectedMemberships.${number}.appId`\n | `additionalFees`\n | `additionalFees.${number}.name`\n | `additionalFees.${number}.price.amount`\n | `additionalFees.${number}.price.convertedAmount`\n | `additionalFees.${number}.price.formattedAmount`\n | `additionalFees.${number}.price.formattedConvertedAmount`\n | `additionalFees.${number}.taxDetails.taxRate`\n | `additionalFees.${number}.source`\n | `siteCurrency`\n | `payNowTotalAfterGiftCard.amount`\n | `payNowTotalAfterGiftCard.convertedAmount`\n | `payNowTotalAfterGiftCard.formattedAmount`\n | `payNowTotalAfterGiftCard.formattedConvertedAmount`\n | `totalAfterGiftCard.amount`\n | `totalAfterGiftCard.convertedAmount`\n | `totalAfterGiftCard.formattedAmount`\n | `totalAfterGiftCard.formattedConvertedAmount`\n | `payAfterFreeTrial.subtotal.amount`\n | `payAfterFreeTrial.subtotal.convertedAmount`\n | `payAfterFreeTrial.subtotal.formattedAmount`\n | `payAfterFreeTrial.subtotal.formattedConvertedAmount`,\n 8\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 calculationId: options?.calculationId,\n lineItems: options?.lineItems,\n shippingAddress: options?.shippingAddress,\n billingAddress: options?.billingAddress,\n selectedShippingOption: options?.selectedShippingOption,\n couponId: options?.couponId,\n couponCode: options?.couponCode,\n giftCardId: options?.giftCardId,\n giftCardCode: options?.giftCardCode,\n buyerEmail: options?.buyerEmail,\n memberId: options?.memberId,\n selectedMemberships: options?.selectedMemberships,\n buyerPhone: options?.buyerPhone,\n purchaseFlowId: options?.purchaseFlowId,\n externalReferences: options?.externalReferences,\n businessLocationId: options?.businessLocationId,\n giftCardRedeemAmount: options?.giftCardRedeemAmount,\n contactId: options?.contactId,\n extendedFields: options?.extendedFields,\n taxExemptGroupId: options?.taxExemptGroupId,\n }),\n [\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: [\n { path: 'shippingAddress' },\n { path: 'billingAddress' },\n {\n path: 'shippingOptions.shippingOptions.logistics.pickupDetails.address',\n },\n ],\n },\n ]\n );\n\n const reqOpts = ambassadorWixEcomV1TotalsCalculation.calculateTotals(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: transformRESTAddressToSDKAddress,\n paths: [\n {\n path: 'shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address',\n },\n {\n path: 'shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address',\n },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n calculationId: '$[0].calculationId',\n lineItems: '$[0].lineItems',\n shippingAddress: '$[0].shippingAddress',\n billingAddress: '$[0].billingAddress',\n selectedShippingOption: '$[0].selectedShippingOption',\n couponId: '$[0].couponId',\n couponCode: '$[0].couponCode',\n giftCardId: '$[0].giftCardId',\n giftCardCode: '$[0].giftCardCode',\n buyerEmail: '$[0].buyerEmail',\n memberId: '$[0].memberId',\n selectedMemberships: '$[0].selectedMemberships',\n buyerPhone: '$[0].buyerPhone',\n purchaseFlowId: '$[0].purchaseFlowId',\n externalReferences: '$[0].externalReferences',\n businessLocationId: '$[0].businessLocationId',\n giftCardRedeemAmount: '$[0].giftCardRedeemAmount',\n contactId: '$[0].contactId',\n extendedFields: '$[0].extendedFields',\n taxExemptGroupId: '$[0].taxExemptGroupId',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CalculateTotalsOptions\n extends CalculateTotalsOptionsCouponOneOf,\n CalculateTotalsOptionsGiftCardOneOf {\n /**\n * Calculation ID. An identifier of the entity that you are calculating totals for, for example, cart ID or checkout ID.\n * This value will be used in order to optimise calculations by caching.\n * If not passed, calculation might be slower in some cases.\n * @minLength 1\n * @maxLength 100\n */\n calculationId?: string | null;\n /**\n * Line items for calculation.\n * @maxSize 300\n */\n lineItems?: LineItem[];\n /** Shipping address for tax and shipping calculation (if applicable). */\n shippingAddress?: Address;\n /** Billing address. Used for calculating tax if all the items in the cart are not shippable. */\n billingAddress?: Address;\n /** Details about selected shipping option. */\n selectedShippingOption?: SelectedShippingOption;\n /** Coupon ID. */\n couponId?: string | null;\n /** Coupon code. */\n couponCode?: string | null;\n /**\n * Gift card ID.\n * @format GUID\n * @deprecated Gift card ID.\n * @targetRemovalDate 2025-12-31\n */\n giftCardId?: string | null;\n /** Gift card code. */\n giftCardCode?: string | null;\n /**\n * Buyer email. Used to enforce coupon [single-use per customer](https://support.wix.com/en/article/wix-stores-limiting-coupon-usage). If not passed, single coupon usage per customer will not be enforced.\n * @format EMAIL\n */\n buyerEmail?: string | null;\n /**\n * Member id to use for this calculation\n * When not provided, given that the caller is a member, its member id will be used\n * Providing this require elevated permissions - ECOM.ADMIN_CALCULATE_TOTALS\n */\n memberId?: string | null;\n /**\n * The selected memberships and which line items they apply to\n * When not provided, default selection will be returned\n * You can also set it to empty selection\n */\n selectedMemberships?: SelectedMemberships;\n /** Buyer phone number. Used to get shipping rates. */\n buyerPhone?: string | null;\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 * 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 * @maxSize 20\n */\n externalReferences?: ExternalReference[];\n /**\n * The business location ID to be used as the basis for some calculations.\n * Learn more about the [Locations API](https://dev.wix.com/docs/rest/business-management/locations/introduction).\n * @format GUID\n */\n businessLocationId?: string | null;\n /**\n * Amount to redeem from the gift card referenced in `gift_card_code`.\n * @decimalValue options { gte:0, lte:1000000000000000, maxScale:3 }\n */\n giftCardRedeemAmount?: string | null;\n /**\n * Buyer contact ID.\n * @internal\n * @format GUID\n */\n contactId?: string | null;\n /** [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields). */\n extendedFields?: ExtendedFields;\n /**\n * Exempt group to use for tax calculations.\n * @internal\n * @format GUID\n */\n taxExemptGroupId?: string | null;\n}\n\n/** @oneof */\nexport interface CalculateTotalsOptionsCouponOneOf {\n /** Coupon ID. */\n couponId?: string | null;\n /** Coupon code. */\n couponCode?: string | null;\n}\n\n/** @oneof */\nexport interface CalculateTotalsOptionsGiftCardOneOf {\n /**\n * Gift card ID.\n * @format GUID\n * @deprecated Gift card ID.\n * @targetRemovalDate 2025-12-31\n */\n giftCardId?: string | null;\n /** Gift card code. */\n giftCardCode?: string | null;\n}\n","import { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { 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 resolveComWixEcomTotalsCalculatorV1TotalsCalculatorUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'bo._base_domain_': [\n {\n srcPath: '/totals-calculator',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/totals-calculator',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/totals-calculator',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/ecom/v1/calculate-totals',\n destPath: '/v1/calculate-totals',\n },\n ],\n _: [\n {\n srcPath: '/_api/totals-calculator',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/totals-calculator',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_ecom_totals-calculator';\n\n/** Returns a totals calculation for specified line items. */\nexport function calculateTotals(payload: object): RequestOptionsFactory<any> {\n function __calculateTotals({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'lineItems.physicalProperties.weight' },\n { path: 'shippingAddress.geocode.latitude' },\n { path: 'shippingAddress.geocode.longitude' },\n { path: 'billingAddress.geocode.latitude' },\n { path: 'billingAddress.geocode.longitude' },\n {\n path: 'shippingOptions.shippingOptions.logistics.pickupDetails.address.geocode.latitude',\n },\n {\n path: 'shippingOptions.shippingOptions.logistics.pickupDetails.address.geocode.longitude',\n },\n { path: 'appliedDiscounts.merchantDiscount.percentage' },\n ],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'lineItems.serviceProperties.scheduledDate' },\n { path: 'lineItems.serviceProperties.endDate' },\n {\n path: 'shippingOptions.shippingOptions.logistics.deliveryTimeSlot.from',\n },\n {\n path: 'shippingOptions.shippingOptions.logistics.deliveryTimeSlot.to',\n },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.ecom.v1.totals_calculation',\n method: 'POST' as any,\n methodFqn:\n 'com.wix.ecom.totals_calculator.v1.TotalsCalculator.CalculateTotals',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixEcomTotalsCalculatorV1TotalsCalculatorUrl({\n protoPath: '/v1/calculate-totals',\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: 'shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.latitude',\n },\n {\n path: 'shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.longitude',\n },\n {\n path: 'shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.latitude',\n },\n {\n path: 'shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.longitude',\n },\n { path: 'appliedDiscounts.merchantDiscount.percentage' },\n ],\n },\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n {\n path: 'shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.from',\n },\n {\n path: 'shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.to',\n },\n {\n path: 'shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.from',\n },\n {\n path: 'shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.to',\n },\n { path: 'membershipOptions.eligibleMemberships.expirationDate' },\n {\n path: 'membershipOptions.invalidMemberships.membership.expirationDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __calculateTotals;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n CalculateTotalsOptions,\n CalculateTotalsResponse,\n calculateTotals as universalCalculateTotals,\n} from './ecom-v1-totals-calculation-totals-calculator.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/ecom' };\n\nexport function calculateTotals(\n httpClient: HttpClient\n): CalculateTotalsSignature {\n return (\n options?: NonNullablePaths<\n CalculateTotalsOptions,\n | `lineItems.${number}._id`\n | `lineItems.${number}.price`\n | `lineItems.${number}.quantity`\n | `selectedMemberships.memberships.${number}._id`\n | `selectedMemberships.memberships.${number}.appId`\n | `selectedMemberships.memberships.${number}.lineItemIds`\n | `selectedShippingOption.code`,\n 5\n >\n ) =>\n universalCalculateTotals(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CalculateTotalsSignature {\n /**\n * Returns a totals calculation for specified line items.\n */\n (\n options?: NonNullablePaths<\n CalculateTotalsOptions,\n | `lineItems.${number}._id`\n | `lineItems.${number}.price`\n | `lineItems.${number}.quantity`\n | `selectedMemberships.memberships.${number}._id`\n | `selectedMemberships.memberships.${number}.appId`\n | `selectedMemberships.memberships.${number}.lineItemIds`\n | `selectedShippingOption.code`,\n 5\n >\n ): Promise<\n NonNullablePaths<\n CalculateTotalsResponse,\n | `calculatedLineItems`\n | `calculatedLineItems.${number}.lineItemId`\n | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.amount`\n | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.convertedAmount`\n | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.formattedAmount`\n | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.formattedConvertedAmount`\n | `calculatedLineItems.${number}.pricesBreakdown.taxDetails.taxRate`\n | `calculatedLineItems.${number}.paymentOption`\n | `calculatedLineItems.${number}.taxableAddress.addressType`\n | `priceSummary.subtotal.amount`\n | `priceSummary.subtotal.convertedAmount`\n | `priceSummary.subtotal.formattedAmount`\n | `priceSummary.subtotal.formattedConvertedAmount`\n | `giftCard._id`\n | `giftCard.obfuscatedCode`\n | `giftCard.amount.amount`\n | `giftCard.amount.convertedAmount`\n | `giftCard.amount.formattedAmount`\n | `giftCard.amount.formattedConvertedAmount`\n | `giftCard.appId`\n | `taxSummary.taxableAmount.amount`\n | `taxSummary.taxableAmount.convertedAmount`\n | `taxSummary.taxableAmount.formattedAmount`\n | `taxSummary.taxableAmount.formattedConvertedAmount`\n | `taxSummary.calculationDetails.manualRateReason`\n | `taxSummary.calculationDetails.autoTaxFallbackDetails.fallbackReason`\n | `taxSummary.calculationDetails.autoTaxFallbackDetails.error.code`\n | `taxSummary.calculationDetails.autoTaxFallbackDetails.error.description`\n | `taxSummary.calculationDetails.rateType`\n | `shippingInfo.region._id`\n | `shippingInfo.region.name`\n | `shippingInfo.selectedCarrierServiceOption.code`\n | `shippingInfo.selectedCarrierServiceOption.title`\n | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.streetAddress.number`\n | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.streetAddress.name`\n | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.businessLocation`\n | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.pickupMethod`\n | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.amount`\n | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.convertedAmount`\n | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.formattedAmount`\n | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.formattedConvertedAmount`\n | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.taxRate`\n | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown`\n | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown.${number}.name`\n | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown.${number}.rate`\n | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.taxBreakdown`\n | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.taxBreakdown.${number}.jurisdictionType`\n | `shippingInfo.selectedCarrierServiceOption.requestedShippingOption`\n | `shippingInfo.selectedCarrierServiceOption.otherCharges`\n | `shippingInfo.selectedCarrierServiceOption.otherCharges.${number}.type`\n | `shippingInfo.selectedCarrierServiceOption.deliveryAllocations`\n | `shippingInfo.selectedCarrierServiceOption.deliveryAllocations.${number}.deliveryCarrier.code`\n | `shippingInfo.carrierServiceOptions`\n | `shippingInfo.carrierServiceOptions.${number}.carrierId`\n | `appliedDiscounts`\n | `appliedDiscounts.${number}.coupon._id`\n | `appliedDiscounts.${number}.coupon.code`\n | `appliedDiscounts.${number}.coupon.amount.amount`\n | `appliedDiscounts.${number}.coupon.amount.convertedAmount`\n | `appliedDiscounts.${number}.coupon.amount.formattedAmount`\n | `appliedDiscounts.${number}.coupon.amount.formattedConvertedAmount`\n | `appliedDiscounts.${number}.coupon.name`\n | `appliedDiscounts.${number}.discountRule._id`\n | `appliedDiscounts.${number}.discountRule.name.original`\n | `appliedDiscounts.${number}.discountType`\n | `calculationErrors.generalShippingCalculationError.applicationError.code`\n | `calculationErrors.generalShippingCalculationError.applicationError.description`\n | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations`\n | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field`\n | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description`\n | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule`\n | `calculationErrors.carrierErrors.errors`\n | `calculationErrors.carrierErrors.errors.${number}.carrierId`\n | `calculationErrors.orderValidationErrors`\n | `weightUnit`\n | `currency`\n | `conversionCurrency`\n | `taxIncludedInPrice`\n | `payNow.subtotal.amount`\n | `payNow.subtotal.convertedAmount`\n | `payNow.subtotal.formattedAmount`\n | `payNow.subtotal.formattedConvertedAmount`\n | `payLater.subtotal.amount`\n | `payLater.subtotal.convertedAmount`\n | `payLater.subtotal.formattedAmount`\n | `payLater.subtotal.formattedConvertedAmount`\n | `membershipOptions.eligibleMemberships`\n | `membershipOptions.eligibleMemberships.${number}._id`\n | `membershipOptions.eligibleMemberships.${number}.appId`\n | `membershipOptions.eligibleMemberships.${number}.name.original`\n | `membershipOptions.eligibleMemberships.${number}.credits.total`\n | `membershipOptions.eligibleMemberships.${number}.credits.remaining`\n | `membershipOptions.invalidMemberships`\n | `membershipOptions.invalidMemberships.${number}.reason`\n | `membershipOptions.selectedMemberships`\n | `membershipOptions.selectedMemberships.${number}._id`\n | `membershipOptions.selectedMemberships.${number}.appId`\n | `additionalFees`\n | `additionalFees.${number}.name`\n | `additionalFees.${number}.price.amount`\n | `additionalFees.${number}.price.convertedAmount`\n | `additionalFees.${number}.price.formattedAmount`\n | `additionalFees.${number}.price.formattedConvertedAmount`\n | `additionalFees.${number}.taxDetails.taxRate`\n | `additionalFees.${number}.source`\n | `siteCurrency`\n | `payNowTotalAfterGiftCard.amount`\n | `payNowTotalAfterGiftCard.convertedAmount`\n | `payNowTotalAfterGiftCard.formattedAmount`\n | `payNowTotalAfterGiftCard.formattedConvertedAmount`\n | `totalAfterGiftCard.amount`\n | `totalAfterGiftCard.convertedAmount`\n | `totalAfterGiftCard.formattedAmount`\n | `totalAfterGiftCard.formattedConvertedAmount`\n | `payAfterFreeTrial.subtotal.amount`\n | `payAfterFreeTrial.subtotal.convertedAmount`\n | `payAfterFreeTrial.subtotal.formattedAmount`\n | `payAfterFreeTrial.subtotal.formattedConvertedAmount`,\n 8\n >\n >;\n}\n\nexport {\n AdditionalFee,\n AdditionalFeeSource,\n Address,\n AddressLocation,\n AggregatedTaxBreakdown,\n ApiV1AdditionalFee,\n ApplicableLineItems,\n ApplicationError,\n AppliedDiscount,\n AppliedDiscountDiscountSourceOneOf,\n AutoTaxFallbackCalculationDetails,\n BalanceType,\n CalculateTotalsOptions,\n CalculateTotalsOptionsCouponOneOf,\n CalculateTotalsOptionsGiftCardOneOf,\n CalculateTotalsRequest,\n CalculateTotalsRequestCouponOneOf,\n CalculateTotalsRequestGiftCardOneOf,\n CalculateTotalsResponse,\n CalculatedItemModifier,\n CalculatedLineItem,\n CalculatedPlatformFee,\n CalculationErrors,\n CalculationErrorsShippingCalculationErrorOneOf,\n Carrier,\n CarrierError,\n CarrierErrors,\n CarrierServiceOption,\n CarrierShippingOption,\n CatalogReference,\n ChargeType,\n Coupon,\n DataFetchType,\n DeliveryAllocation,\n DeliveryLogistics,\n DeliveryTimeSlot,\n Details,\n DetailsKindOneOf,\n DiscountRule,\n DiscountRuleName,\n DiscountType,\n ExtendedFields,\n ExternalReference,\n FallbackReason,\n FieldViolation,\n GiftCard,\n Group,\n InvalidMembership,\n ItemCombination,\n ItemCombinationLineItem,\n ItemModifier,\n ItemTaxFullDetails,\n ItemType,\n ItemTypeItemTypeDataOneOf,\n ItemTypePreset,\n JurisdictionType,\n LineItem,\n LineItemDiscount,\n LineItemPricesData,\n ManualCalculationReason,\n Membership,\n MembershipName,\n MembershipOptions,\n MembershipPaymentCredits,\n MerchantDiscount,\n ModifierGroup,\n MultiCurrencyPrice,\n OtherCharge,\n PaymentOptionType,\n PhysicalProperties,\n PickupDetails,\n PickupMethod,\n PlatformFee,\n PlatformFeeChargeType,\n PlatformFeeSummary,\n PriceSummary,\n RateType,\n Region,\n RuleType,\n Scope,\n SelectedCarrierServiceOption,\n SelectedCarrierServiceOptionOtherCharge,\n SelectedCarrierServiceOptionPrices,\n SelectedMembership,\n SelectedMemberships,\n SelectedShippingOption,\n ServiceProperties,\n ShippingInformation,\n ShippingOption,\n ShippingPrice,\n ShippingRegion,\n StreetAddress,\n SubscriptionFrequency,\n SubscriptionSettings,\n SystemError,\n TaxBreakdown,\n TaxCalculationDetails,\n TaxCalculationDetailsCalculationDetailsOneOf,\n TaxDetails,\n TaxRateBreakdown,\n TaxSummary,\n TaxableAddress,\n TaxableAddressTaxableAddressDataOneOf,\n TaxableAddressType,\n TotalsCalculationEntity,\n TranslatableString,\n V1AdditionalFee,\n V1TaxDetails,\n ValidationError,\n WeightUnit,\n} from './ecom-v1-totals-calculation-totals-calculator.universal.js';\n","import { calculateTotals as publicCalculateTotals } from './ecom-v1-totals-calculation-totals-calculator.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const calculateTotals: MaybeContext<\n BuildRESTFunction<typeof publicCalculateTotals> & typeof publicCalculateTotals\n> = /*#__PURE__*/ createRESTModule(publicCalculateTotals);\n\nexport {\n SubscriptionFrequency,\n PaymentOptionType,\n ItemTypePreset,\n TaxableAddressType,\n PlatformFeeChargeType,\n PickupMethod,\n ChargeType,\n DiscountType,\n DataFetchType,\n JurisdictionType,\n RateType,\n ManualCalculationReason,\n FallbackReason,\n RuleType,\n WeightUnit,\n BalanceType,\n AdditionalFeeSource,\n} from './ecom-v1-totals-calculation-totals-calculator.universal.js';\nexport {\n TotalsCalculationEntity,\n CalculateTotalsRequest,\n CalculateTotalsRequestCouponOneOf,\n CalculateTotalsRequestGiftCardOneOf,\n LineItem,\n CatalogReference,\n PhysicalProperties,\n Scope,\n Group,\n SubscriptionSettings,\n ServiceProperties,\n ItemType,\n ItemTypeItemTypeDataOneOf,\n TaxableAddress,\n TaxableAddressTaxableAddressDataOneOf,\n ApiV1AdditionalFee,\n V1TaxDetails,\n ModifierGroup,\n TranslatableString,\n ItemModifier,\n PlatformFee,\n Address,\n StreetAddress,\n AddressLocation,\n SelectedShippingOption,\n SelectedMemberships,\n SelectedMembership,\n CarrierShippingOption,\n ShippingOption,\n DeliveryLogistics,\n PickupDetails,\n DeliveryTimeSlot,\n ShippingPrice,\n MultiCurrencyPrice,\n OtherCharge,\n DeliveryAllocation,\n Carrier,\n Region,\n ApplicableLineItems,\n AppliedDiscount,\n AppliedDiscountDiscountSourceOneOf,\n Coupon,\n MerchantDiscount,\n DiscountRule,\n DiscountRuleName,\n LineItemDiscount,\n ItemCombination,\n ItemCombinationLineItem,\n AdditionalFee,\n TaxDetails,\n ExternalReference,\n ExtendedFields,\n CalculateTotalsResponse,\n CalculatedLineItem,\n LineItemPricesData,\n ItemTaxFullDetails,\n TaxRateBreakdown,\n TaxBreakdown,\n CalculatedItemModifier,\n PriceSummary,\n GiftCard,\n TaxSummary,\n TaxCalculationDetails,\n TaxCalculationDetailsCalculationDetailsOneOf,\n AutoTaxFallbackCalculationDetails,\n ApplicationError,\n AggregatedTaxBreakdown,\n ShippingInformation,\n ShippingRegion,\n SelectedCarrierServiceOption,\n SelectedCarrierServiceOptionPrices,\n SelectedCarrierServiceOptionOtherCharge,\n CarrierServiceOption,\n CalculationErrors,\n CalculationErrorsShippingCalculationErrorOneOf,\n Details,\n DetailsKindOneOf,\n ValidationError,\n FieldViolation,\n SystemError,\n CarrierErrors,\n CarrierError,\n MembershipOptions,\n Membership,\n MembershipName,\n MembershipPaymentCredits,\n InvalidMembership,\n V1AdditionalFee,\n PlatformFeeSummary,\n CalculatedPlatformFee,\n CalculateTotalsOptions,\n CalculateTotalsOptionsCouponOneOf,\n CalculateTotalsOptionsGiftCardOneOf,\n} from './ecom-v1-totals-calculation-totals-calculator.universal.js';\nexport {\n SubscriptionFrequencyWithLiterals,\n PaymentOptionTypeWithLiterals,\n ItemTypePresetWithLiterals,\n TaxableAddressTypeWithLiterals,\n PlatformFeeChargeTypeWithLiterals,\n PickupMethodWithLiterals,\n ChargeTypeWithLiterals,\n DiscountTypeWithLiterals,\n DataFetchTypeWithLiterals,\n JurisdictionTypeWithLiterals,\n RateTypeWithLiterals,\n ManualCalculationReasonWithLiterals,\n FallbackReasonWithLiterals,\n RuleTypeWithLiterals,\n WeightUnitWithLiterals,\n BalanceTypeWithLiterals,\n AdditionalFeeSourceWithLiterals,\n} from './ecom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B;AAAA,UAChB,oBAAoB;AAAA,UACpB,oBAAoB;AAAA,UACpB,sBAAsB;AAAA,UACtB,WAAW;AAAA,UACX,gBAAgB;AAAA,UAChB,kBAAkB;AAAA,QACpB;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AEzuEO,SAASC,iBACd,YAC0B;AAC1B,SAAO,CACL,YAYAA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;AC7BA,IAAAC,uBAAiC;AAG1B,IAAMC,mBAEK,2DAAiBA,gBAAqB;","names":["calculateTotals","import_float","import_timestamp","payload","import_address","import_transform_paths","SubscriptionFrequency","PaymentOptionType","ItemTypePreset","TaxableAddressType","PlatformFeeChargeType","PickupMethod","ChargeType","DiscountType","DataFetchType","JurisdictionType","RateType","ManualCalculationReason","FallbackReason","RuleType","WeightUnit","BalanceType","AdditionalFeeSource","calculateTotals","sdkTransformError","calculateTotals","import_rest_modules","calculateTotals"]}
|
|
1
|
+
{"version":3,"sources":["../../index.ts","../../src/ecom-v1-totals-calculation-totals-calculator.universal.ts","../../src/ecom-v1-totals-calculation-totals-calculator.http.ts","../../src/ecom-v1-totals-calculation-totals-calculator.public.ts","../../src/ecom-v1-totals-calculation-totals-calculator.context.ts"],"sourcesContent":["export * from './src/ecom-v1-totals-calculation-totals-calculator.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixEcomV1TotalsCalculation from './ecom-v1-totals-calculation-totals-calculator.http.js';\nimport { transformSDKAddressToRESTAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformRESTAddressToSDKAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\nexport interface TotalsCalculationEntity {}\n\nexport interface CalculateTotalsRequest\n extends CalculateTotalsRequestCouponOneOf,\n CalculateTotalsRequestGiftCardOneOf {\n /** Coupon ID. */\n couponId?: string | null;\n /** Coupon code. */\n couponCode?: string | null;\n /**\n * Gift card ID.\n * @format GUID\n * @deprecated Gift card ID.\n * @targetRemovalDate 2025-12-31\n */\n giftCardId?: string | null;\n /** Gift card code. */\n giftCardCode?: string | null;\n /**\n * Calculation ID. An identifier of the entity that you are calculating totals for, for example, cart ID or checkout ID.\n * This value will be used in order to optimise calculations by caching.\n * If not passed, calculation might be slower in some cases.\n * @minLength 1\n * @maxLength 100\n */\n calculationId?: string | null;\n /**\n * Line items for calculation.\n * @maxSize 300\n */\n lineItems?: LineItem[];\n /** Shipping address for tax and shipping calculation (if applicable). */\n shippingAddress?: Address;\n /** Billing address. Used for calculating tax if all the items in the cart are not shippable. */\n billingAddress?: Address;\n /** Details about selected shipping option. */\n selectedShippingOption?: SelectedShippingOption;\n /**\n * Buyer email. Used to enforce coupon [single-use per customer](https://support.wix.com/en/article/wix-stores-limiting-coupon-usage). If not passed, single coupon usage per customer will not be enforced.\n * @format EMAIL\n */\n buyerEmail?: string | null;\n /**\n * Member id to use for this calculation\n * When not provided, given that the caller is a member, its member id will be used\n * Providing this require elevated permissions - ECOM.ADMIN_CALCULATE_TOTALS\n */\n memberId?: string | null;\n /**\n * The selected memberships and which line items they apply to\n * When not provided, default selection will be returned\n * You can also set it to empty selection\n */\n selectedMemberships?: SelectedMemberships;\n /** Buyer phone number. Used to get shipping rates. */\n buyerPhone?: string | null;\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 * 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 * @maxSize 20\n */\n externalReferences?: ExternalReference[];\n /**\n * The business location ID to be used as the basis for some calculations.\n * Learn more about the [Locations API](https://dev.wix.com/docs/rest/business-management/locations/introduction).\n * @format GUID\n */\n businessLocationId?: string | null;\n /**\n * Amount to redeem from the gift card referenced in `gift_card_code`.\n * @decimalValue options { gte:0, lte:1000000000000000, maxScale:3 }\n */\n giftCardRedeemAmount?: string | null;\n /**\n * Buyer contact ID.\n * @internal\n * @format GUID\n */\n contactId?: string | null;\n /** [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields). */\n extendedFields?: ExtendedFields;\n /**\n * Exempt group to use for tax calculations.\n * @internal\n * @format GUID\n */\n taxExemptGroupId?: string | null;\n}\n\n/** @oneof */\nexport interface CalculateTotalsRequestCouponOneOf {\n /** Coupon ID. */\n couponId?: string | null;\n /** Coupon code. */\n couponCode?: string | null;\n}\n\n/** @oneof */\nexport interface CalculateTotalsRequestGiftCardOneOf {\n /**\n * Gift card ID.\n * @format GUID\n * @deprecated Gift card ID.\n * @targetRemovalDate 2025-12-31\n */\n giftCardId?: string | null;\n /** Gift card code. */\n giftCardCode?: string | null;\n}\n\nexport interface LineItem {\n /**\n * Line item ID.\n * @minLength 1\n * @maxLength 100\n */\n _id?: string;\n /**\n * Quantity.\n * @max 100000\n */\n quantity?: number | null;\n /**\n * Optional references to the line item's origin catalog.\n * See [Catalog SPI](https://bo.wix.com/wix-docs/rest/ecommerce/catalog-spi/introduction) for more details.\n * This field may be empty in the case of a custom line item.\n * currently we only use the catalog app id to set tax=0 for specific apps.\n */\n catalogReference?: CatalogReference;\n /**\n * Product/booking/event name.\n * @maxLength 200\n */\n productName?: string | null;\n /**\n * Catalog price.\n * @decimalValue options { gte:0 }\n */\n price?: string;\n /** Physical properties (if applicable). */\n physicalProperties?: PhysicalProperties;\n /** Subscription settings. */\n subscriptionSettings?: SubscriptionSettings;\n /**\n * Type of selected payment option for current item.\n *\n * Default: `FULL_PAYMENT_ONLINE`\n */\n paymentOption?: PaymentOptionTypeWithLiterals;\n /** Service properties. When relevant, this contains information such as date and number of participants. */\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 */\n rootCatalogItemId?: string | null;\n /**\n * Optional - partial amount of item's price to be paid now for checkout cases with DEPOSIT_ONLINE payment option\n * If omitted - item's price will not be split and is expected to be paid in single installment\n * @format DECIMAL_VALUE\n */\n depositAmount?: string | null;\n /**\n * full price of the item before all the discounts\n * @format DECIMAL_VALUE\n */\n fullPrice?: string | null;\n /**\n * The Item's Delivery Profile Id\n * @format GUID\n */\n deliveryProfileId?: string | null;\n /** Item type. Either a preset type or custom. */\n itemType?: ItemType;\n /** Address to use for tax calculation purposes. */\n taxableAddress?: TaxableAddress;\n /**\n * Additional Fees to be added to used for calculation.\n * @readonly\n * @maxSize 5\n */\n additionalFees?: ApiV1AdditionalFee[];\n /**\n * Modifier groups that were added to the item.\n * @maxSize 25\n */\n modifierGroups?: ModifierGroup[];\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 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 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 SubscriptionSettings {\n /** Frequency of recurring payment. Every day/week/month/year. */\n frequency?: SubscriptionFrequencyWithLiterals;\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\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 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 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 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 ApiV1AdditionalFee {\n /**\n * Additional fee's unique code or ID.\n * @minLength 1\n * @maxLength 100\n */\n code?: string | null;\n /**\n * Additional fee's name.\n *\n * Max: 50 characters\n * @minLength 1\n * @maxLength 50\n */\n name?: string;\n /**\n * Total additional fees. This `price` does not include any taxes that may apply to these additional fees.\n * @decimalValue options { gte:0, lte:1000000000000000, maxScale:2 }\n */\n price?: string;\n /**\n * Tax details.\n *\n * > **Note:** Tax is not calculated in the returned `price` even when `taxDetails.taxable` is `true`.\n */\n taxDetails?: V1TaxDetails;\n /**\n * Number of subscription cycle this fee applies to\n * default None - all billing cycle\n * @internal\n * @min 1\n * @max 999\n */\n subscriptionCycles?: number | null;\n}\n\n/** Tax details. */\nexport interface V1TaxDetails {\n /** Whether additional fee is taxable. */\n taxable?: boolean;\n /**\n * Reserved for internal use.\n * @format GUID\n */\n taxGroupId?: string | null;\n}\n\nexport interface ModifierGroup {\n /**\n * Modifier group ID.\n * @minLength 1\n * @maxLength 36\n */\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 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 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 /**\n * The price of the modifier.\n * @decimalValue options { gte:0, lte:1000000000000000, maxScale:3 }\n */\n price?: string | null;\n}\n\nexport interface PlatformFee {\n /** 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 percentage expressed as a decimal fraction between 0 and 1. For example, `0.05` for 5%.\n * @format DECIMAL_VALUE\n * @decimalValue options { gt: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/** Physical address */\nexport interface Address {\n /**\n * Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.\n * @format COUNTRY\n */\n country?: string | null;\n /**\n * Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format.\n * @maxLength 50\n */\n subdivision?: string | null;\n /**\n * City name.\n * @maxLength 50\n */\n city?: string | null;\n /**\n * Postal or zip code.\n * @maxLength 50\n */\n postalCode?: string | null;\n /** Street address. */\n streetAddress?: StreetAddress;\n /**\n * Main address line (usually street name and number).\n * @maxLength 150\n */\n addressLine1?: string | null;\n /**\n * Free text providing more detailed address info. Usually contains apt, suite, floor.\n * @maxLength 100\n */\n addressLine2?: string | null;\n /** Geocode object containing latitude and longitude coordinates. */\n location?: AddressLocation;\n /**\n * Country's full name.\n * @readonly\n */\n countryFullname?: string | null;\n /**\n * Subdivision full-name.\n * @readonly\n */\n subdivisionFullname?: string | null;\n}\n\nexport interface StreetAddress {\n /** Street number. */\n number?: string;\n /** Street name. */\n name?: string;\n}\n\nexport interface AddressLocation {\n /** Address latitude. */\n latitude?: number | null;\n /** Address longitude. */\n longitude?: number | null;\n}\n\nexport interface SelectedShippingOption {\n /**\n * Carrier ID.\n * @format GUID\n */\n carrierId?: string | null;\n /**\n * Selected shipping option code. For example, \"usps_std_overnight\".\n * @minLength 1\n * @maxLength 100\n */\n code?: 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 CarrierShippingOption {\n /**\n * This carrier's unique ID\n * @format GUID\n */\n carrierId?: string | null;\n /** Shipping service 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 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 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 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 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 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 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 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 * Name of the additional fee. For example, \"Gift wrapping\".\n * @minLength 1\n * @maxLength 50\n */\n name?: string;\n /**\n * Additional fee's price\n * @decimalValue options { gte:0, lte:1000000000000000 }\n */\n price?: string;\n /**\n * Currency\n * @format CURRENCY\n */\n currency?: string;\n /** Tax details */\n taxDetails?: TaxDetails;\n /**\n * Provider's app id\n * @minLength 1\n * @maxLength 100\n */\n providerAppId?: string | null;\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 /**\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\n/** Tax Details. */\nexport interface TaxDetails {\n /** Indication if additional fee is taxable or not */\n taxable?: boolean;\n /**\n * Optional tax group ID to use when calculating tax for this additional fee\n * @format GUID\n */\n taxGroupId?: string | null;\n}\n\nexport enum DataFetchType {\n SHIPPING = 'SHIPPING',\n DISCOUNT = 'DISCOUNT',\n ADDITIONAL_FEES = 'ADDITIONAL_FEES',\n ORDER_VALIDATION = 'ORDER_VALIDATION',\n}\n\n/** @enumType */\nexport type DataFetchTypeWithLiterals =\n | DataFetchType\n | 'SHIPPING'\n | 'DISCOUNT'\n | 'ADDITIONAL_FEES'\n | 'ORDER_VALIDATION';\n\nexport interface ExternalReference {\n /**\n * ID of the app associated with the purchase flow.\n * For example, the Wix Pay Links app ID.\n * @format GUID\n * @immutable\n */\n appId?: string;\n /**\n * Reference to an external resource ID. Used to link the purchase flow to a specific entity in an external system.\n * For example, a Wix Pay Link ID.\n * @minLength 1\n * @maxLength 100\n * @immutable\n */\n resourceId?: string | null;\n}\n\nexport interface 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 CalculateTotalsResponse {\n /** Calculate line items. */\n calculatedLineItems?: CalculatedLineItem[];\n /** Price summary. */\n priceSummary?: PriceSummary;\n /** Details of applied gift card. */\n giftCard?: GiftCard;\n /** Tax summary. */\n taxSummary?: TaxSummary;\n /** Shipping information. */\n shippingInfo?: ShippingInformation;\n /**\n * Applied discounts.\n * @maxSize 320\n */\n appliedDiscounts?: AppliedDiscount[];\n /** Calculation errors. */\n calculationErrors?: CalculationErrors;\n /** Weight unit. */\n weightUnit?: WeightUnitWithLiterals;\n /**\n * The business’s default currency. Used for price calculations.\n * This represents the base currency configured for the site and remains constant regardless of the [customer’s currency selection](https://support.wix.com/en/article/multicurrency-an-overview).\n * @format CURRENCY\n */\n currency?: string;\n /**\n * The currency [selected by the customer](https://support.wix.com/en/article/multicurrency-an-overview). Used for converted price calculations.\n * This reflects the customer’s preferred currency and may differ from the site’s default currency.\n * @readonly\n * @format CURRENCY\n */\n conversionCurrency?: string;\n /** Whether tax is included in price. */\n taxIncludedInPrice?: boolean;\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 /** Information about valid and invalid memberships, and which ones are selected for usage. */\n membershipOptions?: MembershipOptions;\n /**\n * Additional Fees\n * @maxSize 100\n */\n additionalFees?: V1AdditionalFee[];\n /**\n * The site currency.\n * @readonly\n * @format CURRENCY\n * @deprecated The site currency.\n * @replacedBy currency\n * @targetRemovalDate 2026-01-30\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 checkoutConversionRate?: string | null;\n /**\n * The pay now total amount after the gift card is applied.\n * @readonly\n */\n payNowTotalAfterGiftCard?: MultiCurrencyPrice;\n /**\n * The total amount after gift card is applied.\n * @readonly\n */\n totalAfterGiftCard?: MultiCurrencyPrice;\n /**\n * Payment for subscriptions after free trial period.\n * @readonly\n */\n payAfterFreeTrial?: PriceSummary;\n}\n\nexport interface CalculatedLineItem {\n /** Line item ID. */\n lineItemId?: string;\n /** Price breakdown for this line item. */\n pricesBreakdown?: LineItemPricesData;\n /**\n * Type of selected payment option for current item. Supported values:\n * + `\"FULL_PAYMENT_ONLINE\"` - The entire payment for this item will happen as part of the checkout\n * + `\"FULL_PAYMENT_OFFLINE\"` - The entire payment for this item will happen after the checkout\n * + `\"MEMBERSHIP\"` - This item cannot be paid via monetary payment options, only via non monetary option such membership. When this option is used, price must be set to 0\n * + `\"DEPOSIT_ONLINE\"` - Partial payment of the given item will happen as part of the checkout. Amount to be paid is defined by deposit_amount field.\n */\n paymentOption?: PaymentOptionTypeWithLiterals;\n /** tax calculation address. */\n taxableAddress?: TaxableAddress;\n /**\n * Calculated modifiers.\n * @internal\n * @maxSize 625\n */\n modifiers?: CalculatedItemModifier[];\n}\n\nexport interface LineItemPricesData {\n /** Total price after discounts, tax, and modifiers. */\n totalPriceAfterTax?: MultiCurrencyPrice;\n /** Total price after discounts and modifiers, and before tax. */\n totalPriceBeforeTax?: MultiCurrencyPrice;\n /** Tax details. */\n taxDetails?: ItemTaxFullDetails;\n /** Total discount applied for the line item. */\n totalDiscount?: MultiCurrencyPrice;\n /** Catalog price after catalog-defined discount, automatic discounts, and modifiers. */\n price?: MultiCurrencyPrice;\n /**\n * Item price before automatic discounts, coupons, and global discounts; after catalog-defined discounts and modifiers.\n * Defaults to `price` when not provided.\n */\n priceBeforeDiscounts?: MultiCurrencyPrice;\n /** Total line item price after catalog-defined discounts, automatic discounts, and modifiers. */\n lineItemPrice?: MultiCurrencyPrice;\n /**\n * Item price before all discounts and modifiers.\n * Defaults to `price` when not provided.\n */\n fullPrice?: MultiCurrencyPrice;\n /**\n * Total price of all item modifiers.\n * @internal\n */\n modifiers?: MultiCurrencyPrice;\n /**\n * Item price before tax, automatic discounts, coupons, and global discounts; after catalog-defined discounts and modifiers.\n * @internal\n */\n priceBeforeDiscountsAndTax?: MultiCurrencyPrice;\n /**\n * Partial payment out of `price` to be paid upfront during the checkout.\n * Applies to catalog items with `lineItem.paymentOption` type `DEPOSIT_ONLINE` only.\n */\n depositAmount?: MultiCurrencyPrice;\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 CalculatedItemModifier {\n /**\n * Modifier ID.\n * @minLength 1\n * @maxLength 36\n */\n _id?: string;\n /**\n * ID of the group this modifier belongs to.\n * @minLength 1\n * @maxLength 36\n */\n groupId?: string;\n /**\n * Modifier price.\n * @readonly\n */\n price?: MultiCurrencyPrice;\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 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 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\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 * 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 interface ShippingInformation {\n /** Shipping region. */\n region?: ShippingRegion;\n /** Selected shipping option. */\n selectedCarrierServiceOption?: SelectedCarrierServiceOption;\n /** All shipping options. */\n carrierServiceOptions?: CarrierServiceOption[];\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 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 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 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 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\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 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 MembershipOptions {\n /**\n * List of payment options that can be used.\n * @maxSize 300\n */\n eligibleMemberships?: Membership[];\n /**\n * List of payment options that are owned by the member, but cannot be used due to reason provided.\n * @maxSize 300\n */\n invalidMemberships?: InvalidMembership[];\n /**\n * The selected membership payment options and which line items they apply to.\n * @maxSize 300\n */\n selectedMemberships?: SelectedMembership[];\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 V1AdditionalFee {\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 PlatformFeeSummary {\n /** Total platform fee amount. */\n total?: MultiCurrencyPrice;\n /** Total platform fee passed on to the customer. */\n totalPassOn?: MultiCurrencyPrice;\n /** Total platform fee absorbed by the merchant. */\n totalAbsorbed?: MultiCurrencyPrice;\n /**\n * Calculated platform fees.\n * @maxSize 100\n */\n calculatedPlatformFees?: CalculatedPlatformFee[];\n}\n\nexport interface CalculatedPlatformFee {\n /** Platform fee name. */\n name?: TranslatableString;\n /** Platform fee amount. */\n amount?: MultiCurrencyPrice;\n /**\n * ID of the line item the platform fee applies to.\n * @format GUID\n */\n lineItemId?: string;\n /** Platform fee charge type. */\n chargeType?: PlatformFeeChargeTypeWithLiterals;\n /**\n * Percentage rate charged as platform fee.\n * The fee rate percentage expressed as a decimal fraction between 0 and 1. For example, `0.05` for 5%.\n * @format DECIMAL_VALUE\n * @decimalValue options { gt:0, lte:1, maxScale:4 }\n */\n percentageRate?: string;\n}\n\n/**\n * Returns a totals calculation for specified line items.\n * @public\n * @documentationMaturity preview\n * @requiredField options.lineItems._id\n * @requiredField options.lineItems.price\n * @requiredField options.lineItems.quantity\n * @requiredField options.selectedMemberships.memberships._id\n * @requiredField options.selectedMemberships.memberships.appId\n * @requiredField options.selectedMemberships.memberships.lineItemIds\n * @requiredField options.selectedShippingOption.code\n * @permissionId ECOM.CALCULATE_TOTALS\n * @applicableIdentity APP\n * @fqn com.wix.ecom.totals_calculator.v1.TotalsCalculator.CalculateTotals\n */\nexport async function calculateTotals(\n options?: NonNullablePaths<\n CalculateTotalsOptions,\n | `lineItems.${number}._id`\n | `lineItems.${number}.price`\n | `lineItems.${number}.quantity`\n | `selectedMemberships.memberships.${number}._id`\n | `selectedMemberships.memberships.${number}.appId`\n | `selectedMemberships.memberships.${number}.lineItemIds`\n | `selectedShippingOption.code`,\n 5\n >\n): Promise<\n NonNullablePaths<\n CalculateTotalsResponse,\n | `calculatedLineItems`\n | `calculatedLineItems.${number}.lineItemId`\n | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.amount`\n | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.convertedAmount`\n | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.formattedAmount`\n | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.formattedConvertedAmount`\n | `calculatedLineItems.${number}.pricesBreakdown.taxDetails.taxRate`\n | `calculatedLineItems.${number}.paymentOption`\n | `calculatedLineItems.${number}.taxableAddress.addressType`\n | `priceSummary.subtotal.amount`\n | `priceSummary.subtotal.convertedAmount`\n | `priceSummary.subtotal.formattedAmount`\n | `priceSummary.subtotal.formattedConvertedAmount`\n | `giftCard._id`\n | `giftCard.obfuscatedCode`\n | `giftCard.amount.amount`\n | `giftCard.amount.convertedAmount`\n | `giftCard.amount.formattedAmount`\n | `giftCard.amount.formattedConvertedAmount`\n | `giftCard.appId`\n | `taxSummary.taxableAmount.amount`\n | `taxSummary.taxableAmount.convertedAmount`\n | `taxSummary.taxableAmount.formattedAmount`\n | `taxSummary.taxableAmount.formattedConvertedAmount`\n | `taxSummary.calculationDetails.manualRateReason`\n | `taxSummary.calculationDetails.autoTaxFallbackDetails.fallbackReason`\n | `taxSummary.calculationDetails.autoTaxFallbackDetails.error.code`\n | `taxSummary.calculationDetails.autoTaxFallbackDetails.error.description`\n | `taxSummary.calculationDetails.rateType`\n | `shippingInfo.region._id`\n | `shippingInfo.region.name`\n | `shippingInfo.selectedCarrierServiceOption.code`\n | `shippingInfo.selectedCarrierServiceOption.title`\n | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.streetAddress.number`\n | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.streetAddress.name`\n | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.businessLocation`\n | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.pickupMethod`\n | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.amount`\n | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.convertedAmount`\n | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.formattedAmount`\n | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.formattedConvertedAmount`\n | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.taxRate`\n | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown`\n | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown.${number}.name`\n | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown.${number}.rate`\n | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.taxBreakdown`\n | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.taxBreakdown.${number}.jurisdictionType`\n | `shippingInfo.selectedCarrierServiceOption.requestedShippingOption`\n | `shippingInfo.selectedCarrierServiceOption.otherCharges`\n | `shippingInfo.selectedCarrierServiceOption.otherCharges.${number}.type`\n | `shippingInfo.selectedCarrierServiceOption.deliveryAllocations`\n | `shippingInfo.selectedCarrierServiceOption.deliveryAllocations.${number}.deliveryCarrier.code`\n | `shippingInfo.carrierServiceOptions`\n | `shippingInfo.carrierServiceOptions.${number}.carrierId`\n | `appliedDiscounts`\n | `appliedDiscounts.${number}.coupon._id`\n | `appliedDiscounts.${number}.coupon.code`\n | `appliedDiscounts.${number}.coupon.amount.amount`\n | `appliedDiscounts.${number}.coupon.amount.convertedAmount`\n | `appliedDiscounts.${number}.coupon.amount.formattedAmount`\n | `appliedDiscounts.${number}.coupon.amount.formattedConvertedAmount`\n | `appliedDiscounts.${number}.coupon.name`\n | `appliedDiscounts.${number}.discountRule._id`\n | `appliedDiscounts.${number}.discountRule.name.original`\n | `appliedDiscounts.${number}.discountType`\n | `calculationErrors.generalShippingCalculationError.applicationError.code`\n | `calculationErrors.generalShippingCalculationError.applicationError.description`\n | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations`\n | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field`\n | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description`\n | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule`\n | `calculationErrors.carrierErrors.errors`\n | `calculationErrors.carrierErrors.errors.${number}.carrierId`\n | `calculationErrors.orderValidationErrors`\n | `weightUnit`\n | `currency`\n | `conversionCurrency`\n | `taxIncludedInPrice`\n | `payNow.subtotal.amount`\n | `payNow.subtotal.convertedAmount`\n | `payNow.subtotal.formattedAmount`\n | `payNow.subtotal.formattedConvertedAmount`\n | `payLater.subtotal.amount`\n | `payLater.subtotal.convertedAmount`\n | `payLater.subtotal.formattedAmount`\n | `payLater.subtotal.formattedConvertedAmount`\n | `membershipOptions.eligibleMemberships`\n | `membershipOptions.eligibleMemberships.${number}._id`\n | `membershipOptions.eligibleMemberships.${number}.appId`\n | `membershipOptions.eligibleMemberships.${number}.name.original`\n | `membershipOptions.eligibleMemberships.${number}.credits.total`\n | `membershipOptions.eligibleMemberships.${number}.credits.remaining`\n | `membershipOptions.invalidMemberships`\n | `membershipOptions.invalidMemberships.${number}.reason`\n | `membershipOptions.selectedMemberships`\n | `membershipOptions.selectedMemberships.${number}._id`\n | `membershipOptions.selectedMemberships.${number}.appId`\n | `additionalFees`\n | `additionalFees.${number}.name`\n | `additionalFees.${number}.price.amount`\n | `additionalFees.${number}.price.convertedAmount`\n | `additionalFees.${number}.price.formattedAmount`\n | `additionalFees.${number}.price.formattedConvertedAmount`\n | `additionalFees.${number}.taxDetails.taxRate`\n | `additionalFees.${number}.source`\n | `siteCurrency`\n | `payNowTotalAfterGiftCard.amount`\n | `payNowTotalAfterGiftCard.convertedAmount`\n | `payNowTotalAfterGiftCard.formattedAmount`\n | `payNowTotalAfterGiftCard.formattedConvertedAmount`\n | `totalAfterGiftCard.amount`\n | `totalAfterGiftCard.convertedAmount`\n | `totalAfterGiftCard.formattedAmount`\n | `totalAfterGiftCard.formattedConvertedAmount`\n | `payAfterFreeTrial.subtotal.amount`\n | `payAfterFreeTrial.subtotal.convertedAmount`\n | `payAfterFreeTrial.subtotal.formattedAmount`\n | `payAfterFreeTrial.subtotal.formattedConvertedAmount`,\n 8\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 calculationId: options?.calculationId,\n lineItems: options?.lineItems,\n shippingAddress: options?.shippingAddress,\n billingAddress: options?.billingAddress,\n selectedShippingOption: options?.selectedShippingOption,\n couponId: options?.couponId,\n couponCode: options?.couponCode,\n giftCardId: options?.giftCardId,\n giftCardCode: options?.giftCardCode,\n buyerEmail: options?.buyerEmail,\n memberId: options?.memberId,\n selectedMemberships: options?.selectedMemberships,\n buyerPhone: options?.buyerPhone,\n purchaseFlowId: options?.purchaseFlowId,\n externalReferences: options?.externalReferences,\n businessLocationId: options?.businessLocationId,\n giftCardRedeemAmount: options?.giftCardRedeemAmount,\n contactId: options?.contactId,\n extendedFields: options?.extendedFields,\n taxExemptGroupId: options?.taxExemptGroupId,\n }),\n [\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: [\n { path: 'shippingAddress' },\n { path: 'billingAddress' },\n {\n path: 'shippingOptions.shippingOptions.logistics.pickupDetails.address',\n },\n ],\n },\n ]\n );\n\n const reqOpts = ambassadorWixEcomV1TotalsCalculation.calculateTotals(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: transformRESTAddressToSDKAddress,\n paths: [\n {\n path: 'shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address',\n },\n {\n path: 'shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address',\n },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n calculationId: '$[0].calculationId',\n lineItems: '$[0].lineItems',\n shippingAddress: '$[0].shippingAddress',\n billingAddress: '$[0].billingAddress',\n selectedShippingOption: '$[0].selectedShippingOption',\n couponId: '$[0].couponId',\n couponCode: '$[0].couponCode',\n giftCardId: '$[0].giftCardId',\n giftCardCode: '$[0].giftCardCode',\n buyerEmail: '$[0].buyerEmail',\n memberId: '$[0].memberId',\n selectedMemberships: '$[0].selectedMemberships',\n buyerPhone: '$[0].buyerPhone',\n purchaseFlowId: '$[0].purchaseFlowId',\n externalReferences: '$[0].externalReferences',\n businessLocationId: '$[0].businessLocationId',\n giftCardRedeemAmount: '$[0].giftCardRedeemAmount',\n contactId: '$[0].contactId',\n extendedFields: '$[0].extendedFields',\n taxExemptGroupId: '$[0].taxExemptGroupId',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CalculateTotalsOptions\n extends CalculateTotalsOptionsCouponOneOf,\n CalculateTotalsOptionsGiftCardOneOf {\n /**\n * Calculation ID. An identifier of the entity that you are calculating totals for, for example, cart ID or checkout ID.\n * This value will be used in order to optimise calculations by caching.\n * If not passed, calculation might be slower in some cases.\n * @minLength 1\n * @maxLength 100\n */\n calculationId?: string | null;\n /**\n * Line items for calculation.\n * @maxSize 300\n */\n lineItems?: LineItem[];\n /** Shipping address for tax and shipping calculation (if applicable). */\n shippingAddress?: Address;\n /** Billing address. Used for calculating tax if all the items in the cart are not shippable. */\n billingAddress?: Address;\n /** Details about selected shipping option. */\n selectedShippingOption?: SelectedShippingOption;\n /** Coupon ID. */\n couponId?: string | null;\n /** Coupon code. */\n couponCode?: string | null;\n /**\n * Gift card ID.\n * @format GUID\n * @deprecated Gift card ID.\n * @targetRemovalDate 2025-12-31\n */\n giftCardId?: string | null;\n /** Gift card code. */\n giftCardCode?: string | null;\n /**\n * Buyer email. Used to enforce coupon [single-use per customer](https://support.wix.com/en/article/wix-stores-limiting-coupon-usage). If not passed, single coupon usage per customer will not be enforced.\n * @format EMAIL\n */\n buyerEmail?: string | null;\n /**\n * Member id to use for this calculation\n * When not provided, given that the caller is a member, its member id will be used\n * Providing this require elevated permissions - ECOM.ADMIN_CALCULATE_TOTALS\n */\n memberId?: string | null;\n /**\n * The selected memberships and which line items they apply to\n * When not provided, default selection will be returned\n * You can also set it to empty selection\n */\n selectedMemberships?: SelectedMemberships;\n /** Buyer phone number. Used to get shipping rates. */\n buyerPhone?: string | null;\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 * 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 * @maxSize 20\n */\n externalReferences?: ExternalReference[];\n /**\n * The business location ID to be used as the basis for some calculations.\n * Learn more about the [Locations API](https://dev.wix.com/docs/rest/business-management/locations/introduction).\n * @format GUID\n */\n businessLocationId?: string | null;\n /**\n * Amount to redeem from the gift card referenced in `gift_card_code`.\n * @decimalValue options { gte:0, lte:1000000000000000, maxScale:3 }\n */\n giftCardRedeemAmount?: string | null;\n /**\n * Buyer contact ID.\n * @internal\n * @format GUID\n */\n contactId?: string | null;\n /** [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields). */\n extendedFields?: ExtendedFields;\n /**\n * Exempt group to use for tax calculations.\n * @internal\n * @format GUID\n */\n taxExemptGroupId?: string | null;\n}\n\n/** @oneof */\nexport interface CalculateTotalsOptionsCouponOneOf {\n /** Coupon ID. */\n couponId?: string | null;\n /** Coupon code. */\n couponCode?: string | null;\n}\n\n/** @oneof */\nexport interface CalculateTotalsOptionsGiftCardOneOf {\n /**\n * Gift card ID.\n * @format GUID\n * @deprecated Gift card ID.\n * @targetRemovalDate 2025-12-31\n */\n giftCardId?: string | null;\n /** Gift card code. */\n giftCardCode?: string | null;\n}\n","import { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { 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 resolveComWixEcomTotalsCalculatorV1TotalsCalculatorUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'bo._base_domain_': [\n {\n srcPath: '/totals-calculator',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/totals-calculator',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/totals-calculator',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/ecom/v1/calculate-totals',\n destPath: '/v1/calculate-totals',\n },\n ],\n _: [\n {\n srcPath: '/_api/totals-calculator',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/totals-calculator',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_ecom_totals-calculator';\n\n/** Returns a totals calculation for specified line items. */\nexport function calculateTotals(payload: object): RequestOptionsFactory<any> {\n function __calculateTotals({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'lineItems.physicalProperties.weight' },\n { path: 'shippingAddress.geocode.latitude' },\n { path: 'shippingAddress.geocode.longitude' },\n { path: 'billingAddress.geocode.latitude' },\n { path: 'billingAddress.geocode.longitude' },\n {\n path: 'shippingOptions.shippingOptions.logistics.pickupDetails.address.geocode.latitude',\n },\n {\n path: 'shippingOptions.shippingOptions.logistics.pickupDetails.address.geocode.longitude',\n },\n { path: 'appliedDiscounts.merchantDiscount.percentage' },\n ],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'lineItems.serviceProperties.scheduledDate' },\n { path: 'lineItems.serviceProperties.endDate' },\n {\n path: 'shippingOptions.shippingOptions.logistics.deliveryTimeSlot.from',\n },\n {\n path: 'shippingOptions.shippingOptions.logistics.deliveryTimeSlot.to',\n },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.ecom.v1.totals_calculation',\n method: 'POST' as any,\n methodFqn:\n 'com.wix.ecom.totals_calculator.v1.TotalsCalculator.CalculateTotals',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixEcomTotalsCalculatorV1TotalsCalculatorUrl({\n protoPath: '/v1/calculate-totals',\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: 'shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.latitude',\n },\n {\n path: 'shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.longitude',\n },\n {\n path: 'shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.latitude',\n },\n {\n path: 'shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.longitude',\n },\n { path: 'appliedDiscounts.merchantDiscount.percentage' },\n ],\n },\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n {\n path: 'shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.from',\n },\n {\n path: 'shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.to',\n },\n {\n path: 'shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.from',\n },\n {\n path: 'shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.to',\n },\n { path: 'membershipOptions.eligibleMemberships.expirationDate' },\n {\n path: 'membershipOptions.invalidMemberships.membership.expirationDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __calculateTotals;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n CalculateTotalsOptions,\n CalculateTotalsResponse,\n calculateTotals as universalCalculateTotals,\n} from './ecom-v1-totals-calculation-totals-calculator.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/ecom' };\n\nexport function calculateTotals(\n httpClient: HttpClient\n): CalculateTotalsSignature {\n return (\n options?: NonNullablePaths<\n CalculateTotalsOptions,\n | `lineItems.${number}._id`\n | `lineItems.${number}.price`\n | `lineItems.${number}.quantity`\n | `selectedMemberships.memberships.${number}._id`\n | `selectedMemberships.memberships.${number}.appId`\n | `selectedMemberships.memberships.${number}.lineItemIds`\n | `selectedShippingOption.code`,\n 5\n >\n ) =>\n universalCalculateTotals(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CalculateTotalsSignature {\n /**\n * Returns a totals calculation for specified line items.\n */\n (\n options?: NonNullablePaths<\n CalculateTotalsOptions,\n | `lineItems.${number}._id`\n | `lineItems.${number}.price`\n | `lineItems.${number}.quantity`\n | `selectedMemberships.memberships.${number}._id`\n | `selectedMemberships.memberships.${number}.appId`\n | `selectedMemberships.memberships.${number}.lineItemIds`\n | `selectedShippingOption.code`,\n 5\n >\n ): Promise<\n NonNullablePaths<\n CalculateTotalsResponse,\n | `calculatedLineItems`\n | `calculatedLineItems.${number}.lineItemId`\n | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.amount`\n | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.convertedAmount`\n | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.formattedAmount`\n | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.formattedConvertedAmount`\n | `calculatedLineItems.${number}.pricesBreakdown.taxDetails.taxRate`\n | `calculatedLineItems.${number}.paymentOption`\n | `calculatedLineItems.${number}.taxableAddress.addressType`\n | `priceSummary.subtotal.amount`\n | `priceSummary.subtotal.convertedAmount`\n | `priceSummary.subtotal.formattedAmount`\n | `priceSummary.subtotal.formattedConvertedAmount`\n | `giftCard._id`\n | `giftCard.obfuscatedCode`\n | `giftCard.amount.amount`\n | `giftCard.amount.convertedAmount`\n | `giftCard.amount.formattedAmount`\n | `giftCard.amount.formattedConvertedAmount`\n | `giftCard.appId`\n | `taxSummary.taxableAmount.amount`\n | `taxSummary.taxableAmount.convertedAmount`\n | `taxSummary.taxableAmount.formattedAmount`\n | `taxSummary.taxableAmount.formattedConvertedAmount`\n | `taxSummary.calculationDetails.manualRateReason`\n | `taxSummary.calculationDetails.autoTaxFallbackDetails.fallbackReason`\n | `taxSummary.calculationDetails.autoTaxFallbackDetails.error.code`\n | `taxSummary.calculationDetails.autoTaxFallbackDetails.error.description`\n | `taxSummary.calculationDetails.rateType`\n | `shippingInfo.region._id`\n | `shippingInfo.region.name`\n | `shippingInfo.selectedCarrierServiceOption.code`\n | `shippingInfo.selectedCarrierServiceOption.title`\n | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.streetAddress.number`\n | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.streetAddress.name`\n | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.businessLocation`\n | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.pickupMethod`\n | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.amount`\n | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.convertedAmount`\n | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.formattedAmount`\n | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.formattedConvertedAmount`\n | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.taxRate`\n | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown`\n | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown.${number}.name`\n | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown.${number}.rate`\n | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.taxBreakdown`\n | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.taxBreakdown.${number}.jurisdictionType`\n | `shippingInfo.selectedCarrierServiceOption.requestedShippingOption`\n | `shippingInfo.selectedCarrierServiceOption.otherCharges`\n | `shippingInfo.selectedCarrierServiceOption.otherCharges.${number}.type`\n | `shippingInfo.selectedCarrierServiceOption.deliveryAllocations`\n | `shippingInfo.selectedCarrierServiceOption.deliveryAllocations.${number}.deliveryCarrier.code`\n | `shippingInfo.carrierServiceOptions`\n | `shippingInfo.carrierServiceOptions.${number}.carrierId`\n | `appliedDiscounts`\n | `appliedDiscounts.${number}.coupon._id`\n | `appliedDiscounts.${number}.coupon.code`\n | `appliedDiscounts.${number}.coupon.amount.amount`\n | `appliedDiscounts.${number}.coupon.amount.convertedAmount`\n | `appliedDiscounts.${number}.coupon.amount.formattedAmount`\n | `appliedDiscounts.${number}.coupon.amount.formattedConvertedAmount`\n | `appliedDiscounts.${number}.coupon.name`\n | `appliedDiscounts.${number}.discountRule._id`\n | `appliedDiscounts.${number}.discountRule.name.original`\n | `appliedDiscounts.${number}.discountType`\n | `calculationErrors.generalShippingCalculationError.applicationError.code`\n | `calculationErrors.generalShippingCalculationError.applicationError.description`\n | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations`\n | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field`\n | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description`\n | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule`\n | `calculationErrors.carrierErrors.errors`\n | `calculationErrors.carrierErrors.errors.${number}.carrierId`\n | `calculationErrors.orderValidationErrors`\n | `weightUnit`\n | `currency`\n | `conversionCurrency`\n | `taxIncludedInPrice`\n | `payNow.subtotal.amount`\n | `payNow.subtotal.convertedAmount`\n | `payNow.subtotal.formattedAmount`\n | `payNow.subtotal.formattedConvertedAmount`\n | `payLater.subtotal.amount`\n | `payLater.subtotal.convertedAmount`\n | `payLater.subtotal.formattedAmount`\n | `payLater.subtotal.formattedConvertedAmount`\n | `membershipOptions.eligibleMemberships`\n | `membershipOptions.eligibleMemberships.${number}._id`\n | `membershipOptions.eligibleMemberships.${number}.appId`\n | `membershipOptions.eligibleMemberships.${number}.name.original`\n | `membershipOptions.eligibleMemberships.${number}.credits.total`\n | `membershipOptions.eligibleMemberships.${number}.credits.remaining`\n | `membershipOptions.invalidMemberships`\n | `membershipOptions.invalidMemberships.${number}.reason`\n | `membershipOptions.selectedMemberships`\n | `membershipOptions.selectedMemberships.${number}._id`\n | `membershipOptions.selectedMemberships.${number}.appId`\n | `additionalFees`\n | `additionalFees.${number}.name`\n | `additionalFees.${number}.price.amount`\n | `additionalFees.${number}.price.convertedAmount`\n | `additionalFees.${number}.price.formattedAmount`\n | `additionalFees.${number}.price.formattedConvertedAmount`\n | `additionalFees.${number}.taxDetails.taxRate`\n | `additionalFees.${number}.source`\n | `siteCurrency`\n | `payNowTotalAfterGiftCard.amount`\n | `payNowTotalAfterGiftCard.convertedAmount`\n | `payNowTotalAfterGiftCard.formattedAmount`\n | `payNowTotalAfterGiftCard.formattedConvertedAmount`\n | `totalAfterGiftCard.amount`\n | `totalAfterGiftCard.convertedAmount`\n | `totalAfterGiftCard.formattedAmount`\n | `totalAfterGiftCard.formattedConvertedAmount`\n | `payAfterFreeTrial.subtotal.amount`\n | `payAfterFreeTrial.subtotal.convertedAmount`\n | `payAfterFreeTrial.subtotal.formattedAmount`\n | `payAfterFreeTrial.subtotal.formattedConvertedAmount`,\n 8\n >\n >;\n}\n\nexport {\n AdditionalFee,\n AdditionalFeeSource,\n Address,\n AddressLocation,\n AggregatedTaxBreakdown,\n ApiV1AdditionalFee,\n ApplicableLineItems,\n ApplicationError,\n AppliedDiscount,\n AppliedDiscountDiscountSourceOneOf,\n AutoTaxFallbackCalculationDetails,\n BalanceType,\n CalculateTotalsOptions,\n CalculateTotalsOptionsCouponOneOf,\n CalculateTotalsOptionsGiftCardOneOf,\n CalculateTotalsRequest,\n CalculateTotalsRequestCouponOneOf,\n CalculateTotalsRequestGiftCardOneOf,\n CalculateTotalsResponse,\n CalculatedItemModifier,\n CalculatedLineItem,\n CalculatedPlatformFee,\n CalculationErrors,\n CalculationErrorsShippingCalculationErrorOneOf,\n Carrier,\n CarrierError,\n CarrierErrors,\n CarrierServiceOption,\n CarrierShippingOption,\n CatalogReference,\n ChargeType,\n Coupon,\n DataFetchType,\n DeliveryAllocation,\n DeliveryLogistics,\n DeliveryTimeSlot,\n Details,\n DetailsKindOneOf,\n DiscountRule,\n DiscountRuleName,\n DiscountType,\n ExtendedFields,\n ExternalReference,\n FallbackReason,\n FieldViolation,\n GiftCard,\n Group,\n InvalidMembership,\n ItemCombination,\n ItemCombinationLineItem,\n ItemModifier,\n ItemTaxFullDetails,\n ItemType,\n ItemTypeItemTypeDataOneOf,\n ItemTypePreset,\n JurisdictionType,\n LineItem,\n LineItemDiscount,\n LineItemPricesData,\n ManualCalculationReason,\n Membership,\n MembershipName,\n MembershipOptions,\n MembershipPaymentCredits,\n MerchantDiscount,\n ModifierGroup,\n MultiCurrencyPrice,\n OtherCharge,\n PaymentOptionType,\n PhysicalProperties,\n PickupDetails,\n PickupMethod,\n PlatformFee,\n PlatformFeeChargeType,\n PlatformFeeSummary,\n PriceSummary,\n RateType,\n Region,\n RuleType,\n Scope,\n SelectedCarrierServiceOption,\n SelectedCarrierServiceOptionOtherCharge,\n SelectedCarrierServiceOptionPrices,\n SelectedMembership,\n SelectedMemberships,\n SelectedShippingOption,\n ServiceProperties,\n ShippingInformation,\n ShippingOption,\n ShippingPrice,\n ShippingRegion,\n StreetAddress,\n SubscriptionFrequency,\n SubscriptionSettings,\n SystemError,\n TaxBreakdown,\n TaxCalculationDetails,\n TaxCalculationDetailsCalculationDetailsOneOf,\n TaxDetails,\n TaxRateBreakdown,\n TaxSummary,\n TaxableAddress,\n TaxableAddressTaxableAddressDataOneOf,\n TaxableAddressType,\n TotalsCalculationEntity,\n TranslatableString,\n V1AdditionalFee,\n V1TaxDetails,\n ValidationError,\n WeightUnit,\n} from './ecom-v1-totals-calculation-totals-calculator.universal.js';\n","import { calculateTotals as publicCalculateTotals } from './ecom-v1-totals-calculation-totals-calculator.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const calculateTotals: MaybeContext<\n BuildRESTFunction<typeof publicCalculateTotals> & typeof publicCalculateTotals\n> = /*#__PURE__*/ createRESTModule(publicCalculateTotals);\n\nexport {\n SubscriptionFrequency,\n PaymentOptionType,\n ItemTypePreset,\n TaxableAddressType,\n PlatformFeeChargeType,\n PickupMethod,\n ChargeType,\n DiscountType,\n DataFetchType,\n JurisdictionType,\n RateType,\n ManualCalculationReason,\n FallbackReason,\n RuleType,\n WeightUnit,\n BalanceType,\n AdditionalFeeSource,\n} from './ecom-v1-totals-calculation-totals-calculator.universal.js';\nexport {\n TotalsCalculationEntity,\n CalculateTotalsRequest,\n CalculateTotalsRequestCouponOneOf,\n CalculateTotalsRequestGiftCardOneOf,\n LineItem,\n CatalogReference,\n PhysicalProperties,\n Scope,\n Group,\n SubscriptionSettings,\n ServiceProperties,\n ItemType,\n ItemTypeItemTypeDataOneOf,\n TaxableAddress,\n TaxableAddressTaxableAddressDataOneOf,\n ApiV1AdditionalFee,\n V1TaxDetails,\n ModifierGroup,\n TranslatableString,\n ItemModifier,\n PlatformFee,\n Address,\n StreetAddress,\n AddressLocation,\n SelectedShippingOption,\n SelectedMemberships,\n SelectedMembership,\n CarrierShippingOption,\n ShippingOption,\n DeliveryLogistics,\n PickupDetails,\n DeliveryTimeSlot,\n ShippingPrice,\n MultiCurrencyPrice,\n OtherCharge,\n DeliveryAllocation,\n Carrier,\n Region,\n ApplicableLineItems,\n AppliedDiscount,\n AppliedDiscountDiscountSourceOneOf,\n Coupon,\n MerchantDiscount,\n DiscountRule,\n DiscountRuleName,\n LineItemDiscount,\n ItemCombination,\n ItemCombinationLineItem,\n AdditionalFee,\n TaxDetails,\n ExternalReference,\n ExtendedFields,\n CalculateTotalsResponse,\n CalculatedLineItem,\n LineItemPricesData,\n ItemTaxFullDetails,\n TaxRateBreakdown,\n TaxBreakdown,\n CalculatedItemModifier,\n PriceSummary,\n GiftCard,\n TaxSummary,\n TaxCalculationDetails,\n TaxCalculationDetailsCalculationDetailsOneOf,\n AutoTaxFallbackCalculationDetails,\n ApplicationError,\n AggregatedTaxBreakdown,\n ShippingInformation,\n ShippingRegion,\n SelectedCarrierServiceOption,\n SelectedCarrierServiceOptionPrices,\n SelectedCarrierServiceOptionOtherCharge,\n CarrierServiceOption,\n CalculationErrors,\n CalculationErrorsShippingCalculationErrorOneOf,\n Details,\n DetailsKindOneOf,\n ValidationError,\n FieldViolation,\n SystemError,\n CarrierErrors,\n CarrierError,\n MembershipOptions,\n Membership,\n MembershipName,\n MembershipPaymentCredits,\n InvalidMembership,\n V1AdditionalFee,\n PlatformFeeSummary,\n CalculatedPlatformFee,\n CalculateTotalsOptions,\n CalculateTotalsOptionsCouponOneOf,\n CalculateTotalsOptionsGiftCardOneOf,\n} from './ecom-v1-totals-calculation-totals-calculator.universal.js';\nexport {\n SubscriptionFrequencyWithLiterals,\n PaymentOptionTypeWithLiterals,\n ItemTypePresetWithLiterals,\n TaxableAddressTypeWithLiterals,\n PlatformFeeChargeTypeWithLiterals,\n PickupMethodWithLiterals,\n ChargeTypeWithLiterals,\n DiscountTypeWithLiterals,\n DataFetchTypeWithLiterals,\n JurisdictionTypeWithLiterals,\n RateTypeWithLiterals,\n ManualCalculationReasonWithLiterals,\n FallbackReasonWithLiterals,\n RuleTypeWithLiterals,\n WeightUnitWithLiterals,\n BalanceTypeWithLiterals,\n AdditionalFeeSourceWithLiterals,\n} from './ecom-v1-totals-calculation-totals-calculator.universal.js';\n"],"mappings":";;;;;;;;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,UACpB,sBAAsB;AAAA,UACtB,WAAW;AAAA,UACX,gBAAgB;AAAA,UAChB,kBAAkB;AAAA,QACpB;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AEzuEO,SAASC,iBACd,YAC0B;AAC1B,SAAO,CACL,YAYAA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;AC7BA,IAAAC,uBAAiC;AAG1B,IAAMC,mBAEK,2DAAiBA,gBAAqB;","names":["calculateTotals","import_float","import_timestamp","payload","import_address","import_transform_paths","SubscriptionFrequency","PaymentOptionType","ItemTypePreset","TaxableAddressType","PlatformFeeChargeType","PickupMethod","ChargeType","DiscountType","DataFetchType","JurisdictionType","RateType","ManualCalculationReason","FallbackReason","RuleType","WeightUnit","BalanceType","AdditionalFeeSource","calculateTotals","sdkTransformError","calculateTotals","import_rest_modules","calculateTotals"]}
|
|
@@ -1026,7 +1026,7 @@ interface LineItemPricesData {
|
|
|
1026
1026
|
*/
|
|
1027
1027
|
fullPrice?: MultiCurrencyPrice;
|
|
1028
1028
|
/**
|
|
1029
|
-
* Partial payment to be paid upfront during the checkout.
|
|
1029
|
+
* Partial payment out of `price` to be paid upfront during the checkout.
|
|
1030
1030
|
* Applies to catalog items with `lineItem.paymentOption` type `DEPOSIT_ONLINE` only.
|
|
1031
1031
|
*/
|
|
1032
1032
|
depositAmount?: MultiCurrencyPrice;
|