{"version":3,"sources":["../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":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n  renameKeysFromSDKRequestToRESTRequest,\n  renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient } from '@wix/sdk-types';\nimport * as 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  /** Gift card ID. */\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   */\n  calculationId?: string | null;\n  /** Line items for calculation. */\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   * Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will be applied to the whole cart/checkout.\n   * @deprecated\n   */\n  merchantDiscounts?: MerchantDiscountInput[];\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  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  /** Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order. */\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   * @internal\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   * @internal\n   */\n  businessLocationId?: 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  /** Gift card ID. */\n  giftCardId?: string | null;\n  /** Gift card code. */\n  giftCardCode?: string | null;\n}\n\nexport interface LineItem {\n  /** Line item ID. */\n  _id?: string;\n  /** Quantity. */\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  /** Product/booking/event name. */\n  productName?: string | null;\n  /** Price. */\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?: PaymentOptionType;\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   */\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   */\n  depositAmount?: string | null;\n  /** full price of the item before all the discounts */\n  fullPrice?: string | null;\n  /** The Item's Delivery Profile Id */\n  deliveryProfileId?: string | null;\n  /** Item type. Either a preset type or custom. */\n  itemType?: ItemType;\n  /**\n   * Address to use for tax calculation purposes.\n   * @internal\n   */\n  taxableAddress?: TaxableAddress;\n  /**\n   * Additional Fees to be added to used for calculation.\n   * @internal\n   * @readonly\n   */\n  additionalFees?: ApiV1AdditionalFee[];\n}\n\n/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */\nexport interface CatalogReference {\n  /** ID of the item within the catalog it belongs to. */\n  catalogItemId?: string;\n  /**\n   * ID of the app providing the catalog.\n   *\n   * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).\n   *\n   * For items from Wix catalogs, the following values always apply:\n   * + Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n   * + Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`\n   * + Wix Restaurants: `\"9a5d83fd-8570-482e-81ab-cfa88942ee60\"`\n   */\n  appId?: string;\n  /**\n   * Additional item details in key:value pairs. Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items.\n   *\n   * For products and variants from a Wix Stores catalog, learn more about [eCommerce integration](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration).\n   */\n  options?: Record<string, any> | null;\n}\n\nexport interface PhysicalProperties {\n  /** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */\n  weight?: number | null;\n  /** Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku). */\n  sku?: string | null;\n  /** Whether this line item is shippable. */\n  shippable?: boolean;\n}\n\nexport interface 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?: SubscriptionFrequency;\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/** Type of selected payment option for catalog item */\nexport enum PaymentOptionType {\n  /** The entire payment for this item happens as part of the checkout. */\n  FULL_PAYMENT_ONLINE = 'FULL_PAYMENT_ONLINE',\n  /** The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. */\n  FULL_PAYMENT_OFFLINE = 'FULL_PAYMENT_OFFLINE',\n  /** Payment for this item is done by charging a membership. When selected, `price` is `0`. */\n  MEMBERSHIP = 'MEMBERSHIP',\n  /** Partial payment to be paid upfront during checkout. The initial amount to be paid for each line item is specified in `depositAmount`. */\n  DEPOSIT_ONLINE = 'DEPOSIT_ONLINE',\n  /** Payment for this item can only be done by charging a membership and must be manually redeemed in the dashboard by the site admin. When selected, `price` is `0`. */\n  MEMBERSHIP_OFFLINE = 'MEMBERSHIP_OFFLINE',\n}\n\nexport interface ServiceProperties {\n  /**\n   * Date and time the service is to be provided, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.\n   * For example, the start time of a class.\n   */\n  scheduledDate?: Date | null;\n  /** The number of people participating in the service. For example, the number of people attending a class or the number of people per hotel room. */\n  numberOfParticipants?: number | null;\n}\n\nexport interface ItemType extends ItemTypeItemTypeDataOneOf {\n  /** Preset item type. */\n  preset?: ItemTypeItemType;\n  /** Custom item type. When none of the preset types are suitable, specifies the custom type. */\n  custom?: string;\n}\n\n/** @oneof */\nexport interface ItemTypeItemTypeDataOneOf {\n  /** Preset item type. */\n  preset?: ItemTypeItemType;\n  /** Custom item type. When none of the preset types are suitable, specifies the custom type. */\n  custom?: string;\n}\n\nexport enum ItemTypeItemType {\n  UNRECOGNISED = 'UNRECOGNISED',\n  PHYSICAL = 'PHYSICAL',\n  DIGITAL = 'DIGITAL',\n  GIFT_CARD = 'GIFT_CARD',\n  SERVICE = 'SERVICE',\n}\n\nexport interface TaxableAddress extends TaxableAddressTaxableAddressDataOneOf {\n  /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */\n  addressType?: TaxableAddressType;\n}\n\n/** @oneof */\nexport interface TaxableAddressTaxableAddressDataOneOf {\n  /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */\n  addressType?: TaxableAddressType;\n}\n\nexport enum TaxableAddressType {\n  UNKNOWN_TAXABLE_ADDRESS = 'UNKNOWN_TAXABLE_ADDRESS',\n  BUSINESS = 'BUSINESS',\n  BILLING = 'BILLING',\n  SHIPPING = 'SHIPPING',\n}\n\nexport interface ApiV1AdditionalFee {\n  /** Additional fee's unique code or ID. */\n  code?: string | null;\n  /**\n   * Additional fee's name.\n   *\n   * Max: 50 characters\n   */\n  name?: string;\n  /** Total additional fees. This `price` does not include any taxes that may apply to these additional fees. */\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   */\n  subscriptionCycles?: number | null;\n}\n\n/** Tax details. */\nexport interface V1TaxDetails {\n  /** Whether additional fee is taxable. */\n  taxable?: boolean;\n  /** Reserved for internal use. */\n  taxGroupId?: string | null;\n}\n\n/** Physical address */\nexport interface Address {\n  /** Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format. */\n  country?: string | null;\n  /** Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format. */\n  subdivision?: string | null;\n  /** City name. */\n  city?: string | null;\n  /** Postal or zip code. */\n  postalCode?: string | null;\n  /** Street address. */\n  streetAddress?: StreetAddress;\n  /** Main address line (usually street name and number). */\n  addressLine1?: string | null;\n  /** Free text providing more detailed address info. Usually contains apt, suite, floor. */\n  addressLine2?: string | null;\n  /**\n   * Country's full name.\n   * @readonly\n   */\n  countryFullname?: string | null;\n  /**\n   * Subdivision full-name.\n   * @readonly\n   */\n  subdivisionFullname?: string | null;\n}\n\nexport interface StreetAddress {\n  /** Street number. */\n  number?: string;\n  /** Street name. */\n  name?: string;\n}\n\nexport interface AddressLocation {\n  /** Address latitude. */\n  latitude?: number | null;\n  /** Address longitude. */\n  longitude?: number | null;\n}\n\nexport interface SelectedShippingOption {\n  /** Carrier ID. */\n  carrierId?: string | null;\n  /** Selected shipping option code. For example, \"usps_std_overnight\". */\n  code?: string;\n}\n\nexport interface MerchantDiscountInput {\n  /** Discount amount. */\n  amount?: string;\n  /** IDs of line items the discount applies to. */\n  lineItemIds?: string[];\n}\n\nexport interface SelectedMemberships {\n  /** Selected memberships. */\n  memberships?: SelectedMembership[];\n}\n\nexport interface SelectedMembership {\n  /** Membership ID. */\n  _id?: string;\n  /** ID of the app providing this payment option. */\n  appId?: string;\n  /** IDs of the line items this membership applies to. */\n  lineItemIds?: string[];\n}\n\nexport interface CarrierShippingOption {\n  /** This carrier's unique ID */\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   */\n  code?: string;\n  /**\n   * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale).\n   * For example, \"Standard\" or \"First-Class Package International\".\n   */\n  title?: string;\n  /** Delivery logistics. */\n  logistics?: DeliveryLogistics;\n  /** Sipping price information. */\n  cost?: ShippingPrice;\n  /** Delivery solution allocations to different delivery carriers and delivery regions */\n  deliveryAllocations?: DeliveryAllocation[];\n  /** If the delivery solution is a partial and doesn't apply to all items. */\n  partial?: boolean | null;\n}\n\nexport interface DeliveryLogistics {\n  /** Expected delivery time, in free text. For example, \"3-5 business days\". */\n  deliveryTime?: string | null;\n  /** Instructions for caller, e.g for pickup: \"Please deliver during opening hours, and please don't park in disabled parking spot\". */\n  instructions?: string | null;\n  /** Pickup details. */\n  pickupDetails?: PickupDetails;\n}\n\nexport interface PickupDetails {\n  /** Pickup address. */\n  address?: Address;\n  /**\n   * Whether the pickup address is that of a business - this may effect tax calculation.\n   * @deprecated\n   */\n  businessLocation?: boolean;\n  /** Pickup method */\n  pickupMethod?: PickupMethod;\n}\n\nexport enum PickupMethod {\n  UNKNOWN_METHOD = 'UNKNOWN_METHOD',\n  STORE_PICKUP = 'STORE_PICKUP',\n  PICKUP_POINT = 'PICKUP_POINT',\n}\n\nexport interface DeliveryTimeSlot {\n  /** starting time of the delivery time slot */\n  from?: Date | null;\n  /** ending time of the delivery time slot */\n  to?: Date | null;\n}\n\nexport interface 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  /** Amount. */\n  amount?: string;\n  /**\n   * Converted amount.\n   * @readonly\n   */\n  convertedAmount?: string;\n  /**\n   * Amount formatted with currency symbol.\n   * @readonly\n   */\n  formattedAmount?: string;\n  /**\n   * Converted amount formatted with currency symbol.\n   * @readonly\n   */\n  formattedConvertedAmount?: string;\n}\n\nexport interface OtherCharge {\n  /** Type of additional cost. */\n  type?: ChargeType;\n  /** Price of added cost. */\n  price?: MultiCurrencyPrice;\n}\n\nexport enum ChargeType {\n  HANDLING_FEE = 'HANDLING_FEE',\n  INSURANCE = 'INSURANCE',\n}\n\nexport interface DeliveryAllocation {\n  /** The delivery option's carrier details, could be multiple if the delivery option is a combination of multiple carriers */\n  deliveryCarrier?: Carrier;\n  /** The delivery region that are relevant for this delivery solution. */\n  deliveryRegion?: Region;\n  /** Populated if the delivery solution is a partially supplied by this carrier. */\n  applicableLineItems?: ApplicableLineItems;\n}\n\nexport interface Carrier {\n  /** The carrier app id */\n  appId?: string | null;\n  /** Unique code that acts as an ID for a shipping rate. For example, `\"usps_std_overnight\"`. */\n  code?: string;\n}\n\nexport interface Region {\n  /** The delivery region id. */\n  _id?: string | null;\n  /** The delivery region name. */\n  name?: string | null;\n}\n\nexport interface ApplicableLineItems {\n  /** Line items that the delivery solution is for. */\n  lineItemIds?: string[];\n}\n\nexport interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {\n  /** Coupon details. */\n  coupon?: Coupon;\n  /** Merchant discount. */\n  merchantDiscount?: MerchantDiscount;\n  /** Discount rule */\n  discountRule?: DiscountRule;\n  /** Discount type. */\n  discountType?: DiscountType;\n  /**\n   * IDs of line items the discount applies to.\n   * @deprecated IDs of line items the discount applies to.\n   * @replacedBy line_items_discounts\n   * @targetRemovalDate 2024-06-01\n   */\n  lineItemIds?: string[];\n  /**\n   * Number of subscription cycle this discount applies to\n   * default None - all billing cycle\n   * @internal\n   */\n  subscriptionCycles?: number | null;\n}\n\n/** @oneof */\nexport interface AppliedDiscountDiscountSourceOneOf {\n  /** Coupon details. */\n  coupon?: Coupon;\n  /** Merchant discount. */\n  merchantDiscount?: MerchantDiscount;\n  /** Discount rule */\n  discountRule?: DiscountRule;\n}\n\nexport enum DiscountType {\n  GLOBAL = 'GLOBAL',\n  SPECIFIC_ITEMS = 'SPECIFIC_ITEMS',\n  SHIPPING = 'SHIPPING',\n}\n\n/** Coupon */\nexport interface Coupon {\n  /** Coupon ID. */\n  _id?: string;\n  /** Coupon code. */\n  code?: string;\n  /** Coupon value. */\n  amount?: MultiCurrencyPrice;\n  /** Coupon name. */\n  name?: string;\n}\n\nexport interface MerchantDiscount {\n  /** Discount value. */\n  amount?: MultiCurrencyPrice;\n  /** Discount Percentage. Will be calculated from items price before other discounts. */\n  percentage?: number | null;\n}\n\nexport interface DiscountRule {\n  /** Discount rule ID */\n  _id?: string;\n  /** Discount rule name */\n  name?: DiscountRuleName;\n  /** Discount value. */\n  amount?: MultiCurrencyPrice;\n}\n\nexport interface DiscountRuleName {\n  /** Original discount rule name (in site's default language). */\n  original?: string;\n  /** Translated discount rule name according to buyer language. Defaults to `original` when not provided. */\n  translated?: string | null;\n}\n\nexport interface LineItemDiscount {\n  /** ID of line item the discount applies to. */\n  _id?: string;\n  /** Discount value. */\n  totalDiscountAmount?: MultiCurrencyPrice;\n}\n\nexport interface AdditionalFee {\n  /** Additional fee's unique code (or ID) for future processing */\n  code?: string | null;\n  /** Translated additional fee's name */\n  name?: string;\n  /** Additional fee's price */\n  price?: string;\n  /** Currency */\n  currency?: string;\n  /** Tax details */\n  taxDetails?: TaxDetails;\n  /** Provider's app id */\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   */\n  lineItemIds?: string[];\n  /**\n   * Number of subscription cycle this fee applies to\n   * default None - all billing cycle\n   * @internal\n   */\n  subscriptionCycles?: number | null;\n}\n\n/** Tax Details. */\nexport interface TaxDetails {\n  /** Indication if additional fee is taxable or not */\n  taxable?: boolean;\n  /** Optional tax group ID to use when calculating tax for this additional fee */\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\nexport interface ExternalReference {\n  /**\n   * ID of the app associated with the purchase flow.\n   * For example, the Wix Pay Links app ID.\n   */\n  appId?: string;\n  /**\n   * Reference to an external resource ID. Used to link the purchase flow to a specific entity in an external system.\n   * For example, a Wix Pay Link ID.\n   */\n  resourceId?: string | null;\n}\n\nexport interface 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  /** Applied discounts. */\n  appliedDiscounts?: AppliedDiscount[];\n  /** Calculation errors. */\n  calculationErrors?: CalculationErrors;\n  /** Weight unit. */\n  weightUnit?: WeightUnit;\n  /** Currency. */\n  currency?: string;\n  /**\n   * This is the display currency. Converted prices are presented in this currency.\n   * @readonly\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  /** Additional Fees */\n  additionalFees?: V1AdditionalFee[];\n  /**\n   * The site currency.\n   * @readonly\n   */\n  siteCurrency?: string;\n  /**\n   * The rate used when converting from the site currency to the checkout currency.\n   * @readonly\n   */\n  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   * @internal\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?: PaymentOptionType;\n  /**\n   * tax calculation address.\n   * @internal\n   */\n  taxableAddress?: TaxableAddress;\n}\n\nexport interface LineItemPricesData {\n  /** Total price after discounts and after tax. */\n  totalPriceAfterTax?: MultiCurrencyPrice;\n  /** Total price after discounts, 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 and automatic discounts. */\n  price?: MultiCurrencyPrice;\n  /** Item price **before** automatic discounts, coupons, and global discounts, **after** catalog-defined discount. Defaults to `price` when not provided. */\n  priceBeforeDiscounts?: MultiCurrencyPrice;\n  /** Total price **after** catalog-defined discount and automatic discounts, taking line item's quantity into account. */\n  lineItemPrice?: MultiCurrencyPrice;\n  /** Item price **before** all discounts. Defaults to `price` when not provided. */\n  fullPrice?: MultiCurrencyPrice;\n}\n\nexport interface ItemTaxFullDetails {\n  /** Amount for which tax is calculated. */\n  taxableAmount?: MultiCurrencyPrice;\n  /** Tax rate %, as a decimal point between 0 and 1. */\n  taxRate?: string;\n  /** Calculated tax, based on `taxable_amount` and `tax_rate`. */\n  totalTax?: MultiCurrencyPrice;\n  /**\n   * If breakdown exists, the sum of rates in the breakdown must equal `tax_rate`. Deprecated - use 'tax_breakdown' instead.\n   * @readonly\n   * @deprecated\n   */\n  rateBreakdown?: TaxRateBreakdown[];\n}\n\nexport interface TaxRateBreakdown {\n  /** Name of tax against which the calculation was performed. */\n  name?: string;\n  /** Rate at which this tax detail was calculated. */\n  rate?: string;\n  /** Amount of tax for this tax detail. */\n  tax?: MultiCurrencyPrice;\n}\n\n/**\n * TaxBreakdown represents tax information for a line item.\n * It holds the tax amount and the tax rate for each tax authority that apply on the line item.\n */\nexport interface TaxBreakdown {\n  /** The name of the jurisdiction to which this tax detail applies. For example, \"New York\" or \"Quebec\". */\n  jurisdiction?: string | null;\n  /** The amount of this line item price that was considered nontaxable. (Decimal value) */\n  nonTaxableAmount?: MultiCurrencyPrice;\n  /** The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.0000 signifies 200% tax. (Decimal value) */\n  rate?: string | null;\n  /** The amount of tax estimated for this line item. (Decimal value) */\n  taxAmount?: MultiCurrencyPrice;\n  /** The taxable amount of this line item. */\n  taxableAmount?: MultiCurrencyPrice;\n  /** The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, \"Sales Tax\", \"Income Tax\", \"Value Added Tax\", etc. */\n  taxType?: string | null;\n  /**\n   * The name of the tax against which this tax amount was calculated. For example, \"NY State Sales Tax\", \"Quebec GST\", etc.\n   * This name should be explicit enough to allow the merchant to understand what tax was calculated.\n   */\n  taxName?: string | null;\n  /** The type of the jurisdiction in which this tax detail applies. */\n  jurisdictionType?: JurisdictionType;\n}\n\n/** JurisdictionType represents the type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */\nexport enum JurisdictionType {\n  UNDEFINED = 'UNDEFINED',\n  COUNTRY = 'COUNTRY',\n  STATE = 'STATE',\n  COUNTY = 'COUNTY',\n  CITY = 'CITY',\n  SPECIAL = 'SPECIAL',\n}\n\nexport interface 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  /** Gift card value. */\n  amount?: MultiCurrencyPrice;\n  /** App ID of the gift card provider. */\n  appId?: string;\n  /**\n   * External ID in the gift card provider's system.\n   * Used for integration and tracking across different platforms.\n   */\n  externalId?: string | null;\n}\n\nexport interface TaxSummary {\n  /**\n   * Amount for which tax is calculated, added from line items.\n   * @readonly\n   */\n  taxableAmount?: MultiCurrencyPrice;\n  /**\n   * Calculated tax, added from line items.\n   * @readonly\n   */\n  totalTax?: MultiCurrencyPrice;\n  /**\n   * Tax calculator that was active when the order was created.\n   * @deprecated\n   */\n  calculationDetails?: TaxCalculationDetails;\n}\n\nexport interface TaxCalculationDetails\n  extends TaxCalculationDetailsCalculationDetailsOneOf {\n  /** Reason the manual calculation was used. */\n  manualRateReason?: ManualCalculationReason;\n  /** Details of the fallback rate calculation. */\n  autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetails;\n  /** Rate calculation type. */\n  rateType?: RateType;\n}\n\n/** @oneof */\nexport interface TaxCalculationDetailsCalculationDetailsOneOf {\n  /** Reason the manual calculation was used. */\n  manualRateReason?: ManualCalculationReason;\n  /** Details of the fallback rate calculation. */\n  autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetails;\n}\n\nexport enum RateType {\n  /** no tax being collected for this request due to location of purchase */\n  NO_TAX_COLLECTED = 'NO_TAX_COLLECTED',\n  /** manual rate used for calculation */\n  MANUAL_RATE = 'MANUAL_RATE',\n  /** autotax rate used for calculation */\n  AUTO_RATE = 'AUTO_RATE',\n  /** fallback rate used for calculation */\n  FALLBACK_RATE = 'FALLBACK_RATE',\n}\n\nexport enum ManualCalculationReason {\n  /** user set calculator in Business Manager to be Manual */\n  GLOBAL_SETTING_TO_MANUAL = 'GLOBAL_SETTING_TO_MANUAL',\n  /** specific region is on manual even though Global setting is Auto-tax */\n  REGION_SETTING_TO_MANUAL = 'REGION_SETTING_TO_MANUAL',\n}\n\nexport interface AutoTaxFallbackCalculationDetails {\n  /** reason for fallback */\n  fallbackReason?: FallbackReason;\n  /** invalid request (i.e. address), timeout, internal error, license error, and others will be encoded here */\n  error?: ApplicationError;\n}\n\nexport enum FallbackReason {\n  /** auto-tax failed to be calculated */\n  AUTO_TAX_FAILED = 'AUTO_TAX_FAILED',\n  /** auto-tax was temporarily deactivated on a system-level */\n  AUTO_TAX_DEACTIVATED = 'AUTO_TAX_DEACTIVATED',\n}\n\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  /** The name of the tax against which this tax amount was calculated. */\n  taxName?: string;\n  /** The type of tax that was calculated. Depends on the company's nexus settings as well as the jurisdiction's tax laws. */\n  taxType?: string;\n  /** The name of the jurisdiction in which this tax detail applies. */\n  jurisdiction?: string;\n  /** The type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */\n  jurisdictionTypeEnum?: JurisdictionType;\n  /** The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.000 signifies 200% tax. (Decimal value) */\n  rate?: string;\n  /** The sum of all the tax from line items that calculated by the tax identifiers. */\n  aggregatedTaxAmount?: MultiCurrencyPrice;\n}\n\nexport 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   * @readonly\n   */\n  _id?: string;\n  /** Shipping region name. */\n  name?: string;\n}\n\nexport interface SelectedCarrierServiceOption {\n  /** Unique identifier of selected option. For example, \"usps_std_overnight\". */\n  code?: string;\n  /**\n   * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale).\n   * For example, \"Standard\" or \"First-Class Package International\".\n   * @readonly\n   */\n  title?: string;\n  /**\n   * Delivery logistics.\n   * @readonly\n   */\n  logistics?: DeliveryLogistics;\n  /**\n   * Shipping costs.\n   * @readonly\n   */\n  cost?: SelectedCarrierServiceOptionPrices;\n  /**\n   * Were we able to find the requested shipping option, or otherwise we fallback to the default one (the first)\n   * @readonly\n   */\n  requestedShippingOption?: boolean;\n  /** Other charges */\n  otherCharges?: SelectedCarrierServiceOptionOtherCharge[];\n  /** This carrier's unique ID */\n  carrierId?: string | null;\n  /** Delivery solution allocations to different delivery carriers and delivery regions */\n  deliveryAllocations?: DeliveryAllocation[];\n  /** If the delivery solution is a partial and doesn't apply to all items. */\n  partial?: boolean | null;\n}\n\nexport interface SelectedCarrierServiceOptionPrices {\n  /** Total shipping price, after discount and after tax. */\n  totalPriceAfterTax?: MultiCurrencyPrice;\n  /** Total price of shipping after discounts (when relevant), and before tax. */\n  totalPriceBeforeTax?: MultiCurrencyPrice;\n  /** Tax details. */\n  taxDetails?: ItemTaxFullDetails;\n  /** Shipping discount before tax. */\n  totalDiscount?: MultiCurrencyPrice;\n  /** Shipping price before discount and before tax. */\n  price?: MultiCurrencyPrice;\n}\n\nexport interface SelectedCarrierServiceOptionOtherCharge {\n  /** Type of additional cost. */\n  type?: ChargeType;\n  /** Details of the charge, such as 'Full Coverage Insurance of up to 80% of value of shipment'. */\n  details?: string | null;\n  /** Price of added charge. */\n  cost?: SelectedCarrierServiceOptionPrices;\n}\n\nexport interface CarrierServiceOption {\n  /** Carrier ID. */\n  carrierId?: string;\n  /** Shipping options offered by this carrier for this request. */\n  shippingOptions?: ShippingOption[];\n}\n\nexport interface 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\nexport interface FieldViolation {\n  field?: string;\n  description?: string;\n  violatedRule?: RuleType;\n  /** applicable when violated_rule=OTHER */\n  ruleName?: string | null;\n  data?: Record<string, any> | null;\n}\n\nexport interface SystemError {\n  /** Error code. */\n  errorCode?: string | null;\n}\n\nexport interface CarrierErrors {\n  /** Carrier errors. */\n  errors?: CarrierError[];\n}\n\nexport interface CarrierError {\n  /** Carrier ID. */\n  carrierId?: string;\n  /** Error details. */\n  error?: Details;\n}\n\nexport enum WeightUnit {\n  /** Weight unit can't be classified, due to an error */\n  UNSPECIFIED_WEIGHT_UNIT = 'UNSPECIFIED_WEIGHT_UNIT',\n  /** Kilograms */\n  KG = 'KG',\n  /** Pounds */\n  LB = 'LB',\n}\n\nexport interface MembershipOptions {\n  /** List of payment options that can be used. */\n  eligibleMemberships?: Membership[];\n  /** List of payment options that are owned by the member, but cannot be used due to reason provided. */\n  invalidMemberships?: InvalidMembership[];\n  /** The selected membership payment options and which line items they apply to. */\n  selectedMemberships?: SelectedMembership[];\n}\n\nexport interface Membership {\n  /** Membership ID. */\n  _id?: string;\n  /** ID of the application providing this payment option. */\n  appId?: string;\n  /** The name of this membership. */\n  name?: MembershipName;\n  /** Line item IDs which are \"paid\" for by this membership. */\n  lineItemIds?: string[];\n  /** Optional - For a membership that has limited credits, information about credit usage. */\n  credits?: MembershipPaymentCredits;\n  /** Optional - TMembership expiry date. */\n  expirationDate?: Date | null;\n  /** Additional data about this membership. */\n  additionalData?: Record<string, any> | null;\n}\n\nexport interface MembershipName {\n  /** Membership name. */\n  original?: string;\n  /** Translated membership name. Defaults to `original` when not provided. */\n  translated?: string | null;\n}\n\nexport interface MembershipPaymentCredits {\n  /** Membership's total amount of credits. */\n  total?: number;\n  /** Membership's remaining amount of credits. */\n  remaining?: number;\n}\n\nexport interface InvalidMembership {\n  /** Membership details. */\n  membership?: Membership;\n  /** Reason why this membership is invalid and cannot be used. */\n  reason?: string;\n}\n\nexport interface V1AdditionalFee {\n  /** Additional fee's unique code (or ID) for future processing. */\n  code?: string | null;\n  /** Translated additional fee's name. */\n  name?: string;\n  /** Additional fee's price. */\n  price?: MultiCurrencyPrice;\n  /** Tax details. */\n  taxDetails?: ItemTaxFullDetails;\n  /** Provider's app id. */\n  providerAppId?: string | null;\n  /** Additional fee's price before tax. */\n  priceBeforeTax?: MultiCurrencyPrice;\n  /** Additional fee's price after tax. */\n  priceAfterTax?: MultiCurrencyPrice;\n  /**\n   * Optional - Line items associated with this additional fee.\n   * If no `lineItemIds` are provided, the fee will be associated with the whole cart/checkout/order.\n   */\n  lineItemIds?: string[];\n  /**\n   * Number of subscription cycle this fee applies to\n   * default None - all billing cycle\n   * @internal\n   */\n  subscriptionCycles?: number | null;\n  /** the source the additional fee was added from */\n  source?: AdditionalFeeSource;\n}\n\nexport enum AdditionalFeeSource {\n  UNKNOWN_ADDITIONAL_FEE_SOURCE = 'UNKNOWN_ADDITIONAL_FEE_SOURCE',\n  /** The additional fee was added by an additional fee service plugin */\n  SERVICE_PLUGIN = 'SERVICE_PLUGIN',\n  /** The additional fee was added on the item either via the catalog or on custom line item */\n  ITEM = 'ITEM',\n  /** The additional fee was added manually on the request */\n  MANUAL = 'MANUAL',\n}\n\ninterface MultiCurrencyPriceNonNullableFields {\n  amount: string;\n  convertedAmount: string;\n  formattedAmount: string;\n  formattedConvertedAmount: string;\n}\n\ninterface TaxRateBreakdownNonNullableFields {\n  name: string;\n  rate: string;\n  tax?: MultiCurrencyPriceNonNullableFields;\n  exemptAmount?: MultiCurrencyPriceNonNullableFields;\n  exemptionIds: number[];\n  taxableAmount?: MultiCurrencyPriceNonNullableFields;\n}\n\ninterface TaxBreakdownNonNullableFields {\n  nonTaxableAmount?: MultiCurrencyPriceNonNullableFields;\n  taxAmount?: MultiCurrencyPriceNonNullableFields;\n  taxableAmount?: MultiCurrencyPriceNonNullableFields;\n  jurisdictionType: JurisdictionType;\n}\n\ninterface ItemTaxFullDetailsNonNullableFields {\n  taxableAmount?: MultiCurrencyPriceNonNullableFields;\n  taxRate: string;\n  totalTax?: MultiCurrencyPriceNonNullableFields;\n  rateBreakdown: TaxRateBreakdownNonNullableFields[];\n  exemptAmount?: MultiCurrencyPriceNonNullableFields;\n  taxBreakdown: TaxBreakdownNonNullableFields[];\n}\n\ninterface LineItemPricesDataNonNullableFields {\n  totalPriceAfterTax?: MultiCurrencyPriceNonNullableFields;\n  totalPriceBeforeTax?: MultiCurrencyPriceNonNullableFields;\n  taxDetails?: ItemTaxFullDetailsNonNullableFields;\n  totalDiscount?: MultiCurrencyPriceNonNullableFields;\n  price?: MultiCurrencyPriceNonNullableFields;\n  priceBeforeDiscounts?: MultiCurrencyPriceNonNullableFields;\n  lineItemPrice?: MultiCurrencyPriceNonNullableFields;\n  fullPrice?: MultiCurrencyPriceNonNullableFields;\n}\n\ninterface TaxableAddressNonNullableFields {\n  addressType: TaxableAddressType;\n}\n\ninterface CalculatedLineItemNonNullableFields {\n  lineItemId: string;\n  pricesBreakdown?: LineItemPricesDataNonNullableFields;\n  paymentOption: PaymentOptionType;\n  /** @internal */\n  taxableAddress?: TaxableAddressNonNullableFields;\n}\n\ninterface PriceSummaryNonNullableFields {\n  subtotal?: MultiCurrencyPriceNonNullableFields;\n  shipping?: MultiCurrencyPriceNonNullableFields;\n  tax?: MultiCurrencyPriceNonNullableFields;\n  discount?: MultiCurrencyPriceNonNullableFields;\n  total?: MultiCurrencyPriceNonNullableFields;\n  additionalFees?: MultiCurrencyPriceNonNullableFields;\n}\n\ninterface GiftCardNonNullableFields {\n  _id: string;\n  obfuscatedCode: string;\n  amount?: MultiCurrencyPriceNonNullableFields;\n  appId: string;\n}\n\ninterface ApplicationErrorNonNullableFields {\n  code: string;\n  description: string;\n}\n\ninterface AutoTaxFallbackCalculationDetailsNonNullableFields {\n  fallbackReason: FallbackReason;\n  error?: ApplicationErrorNonNullableFields;\n}\n\ninterface TaxCalculationDetailsNonNullableFields {\n  manualRateReason: ManualCalculationReason;\n  autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetailsNonNullableFields;\n  rateType: RateType;\n}\n\ninterface AggregatedTaxBreakdownNonNullableFields {\n  taxName: string;\n  taxType: string;\n  jurisdiction: string;\n  jurisdictionTypeEnum: JurisdictionType;\n  rate: string;\n  aggregatedTaxAmount?: MultiCurrencyPriceNonNullableFields;\n  aggregatedTaxableAmount?: MultiCurrencyPriceNonNullableFields;\n}\n\ninterface TaxSummaryNonNullableFields {\n  taxableAmount?: MultiCurrencyPriceNonNullableFields;\n  totalTax?: MultiCurrencyPriceNonNullableFields;\n  manualTaxRate: string;\n  calculationDetails?: TaxCalculationDetailsNonNullableFields;\n  totalExempt?: MultiCurrencyPriceNonNullableFields;\n  aggregatedTaxBreakdown: AggregatedTaxBreakdownNonNullableFields[];\n}\n\ninterface ShippingRegionNonNullableFields {\n  _id: string;\n  name: string;\n}\n\ninterface StreetAddressNonNullableFields {\n  number: string;\n  name: string;\n  apt: string;\n}\n\ninterface AddressNonNullableFields {\n  streetAddress?: StreetAddressNonNullableFields;\n}\n\ninterface PickupDetailsNonNullableFields {\n  address?: AddressNonNullableFields;\n  businessLocation: boolean;\n  pickupMethod: PickupMethod;\n}\n\ninterface DeliveryLogisticsNonNullableFields {\n  pickupDetails?: PickupDetailsNonNullableFields;\n}\n\ninterface SelectedCarrierServiceOptionPricesNonNullableFields {\n  totalPriceAfterTax?: MultiCurrencyPriceNonNullableFields;\n  totalPriceBeforeTax?: MultiCurrencyPriceNonNullableFields;\n  taxDetails?: ItemTaxFullDetailsNonNullableFields;\n  totalDiscount?: MultiCurrencyPriceNonNullableFields;\n  price?: MultiCurrencyPriceNonNullableFields;\n}\n\ninterface SelectedCarrierServiceOptionOtherChargeNonNullableFields {\n  type: ChargeType;\n  cost?: SelectedCarrierServiceOptionPricesNonNullableFields;\n}\n\ninterface CarrierNonNullableFields {\n  code: string;\n}\n\ninterface ApplicableLineItemsNonNullableFields {\n  lineItemIds: string[];\n}\n\ninterface DeliveryAllocationNonNullableFields {\n  deliveryCarrier?: CarrierNonNullableFields;\n  applicableLineItems?: ApplicableLineItemsNonNullableFields;\n}\n\ninterface SelectedCarrierServiceOptionNonNullableFields {\n  code: string;\n  title: string;\n  logistics?: DeliveryLogisticsNonNullableFields;\n  cost?: SelectedCarrierServiceOptionPricesNonNullableFields;\n  requestedShippingOption: boolean;\n  otherCharges: SelectedCarrierServiceOptionOtherChargeNonNullableFields[];\n  deliveryAllocations: DeliveryAllocationNonNullableFields[];\n}\n\ninterface OtherChargeNonNullableFields {\n  type: ChargeType;\n  price?: MultiCurrencyPriceNonNullableFields;\n}\n\ninterface ShippingPriceNonNullableFields {\n  price?: MultiCurrencyPriceNonNullableFields;\n  otherCharges: OtherChargeNonNullableFields[];\n}\n\ninterface ShippingOptionNonNullableFields {\n  code: string;\n  title: string;\n  logistics?: DeliveryLogisticsNonNullableFields;\n  cost?: ShippingPriceNonNullableFields;\n  deliveryAllocations: DeliveryAllocationNonNullableFields[];\n}\n\ninterface CarrierServiceOptionNonNullableFields {\n  carrierId: string;\n  shippingOptions: ShippingOptionNonNullableFields[];\n}\n\ninterface ShippingInformationNonNullableFields {\n  region?: ShippingRegionNonNullableFields;\n  selectedCarrierServiceOption?: SelectedCarrierServiceOptionNonNullableFields;\n  carrierServiceOptions: CarrierServiceOptionNonNullableFields[];\n}\n\ninterface CouponNonNullableFields {\n  _id: string;\n  code: string;\n  amount?: MultiCurrencyPriceNonNullableFields;\n  name: string;\n  couponType: string;\n}\n\ninterface MerchantDiscountNonNullableFields {\n  amount?: MultiCurrencyPriceNonNullableFields;\n}\n\ninterface DiscountRuleNameNonNullableFields {\n  original: string;\n}\n\ninterface DiscountRuleNonNullableFields {\n  _id: string;\n  name?: DiscountRuleNameNonNullableFields;\n  amount?: MultiCurrencyPriceNonNullableFields;\n}\n\ninterface LineItemDiscountNonNullableFields {\n  _id: string;\n  totalDiscountAmount?: MultiCurrencyPriceNonNullableFields;\n}\n\ninterface AppliedDiscountNonNullableFields {\n  coupon?: CouponNonNullableFields;\n  merchantDiscount?: MerchantDiscountNonNullableFields;\n  discountRule?: DiscountRuleNonNullableFields;\n  discountType: DiscountType;\n  lineItemIds: string[];\n  lineItemDiscounts: LineItemDiscountNonNullableFields[];\n}\n\ninterface FieldViolationNonNullableFields {\n  field: string;\n  description: string;\n  violatedRule: RuleType;\n}\n\ninterface ValidationErrorNonNullableFields {\n  fieldViolations: FieldViolationNonNullableFields[];\n}\n\ninterface DetailsNonNullableFields {\n  applicationError?: ApplicationErrorNonNullableFields;\n  validationError?: ValidationErrorNonNullableFields;\n}\n\ninterface CarrierErrorNonNullableFields {\n  carrierId: string;\n  error?: DetailsNonNullableFields;\n}\n\ninterface CarrierErrorsNonNullableFields {\n  errors: CarrierErrorNonNullableFields[];\n}\n\ninterface CalculationErrorsNonNullableFields {\n  generalShippingCalculationError?: DetailsNonNullableFields;\n  carrierErrors?: CarrierErrorsNonNullableFields;\n  taxCalculationError?: DetailsNonNullableFields;\n  couponCalculationError?: DetailsNonNullableFields;\n  giftCardCalculationError?: DetailsNonNullableFields;\n  orderValidationErrors: ApplicationErrorNonNullableFields[];\n  membershipError?: DetailsNonNullableFields;\n  discountsCalculationError?: DetailsNonNullableFields;\n}\n\ninterface MembershipNameNonNullableFields {\n  original: string;\n}\n\ninterface MembershipPaymentCreditsNonNullableFields {\n  total: number;\n  remaining: number;\n}\n\ninterface MembershipNonNullableFields {\n  _id: string;\n  appId: string;\n  name?: MembershipNameNonNullableFields;\n  lineItemIds: string[];\n  credits?: MembershipPaymentCreditsNonNullableFields;\n}\n\ninterface InvalidMembershipNonNullableFields {\n  membership?: MembershipNonNullableFields;\n  reason: string;\n}\n\ninterface SelectedMembershipNonNullableFields {\n  _id: string;\n  appId: string;\n  lineItemIds: string[];\n}\n\ninterface MembershipOptionsNonNullableFields {\n  eligibleMemberships: MembershipNonNullableFields[];\n  invalidMemberships: InvalidMembershipNonNullableFields[];\n  selectedMemberships: SelectedMembershipNonNullableFields[];\n}\n\ninterface V1AdditionalFeeNonNullableFields {\n  name: string;\n  price?: MultiCurrencyPriceNonNullableFields;\n  taxDetails?: ItemTaxFullDetailsNonNullableFields;\n  priceBeforeTax?: MultiCurrencyPriceNonNullableFields;\n  priceAfterTax?: MultiCurrencyPriceNonNullableFields;\n  lineItemIds: string[];\n  source: AdditionalFeeSource;\n}\n\nexport interface CalculateTotalsResponseNonNullableFields {\n  calculatedLineItems: CalculatedLineItemNonNullableFields[];\n  priceSummary?: PriceSummaryNonNullableFields;\n  giftCard?: GiftCardNonNullableFields;\n  taxSummary?: TaxSummaryNonNullableFields;\n  shippingInfo?: ShippingInformationNonNullableFields;\n  appliedDiscounts: AppliedDiscountNonNullableFields[];\n  calculationErrors?: CalculationErrorsNonNullableFields;\n  weightUnit: WeightUnit;\n  currency: string;\n  conversionCurrency: string;\n  taxIncludedInPrice: boolean;\n  payNow?: PriceSummaryNonNullableFields;\n  payLater?: PriceSummaryNonNullableFields;\n  membershipOptions?: MembershipOptionsNonNullableFields;\n  additionalFees: V1AdditionalFeeNonNullableFields[];\n  siteCurrency: string;\n  payNowTotalAfterGiftCard?: MultiCurrencyPriceNonNullableFields;\n  totalAfterGiftCard?: MultiCurrencyPriceNonNullableFields;\n  /** @internal */\n  payAfterFreeTrial?: PriceSummaryNonNullableFields;\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.merchantDiscounts.amount\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 * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn com.wix.ecom.totals_calculator.v1.TotalsCalculator.CalculateTotals\n */\nexport async function calculateTotals(\n  options?: CalculateTotalsOptions\n): Promise<CalculateTotalsResponse & CalculateTotalsResponseNonNullableFields> {\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      merchantDiscounts: options?.merchantDiscounts,\n      buyerEmail: options?.buyerEmail,\n      memberId: options?.memberId,\n      selectedMemberships: options?.selectedMemberships,\n      buyerPhone: options?.buyerPhone,\n      purchaseFlowId: options?.purchaseFlowId,\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          merchantDiscounts: '$[0].merchantDiscounts',\n          buyerEmail: '$[0].buyerEmail',\n          memberId: '$[0].memberId',\n          selectedMemberships: '$[0].selectedMemberships',\n          buyerPhone: '$[0].buyerPhone',\n          purchaseFlowId: '$[0].purchaseFlowId',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface CalculateTotalsOptions\n  extends CalculateTotalsRequestCouponOneOf,\n    CalculateTotalsRequestGiftCardOneOf {\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   */\n  calculationId?: string | null;\n  /** Line items for calculation. */\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  /** Gift card ID. */\n  giftCardId?: string | null;\n  /** Gift card code. */\n  giftCardCode?: string | null;\n  /**\n   * Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will be applied to the whole cart/checkout.\n   * @deprecated\n   */\n  merchantDiscounts?: MerchantDiscountInput[];\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  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  /** Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order. */\n  purchaseFlowId?: 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          {\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      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 } from '@wix/sdk-types';\nimport {\n  CalculateTotalsOptions,\n  CalculateTotalsResponse,\n  CalculateTotalsResponseNonNullableFields,\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 (options?: CalculateTotalsOptions) =>\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  (options?: CalculateTotalsOptions | undefined): Promise<\n    CalculateTotalsResponse & CalculateTotalsResponseNonNullableFields\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  CalculateTotalsOptions,\n  CalculateTotalsRequest,\n  CalculateTotalsRequestCouponOneOf,\n  CalculateTotalsRequestGiftCardOneOf,\n  CalculateTotalsResponse,\n  CalculateTotalsResponseNonNullableFields,\n  CalculatedLineItem,\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  ExternalReference,\n  FallbackReason,\n  FieldViolation,\n  GiftCard,\n  Group,\n  InvalidMembership,\n  ItemTaxFullDetails,\n  ItemType,\n  ItemTypeItemType,\n  ItemTypeItemTypeDataOneOf,\n  JurisdictionType,\n  LineItem,\n  LineItemDiscount,\n  LineItemPricesData,\n  ManualCalculationReason,\n  Membership,\n  MembershipName,\n  MembershipOptions,\n  MembershipPaymentCredits,\n  MerchantDiscount,\n  MerchantDiscountInput,\n  MultiCurrencyPrice,\n  OtherCharge,\n  PaymentOptionType,\n  PhysicalProperties,\n  PickupDetails,\n  PickupMethod,\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  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  ItemTypeItemType,\n  TaxableAddressType,\n  PickupMethod,\n  ChargeType,\n  DiscountType,\n  DataFetchType,\n  JurisdictionType,\n  RateType,\n  ManualCalculationReason,\n  FallbackReason,\n  RuleType,\n  WeightUnit,\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  Address,\n  StreetAddress,\n  AddressLocation,\n  SelectedShippingOption,\n  MerchantDiscountInput,\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  AdditionalFee,\n  TaxDetails,\n  ExternalReference,\n  CalculateTotalsResponse,\n  CalculatedLineItem,\n  LineItemPricesData,\n  ItemTaxFullDetails,\n  TaxRateBreakdown,\n  TaxBreakdown,\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  CalculateTotalsResponseNonNullableFields,\n  CalculateTotalsOptions,\n} from './ecom-v1-totals-calculation-totals-calculator.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,oCAAoC;AAC7C,SAAS,oCAAoC;AAC7C,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,uDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AA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AA,EACR;AACF;;;AE3pDO,SAASiB,iBACd,YAC0B;AAC1B,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;AClBA,SAAS,wBAAwB;AAG1B,IAAMC,mBAEK,iCAAiBA,gBAAqB;","names":["payload","transformPaths","SubscriptionFrequency","PaymentOptionType","ItemTypeItemType","TaxableAddressType","PickupMethod","ChargeType","DiscountType","DataFetchType","JurisdictionType","RateType","ManualCalculationReason","FallbackReason","RuleType","WeightUnit","AdditionalFeeSource","calculateTotals","calculateTotals","calculateTotals"]}