@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.
- package/build/cjs/index.js +2 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +36 -11
- package/build/cjs/index.typings.js +2 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +31 -11
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.mjs +2 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +36 -11
- package/build/es/index.typings.mjs +2 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +31 -11
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.js +2 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +46 -21
- package/build/internal/cjs/index.typings.js +2 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +31 -11
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.mjs +2 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +46 -21
- package/build/internal/es/index.typings.mjs +2 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +31 -11
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -2076,9 +2076,15 @@ interface LineItemAdded {
|
|
|
2076
2076
|
* @minLength 1
|
|
2077
2077
|
* @maxLength 36
|
|
2078
2078
|
*/
|
|
2079
|
-
|
|
2079
|
+
catalogAppId?: string | null;
|
|
2080
2080
|
/** Whether the line item is a custom line item. */
|
|
2081
2081
|
customLineItem?: boolean;
|
|
2082
|
+
/**
|
|
2083
|
+
* ID of the app that added the line item to the cart (from the identity context).
|
|
2084
|
+
* @minLength 1
|
|
2085
|
+
* @maxLength 36
|
|
2086
|
+
*/
|
|
2087
|
+
appDefId?: string | null;
|
|
2082
2088
|
}
|
|
2083
2089
|
interface CouponAdded {
|
|
2084
2090
|
/**
|
|
@@ -2612,6 +2618,11 @@ interface CalculationConfig {
|
|
|
2612
2618
|
* Default: false
|
|
2613
2619
|
*/
|
|
2614
2620
|
calculateGiftCards?: boolean;
|
|
2621
|
+
/**
|
|
2622
|
+
* Whether to calculate order-level discounts.
|
|
2623
|
+
* TODO: Currently i's ignored and always treated as true.
|
|
2624
|
+
*/
|
|
2625
|
+
calculateOrderDiscounts?: boolean;
|
|
2615
2626
|
}
|
|
2616
2627
|
interface CalculateCurrentCartResponse {
|
|
2617
2628
|
/** The Cart that was calculated. */
|
|
@@ -2631,6 +2642,11 @@ interface EstimateCurrentCartRequest {
|
|
|
2631
2642
|
* by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
|
|
2632
2643
|
*/
|
|
2633
2644
|
validationConfig?: ValidationsConfigWithLiterals;
|
|
2645
|
+
/**
|
|
2646
|
+
* Whether to calculate order-level discounts.
|
|
2647
|
+
* TODO: Currently i's ignored and always treated as true.
|
|
2648
|
+
*/
|
|
2649
|
+
calculateOrderDiscounts?: boolean;
|
|
2634
2650
|
/**
|
|
2635
2651
|
* Whether to calculate delivery costs.
|
|
2636
2652
|
* Default: false
|
|
@@ -3074,7 +3090,6 @@ interface EstimateCartRequest {
|
|
|
3074
3090
|
cartId?: string;
|
|
3075
3091
|
/**
|
|
3076
3092
|
* Whether to retrieve the latest item prices, discounts, and inventory data from the catalogs before estimating the cart.
|
|
3077
|
-
*
|
|
3078
3093
|
* Default: `false`
|
|
3079
3094
|
*/
|
|
3080
3095
|
refreshCart?: boolean;
|
|
@@ -3083,6 +3098,11 @@ interface EstimateCartRequest {
|
|
|
3083
3098
|
* by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
|
|
3084
3099
|
*/
|
|
3085
3100
|
validationConfig?: ValidationsConfigWithLiterals;
|
|
3101
|
+
/**
|
|
3102
|
+
* Whether to calculate order-level discounts.
|
|
3103
|
+
* TODO: Currently i's ignored and always treated as true.
|
|
3104
|
+
*/
|
|
3105
|
+
calculateOrderDiscounts?: boolean;
|
|
3086
3106
|
/**
|
|
3087
3107
|
* Whether to calculate delivery costs.
|
|
3088
3108
|
* Default: false
|
|
@@ -3932,6 +3952,16 @@ interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
|
|
|
3932
3952
|
* @max 999
|
|
3933
3953
|
*/
|
|
3934
3954
|
subscriptionCycles?: number | null;
|
|
3955
|
+
/**
|
|
3956
|
+
* A list of item combinations for this applied discount.
|
|
3957
|
+
* Each entry represents a unique combination of line items that triggered
|
|
3958
|
+
* or received this discount, along with how many times that combination was applied together.
|
|
3959
|
+
* Relevant ONLY for BXGY and Quantity-based promotions.
|
|
3960
|
+
* In BXGY the combination will contain the "X" items with discount amount of 0.
|
|
3961
|
+
* @internal
|
|
3962
|
+
* @maxSize 1000
|
|
3963
|
+
*/
|
|
3964
|
+
itemCombinations?: ItemCombination[];
|
|
3935
3965
|
}
|
|
3936
3966
|
/** @oneof */
|
|
3937
3967
|
interface AppliedDiscountDiscountSourceOneOf {
|
|
@@ -3980,16 +4010,6 @@ interface DiscountRule {
|
|
|
3980
4010
|
name?: DiscountRuleName;
|
|
3981
4011
|
/** Discount value. */
|
|
3982
4012
|
amount?: MultiCurrencyPrice;
|
|
3983
|
-
/**
|
|
3984
|
-
* A list of item combinations for this discount rule.
|
|
3985
|
-
* Each entry represents a unique combination of line items that triggered
|
|
3986
|
-
* or received this discount, along with how many times that combination was applied together.
|
|
3987
|
-
* Relevant ONLY for BXGY and Quantity-based promotions.
|
|
3988
|
-
* In BXGY the combination will contain the "X" items with discount amount of 0.
|
|
3989
|
-
* @internal
|
|
3990
|
-
* @maxSize 1000
|
|
3991
|
-
*/
|
|
3992
|
-
itemCombinations?: ItemCombination[];
|
|
3993
4013
|
}
|
|
3994
4014
|
interface DiscountRuleName {
|
|
3995
4015
|
/**
|
|
@@ -4005,6 +4025,15 @@ interface DiscountRuleName {
|
|
|
4005
4025
|
*/
|
|
4006
4026
|
translated?: string | null;
|
|
4007
4027
|
}
|
|
4028
|
+
interface LineItemDiscount {
|
|
4029
|
+
/**
|
|
4030
|
+
* ID of line item the discount applies to.
|
|
4031
|
+
* @format GUID
|
|
4032
|
+
*/
|
|
4033
|
+
_id?: string;
|
|
4034
|
+
/** Discount value. */
|
|
4035
|
+
totalDiscountAmount?: MultiCurrencyPrice;
|
|
4036
|
+
}
|
|
4008
4037
|
interface ItemCombination {
|
|
4009
4038
|
/**
|
|
4010
4039
|
* The number of times this exact combination of items (with the specified quantities) was applied together in the order.
|
|
@@ -4034,15 +4063,6 @@ interface ItemCombinationLineItem {
|
|
|
4034
4063
|
*/
|
|
4035
4064
|
quantity?: number;
|
|
4036
4065
|
}
|
|
4037
|
-
interface LineItemDiscount {
|
|
4038
|
-
/**
|
|
4039
|
-
* ID of line item the discount applies to.
|
|
4040
|
-
* @format GUID
|
|
4041
|
-
*/
|
|
4042
|
-
_id?: string;
|
|
4043
|
-
/** Discount value. */
|
|
4044
|
-
totalDiscountAmount?: MultiCurrencyPrice;
|
|
4045
|
-
}
|
|
4046
4066
|
interface CalculationErrors extends CalculationErrorsShippingCalculationErrorOneOf {
|
|
4047
4067
|
/** General shipping calculation error. */
|
|
4048
4068
|
generalShippingCalculationError?: Details;
|
|
@@ -5123,6 +5143,11 @@ interface EstimateCurrentCartOptions {
|
|
|
5123
5143
|
* by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
|
|
5124
5144
|
*/
|
|
5125
5145
|
validationConfig?: ValidationsConfigWithLiterals;
|
|
5146
|
+
/**
|
|
5147
|
+
* Whether to calculate order-level discounts.
|
|
5148
|
+
* TODO: Currently i's ignored and always treated as true.
|
|
5149
|
+
*/
|
|
5150
|
+
calculateOrderDiscounts?: boolean;
|
|
5126
5151
|
/**
|
|
5127
5152
|
* Whether to calculate delivery costs.
|
|
5128
5153
|
* 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",
|