@wix/auto_sdk_ecom_current-cart-v-2 1.0.32 → 1.0.34

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 +974 -58
  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 +974 -58
  8. package/build/cjs/meta.js +67 -0
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +974 -58
  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 +974 -58
  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 +1 -1
  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 +1038 -58
  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 +974 -58
  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 +1 -1
  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 +1038 -58
  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 +974 -58
  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
@@ -1366,39 +1366,7 @@ interface CartSettings {
1366
1366
  /** Whether to disable manual payment option for this checkout. */
1367
1367
  manualPaymentDisabled?: boolean | null;
1368
1368
  }
1369
- interface CustomField {
1370
- /** Custom field value. */
1371
- value?: any;
1372
- /**
1373
- * Custom field title.
1374
- * @minLength 1
1375
- * @maxLength 500
1376
- */
1377
- title?: string;
1378
- /**
1379
- * Translated custom field title.
1380
- * @minLength 1
1381
- * @maxLength 500
1382
- */
1383
- translatedTitle?: string | null;
1384
- }
1385
1369
  interface LegacyFields {
1386
- /**
1387
- * The applied discounts of the Cart.
1388
- * Discounts that are no longer applied are not included in this list.
1389
- * @maxSize 100
1390
- */
1391
- appliedDiscounts?: Discount[];
1392
- /** The coupon discount amount. */
1393
- couponDiscount?: ConvertedMoney;
1394
- /** The sum of all line items after applying all discounts. */
1395
- subtotalAfterCouponDiscount?: ConvertedMoney;
1396
- /**
1397
- * Indicates that this cart was created by the Buy Now flow.
1398
- * Used by the Cart API proxy to determine whether to produce legacy V1 domain events.
1399
- * @immutable
1400
- */
1401
- buyNow?: boolean;
1402
1370
  }
1403
1371
  interface Discount {
1404
1372
  /** The display name of the discount. */
@@ -1466,6 +1434,22 @@ interface DiscountBenefitValueOneOf {
1466
1434
  /** A specific monetary value deducted from the total cost. */
1467
1435
  amountOff?: ConvertedMoney;
1468
1436
  }
1437
+ interface CustomField {
1438
+ /** Custom field value. */
1439
+ value?: any;
1440
+ /**
1441
+ * Custom field title.
1442
+ * @minLength 1
1443
+ * @maxLength 500
1444
+ */
1445
+ title?: string;
1446
+ /**
1447
+ * Translated custom field title.
1448
+ * @minLength 1
1449
+ * @maxLength 500
1450
+ */
1451
+ translatedTitle?: string | null;
1452
+ }
1469
1453
  interface CartSummary {
1470
1454
  /**
1471
1455
  * The Cart ID.
@@ -1495,9 +1479,9 @@ interface CartSummary {
1495
1479
  */
1496
1480
  additionalFees?: V2AdditionalFee[];
1497
1481
  /** Summary of tax calculations applied to the cart. */
1498
- taxSummary?: TaxSummary;
1482
+ taxSummary?: V2TaxSummary;
1499
1483
  /** Summary of all calculated price components in the cart. */
1500
- priceSummary?: PriceSummary;
1484
+ priceSummary?: V2PriceSummary;
1501
1485
  /** Payment details summarizing how the customer will pay for the order. */
1502
1486
  paymentSummary?: PaymentSummary;
1503
1487
  /**
@@ -1520,7 +1504,7 @@ interface CartSummary {
1520
1504
  * List of errors that occurred during the calculation process, returned by Totals Calculator.
1521
1505
  * TODO: Temporary field for backward compatibility; will be removed once we introduce the unified 'violations' model.
1522
1506
  */
1523
- calculationErrors?: CalculationErrors;
1507
+ calculationErrors?: V2CalculationErrors;
1524
1508
  /**
1525
1509
  * 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
1510
  * TODO: Temporary field for backward compatibility; will be removed once we introduce the unified 'violations' model.
@@ -1595,7 +1579,7 @@ interface V2AdditionalFee {
1595
1579
  */
1596
1580
  subscriptionCycles?: number | null;
1597
1581
  }
1598
- interface TaxSummary {
1582
+ interface V2TaxSummary {
1599
1583
  /**
1600
1584
  * List of taxes applied to the cart.
1601
1585
  * May contain multiple entries when advanced tax rates are configured by the merchant,
@@ -1656,7 +1640,7 @@ interface AdditionalFeeTax {
1656
1640
  /** Tax amount applied to the additional fee. */
1657
1641
  tax?: ConvertedMoney;
1658
1642
  }
1659
- interface PriceSummary {
1643
+ interface V2PriceSummary {
1660
1644
  /**
1661
1645
  * Total price of all line items after applying item-level discounts.
1662
1646
  * Includes tax if `tax_summary.prices_include_tax` is true.
@@ -1694,7 +1678,7 @@ interface PaymentSummary {
1694
1678
  * A list of valid memberships that will be charged as part of the order.
1695
1679
  * @maxSize 300
1696
1680
  */
1697
- memberships?: Membership[];
1681
+ memberships?: V2Membership[];
1698
1682
  /**
1699
1683
  * Charges information for each subscription in the checkout.
1700
1684
  * @maxSize 100
@@ -1720,7 +1704,7 @@ interface GiftCardSummary {
1720
1704
  /** The amount to be reduced from the gift card's balance. */
1721
1705
  redeemAmount?: ConvertedMoney;
1722
1706
  }
1723
- interface Membership {
1707
+ interface V2Membership {
1724
1708
  /**
1725
1709
  * Membership ID.
1726
1710
  * @minLength 1
@@ -1767,15 +1751,15 @@ interface Charge {
1767
1751
  /** The number of cycles for which the charge is applicable. */
1768
1752
  cycleCount?: number | null;
1769
1753
  /** Charge summary. */
1770
- priceSummary?: PriceSummary;
1754
+ priceSummary?: V2PriceSummary;
1771
1755
  /** The billing date from which the charge starts. */
1772
1756
  cycleBillingDate?: Date | null;
1773
1757
  }
1774
- interface CalculationErrors extends CalculationErrorsShippingCalculationErrorOneOf {
1758
+ interface V2CalculationErrors extends V2CalculationErrorsShippingCalculationErrorOneOf {
1775
1759
  /** General shipping calculation error. */
1776
1760
  generalShippingCalculationError?: Details;
1777
1761
  /** Carrier errors. */
1778
- carrierErrors?: CarrierErrors;
1762
+ carrierErrors?: V2CarrierErrors;
1779
1763
  /** Tax calculation error. */
1780
1764
  taxCalculationError?: Details;
1781
1765
  /** Coupon calculation error. */
@@ -1796,11 +1780,11 @@ interface CalculationErrors extends CalculationErrorsShippingCalculationErrorOne
1796
1780
  discountsCalculationError?: Details;
1797
1781
  }
1798
1782
  /** @oneof */
1799
- interface CalculationErrorsShippingCalculationErrorOneOf {
1783
+ interface V2CalculationErrorsShippingCalculationErrorOneOf {
1800
1784
  /** General shipping calculation error. */
1801
1785
  generalShippingCalculationError?: Details;
1802
1786
  /** Carrier errors. */
1803
- carrierErrors?: CarrierErrors;
1787
+ carrierErrors?: V2CarrierErrors;
1804
1788
  }
1805
1789
  interface Details extends DetailsKindOneOf {
1806
1790
  applicationError?: ApplicationError;
@@ -1898,14 +1882,14 @@ interface SystemError {
1898
1882
  /** Error code. */
1899
1883
  errorCode?: string | null;
1900
1884
  }
1901
- interface CarrierErrors {
1885
+ interface V2CarrierErrors {
1902
1886
  /**
1903
1887
  * Carrier errors.
1904
1888
  * @maxSize 100
1905
1889
  */
1906
- errors?: CarrierError[];
1890
+ errors?: V2CarrierError[];
1907
1891
  }
1908
- interface CarrierError {
1892
+ interface V2CarrierError {
1909
1893
  /**
1910
1894
  * Carrier ID.
1911
1895
  * @format GUID
@@ -2030,7 +2014,7 @@ interface CatalogItemInput {
2030
2014
  */
2031
2015
  quantity?: number;
2032
2016
  /** Selected membership to be used as payment for this item. */
2033
- selectedMembership?: SelectedMembership;
2017
+ selectedMembership?: V2SelectedMembership;
2034
2018
  /**
2035
2019
  * Overriding values for catalog item properties.
2036
2020
  * To override catalog fields, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
@@ -2342,7 +2326,7 @@ interface SelectedMembershipUpdate {
2342
2326
  *
2343
2327
  * To just remove current selected membership, and not replace with a new one, pass an empty value here.
2344
2328
  */
2345
- newMembership?: SelectedMembership;
2329
+ newMembership?: V2SelectedMembership;
2346
2330
  }
2347
2331
  interface UpdateLineItemsInCurrentCartResponse {
2348
2332
  /** Updated Cart. */
@@ -2596,6 +2580,34 @@ interface GetCartResponse {
2596
2580
  /** The requested Cart. */
2597
2581
  cart?: Cart;
2598
2582
  }
2583
+ /** temp for client testing */
2584
+ interface DummyErrorDataMethodLevel {
2585
+ /** This is a dummy field. */
2586
+ invalidItems?: LineItemIdentifier[];
2587
+ /** The fresh cart after resolving the error. */
2588
+ freshCart?: Cart;
2589
+ /** dummy string */
2590
+ dummyMethod?: string;
2591
+ }
2592
+ interface LineItemIdentifier extends LineItemIdentifierIdOneOf {
2593
+ /**
2594
+ * Line Item ID.
2595
+ * @format GUID
2596
+ */
2597
+ lineItemId?: string;
2598
+ /** Catalog reference. */
2599
+ catalogReference?: CatalogReference;
2600
+ }
2601
+ /** @oneof */
2602
+ interface LineItemIdentifierIdOneOf {
2603
+ /**
2604
+ * Line Item ID.
2605
+ * @format GUID
2606
+ */
2607
+ lineItemId?: string;
2608
+ /** Catalog reference. */
2609
+ catalogReference?: CatalogReference;
2610
+ }
2599
2611
  interface UpdateCartRequest {
2600
2612
  /** Cart to be updated, may be partial. */
2601
2613
  cart?: Cart;
@@ -2653,6 +2665,910 @@ interface CalculateCartResponse {
2653
2665
  /** The calculation summary. */
2654
2666
  summary?: CartSummary;
2655
2667
  }
2668
+ interface CalculateCartWithFullResponseResponse {
2669
+ /** The Cart that was calculated. */
2670
+ cart?: Cart;
2671
+ /** The calculation summary. */
2672
+ summary?: CartSummary;
2673
+ /**
2674
+ * Totals payload used for backward compatibility with legacy clients.
2675
+ * Used by the Cart and Checkout proxies.
2676
+ */
2677
+ totalsResponse?: CalculateTotalsResponse;
2678
+ }
2679
+ interface CalculateTotalsResponse {
2680
+ /** Calculate line items. */
2681
+ calculatedLineItems?: CalculatedLineItem[];
2682
+ /** Price summary. */
2683
+ priceSummary?: PriceSummary;
2684
+ /** Details of applied gift card. */
2685
+ giftCard?: GiftCard;
2686
+ /** Tax summary. */
2687
+ taxSummary?: TaxSummary;
2688
+ /** Shipping information. */
2689
+ shippingInfo?: ShippingInformation;
2690
+ /**
2691
+ * Applied discounts.
2692
+ * @maxSize 320
2693
+ */
2694
+ appliedDiscounts?: AppliedDiscount[];
2695
+ /** Calculation errors. */
2696
+ calculationErrors?: CalculationErrors;
2697
+ /** Weight unit. */
2698
+ weightUnit?: WeightUnitWithLiterals;
2699
+ /**
2700
+ * Currency.
2701
+ * @format CURRENCY
2702
+ */
2703
+ currency?: string;
2704
+ /**
2705
+ * This is the display currency. Converted prices are presented in this currency.
2706
+ * @readonly
2707
+ * @format CURRENCY
2708
+ */
2709
+ conversionCurrency?: string;
2710
+ /** Whether tax is included in price. */
2711
+ taxIncludedInPrice?: boolean;
2712
+ /**
2713
+ * Minimal amount to pay in order to place the order.
2714
+ * @readonly
2715
+ */
2716
+ payNow?: PriceSummary;
2717
+ /**
2718
+ * Remaining amount for the order to be fully paid.
2719
+ * @readonly
2720
+ */
2721
+ payLater?: PriceSummary;
2722
+ /** Information about valid and invalid memberships, and which ones are selected for usage. */
2723
+ membershipOptions?: MembershipOptions;
2724
+ /**
2725
+ * Additional Fees
2726
+ * @maxSize 100
2727
+ */
2728
+ additionalFees?: AdditionalFee[];
2729
+ /**
2730
+ * The site currency.
2731
+ * @readonly
2732
+ * @format CURRENCY
2733
+ */
2734
+ siteCurrency?: string;
2735
+ /**
2736
+ * The rate used when converting from the site currency to the checkout currency.
2737
+ * @readonly
2738
+ * @decimalValue options { gt:0, lte:1000000000000000 }
2739
+ */
2740
+ checkoutConversionRate?: string | null;
2741
+ /**
2742
+ * The pay now total amount after the gift card is applied.
2743
+ * @readonly
2744
+ */
2745
+ payNowTotalAfterGiftCard?: MultiCurrencyPrice;
2746
+ /**
2747
+ * The total amount after gift card is applied.
2748
+ * @readonly
2749
+ */
2750
+ totalAfterGiftCard?: MultiCurrencyPrice;
2751
+ /**
2752
+ * Payment for subscriptions after free trial period.
2753
+ * @readonly
2754
+ */
2755
+ payAfterFreeTrial?: PriceSummary;
2756
+ }
2757
+ interface CalculatedLineItem {
2758
+ /** Line item ID. */
2759
+ lineItemId?: string;
2760
+ /** Price breakdown for this line item. */
2761
+ pricesBreakdown?: LineItemPricesData;
2762
+ /**
2763
+ * Type of selected payment option for current item. Supported values:
2764
+ * + `"FULL_PAYMENT_ONLINE"` - The entire payment for this item will happen as part of the checkout
2765
+ * + `"FULL_PAYMENT_OFFLINE"` - The entire payment for this item will happen after the checkout
2766
+ * + `"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
2767
+ * + `"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.
2768
+ */
2769
+ paymentOption?: PaymentOptionTypeWithLiterals;
2770
+ /** tax calculation address. */
2771
+ taxableAddress?: TaxableAddress;
2772
+ }
2773
+ interface LineItemPricesData {
2774
+ /** Total price after discounts, tax, and modifiers. */
2775
+ totalPriceAfterTax?: MultiCurrencyPrice;
2776
+ /** Total price after discounts and modifiers, and before tax. */
2777
+ totalPriceBeforeTax?: MultiCurrencyPrice;
2778
+ /** Tax details. */
2779
+ taxDetails?: ItemTaxFullDetails;
2780
+ /** Total discount applied for the line item. */
2781
+ totalDiscount?: MultiCurrencyPrice;
2782
+ /** Catalog price after catalog-defined discount, automatic discounts, and modifiers. */
2783
+ price?: MultiCurrencyPrice;
2784
+ /**
2785
+ * Item price before automatic discounts, coupons, and global discounts; after catalog-defined discounts and modifiers.
2786
+ * Defaults to `price` when not provided.
2787
+ */
2788
+ priceBeforeDiscounts?: MultiCurrencyPrice;
2789
+ /** Total line item price after catalog-defined discounts, automatic discounts, and modifiers. */
2790
+ lineItemPrice?: MultiCurrencyPrice;
2791
+ /**
2792
+ * Item price before all discounts and modifiers.
2793
+ * Defaults to `price` when not provided.
2794
+ */
2795
+ fullPrice?: MultiCurrencyPrice;
2796
+ /**
2797
+ * Partial payment to be paid upfront during the checkout.
2798
+ * Applies to catalog items with `lineItem.paymentOption` type `DEPOSIT_ONLINE` only.
2799
+ */
2800
+ depositAmount?: MultiCurrencyPrice;
2801
+ }
2802
+ interface MultiCurrencyPrice {
2803
+ /**
2804
+ * Amount.
2805
+ * @decimalValue options { gte:0, lte:1000000000000000 }
2806
+ */
2807
+ amount?: string;
2808
+ /**
2809
+ * Converted amount.
2810
+ * @readonly
2811
+ * @decimalValue options { gte:0, lte:1000000000000000 }
2812
+ */
2813
+ convertedAmount?: string;
2814
+ /**
2815
+ * Amount formatted with currency symbol.
2816
+ * @readonly
2817
+ */
2818
+ formattedAmount?: string;
2819
+ /**
2820
+ * Converted amount formatted with currency symbol.
2821
+ * @readonly
2822
+ */
2823
+ formattedConvertedAmount?: string;
2824
+ }
2825
+ interface ItemTaxFullDetails {
2826
+ /** Amount for which tax is calculated. */
2827
+ taxableAmount?: MultiCurrencyPrice;
2828
+ /**
2829
+ * Tax rate %, as a decimal point between 0 and 1.
2830
+ * @decimalValue options { gte:0, lte:1, maxScale:6 }
2831
+ */
2832
+ taxRate?: string;
2833
+ /** Calculated tax, based on `taxable_amount` and `tax_rate`. */
2834
+ totalTax?: MultiCurrencyPrice;
2835
+ /**
2836
+ * If breakdown exists, the sum of rates in the breakdown must equal `tax_rate`. Deprecated - use 'tax_breakdown' instead.
2837
+ * @readonly
2838
+ * @deprecated
2839
+ */
2840
+ rateBreakdown?: TaxRateBreakdown[];
2841
+ /**
2842
+ * tax information for a line item.
2843
+ * @maxSize 1000
2844
+ * @readonly
2845
+ */
2846
+ taxBreakdown?: TaxBreakdown[];
2847
+ }
2848
+ interface TaxRateBreakdown {
2849
+ /**
2850
+ * Name of tax against which the calculation was performed.
2851
+ * @maxLength 100
2852
+ */
2853
+ name?: string;
2854
+ /**
2855
+ * Rate at which this tax detail was calculated.
2856
+ * @decimalValue options { gte:0, lte:1, maxScale:6 }
2857
+ */
2858
+ rate?: string;
2859
+ /** Amount of tax for this tax detail. */
2860
+ tax?: MultiCurrencyPrice;
2861
+ }
2862
+ /**
2863
+ * TaxBreakdown represents tax information for a line item.
2864
+ * It holds the tax amount and the tax rate for each tax authority that apply on the line item.
2865
+ */
2866
+ interface TaxBreakdown {
2867
+ /**
2868
+ * The name of the jurisdiction to which this tax detail applies. For example, "New York" or "Quebec".
2869
+ * @maxLength 200
2870
+ */
2871
+ jurisdiction?: string | null;
2872
+ /** The amount of this line item price that was considered nontaxable. (Decimal value) */
2873
+ nonTaxableAmount?: MultiCurrencyPrice;
2874
+ /**
2875
+ * The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.0000 signifies 200% tax. (Decimal value)
2876
+ * @decimalValue options { gte:0, maxScale:6 }
2877
+ */
2878
+ rate?: string | null;
2879
+ /** The amount of tax estimated for this line item. (Decimal value) */
2880
+ taxAmount?: MultiCurrencyPrice;
2881
+ /** The taxable amount of this line item. */
2882
+ taxableAmount?: MultiCurrencyPrice;
2883
+ /**
2884
+ * The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, "Sales Tax", "Income Tax", "Value Added Tax", etc.
2885
+ * @maxLength 200
2886
+ */
2887
+ taxType?: string | null;
2888
+ /**
2889
+ * The name of the tax against which this tax amount was calculated. For example, "NY State Sales Tax", "Quebec GST", etc.
2890
+ * This name should be explicit enough to allow the merchant to understand what tax was calculated.
2891
+ * @maxLength 200
2892
+ */
2893
+ taxName?: string | null;
2894
+ /** The type of the jurisdiction in which this tax detail applies. */
2895
+ jurisdictionType?: JurisdictionTypeWithLiterals;
2896
+ }
2897
+ /** JurisdictionType represents the type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
2898
+ declare enum JurisdictionType {
2899
+ UNDEFINED = "UNDEFINED",
2900
+ COUNTRY = "COUNTRY",
2901
+ STATE = "STATE",
2902
+ COUNTY = "COUNTY",
2903
+ CITY = "CITY",
2904
+ SPECIAL = "SPECIAL"
2905
+ }
2906
+ /** @enumType */
2907
+ type JurisdictionTypeWithLiterals = JurisdictionType | 'UNDEFINED' | 'COUNTRY' | 'STATE' | 'COUNTY' | 'CITY' | 'SPECIAL';
2908
+ interface CalculatedItemModifier {
2909
+ /**
2910
+ * Modifier ID.
2911
+ * @minLength 1
2912
+ * @maxLength 36
2913
+ */
2914
+ _id?: string;
2915
+ /**
2916
+ * ID of the group this modifier belongs to.
2917
+ * @minLength 1
2918
+ * @maxLength 36
2919
+ */
2920
+ groupId?: string;
2921
+ /**
2922
+ * Modifier price.
2923
+ * @readonly
2924
+ */
2925
+ price?: MultiCurrencyPrice;
2926
+ }
2927
+ interface PriceSummary {
2928
+ /** Subtotal of all line items, before discounts and before tax. */
2929
+ subtotal?: MultiCurrencyPrice;
2930
+ /** Total shipping price, before discounts and before tax. */
2931
+ shipping?: MultiCurrencyPrice;
2932
+ /** Total tax. */
2933
+ tax?: MultiCurrencyPrice;
2934
+ /** Total calculated discount value. */
2935
+ discount?: MultiCurrencyPrice;
2936
+ /** Total price after discounts, gift cards, and tax. */
2937
+ total?: MultiCurrencyPrice;
2938
+ /** Total additional fees price before tax. */
2939
+ additionalFees?: MultiCurrencyPrice;
2940
+ }
2941
+ interface GiftCard {
2942
+ /**
2943
+ * Gift Card ID.
2944
+ * @deprecated
2945
+ */
2946
+ _id?: string;
2947
+ /** Gift card obfuscated code. */
2948
+ obfuscatedCode?: string;
2949
+ /** Actual amount to be redeemed from the gift card. */
2950
+ amount?: MultiCurrencyPrice;
2951
+ /**
2952
+ * App ID of the gift card provider.
2953
+ * @format GUID
2954
+ */
2955
+ appId?: string;
2956
+ /**
2957
+ * External ID in the gift card provider's system.
2958
+ * Used for integration and tracking across different platforms.
2959
+ * @minLength 1
2960
+ * @maxLength 50
2961
+ */
2962
+ externalId?: string | null;
2963
+ /** Requested amount to redeem from the gift card. */
2964
+ requestedAmount?: MultiCurrencyPrice;
2965
+ }
2966
+ interface TaxSummary {
2967
+ /**
2968
+ * Amount for which tax is calculated, added from line items.
2969
+ * @readonly
2970
+ */
2971
+ taxableAmount?: MultiCurrencyPrice;
2972
+ /**
2973
+ * Calculated tax, added from line items.
2974
+ * @readonly
2975
+ */
2976
+ totalTax?: MultiCurrencyPrice;
2977
+ /**
2978
+ * Tax calculator that was active when the order was created.
2979
+ * @deprecated
2980
+ */
2981
+ calculationDetails?: TaxCalculationDetails;
2982
+ }
2983
+ interface TaxCalculationDetails extends TaxCalculationDetailsCalculationDetailsOneOf {
2984
+ /** Reason the manual calculation was used. */
2985
+ manualRateReason?: ManualCalculationReasonWithLiterals;
2986
+ /** Details of the fallback rate calculation. */
2987
+ autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetails;
2988
+ /** Rate calculation type. */
2989
+ rateType?: RateTypeWithLiterals;
2990
+ }
2991
+ /** @oneof */
2992
+ interface TaxCalculationDetailsCalculationDetailsOneOf {
2993
+ /** Reason the manual calculation was used. */
2994
+ manualRateReason?: ManualCalculationReasonWithLiterals;
2995
+ /** Details of the fallback rate calculation. */
2996
+ autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetails;
2997
+ }
2998
+ declare enum RateType {
2999
+ /** no tax being collected for this request due to location of purchase */
3000
+ NO_TAX_COLLECTED = "NO_TAX_COLLECTED",
3001
+ /** manual rate used for calculation */
3002
+ MANUAL_RATE = "MANUAL_RATE",
3003
+ /** autotax rate used for calculation */
3004
+ AUTO_RATE = "AUTO_RATE",
3005
+ /** fallback rate used for calculation */
3006
+ FALLBACK_RATE = "FALLBACK_RATE"
3007
+ }
3008
+ /** @enumType */
3009
+ type RateTypeWithLiterals = RateType | 'NO_TAX_COLLECTED' | 'MANUAL_RATE' | 'AUTO_RATE' | 'FALLBACK_RATE';
3010
+ declare enum ManualCalculationReason {
3011
+ /** user set calculator in Business Manager to be Manual */
3012
+ GLOBAL_SETTING_TO_MANUAL = "GLOBAL_SETTING_TO_MANUAL",
3013
+ /** specific region is on manual even though Global setting is Auto-tax */
3014
+ REGION_SETTING_TO_MANUAL = "REGION_SETTING_TO_MANUAL"
3015
+ }
3016
+ /** @enumType */
3017
+ type ManualCalculationReasonWithLiterals = ManualCalculationReason | 'GLOBAL_SETTING_TO_MANUAL' | 'REGION_SETTING_TO_MANUAL';
3018
+ interface AutoTaxFallbackCalculationDetails {
3019
+ /** reason for fallback */
3020
+ fallbackReason?: FallbackReasonWithLiterals;
3021
+ /** invalid request (i.e. address), timeout, internal error, license error, and others will be encoded here */
3022
+ error?: ApplicationError;
3023
+ }
3024
+ declare enum FallbackReason {
3025
+ /** auto-tax failed to be calculated */
3026
+ AUTO_TAX_FAILED = "AUTO_TAX_FAILED",
3027
+ /** auto-tax was temporarily deactivated on a system-level */
3028
+ AUTO_TAX_DEACTIVATED = "AUTO_TAX_DEACTIVATED"
3029
+ }
3030
+ /** @enumType */
3031
+ type FallbackReasonWithLiterals = FallbackReason | 'AUTO_TAX_FAILED' | 'AUTO_TAX_DEACTIVATED';
3032
+ /**
3033
+ * 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.
3034
+ * Tax breakdown is the tax amount split to the tax authorities that applied on the line item.
3035
+ */
3036
+ interface AggregatedTaxBreakdown {
3037
+ /**
3038
+ * The name of the tax against which this tax amount was calculated.
3039
+ * @maxLength 200
3040
+ */
3041
+ taxName?: string;
3042
+ /**
3043
+ * The type of tax that was calculated. Depends on the company's nexus settings as well as the jurisdiction's tax laws.
3044
+ * @maxLength 200
3045
+ */
3046
+ taxType?: string;
3047
+ /**
3048
+ * The name of the jurisdiction in which this tax detail applies.
3049
+ * @maxLength 200
3050
+ */
3051
+ jurisdiction?: string;
3052
+ /** The type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
3053
+ jurisdictionTypeEnum?: JurisdictionTypeWithLiterals;
3054
+ /**
3055
+ * The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.000 signifies 200% tax. (Decimal value)
3056
+ * @decimalValue options { gte:0, maxScale:6 }
3057
+ */
3058
+ rate?: string;
3059
+ /** The sum of all the tax from line items that calculated by the tax identifiers. */
3060
+ aggregatedTaxAmount?: MultiCurrencyPrice;
3061
+ /** The sum of all the taxable amount from line items for tax identifiers. */
3062
+ aggregatedTaxableAmount?: MultiCurrencyPrice;
3063
+ }
3064
+ interface ShippingInformation {
3065
+ /** Shipping region. */
3066
+ region?: ShippingRegion;
3067
+ /** Selected shipping option. */
3068
+ selectedCarrierServiceOption?: SelectedCarrierServiceOption;
3069
+ /** All shipping options. */
3070
+ carrierServiceOptions?: CarrierServiceOption[];
3071
+ }
3072
+ interface ShippingRegion {
3073
+ /**
3074
+ * Shipping region ID.
3075
+ * @format GUID
3076
+ * @readonly
3077
+ */
3078
+ _id?: string;
3079
+ /**
3080
+ * Shipping region name.
3081
+ * @maxLength 100
3082
+ */
3083
+ name?: string;
3084
+ }
3085
+ interface SelectedCarrierServiceOption {
3086
+ /**
3087
+ * Unique identifier of selected option. For example, "usps_std_overnight".
3088
+ * @maxLength 100
3089
+ */
3090
+ code?: string;
3091
+ /**
3092
+ * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale).
3093
+ * For example, "Standard" or "First-Class Package International".
3094
+ * @maxLength 250
3095
+ * @readonly
3096
+ */
3097
+ title?: string;
3098
+ /**
3099
+ * Delivery logistics.
3100
+ * @readonly
3101
+ */
3102
+ logistics?: DeliveryLogistics;
3103
+ /**
3104
+ * Shipping costs.
3105
+ * @readonly
3106
+ */
3107
+ cost?: SelectedCarrierServiceOptionPrices;
3108
+ /**
3109
+ * Were we able to find the requested shipping option, or otherwise we fallback to the default one (the first)
3110
+ * @readonly
3111
+ */
3112
+ requestedShippingOption?: boolean;
3113
+ /**
3114
+ * Other charges
3115
+ * @deprecated Other charges
3116
+ * @replacedBy additional_fees
3117
+ * @targetRemovalDate 2025-10-01
3118
+ */
3119
+ otherCharges?: SelectedCarrierServiceOptionOtherCharge[];
3120
+ /**
3121
+ * This carrier's unique ID
3122
+ * @format GUID
3123
+ */
3124
+ carrierId?: string | null;
3125
+ /**
3126
+ * Delivery solution allocations to different delivery carriers and delivery regions
3127
+ * @maxSize 300
3128
+ */
3129
+ deliveryAllocations?: DeliveryAllocation[];
3130
+ /** If the delivery solution is a partial and doesn't apply to all items. */
3131
+ partial?: boolean | null;
3132
+ }
3133
+ interface DeliveryLogistics {
3134
+ /**
3135
+ * Expected delivery time, in free text. For example, "3-5 business days".
3136
+ * @maxLength 500
3137
+ */
3138
+ deliveryTime?: string | null;
3139
+ /**
3140
+ * Instructions for caller, e.g for pickup: "Please deliver during opening hours, and please don't park in disabled parking spot".
3141
+ * @maxLength 1000
3142
+ */
3143
+ instructions?: string | null;
3144
+ /** Pickup details. */
3145
+ pickupDetails?: PickupDetails;
3146
+ }
3147
+ interface PickupDetails {
3148
+ /** Pickup address. */
3149
+ address?: Address;
3150
+ /**
3151
+ * Whether the pickup address is that of a business - this may effect tax calculation.
3152
+ * @deprecated
3153
+ */
3154
+ businessLocation?: boolean;
3155
+ /** Pickup method */
3156
+ pickupMethod?: PickupMethodWithLiterals;
3157
+ }
3158
+ declare enum PickupMethod {
3159
+ UNKNOWN_METHOD = "UNKNOWN_METHOD",
3160
+ STORE_PICKUP = "STORE_PICKUP",
3161
+ PICKUP_POINT = "PICKUP_POINT"
3162
+ }
3163
+ /** @enumType */
3164
+ type PickupMethodWithLiterals = PickupMethod | 'UNKNOWN_METHOD' | 'STORE_PICKUP' | 'PICKUP_POINT';
3165
+ interface DeliveryTimeSlot {
3166
+ /** starting time of the delivery time slot */
3167
+ from?: Date | null;
3168
+ /** ending time of the delivery time slot */
3169
+ to?: Date | null;
3170
+ }
3171
+ interface SelectedCarrierServiceOptionPrices {
3172
+ /** Total shipping price, after discount and after tax. */
3173
+ totalPriceAfterTax?: MultiCurrencyPrice;
3174
+ /** Total price of shipping after discounts (when relevant), and before tax. */
3175
+ totalPriceBeforeTax?: MultiCurrencyPrice;
3176
+ /** Tax details. */
3177
+ taxDetails?: ItemTaxFullDetails;
3178
+ /** Shipping discount before tax. */
3179
+ totalDiscount?: MultiCurrencyPrice;
3180
+ /** Shipping price before discount and before tax. */
3181
+ price?: MultiCurrencyPrice;
3182
+ }
3183
+ interface SelectedCarrierServiceOptionOtherCharge {
3184
+ /** Type of additional cost. */
3185
+ type?: ChargeTypeWithLiterals;
3186
+ /**
3187
+ * Details of the charge, such as 'Full Coverage Insurance of up to 80% of value of shipment'.
3188
+ * @maxLength 200
3189
+ */
3190
+ details?: string | null;
3191
+ /** Price of added charge. */
3192
+ cost?: SelectedCarrierServiceOptionPrices;
3193
+ }
3194
+ declare enum ChargeType {
3195
+ HANDLING_FEE = "HANDLING_FEE",
3196
+ INSURANCE = "INSURANCE"
3197
+ }
3198
+ /** @enumType */
3199
+ type ChargeTypeWithLiterals = ChargeType | 'HANDLING_FEE' | 'INSURANCE';
3200
+ interface DeliveryAllocation {
3201
+ /** The delivery option's carrier details, could be multiple if the delivery option is a combination of multiple carriers */
3202
+ deliveryCarrier?: Carrier;
3203
+ /** The delivery region that are relevant for this delivery solution. */
3204
+ deliveryRegion?: Region;
3205
+ /** Populated if the delivery solution is a partially supplied by this carrier. */
3206
+ applicableLineItems?: ApplicableLineItems;
3207
+ }
3208
+ interface Carrier {
3209
+ /**
3210
+ * The carrier app id
3211
+ * @format GUID
3212
+ */
3213
+ appId?: string | null;
3214
+ /**
3215
+ * Unique code that acts as an ID for a shipping rate. For example, `"usps_std_overnight"`.
3216
+ * @maxLength 250
3217
+ */
3218
+ code?: string;
3219
+ }
3220
+ interface Region {
3221
+ /**
3222
+ * The delivery region id.
3223
+ * @format GUID
3224
+ */
3225
+ _id?: string | null;
3226
+ /**
3227
+ * The delivery region name.
3228
+ * @maxLength 100
3229
+ */
3230
+ name?: string | null;
3231
+ }
3232
+ interface ApplicableLineItems {
3233
+ /**
3234
+ * Line items that the delivery solution is for.
3235
+ * @maxSize 300
3236
+ * @minLength 1
3237
+ * @maxLength 100
3238
+ */
3239
+ lineItemIds?: string[];
3240
+ }
3241
+ interface CarrierServiceOption {
3242
+ /**
3243
+ * Carrier ID.
3244
+ * @format GUID
3245
+ */
3246
+ carrierId?: string;
3247
+ /** Shipping options offered by this carrier for this request. */
3248
+ shippingOptions?: ShippingOption[];
3249
+ }
3250
+ interface ShippingOption {
3251
+ /**
3252
+ * Unique code of provided shipping option like "usps_std_overnight".
3253
+ * For legacy calculators this would be the UUID of the option.
3254
+ * @maxLength 100
3255
+ */
3256
+ code?: string;
3257
+ /**
3258
+ * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale).
3259
+ * For example, "Standard" or "First-Class Package International".
3260
+ * @maxLength 250
3261
+ */
3262
+ title?: string;
3263
+ /** Delivery logistics. */
3264
+ logistics?: DeliveryLogistics;
3265
+ /** Sipping price information. */
3266
+ cost?: ShippingPrice;
3267
+ /**
3268
+ * Delivery solution allocations to different delivery carriers and delivery regions
3269
+ * @maxSize 300
3270
+ */
3271
+ deliveryAllocations?: DeliveryAllocation[];
3272
+ /** If the delivery solution is a partial and doesn't apply to all items. */
3273
+ partial?: boolean | null;
3274
+ }
3275
+ interface ShippingPrice {
3276
+ /** Shipping price. */
3277
+ price?: MultiCurrencyPrice;
3278
+ /** Other costs such as insurance, handling & packaging for fragile items, etc. */
3279
+ otherCharges?: OtherCharge[];
3280
+ }
3281
+ interface OtherCharge {
3282
+ /** Type of additional cost. */
3283
+ type?: ChargeTypeWithLiterals;
3284
+ /** Price of added cost. */
3285
+ price?: MultiCurrencyPrice;
3286
+ /**
3287
+ * Description of the additional charge. For example, `"Handling fee of $5 applied for gift wrapping"`.
3288
+ * @maxLength 250
3289
+ */
3290
+ details?: string | null;
3291
+ }
3292
+ interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
3293
+ /** Coupon details. */
3294
+ coupon?: Coupon;
3295
+ /** Merchant discount. */
3296
+ merchantDiscount?: MerchantDiscount;
3297
+ /** Discount rule */
3298
+ discountRule?: DiscountRule;
3299
+ /** Discount type. */
3300
+ discountType?: DiscountTypeWithLiterals;
3301
+ /**
3302
+ * IDs of line items the discount applies to.
3303
+ * @format GUID
3304
+ * @deprecated IDs of line items the discount applies to.
3305
+ * @replacedBy line_items_discounts
3306
+ * @targetRemovalDate 2025-12-31
3307
+ */
3308
+ lineItemIds?: string[];
3309
+ }
3310
+ /** @oneof */
3311
+ interface AppliedDiscountDiscountSourceOneOf {
3312
+ /** Coupon details. */
3313
+ coupon?: Coupon;
3314
+ /** Merchant discount. */
3315
+ merchantDiscount?: MerchantDiscount;
3316
+ /** Discount rule */
3317
+ discountRule?: DiscountRule;
3318
+ }
3319
+ declare enum DiscountType {
3320
+ GLOBAL = "GLOBAL",
3321
+ SPECIFIC_ITEMS = "SPECIFIC_ITEMS",
3322
+ SHIPPING = "SHIPPING"
3323
+ }
3324
+ /** @enumType */
3325
+ type DiscountTypeWithLiterals = DiscountType | 'GLOBAL' | 'SPECIFIC_ITEMS' | 'SHIPPING';
3326
+ /** Coupon */
3327
+ interface Coupon {
3328
+ /** Coupon ID. */
3329
+ _id?: string;
3330
+ /** Coupon code. */
3331
+ code?: string;
3332
+ /** Coupon value. */
3333
+ amount?: MultiCurrencyPrice;
3334
+ /** Coupon name. */
3335
+ name?: string;
3336
+ }
3337
+ interface MerchantDiscount {
3338
+ /** Discount value. */
3339
+ amount?: MultiCurrencyPrice;
3340
+ /**
3341
+ * Discount Percentage. Will be calculated from items price before other discounts.
3342
+ * @min 1
3343
+ * @max 100
3344
+ */
3345
+ percentage?: number | null;
3346
+ }
3347
+ interface DiscountRule {
3348
+ /**
3349
+ * Discount rule ID
3350
+ * @format GUID
3351
+ */
3352
+ _id?: string;
3353
+ /** Discount rule name */
3354
+ name?: DiscountRuleName;
3355
+ /** Discount value. */
3356
+ amount?: MultiCurrencyPrice;
3357
+ }
3358
+ interface DiscountRuleName {
3359
+ /**
3360
+ * Original discount rule name (in site's default language).
3361
+ * @minLength 1
3362
+ * @maxLength 256
3363
+ */
3364
+ original?: string;
3365
+ /**
3366
+ * Translated discount rule name according to buyer language. Defaults to `original` when not provided.
3367
+ * @minLength 1
3368
+ * @maxLength 500
3369
+ */
3370
+ translated?: string | null;
3371
+ }
3372
+ interface LineItemDiscount {
3373
+ /**
3374
+ * ID of line item the discount applies to.
3375
+ * @format GUID
3376
+ */
3377
+ _id?: string;
3378
+ /** Discount value. */
3379
+ totalDiscountAmount?: MultiCurrencyPrice;
3380
+ }
3381
+ interface CalculationErrors extends CalculationErrorsShippingCalculationErrorOneOf {
3382
+ /** General shipping calculation error. */
3383
+ generalShippingCalculationError?: Details;
3384
+ /** Carrier errors. */
3385
+ carrierErrors?: CarrierErrors;
3386
+ /** Tax calculation error. */
3387
+ taxCalculationError?: Details;
3388
+ /** Coupon calculation error. */
3389
+ couponCalculationError?: Details;
3390
+ /** Gift card calculation error. */
3391
+ giftCardCalculationError?: Details;
3392
+ /** Order validation errors. */
3393
+ orderValidationErrors?: ApplicationError[];
3394
+ /**
3395
+ * Membership payment methods calculation errors
3396
+ * For example, will indicate that a line item that must be paid with membership payment doesn't have one or selected memberships are invalid
3397
+ */
3398
+ membershipError?: Details;
3399
+ /** Discount Rule calculation error. */
3400
+ discountsCalculationError?: Details;
3401
+ }
3402
+ /** @oneof */
3403
+ interface CalculationErrorsShippingCalculationErrorOneOf {
3404
+ /** General shipping calculation error. */
3405
+ generalShippingCalculationError?: Details;
3406
+ /** Carrier errors. */
3407
+ carrierErrors?: CarrierErrors;
3408
+ }
3409
+ interface CarrierErrors {
3410
+ /** Carrier errors. */
3411
+ errors?: CarrierError[];
3412
+ }
3413
+ interface CarrierError {
3414
+ /** Carrier ID. */
3415
+ carrierId?: string;
3416
+ /** Error details. */
3417
+ error?: Details;
3418
+ }
3419
+ interface MembershipOptions {
3420
+ /**
3421
+ * List of payment options that can be used.
3422
+ * @maxSize 300
3423
+ */
3424
+ eligibleMemberships?: Membership[];
3425
+ /**
3426
+ * List of payment options that are owned by the member, but cannot be used due to reason provided.
3427
+ * @maxSize 300
3428
+ */
3429
+ invalidMemberships?: InvalidMembership[];
3430
+ /**
3431
+ * The selected membership payment options and which line items they apply to.
3432
+ * @maxSize 300
3433
+ */
3434
+ selectedMemberships?: SelectedMembership[];
3435
+ }
3436
+ interface Membership {
3437
+ /**
3438
+ * Membership ID.
3439
+ * @minLength 1
3440
+ * @maxLength 100
3441
+ */
3442
+ _id?: string;
3443
+ /**
3444
+ * ID of the application providing this payment option.
3445
+ * @format GUID
3446
+ */
3447
+ appId?: string;
3448
+ /** The name of this membership. */
3449
+ name?: MembershipName;
3450
+ /**
3451
+ * Line item IDs which are "paid" for by this membership.
3452
+ * @minSize 1
3453
+ * @maxSize 300
3454
+ * @minLength 1
3455
+ * @maxLength 100
3456
+ */
3457
+ lineItemIds?: string[];
3458
+ /** Optional - For a membership that has limited credits, information about credit usage. */
3459
+ credits?: MembershipPaymentCredits;
3460
+ /** Optional - TMembership expiry date. */
3461
+ expirationDate?: Date | null;
3462
+ /** Additional data about this membership. */
3463
+ additionalData?: Record<string, any> | null;
3464
+ }
3465
+ interface MembershipName {
3466
+ /**
3467
+ * Membership name.
3468
+ * @maxLength 100
3469
+ */
3470
+ original?: string;
3471
+ /**
3472
+ * Translated membership name. Defaults to `original` when not provided.
3473
+ * @maxLength 100
3474
+ */
3475
+ translated?: string | null;
3476
+ }
3477
+ interface MembershipPaymentCredits {
3478
+ /**
3479
+ * Membership's total amount of credits.
3480
+ * @min 1
3481
+ */
3482
+ total?: number;
3483
+ /** Membership's remaining amount of credits. */
3484
+ remaining?: number;
3485
+ }
3486
+ interface InvalidMembership {
3487
+ /** Membership details. */
3488
+ membership?: Membership;
3489
+ /**
3490
+ * Reason why this membership is invalid and cannot be used.
3491
+ * @minLength 1
3492
+ * @maxLength 100
3493
+ */
3494
+ reason?: string;
3495
+ }
3496
+ interface SelectedMembership {
3497
+ /**
3498
+ * Membership ID.
3499
+ * @minLength 1
3500
+ * @maxLength 100
3501
+ */
3502
+ _id?: string;
3503
+ /**
3504
+ * ID of the app providing this payment option.
3505
+ * @format GUID
3506
+ */
3507
+ appId?: string;
3508
+ /**
3509
+ * IDs of the line items this membership applies to.
3510
+ * @minSize 1
3511
+ * @maxSize 300
3512
+ * @minLength 1
3513
+ * @maxLength 100
3514
+ */
3515
+ lineItemIds?: string[];
3516
+ }
3517
+ interface AdditionalFee {
3518
+ /**
3519
+ * Additional fee's unique code (or ID) for future processing.
3520
+ * @minLength 1
3521
+ * @maxLength 100
3522
+ */
3523
+ code?: string | null;
3524
+ /**
3525
+ * Translated additional fee's name.
3526
+ * @minLength 1
3527
+ * @maxLength 50
3528
+ */
3529
+ name?: string;
3530
+ /** Additional fee's price. */
3531
+ price?: MultiCurrencyPrice;
3532
+ /** Tax details. */
3533
+ taxDetails?: ItemTaxFullDetails;
3534
+ /**
3535
+ * Provider's app id.
3536
+ * @minLength 1
3537
+ * @maxLength 100
3538
+ */
3539
+ providerAppId?: string | null;
3540
+ /** Additional fee's price before tax. */
3541
+ priceBeforeTax?: MultiCurrencyPrice;
3542
+ /** Additional fee's price after tax. */
3543
+ priceAfterTax?: MultiCurrencyPrice;
3544
+ /**
3545
+ * Optional - Line items associated with this additional fee.
3546
+ * If no `lineItemIds` are provided, the fee will be associated with the whole cart/checkout/order.
3547
+ * @format GUID
3548
+ */
3549
+ lineItemIds?: string[];
3550
+ /** the source the additional fee was added from */
3551
+ source?: AdditionalFeeSourceWithLiterals;
3552
+ /**
3553
+ * 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).
3554
+ * @minLength 1
3555
+ * @maxLength 50
3556
+ */
3557
+ translatedName?: string | null;
3558
+ }
3559
+ declare enum AdditionalFeeSource {
3560
+ UNKNOWN_ADDITIONAL_FEE_SOURCE = "UNKNOWN_ADDITIONAL_FEE_SOURCE",
3561
+ /** The additional fee was added by an additional fee service plugin */
3562
+ SERVICE_PLUGIN = "SERVICE_PLUGIN",
3563
+ /** The additional fee was added on the item either via the catalog or on custom line item */
3564
+ ITEM = "ITEM",
3565
+ /** The additional fee was added manually on the request */
3566
+ MANUAL = "MANUAL",
3567
+ /** The additional fee was added by the shipping provider */
3568
+ SHIPPING = "SHIPPING"
3569
+ }
3570
+ /** @enumType */
3571
+ type AdditionalFeeSourceWithLiterals = AdditionalFeeSource | 'UNKNOWN_ADDITIONAL_FEE_SOURCE' | 'SERVICE_PLUGIN' | 'ITEM' | 'MANUAL' | 'SHIPPING';
2656
3572
  interface GetCheckoutURLRequest {
2657
3573
  /**
2658
3574
  * ID of the Cart to calculate.
@@ -2989,4 +3905,4 @@ interface UpdateLineItemsInCurrentCartOptions {
2989
3905
  lineItems?: LineItemUpdate[];
2990
3906
  }
2991
3907
 
2992
- export { type ActionEvent, type AddCouponRequest, type AddCouponResponse, type AddCouponToCurrentCartRequest, type AddCouponToCurrentCartResponse, type AddGiftCardRequest, type AddGiftCardResponse, type AddGiftCardToCurrentCartRequest, type AddGiftCardToCurrentCartResponse, type AddLineItemsRequest, type AddLineItemsResponse, type AddLineItemsToCurrentCartOptions, type AddLineItemsToCurrentCartRequest, type AddLineItemsToCurrentCartResponse, type AdditionalFee, type AdditionalFeeTax, type Address, type AddressLocation, type ApplicationError, type BusinessInfo, type CalculateCartRequest, type CalculateCartResponse, type CalculateCurrentCartOptions, 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 CreateCartRequest, type CreateCartResponse, type CreateCurrentCartOptions, 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 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 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 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 UpdateCartRequest, type UpdateCartResponse, type UpdateCurrentCartRequest, type UpdateCurrentCartResponse, type UpdateLineItemsInCurrentCartOptions, type UpdateLineItemsInCurrentCartRequest, type UpdateLineItemsInCurrentCartResponse, 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 };
3908
+ export { type ActionEvent, type AddCouponRequest, type AddCouponResponse, type AddCouponToCurrentCartRequest, type AddCouponToCurrentCartResponse, type AddGiftCardRequest, type AddGiftCardResponse, type AddGiftCardToCurrentCartRequest, type AddGiftCardToCurrentCartResponse, type AddLineItemsRequest, type AddLineItemsResponse, type AddLineItemsToCurrentCartOptions, 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 CalculateCartRequest, type CalculateCartResponse, type CalculateCartWithFullResponseResponse, type CalculateCurrentCartOptions, 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 CreateCartRequest, type CreateCartResponse, type CreateCurrentCartOptions, 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 GetCartRequest, type GetCartResponse, type GetCheckoutURLRequest, type GetCheckoutURLResponse, 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 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 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 UpdateCartRequest, type UpdateCartResponse, type UpdateCurrentCartRequest, type UpdateCurrentCartResponse, type UpdateLineItemsInCurrentCartOptions, type UpdateLineItemsInCurrentCartRequest, type UpdateLineItemsInCurrentCartResponse, 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 };