@wix/auto_sdk_ecom_cart-v-2 1.0.66 → 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.
- package/build/cjs/index.js +4 -6
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +61 -67
- package/build/cjs/index.typings.js +4 -6
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +56 -56
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.mjs +4 -6
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +61 -67
- package/build/es/index.typings.mjs +4 -6
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +56 -56
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.js +4 -6
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +61 -67
- package/build/internal/cjs/index.typings.js +4 -6
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +56 -56
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.mjs +4 -6
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +61 -67
- package/build/internal/es/index.typings.mjs +4 -6
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +56 -56
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/meta.d.ts
CHANGED
|
@@ -2083,9 +2083,15 @@ interface LineItemAdded {
|
|
|
2083
2083
|
* @minLength 1
|
|
2084
2084
|
* @maxLength 36
|
|
2085
2085
|
*/
|
|
2086
|
-
|
|
2086
|
+
catalogAppId?: string | null;
|
|
2087
2087
|
/** Whether the line item is a custom line item. */
|
|
2088
2088
|
customLineItem?: boolean;
|
|
2089
|
+
/**
|
|
2090
|
+
* ID of the app that added the line item to the cart (from the identity context).
|
|
2091
|
+
* @minLength 1
|
|
2092
|
+
* @maxLength 36
|
|
2093
|
+
*/
|
|
2094
|
+
appDefId?: string | null;
|
|
2089
2095
|
}
|
|
2090
2096
|
interface CouponAdded {
|
|
2091
2097
|
/**
|
|
@@ -2575,50 +2581,6 @@ interface CalculateCurrentCartRequest {
|
|
|
2575
2581
|
* Default: `false`
|
|
2576
2582
|
*/
|
|
2577
2583
|
refreshCart?: boolean;
|
|
2578
|
-
/**
|
|
2579
|
-
* Specifies the level of **business validation** to perform during cart calculation,
|
|
2580
|
-
* by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
|
|
2581
|
-
*/
|
|
2582
|
-
validationsConfig?: ValidationsConfigWithLiterals;
|
|
2583
|
-
/**
|
|
2584
|
-
* Optional custom configuration for the calculation.
|
|
2585
|
-
* If not provided, all price components are calculated by default.
|
|
2586
|
-
*/
|
|
2587
|
-
customCalculationConfig?: CalculationConfig;
|
|
2588
|
-
}
|
|
2589
|
-
declare enum ValidationsConfig {
|
|
2590
|
-
UNKNOWN_VALIDATIONS_CONFIG = "UNKNOWN_VALIDATIONS_CONFIG",
|
|
2591
|
-
/** No business validations are performed. */
|
|
2592
|
-
SKIP_VALIDATIONS = "SKIP_VALIDATIONS",
|
|
2593
|
-
/** Perform cart-level business validations as defined by the service plugin implementer. */
|
|
2594
|
-
PRE_CHECKOUT_VALIDATIONS = "PRE_CHECKOUT_VALIDATIONS",
|
|
2595
|
-
/** Perform checkout-specific business validations as defined by the service plugin implementer. */
|
|
2596
|
-
CHECKOUT_VALIDATIONS = "CHECKOUT_VALIDATIONS"
|
|
2597
|
-
}
|
|
2598
|
-
/** @enumType */
|
|
2599
|
-
type ValidationsConfigWithLiterals = ValidationsConfig | 'UNKNOWN_VALIDATIONS_CONFIG' | 'SKIP_VALIDATIONS' | 'PRE_CHECKOUT_VALIDATIONS' | 'CHECKOUT_VALIDATIONS';
|
|
2600
|
-
interface CalculationConfig {
|
|
2601
|
-
/**
|
|
2602
|
-
* Whether to calculate delivery costs.
|
|
2603
|
-
* Default: false
|
|
2604
|
-
*/
|
|
2605
|
-
calculateDelivery?: boolean;
|
|
2606
|
-
/**
|
|
2607
|
-
* Whether to calculate any additional fees.
|
|
2608
|
-
* Default: false
|
|
2609
|
-
*/
|
|
2610
|
-
calculateAdditionalFees?: boolean;
|
|
2611
|
-
/**
|
|
2612
|
-
* Whether to include tax calculation.
|
|
2613
|
-
* Default: false
|
|
2614
|
-
*/
|
|
2615
|
-
calculateTax?: boolean;
|
|
2616
|
-
/**
|
|
2617
|
-
* Whether to calculate the effect of gift card balances on the cart total.
|
|
2618
|
-
* Gift cards are not redeemed - only reflected for estimation purposes.
|
|
2619
|
-
* Default: false
|
|
2620
|
-
*/
|
|
2621
|
-
calculateGiftCards?: boolean;
|
|
2622
2584
|
}
|
|
2623
2585
|
interface CalculateCurrentCartResponse {
|
|
2624
2586
|
/** The Cart that was calculated. */
|
|
@@ -2638,6 +2600,11 @@ interface EstimateCurrentCartRequest {
|
|
|
2638
2600
|
* by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
|
|
2639
2601
|
*/
|
|
2640
2602
|
validationConfig?: ValidationsConfigWithLiterals;
|
|
2603
|
+
/**
|
|
2604
|
+
* Whether to calculate order-level discounts.
|
|
2605
|
+
* TODO: Currently i's ignored and always treated as true.
|
|
2606
|
+
*/
|
|
2607
|
+
calculateOrderDiscounts?: boolean;
|
|
2641
2608
|
/**
|
|
2642
2609
|
* Whether to calculate delivery costs.
|
|
2643
2610
|
* Default: false
|
|
@@ -2660,6 +2627,17 @@ interface EstimateCurrentCartRequest {
|
|
|
2660
2627
|
*/
|
|
2661
2628
|
calculateGiftCards?: boolean;
|
|
2662
2629
|
}
|
|
2630
|
+
declare enum ValidationsConfig {
|
|
2631
|
+
UNKNOWN_VALIDATIONS_CONFIG = "UNKNOWN_VALIDATIONS_CONFIG",
|
|
2632
|
+
/** No business validations are performed. */
|
|
2633
|
+
SKIP_VALIDATIONS = "SKIP_VALIDATIONS",
|
|
2634
|
+
/** Perform cart-level business validations as defined by the service plugin implementer. */
|
|
2635
|
+
PRE_CHECKOUT_VALIDATIONS = "PRE_CHECKOUT_VALIDATIONS",
|
|
2636
|
+
/** Perform checkout-specific business validations as defined by the service plugin implementer. */
|
|
2637
|
+
CHECKOUT_VALIDATIONS = "CHECKOUT_VALIDATIONS"
|
|
2638
|
+
}
|
|
2639
|
+
/** @enumType */
|
|
2640
|
+
type ValidationsConfigWithLiterals = ValidationsConfig | 'UNKNOWN_VALIDATIONS_CONFIG' | 'SKIP_VALIDATIONS' | 'PRE_CHECKOUT_VALIDATIONS' | 'CHECKOUT_VALIDATIONS';
|
|
2663
2641
|
interface EstimateCurrentCartResponse {
|
|
2664
2642
|
/** The Cart that was calculated. */
|
|
2665
2643
|
cart?: Cart;
|
|
@@ -3083,7 +3061,6 @@ interface EstimateCartRequest {
|
|
|
3083
3061
|
cartId: string;
|
|
3084
3062
|
/**
|
|
3085
3063
|
* Whether to retrieve the latest item prices, discounts, and inventory data from the catalogs before estimating the cart.
|
|
3086
|
-
*
|
|
3087
3064
|
* Default: `false`
|
|
3088
3065
|
*/
|
|
3089
3066
|
refreshCart?: boolean;
|
|
@@ -3092,6 +3069,11 @@ interface EstimateCartRequest {
|
|
|
3092
3069
|
* by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
|
|
3093
3070
|
*/
|
|
3094
3071
|
validationConfig?: ValidationsConfigWithLiterals;
|
|
3072
|
+
/**
|
|
3073
|
+
* Whether to calculate order-level discounts.
|
|
3074
|
+
* TODO: Currently i's ignored and always treated as true.
|
|
3075
|
+
*/
|
|
3076
|
+
calculateOrderDiscounts?: boolean;
|
|
3095
3077
|
/**
|
|
3096
3078
|
* Whether to calculate delivery costs.
|
|
3097
3079
|
* Default: false
|
|
@@ -3132,16 +3114,6 @@ interface CalculateCartRequest {
|
|
|
3132
3114
|
* Default: `false`
|
|
3133
3115
|
*/
|
|
3134
3116
|
refreshCart?: boolean;
|
|
3135
|
-
/**
|
|
3136
|
-
* Specifies the level of **business validation** to perform during cart calculation,
|
|
3137
|
-
* by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
|
|
3138
|
-
*/
|
|
3139
|
-
validationsConfig?: ValidationsConfigWithLiterals;
|
|
3140
|
-
/**
|
|
3141
|
-
* Optional custom configuration for the calculation.
|
|
3142
|
-
* If not provided, all price components are calculated by default.
|
|
3143
|
-
*/
|
|
3144
|
-
customCalculationConfig?: CalculationConfig;
|
|
3145
3117
|
}
|
|
3146
3118
|
interface CalculateCartResponse {
|
|
3147
3119
|
/** The Cart that was calculated. */
|
|
@@ -3173,6 +3145,34 @@ interface CalculateCartForV1Request {
|
|
|
3173
3145
|
/** Calculations overrides for backward compatibility with V1. */
|
|
3174
3146
|
calculationOverrides?: CalculationOverrides;
|
|
3175
3147
|
}
|
|
3148
|
+
interface CalculationConfig {
|
|
3149
|
+
/**
|
|
3150
|
+
* Whether to calculate delivery costs.
|
|
3151
|
+
* Default: false
|
|
3152
|
+
*/
|
|
3153
|
+
calculateDelivery?: boolean;
|
|
3154
|
+
/**
|
|
3155
|
+
* Whether to calculate any additional fees.
|
|
3156
|
+
* Default: false
|
|
3157
|
+
*/
|
|
3158
|
+
calculateAdditionalFees?: boolean;
|
|
3159
|
+
/**
|
|
3160
|
+
* Whether to include tax calculation.
|
|
3161
|
+
* Default: false
|
|
3162
|
+
*/
|
|
3163
|
+
calculateTax?: boolean;
|
|
3164
|
+
/**
|
|
3165
|
+
* Whether to calculate the effect of gift card balances on the cart total.
|
|
3166
|
+
* Gift cards are not redeemed - only reflected for estimation purposes.
|
|
3167
|
+
* Default: false
|
|
3168
|
+
*/
|
|
3169
|
+
calculateGiftCards?: boolean;
|
|
3170
|
+
/**
|
|
3171
|
+
* Whether to calculate order-level discounts.
|
|
3172
|
+
* TODO: Currently i's ignored and always treated as true.
|
|
3173
|
+
*/
|
|
3174
|
+
calculateOrderDiscounts?: boolean;
|
|
3175
|
+
}
|
|
3176
3176
|
interface Stage extends StageStagesOneOf {
|
|
3177
3177
|
/** Supported values: */
|
|
3178
3178
|
checkoutStage?: CheckoutStageWithLiterals;
|