@wix/auto_sdk_ecom_cart-v-2 1.0.65 → 1.0.67

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.
@@ -2037,9 +2037,15 @@ interface LineItemAdded {
2037
2037
  * @minLength 1
2038
2038
  * @maxLength 36
2039
2039
  */
2040
- appId?: string | null;
2040
+ catalogAppId?: string | null;
2041
2041
  /** Whether the line item is a custom line item. */
2042
2042
  customLineItem?: boolean;
2043
+ /**
2044
+ * ID of the app that added the line item to the cart (from the identity context).
2045
+ * @minLength 1
2046
+ * @maxLength 36
2047
+ */
2048
+ appDefId?: string | null;
2043
2049
  }
2044
2050
  interface CouponAdded {
2045
2051
  /**
@@ -2573,6 +2579,11 @@ interface CalculationConfig {
2573
2579
  * Default: false
2574
2580
  */
2575
2581
  calculateGiftCards?: boolean;
2582
+ /**
2583
+ * Whether to calculate order-level discounts.
2584
+ * TODO: Currently i's ignored and always treated as true.
2585
+ */
2586
+ calculateOrderDiscounts?: boolean;
2576
2587
  }
2577
2588
  interface CalculateCurrentCartResponse {
2578
2589
  /** The Cart that was calculated. */
@@ -2592,6 +2603,11 @@ interface EstimateCurrentCartRequest {
2592
2603
  * by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
2593
2604
  */
2594
2605
  validationConfig?: ValidationsConfigWithLiterals;
2606
+ /**
2607
+ * Whether to calculate order-level discounts.
2608
+ * TODO: Currently i's ignored and always treated as true.
2609
+ */
2610
+ calculateOrderDiscounts?: boolean;
2595
2611
  /**
2596
2612
  * Whether to calculate delivery costs.
2597
2613
  * Default: false
@@ -3035,7 +3051,6 @@ interface EstimateCartRequest {
3035
3051
  cartId: string;
3036
3052
  /**
3037
3053
  * Whether to retrieve the latest item prices, discounts, and inventory data from the catalogs before estimating the cart.
3038
- *
3039
3054
  * Default: `false`
3040
3055
  */
3041
3056
  refreshCart?: boolean;
@@ -3044,6 +3059,11 @@ interface EstimateCartRequest {
3044
3059
  * by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
3045
3060
  */
3046
3061
  validationConfig?: ValidationsConfigWithLiterals;
3062
+ /**
3063
+ * Whether to calculate order-level discounts.
3064
+ * TODO: Currently i's ignored and always treated as true.
3065
+ */
3066
+ calculateOrderDiscounts?: boolean;
3047
3067
  /**
3048
3068
  * Whether to calculate delivery costs.
3049
3069
  * Default: false
@@ -3900,6 +3920,15 @@ interface DiscountRuleName {
3900
3920
  */
3901
3921
  translated?: string | null;
3902
3922
  }
3923
+ interface LineItemDiscount {
3924
+ /**
3925
+ * ID of line item the discount applies to.
3926
+ * @format GUID
3927
+ */
3928
+ _id?: string;
3929
+ /** Discount value. */
3930
+ totalDiscountAmount?: MultiCurrencyPrice;
3931
+ }
3903
3932
  interface ItemCombination {
3904
3933
  /**
3905
3934
  * The number of times this exact combination of items (with the specified quantities) was applied together in the order.
@@ -3929,15 +3958,6 @@ interface ItemCombinationLineItem {
3929
3958
  */
3930
3959
  quantity?: number;
3931
3960
  }
3932
- interface LineItemDiscount {
3933
- /**
3934
- * ID of line item the discount applies to.
3935
- * @format GUID
3936
- */
3937
- _id?: string;
3938
- /** Discount value. */
3939
- totalDiscountAmount?: MultiCurrencyPrice;
3940
- }
3941
3961
  interface CalculationErrors extends CalculationErrorsShippingCalculationErrorOneOf {
3942
3962
  /** General shipping calculation error. */
3943
3963
  generalShippingCalculationError?: Details;
@@ -5173,7 +5193,6 @@ declare function estimateCart(cartId: string, options?: EstimateCartOptions): Pr
5173
5193
  interface EstimateCartOptions {
5174
5194
  /**
5175
5195
  * Whether to retrieve the latest item prices, discounts, and inventory data from the catalogs before estimating the cart.
5176
- *
5177
5196
  * Default: `false`
5178
5197
  */
5179
5198
  refreshCart?: boolean;
@@ -5182,6 +5201,11 @@ interface EstimateCartOptions {
5182
5201
  * by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
5183
5202
  */
5184
5203
  validationConfig?: ValidationsConfigWithLiterals;
5204
+ /**
5205
+ * Whether to calculate order-level discounts.
5206
+ * TODO: Currently i's ignored and always treated as true.
5207
+ */
5208
+ calculateOrderDiscounts?: boolean;
5185
5209
  /**
5186
5210
  * Whether to calculate delivery costs.
5187
5211
  * Default: false
@@ -1700,6 +1700,7 @@ async function estimateCart2(cartId, options) {
1700
1700
  cartId,
1701
1701
  refreshCart: options?.refreshCart,
1702
1702
  validationConfig: options?.validationConfig,
1703
+ calculateOrderDiscounts: options?.calculateOrderDiscounts,
1703
1704
  calculateDelivery: options?.calculateDelivery,
1704
1705
  calculateAdditionalFees: options?.calculateAdditionalFees,
1705
1706
  calculateTax: options?.calculateTax,
@@ -1741,6 +1742,7 @@ async function estimateCart2(cartId, options) {
1741
1742
  cartId: "$[0]",
1742
1743
  refreshCart: "$[1].refreshCart",
1743
1744
  validationConfig: "$[1].validationConfig",
1745
+ calculateOrderDiscounts: "$[1].calculateOrderDiscounts",
1744
1746
  calculateDelivery: "$[1].calculateDelivery",
1745
1747
  calculateAdditionalFees: "$[1].calculateAdditionalFees",
1746
1748
  calculateTax: "$[1].calculateTax",