@wix/auto_sdk_ecom_cart-v-2 1.0.32 → 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 +6 -4
  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 +1200 -196
  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 +6 -4
  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 +1200 -196
  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
@@ -46,7 +46,7 @@ interface Cart {
46
46
  * @maxSize 1
47
47
  * @readonly
48
48
  */
49
- coupons?: Coupon[];
49
+ coupons?: V2Coupon[];
50
50
  /** Information about the source of the Cart, detailing the origin or context in which the Cart was created. */
51
51
  source?: CartSource;
52
52
  /** Information about the site from which the Cart's line items were added. */
@@ -141,7 +141,7 @@ interface V2LineItem {
141
141
  * Additional Fees to be added to this item calculation.
142
142
  * @maxSize 5
143
143
  */
144
- additionalFees?: AdditionalFee[];
144
+ additionalFees?: V1AdditionalFee[];
145
145
  /**
146
146
  * Modifier groups that were added to the item.
147
147
  * @maxSize 25
@@ -741,7 +741,7 @@ interface ItemPaymentConfig {
741
741
  * Must be used with `lineItem.paymentOption` set to `MEMBERSHIP` or `MEMBERSHIP_OFFLINE`.
742
742
  * This field can be empty when `lineItem.paymentOption` is set to `MEMBERSHIP_OFFLINE`.
743
743
  */
744
- selectedMembership?: SelectedMembership;
744
+ selectedMembership?: V2SelectedMembership;
745
745
  /**
746
746
  * Type of selected payment option for current item.
747
747
  *
@@ -749,7 +749,7 @@ interface ItemPaymentConfig {
749
749
  */
750
750
  paymentOption?: PaymentOptionTypeWithLiterals;
751
751
  }
752
- interface SelectedMembership {
752
+ interface V2SelectedMembership {
753
753
  /**
754
754
  * Membership ID.
755
755
  * @minLength 1
@@ -791,7 +791,7 @@ interface ExtendedFields {
791
791
  */
792
792
  namespaces?: Record<string, Record<string, any>>;
793
793
  }
794
- interface AdditionalFee {
794
+ interface V1AdditionalFee {
795
795
  /**
796
796
  * Additional fee's unique code or ID.
797
797
  * @minLength 1
@@ -896,7 +896,7 @@ interface Group {
896
896
  /** Item ID (when the coupon scope is limited to just one item). */
897
897
  entityId?: string | null;
898
898
  }
899
- interface Coupon {
899
+ interface V2Coupon {
900
900
  /**
901
901
  * ID of the coupon in the Cart.
902
902
  * @format GUID
@@ -1316,7 +1316,7 @@ interface PaymentInfo {
1316
1316
  * @readonly
1317
1317
  * @maxSize 1
1318
1318
  */
1319
- giftCards?: GiftCard[];
1319
+ giftCards?: V2GiftCard[];
1320
1320
  /**
1321
1321
  * The currency used for processing the payment, in three-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
1322
1322
  *
@@ -1330,7 +1330,7 @@ interface PaymentInfo {
1330
1330
  /** Full contact details for billing. */
1331
1331
  billingContact?: FullAddressContactDetails;
1332
1332
  }
1333
- interface GiftCard {
1333
+ interface V2GiftCard {
1334
1334
  /**
1335
1335
  * A unique identifier of the gift card within the Cart.
1336
1336
  * @format GUID
@@ -1518,9 +1518,9 @@ interface CartSummary {
1518
1518
  */
1519
1519
  additionalFees?: V2AdditionalFee[];
1520
1520
  /** Summary of tax calculations applied to the cart. */
1521
- taxSummary?: TaxSummary;
1521
+ taxSummary?: V2TaxSummary;
1522
1522
  /** Summary of all calculated price components in the cart. */
1523
- priceSummary?: PriceSummary;
1523
+ priceSummary?: V2PriceSummary;
1524
1524
  /** Payment details summarizing how the customer will pay for the order. */
1525
1525
  paymentSummary?: PaymentSummary;
1526
1526
  /**
@@ -1543,7 +1543,7 @@ interface CartSummary {
1543
1543
  * List of errors that occurred during the calculation process, returned by Totals Calculator.
1544
1544
  * TODO: Temporary field for backward compatibility; will be removed once we introduce the unified 'violations' model.
1545
1545
  */
1546
- calculationErrors?: CalculationErrors;
1546
+ calculationErrors?: V2CalculationErrors;
1547
1547
  /**
1548
1548
  * 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)).
1549
1549
  * TODO: Temporary field for backward compatibility; will be removed once we introduce the unified 'violations' model.
@@ -1618,7 +1618,7 @@ interface V2AdditionalFee {
1618
1618
  */
1619
1619
  subscriptionCycles?: number | null;
1620
1620
  }
1621
- interface TaxSummary {
1621
+ interface V2TaxSummary {
1622
1622
  /**
1623
1623
  * List of taxes applied to the cart.
1624
1624
  * May contain multiple entries when advanced tax rates are configured by the merchant,
@@ -1679,7 +1679,7 @@ interface AdditionalFeeTax {
1679
1679
  /** Tax amount applied to the additional fee. */
1680
1680
  tax?: ConvertedMoney;
1681
1681
  }
1682
- interface PriceSummary {
1682
+ interface V2PriceSummary {
1683
1683
  /**
1684
1684
  * Total price of all line items after applying item-level discounts.
1685
1685
  * Includes tax if `tax_summary.prices_include_tax` is true.
@@ -1717,7 +1717,7 @@ interface PaymentSummary {
1717
1717
  * A list of valid memberships that will be charged as part of the order.
1718
1718
  * @maxSize 300
1719
1719
  */
1720
- memberships?: Membership[];
1720
+ memberships?: V2Membership[];
1721
1721
  /**
1722
1722
  * Charges information for each subscription in the checkout.
1723
1723
  * @maxSize 100
@@ -1743,7 +1743,7 @@ interface GiftCardSummary {
1743
1743
  /** The amount to be reduced from the gift card's balance. */
1744
1744
  redeemAmount?: ConvertedMoney;
1745
1745
  }
1746
- interface Membership {
1746
+ interface V2Membership {
1747
1747
  /**
1748
1748
  * Membership ID.
1749
1749
  * @minLength 1
@@ -1790,15 +1790,15 @@ interface Charge {
1790
1790
  /** The number of cycles for which the charge is applicable. */
1791
1791
  cycleCount?: number | null;
1792
1792
  /** Charge summary. */
1793
- priceSummary?: PriceSummary;
1793
+ priceSummary?: V2PriceSummary;
1794
1794
  /** The billing date from which the charge starts. */
1795
1795
  cycleBillingDate?: Date | null;
1796
1796
  }
1797
- interface CalculationErrors extends CalculationErrorsShippingCalculationErrorOneOf {
1797
+ interface V2CalculationErrors extends V2CalculationErrorsShippingCalculationErrorOneOf {
1798
1798
  /** General shipping calculation error. */
1799
1799
  generalShippingCalculationError?: Details;
1800
1800
  /** Carrier errors. */
1801
- carrierErrors?: CarrierErrors;
1801
+ carrierErrors?: V2CarrierErrors;
1802
1802
  /** Tax calculation error. */
1803
1803
  taxCalculationError?: Details;
1804
1804
  /** Coupon calculation error. */
@@ -1819,11 +1819,11 @@ interface CalculationErrors extends CalculationErrorsShippingCalculationErrorOne
1819
1819
  discountsCalculationError?: Details;
1820
1820
  }
1821
1821
  /** @oneof */
1822
- interface CalculationErrorsShippingCalculationErrorOneOf {
1822
+ interface V2CalculationErrorsShippingCalculationErrorOneOf {
1823
1823
  /** General shipping calculation error. */
1824
1824
  generalShippingCalculationError?: Details;
1825
1825
  /** Carrier errors. */
1826
- carrierErrors?: CarrierErrors;
1826
+ carrierErrors?: V2CarrierErrors;
1827
1827
  }
1828
1828
  interface Details extends DetailsKindOneOf {
1829
1829
  applicationError?: ApplicationError;
@@ -1921,14 +1921,14 @@ interface SystemError {
1921
1921
  /** Error code. */
1922
1922
  errorCode?: string | null;
1923
1923
  }
1924
- interface CarrierErrors {
1924
+ interface V2CarrierErrors {
1925
1925
  /**
1926
1926
  * Carrier errors.
1927
1927
  * @maxSize 100
1928
1928
  */
1929
- errors?: CarrierError[];
1929
+ errors?: V2CarrierError[];
1930
1930
  }
1931
- interface CarrierError {
1931
+ interface V2CarrierError {
1932
1932
  /**
1933
1933
  * Carrier ID.
1934
1934
  * @format GUID
@@ -2058,7 +2058,7 @@ interface CatalogItemInput {
2058
2058
  */
2059
2059
  quantity?: number;
2060
2060
  /** Selected membership to be used as payment for this item. */
2061
- selectedMembership?: SelectedMembership;
2061
+ selectedMembership?: V2SelectedMembership;
2062
2062
  /**
2063
2063
  * Overriding values for catalog item properties.
2064
2064
  * To override catalog fields, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
@@ -2370,7 +2370,7 @@ interface SelectedMembershipUpdate {
2370
2370
  *
2371
2371
  * To just remove current selected membership, and not replace with a new one, pass an empty value here.
2372
2372
  */
2373
- newMembership?: SelectedMembership;
2373
+ newMembership?: V2SelectedMembership;
2374
2374
  }
2375
2375
  interface UpdateLineItemsInCurrentCartResponse {
2376
2376
  /** Updated Cart. */
@@ -2624,6 +2624,34 @@ interface GetCartResponse {
2624
2624
  /** The requested Cart. */
2625
2625
  cart?: Cart;
2626
2626
  }
2627
+ /** temp for client testing */
2628
+ interface DummyErrorDataMethodLevel {
2629
+ /** This is a dummy field. */
2630
+ invalidItems?: LineItemIdentifier[];
2631
+ /** The fresh cart after resolving the error. */
2632
+ freshCart?: Cart;
2633
+ /** dummy string */
2634
+ dummyMethod?: string;
2635
+ }
2636
+ interface LineItemIdentifier extends LineItemIdentifierIdOneOf {
2637
+ /**
2638
+ * Line Item ID.
2639
+ * @format GUID
2640
+ */
2641
+ lineItemId?: string;
2642
+ /** Catalog reference. */
2643
+ catalogReference?: CatalogReference;
2644
+ }
2645
+ /** @oneof */
2646
+ interface LineItemIdentifierIdOneOf {
2647
+ /**
2648
+ * Line Item ID.
2649
+ * @format GUID
2650
+ */
2651
+ lineItemId?: string;
2652
+ /** Catalog reference. */
2653
+ catalogReference?: CatalogReference;
2654
+ }
2627
2655
  interface UpdateCartRequest {
2628
2656
  /** Cart to be updated, may be partial. */
2629
2657
  cart: Cart;
@@ -2681,241 +2709,1209 @@ interface CalculateCartResponse {
2681
2709
  /** The calculation summary. */
2682
2710
  summary?: CartSummary;
2683
2711
  }
2684
- interface GetCheckoutURLRequest {
2712
+ interface CalculateCartWithFullResponseResponse {
2713
+ /** The Cart that was calculated. */
2714
+ cart?: Cart;
2715
+ /** The calculation summary. */
2716
+ summary?: CartSummary;
2685
2717
  /**
2686
- * ID of the Cart to calculate.
2687
- * @format GUID
2718
+ * Totals payload used for backward compatibility with legacy clients.
2719
+ * Used by the Cart and Checkout proxies.
2688
2720
  */
2689
- cartId: string;
2721
+ totalsResponse?: CalculateTotalsResponse;
2722
+ }
2723
+ interface CalculateTotalsResponse {
2724
+ /** Calculate line items. */
2725
+ calculatedLineItems?: CalculatedLineItem[];
2726
+ /** Price summary. */
2727
+ priceSummary?: PriceSummary;
2728
+ /** Details of applied gift card. */
2729
+ giftCard?: GiftCard;
2730
+ /** Tax summary. */
2731
+ taxSummary?: TaxSummary;
2732
+ /** Shipping information. */
2733
+ shippingInfo?: ShippingInformation;
2690
2734
  /**
2691
- * Checkout currency parameter to append as a query param
2735
+ * Applied discounts.
2736
+ * @maxSize 320
2737
+ */
2738
+ appliedDiscounts?: AppliedDiscount[];
2739
+ /** Calculation errors. */
2740
+ calculationErrors?: CalculationErrors;
2741
+ /** Weight unit. */
2742
+ weightUnit?: WeightUnitWithLiterals;
2743
+ /**
2744
+ * Currency.
2692
2745
  * @format CURRENCY
2693
2746
  */
2694
- currencyCode?: string | null;
2695
- }
2696
- interface GetCheckoutURLResponse {
2747
+ currency?: string;
2697
2748
  /**
2698
- * The checkout URL.
2699
- * @format WEB_URL
2749
+ * This is the display currency. Converted prices are presented in this currency.
2750
+ * @readonly
2751
+ * @format CURRENCY
2700
2752
  */
2701
- checkoutUrl?: string;
2702
- }
2703
- interface PlaceOrderRequest {
2753
+ conversionCurrency?: string;
2754
+ /** Whether tax is included in price. */
2755
+ taxIncludedInPrice?: boolean;
2704
2756
  /**
2705
- * Cart ID.
2706
- * @format GUID
2757
+ * Minimal amount to pay in order to place the order.
2758
+ * @readonly
2707
2759
  */
2708
- cartId: string;
2760
+ payNow?: PriceSummary;
2709
2761
  /**
2710
- * The price verification token received from `CalculateCart`'s response.
2711
- * Used to verify that the prices shown to the customer have not changed before completing checkout.
2712
- * @maxLength 3000
2762
+ * Remaining amount for the order to be fully paid.
2763
+ * @readonly
2713
2764
  */
2714
- priceVerificationToken?: string | null;
2765
+ payLater?: PriceSummary;
2766
+ /** Information about valid and invalid memberships, and which ones are selected for usage. */
2767
+ membershipOptions?: MembershipOptions;
2715
2768
  /**
2716
- * Payment token.
2717
- * @maxLength 100
2769
+ * Additional Fees
2770
+ * @maxSize 100
2718
2771
  */
2719
- paymentToken?: string | null;
2720
- /** Urls to redirect to after payment is made. */
2721
- redirectUrls?: RedirectUrls;
2722
- /** Indicates the payment method should be saved on the order */
2723
- savePaymentMethod?: boolean;
2724
- /** Indicates whether to authorize the payment and delay the capture */
2725
- delayCapture?: boolean;
2726
- }
2727
- interface RedirectUrls {
2772
+ additionalFees?: AdditionalFee[];
2728
2773
  /**
2729
- * URL to redirect to if payment is canceled (usually checkout url).
2730
- * @format WEB_URL
2774
+ * The site currency.
2775
+ * @readonly
2776
+ * @format CURRENCY
2731
2777
  */
2732
- cancelUrl?: string;
2778
+ siteCurrency?: string;
2733
2779
  /**
2734
- * URL to redirect to if an error occurred on payment (usually checkout url).
2735
- * @format WEB_URL
2780
+ * The rate used when converting from the site currency to the checkout currency.
2781
+ * @readonly
2782
+ * @decimalValue options { gt:0, lte:1000000000000000 }
2736
2783
  */
2737
- errorUrl?: string;
2784
+ checkoutConversionRate?: string | null;
2738
2785
  /**
2739
- * URL to redirect to after successful payment, excepts order place holder {orderId}.
2740
- * @maxLength 2000
2786
+ * The pay now total amount after the gift card is applied.
2787
+ * @readonly
2741
2788
  */
2742
- successUrl?: string | null;
2789
+ payNowTotalAfterGiftCard?: MultiCurrencyPrice;
2743
2790
  /**
2744
- * URL to redirect to if payment is pending, excepts order place holder {orderId}.
2745
- * @maxLength 2000
2791
+ * The total amount after gift card is applied.
2792
+ * @readonly
2746
2793
  */
2747
- pendingUrl?: string | null;
2794
+ totalAfterGiftCard?: MultiCurrencyPrice;
2795
+ /**
2796
+ * Payment for subscriptions after free trial period.
2797
+ * @readonly
2798
+ */
2799
+ payAfterFreeTrial?: PriceSummary;
2748
2800
  }
2749
- interface PlaceOrderResponse {
2801
+ interface CalculatedLineItem {
2802
+ /** Line item ID. */
2803
+ lineItemId?: string;
2804
+ /** Price breakdown for this line item. */
2805
+ pricesBreakdown?: LineItemPricesData;
2750
2806
  /**
2751
- * The order ID of the created order.
2752
- * @format GUID
2807
+ * Type of selected payment option for current item. Supported values:
2808
+ * + `"FULL_PAYMENT_ONLINE"` - The entire payment for this item will happen as part of the checkout
2809
+ * + `"FULL_PAYMENT_OFFLINE"` - The entire payment for this item will happen after the checkout
2810
+ * + `"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
2811
+ * + `"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.
2753
2812
  */
2754
- orderId?: string;
2813
+ paymentOption?: PaymentOptionTypeWithLiterals;
2814
+ /** tax calculation address. */
2815
+ taxableAddress?: TaxableAddress;
2755
2816
  /**
2756
- * Payment response token.
2757
- * @maxLength 1000
2817
+ * Calculated modifiers.
2818
+ * @internal
2819
+ * @maxSize 625
2820
+ */
2821
+ modifiers?: CalculatedItemModifier[];
2822
+ }
2823
+ interface LineItemPricesData {
2824
+ /** Total price after discounts, tax, and modifiers. */
2825
+ totalPriceAfterTax?: MultiCurrencyPrice;
2826
+ /** Total price after discounts and modifiers, and before tax. */
2827
+ totalPriceBeforeTax?: MultiCurrencyPrice;
2828
+ /** Tax details. */
2829
+ taxDetails?: ItemTaxFullDetails;
2830
+ /** Total discount applied for the line item. */
2831
+ totalDiscount?: MultiCurrencyPrice;
2832
+ /** Catalog price after catalog-defined discount, automatic discounts, and modifiers. */
2833
+ price?: MultiCurrencyPrice;
2834
+ /**
2835
+ * Item price before automatic discounts, coupons, and global discounts; after catalog-defined discounts and modifiers.
2836
+ * Defaults to `price` when not provided.
2758
2837
  */
2759
- paymentResponseToken?: string | null;
2838
+ priceBeforeDiscounts?: MultiCurrencyPrice;
2839
+ /** Total line item price after catalog-defined discounts, automatic discounts, and modifiers. */
2840
+ lineItemPrice?: MultiCurrencyPrice;
2760
2841
  /**
2761
- * The payment gateway is Cashier.
2762
- * payment_gateway_order_id will be returned given that money was charged.
2763
- * In some cases, money will not be charged:
2764
- * If the total price is 0 - For example, could be a free item or a an item with 100% discount
2765
- * If the total price is not 0, but the payment is covered by alternative payment methods such as gift card
2766
- * @maxLength 50
2842
+ * Item price before all discounts and modifiers.
2843
+ * Defaults to `price` when not provided.
2767
2844
  */
2768
- paymentGatewayOrderId?: string | null;
2769
- /** Whether an order was successfully created from this cart and the payment transaction was completed. */
2770
- completed?: boolean;
2771
- }
2772
- interface AddLineItemsRequest {
2845
+ fullPrice?: MultiCurrencyPrice;
2773
2846
  /**
2774
- * Cart ID.
2775
- * @format GUID
2847
+ * Total price of all item modifiers.
2848
+ * @internal
2776
2849
  */
2777
- cartId: string;
2850
+ modifiers?: MultiCurrencyPrice;
2778
2851
  /**
2779
- * A list of catalog items to add to the cart.
2780
- * @maxSize 300
2852
+ * Item price before tax, automatic discounts, coupons, and global discounts; after catalog-defined discounts and modifiers.
2853
+ * @internal
2781
2854
  */
2782
- catalogItems?: CatalogItemInput[];
2855
+ priceBeforeDiscountsAndTax?: MultiCurrencyPrice;
2783
2856
  /**
2784
- * A list of custom items to add to the cart.
2785
- * @maxSize 300
2857
+ * Partial payment to be paid upfront during the checkout.
2858
+ * Applies to catalog items with `lineItem.paymentOption` type `DEPOSIT_ONLINE` only.
2786
2859
  */
2787
- customItems?: CustomItemInput[];
2788
- }
2789
- interface AddLineItemsResponse {
2790
- /** Updated Cart. */
2791
- cart?: Cart;
2860
+ depositAmount?: MultiCurrencyPrice;
2792
2861
  }
2793
- interface RemoveLineItemsRequest {
2862
+ interface MultiCurrencyPrice {
2794
2863
  /**
2795
- * Cart ID.
2796
- * @format GUID
2864
+ * Amount.
2865
+ * @decimalValue options { gte:0, lte:1000000000000000 }
2797
2866
  */
2798
- cartId: string;
2867
+ amount?: string;
2799
2868
  /**
2800
- * Line item IDs to remove from cart.
2801
- * @format GUID
2802
- * @minSize 1
2803
- * @maxSize 100
2869
+ * Converted amount.
2870
+ * @readonly
2871
+ * @decimalValue options { gte:0, lte:1000000000000000 }
2804
2872
  */
2805
- lineItemIds: string[];
2806
- }
2807
- interface RemoveLineItemsResponse {
2808
- /** Updated Cart. */
2809
- cart?: Cart;
2810
- }
2811
- interface UpdateLineItemsRequest {
2873
+ convertedAmount?: string;
2812
2874
  /**
2813
- * Cart ID.
2814
- * @format GUID
2875
+ * Amount formatted with currency symbol.
2876
+ * @readonly
2815
2877
  */
2816
- cartId: string;
2878
+ formattedAmount?: string;
2817
2879
  /**
2818
- * Line item updates to apply.
2819
- * @minSize 1
2820
- * @maxSize 300
2880
+ * Converted amount formatted with currency symbol.
2881
+ * @readonly
2821
2882
  */
2822
- lineItems?: LineItemUpdate[];
2883
+ formattedConvertedAmount?: string;
2823
2884
  }
2824
- interface UpdateLineItemsResponse {
2825
- /** Updated Cart. */
2826
- cart?: Cart;
2827
- }
2828
- interface AddCouponRequest {
2885
+ interface ItemTaxFullDetails {
2886
+ /** Amount for which tax is calculated. */
2887
+ taxableAmount?: MultiCurrencyPrice;
2829
2888
  /**
2830
- * Cart ID.
2831
- * @format GUID
2889
+ * Tax rate %, as a decimal point between 0 and 1.
2890
+ * @decimalValue options { gte:0, lte:1, maxScale:6 }
2832
2891
  */
2833
- cartId: string;
2892
+ taxRate?: string;
2893
+ /** Calculated tax, based on `taxable_amount` and `tax_rate`. */
2894
+ totalTax?: MultiCurrencyPrice;
2834
2895
  /**
2835
- * Coupon to apply.
2836
- *
2837
- * Currently only one is supported.
2838
- * @minLength 1
2839
- * @maxLength 50
2896
+ * If breakdown exists, the sum of rates in the breakdown must equal `tax_rate`. Deprecated - use 'tax_breakdown' instead.
2897
+ * @readonly
2898
+ * @deprecated
2840
2899
  */
2841
- couponCode: string;
2842
- }
2843
- interface AddCouponResponse {
2844
- /** Updated Cart. */
2845
- cart?: Cart;
2846
- }
2847
- interface RemoveCouponRequest {
2900
+ rateBreakdown?: TaxRateBreakdown[];
2848
2901
  /**
2849
- * Cart ID.
2850
- * @format GUID
2902
+ * The amount of this line item that was exempt.
2903
+ * @internal
2851
2904
  */
2852
- cartId: string;
2905
+ exemptAmount?: MultiCurrencyPrice;
2853
2906
  /**
2854
- * Discount ID.
2855
- * @format GUID
2907
+ * tax information for a line item.
2908
+ * @maxSize 1000
2909
+ * @readonly
2856
2910
  */
2857
- couponId: string;
2858
- }
2859
- interface RemoveCouponResponse {
2860
- /** Updated Cart. */
2861
- cart?: Cart;
2911
+ taxBreakdown?: TaxBreakdown[];
2862
2912
  }
2863
- interface SetDeliveryMethodRequest {
2913
+ interface TaxRateBreakdown {
2864
2914
  /**
2865
- * Cart ID.
2866
- * @format GUID
2915
+ * Name of tax against which the calculation was performed.
2916
+ * @maxLength 100
2867
2917
  */
2868
- cartId: string;
2869
- /** Delivery method. */
2870
- deliveryMethod: DeliveryMethodInput;
2871
- }
2872
- interface SetDeliveryMethodResponse {
2873
- /** Updated Cart. */
2874
- cart?: Cart;
2875
- }
2876
- interface AddGiftCardRequest {
2918
+ name?: string;
2877
2919
  /**
2878
- * Cart ID.
2879
- * @format GUID
2920
+ * Rate at which this tax detail was calculated.
2921
+ * @decimalValue options { gte:0, lte:1, maxScale:6 }
2880
2922
  */
2881
- cartId: string;
2923
+ rate?: string;
2924
+ /** Amount of tax for this tax detail. */
2925
+ tax?: MultiCurrencyPrice;
2882
2926
  /**
2883
- * Gift card code.
2884
- *
2885
- * Currently only one is supported.
2886
- * @minLength 8
2887
- * @maxLength 20
2927
+ * The amount of this line item that was exempt from this authority.
2928
+ * @internal
2888
2929
  */
2889
- giftCardCode: string;
2890
- }
2891
- interface AddGiftCardResponse {
2892
- /** Updated Cart. */
2893
- cart?: Cart;
2930
+ exemptAmount?: MultiCurrencyPrice;
2894
2931
  }
2895
- interface RemoveGiftCardRequest {
2932
+ /**
2933
+ * TaxBreakdown represents tax information for a line item.
2934
+ * It holds the tax amount and the tax rate for each tax authority that apply on the line item.
2935
+ */
2936
+ interface TaxBreakdown {
2896
2937
  /**
2897
- * Cart ID.
2898
- * @format GUID
2938
+ * The name of the jurisdiction to which this tax detail applies. For example, "New York" or "Quebec".
2939
+ * @maxLength 200
2899
2940
  */
2900
- cartId: string;
2941
+ jurisdiction?: string | null;
2942
+ /** The amount of this line item price that was considered nontaxable. (Decimal value) */
2943
+ nonTaxableAmount?: MultiCurrencyPrice;
2901
2944
  /**
2902
- * Gift card ID.
2903
- * @format GUID
2945
+ * The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.0000 signifies 200% tax. (Decimal value)
2946
+ * @decimalValue options { gte:0, maxScale:6 }
2904
2947
  */
2905
- giftCardId: string;
2906
- }
2907
- interface RemoveGiftCardResponse {
2908
- /** Updated Cart. */
2909
- cart?: Cart;
2910
- }
2911
- interface MarkCartAsCompletedRequest {
2948
+ rate?: string | null;
2949
+ /** The amount of tax estimated for this line item. (Decimal value) */
2950
+ taxAmount?: MultiCurrencyPrice;
2951
+ /** The taxable amount of this line item. */
2952
+ taxableAmount?: MultiCurrencyPrice;
2912
2953
  /**
2913
- * Cart ID.
2914
- * @format GUID
2954
+ * The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, "Sales Tax", "Income Tax", "Value Added Tax", etc.
2955
+ * @maxLength 200
2915
2956
  */
2916
- cartId: string;
2957
+ taxType?: string | null;
2917
2958
  /**
2918
- * Order ID.
2959
+ * The name of the tax against which this tax amount was calculated. For example, "NY State Sales Tax", "Quebec GST", etc.
2960
+ * This name should be explicit enough to allow the merchant to understand what tax was calculated.
2961
+ * @maxLength 200
2962
+ */
2963
+ taxName?: string | null;
2964
+ /** The type of the jurisdiction in which this tax detail applies. */
2965
+ jurisdictionType?: JurisdictionTypeWithLiterals;
2966
+ /**
2967
+ * The amount of this line item that was exempt from this authority.
2968
+ * @internal
2969
+ */
2970
+ exemptAmount?: MultiCurrencyPrice;
2971
+ }
2972
+ /** JurisdictionType represents the type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
2973
+ declare enum JurisdictionType {
2974
+ UNDEFINED = "UNDEFINED",
2975
+ COUNTRY = "COUNTRY",
2976
+ STATE = "STATE",
2977
+ COUNTY = "COUNTY",
2978
+ CITY = "CITY",
2979
+ SPECIAL = "SPECIAL"
2980
+ }
2981
+ /** @enumType */
2982
+ type JurisdictionTypeWithLiterals = JurisdictionType | 'UNDEFINED' | 'COUNTRY' | 'STATE' | 'COUNTY' | 'CITY' | 'SPECIAL';
2983
+ interface CalculatedItemModifier {
2984
+ /**
2985
+ * Modifier ID.
2986
+ * @minLength 1
2987
+ * @maxLength 36
2988
+ */
2989
+ _id?: string;
2990
+ /**
2991
+ * ID of the group this modifier belongs to.
2992
+ * @minLength 1
2993
+ * @maxLength 36
2994
+ */
2995
+ groupId?: string;
2996
+ /**
2997
+ * Modifier price.
2998
+ * @readonly
2999
+ */
3000
+ price?: MultiCurrencyPrice;
3001
+ }
3002
+ interface PriceSummary {
3003
+ /** Subtotal of all line items, before discounts and before tax. */
3004
+ subtotal?: MultiCurrencyPrice;
3005
+ /** Total shipping price, before discounts and before tax. */
3006
+ shipping?: MultiCurrencyPrice;
3007
+ /** Total tax. */
3008
+ tax?: MultiCurrencyPrice;
3009
+ /** Total calculated discount value. */
3010
+ discount?: MultiCurrencyPrice;
3011
+ /** Total price after discounts, gift cards, and tax. */
3012
+ total?: MultiCurrencyPrice;
3013
+ /** Total additional fees price before tax. */
3014
+ additionalFees?: MultiCurrencyPrice;
3015
+ }
3016
+ interface GiftCard {
3017
+ /**
3018
+ * Gift Card ID.
3019
+ * @deprecated
3020
+ */
3021
+ _id?: string;
3022
+ /** Gift card obfuscated code. */
3023
+ obfuscatedCode?: string;
3024
+ /** Actual amount to be redeemed from the gift card. */
3025
+ amount?: MultiCurrencyPrice;
3026
+ /**
3027
+ * App ID of the gift card provider.
3028
+ * @format GUID
3029
+ */
3030
+ appId?: string;
3031
+ /**
3032
+ * External ID in the gift card provider's system.
3033
+ * Used for integration and tracking across different platforms.
3034
+ * @minLength 1
3035
+ * @maxLength 50
3036
+ */
3037
+ externalId?: string | null;
3038
+ /** Requested amount to redeem from the gift card. */
3039
+ requestedAmount?: MultiCurrencyPrice;
3040
+ }
3041
+ interface TaxSummary {
3042
+ /**
3043
+ * Amount for which tax is calculated, added from line items.
3044
+ * @readonly
3045
+ */
3046
+ taxableAmount?: MultiCurrencyPrice;
3047
+ /**
3048
+ * Calculated tax, added from line items.
3049
+ * @readonly
3050
+ */
3051
+ totalTax?: MultiCurrencyPrice;
3052
+ /**
3053
+ * Tax calculator that was active when the order was created.
3054
+ * @deprecated
3055
+ */
3056
+ calculationDetails?: TaxCalculationDetails;
3057
+ /**
3058
+ * The amount of this estimate that was exempt (for all line items).
3059
+ * @internal
3060
+ * @readonly
3061
+ */
3062
+ totalExempt?: MultiCurrencyPrice;
3063
+ /**
3064
+ * Default name of the tax that was calculated.
3065
+ * @internal
3066
+ * @maxLength 200
3067
+ */
3068
+ taxName?: string | null;
3069
+ }
3070
+ interface TaxCalculationDetails extends TaxCalculationDetailsCalculationDetailsOneOf {
3071
+ /** Reason the manual calculation was used. */
3072
+ manualRateReason?: ManualCalculationReasonWithLiterals;
3073
+ /** Details of the fallback rate calculation. */
3074
+ autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetails;
3075
+ /** Rate calculation type. */
3076
+ rateType?: RateTypeWithLiterals;
3077
+ }
3078
+ /** @oneof */
3079
+ interface TaxCalculationDetailsCalculationDetailsOneOf {
3080
+ /** Reason the manual calculation was used. */
3081
+ manualRateReason?: ManualCalculationReasonWithLiterals;
3082
+ /** Details of the fallback rate calculation. */
3083
+ autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetails;
3084
+ }
3085
+ declare enum RateType {
3086
+ /** no tax being collected for this request due to location of purchase */
3087
+ NO_TAX_COLLECTED = "NO_TAX_COLLECTED",
3088
+ /** manual rate used for calculation */
3089
+ MANUAL_RATE = "MANUAL_RATE",
3090
+ /** autotax rate used for calculation */
3091
+ AUTO_RATE = "AUTO_RATE",
3092
+ /** fallback rate used for calculation */
3093
+ FALLBACK_RATE = "FALLBACK_RATE"
3094
+ }
3095
+ /** @enumType */
3096
+ type RateTypeWithLiterals = RateType | 'NO_TAX_COLLECTED' | 'MANUAL_RATE' | 'AUTO_RATE' | 'FALLBACK_RATE';
3097
+ declare enum ManualCalculationReason {
3098
+ /** user set calculator in Business Manager to be Manual */
3099
+ GLOBAL_SETTING_TO_MANUAL = "GLOBAL_SETTING_TO_MANUAL",
3100
+ /** specific region is on manual even though Global setting is Auto-tax */
3101
+ REGION_SETTING_TO_MANUAL = "REGION_SETTING_TO_MANUAL"
3102
+ }
3103
+ /** @enumType */
3104
+ type ManualCalculationReasonWithLiterals = ManualCalculationReason | 'GLOBAL_SETTING_TO_MANUAL' | 'REGION_SETTING_TO_MANUAL';
3105
+ interface AutoTaxFallbackCalculationDetails {
3106
+ /** reason for fallback */
3107
+ fallbackReason?: FallbackReasonWithLiterals;
3108
+ /** invalid request (i.e. address), timeout, internal error, license error, and others will be encoded here */
3109
+ error?: ApplicationError;
3110
+ }
3111
+ declare enum FallbackReason {
3112
+ /** auto-tax failed to be calculated */
3113
+ AUTO_TAX_FAILED = "AUTO_TAX_FAILED",
3114
+ /** auto-tax was temporarily deactivated on a system-level */
3115
+ AUTO_TAX_DEACTIVATED = "AUTO_TAX_DEACTIVATED"
3116
+ }
3117
+ /** @enumType */
3118
+ type FallbackReasonWithLiterals = FallbackReason | 'AUTO_TAX_FAILED' | 'AUTO_TAX_DEACTIVATED';
3119
+ /**
3120
+ * 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.
3121
+ * Tax breakdown is the tax amount split to the tax authorities that applied on the line item.
3122
+ */
3123
+ interface AggregatedTaxBreakdown {
3124
+ /**
3125
+ * The name of the tax against which this tax amount was calculated.
3126
+ * @maxLength 200
3127
+ */
3128
+ taxName?: string;
3129
+ /**
3130
+ * The type of tax that was calculated. Depends on the company's nexus settings as well as the jurisdiction's tax laws.
3131
+ * @maxLength 200
3132
+ */
3133
+ taxType?: string;
3134
+ /**
3135
+ * The name of the jurisdiction in which this tax detail applies.
3136
+ * @maxLength 200
3137
+ */
3138
+ jurisdiction?: string;
3139
+ /** The type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
3140
+ jurisdictionTypeEnum?: JurisdictionTypeWithLiterals;
3141
+ /**
3142
+ * The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.000 signifies 200% tax. (Decimal value)
3143
+ * @decimalValue options { gte:0, maxScale:6 }
3144
+ */
3145
+ rate?: string;
3146
+ /** The sum of all the tax from line items that calculated by the tax identifiers. */
3147
+ aggregatedTaxAmount?: MultiCurrencyPrice;
3148
+ /** The sum of all the taxable amount from line items for tax identifiers. */
3149
+ aggregatedTaxableAmount?: MultiCurrencyPrice;
3150
+ /**
3151
+ * The aggregated exempt amount from all line items for tax identifiers.
3152
+ * @internal
3153
+ */
3154
+ aggregatedExemptAmount?: MultiCurrencyPrice;
3155
+ }
3156
+ interface ShippingInformation {
3157
+ /** Shipping region. */
3158
+ region?: ShippingRegion;
3159
+ /** Selected shipping option. */
3160
+ selectedCarrierServiceOption?: SelectedCarrierServiceOption;
3161
+ /** All shipping options. */
3162
+ carrierServiceOptions?: CarrierServiceOption[];
3163
+ }
3164
+ interface ShippingRegion {
3165
+ /**
3166
+ * Shipping region ID.
3167
+ * @format GUID
3168
+ * @readonly
3169
+ */
3170
+ _id?: string;
3171
+ /**
3172
+ * Shipping region name.
3173
+ * @maxLength 100
3174
+ */
3175
+ name?: string;
3176
+ }
3177
+ interface SelectedCarrierServiceOption {
3178
+ /**
3179
+ * Unique identifier of selected option. For example, "usps_std_overnight".
3180
+ * @maxLength 100
3181
+ */
3182
+ code?: string;
3183
+ /**
3184
+ * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale).
3185
+ * For example, "Standard" or "First-Class Package International".
3186
+ * @maxLength 250
3187
+ * @readonly
3188
+ */
3189
+ title?: string;
3190
+ /**
3191
+ * Delivery logistics.
3192
+ * @readonly
3193
+ */
3194
+ logistics?: DeliveryLogistics;
3195
+ /**
3196
+ * Shipping costs.
3197
+ * @readonly
3198
+ */
3199
+ cost?: SelectedCarrierServiceOptionPrices;
3200
+ /**
3201
+ * Were we able to find the requested shipping option, or otherwise we fallback to the default one (the first)
3202
+ * @readonly
3203
+ */
3204
+ requestedShippingOption?: boolean;
3205
+ /**
3206
+ * Other charges
3207
+ * @deprecated Other charges
3208
+ * @replacedBy additional_fees
3209
+ * @targetRemovalDate 2025-10-01
3210
+ */
3211
+ otherCharges?: SelectedCarrierServiceOptionOtherCharge[];
3212
+ /**
3213
+ * This carrier's unique ID
3214
+ * @format GUID
3215
+ */
3216
+ carrierId?: string | null;
3217
+ /**
3218
+ * Delivery solution allocations to different delivery carriers and delivery regions
3219
+ * @maxSize 300
3220
+ */
3221
+ deliveryAllocations?: DeliveryAllocation[];
3222
+ /** If the delivery solution is a partial and doesn't apply to all items. */
3223
+ partial?: boolean | null;
3224
+ }
3225
+ interface DeliveryLogistics {
3226
+ /**
3227
+ * Expected delivery time, in free text. For example, "3-5 business days".
3228
+ * @maxLength 500
3229
+ */
3230
+ deliveryTime?: string | null;
3231
+ /**
3232
+ * Instructions for caller, e.g for pickup: "Please deliver during opening hours, and please don't park in disabled parking spot".
3233
+ * @maxLength 1000
3234
+ */
3235
+ instructions?: string | null;
3236
+ /** Pickup details. */
3237
+ pickupDetails?: PickupDetails;
3238
+ }
3239
+ interface PickupDetails {
3240
+ /** Pickup address. */
3241
+ address?: Address;
3242
+ /**
3243
+ * Whether the pickup address is that of a business - this may effect tax calculation.
3244
+ * @deprecated
3245
+ */
3246
+ businessLocation?: boolean;
3247
+ /** Pickup method */
3248
+ pickupMethod?: PickupMethodWithLiterals;
3249
+ }
3250
+ declare enum PickupMethod {
3251
+ UNKNOWN_METHOD = "UNKNOWN_METHOD",
3252
+ STORE_PICKUP = "STORE_PICKUP",
3253
+ PICKUP_POINT = "PICKUP_POINT"
3254
+ }
3255
+ /** @enumType */
3256
+ type PickupMethodWithLiterals = PickupMethod | 'UNKNOWN_METHOD' | 'STORE_PICKUP' | 'PICKUP_POINT';
3257
+ interface DeliveryTimeSlot {
3258
+ /** starting time of the delivery time slot */
3259
+ from?: Date | null;
3260
+ /** ending time of the delivery time slot */
3261
+ to?: Date | null;
3262
+ }
3263
+ interface SelectedCarrierServiceOptionPrices {
3264
+ /** Total shipping price, after discount and after tax. */
3265
+ totalPriceAfterTax?: MultiCurrencyPrice;
3266
+ /** Total price of shipping after discounts (when relevant), and before tax. */
3267
+ totalPriceBeforeTax?: MultiCurrencyPrice;
3268
+ /** Tax details. */
3269
+ taxDetails?: ItemTaxFullDetails;
3270
+ /** Shipping discount before tax. */
3271
+ totalDiscount?: MultiCurrencyPrice;
3272
+ /** Shipping price before discount and before tax. */
3273
+ price?: MultiCurrencyPrice;
3274
+ }
3275
+ interface SelectedCarrierServiceOptionOtherCharge {
3276
+ /** Type of additional cost. */
3277
+ type?: ChargeTypeWithLiterals;
3278
+ /**
3279
+ * Details of the charge, such as 'Full Coverage Insurance of up to 80% of value of shipment'.
3280
+ * @maxLength 200
3281
+ */
3282
+ details?: string | null;
3283
+ /** Price of added charge. */
3284
+ cost?: SelectedCarrierServiceOptionPrices;
3285
+ }
3286
+ declare enum ChargeType {
3287
+ HANDLING_FEE = "HANDLING_FEE",
3288
+ INSURANCE = "INSURANCE"
3289
+ }
3290
+ /** @enumType */
3291
+ type ChargeTypeWithLiterals = ChargeType | 'HANDLING_FEE' | 'INSURANCE';
3292
+ interface DeliveryAllocation {
3293
+ /** The delivery option's carrier details, could be multiple if the delivery option is a combination of multiple carriers */
3294
+ deliveryCarrier?: Carrier;
3295
+ /** The delivery region that are relevant for this delivery solution. */
3296
+ deliveryRegion?: Region;
3297
+ /** Populated if the delivery solution is a partially supplied by this carrier. */
3298
+ applicableLineItems?: ApplicableLineItems;
3299
+ }
3300
+ interface Carrier {
3301
+ /**
3302
+ * The carrier app id
3303
+ * @format GUID
3304
+ */
3305
+ appId?: string | null;
3306
+ /**
3307
+ * Unique code that acts as an ID for a shipping rate. For example, `"usps_std_overnight"`.
3308
+ * @maxLength 250
3309
+ */
3310
+ code?: string;
3311
+ }
3312
+ interface Region {
3313
+ /**
3314
+ * The delivery region id.
3315
+ * @format GUID
3316
+ */
3317
+ _id?: string | null;
3318
+ /**
3319
+ * The delivery region name.
3320
+ * @maxLength 100
3321
+ */
3322
+ name?: string | null;
3323
+ }
3324
+ interface ApplicableLineItems {
3325
+ /**
3326
+ * Line items that the delivery solution is for.
3327
+ * @maxSize 300
3328
+ * @minLength 1
3329
+ * @maxLength 100
3330
+ */
3331
+ lineItemIds?: string[];
3332
+ }
3333
+ interface CarrierServiceOption {
3334
+ /**
3335
+ * Carrier ID.
3336
+ * @format GUID
3337
+ */
3338
+ carrierId?: string;
3339
+ /** Shipping options offered by this carrier for this request. */
3340
+ shippingOptions?: ShippingOption[];
3341
+ }
3342
+ interface ShippingOption {
3343
+ /**
3344
+ * Unique code of provided shipping option like "usps_std_overnight".
3345
+ * For legacy calculators this would be the UUID of the option.
3346
+ * @maxLength 100
3347
+ */
3348
+ code?: string;
3349
+ /**
3350
+ * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale).
3351
+ * For example, "Standard" or "First-Class Package International".
3352
+ * @maxLength 250
3353
+ */
3354
+ title?: string;
3355
+ /** Delivery logistics. */
3356
+ logistics?: DeliveryLogistics;
3357
+ /** Sipping price information. */
3358
+ cost?: ShippingPrice;
3359
+ /**
3360
+ * Delivery solution allocations to different delivery carriers and delivery regions
3361
+ * @maxSize 300
3362
+ */
3363
+ deliveryAllocations?: DeliveryAllocation[];
3364
+ /** If the delivery solution is a partial and doesn't apply to all items. */
3365
+ partial?: boolean | null;
3366
+ }
3367
+ interface ShippingPrice {
3368
+ /** Shipping price. */
3369
+ price?: MultiCurrencyPrice;
3370
+ /** Other costs such as insurance, handling & packaging for fragile items, etc. */
3371
+ otherCharges?: OtherCharge[];
3372
+ }
3373
+ interface OtherCharge {
3374
+ /** Type of additional cost. */
3375
+ type?: ChargeTypeWithLiterals;
3376
+ /** Price of added cost. */
3377
+ price?: MultiCurrencyPrice;
3378
+ /**
3379
+ * Description of the additional charge. For example, `"Handling fee of $5 applied for gift wrapping"`.
3380
+ * @maxLength 250
3381
+ */
3382
+ details?: string | null;
3383
+ }
3384
+ interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
3385
+ /** Coupon details. */
3386
+ coupon?: Coupon;
3387
+ /** Merchant discount. */
3388
+ merchantDiscount?: MerchantDiscount;
3389
+ /** Discount rule */
3390
+ discountRule?: DiscountRule;
3391
+ /** Discount type. */
3392
+ discountType?: DiscountTypeWithLiterals;
3393
+ /**
3394
+ * IDs of line items the discount applies to.
3395
+ * @format GUID
3396
+ * @deprecated IDs of line items the discount applies to.
3397
+ * @replacedBy line_items_discounts
3398
+ * @targetRemovalDate 2025-12-31
3399
+ */
3400
+ lineItemIds?: string[];
3401
+ /**
3402
+ * Number of subscription cycle this discount applies to
3403
+ * default None - all billing cycle
3404
+ * @internal
3405
+ * @min 1
3406
+ * @max 999
3407
+ */
3408
+ subscriptionCycles?: number | null;
3409
+ }
3410
+ /** @oneof */
3411
+ interface AppliedDiscountDiscountSourceOneOf {
3412
+ /** Coupon details. */
3413
+ coupon?: Coupon;
3414
+ /** Merchant discount. */
3415
+ merchantDiscount?: MerchantDiscount;
3416
+ /** Discount rule */
3417
+ discountRule?: DiscountRule;
3418
+ }
3419
+ declare enum DiscountType {
3420
+ GLOBAL = "GLOBAL",
3421
+ SPECIFIC_ITEMS = "SPECIFIC_ITEMS",
3422
+ SHIPPING = "SHIPPING"
3423
+ }
3424
+ /** @enumType */
3425
+ type DiscountTypeWithLiterals = DiscountType | 'GLOBAL' | 'SPECIFIC_ITEMS' | 'SHIPPING';
3426
+ /** Coupon */
3427
+ interface Coupon {
3428
+ /** Coupon ID. */
3429
+ _id?: string;
3430
+ /** Coupon code. */
3431
+ code?: string;
3432
+ /** Coupon value. */
3433
+ amount?: MultiCurrencyPrice;
3434
+ /** Coupon name. */
3435
+ name?: string;
3436
+ }
3437
+ interface MerchantDiscount {
3438
+ /** Discount value. */
3439
+ amount?: MultiCurrencyPrice;
3440
+ /**
3441
+ * Discount Percentage. Will be calculated from items price before other discounts.
3442
+ * @min 1
3443
+ * @max 100
3444
+ */
3445
+ percentage?: number | null;
3446
+ }
3447
+ interface DiscountRule {
3448
+ /**
3449
+ * Discount rule ID
3450
+ * @format GUID
3451
+ */
3452
+ _id?: string;
3453
+ /** Discount rule name */
3454
+ name?: DiscountRuleName;
3455
+ /** Discount value. */
3456
+ amount?: MultiCurrencyPrice;
3457
+ }
3458
+ interface DiscountRuleName {
3459
+ /**
3460
+ * Original discount rule name (in site's default language).
3461
+ * @minLength 1
3462
+ * @maxLength 256
3463
+ */
3464
+ original?: string;
3465
+ /**
3466
+ * Translated discount rule name according to buyer language. Defaults to `original` when not provided.
3467
+ * @minLength 1
3468
+ * @maxLength 500
3469
+ */
3470
+ translated?: string | null;
3471
+ }
3472
+ interface LineItemDiscount {
3473
+ /**
3474
+ * ID of line item the discount applies to.
3475
+ * @format GUID
3476
+ */
3477
+ _id?: string;
3478
+ /** Discount value. */
3479
+ totalDiscountAmount?: MultiCurrencyPrice;
3480
+ }
3481
+ interface CalculationErrors extends CalculationErrorsShippingCalculationErrorOneOf {
3482
+ /** General shipping calculation error. */
3483
+ generalShippingCalculationError?: Details;
3484
+ /** Carrier errors. */
3485
+ carrierErrors?: CarrierErrors;
3486
+ /** Tax calculation error. */
3487
+ taxCalculationError?: Details;
3488
+ /** Coupon calculation error. */
3489
+ couponCalculationError?: Details;
3490
+ /** Gift card calculation error. */
3491
+ giftCardCalculationError?: Details;
3492
+ /** Order validation errors. */
3493
+ orderValidationErrors?: ApplicationError[];
3494
+ /**
3495
+ * Membership payment methods calculation errors
3496
+ * For example, will indicate that a line item that must be paid with membership payment doesn't have one or selected memberships are invalid
3497
+ */
3498
+ membershipError?: Details;
3499
+ /** Discount Rule calculation error. */
3500
+ discountsCalculationError?: Details;
3501
+ }
3502
+ /** @oneof */
3503
+ interface CalculationErrorsShippingCalculationErrorOneOf {
3504
+ /** General shipping calculation error. */
3505
+ generalShippingCalculationError?: Details;
3506
+ /** Carrier errors. */
3507
+ carrierErrors?: CarrierErrors;
3508
+ }
3509
+ interface CarrierErrors {
3510
+ /** Carrier errors. */
3511
+ errors?: CarrierError[];
3512
+ }
3513
+ interface CarrierError {
3514
+ /** Carrier ID. */
3515
+ carrierId?: string;
3516
+ /** Error details. */
3517
+ error?: Details;
3518
+ }
3519
+ interface MembershipOptions {
3520
+ /**
3521
+ * List of payment options that can be used.
3522
+ * @maxSize 300
3523
+ */
3524
+ eligibleMemberships?: Membership[];
3525
+ /**
3526
+ * List of payment options that are owned by the member, but cannot be used due to reason provided.
3527
+ * @maxSize 300
3528
+ */
3529
+ invalidMemberships?: InvalidMembership[];
3530
+ /**
3531
+ * The selected membership payment options and which line items they apply to.
3532
+ * @maxSize 300
3533
+ */
3534
+ selectedMemberships?: SelectedMembership[];
3535
+ }
3536
+ interface Membership {
3537
+ /**
3538
+ * Membership ID.
3539
+ * @minLength 1
3540
+ * @maxLength 100
3541
+ */
3542
+ _id?: string;
3543
+ /**
3544
+ * ID of the application providing this payment option.
3545
+ * @format GUID
3546
+ */
3547
+ appId?: string;
3548
+ /** The name of this membership. */
3549
+ name?: MembershipName;
3550
+ /**
3551
+ * Line item IDs which are "paid" for by this membership.
3552
+ * @minSize 1
3553
+ * @maxSize 300
3554
+ * @minLength 1
3555
+ * @maxLength 100
3556
+ */
3557
+ lineItemIds?: string[];
3558
+ /** Optional - For a membership that has limited credits, information about credit usage. */
3559
+ credits?: MembershipPaymentCredits;
3560
+ /** Optional - TMembership expiry date. */
3561
+ expirationDate?: Date | null;
3562
+ /** Additional data about this membership. */
3563
+ additionalData?: Record<string, any> | null;
3564
+ }
3565
+ interface MembershipName {
3566
+ /**
3567
+ * Membership name.
3568
+ * @maxLength 100
3569
+ */
3570
+ original?: string;
3571
+ /**
3572
+ * Translated membership name. Defaults to `original` when not provided.
3573
+ * @maxLength 100
3574
+ */
3575
+ translated?: string | null;
3576
+ }
3577
+ interface MembershipPaymentCredits {
3578
+ /**
3579
+ * Membership's total amount of credits.
3580
+ * @min 1
3581
+ */
3582
+ total?: number;
3583
+ /** Membership's remaining amount of credits. */
3584
+ remaining?: number;
3585
+ }
3586
+ interface InvalidMembership {
3587
+ /** Membership details. */
3588
+ membership?: Membership;
3589
+ /**
3590
+ * Reason why this membership is invalid and cannot be used.
3591
+ * @minLength 1
3592
+ * @maxLength 100
3593
+ */
3594
+ reason?: string;
3595
+ }
3596
+ interface SelectedMembership {
3597
+ /**
3598
+ * Membership ID.
3599
+ * @minLength 1
3600
+ * @maxLength 100
3601
+ */
3602
+ _id?: string;
3603
+ /**
3604
+ * ID of the app providing this payment option.
3605
+ * @format GUID
3606
+ */
3607
+ appId?: string;
3608
+ /**
3609
+ * IDs of the line items this membership applies to.
3610
+ * @minSize 1
3611
+ * @maxSize 300
3612
+ * @minLength 1
3613
+ * @maxLength 100
3614
+ */
3615
+ lineItemIds?: string[];
3616
+ }
3617
+ interface AdditionalFee {
3618
+ /**
3619
+ * Additional fee's unique code (or ID) for future processing.
3620
+ * @minLength 1
3621
+ * @maxLength 100
3622
+ */
3623
+ code?: string | null;
3624
+ /**
3625
+ * Translated additional fee's name.
3626
+ * @minLength 1
3627
+ * @maxLength 50
3628
+ */
3629
+ name?: string;
3630
+ /** Additional fee's price. */
3631
+ price?: MultiCurrencyPrice;
3632
+ /** Tax details. */
3633
+ taxDetails?: ItemTaxFullDetails;
3634
+ /**
3635
+ * Provider's app id.
3636
+ * @minLength 1
3637
+ * @maxLength 100
3638
+ */
3639
+ providerAppId?: string | null;
3640
+ /** Additional fee's price before tax. */
3641
+ priceBeforeTax?: MultiCurrencyPrice;
3642
+ /** Additional fee's price after tax. */
3643
+ priceAfterTax?: MultiCurrencyPrice;
3644
+ /**
3645
+ * Optional - Line items associated with this additional fee.
3646
+ * If no `lineItemIds` are provided, the fee will be associated with the whole cart/checkout/order.
3647
+ * @format GUID
3648
+ */
3649
+ lineItemIds?: string[];
3650
+ /**
3651
+ * Number of subscription cycle this fee applies to
3652
+ * default None - all billing cycle
3653
+ * @internal
3654
+ * @min 1
3655
+ * @max 999
3656
+ */
3657
+ subscriptionCycles?: number | null;
3658
+ /** the source the additional fee was added from */
3659
+ source?: AdditionalFeeSourceWithLiterals;
3660
+ /**
3661
+ * 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).
3662
+ * @minLength 1
3663
+ * @maxLength 50
3664
+ */
3665
+ translatedName?: string | null;
3666
+ }
3667
+ declare enum AdditionalFeeSource {
3668
+ UNKNOWN_ADDITIONAL_FEE_SOURCE = "UNKNOWN_ADDITIONAL_FEE_SOURCE",
3669
+ /** The additional fee was added by an additional fee service plugin */
3670
+ SERVICE_PLUGIN = "SERVICE_PLUGIN",
3671
+ /** The additional fee was added on the item either via the catalog or on custom line item */
3672
+ ITEM = "ITEM",
3673
+ /** The additional fee was added manually on the request */
3674
+ MANUAL = "MANUAL",
3675
+ /** The additional fee was added by the shipping provider */
3676
+ SHIPPING = "SHIPPING"
3677
+ }
3678
+ /** @enumType */
3679
+ type AdditionalFeeSourceWithLiterals = AdditionalFeeSource | 'UNKNOWN_ADDITIONAL_FEE_SOURCE' | 'SERVICE_PLUGIN' | 'ITEM' | 'MANUAL' | 'SHIPPING';
3680
+ interface GetCheckoutURLRequest {
3681
+ /**
3682
+ * ID of the Cart to calculate.
3683
+ * @format GUID
3684
+ */
3685
+ cartId: string;
3686
+ /**
3687
+ * Checkout currency parameter to append as a query param
3688
+ * @format CURRENCY
3689
+ */
3690
+ currencyCode?: string | null;
3691
+ }
3692
+ interface GetCheckoutURLResponse {
3693
+ /**
3694
+ * The checkout URL.
3695
+ * @format WEB_URL
3696
+ */
3697
+ checkoutUrl?: string;
3698
+ }
3699
+ interface PlaceOrderRequest {
3700
+ /**
3701
+ * Cart ID.
3702
+ * @format GUID
3703
+ */
3704
+ cartId: string;
3705
+ /**
3706
+ * The price verification token received from `CalculateCart`'s response.
3707
+ * Used to verify that the prices shown to the customer have not changed before completing checkout.
3708
+ * @maxLength 3000
3709
+ */
3710
+ priceVerificationToken?: string | null;
3711
+ /**
3712
+ * Payment token.
3713
+ * @maxLength 100
3714
+ */
3715
+ paymentToken?: string | null;
3716
+ /** Urls to redirect to after payment is made. */
3717
+ redirectUrls?: RedirectUrls;
3718
+ /** Indicates the payment method should be saved on the order */
3719
+ savePaymentMethod?: boolean;
3720
+ /** Indicates whether to authorize the payment and delay the capture */
3721
+ delayCapture?: boolean;
3722
+ }
3723
+ interface RedirectUrls {
3724
+ /**
3725
+ * URL to redirect to if payment is canceled (usually checkout url).
3726
+ * @format WEB_URL
3727
+ */
3728
+ cancelUrl?: string;
3729
+ /**
3730
+ * URL to redirect to if an error occurred on payment (usually checkout url).
3731
+ * @format WEB_URL
3732
+ */
3733
+ errorUrl?: string;
3734
+ /**
3735
+ * URL to redirect to after successful payment, excepts order place holder {orderId}.
3736
+ * @maxLength 2000
3737
+ */
3738
+ successUrl?: string | null;
3739
+ /**
3740
+ * URL to redirect to if payment is pending, excepts order place holder {orderId}.
3741
+ * @maxLength 2000
3742
+ */
3743
+ pendingUrl?: string | null;
3744
+ }
3745
+ interface PlaceOrderResponse {
3746
+ /**
3747
+ * The order ID of the created order.
3748
+ * @format GUID
3749
+ */
3750
+ orderId?: string;
3751
+ /**
3752
+ * Payment response token.
3753
+ * @maxLength 1000
3754
+ */
3755
+ paymentResponseToken?: string | null;
3756
+ /**
3757
+ * The payment gateway is Cashier.
3758
+ * payment_gateway_order_id will be returned given that money was charged.
3759
+ * In some cases, money will not be charged:
3760
+ * If the total price is 0 - For example, could be a free item or a an item with 100% discount
3761
+ * If the total price is not 0, but the payment is covered by alternative payment methods such as gift card
3762
+ * @maxLength 50
3763
+ */
3764
+ paymentGatewayOrderId?: string | null;
3765
+ /** Whether an order was successfully created from this cart and the payment transaction was completed. */
3766
+ completed?: boolean;
3767
+ }
3768
+ interface AddLineItemsRequest {
3769
+ /**
3770
+ * Cart ID.
3771
+ * @format GUID
3772
+ */
3773
+ cartId: string;
3774
+ /**
3775
+ * A list of catalog items to add to the cart.
3776
+ * @maxSize 300
3777
+ */
3778
+ catalogItems?: CatalogItemInput[];
3779
+ /**
3780
+ * A list of custom items to add to the cart.
3781
+ * @maxSize 300
3782
+ */
3783
+ customItems?: CustomItemInput[];
3784
+ }
3785
+ interface AddLineItemsResponse {
3786
+ /** Updated Cart. */
3787
+ cart?: Cart;
3788
+ }
3789
+ interface RemoveLineItemsRequest {
3790
+ /**
3791
+ * Cart ID.
3792
+ * @format GUID
3793
+ */
3794
+ cartId: string;
3795
+ /**
3796
+ * Line item IDs to remove from cart.
3797
+ * @format GUID
3798
+ * @minSize 1
3799
+ * @maxSize 100
3800
+ */
3801
+ lineItemIds: string[];
3802
+ }
3803
+ interface RemoveLineItemsResponse {
3804
+ /** Updated Cart. */
3805
+ cart?: Cart;
3806
+ }
3807
+ interface UpdateLineItemsRequest {
3808
+ /**
3809
+ * Cart ID.
3810
+ * @format GUID
3811
+ */
3812
+ cartId: string;
3813
+ /**
3814
+ * Line item updates to apply.
3815
+ * @minSize 1
3816
+ * @maxSize 300
3817
+ */
3818
+ lineItems?: LineItemUpdate[];
3819
+ }
3820
+ interface UpdateLineItemsResponse {
3821
+ /** Updated Cart. */
3822
+ cart?: Cart;
3823
+ }
3824
+ interface AddCouponRequest {
3825
+ /**
3826
+ * Cart ID.
3827
+ * @format GUID
3828
+ */
3829
+ cartId: string;
3830
+ /**
3831
+ * Coupon to apply.
3832
+ *
3833
+ * Currently only one is supported.
3834
+ * @minLength 1
3835
+ * @maxLength 50
3836
+ */
3837
+ couponCode: string;
3838
+ }
3839
+ interface AddCouponResponse {
3840
+ /** Updated Cart. */
3841
+ cart?: Cart;
3842
+ }
3843
+ interface RemoveCouponRequest {
3844
+ /**
3845
+ * Cart ID.
3846
+ * @format GUID
3847
+ */
3848
+ cartId: string;
3849
+ /**
3850
+ * Discount ID.
3851
+ * @format GUID
3852
+ */
3853
+ couponId: string;
3854
+ }
3855
+ interface RemoveCouponResponse {
3856
+ /** Updated Cart. */
3857
+ cart?: Cart;
3858
+ }
3859
+ interface SetDeliveryMethodRequest {
3860
+ /**
3861
+ * Cart ID.
3862
+ * @format GUID
3863
+ */
3864
+ cartId: string;
3865
+ /** Delivery method. */
3866
+ deliveryMethod: DeliveryMethodInput;
3867
+ }
3868
+ interface SetDeliveryMethodResponse {
3869
+ /** Updated Cart. */
3870
+ cart?: Cart;
3871
+ }
3872
+ interface AddGiftCardRequest {
3873
+ /**
3874
+ * Cart ID.
3875
+ * @format GUID
3876
+ */
3877
+ cartId: string;
3878
+ /**
3879
+ * Gift card code.
3880
+ *
3881
+ * Currently only one is supported.
3882
+ * @minLength 8
3883
+ * @maxLength 20
3884
+ */
3885
+ giftCardCode: string;
3886
+ }
3887
+ interface AddGiftCardResponse {
3888
+ /** Updated Cart. */
3889
+ cart?: Cart;
3890
+ }
3891
+ interface RemoveGiftCardRequest {
3892
+ /**
3893
+ * Cart ID.
3894
+ * @format GUID
3895
+ */
3896
+ cartId: string;
3897
+ /**
3898
+ * Gift card ID.
3899
+ * @format GUID
3900
+ */
3901
+ giftCardId: string;
3902
+ }
3903
+ interface RemoveGiftCardResponse {
3904
+ /** Updated Cart. */
3905
+ cart?: Cart;
3906
+ }
3907
+ interface MarkCartAsCompletedRequest {
3908
+ /**
3909
+ * Cart ID.
3910
+ * @format GUID
3911
+ */
3912
+ cartId: string;
3913
+ /**
3914
+ * Order ID.
2919
3915
  * @format GUID
2920
3916
  */
2921
3917
  orderId?: string | null;
@@ -2942,6 +3938,12 @@ interface HeadersEntry {
2942
3938
  key?: string;
2943
3939
  value?: string;
2944
3940
  }
3941
+ /** @docsIgnore */
3942
+ type GetCartApplicationErrors = {
3943
+ code?: 'DUMMY_ERROR_METHOD_CODE';
3944
+ description?: string;
3945
+ data?: DummyErrorDataMethodLevel;
3946
+ };
2945
3947
  /**
2946
3948
  * Creates a Cart.
2947
3949
  * @internal
@@ -3009,7 +4011,9 @@ interface CreateCartOptions {
3009
4011
  * @returns The requested Cart.
3010
4012
  * @fqn wix.ecom.cart.v2.CartService.GetCart
3011
4013
  */
3012
- declare function getCart(cartId: string): Promise<NonNullablePaths<Cart, `_id` | `revision` | `lineItems` | `lineItems.${number}._id` | `lineItems.${number}.name.original` | `lineItems.${number}.quantityInfo.confirmedQuantity` | `lineItems.${number}.quantityInfo.requestedQuantity` | `lineItems.${number}.quantityInfo.fixedQuantity` | `lineItems.${number}.pricing.unitPrice.amount` | `lineItems.${number}.pricing.unitPrice.convertedAmount` | `lineItems.${number}.pricing.priceDescription.original` | `lineItems.${number}.pricing.priceUndetermined` | `lineItems.${number}.source.catalogReference.catalogItemId` | `lineItems.${number}.source.catalogReference.appId` | `lineItems.${number}.attributes.itemType.preset` | `lineItems.${number}.attributes.itemType.custom` | `lineItems.${number}.attributes.physicalProperties.shippable` | `lineItems.${number}.attributes.membersOnly` | `lineItems.${number}.taxConfig.taxableAddress.addressType` | `lineItems.${number}.paymentConfig.savePaymentMethod` | `lineItems.${number}.paymentConfig.selectedMembership._id` | `lineItems.${number}.paymentConfig.selectedMembership.appId` | `lineItems.${number}.paymentConfig.paymentOption` | `lineItems.${number}.status` | `lineItems.${number}.customLineItem` | `coupons` | `coupons.${number}._id` | `coupons.${number}.code` | `source.channelType` | `source.externalReferences` | `source.externalReferences.${number}.appId` | `source.createdBy.visitorId` | `source.createdBy.memberId` | `source.createdBy.userId` | `source.createdBy.appId` | `source.customContentReference.appId` | `source.customContentReference.componentId` | `businessInfo.languageCode` | `businessInfo.currencyCode` | `customerInfo.visitorId` | `customerInfo.memberId` | `customerInfo.userId` | `customerInfo.vatId._id` | `customerInfo.vatId.type` | `customerInfo.languageCode` | `customerInfo.currencyCode` | `deliveryInfo.address.streetAddress.number` | `deliveryInfo.address.streetAddress.name` | `deliveryInfo.method.code` | `deliveryInfo.method.pickup` | `deliveryInfo.weightUnit` | `taxInfo.pricesIncludeTax` | `paymentInfo.giftCards` | `paymentInfo.giftCards.${number}._id` | `paymentInfo.giftCards.${number}.obfuscatedCode` | `paymentInfo.giftCards.${number}.appId` | `paymentInfo.currencyCode` | `orderPlaced` | `currentCart`, 6>>;
4014
+ declare function getCart(cartId: string): Promise<NonNullablePaths<Cart, `_id` | `revision` | `lineItems` | `lineItems.${number}._id` | `lineItems.${number}.name.original` | `lineItems.${number}.quantityInfo.confirmedQuantity` | `lineItems.${number}.quantityInfo.requestedQuantity` | `lineItems.${number}.quantityInfo.fixedQuantity` | `lineItems.${number}.pricing.unitPrice.amount` | `lineItems.${number}.pricing.unitPrice.convertedAmount` | `lineItems.${number}.pricing.priceDescription.original` | `lineItems.${number}.pricing.priceUndetermined` | `lineItems.${number}.source.catalogReference.catalogItemId` | `lineItems.${number}.source.catalogReference.appId` | `lineItems.${number}.attributes.itemType.preset` | `lineItems.${number}.attributes.itemType.custom` | `lineItems.${number}.attributes.physicalProperties.shippable` | `lineItems.${number}.attributes.membersOnly` | `lineItems.${number}.taxConfig.taxableAddress.addressType` | `lineItems.${number}.paymentConfig.savePaymentMethod` | `lineItems.${number}.paymentConfig.selectedMembership._id` | `lineItems.${number}.paymentConfig.selectedMembership.appId` | `lineItems.${number}.paymentConfig.paymentOption` | `lineItems.${number}.status` | `lineItems.${number}.customLineItem` | `coupons` | `coupons.${number}._id` | `coupons.${number}.code` | `source.channelType` | `source.externalReferences` | `source.externalReferences.${number}.appId` | `source.createdBy.visitorId` | `source.createdBy.memberId` | `source.createdBy.userId` | `source.createdBy.appId` | `source.customContentReference.appId` | `source.customContentReference.componentId` | `businessInfo.languageCode` | `businessInfo.currencyCode` | `customerInfo.visitorId` | `customerInfo.memberId` | `customerInfo.userId` | `customerInfo.vatId._id` | `customerInfo.vatId.type` | `customerInfo.languageCode` | `customerInfo.currencyCode` | `deliveryInfo.address.streetAddress.number` | `deliveryInfo.address.streetAddress.name` | `deliveryInfo.method.code` | `deliveryInfo.method.pickup` | `deliveryInfo.weightUnit` | `taxInfo.pricesIncludeTax` | `paymentInfo.giftCards` | `paymentInfo.giftCards.${number}._id` | `paymentInfo.giftCards.${number}.obfuscatedCode` | `paymentInfo.giftCards.${number}.appId` | `paymentInfo.currencyCode` | `orderPlaced` | `currentCart`, 6> & {
4015
+ __applicationErrorsType?: GetCartApplicationErrors;
4016
+ }>;
3013
4017
  /**
3014
4018
  * Updates a Cart.
3015
4019
  *
@@ -3074,7 +4078,7 @@ interface UpdateCart {
3074
4078
  * @maxSize 1
3075
4079
  * @readonly
3076
4080
  */
3077
- coupons?: Coupon[];
4081
+ coupons?: V2Coupon[];
3078
4082
  /** Information about the source of the Cart, detailing the origin or context in which the Cart was created. */
3079
4083
  source?: CartSource;
3080
4084
  /** Information about the site from which the Cart's line items were added. */
@@ -3416,4 +4420,4 @@ interface MarkCartAsCompletedOptions {
3416
4420
  */
3417
4421
  declare function handleAsyncCheckoutCompletion(token: string): Promise<NonNullablePaths<RawHttpResponse, `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`, 4>>;
3418
4422
 
3419
- 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, addCoupon, addGiftCard, addLineItems, calculateCart, createCart, deleteCart, getCart, getCheckoutUrl, handleAsyncCheckoutCompletion, markCartAsCompleted, placeOrder, refreshCart, removeCoupon, removeGiftCard, removeLineItems, setDeliveryMethod, updateCart, updateLineItems };
4423
+ 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, addCoupon, addGiftCard, addLineItems, calculateCart, createCart, deleteCart, getCart, getCheckoutUrl, handleAsyncCheckoutCompletion, markCartAsCompleted, placeOrder, refreshCart, removeCoupon, removeGiftCard, removeLineItems, setDeliveryMethod, updateCart, updateLineItems };