@wix/auto_sdk_ecom_current-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;
@@ -4999,6 +5019,11 @@ interface EstimateCurrentCartOptions {
4999
5019
  * by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
5000
5020
  */
5001
5021
  validationConfig?: ValidationsConfigWithLiterals;
5022
+ /**
5023
+ * Whether to calculate order-level discounts.
5024
+ * TODO: Currently i's ignored and always treated as true.
5025
+ */
5026
+ calculateOrderDiscounts?: boolean;
5002
5027
  /**
5003
5028
  * Whether to calculate delivery costs.
5004
5029
  * Default: false
@@ -1627,6 +1627,7 @@ async function estimateCurrentCart2(options) {
1627
1627
  const payload = renameKeysFromSDKRequestToRESTRequest({
1628
1628
  refreshCart: options?.refreshCart,
1629
1629
  validationConfig: options?.validationConfig,
1630
+ calculateOrderDiscounts: options?.calculateOrderDiscounts,
1630
1631
  calculateDelivery: options?.calculateDelivery,
1631
1632
  calculateAdditionalFees: options?.calculateAdditionalFees,
1632
1633
  calculateTax: options?.calculateTax,
@@ -1667,6 +1668,7 @@ async function estimateCurrentCart2(options) {
1667
1668
  explicitPathsToArguments: {
1668
1669
  refreshCart: "$[0].refreshCart",
1669
1670
  validationConfig: "$[0].validationConfig",
1671
+ calculateOrderDiscounts: "$[0].calculateOrderDiscounts",
1670
1672
  calculateDelivery: "$[0].calculateDelivery",
1671
1673
  calculateAdditionalFees: "$[0].calculateAdditionalFees",
1672
1674
  calculateTax: "$[0].calculateTax",