@wix/auto_sdk_ecom_current-cart-v-2 1.0.67 → 1.0.68

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.
@@ -2535,55 +2535,6 @@ interface CalculateCurrentCartRequest {
2535
2535
  * Default: `false`
2536
2536
  */
2537
2537
  refreshCart?: boolean;
2538
- /**
2539
- * Specifies the level of **business validation** to perform during cart calculation,
2540
- * by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
2541
- */
2542
- validationsConfig?: ValidationsConfigWithLiterals;
2543
- /**
2544
- * Optional custom configuration for the calculation.
2545
- * If not provided, all price components are calculated by default.
2546
- */
2547
- customCalculationConfig?: CalculationConfig;
2548
- }
2549
- declare enum ValidationsConfig {
2550
- UNKNOWN_VALIDATIONS_CONFIG = "UNKNOWN_VALIDATIONS_CONFIG",
2551
- /** No business validations are performed. */
2552
- SKIP_VALIDATIONS = "SKIP_VALIDATIONS",
2553
- /** Perform cart-level business validations as defined by the service plugin implementer. */
2554
- PRE_CHECKOUT_VALIDATIONS = "PRE_CHECKOUT_VALIDATIONS",
2555
- /** Perform checkout-specific business validations as defined by the service plugin implementer. */
2556
- CHECKOUT_VALIDATIONS = "CHECKOUT_VALIDATIONS"
2557
- }
2558
- /** @enumType */
2559
- type ValidationsConfigWithLiterals = ValidationsConfig | 'UNKNOWN_VALIDATIONS_CONFIG' | 'SKIP_VALIDATIONS' | 'PRE_CHECKOUT_VALIDATIONS' | 'CHECKOUT_VALIDATIONS';
2560
- interface CalculationConfig {
2561
- /**
2562
- * Whether to calculate delivery costs.
2563
- * Default: false
2564
- */
2565
- calculateDelivery?: boolean;
2566
- /**
2567
- * Whether to calculate any additional fees.
2568
- * Default: false
2569
- */
2570
- calculateAdditionalFees?: boolean;
2571
- /**
2572
- * Whether to include tax calculation.
2573
- * Default: false
2574
- */
2575
- calculateTax?: boolean;
2576
- /**
2577
- * Whether to calculate the effect of gift card balances on the cart total.
2578
- * Gift cards are not redeemed - only reflected for estimation purposes.
2579
- * Default: false
2580
- */
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;
2587
2538
  }
2588
2539
  interface CalculateCurrentCartResponse {
2589
2540
  /** The Cart that was calculated. */
@@ -2630,6 +2581,17 @@ interface EstimateCurrentCartRequest {
2630
2581
  */
2631
2582
  calculateGiftCards?: boolean;
2632
2583
  }
2584
+ declare enum ValidationsConfig {
2585
+ UNKNOWN_VALIDATIONS_CONFIG = "UNKNOWN_VALIDATIONS_CONFIG",
2586
+ /** No business validations are performed. */
2587
+ SKIP_VALIDATIONS = "SKIP_VALIDATIONS",
2588
+ /** Perform cart-level business validations as defined by the service plugin implementer. */
2589
+ PRE_CHECKOUT_VALIDATIONS = "PRE_CHECKOUT_VALIDATIONS",
2590
+ /** Perform checkout-specific business validations as defined by the service plugin implementer. */
2591
+ CHECKOUT_VALIDATIONS = "CHECKOUT_VALIDATIONS"
2592
+ }
2593
+ /** @enumType */
2594
+ type ValidationsConfigWithLiterals = ValidationsConfig | 'UNKNOWN_VALIDATIONS_CONFIG' | 'SKIP_VALIDATIONS' | 'PRE_CHECKOUT_VALIDATIONS' | 'CHECKOUT_VALIDATIONS';
2633
2595
  interface EstimateCurrentCartResponse {
2634
2596
  /** The Cart that was calculated. */
2635
2597
  cart?: Cart;
@@ -3104,16 +3066,6 @@ interface CalculateCartRequest {
3104
3066
  * Default: `false`
3105
3067
  */
3106
3068
  refreshCart?: boolean;
3107
- /**
3108
- * Specifies the level of **business validation** to perform during cart calculation,
3109
- * by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
3110
- */
3111
- validationsConfig?: ValidationsConfigWithLiterals;
3112
- /**
3113
- * Optional custom configuration for the calculation.
3114
- * If not provided, all price components are calculated by default.
3115
- */
3116
- customCalculationConfig?: CalculationConfig;
3117
3069
  }
3118
3070
  interface CalculateCartResponse {
3119
3071
  /** The Cart that was calculated. */
@@ -3145,6 +3097,34 @@ interface CalculateCartForV1Request {
3145
3097
  /** Calculations overrides for backward compatibility with V1. */
3146
3098
  calculationOverrides?: CalculationOverrides;
3147
3099
  }
3100
+ interface CalculationConfig {
3101
+ /**
3102
+ * Whether to calculate delivery costs.
3103
+ * Default: false
3104
+ */
3105
+ calculateDelivery?: boolean;
3106
+ /**
3107
+ * Whether to calculate any additional fees.
3108
+ * Default: false
3109
+ */
3110
+ calculateAdditionalFees?: boolean;
3111
+ /**
3112
+ * Whether to include tax calculation.
3113
+ * Default: false
3114
+ */
3115
+ calculateTax?: boolean;
3116
+ /**
3117
+ * Whether to calculate the effect of gift card balances on the cart total.
3118
+ * Gift cards are not redeemed - only reflected for estimation purposes.
3119
+ * Default: false
3120
+ */
3121
+ calculateGiftCards?: boolean;
3122
+ /**
3123
+ * Whether to calculate order-level discounts.
3124
+ * TODO: Currently i's ignored and always treated as true.
3125
+ */
3126
+ calculateOrderDiscounts?: boolean;
3127
+ }
3148
3128
  interface Stage extends StageStagesOneOf {
3149
3129
  /** Supported values: */
3150
3130
  checkoutStage?: CheckoutStageWithLiterals;
@@ -4973,16 +4953,6 @@ interface CalculateCurrentCartOptions {
4973
4953
  * Default: `false`
4974
4954
  */
4975
4955
  refreshCart?: boolean;
4976
- /**
4977
- * Specifies the level of **business validation** to perform during cart calculation,
4978
- * by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
4979
- */
4980
- validationsConfig?: ValidationsConfigWithLiterals;
4981
- /**
4982
- * Optional custom configuration for the calculation.
4983
- * If not provided, all price components are calculated by default.
4984
- */
4985
- customCalculationConfig?: CalculationConfig;
4986
4956
  }
4987
4957
  /**
4988
4958
  * Estimates the cart totals based on its current state and the selected
@@ -1644,9 +1644,7 @@ async function refreshCurrentCart2() {
1644
1644
  async function calculateCurrentCart2(options) {
1645
1645
  const { httpClient, sideEffects } = arguments[1];
1646
1646
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1647
- refreshCart: options?.refreshCart,
1648
- validationsConfig: options?.validationsConfig,
1649
- customCalculationConfig: options?.customCalculationConfig
1647
+ refreshCart: options?.refreshCart
1650
1648
  });
1651
1649
  const reqOpts = calculateCurrentCart(payload);
1652
1650
  sideEffects?.onSiteCall?.();
@@ -1680,11 +1678,7 @@ async function calculateCurrentCart2(options) {
1680
1678
  err,
1681
1679
  {
1682
1680
  spreadPathsToArguments: {},
1683
- explicitPathsToArguments: {
1684
- refreshCart: "$[0].refreshCart",
1685
- validationsConfig: "$[0].validationsConfig",
1686
- customCalculationConfig: "$[0].customCalculationConfig"
1687
- },
1681
+ explicitPathsToArguments: { refreshCart: "$[0].refreshCart" },
1688
1682
  singleArgumentUnchanged: false
1689
1683
  },
1690
1684
  ["options"]