@wix/auto_sdk_ecom_cart-v-2 1.0.31 → 1.0.33

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.
Files changed (37) hide show
  1. package/build/cjs/index.d.ts +965 -27
  2. package/build/cjs/index.js +67 -0
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +1 -1
  5. package/build/cjs/index.typings.js +67 -0
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +964 -26
  8. package/build/cjs/meta.js +67 -0
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +965 -27
  11. package/build/es/index.mjs +59 -0
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +1 -1
  14. package/build/es/index.typings.mjs +59 -0
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +964 -26
  17. package/build/es/meta.mjs +59 -0
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +8 -6
  20. package/build/internal/cjs/index.js +67 -0
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +1202 -198
  23. package/build/internal/cjs/index.typings.js +67 -0
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +964 -26
  26. package/build/internal/cjs/meta.js +67 -0
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +8 -6
  29. package/build/internal/es/index.mjs +59 -0
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +1202 -198
  32. package/build/internal/es/index.typings.mjs +59 -0
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +964 -26
  35. package/build/internal/es/meta.mjs +59 -0
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +2 -2
@@ -44,7 +44,7 @@ interface Cart {
44
44
  * @maxSize 1
45
45
  * @readonly
46
46
  */
47
- coupons?: Coupon[];
47
+ coupons?: V2Coupon[];
48
48
  /** Information about the source of the Cart, detailing the origin or context in which the Cart was created. */
49
49
  source?: CartSource;
50
50
  /** Information about the site from which the Cart's line items were added. */
@@ -139,7 +139,7 @@ interface V2LineItem {
139
139
  * Additional Fees to be added to this item calculation.
140
140
  * @maxSize 5
141
141
  */
142
- additionalFees?: AdditionalFee[];
142
+ additionalFees?: V1AdditionalFee[];
143
143
  /**
144
144
  * Modifier groups that were added to the item.
145
145
  * @maxSize 25
@@ -726,7 +726,7 @@ interface ItemPaymentConfig {
726
726
  * Must be used with `lineItem.paymentOption` set to `MEMBERSHIP` or `MEMBERSHIP_OFFLINE`.
727
727
  * This field can be empty when `lineItem.paymentOption` is set to `MEMBERSHIP_OFFLINE`.
728
728
  */
729
- selectedMembership?: SelectedMembership;
729
+ selectedMembership?: V2SelectedMembership;
730
730
  /**
731
731
  * Type of selected payment option for current item.
732
732
  *
@@ -734,7 +734,7 @@ interface ItemPaymentConfig {
734
734
  */
735
735
  paymentOption?: PaymentOptionTypeWithLiterals;
736
736
  }
737
- interface SelectedMembership {
737
+ interface V2SelectedMembership {
738
738
  /**
739
739
  * Membership ID.
740
740
  * @minLength 1
@@ -776,7 +776,7 @@ interface ExtendedFields {
776
776
  */
777
777
  namespaces?: Record<string, Record<string, any>>;
778
778
  }
779
- interface AdditionalFee {
779
+ interface V1AdditionalFee {
780
780
  /**
781
781
  * Additional fee's unique code or ID.
782
782
  * @minLength 1
@@ -873,7 +873,7 @@ interface Group {
873
873
  /** Item ID (when the coupon scope is limited to just one item). */
874
874
  entityId?: string | null;
875
875
  }
876
- interface Coupon {
876
+ interface V2Coupon {
877
877
  /**
878
878
  * ID of the coupon in the Cart.
879
879
  * @format GUID
@@ -1293,7 +1293,7 @@ interface PaymentInfo {
1293
1293
  * @readonly
1294
1294
  * @maxSize 1
1295
1295
  */
1296
- giftCards?: GiftCard[];
1296
+ giftCards?: V2GiftCard[];
1297
1297
  /**
1298
1298
  * The currency used for processing the payment, in three-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
1299
1299
  *
@@ -1307,7 +1307,7 @@ interface PaymentInfo {
1307
1307
  /** Full contact details for billing. */
1308
1308
  billingContact?: FullAddressContactDetails;
1309
1309
  }
1310
- interface GiftCard {
1310
+ interface V2GiftCard {
1311
1311
  /**
1312
1312
  * A unique identifier of the gift card within the Cart.
1313
1313
  * @format GUID
@@ -1495,9 +1495,9 @@ interface CartSummary {
1495
1495
  */
1496
1496
  additionalFees?: V2AdditionalFee[];
1497
1497
  /** Summary of tax calculations applied to the cart. */
1498
- taxSummary?: TaxSummary;
1498
+ taxSummary?: V2TaxSummary;
1499
1499
  /** Summary of all calculated price components in the cart. */
1500
- priceSummary?: PriceSummary;
1500
+ priceSummary?: V2PriceSummary;
1501
1501
  /** Payment details summarizing how the customer will pay for the order. */
1502
1502
  paymentSummary?: PaymentSummary;
1503
1503
  /**
@@ -1520,7 +1520,7 @@ interface CartSummary {
1520
1520
  * List of errors that occurred during the calculation process, returned by Totals Calculator.
1521
1521
  * TODO: Temporary field for backward compatibility; will be removed once we introduce the unified 'violations' model.
1522
1522
  */
1523
- calculationErrors?: CalculationErrors;
1523
+ calculationErrors?: V2CalculationErrors;
1524
1524
  /**
1525
1525
  * List of business violations raised by the Validations service plugin ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/service-plugins/validations/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/service-plugins/validations-integration-service-plugin/introduction)).
1526
1526
  * TODO: Temporary field for backward compatibility; will be removed once we introduce the unified 'violations' model.
@@ -1595,7 +1595,7 @@ interface V2AdditionalFee {
1595
1595
  */
1596
1596
  subscriptionCycles?: number | null;
1597
1597
  }
1598
- interface TaxSummary {
1598
+ interface V2TaxSummary {
1599
1599
  /**
1600
1600
  * List of taxes applied to the cart.
1601
1601
  * May contain multiple entries when advanced tax rates are configured by the merchant,
@@ -1656,7 +1656,7 @@ interface AdditionalFeeTax {
1656
1656
  /** Tax amount applied to the additional fee. */
1657
1657
  tax?: ConvertedMoney;
1658
1658
  }
1659
- interface PriceSummary {
1659
+ interface V2PriceSummary {
1660
1660
  /**
1661
1661
  * Total price of all line items after applying item-level discounts.
1662
1662
  * Includes tax if `tax_summary.prices_include_tax` is true.
@@ -1694,7 +1694,7 @@ interface PaymentSummary {
1694
1694
  * A list of valid memberships that will be charged as part of the order.
1695
1695
  * @maxSize 300
1696
1696
  */
1697
- memberships?: Membership[];
1697
+ memberships?: V2Membership[];
1698
1698
  /**
1699
1699
  * Charges information for each subscription in the checkout.
1700
1700
  * @maxSize 100
@@ -1720,7 +1720,7 @@ interface GiftCardSummary {
1720
1720
  /** The amount to be reduced from the gift card's balance. */
1721
1721
  redeemAmount?: ConvertedMoney;
1722
1722
  }
1723
- interface Membership {
1723
+ interface V2Membership {
1724
1724
  /**
1725
1725
  * Membership ID.
1726
1726
  * @minLength 1
@@ -1767,15 +1767,15 @@ interface Charge {
1767
1767
  /** The number of cycles for which the charge is applicable. */
1768
1768
  cycleCount?: number | null;
1769
1769
  /** Charge summary. */
1770
- priceSummary?: PriceSummary;
1770
+ priceSummary?: V2PriceSummary;
1771
1771
  /** The billing date from which the charge starts. */
1772
1772
  cycleBillingDate?: Date | null;
1773
1773
  }
1774
- interface CalculationErrors extends CalculationErrorsShippingCalculationErrorOneOf {
1774
+ interface V2CalculationErrors extends V2CalculationErrorsShippingCalculationErrorOneOf {
1775
1775
  /** General shipping calculation error. */
1776
1776
  generalShippingCalculationError?: Details;
1777
1777
  /** Carrier errors. */
1778
- carrierErrors?: CarrierErrors;
1778
+ carrierErrors?: V2CarrierErrors;
1779
1779
  /** Tax calculation error. */
1780
1780
  taxCalculationError?: Details;
1781
1781
  /** Coupon calculation error. */
@@ -1796,11 +1796,11 @@ interface CalculationErrors extends CalculationErrorsShippingCalculationErrorOne
1796
1796
  discountsCalculationError?: Details;
1797
1797
  }
1798
1798
  /** @oneof */
1799
- interface CalculationErrorsShippingCalculationErrorOneOf {
1799
+ interface V2CalculationErrorsShippingCalculationErrorOneOf {
1800
1800
  /** General shipping calculation error. */
1801
1801
  generalShippingCalculationError?: Details;
1802
1802
  /** Carrier errors. */
1803
- carrierErrors?: CarrierErrors;
1803
+ carrierErrors?: V2CarrierErrors;
1804
1804
  }
1805
1805
  interface Details extends DetailsKindOneOf {
1806
1806
  applicationError?: ApplicationError;
@@ -1898,14 +1898,14 @@ interface SystemError {
1898
1898
  /** Error code. */
1899
1899
  errorCode?: string | null;
1900
1900
  }
1901
- interface CarrierErrors {
1901
+ interface V2CarrierErrors {
1902
1902
  /**
1903
1903
  * Carrier errors.
1904
1904
  * @maxSize 100
1905
1905
  */
1906
- errors?: CarrierError[];
1906
+ errors?: V2CarrierError[];
1907
1907
  }
1908
- interface CarrierError {
1908
+ interface V2CarrierError {
1909
1909
  /**
1910
1910
  * Carrier ID.
1911
1911
  * @format GUID
@@ -2030,7 +2030,7 @@ interface CatalogItemInput {
2030
2030
  */
2031
2031
  quantity?: number;
2032
2032
  /** Selected membership to be used as payment for this item. */
2033
- selectedMembership?: SelectedMembership;
2033
+ selectedMembership?: V2SelectedMembership;
2034
2034
  /**
2035
2035
  * Overriding values for catalog item properties.
2036
2036
  * To override catalog fields, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
@@ -2342,7 +2342,7 @@ interface SelectedMembershipUpdate {
2342
2342
  *
2343
2343
  * To just remove current selected membership, and not replace with a new one, pass an empty value here.
2344
2344
  */
2345
- newMembership?: SelectedMembership;
2345
+ newMembership?: V2SelectedMembership;
2346
2346
  }
2347
2347
  interface UpdateLineItemsInCurrentCartResponse {
2348
2348
  /** Updated Cart. */
@@ -2596,6 +2596,34 @@ interface GetCartResponse {
2596
2596
  /** The requested Cart. */
2597
2597
  cart?: Cart;
2598
2598
  }
2599
+ /** temp for client testing */
2600
+ interface DummyErrorDataMethodLevel {
2601
+ /** This is a dummy field. */
2602
+ invalidItems?: LineItemIdentifier[];
2603
+ /** The fresh cart after resolving the error. */
2604
+ freshCart?: Cart;
2605
+ /** dummy string */
2606
+ dummyMethod?: string;
2607
+ }
2608
+ interface LineItemIdentifier extends LineItemIdentifierIdOneOf {
2609
+ /**
2610
+ * Line Item ID.
2611
+ * @format GUID
2612
+ */
2613
+ lineItemId?: string;
2614
+ /** Catalog reference. */
2615
+ catalogReference?: CatalogReference;
2616
+ }
2617
+ /** @oneof */
2618
+ interface LineItemIdentifierIdOneOf {
2619
+ /**
2620
+ * Line Item ID.
2621
+ * @format GUID
2622
+ */
2623
+ lineItemId?: string;
2624
+ /** Catalog reference. */
2625
+ catalogReference?: CatalogReference;
2626
+ }
2599
2627
  interface UpdateCartRequest {
2600
2628
  /** Cart to be updated, may be partial. */
2601
2629
  cart: Cart;
@@ -2653,6 +2681,910 @@ interface CalculateCartResponse {
2653
2681
  /** The calculation summary. */
2654
2682
  summary?: CartSummary;
2655
2683
  }
2684
+ interface CalculateCartWithFullResponseResponse {
2685
+ /** The Cart that was calculated. */
2686
+ cart?: Cart;
2687
+ /** The calculation summary. */
2688
+ summary?: CartSummary;
2689
+ /**
2690
+ * Totals payload used for backward compatibility with legacy clients.
2691
+ * Used by the Cart and Checkout proxies.
2692
+ */
2693
+ totalsResponse?: CalculateTotalsResponse;
2694
+ }
2695
+ interface CalculateTotalsResponse {
2696
+ /** Calculate line items. */
2697
+ calculatedLineItems?: CalculatedLineItem[];
2698
+ /** Price summary. */
2699
+ priceSummary?: PriceSummary;
2700
+ /** Details of applied gift card. */
2701
+ giftCard?: GiftCard;
2702
+ /** Tax summary. */
2703
+ taxSummary?: TaxSummary;
2704
+ /** Shipping information. */
2705
+ shippingInfo?: ShippingInformation;
2706
+ /**
2707
+ * Applied discounts.
2708
+ * @maxSize 320
2709
+ */
2710
+ appliedDiscounts?: AppliedDiscount[];
2711
+ /** Calculation errors. */
2712
+ calculationErrors?: CalculationErrors;
2713
+ /** Weight unit. */
2714
+ weightUnit?: WeightUnitWithLiterals;
2715
+ /**
2716
+ * Currency.
2717
+ * @format CURRENCY
2718
+ */
2719
+ currency?: string;
2720
+ /**
2721
+ * This is the display currency. Converted prices are presented in this currency.
2722
+ * @readonly
2723
+ * @format CURRENCY
2724
+ */
2725
+ conversionCurrency?: string;
2726
+ /** Whether tax is included in price. */
2727
+ taxIncludedInPrice?: boolean;
2728
+ /**
2729
+ * Minimal amount to pay in order to place the order.
2730
+ * @readonly
2731
+ */
2732
+ payNow?: PriceSummary;
2733
+ /**
2734
+ * Remaining amount for the order to be fully paid.
2735
+ * @readonly
2736
+ */
2737
+ payLater?: PriceSummary;
2738
+ /** Information about valid and invalid memberships, and which ones are selected for usage. */
2739
+ membershipOptions?: MembershipOptions;
2740
+ /**
2741
+ * Additional Fees
2742
+ * @maxSize 100
2743
+ */
2744
+ additionalFees?: AdditionalFee[];
2745
+ /**
2746
+ * The site currency.
2747
+ * @readonly
2748
+ * @format CURRENCY
2749
+ */
2750
+ siteCurrency?: string;
2751
+ /**
2752
+ * The rate used when converting from the site currency to the checkout currency.
2753
+ * @readonly
2754
+ * @decimalValue options { gt:0, lte:1000000000000000 }
2755
+ */
2756
+ checkoutConversionRate?: string | null;
2757
+ /**
2758
+ * The pay now total amount after the gift card is applied.
2759
+ * @readonly
2760
+ */
2761
+ payNowTotalAfterGiftCard?: MultiCurrencyPrice;
2762
+ /**
2763
+ * The total amount after gift card is applied.
2764
+ * @readonly
2765
+ */
2766
+ totalAfterGiftCard?: MultiCurrencyPrice;
2767
+ /**
2768
+ * Payment for subscriptions after free trial period.
2769
+ * @readonly
2770
+ */
2771
+ payAfterFreeTrial?: PriceSummary;
2772
+ }
2773
+ interface CalculatedLineItem {
2774
+ /** Line item ID. */
2775
+ lineItemId?: string;
2776
+ /** Price breakdown for this line item. */
2777
+ pricesBreakdown?: LineItemPricesData;
2778
+ /**
2779
+ * Type of selected payment option for current item. Supported values:
2780
+ * + `"FULL_PAYMENT_ONLINE"` - The entire payment for this item will happen as part of the checkout
2781
+ * + `"FULL_PAYMENT_OFFLINE"` - The entire payment for this item will happen after the checkout
2782
+ * + `"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
2783
+ * + `"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.
2784
+ */
2785
+ paymentOption?: PaymentOptionTypeWithLiterals;
2786
+ /** tax calculation address. */
2787
+ taxableAddress?: TaxableAddress;
2788
+ }
2789
+ interface LineItemPricesData {
2790
+ /** Total price after discounts, tax, and modifiers. */
2791
+ totalPriceAfterTax?: MultiCurrencyPrice;
2792
+ /** Total price after discounts and modifiers, and before tax. */
2793
+ totalPriceBeforeTax?: MultiCurrencyPrice;
2794
+ /** Tax details. */
2795
+ taxDetails?: ItemTaxFullDetails;
2796
+ /** Total discount applied for the line item. */
2797
+ totalDiscount?: MultiCurrencyPrice;
2798
+ /** Catalog price after catalog-defined discount, automatic discounts, and modifiers. */
2799
+ price?: MultiCurrencyPrice;
2800
+ /**
2801
+ * Item price before automatic discounts, coupons, and global discounts; after catalog-defined discounts and modifiers.
2802
+ * Defaults to `price` when not provided.
2803
+ */
2804
+ priceBeforeDiscounts?: MultiCurrencyPrice;
2805
+ /** Total line item price after catalog-defined discounts, automatic discounts, and modifiers. */
2806
+ lineItemPrice?: MultiCurrencyPrice;
2807
+ /**
2808
+ * Item price before all discounts and modifiers.
2809
+ * Defaults to `price` when not provided.
2810
+ */
2811
+ fullPrice?: MultiCurrencyPrice;
2812
+ /**
2813
+ * Partial payment to be paid upfront during the checkout.
2814
+ * Applies to catalog items with `lineItem.paymentOption` type `DEPOSIT_ONLINE` only.
2815
+ */
2816
+ depositAmount?: MultiCurrencyPrice;
2817
+ }
2818
+ interface MultiCurrencyPrice {
2819
+ /**
2820
+ * Amount.
2821
+ * @decimalValue options { gte:0, lte:1000000000000000 }
2822
+ */
2823
+ amount?: string;
2824
+ /**
2825
+ * Converted amount.
2826
+ * @readonly
2827
+ * @decimalValue options { gte:0, lte:1000000000000000 }
2828
+ */
2829
+ convertedAmount?: string;
2830
+ /**
2831
+ * Amount formatted with currency symbol.
2832
+ * @readonly
2833
+ */
2834
+ formattedAmount?: string;
2835
+ /**
2836
+ * Converted amount formatted with currency symbol.
2837
+ * @readonly
2838
+ */
2839
+ formattedConvertedAmount?: string;
2840
+ }
2841
+ interface ItemTaxFullDetails {
2842
+ /** Amount for which tax is calculated. */
2843
+ taxableAmount?: MultiCurrencyPrice;
2844
+ /**
2845
+ * Tax rate %, as a decimal point between 0 and 1.
2846
+ * @decimalValue options { gte:0, lte:1, maxScale:6 }
2847
+ */
2848
+ taxRate?: string;
2849
+ /** Calculated tax, based on `taxable_amount` and `tax_rate`. */
2850
+ totalTax?: MultiCurrencyPrice;
2851
+ /**
2852
+ * If breakdown exists, the sum of rates in the breakdown must equal `tax_rate`. Deprecated - use 'tax_breakdown' instead.
2853
+ * @readonly
2854
+ * @deprecated
2855
+ */
2856
+ rateBreakdown?: TaxRateBreakdown[];
2857
+ /**
2858
+ * tax information for a line item.
2859
+ * @maxSize 1000
2860
+ * @readonly
2861
+ */
2862
+ taxBreakdown?: TaxBreakdown[];
2863
+ }
2864
+ interface TaxRateBreakdown {
2865
+ /**
2866
+ * Name of tax against which the calculation was performed.
2867
+ * @maxLength 100
2868
+ */
2869
+ name?: string;
2870
+ /**
2871
+ * Rate at which this tax detail was calculated.
2872
+ * @decimalValue options { gte:0, lte:1, maxScale:6 }
2873
+ */
2874
+ rate?: string;
2875
+ /** Amount of tax for this tax detail. */
2876
+ tax?: MultiCurrencyPrice;
2877
+ }
2878
+ /**
2879
+ * TaxBreakdown represents tax information for a line item.
2880
+ * It holds the tax amount and the tax rate for each tax authority that apply on the line item.
2881
+ */
2882
+ interface TaxBreakdown {
2883
+ /**
2884
+ * The name of the jurisdiction to which this tax detail applies. For example, "New York" or "Quebec".
2885
+ * @maxLength 200
2886
+ */
2887
+ jurisdiction?: string | null;
2888
+ /** The amount of this line item price that was considered nontaxable. (Decimal value) */
2889
+ nonTaxableAmount?: MultiCurrencyPrice;
2890
+ /**
2891
+ * The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.0000 signifies 200% tax. (Decimal value)
2892
+ * @decimalValue options { gte:0, maxScale:6 }
2893
+ */
2894
+ rate?: string | null;
2895
+ /** The amount of tax estimated for this line item. (Decimal value) */
2896
+ taxAmount?: MultiCurrencyPrice;
2897
+ /** The taxable amount of this line item. */
2898
+ taxableAmount?: MultiCurrencyPrice;
2899
+ /**
2900
+ * The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, "Sales Tax", "Income Tax", "Value Added Tax", etc.
2901
+ * @maxLength 200
2902
+ */
2903
+ taxType?: string | null;
2904
+ /**
2905
+ * The name of the tax against which this tax amount was calculated. For example, "NY State Sales Tax", "Quebec GST", etc.
2906
+ * This name should be explicit enough to allow the merchant to understand what tax was calculated.
2907
+ * @maxLength 200
2908
+ */
2909
+ taxName?: string | null;
2910
+ /** The type of the jurisdiction in which this tax detail applies. */
2911
+ jurisdictionType?: JurisdictionTypeWithLiterals;
2912
+ }
2913
+ /** JurisdictionType represents the type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
2914
+ declare enum JurisdictionType {
2915
+ UNDEFINED = "UNDEFINED",
2916
+ COUNTRY = "COUNTRY",
2917
+ STATE = "STATE",
2918
+ COUNTY = "COUNTY",
2919
+ CITY = "CITY",
2920
+ SPECIAL = "SPECIAL"
2921
+ }
2922
+ /** @enumType */
2923
+ type JurisdictionTypeWithLiterals = JurisdictionType | 'UNDEFINED' | 'COUNTRY' | 'STATE' | 'COUNTY' | 'CITY' | 'SPECIAL';
2924
+ interface CalculatedItemModifier {
2925
+ /**
2926
+ * Modifier ID.
2927
+ * @minLength 1
2928
+ * @maxLength 36
2929
+ */
2930
+ _id?: string;
2931
+ /**
2932
+ * ID of the group this modifier belongs to.
2933
+ * @minLength 1
2934
+ * @maxLength 36
2935
+ */
2936
+ groupId?: string;
2937
+ /**
2938
+ * Modifier price.
2939
+ * @readonly
2940
+ */
2941
+ price?: MultiCurrencyPrice;
2942
+ }
2943
+ interface PriceSummary {
2944
+ /** Subtotal of all line items, before discounts and before tax. */
2945
+ subtotal?: MultiCurrencyPrice;
2946
+ /** Total shipping price, before discounts and before tax. */
2947
+ shipping?: MultiCurrencyPrice;
2948
+ /** Total tax. */
2949
+ tax?: MultiCurrencyPrice;
2950
+ /** Total calculated discount value. */
2951
+ discount?: MultiCurrencyPrice;
2952
+ /** Total price after discounts, gift cards, and tax. */
2953
+ total?: MultiCurrencyPrice;
2954
+ /** Total additional fees price before tax. */
2955
+ additionalFees?: MultiCurrencyPrice;
2956
+ }
2957
+ interface GiftCard {
2958
+ /**
2959
+ * Gift Card ID.
2960
+ * @deprecated
2961
+ */
2962
+ _id?: string;
2963
+ /** Gift card obfuscated code. */
2964
+ obfuscatedCode?: string;
2965
+ /** Actual amount to be redeemed from the gift card. */
2966
+ amount?: MultiCurrencyPrice;
2967
+ /**
2968
+ * App ID of the gift card provider.
2969
+ * @format GUID
2970
+ */
2971
+ appId?: string;
2972
+ /**
2973
+ * External ID in the gift card provider's system.
2974
+ * Used for integration and tracking across different platforms.
2975
+ * @minLength 1
2976
+ * @maxLength 50
2977
+ */
2978
+ externalId?: string | null;
2979
+ /** Requested amount to redeem from the gift card. */
2980
+ requestedAmount?: MultiCurrencyPrice;
2981
+ }
2982
+ interface TaxSummary {
2983
+ /**
2984
+ * Amount for which tax is calculated, added from line items.
2985
+ * @readonly
2986
+ */
2987
+ taxableAmount?: MultiCurrencyPrice;
2988
+ /**
2989
+ * Calculated tax, added from line items.
2990
+ * @readonly
2991
+ */
2992
+ totalTax?: MultiCurrencyPrice;
2993
+ /**
2994
+ * Tax calculator that was active when the order was created.
2995
+ * @deprecated
2996
+ */
2997
+ calculationDetails?: TaxCalculationDetails;
2998
+ }
2999
+ interface TaxCalculationDetails extends TaxCalculationDetailsCalculationDetailsOneOf {
3000
+ /** Reason the manual calculation was used. */
3001
+ manualRateReason?: ManualCalculationReasonWithLiterals;
3002
+ /** Details of the fallback rate calculation. */
3003
+ autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetails;
3004
+ /** Rate calculation type. */
3005
+ rateType?: RateTypeWithLiterals;
3006
+ }
3007
+ /** @oneof */
3008
+ interface TaxCalculationDetailsCalculationDetailsOneOf {
3009
+ /** Reason the manual calculation was used. */
3010
+ manualRateReason?: ManualCalculationReasonWithLiterals;
3011
+ /** Details of the fallback rate calculation. */
3012
+ autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetails;
3013
+ }
3014
+ declare enum RateType {
3015
+ /** no tax being collected for this request due to location of purchase */
3016
+ NO_TAX_COLLECTED = "NO_TAX_COLLECTED",
3017
+ /** manual rate used for calculation */
3018
+ MANUAL_RATE = "MANUAL_RATE",
3019
+ /** autotax rate used for calculation */
3020
+ AUTO_RATE = "AUTO_RATE",
3021
+ /** fallback rate used for calculation */
3022
+ FALLBACK_RATE = "FALLBACK_RATE"
3023
+ }
3024
+ /** @enumType */
3025
+ type RateTypeWithLiterals = RateType | 'NO_TAX_COLLECTED' | 'MANUAL_RATE' | 'AUTO_RATE' | 'FALLBACK_RATE';
3026
+ declare enum ManualCalculationReason {
3027
+ /** user set calculator in Business Manager to be Manual */
3028
+ GLOBAL_SETTING_TO_MANUAL = "GLOBAL_SETTING_TO_MANUAL",
3029
+ /** specific region is on manual even though Global setting is Auto-tax */
3030
+ REGION_SETTING_TO_MANUAL = "REGION_SETTING_TO_MANUAL"
3031
+ }
3032
+ /** @enumType */
3033
+ type ManualCalculationReasonWithLiterals = ManualCalculationReason | 'GLOBAL_SETTING_TO_MANUAL' | 'REGION_SETTING_TO_MANUAL';
3034
+ interface AutoTaxFallbackCalculationDetails {
3035
+ /** reason for fallback */
3036
+ fallbackReason?: FallbackReasonWithLiterals;
3037
+ /** invalid request (i.e. address), timeout, internal error, license error, and others will be encoded here */
3038
+ error?: ApplicationError;
3039
+ }
3040
+ declare enum FallbackReason {
3041
+ /** auto-tax failed to be calculated */
3042
+ AUTO_TAX_FAILED = "AUTO_TAX_FAILED",
3043
+ /** auto-tax was temporarily deactivated on a system-level */
3044
+ AUTO_TAX_DEACTIVATED = "AUTO_TAX_DEACTIVATED"
3045
+ }
3046
+ /** @enumType */
3047
+ type FallbackReasonWithLiterals = FallbackReason | 'AUTO_TAX_FAILED' | 'AUTO_TAX_DEACTIVATED';
3048
+ /**
3049
+ * 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.
3050
+ * Tax breakdown is the tax amount split to the tax authorities that applied on the line item.
3051
+ */
3052
+ interface AggregatedTaxBreakdown {
3053
+ /**
3054
+ * The name of the tax against which this tax amount was calculated.
3055
+ * @maxLength 200
3056
+ */
3057
+ taxName?: string;
3058
+ /**
3059
+ * The type of tax that was calculated. Depends on the company's nexus settings as well as the jurisdiction's tax laws.
3060
+ * @maxLength 200
3061
+ */
3062
+ taxType?: string;
3063
+ /**
3064
+ * The name of the jurisdiction in which this tax detail applies.
3065
+ * @maxLength 200
3066
+ */
3067
+ jurisdiction?: string;
3068
+ /** The type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
3069
+ jurisdictionTypeEnum?: JurisdictionTypeWithLiterals;
3070
+ /**
3071
+ * The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.000 signifies 200% tax. (Decimal value)
3072
+ * @decimalValue options { gte:0, maxScale:6 }
3073
+ */
3074
+ rate?: string;
3075
+ /** The sum of all the tax from line items that calculated by the tax identifiers. */
3076
+ aggregatedTaxAmount?: MultiCurrencyPrice;
3077
+ /** The sum of all the taxable amount from line items for tax identifiers. */
3078
+ aggregatedTaxableAmount?: MultiCurrencyPrice;
3079
+ }
3080
+ interface ShippingInformation {
3081
+ /** Shipping region. */
3082
+ region?: ShippingRegion;
3083
+ /** Selected shipping option. */
3084
+ selectedCarrierServiceOption?: SelectedCarrierServiceOption;
3085
+ /** All shipping options. */
3086
+ carrierServiceOptions?: CarrierServiceOption[];
3087
+ }
3088
+ interface ShippingRegion {
3089
+ /**
3090
+ * Shipping region ID.
3091
+ * @format GUID
3092
+ * @readonly
3093
+ */
3094
+ _id?: string;
3095
+ /**
3096
+ * Shipping region name.
3097
+ * @maxLength 100
3098
+ */
3099
+ name?: string;
3100
+ }
3101
+ interface SelectedCarrierServiceOption {
3102
+ /**
3103
+ * Unique identifier of selected option. For example, "usps_std_overnight".
3104
+ * @maxLength 100
3105
+ */
3106
+ code?: string;
3107
+ /**
3108
+ * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale).
3109
+ * For example, "Standard" or "First-Class Package International".
3110
+ * @maxLength 250
3111
+ * @readonly
3112
+ */
3113
+ title?: string;
3114
+ /**
3115
+ * Delivery logistics.
3116
+ * @readonly
3117
+ */
3118
+ logistics?: DeliveryLogistics;
3119
+ /**
3120
+ * Shipping costs.
3121
+ * @readonly
3122
+ */
3123
+ cost?: SelectedCarrierServiceOptionPrices;
3124
+ /**
3125
+ * Were we able to find the requested shipping option, or otherwise we fallback to the default one (the first)
3126
+ * @readonly
3127
+ */
3128
+ requestedShippingOption?: boolean;
3129
+ /**
3130
+ * Other charges
3131
+ * @deprecated Other charges
3132
+ * @replacedBy additional_fees
3133
+ * @targetRemovalDate 2025-10-01
3134
+ */
3135
+ otherCharges?: SelectedCarrierServiceOptionOtherCharge[];
3136
+ /**
3137
+ * This carrier's unique ID
3138
+ * @format GUID
3139
+ */
3140
+ carrierId?: string | null;
3141
+ /**
3142
+ * Delivery solution allocations to different delivery carriers and delivery regions
3143
+ * @maxSize 300
3144
+ */
3145
+ deliveryAllocations?: DeliveryAllocation[];
3146
+ /** If the delivery solution is a partial and doesn't apply to all items. */
3147
+ partial?: boolean | null;
3148
+ }
3149
+ interface DeliveryLogistics {
3150
+ /**
3151
+ * Expected delivery time, in free text. For example, "3-5 business days".
3152
+ * @maxLength 500
3153
+ */
3154
+ deliveryTime?: string | null;
3155
+ /**
3156
+ * Instructions for caller, e.g for pickup: "Please deliver during opening hours, and please don't park in disabled parking spot".
3157
+ * @maxLength 1000
3158
+ */
3159
+ instructions?: string | null;
3160
+ /** Pickup details. */
3161
+ pickupDetails?: PickupDetails;
3162
+ }
3163
+ interface PickupDetails {
3164
+ /** Pickup address. */
3165
+ address?: Address;
3166
+ /**
3167
+ * Whether the pickup address is that of a business - this may effect tax calculation.
3168
+ * @deprecated
3169
+ */
3170
+ businessLocation?: boolean;
3171
+ /** Pickup method */
3172
+ pickupMethod?: PickupMethodWithLiterals;
3173
+ }
3174
+ declare enum PickupMethod {
3175
+ UNKNOWN_METHOD = "UNKNOWN_METHOD",
3176
+ STORE_PICKUP = "STORE_PICKUP",
3177
+ PICKUP_POINT = "PICKUP_POINT"
3178
+ }
3179
+ /** @enumType */
3180
+ type PickupMethodWithLiterals = PickupMethod | 'UNKNOWN_METHOD' | 'STORE_PICKUP' | 'PICKUP_POINT';
3181
+ interface DeliveryTimeSlot {
3182
+ /** starting time of the delivery time slot */
3183
+ from?: Date | null;
3184
+ /** ending time of the delivery time slot */
3185
+ to?: Date | null;
3186
+ }
3187
+ interface SelectedCarrierServiceOptionPrices {
3188
+ /** Total shipping price, after discount and after tax. */
3189
+ totalPriceAfterTax?: MultiCurrencyPrice;
3190
+ /** Total price of shipping after discounts (when relevant), and before tax. */
3191
+ totalPriceBeforeTax?: MultiCurrencyPrice;
3192
+ /** Tax details. */
3193
+ taxDetails?: ItemTaxFullDetails;
3194
+ /** Shipping discount before tax. */
3195
+ totalDiscount?: MultiCurrencyPrice;
3196
+ /** Shipping price before discount and before tax. */
3197
+ price?: MultiCurrencyPrice;
3198
+ }
3199
+ interface SelectedCarrierServiceOptionOtherCharge {
3200
+ /** Type of additional cost. */
3201
+ type?: ChargeTypeWithLiterals;
3202
+ /**
3203
+ * Details of the charge, such as 'Full Coverage Insurance of up to 80% of value of shipment'.
3204
+ * @maxLength 200
3205
+ */
3206
+ details?: string | null;
3207
+ /** Price of added charge. */
3208
+ cost?: SelectedCarrierServiceOptionPrices;
3209
+ }
3210
+ declare enum ChargeType {
3211
+ HANDLING_FEE = "HANDLING_FEE",
3212
+ INSURANCE = "INSURANCE"
3213
+ }
3214
+ /** @enumType */
3215
+ type ChargeTypeWithLiterals = ChargeType | 'HANDLING_FEE' | 'INSURANCE';
3216
+ interface DeliveryAllocation {
3217
+ /** The delivery option's carrier details, could be multiple if the delivery option is a combination of multiple carriers */
3218
+ deliveryCarrier?: Carrier;
3219
+ /** The delivery region that are relevant for this delivery solution. */
3220
+ deliveryRegion?: Region;
3221
+ /** Populated if the delivery solution is a partially supplied by this carrier. */
3222
+ applicableLineItems?: ApplicableLineItems;
3223
+ }
3224
+ interface Carrier {
3225
+ /**
3226
+ * The carrier app id
3227
+ * @format GUID
3228
+ */
3229
+ appId?: string | null;
3230
+ /**
3231
+ * Unique code that acts as an ID for a shipping rate. For example, `"usps_std_overnight"`.
3232
+ * @maxLength 250
3233
+ */
3234
+ code?: string;
3235
+ }
3236
+ interface Region {
3237
+ /**
3238
+ * The delivery region id.
3239
+ * @format GUID
3240
+ */
3241
+ _id?: string | null;
3242
+ /**
3243
+ * The delivery region name.
3244
+ * @maxLength 100
3245
+ */
3246
+ name?: string | null;
3247
+ }
3248
+ interface ApplicableLineItems {
3249
+ /**
3250
+ * Line items that the delivery solution is for.
3251
+ * @maxSize 300
3252
+ * @minLength 1
3253
+ * @maxLength 100
3254
+ */
3255
+ lineItemIds?: string[];
3256
+ }
3257
+ interface CarrierServiceOption {
3258
+ /**
3259
+ * Carrier ID.
3260
+ * @format GUID
3261
+ */
3262
+ carrierId?: string;
3263
+ /** Shipping options offered by this carrier for this request. */
3264
+ shippingOptions?: ShippingOption[];
3265
+ }
3266
+ interface ShippingOption {
3267
+ /**
3268
+ * Unique code of provided shipping option like "usps_std_overnight".
3269
+ * For legacy calculators this would be the UUID of the option.
3270
+ * @maxLength 100
3271
+ */
3272
+ code?: string;
3273
+ /**
3274
+ * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale).
3275
+ * For example, "Standard" or "First-Class Package International".
3276
+ * @maxLength 250
3277
+ */
3278
+ title?: string;
3279
+ /** Delivery logistics. */
3280
+ logistics?: DeliveryLogistics;
3281
+ /** Sipping price information. */
3282
+ cost?: ShippingPrice;
3283
+ /**
3284
+ * Delivery solution allocations to different delivery carriers and delivery regions
3285
+ * @maxSize 300
3286
+ */
3287
+ deliveryAllocations?: DeliveryAllocation[];
3288
+ /** If the delivery solution is a partial and doesn't apply to all items. */
3289
+ partial?: boolean | null;
3290
+ }
3291
+ interface ShippingPrice {
3292
+ /** Shipping price. */
3293
+ price?: MultiCurrencyPrice;
3294
+ /** Other costs such as insurance, handling & packaging for fragile items, etc. */
3295
+ otherCharges?: OtherCharge[];
3296
+ }
3297
+ interface OtherCharge {
3298
+ /** Type of additional cost. */
3299
+ type?: ChargeTypeWithLiterals;
3300
+ /** Price of added cost. */
3301
+ price?: MultiCurrencyPrice;
3302
+ /**
3303
+ * Description of the additional charge. For example, `"Handling fee of $5 applied for gift wrapping"`.
3304
+ * @maxLength 250
3305
+ */
3306
+ details?: string | null;
3307
+ }
3308
+ interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
3309
+ /** Coupon details. */
3310
+ coupon?: Coupon;
3311
+ /** Merchant discount. */
3312
+ merchantDiscount?: MerchantDiscount;
3313
+ /** Discount rule */
3314
+ discountRule?: DiscountRule;
3315
+ /** Discount type. */
3316
+ discountType?: DiscountTypeWithLiterals;
3317
+ /**
3318
+ * IDs of line items the discount applies to.
3319
+ * @format GUID
3320
+ * @deprecated IDs of line items the discount applies to.
3321
+ * @replacedBy line_items_discounts
3322
+ * @targetRemovalDate 2025-12-31
3323
+ */
3324
+ lineItemIds?: string[];
3325
+ }
3326
+ /** @oneof */
3327
+ interface AppliedDiscountDiscountSourceOneOf {
3328
+ /** Coupon details. */
3329
+ coupon?: Coupon;
3330
+ /** Merchant discount. */
3331
+ merchantDiscount?: MerchantDiscount;
3332
+ /** Discount rule */
3333
+ discountRule?: DiscountRule;
3334
+ }
3335
+ declare enum DiscountType {
3336
+ GLOBAL = "GLOBAL",
3337
+ SPECIFIC_ITEMS = "SPECIFIC_ITEMS",
3338
+ SHIPPING = "SHIPPING"
3339
+ }
3340
+ /** @enumType */
3341
+ type DiscountTypeWithLiterals = DiscountType | 'GLOBAL' | 'SPECIFIC_ITEMS' | 'SHIPPING';
3342
+ /** Coupon */
3343
+ interface Coupon {
3344
+ /** Coupon ID. */
3345
+ _id?: string;
3346
+ /** Coupon code. */
3347
+ code?: string;
3348
+ /** Coupon value. */
3349
+ amount?: MultiCurrencyPrice;
3350
+ /** Coupon name. */
3351
+ name?: string;
3352
+ }
3353
+ interface MerchantDiscount {
3354
+ /** Discount value. */
3355
+ amount?: MultiCurrencyPrice;
3356
+ /**
3357
+ * Discount Percentage. Will be calculated from items price before other discounts.
3358
+ * @min 1
3359
+ * @max 100
3360
+ */
3361
+ percentage?: number | null;
3362
+ }
3363
+ interface DiscountRule {
3364
+ /**
3365
+ * Discount rule ID
3366
+ * @format GUID
3367
+ */
3368
+ _id?: string;
3369
+ /** Discount rule name */
3370
+ name?: DiscountRuleName;
3371
+ /** Discount value. */
3372
+ amount?: MultiCurrencyPrice;
3373
+ }
3374
+ interface DiscountRuleName {
3375
+ /**
3376
+ * Original discount rule name (in site's default language).
3377
+ * @minLength 1
3378
+ * @maxLength 256
3379
+ */
3380
+ original?: string;
3381
+ /**
3382
+ * Translated discount rule name according to buyer language. Defaults to `original` when not provided.
3383
+ * @minLength 1
3384
+ * @maxLength 500
3385
+ */
3386
+ translated?: string | null;
3387
+ }
3388
+ interface LineItemDiscount {
3389
+ /**
3390
+ * ID of line item the discount applies to.
3391
+ * @format GUID
3392
+ */
3393
+ _id?: string;
3394
+ /** Discount value. */
3395
+ totalDiscountAmount?: MultiCurrencyPrice;
3396
+ }
3397
+ interface CalculationErrors extends CalculationErrorsShippingCalculationErrorOneOf {
3398
+ /** General shipping calculation error. */
3399
+ generalShippingCalculationError?: Details;
3400
+ /** Carrier errors. */
3401
+ carrierErrors?: CarrierErrors;
3402
+ /** Tax calculation error. */
3403
+ taxCalculationError?: Details;
3404
+ /** Coupon calculation error. */
3405
+ couponCalculationError?: Details;
3406
+ /** Gift card calculation error. */
3407
+ giftCardCalculationError?: Details;
3408
+ /** Order validation errors. */
3409
+ orderValidationErrors?: ApplicationError[];
3410
+ /**
3411
+ * Membership payment methods calculation errors
3412
+ * For example, will indicate that a line item that must be paid with membership payment doesn't have one or selected memberships are invalid
3413
+ */
3414
+ membershipError?: Details;
3415
+ /** Discount Rule calculation error. */
3416
+ discountsCalculationError?: Details;
3417
+ }
3418
+ /** @oneof */
3419
+ interface CalculationErrorsShippingCalculationErrorOneOf {
3420
+ /** General shipping calculation error. */
3421
+ generalShippingCalculationError?: Details;
3422
+ /** Carrier errors. */
3423
+ carrierErrors?: CarrierErrors;
3424
+ }
3425
+ interface CarrierErrors {
3426
+ /** Carrier errors. */
3427
+ errors?: CarrierError[];
3428
+ }
3429
+ interface CarrierError {
3430
+ /** Carrier ID. */
3431
+ carrierId?: string;
3432
+ /** Error details. */
3433
+ error?: Details;
3434
+ }
3435
+ interface MembershipOptions {
3436
+ /**
3437
+ * List of payment options that can be used.
3438
+ * @maxSize 300
3439
+ */
3440
+ eligibleMemberships?: Membership[];
3441
+ /**
3442
+ * List of payment options that are owned by the member, but cannot be used due to reason provided.
3443
+ * @maxSize 300
3444
+ */
3445
+ invalidMemberships?: InvalidMembership[];
3446
+ /**
3447
+ * The selected membership payment options and which line items they apply to.
3448
+ * @maxSize 300
3449
+ */
3450
+ selectedMemberships?: SelectedMembership[];
3451
+ }
3452
+ interface Membership {
3453
+ /**
3454
+ * Membership ID.
3455
+ * @minLength 1
3456
+ * @maxLength 100
3457
+ */
3458
+ _id?: string;
3459
+ /**
3460
+ * ID of the application providing this payment option.
3461
+ * @format GUID
3462
+ */
3463
+ appId?: string;
3464
+ /** The name of this membership. */
3465
+ name?: MembershipName;
3466
+ /**
3467
+ * Line item IDs which are "paid" for by this membership.
3468
+ * @minSize 1
3469
+ * @maxSize 300
3470
+ * @minLength 1
3471
+ * @maxLength 100
3472
+ */
3473
+ lineItemIds?: string[];
3474
+ /** Optional - For a membership that has limited credits, information about credit usage. */
3475
+ credits?: MembershipPaymentCredits;
3476
+ /** Optional - TMembership expiry date. */
3477
+ expirationDate?: Date | null;
3478
+ /** Additional data about this membership. */
3479
+ additionalData?: Record<string, any> | null;
3480
+ }
3481
+ interface MembershipName {
3482
+ /**
3483
+ * Membership name.
3484
+ * @maxLength 100
3485
+ */
3486
+ original?: string;
3487
+ /**
3488
+ * Translated membership name. Defaults to `original` when not provided.
3489
+ * @maxLength 100
3490
+ */
3491
+ translated?: string | null;
3492
+ }
3493
+ interface MembershipPaymentCredits {
3494
+ /**
3495
+ * Membership's total amount of credits.
3496
+ * @min 1
3497
+ */
3498
+ total?: number;
3499
+ /** Membership's remaining amount of credits. */
3500
+ remaining?: number;
3501
+ }
3502
+ interface InvalidMembership {
3503
+ /** Membership details. */
3504
+ membership?: Membership;
3505
+ /**
3506
+ * Reason why this membership is invalid and cannot be used.
3507
+ * @minLength 1
3508
+ * @maxLength 100
3509
+ */
3510
+ reason?: string;
3511
+ }
3512
+ interface SelectedMembership {
3513
+ /**
3514
+ * Membership ID.
3515
+ * @minLength 1
3516
+ * @maxLength 100
3517
+ */
3518
+ _id?: string;
3519
+ /**
3520
+ * ID of the app providing this payment option.
3521
+ * @format GUID
3522
+ */
3523
+ appId?: string;
3524
+ /**
3525
+ * IDs of the line items this membership applies to.
3526
+ * @minSize 1
3527
+ * @maxSize 300
3528
+ * @minLength 1
3529
+ * @maxLength 100
3530
+ */
3531
+ lineItemIds?: string[];
3532
+ }
3533
+ interface AdditionalFee {
3534
+ /**
3535
+ * Additional fee's unique code (or ID) for future processing.
3536
+ * @minLength 1
3537
+ * @maxLength 100
3538
+ */
3539
+ code?: string | null;
3540
+ /**
3541
+ * Translated additional fee's name.
3542
+ * @minLength 1
3543
+ * @maxLength 50
3544
+ */
3545
+ name?: string;
3546
+ /** Additional fee's price. */
3547
+ price?: MultiCurrencyPrice;
3548
+ /** Tax details. */
3549
+ taxDetails?: ItemTaxFullDetails;
3550
+ /**
3551
+ * Provider's app id.
3552
+ * @minLength 1
3553
+ * @maxLength 100
3554
+ */
3555
+ providerAppId?: string | null;
3556
+ /** Additional fee's price before tax. */
3557
+ priceBeforeTax?: MultiCurrencyPrice;
3558
+ /** Additional fee's price after tax. */
3559
+ priceAfterTax?: MultiCurrencyPrice;
3560
+ /**
3561
+ * Optional - Line items associated with this additional fee.
3562
+ * If no `lineItemIds` are provided, the fee will be associated with the whole cart/checkout/order.
3563
+ * @format GUID
3564
+ */
3565
+ lineItemIds?: string[];
3566
+ /** the source the additional fee was added from */
3567
+ source?: AdditionalFeeSourceWithLiterals;
3568
+ /**
3569
+ * 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).
3570
+ * @minLength 1
3571
+ * @maxLength 50
3572
+ */
3573
+ translatedName?: string | null;
3574
+ }
3575
+ declare enum AdditionalFeeSource {
3576
+ UNKNOWN_ADDITIONAL_FEE_SOURCE = "UNKNOWN_ADDITIONAL_FEE_SOURCE",
3577
+ /** The additional fee was added by an additional fee service plugin */
3578
+ SERVICE_PLUGIN = "SERVICE_PLUGIN",
3579
+ /** The additional fee was added on the item either via the catalog or on custom line item */
3580
+ ITEM = "ITEM",
3581
+ /** The additional fee was added manually on the request */
3582
+ MANUAL = "MANUAL",
3583
+ /** The additional fee was added by the shipping provider */
3584
+ SHIPPING = "SHIPPING"
3585
+ }
3586
+ /** @enumType */
3587
+ type AdditionalFeeSourceWithLiterals = AdditionalFeeSource | 'UNKNOWN_ADDITIONAL_FEE_SOURCE' | 'SERVICE_PLUGIN' | 'ITEM' | 'MANUAL' | 'SHIPPING';
2656
3588
  interface GetCheckoutURLRequest {
2657
3589
  /**
2658
3590
  * ID of the Cart to calculate.
@@ -2914,6 +3846,12 @@ interface HeadersEntry {
2914
3846
  key?: string;
2915
3847
  value?: string;
2916
3848
  }
3849
+ /** @docsIgnore */
3850
+ type GetCartApplicationErrors = {
3851
+ code?: 'DUMMY_ERROR_METHOD_CODE';
3852
+ description?: string;
3853
+ data?: DummyErrorDataMethodLevel;
3854
+ };
2917
3855
  interface CreateCartOptions {
2918
3856
  /** Cart to be created. */
2919
3857
  cart?: Cart;
@@ -2996,7 +3934,7 @@ interface UpdateCart {
2996
3934
  * @maxSize 1
2997
3935
  * @readonly
2998
3936
  */
2999
- coupons?: Coupon[];
3937
+ coupons?: V2Coupon[];
3000
3938
  /** Information about the source of the Cart, detailing the origin or context in which the Cart was created. */
3001
3939
  source?: CartSource;
3002
3940
  /** Information about the site from which the Cart's line items were added. */
@@ -3129,4 +4067,4 @@ interface MarkCartAsCompletedOptions {
3129
4067
  orderId?: string | null;
3130
4068
  }
3131
4069
 
3132
- export { type ActionEvent, type AddCouponRequest, type AddCouponResponse, type AddCouponToCurrentCartRequest, type AddCouponToCurrentCartResponse, type AddGiftCardRequest, type AddGiftCardResponse, type AddGiftCardToCurrentCartRequest, type AddGiftCardToCurrentCartResponse, type AddLineItemsOptions, type AddLineItemsRequest, type AddLineItemsResponse, type AddLineItemsToCurrentCartRequest, type AddLineItemsToCurrentCartResponse, type AdditionalFee, type AdditionalFeeTax, type Address, type AddressLocation, type ApplicationError, type BusinessInfo, type CalculateCartOptions, type CalculateCartRequest, type CalculateCartResponse, type CalculateCurrentCartRequest, type CalculateCurrentCartResponse, type CalculationConfig, type CalculationErrors, type CalculationErrorsShippingCalculationErrorOneOf, type CarrierError, type CarrierErrors, type Cart, type CartSettings, type CartSource, type CartSummary, type CatalogItemInput, type CatalogOverrideFields, type CatalogReference, ChannelType, type ChannelTypeWithLiterals, type Charge, type Color, type ConvertedMoney, type Coupon, type CreateCartOptions, type CreateCartRequest, type CreateCartResponse, type CreateCurrentCartRequest, type CreateCurrentCartResponse, type CreatedBy, type CreatedByIdOneOf, type CustomContentReference, type CustomField, type CustomItemAttributes, type CustomItemDeliveryConfig, type CustomItemInput, type CustomItemPaymentConfig, type CustomItemPricingInfo, type CustomItemQuantityInfo, type CustomItemSource, type CustomItemTaxConfig, type CustomerInfo, type CustomerInfoIdOneOf, type DeleteCartRequest, type DeleteCartResponse, type DeleteCurrentCartRequest, type DeleteCurrentCartResponse, type DeliveryInfo, type DeliveryMethod, type DeliveryMethodInput, type DeliverySummary, type Description, type DescriptionLine, type DescriptionLineDescriptionLineValueOneOf, type DescriptionLineName, DescriptionLineType, type DescriptionLineTypeWithLiterals, type DescriptionLineValueOneOf, type Details, type DetailsKindOneOf, type Discount, type DiscountBenefit, type DiscountBenefitValueOneOf, DiscountScope, type DiscountScopeWithLiterals, type DiscountSource, DiscountSourceType, type DiscountSourceTypeWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ExtendedFields, type ExternalReference, type FieldViolation, FileType, type FileTypeWithLiterals, type FreeTrialPeriod, type FullAddressContactDetails, type GetCartRequest, type GetCartResponse, type GetCheckoutURLRequest, type GetCheckoutURLResponse, type GetCheckoutUrlOptions, type GetCurrentCartRequest, type GetCurrentCartResponse, type GiftCard, type GiftCardSummary, type Group, type HandleAsyncCheckoutCompletionRequest, type HeadersEntry, type IdentificationData, type IdentificationDataIdOneOf, type ItemAttributes, type ItemDeliveryConfig, type ItemDiscount, type ItemModifier, type ItemPaymentConfig, type ItemPriceBreakdown, type ItemPricingInfo, type ItemQuantityInfo, type ItemSource, ItemStatus, type ItemStatusWithLiterals, type ItemTaxConfig, type ItemType, ItemTypeItemType, type ItemTypeItemTypeDataOneOf, type ItemTypeItemTypeWithLiterals, type LegacyFields, type LineItem, type LineItemSummary, type LineItemTax, type LineItemUpdate, type MarkCartAsCompletedOptions, type MarkCartAsCompletedRequest, type MarkCartAsCompletedResponse, type Membership, type MessageEnvelope, type ModifierGroup, NameInLineItem, type NameInLineItemWithLiterals, NameInOther, type NameInOtherWithLiterals, type Other, type PaymentInfo, type PaymentOption, PaymentOptionType, type PaymentOptionTypeWithLiterals, type PaymentSummary, type PhysicalProperties, type PlaceOrderOptions, type PlaceOrderRequest, type PlaceOrderResponse, type PlainTextValue, type Policy, type PriceDescription, type PriceSummary, type QuantityUpdate, type RawHttpResponse, type RedirectUrls, type RefreshCartRequest, type RefreshCartResponse, type RefreshCurrentCartRequest, type RefreshCurrentCartResponse, type RemoveCouponFromCurrentCartRequest, type RemoveCouponFromCurrentCartResponse, type RemoveCouponRequest, type RemoveCouponResponse, type RemoveGiftCardFromCurrentCartRequest, type RemoveGiftCardFromCurrentCartResponse, type RemoveGiftCardRequest, type RemoveGiftCardResponse, type RemoveLineItemsFromCurrentCartRequest, type RemoveLineItemsFromCurrentCartResponse, type RemoveLineItemsRequest, type RemoveLineItemsResponse, type RestoreInfo, RuleType, type RuleTypeWithLiterals, type Scope, type SecuredMedia, type SelectedMembership, type SelectedMembershipUpdate, type ServiceProperties, type SetDeliveryMethodForCurrentCartRequest, type SetDeliveryMethodForCurrentCartResponse, type SetDeliveryMethodRequest, type SetDeliveryMethodResponse, Severity, type SeverityWithLiterals, type StreetAddress, type SubscriptionCharges, SubscriptionFrequency, type SubscriptionFrequencyWithLiterals, type SubscriptionOptionInfo, type SubscriptionSettings, SuggestedFix, type SuggestedFixWithLiterals, type SystemError, type Target, type TargetTargetTypeOneOf, type Tax, type TaxDetails, type TaxInfo, type TaxSummary, type TaxableAddress, type TaxableAddressTaxableAddressDataOneOf, TaxableAddressType, type TaxableAddressTypeWithLiterals, type Title, type TranslatableString, type UnmarkAsCurrentCartRequest, type UnmarkAsCurrentCartResponse, type UpdateCart, type UpdateCartRequest, type UpdateCartResponse, type UpdateCurrentCartRequest, type UpdateCurrentCartResponse, type UpdateLineItemsInCurrentCartRequest, type UpdateLineItemsInCurrentCartResponse, type UpdateLineItemsOptions, type UpdateLineItemsRequest, type UpdateLineItemsResponse, type V2AdditionalFee, type V2LineItem, type ValidationError, ValidationsConfig, type ValidationsConfigWithLiterals, type VatId, VatType, type VatTypeWithLiterals, type Violation, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, WeightUnit, type WeightUnitWithLiterals };
4070
+ export { type ActionEvent, type AddCouponRequest, type AddCouponResponse, type AddCouponToCurrentCartRequest, type AddCouponToCurrentCartResponse, type AddGiftCardRequest, type AddGiftCardResponse, type AddGiftCardToCurrentCartRequest, type AddGiftCardToCurrentCartResponse, type AddLineItemsOptions, type AddLineItemsRequest, type AddLineItemsResponse, type AddLineItemsToCurrentCartRequest, type AddLineItemsToCurrentCartResponse, type AdditionalFee, AdditionalFeeSource, type AdditionalFeeSourceWithLiterals, type AdditionalFeeTax, type Address, type AddressLocation, type AggregatedTaxBreakdown, type ApplicableLineItems, type ApplicationError, type AppliedDiscount, type AppliedDiscountDiscountSourceOneOf, type AutoTaxFallbackCalculationDetails, type BusinessInfo, type CalculateCartOptions, type CalculateCartRequest, type CalculateCartResponse, type CalculateCartWithFullResponseResponse, type CalculateCurrentCartRequest, type CalculateCurrentCartResponse, type CalculateTotalsResponse, type CalculatedItemModifier, type CalculatedLineItem, type CalculationConfig, type CalculationErrors, type CalculationErrorsShippingCalculationErrorOneOf, type Carrier, type CarrierError, type CarrierErrors, type CarrierServiceOption, type Cart, type CartSettings, type CartSource, type CartSummary, type CatalogItemInput, type CatalogOverrideFields, type CatalogReference, ChannelType, type ChannelTypeWithLiterals, type Charge, ChargeType, type ChargeTypeWithLiterals, type Color, type ConvertedMoney, type Coupon, type CreateCartOptions, type CreateCartRequest, type CreateCartResponse, type CreateCurrentCartRequest, type CreateCurrentCartResponse, type CreatedBy, type CreatedByIdOneOf, type CustomContentReference, type CustomField, type CustomItemAttributes, type CustomItemDeliveryConfig, type CustomItemInput, type CustomItemPaymentConfig, type CustomItemPricingInfo, type CustomItemQuantityInfo, type CustomItemSource, type CustomItemTaxConfig, type CustomerInfo, type CustomerInfoIdOneOf, type DeleteCartRequest, type DeleteCartResponse, type DeleteCurrentCartRequest, type DeleteCurrentCartResponse, type DeliveryAllocation, type DeliveryInfo, type DeliveryLogistics, type DeliveryMethod, type DeliveryMethodInput, type DeliverySummary, type DeliveryTimeSlot, type Description, type DescriptionLine, type DescriptionLineDescriptionLineValueOneOf, type DescriptionLineName, DescriptionLineType, type DescriptionLineTypeWithLiterals, type DescriptionLineValueOneOf, type Details, type DetailsKindOneOf, type Discount, type DiscountBenefit, type DiscountBenefitValueOneOf, type DiscountRule, type DiscountRuleName, DiscountScope, type DiscountScopeWithLiterals, type DiscountSource, DiscountSourceType, type DiscountSourceTypeWithLiterals, DiscountType, type DiscountTypeWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type DummyErrorDataMethodLevel, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ExtendedFields, type ExternalReference, FallbackReason, type FallbackReasonWithLiterals, type FieldViolation, FileType, type FileTypeWithLiterals, type FreeTrialPeriod, type FullAddressContactDetails, type GetCartApplicationErrors, type GetCartRequest, type GetCartResponse, type GetCheckoutURLRequest, type GetCheckoutURLResponse, type GetCheckoutUrlOptions, type GetCurrentCartRequest, type GetCurrentCartResponse, type GiftCard, type GiftCardSummary, type Group, type HandleAsyncCheckoutCompletionRequest, type HeadersEntry, type IdentificationData, type IdentificationDataIdOneOf, type InvalidMembership, type ItemAttributes, type ItemDeliveryConfig, type ItemDiscount, type ItemModifier, type ItemPaymentConfig, type ItemPriceBreakdown, type ItemPricingInfo, type ItemQuantityInfo, type ItemSource, ItemStatus, type ItemStatusWithLiterals, type ItemTaxConfig, type ItemTaxFullDetails, type ItemType, ItemTypeItemType, type ItemTypeItemTypeDataOneOf, type ItemTypeItemTypeWithLiterals, JurisdictionType, type JurisdictionTypeWithLiterals, type LegacyFields, type LineItem, type LineItemDiscount, type LineItemIdentifier, type LineItemIdentifierIdOneOf, type LineItemPricesData, type LineItemSummary, type LineItemTax, type LineItemUpdate, ManualCalculationReason, type ManualCalculationReasonWithLiterals, type MarkCartAsCompletedOptions, type MarkCartAsCompletedRequest, type MarkCartAsCompletedResponse, type Membership, type MembershipName, type MembershipOptions, type MembershipPaymentCredits, type MerchantDiscount, type MessageEnvelope, type ModifierGroup, type MultiCurrencyPrice, NameInLineItem, type NameInLineItemWithLiterals, NameInOther, type NameInOtherWithLiterals, type Other, type OtherCharge, type PaymentInfo, type PaymentOption, PaymentOptionType, type PaymentOptionTypeWithLiterals, type PaymentSummary, type PhysicalProperties, type PickupDetails, PickupMethod, type PickupMethodWithLiterals, type PlaceOrderOptions, type PlaceOrderRequest, type PlaceOrderResponse, type PlainTextValue, type Policy, type PriceDescription, type PriceSummary, type QuantityUpdate, RateType, type RateTypeWithLiterals, type RawHttpResponse, type RedirectUrls, type RefreshCartRequest, type RefreshCartResponse, type RefreshCurrentCartRequest, type RefreshCurrentCartResponse, type Region, type RemoveCouponFromCurrentCartRequest, type RemoveCouponFromCurrentCartResponse, type RemoveCouponRequest, type RemoveCouponResponse, type RemoveGiftCardFromCurrentCartRequest, type RemoveGiftCardFromCurrentCartResponse, type RemoveGiftCardRequest, type RemoveGiftCardResponse, type RemoveLineItemsFromCurrentCartRequest, type RemoveLineItemsFromCurrentCartResponse, type RemoveLineItemsRequest, type RemoveLineItemsResponse, type RestoreInfo, RuleType, type RuleTypeWithLiterals, type Scope, type SecuredMedia, type SelectedCarrierServiceOption, type SelectedCarrierServiceOptionOtherCharge, type SelectedCarrierServiceOptionPrices, type SelectedMembership, type SelectedMembershipUpdate, type ServiceProperties, type SetDeliveryMethodForCurrentCartRequest, type SetDeliveryMethodForCurrentCartResponse, type SetDeliveryMethodRequest, type SetDeliveryMethodResponse, Severity, type SeverityWithLiterals, type ShippingInformation, type ShippingOption, type ShippingPrice, type ShippingRegion, type StreetAddress, type SubscriptionCharges, SubscriptionFrequency, type SubscriptionFrequencyWithLiterals, type SubscriptionOptionInfo, type SubscriptionSettings, SuggestedFix, type SuggestedFixWithLiterals, type SystemError, type Target, type TargetTargetTypeOneOf, type Tax, type TaxBreakdown, type TaxCalculationDetails, type TaxCalculationDetailsCalculationDetailsOneOf, type TaxDetails, type TaxInfo, type TaxRateBreakdown, type TaxSummary, type TaxableAddress, type TaxableAddressTaxableAddressDataOneOf, TaxableAddressType, type TaxableAddressTypeWithLiterals, type Title, type TranslatableString, type UnmarkAsCurrentCartRequest, type UnmarkAsCurrentCartResponse, type UpdateCart, type UpdateCartRequest, type UpdateCartResponse, type UpdateCurrentCartRequest, type UpdateCurrentCartResponse, type UpdateLineItemsInCurrentCartRequest, type UpdateLineItemsInCurrentCartResponse, type UpdateLineItemsOptions, type UpdateLineItemsRequest, type UpdateLineItemsResponse, type V1AdditionalFee, type V2AdditionalFee, type V2CalculationErrors, type V2CalculationErrorsShippingCalculationErrorOneOf, type V2CarrierError, type V2CarrierErrors, type V2Coupon, type V2GiftCard, type V2LineItem, type V2Membership, type V2PriceSummary, type V2SelectedMembership, type V2TaxSummary, type ValidationError, ValidationsConfig, type ValidationsConfigWithLiterals, type VatId, VatType, type VatTypeWithLiterals, type Violation, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, WeightUnit, type WeightUnitWithLiterals };