@wix/auto_sdk_ecom_current-cart 1.0.208 → 1.0.209
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.d.ts +1 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +79 -2
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +78 -1
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +1 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +79 -2
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +78 -1
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +1 -1
- package/build/internal/cjs/index.typings.d.ts +13 -29
- package/build/internal/cjs/meta.d.ts +12 -28
- package/build/internal/es/index.d.mts +1 -1
- package/build/internal/es/index.typings.d.mts +13 -29
- package/build/internal/es/meta.d.mts +12 -28
- package/package.json +2 -2
|
@@ -128,7 +128,7 @@ interface EstimateCurrentCartTotalsSignature {
|
|
|
128
128
|
* @param - Total estimation options.
|
|
129
129
|
* @deprecated Replaced by Cart V2 Estimate Current Cart.
|
|
130
130
|
*/
|
|
131
|
-
(options?: EstimateCurrentCartTotalsOptions): Promise<NonNullablePaths<EstimateTotalsResponse, `cart.lineItems` | `cart.lineItems.${number}.quantity` | `cart.lineItems.${number}.catalogReference.catalogItemId` | `cart.lineItems.${number}.catalogReference.appId` | `cart.lineItems.${number}.productName.original` | `cart.lineItems.${number}.price.amount` | `cart.lineItems.${number}.price.convertedAmount` | `cart.lineItems.${number}.price.formattedAmount` | `cart.lineItems.${number}.price.formattedConvertedAmount` | `cart.lineItems.${number}.availability.status` | `cart.lineItems.${number}.physicalProperties.shippable` | `cart.lineItems.${number}.physicalProperties.productDimensions.unit` | `cart.lineItems.${number}.itemType.preset` | `cart.lineItems.${number}.itemType.custom` | `cart.lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.frequency` | `cart.lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.autoRenewal` | `cart.lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.enableCustomerCancellation` | `cart.lineItems.${number}.subscriptionOptionInfo.title.original` | `cart.lineItems.${number}.subscriptionOptionInfo.description.original` | `cart.lineItems.${number}.paymentOption` | `cart.lineItems.${number}.priceDescription.original` | `cart.lineItems.${number}.selectedMembership._id` | `cart.lineItems.${number}.selectedMembership.appId` | `cart.lineItems.${number}.customLineItem` | `cart.lineItems.${number}.priceUndetermined` | `cart.lineItems.${number}.fixedQuantity` | `cart.lineItems.${number}.catalogOverrideFields.paymentOption.value` | `cart.lineItems.${number}.savePaymentMethod` | `cart.lineItems.${number}.taxableAddress.addressType` | `cart.lineItems.${number}.membersOnly` | `cart.buyerInfo.visitorId` | `cart.buyerInfo.memberId` | `cart.buyerInfo.userId` | `cart.currency` | `cart.conversionCurrency` | `cart.weightUnit` | `cart.appliedDiscounts` | `cart.appliedDiscounts.${number}.coupon._id` | `cart.appliedDiscounts.${number}.coupon.code` | `cart.contactInfo.address.streetAddress.number` | `cart.contactInfo.address.streetAddress.name` | `cart.contactInfo.contactDetails.vatId._id` | `cart.contactInfo.contactDetails.vatId.type` | `cart.selectedShippingOption.code` | `cart.paymentCurrency` | `calculatedLineItems` | `calculatedLineItems.${number}.lineItemId` | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.amount` | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.convertedAmount` | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.formattedAmount` | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.formattedConvertedAmount` | `calculatedLineItems.${number}.pricesBreakdown.taxDetails.taxRate` | `calculatedLineItems.${number}.paymentOption` | `calculatedLineItems.${number}.taxableAddress.addressType` | `priceSummary.subtotal.amount` | `priceSummary.subtotal.convertedAmount` | `priceSummary.subtotal.formattedAmount` | `priceSummary.subtotal.formattedConvertedAmount` | `giftCard._id` | `giftCard.obfuscatedCode` | `giftCard.amount.amount` | `giftCard.amount.convertedAmount` | `giftCard.amount.formattedAmount` | `giftCard.amount.formattedConvertedAmount` | `giftCard.appId` | `taxSummary.taxableAmount.amount` | `taxSummary.taxableAmount.convertedAmount` | `taxSummary.taxableAmount.formattedAmount` | `taxSummary.taxableAmount.formattedConvertedAmount` | `taxSummary.calculationDetails.manualRateReason` | `taxSummary.calculationDetails.autoTaxFallbackDetails.fallbackReason` | `taxSummary.calculationDetails.autoTaxFallbackDetails.error.code` | `taxSummary.calculationDetails.autoTaxFallbackDetails.error.description` | `taxSummary.calculationDetails.rateType` | `shippingInfo.region._id` | `shippingInfo.region.name` | `shippingInfo.selectedCarrierServiceOption.code` | `shippingInfo.selectedCarrierServiceOption.title` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.streetAddress.number` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.streetAddress.name` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.businessLocation` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.pickupMethod` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.amount` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.convertedAmount` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.formattedAmount` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.formattedConvertedAmount` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.taxRate` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown.${number}.name` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown.${number}.rate` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.taxBreakdown` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.taxBreakdown.${number}.jurisdictionType` | `shippingInfo.selectedCarrierServiceOption.requestedShippingOption` | `shippingInfo.selectedCarrierServiceOption.otherCharges` | `shippingInfo.selectedCarrierServiceOption.otherCharges.${number}.type` | `shippingInfo.selectedCarrierServiceOption.deliveryAllocations` | `shippingInfo.selectedCarrierServiceOption.deliveryAllocations.${number}.deliveryCarrier.code` | `shippingInfo.carrierServiceOptions` | `shippingInfo.carrierServiceOptions.${number}.carrierId` | `appliedDiscounts` | `appliedDiscounts.${number}.coupon._id` | `appliedDiscounts.${number}.coupon.code` | `appliedDiscounts.${number}.coupon.amount.amount` | `appliedDiscounts.${number}.coupon.amount.convertedAmount` | `appliedDiscounts.${number}.coupon.amount.formattedAmount` | `appliedDiscounts.${number}.coupon.amount.formattedConvertedAmount` | `appliedDiscounts.${number}.coupon.name` | `appliedDiscounts.${number}.discountRule._id` | `appliedDiscounts.${number}.discountRule.name.original` | `appliedDiscounts.${number}.discountType` | `calculationErrors.generalShippingCalculationError.applicationError.code` | `calculationErrors.generalShippingCalculationError.applicationError.description` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculationErrors.carrierErrors.errors` | `calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculationErrors.orderValidationErrors` | `weightUnit` | `currency` | `payNow.subtotal.amount` | `payNow.subtotal.convertedAmount` | `payNow.subtotal.formattedAmount` | `payNow.subtotal.formattedConvertedAmount` | `payLater.subtotal.amount` | `payLater.subtotal.convertedAmount` | `payLater.subtotal.formattedAmount` | `payLater.subtotal.formattedConvertedAmount` | `membershipOptions.eligibleMemberships` | `membershipOptions.eligibleMemberships.${number}._id` | `membershipOptions.eligibleMemberships.${number}.appId` | `membershipOptions.eligibleMemberships.${number}.name.original` | `membershipOptions.eligibleMemberships.${number}.credits.total` | `membershipOptions.eligibleMemberships.${number}.credits.remaining` | `membershipOptions.eligibleMemberships.${number}.credits.balanceType` | `membershipOptions.invalidMemberships` | `membershipOptions.invalidMemberships.${number}.reason` | `membershipOptions.selectedMemberships` | `membershipOptions.selectedMemberships.${number}._id` | `membershipOptions.selectedMemberships.${number}.appId` | `additionalFees` | `additionalFees.${number}.name` | `additionalFees.${number}.price.amount` | `additionalFees.${number}.price.convertedAmount` | `additionalFees.${number}.price.formattedAmount` | `additionalFees.${number}.price.formattedConvertedAmount` | `additionalFees.${number}.taxDetails.taxRate` | `additionalFees.${number}.source` | `additionalFees.${number}.taxableAddress.addressType` | `violations` | `violations.${number}.severity` | `violations.${number}.target.other.name` | `violations.${number}.target.lineItem.name`, 6>>;
|
|
131
|
+
(options?: EstimateCurrentCartTotalsOptions): Promise<NonNullablePaths<EstimateTotalsResponse, `cart.lineItems` | `cart.lineItems.${number}.quantity` | `cart.lineItems.${number}.catalogReference.catalogItemId` | `cart.lineItems.${number}.catalogReference.appId` | `cart.lineItems.${number}.productName.original` | `cart.lineItems.${number}.price.amount` | `cart.lineItems.${number}.price.convertedAmount` | `cart.lineItems.${number}.price.formattedAmount` | `cart.lineItems.${number}.price.formattedConvertedAmount` | `cart.lineItems.${number}.availability.status` | `cart.lineItems.${number}.physicalProperties.shippable` | `cart.lineItems.${number}.physicalProperties.productDimensions.unit` | `cart.lineItems.${number}.itemType.preset` | `cart.lineItems.${number}.itemType.custom` | `cart.lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.frequency` | `cart.lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.autoRenewal` | `cart.lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.enableCustomerCancellation` | `cart.lineItems.${number}.subscriptionOptionInfo.title.original` | `cart.lineItems.${number}.subscriptionOptionInfo.description.original` | `cart.lineItems.${number}.paymentOption` | `cart.lineItems.${number}.priceDescription.original` | `cart.lineItems.${number}.selectedMembership._id` | `cart.lineItems.${number}.selectedMembership.appId` | `cart.lineItems.${number}.customLineItem` | `cart.lineItems.${number}.priceUndetermined` | `cart.lineItems.${number}.fixedQuantity` | `cart.lineItems.${number}.catalogOverrideFields.paymentOption.value` | `cart.lineItems.${number}.savePaymentMethod` | `cart.lineItems.${number}.taxableAddress.addressType` | `cart.lineItems.${number}.membersOnly` | `cart.buyerInfo.visitorId` | `cart.buyerInfo.memberId` | `cart.buyerInfo.userId` | `cart.currency` | `cart.conversionCurrency` | `cart.weightUnit` | `cart.appliedDiscounts` | `cart.appliedDiscounts.${number}.coupon._id` | `cart.appliedDiscounts.${number}.coupon.code` | `cart.contactInfo.address.streetAddress.number` | `cart.contactInfo.address.streetAddress.name` | `cart.contactInfo.contactDetails.vatId._id` | `cart.contactInfo.contactDetails.vatId.type` | `cart.selectedShippingOption.code` | `cart.paymentCurrency` | `calculatedLineItems` | `calculatedLineItems.${number}.lineItemId` | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.amount` | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.convertedAmount` | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.formattedAmount` | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.formattedConvertedAmount` | `calculatedLineItems.${number}.pricesBreakdown.taxDetails.taxRate` | `calculatedLineItems.${number}.paymentOption` | `calculatedLineItems.${number}.taxableAddress.addressType` | `priceSummary.subtotal.amount` | `priceSummary.subtotal.convertedAmount` | `priceSummary.subtotal.formattedAmount` | `priceSummary.subtotal.formattedConvertedAmount` | `giftCard._id` | `giftCard.obfuscatedCode` | `giftCard.amount.amount` | `giftCard.amount.convertedAmount` | `giftCard.amount.formattedAmount` | `giftCard.amount.formattedConvertedAmount` | `giftCard.appId` | `taxSummary.taxableAmount.amount` | `taxSummary.taxableAmount.convertedAmount` | `taxSummary.taxableAmount.formattedAmount` | `taxSummary.taxableAmount.formattedConvertedAmount` | `taxSummary.calculationDetails.manualRateReason` | `taxSummary.calculationDetails.autoTaxFallbackDetails.fallbackReason` | `taxSummary.calculationDetails.autoTaxFallbackDetails.error.code` | `taxSummary.calculationDetails.autoTaxFallbackDetails.error.description` | `taxSummary.calculationDetails.rateType` | `shippingInfo.region._id` | `shippingInfo.region.name` | `shippingInfo.selectedCarrierServiceOption.code` | `shippingInfo.selectedCarrierServiceOption.title` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.streetAddress.number` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.streetAddress.name` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.businessLocation` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.pickupMethod` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.amount` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.convertedAmount` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.formattedAmount` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.formattedConvertedAmount` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.taxRate` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown.${number}.name` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown.${number}.rate` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.taxBreakdown` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.taxBreakdown.${number}.jurisdictionType` | `shippingInfo.selectedCarrierServiceOption.requestedShippingOption` | `shippingInfo.selectedCarrierServiceOption.otherCharges` | `shippingInfo.selectedCarrierServiceOption.otherCharges.${number}.type` | `shippingInfo.selectedCarrierServiceOption.deliveryAllocations` | `shippingInfo.selectedCarrierServiceOption.deliveryAllocations.${number}.deliveryCarrier.code` | `shippingInfo.carrierServiceOptions` | `shippingInfo.carrierServiceOptions.${number}.carrierId` | `appliedDiscounts` | `appliedDiscounts.${number}.coupon.percentage` | `appliedDiscounts.${number}.coupon._id` | `appliedDiscounts.${number}.coupon.code` | `appliedDiscounts.${number}.coupon.amount.amount` | `appliedDiscounts.${number}.coupon.amount.convertedAmount` | `appliedDiscounts.${number}.coupon.amount.formattedAmount` | `appliedDiscounts.${number}.coupon.amount.formattedConvertedAmount` | `appliedDiscounts.${number}.coupon.name` | `appliedDiscounts.${number}.coupon.discountValueType` | `appliedDiscounts.${number}.discountRule.percentage` | `appliedDiscounts.${number}.discountRule._id` | `appliedDiscounts.${number}.discountRule.name.original` | `appliedDiscounts.${number}.discountRule.discountValueType` | `appliedDiscounts.${number}.discountType` | `calculationErrors.generalShippingCalculationError.applicationError.code` | `calculationErrors.generalShippingCalculationError.applicationError.description` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculationErrors.carrierErrors.errors` | `calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculationErrors.orderValidationErrors` | `weightUnit` | `currency` | `payNow.subtotal.amount` | `payNow.subtotal.convertedAmount` | `payNow.subtotal.formattedAmount` | `payNow.subtotal.formattedConvertedAmount` | `payLater.subtotal.amount` | `payLater.subtotal.convertedAmount` | `payLater.subtotal.formattedAmount` | `payLater.subtotal.formattedConvertedAmount` | `membershipOptions.eligibleMemberships` | `membershipOptions.eligibleMemberships.${number}._id` | `membershipOptions.eligibleMemberships.${number}.appId` | `membershipOptions.eligibleMemberships.${number}.name.original` | `membershipOptions.eligibleMemberships.${number}.credits.total` | `membershipOptions.eligibleMemberships.${number}.credits.remaining` | `membershipOptions.eligibleMemberships.${number}.credits.balanceType` | `membershipOptions.invalidMemberships` | `membershipOptions.invalidMemberships.${number}.reason` | `membershipOptions.selectedMemberships` | `membershipOptions.selectedMemberships.${number}._id` | `membershipOptions.selectedMemberships.${number}.appId` | `additionalFees` | `additionalFees.${number}.name` | `additionalFees.${number}.price.amount` | `additionalFees.${number}.price.convertedAmount` | `additionalFees.${number}.price.formattedAmount` | `additionalFees.${number}.price.formattedConvertedAmount` | `additionalFees.${number}.taxDetails.taxRate` | `additionalFees.${number}.source` | `additionalFees.${number}.taxableAddress.addressType` | `violations` | `violations.${number}.severity` | `violations.${number}.target.other.name` | `violations.${number}.target.lineItem.name`, 6>>;
|
|
132
132
|
}
|
|
133
133
|
declare function deleteCurrentCart$1(httpClient: HttpClient): DeleteCurrentCartSignature;
|
|
134
134
|
interface DeleteCurrentCartSignature {
|
|
@@ -2696,13 +2696,10 @@ interface V1Coupon extends V1CouponDiscountValueOneOf {
|
|
|
2696
2696
|
/**
|
|
2697
2697
|
* Percentage the coupon took off the price it applied to. For example, `10.5` for 10.5%.
|
|
2698
2698
|
*
|
|
2699
|
-
* The price it applied to depends on the applied discount's `discountType
|
|
2700
|
-
*
|
|
2701
|
-
* before
|
|
2702
|
-
*
|
|
2703
|
-
* On an entry supplied in the request's `appliedDiscounts` without `amount`, the discount is calculated
|
|
2704
|
-
* again at this percentage. An amount, when present, wins.
|
|
2705
|
-
* @internal
|
|
2699
|
+
* The price it applied to depends on the applied discount's `discountType`. For `SPECIFIC_ITEMS`, it's the
|
|
2700
|
+
* line items' price after the discounts applied before this one. For `GLOBAL`, it's the subtotal after the
|
|
2701
|
+
* line item discounts. An order discount applied before the coupon, such as an automatic discount on the
|
|
2702
|
+
* whole order, isn't taken off first.
|
|
2706
2703
|
* @format DECIMAL_VALUE
|
|
2707
2704
|
* @decimalValue options { gt:0, lte:100, maxScale:2 }
|
|
2708
2705
|
*/
|
|
@@ -2726,7 +2723,6 @@ interface V1Coupon extends V1CouponDiscountValueOneOf {
|
|
|
2726
2723
|
* the total amount the coupon took off, whatever the type.
|
|
2727
2724
|
*
|
|
2728
2725
|
* Not returned for a free-shipping coupon.
|
|
2729
|
-
* @internal
|
|
2730
2726
|
*/
|
|
2731
2727
|
discountValueType?: DiscountValueTypeWithLiterals;
|
|
2732
2728
|
}
|
|
@@ -2735,13 +2731,10 @@ interface V1CouponDiscountValueOneOf {
|
|
|
2735
2731
|
/**
|
|
2736
2732
|
* Percentage the coupon took off the price it applied to. For example, `10.5` for 10.5%.
|
|
2737
2733
|
*
|
|
2738
|
-
* The price it applied to depends on the applied discount's `discountType
|
|
2739
|
-
*
|
|
2740
|
-
* before
|
|
2741
|
-
*
|
|
2742
|
-
* On an entry supplied in the request's `appliedDiscounts` without `amount`, the discount is calculated
|
|
2743
|
-
* again at this percentage. An amount, when present, wins.
|
|
2744
|
-
* @internal
|
|
2734
|
+
* The price it applied to depends on the applied discount's `discountType`. For `SPECIFIC_ITEMS`, it's the
|
|
2735
|
+
* line items' price after the discounts applied before this one. For `GLOBAL`, it's the subtotal after the
|
|
2736
|
+
* line item discounts. An order discount applied before the coupon, such as an automatic discount on the
|
|
2737
|
+
* whole order, isn't taken off first.
|
|
2745
2738
|
* @format DECIMAL_VALUE
|
|
2746
2739
|
* @decimalValue options { gt:0, lte:100, maxScale:2 }
|
|
2747
2740
|
*/
|
|
@@ -2752,18 +2745,19 @@ declare enum DiscountValueType {
|
|
|
2752
2745
|
/**
|
|
2753
2746
|
* The discount takes a percentage off the price it applies to.
|
|
2754
2747
|
* @documentationMaturity preview
|
|
2755
|
-
* @internal
|
|
2756
2748
|
*/
|
|
2757
2749
|
PERCENTAGE = "PERCENTAGE",
|
|
2758
2750
|
/**
|
|
2759
2751
|
* The discount takes a fixed amount off the price it applies to.
|
|
2752
|
+
*
|
|
2753
|
+
* Also returned for a discount that sets a fixed price, for a buy X for an amount discount, and for a buy X
|
|
2754
|
+
* get Y coupon. For each of these, the coupon's or discount rule's `amount` holds what the discount took off.
|
|
2760
2755
|
* @documentationMaturity preview
|
|
2761
|
-
* @internal
|
|
2762
2756
|
*/
|
|
2763
2757
|
FIXED_AMOUNT = "FIXED_AMOUNT"
|
|
2764
2758
|
}
|
|
2765
2759
|
/** @enumType */
|
|
2766
|
-
type DiscountValueTypeWithLiterals = DiscountValueType;
|
|
2760
|
+
type DiscountValueTypeWithLiterals = DiscountValueType | 'PERCENTAGE' | 'FIXED_AMOUNT';
|
|
2767
2761
|
interface V1MerchantDiscount {
|
|
2768
2762
|
/** Discount value. */
|
|
2769
2763
|
amount?: MultiCurrencyPrice;
|
|
@@ -2781,10 +2775,6 @@ interface V1DiscountRule extends V1DiscountRuleDiscountValueOneOf {
|
|
|
2781
2775
|
* The price it applied to depends on the applied discount's `discountType`: the line items' price for
|
|
2782
2776
|
* `SPECIFIC_ITEMS`, the subtotal for `GLOBAL`. In each case it's the price after the discounts applied
|
|
2783
2777
|
* before this one.
|
|
2784
|
-
*
|
|
2785
|
-
* On an entry supplied in the request's `appliedDiscounts` without `amount`, the discount is calculated
|
|
2786
|
-
* again at this percentage. An amount, when present, wins.
|
|
2787
|
-
* @internal
|
|
2788
2778
|
* @format DECIMAL_VALUE
|
|
2789
2779
|
* @decimalValue options { gt:0, lte:100, maxScale:2 }
|
|
2790
2780
|
*/
|
|
@@ -2803,7 +2793,6 @@ interface V1DiscountRule extends V1DiscountRuleDiscountValueOneOf {
|
|
|
2803
2793
|
* `amount` holds the total amount the discount rule took off, whatever the type.
|
|
2804
2794
|
*
|
|
2805
2795
|
* Not returned for a free-shipping discount rule.
|
|
2806
|
-
* @internal
|
|
2807
2796
|
*/
|
|
2808
2797
|
discountValueType?: DiscountValueTypeWithLiterals;
|
|
2809
2798
|
}
|
|
@@ -2815,10 +2804,6 @@ interface V1DiscountRuleDiscountValueOneOf {
|
|
|
2815
2804
|
* The price it applied to depends on the applied discount's `discountType`: the line items' price for
|
|
2816
2805
|
* `SPECIFIC_ITEMS`, the subtotal for `GLOBAL`. In each case it's the price after the discounts applied
|
|
2817
2806
|
* before this one.
|
|
2818
|
-
*
|
|
2819
|
-
* On an entry supplied in the request's `appliedDiscounts` without `amount`, the discount is calculated
|
|
2820
|
-
* again at this percentage. An amount, when present, wins.
|
|
2821
|
-
* @internal
|
|
2822
2807
|
* @format DECIMAL_VALUE
|
|
2823
2808
|
* @decimalValue options { gt:0, lte:100, maxScale:2 }
|
|
2824
2809
|
*/
|
|
@@ -2850,7 +2835,6 @@ interface LineItemDiscount {
|
|
|
2850
2835
|
* Number of the line item's units the discount was applied to.
|
|
2851
2836
|
*
|
|
2852
2837
|
* Returned only for a `SPECIFIC_ITEMS` discount.
|
|
2853
|
-
* @internal
|
|
2854
2838
|
* @min 1
|
|
2855
2839
|
* @max 100000
|
|
2856
2840
|
*/
|
|
@@ -4502,7 +4486,7 @@ declare function updateCurrentCartLineItemQuantity(lineItems: LineItemQuantityUp
|
|
|
4502
4486
|
* @replacedBy wix.ecom.cart.v2.CurrentCartService.EstimateCurrentCart
|
|
4503
4487
|
* @targetRemovalDate 2027-02-01
|
|
4504
4488
|
*/
|
|
4505
|
-
declare function estimateCurrentCartTotals(options?: EstimateCurrentCartTotalsOptions): Promise<NonNullablePaths<EstimateTotalsResponse, `cart.lineItems` | `cart.lineItems.${number}.quantity` | `cart.lineItems.${number}.catalogReference.catalogItemId` | `cart.lineItems.${number}.catalogReference.appId` | `cart.lineItems.${number}.productName.original` | `cart.lineItems.${number}.price.amount` | `cart.lineItems.${number}.price.convertedAmount` | `cart.lineItems.${number}.price.formattedAmount` | `cart.lineItems.${number}.price.formattedConvertedAmount` | `cart.lineItems.${number}.availability.status` | `cart.lineItems.${number}.physicalProperties.shippable` | `cart.lineItems.${number}.physicalProperties.productDimensions.unit` | `cart.lineItems.${number}.itemType.preset` | `cart.lineItems.${number}.itemType.custom` | `cart.lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.frequency` | `cart.lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.autoRenewal` | `cart.lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.enableCustomerCancellation` | `cart.lineItems.${number}.subscriptionOptionInfo.title.original` | `cart.lineItems.${number}.subscriptionOptionInfo.description.original` | `cart.lineItems.${number}.paymentOption` | `cart.lineItems.${number}.priceDescription.original` | `cart.lineItems.${number}.selectedMembership._id` | `cart.lineItems.${number}.selectedMembership.appId` | `cart.lineItems.${number}.customLineItem` | `cart.lineItems.${number}.priceUndetermined` | `cart.lineItems.${number}.fixedQuantity` | `cart.lineItems.${number}.catalogOverrideFields.paymentOption.value` | `cart.lineItems.${number}.savePaymentMethod` | `cart.lineItems.${number}.taxableAddress.addressType` | `cart.lineItems.${number}.membersOnly` | `cart.buyerInfo.visitorId` | `cart.buyerInfo.memberId` | `cart.buyerInfo.userId` | `cart.currency` | `cart.conversionCurrency` | `cart.weightUnit` | `cart.appliedDiscounts` | `cart.appliedDiscounts.${number}.coupon._id` | `cart.appliedDiscounts.${number}.coupon.code` | `cart.contactInfo.address.streetAddress.number` | `cart.contactInfo.address.streetAddress.name` | `cart.contactInfo.contactDetails.vatId._id` | `cart.contactInfo.contactDetails.vatId.type` | `cart.selectedShippingOption.code` | `cart.paymentCurrency` | `calculatedLineItems` | `calculatedLineItems.${number}.lineItemId` | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.amount` | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.convertedAmount` | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.formattedAmount` | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.formattedConvertedAmount` | `calculatedLineItems.${number}.pricesBreakdown.taxDetails.taxRate` | `calculatedLineItems.${number}.paymentOption` | `calculatedLineItems.${number}.taxableAddress.addressType` | `priceSummary.subtotal.amount` | `priceSummary.subtotal.convertedAmount` | `priceSummary.subtotal.formattedAmount` | `priceSummary.subtotal.formattedConvertedAmount` | `giftCard._id` | `giftCard.obfuscatedCode` | `giftCard.amount.amount` | `giftCard.amount.convertedAmount` | `giftCard.amount.formattedAmount` | `giftCard.amount.formattedConvertedAmount` | `giftCard.appId` | `taxSummary.taxableAmount.amount` | `taxSummary.taxableAmount.convertedAmount` | `taxSummary.taxableAmount.formattedAmount` | `taxSummary.taxableAmount.formattedConvertedAmount` | `taxSummary.calculationDetails.manualRateReason` | `taxSummary.calculationDetails.autoTaxFallbackDetails.fallbackReason` | `taxSummary.calculationDetails.autoTaxFallbackDetails.error.code` | `taxSummary.calculationDetails.autoTaxFallbackDetails.error.description` | `taxSummary.calculationDetails.rateType` | `shippingInfo.region._id` | `shippingInfo.region.name` | `shippingInfo.selectedCarrierServiceOption.code` | `shippingInfo.selectedCarrierServiceOption.title` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.streetAddress.number` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.streetAddress.name` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.businessLocation` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.pickupMethod` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.amount` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.convertedAmount` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.formattedAmount` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.formattedConvertedAmount` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.taxRate` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown.${number}.name` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown.${number}.rate` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.taxBreakdown` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.taxBreakdown.${number}.jurisdictionType` | `shippingInfo.selectedCarrierServiceOption.requestedShippingOption` | `shippingInfo.selectedCarrierServiceOption.otherCharges` | `shippingInfo.selectedCarrierServiceOption.otherCharges.${number}.type` | `shippingInfo.selectedCarrierServiceOption.deliveryAllocations` | `shippingInfo.selectedCarrierServiceOption.deliveryAllocations.${number}.deliveryCarrier.code` | `shippingInfo.carrierServiceOptions` | `shippingInfo.carrierServiceOptions.${number}.carrierId` | `appliedDiscounts` | `appliedDiscounts.${number}.coupon._id` | `appliedDiscounts.${number}.coupon.code` | `appliedDiscounts.${number}.coupon.amount.amount` | `appliedDiscounts.${number}.coupon.amount.convertedAmount` | `appliedDiscounts.${number}.coupon.amount.formattedAmount` | `appliedDiscounts.${number}.coupon.amount.formattedConvertedAmount` | `appliedDiscounts.${number}.coupon.name` | `appliedDiscounts.${number}.discountRule._id` | `appliedDiscounts.${number}.discountRule.name.original` | `appliedDiscounts.${number}.discountType` | `calculationErrors.generalShippingCalculationError.applicationError.code` | `calculationErrors.generalShippingCalculationError.applicationError.description` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculationErrors.carrierErrors.errors` | `calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculationErrors.orderValidationErrors` | `weightUnit` | `currency` | `payNow.subtotal.amount` | `payNow.subtotal.convertedAmount` | `payNow.subtotal.formattedAmount` | `payNow.subtotal.formattedConvertedAmount` | `payLater.subtotal.amount` | `payLater.subtotal.convertedAmount` | `payLater.subtotal.formattedAmount` | `payLater.subtotal.formattedConvertedAmount` | `membershipOptions.eligibleMemberships` | `membershipOptions.eligibleMemberships.${number}._id` | `membershipOptions.eligibleMemberships.${number}.appId` | `membershipOptions.eligibleMemberships.${number}.name.original` | `membershipOptions.eligibleMemberships.${number}.credits.total` | `membershipOptions.eligibleMemberships.${number}.credits.remaining` | `membershipOptions.eligibleMemberships.${number}.credits.balanceType` | `membershipOptions.invalidMemberships` | `membershipOptions.invalidMemberships.${number}.reason` | `membershipOptions.selectedMemberships` | `membershipOptions.selectedMemberships.${number}._id` | `membershipOptions.selectedMemberships.${number}.appId` | `additionalFees` | `additionalFees.${number}.name` | `additionalFees.${number}.price.amount` | `additionalFees.${number}.price.convertedAmount` | `additionalFees.${number}.price.formattedAmount` | `additionalFees.${number}.price.formattedConvertedAmount` | `additionalFees.${number}.taxDetails.taxRate` | `additionalFees.${number}.source` | `additionalFees.${number}.taxableAddress.addressType` | `violations` | `violations.${number}.severity` | `violations.${number}.target.other.name` | `violations.${number}.target.lineItem.name`, 6>>;
|
|
4489
|
+
declare function estimateCurrentCartTotals(options?: EstimateCurrentCartTotalsOptions): Promise<NonNullablePaths<EstimateTotalsResponse, `cart.lineItems` | `cart.lineItems.${number}.quantity` | `cart.lineItems.${number}.catalogReference.catalogItemId` | `cart.lineItems.${number}.catalogReference.appId` | `cart.lineItems.${number}.productName.original` | `cart.lineItems.${number}.price.amount` | `cart.lineItems.${number}.price.convertedAmount` | `cart.lineItems.${number}.price.formattedAmount` | `cart.lineItems.${number}.price.formattedConvertedAmount` | `cart.lineItems.${number}.availability.status` | `cart.lineItems.${number}.physicalProperties.shippable` | `cart.lineItems.${number}.physicalProperties.productDimensions.unit` | `cart.lineItems.${number}.itemType.preset` | `cart.lineItems.${number}.itemType.custom` | `cart.lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.frequency` | `cart.lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.autoRenewal` | `cart.lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.enableCustomerCancellation` | `cart.lineItems.${number}.subscriptionOptionInfo.title.original` | `cart.lineItems.${number}.subscriptionOptionInfo.description.original` | `cart.lineItems.${number}.paymentOption` | `cart.lineItems.${number}.priceDescription.original` | `cart.lineItems.${number}.selectedMembership._id` | `cart.lineItems.${number}.selectedMembership.appId` | `cart.lineItems.${number}.customLineItem` | `cart.lineItems.${number}.priceUndetermined` | `cart.lineItems.${number}.fixedQuantity` | `cart.lineItems.${number}.catalogOverrideFields.paymentOption.value` | `cart.lineItems.${number}.savePaymentMethod` | `cart.lineItems.${number}.taxableAddress.addressType` | `cart.lineItems.${number}.membersOnly` | `cart.buyerInfo.visitorId` | `cart.buyerInfo.memberId` | `cart.buyerInfo.userId` | `cart.currency` | `cart.conversionCurrency` | `cart.weightUnit` | `cart.appliedDiscounts` | `cart.appliedDiscounts.${number}.coupon._id` | `cart.appliedDiscounts.${number}.coupon.code` | `cart.contactInfo.address.streetAddress.number` | `cart.contactInfo.address.streetAddress.name` | `cart.contactInfo.contactDetails.vatId._id` | `cart.contactInfo.contactDetails.vatId.type` | `cart.selectedShippingOption.code` | `cart.paymentCurrency` | `calculatedLineItems` | `calculatedLineItems.${number}.lineItemId` | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.amount` | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.convertedAmount` | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.formattedAmount` | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.formattedConvertedAmount` | `calculatedLineItems.${number}.pricesBreakdown.taxDetails.taxRate` | `calculatedLineItems.${number}.paymentOption` | `calculatedLineItems.${number}.taxableAddress.addressType` | `priceSummary.subtotal.amount` | `priceSummary.subtotal.convertedAmount` | `priceSummary.subtotal.formattedAmount` | `priceSummary.subtotal.formattedConvertedAmount` | `giftCard._id` | `giftCard.obfuscatedCode` | `giftCard.amount.amount` | `giftCard.amount.convertedAmount` | `giftCard.amount.formattedAmount` | `giftCard.amount.formattedConvertedAmount` | `giftCard.appId` | `taxSummary.taxableAmount.amount` | `taxSummary.taxableAmount.convertedAmount` | `taxSummary.taxableAmount.formattedAmount` | `taxSummary.taxableAmount.formattedConvertedAmount` | `taxSummary.calculationDetails.manualRateReason` | `taxSummary.calculationDetails.autoTaxFallbackDetails.fallbackReason` | `taxSummary.calculationDetails.autoTaxFallbackDetails.error.code` | `taxSummary.calculationDetails.autoTaxFallbackDetails.error.description` | `taxSummary.calculationDetails.rateType` | `shippingInfo.region._id` | `shippingInfo.region.name` | `shippingInfo.selectedCarrierServiceOption.code` | `shippingInfo.selectedCarrierServiceOption.title` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.streetAddress.number` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.streetAddress.name` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.businessLocation` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.pickupMethod` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.amount` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.convertedAmount` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.formattedAmount` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.formattedConvertedAmount` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.taxRate` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown.${number}.name` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown.${number}.rate` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.taxBreakdown` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.taxBreakdown.${number}.jurisdictionType` | `shippingInfo.selectedCarrierServiceOption.requestedShippingOption` | `shippingInfo.selectedCarrierServiceOption.otherCharges` | `shippingInfo.selectedCarrierServiceOption.otherCharges.${number}.type` | `shippingInfo.selectedCarrierServiceOption.deliveryAllocations` | `shippingInfo.selectedCarrierServiceOption.deliveryAllocations.${number}.deliveryCarrier.code` | `shippingInfo.carrierServiceOptions` | `shippingInfo.carrierServiceOptions.${number}.carrierId` | `appliedDiscounts` | `appliedDiscounts.${number}.coupon.percentage` | `appliedDiscounts.${number}.coupon._id` | `appliedDiscounts.${number}.coupon.code` | `appliedDiscounts.${number}.coupon.amount.amount` | `appliedDiscounts.${number}.coupon.amount.convertedAmount` | `appliedDiscounts.${number}.coupon.amount.formattedAmount` | `appliedDiscounts.${number}.coupon.amount.formattedConvertedAmount` | `appliedDiscounts.${number}.coupon.name` | `appliedDiscounts.${number}.coupon.discountValueType` | `appliedDiscounts.${number}.discountRule.percentage` | `appliedDiscounts.${number}.discountRule._id` | `appliedDiscounts.${number}.discountRule.name.original` | `appliedDiscounts.${number}.discountRule.discountValueType` | `appliedDiscounts.${number}.discountType` | `calculationErrors.generalShippingCalculationError.applicationError.code` | `calculationErrors.generalShippingCalculationError.applicationError.description` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculationErrors.carrierErrors.errors` | `calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculationErrors.orderValidationErrors` | `weightUnit` | `currency` | `payNow.subtotal.amount` | `payNow.subtotal.convertedAmount` | `payNow.subtotal.formattedAmount` | `payNow.subtotal.formattedConvertedAmount` | `payLater.subtotal.amount` | `payLater.subtotal.convertedAmount` | `payLater.subtotal.formattedAmount` | `payLater.subtotal.formattedConvertedAmount` | `membershipOptions.eligibleMemberships` | `membershipOptions.eligibleMemberships.${number}._id` | `membershipOptions.eligibleMemberships.${number}.appId` | `membershipOptions.eligibleMemberships.${number}.name.original` | `membershipOptions.eligibleMemberships.${number}.credits.total` | `membershipOptions.eligibleMemberships.${number}.credits.remaining` | `membershipOptions.eligibleMemberships.${number}.credits.balanceType` | `membershipOptions.invalidMemberships` | `membershipOptions.invalidMemberships.${number}.reason` | `membershipOptions.selectedMemberships` | `membershipOptions.selectedMemberships.${number}._id` | `membershipOptions.selectedMemberships.${number}.appId` | `additionalFees` | `additionalFees.${number}.name` | `additionalFees.${number}.price.amount` | `additionalFees.${number}.price.convertedAmount` | `additionalFees.${number}.price.formattedAmount` | `additionalFees.${number}.price.formattedConvertedAmount` | `additionalFees.${number}.taxDetails.taxRate` | `additionalFees.${number}.source` | `additionalFees.${number}.taxableAddress.addressType` | `violations` | `violations.${number}.severity` | `violations.${number}.target.other.name` | `violations.${number}.target.lineItem.name`, 6>>;
|
|
4506
4490
|
interface EstimateCurrentCartTotalsOptions {
|
|
4507
4491
|
/**
|
|
4508
4492
|
* Selected shipping option
|
|
@@ -2753,13 +2753,10 @@ interface V1Coupon extends V1CouponDiscountValueOneOf {
|
|
|
2753
2753
|
/**
|
|
2754
2754
|
* Percentage the coupon took off the price it applied to. For example, `10.5` for 10.5%.
|
|
2755
2755
|
*
|
|
2756
|
-
* The price it applied to depends on the applied discount's `discountType
|
|
2757
|
-
*
|
|
2758
|
-
* before
|
|
2759
|
-
*
|
|
2760
|
-
* On an entry supplied in the request's `appliedDiscounts` without `amount`, the discount is calculated
|
|
2761
|
-
* again at this percentage. An amount, when present, wins.
|
|
2762
|
-
* @internal
|
|
2756
|
+
* The price it applied to depends on the applied discount's `discountType`. For `SPECIFIC_ITEMS`, it's the
|
|
2757
|
+
* line items' price after the discounts applied before this one. For `GLOBAL`, it's the subtotal after the
|
|
2758
|
+
* line item discounts. An order discount applied before the coupon, such as an automatic discount on the
|
|
2759
|
+
* whole order, isn't taken off first.
|
|
2763
2760
|
* @format DECIMAL_VALUE
|
|
2764
2761
|
* @decimalValue options { gt:0, lte:100, maxScale:2 }
|
|
2765
2762
|
*/
|
|
@@ -2783,7 +2780,6 @@ interface V1Coupon extends V1CouponDiscountValueOneOf {
|
|
|
2783
2780
|
* the total amount the coupon took off, whatever the type.
|
|
2784
2781
|
*
|
|
2785
2782
|
* Not returned for a free-shipping coupon.
|
|
2786
|
-
* @internal
|
|
2787
2783
|
*/
|
|
2788
2784
|
discountValueType?: DiscountValueTypeWithLiterals;
|
|
2789
2785
|
}
|
|
@@ -2792,13 +2788,10 @@ interface V1CouponDiscountValueOneOf {
|
|
|
2792
2788
|
/**
|
|
2793
2789
|
* Percentage the coupon took off the price it applied to. For example, `10.5` for 10.5%.
|
|
2794
2790
|
*
|
|
2795
|
-
* The price it applied to depends on the applied discount's `discountType
|
|
2796
|
-
*
|
|
2797
|
-
* before
|
|
2798
|
-
*
|
|
2799
|
-
* On an entry supplied in the request's `appliedDiscounts` without `amount`, the discount is calculated
|
|
2800
|
-
* again at this percentage. An amount, when present, wins.
|
|
2801
|
-
* @internal
|
|
2791
|
+
* The price it applied to depends on the applied discount's `discountType`. For `SPECIFIC_ITEMS`, it's the
|
|
2792
|
+
* line items' price after the discounts applied before this one. For `GLOBAL`, it's the subtotal after the
|
|
2793
|
+
* line item discounts. An order discount applied before the coupon, such as an automatic discount on the
|
|
2794
|
+
* whole order, isn't taken off first.
|
|
2802
2795
|
* @format DECIMAL_VALUE
|
|
2803
2796
|
* @decimalValue options { gt:0, lte:100, maxScale:2 }
|
|
2804
2797
|
*/
|
|
@@ -2809,18 +2802,19 @@ declare enum DiscountValueType {
|
|
|
2809
2802
|
/**
|
|
2810
2803
|
* The discount takes a percentage off the price it applies to.
|
|
2811
2804
|
* @documentationMaturity preview
|
|
2812
|
-
* @internal
|
|
2813
2805
|
*/
|
|
2814
2806
|
PERCENTAGE = "PERCENTAGE",
|
|
2815
2807
|
/**
|
|
2816
2808
|
* The discount takes a fixed amount off the price it applies to.
|
|
2809
|
+
*
|
|
2810
|
+
* Also returned for a discount that sets a fixed price, for a buy X for an amount discount, and for a buy X
|
|
2811
|
+
* get Y coupon. For each of these, the coupon's or discount rule's `amount` holds what the discount took off.
|
|
2817
2812
|
* @documentationMaturity preview
|
|
2818
|
-
* @internal
|
|
2819
2813
|
*/
|
|
2820
2814
|
FIXED_AMOUNT = "FIXED_AMOUNT"
|
|
2821
2815
|
}
|
|
2822
2816
|
/** @enumType */
|
|
2823
|
-
type DiscountValueTypeWithLiterals = DiscountValueType;
|
|
2817
|
+
type DiscountValueTypeWithLiterals = DiscountValueType | 'PERCENTAGE' | 'FIXED_AMOUNT';
|
|
2824
2818
|
interface V1MerchantDiscount {
|
|
2825
2819
|
/** Discount value. */
|
|
2826
2820
|
amount?: MultiCurrencyPrice;
|
|
@@ -2838,10 +2832,6 @@ interface V1DiscountRule extends V1DiscountRuleDiscountValueOneOf {
|
|
|
2838
2832
|
* The price it applied to depends on the applied discount's `discountType`: the line items' price for
|
|
2839
2833
|
* `SPECIFIC_ITEMS`, the subtotal for `GLOBAL`. In each case it's the price after the discounts applied
|
|
2840
2834
|
* before this one.
|
|
2841
|
-
*
|
|
2842
|
-
* On an entry supplied in the request's `appliedDiscounts` without `amount`, the discount is calculated
|
|
2843
|
-
* again at this percentage. An amount, when present, wins.
|
|
2844
|
-
* @internal
|
|
2845
2835
|
* @format DECIMAL_VALUE
|
|
2846
2836
|
* @decimalValue options { gt:0, lte:100, maxScale:2 }
|
|
2847
2837
|
*/
|
|
@@ -2860,7 +2850,6 @@ interface V1DiscountRule extends V1DiscountRuleDiscountValueOneOf {
|
|
|
2860
2850
|
* `amount` holds the total amount the discount rule took off, whatever the type.
|
|
2861
2851
|
*
|
|
2862
2852
|
* Not returned for a free-shipping discount rule.
|
|
2863
|
-
* @internal
|
|
2864
2853
|
*/
|
|
2865
2854
|
discountValueType?: DiscountValueTypeWithLiterals;
|
|
2866
2855
|
}
|
|
@@ -2872,10 +2861,6 @@ interface V1DiscountRuleDiscountValueOneOf {
|
|
|
2872
2861
|
* The price it applied to depends on the applied discount's `discountType`: the line items' price for
|
|
2873
2862
|
* `SPECIFIC_ITEMS`, the subtotal for `GLOBAL`. In each case it's the price after the discounts applied
|
|
2874
2863
|
* before this one.
|
|
2875
|
-
*
|
|
2876
|
-
* On an entry supplied in the request's `appliedDiscounts` without `amount`, the discount is calculated
|
|
2877
|
-
* again at this percentage. An amount, when present, wins.
|
|
2878
|
-
* @internal
|
|
2879
2864
|
* @format DECIMAL_VALUE
|
|
2880
2865
|
* @decimalValue options { gt:0, lte:100, maxScale:2 }
|
|
2881
2866
|
*/
|
|
@@ -2907,7 +2892,6 @@ interface LineItemDiscount {
|
|
|
2907
2892
|
* Number of the line item's units the discount was applied to.
|
|
2908
2893
|
*
|
|
2909
2894
|
* Returned only for a `SPECIFIC_ITEMS` discount.
|
|
2910
|
-
* @internal
|
|
2911
2895
|
* @min 1
|
|
2912
2896
|
* @max 100000
|
|
2913
2897
|
*/
|
|
@@ -128,7 +128,7 @@ interface EstimateCurrentCartTotalsSignature {
|
|
|
128
128
|
* @param - Total estimation options.
|
|
129
129
|
* @deprecated Replaced by Cart V2 Estimate Current Cart.
|
|
130
130
|
*/
|
|
131
|
-
(options?: EstimateCurrentCartTotalsOptions): Promise<NonNullablePaths<EstimateTotalsResponse, `cart.lineItems` | `cart.lineItems.${number}.quantity` | `cart.lineItems.${number}.catalogReference.catalogItemId` | `cart.lineItems.${number}.catalogReference.appId` | `cart.lineItems.${number}.productName.original` | `cart.lineItems.${number}.price.amount` | `cart.lineItems.${number}.price.convertedAmount` | `cart.lineItems.${number}.price.formattedAmount` | `cart.lineItems.${number}.price.formattedConvertedAmount` | `cart.lineItems.${number}.availability.status` | `cart.lineItems.${number}.physicalProperties.shippable` | `cart.lineItems.${number}.physicalProperties.productDimensions.unit` | `cart.lineItems.${number}.itemType.preset` | `cart.lineItems.${number}.itemType.custom` | `cart.lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.frequency` | `cart.lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.autoRenewal` | `cart.lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.enableCustomerCancellation` | `cart.lineItems.${number}.subscriptionOptionInfo.title.original` | `cart.lineItems.${number}.subscriptionOptionInfo.description.original` | `cart.lineItems.${number}.paymentOption` | `cart.lineItems.${number}.priceDescription.original` | `cart.lineItems.${number}.selectedMembership._id` | `cart.lineItems.${number}.selectedMembership.appId` | `cart.lineItems.${number}.customLineItem` | `cart.lineItems.${number}.priceUndetermined` | `cart.lineItems.${number}.fixedQuantity` | `cart.lineItems.${number}.catalogOverrideFields.paymentOption.value` | `cart.lineItems.${number}.savePaymentMethod` | `cart.lineItems.${number}.taxableAddress.addressType` | `cart.lineItems.${number}.membersOnly` | `cart.buyerInfo.visitorId` | `cart.buyerInfo.memberId` | `cart.buyerInfo.userId` | `cart.currency` | `cart.conversionCurrency` | `cart.weightUnit` | `cart.appliedDiscounts` | `cart.appliedDiscounts.${number}.coupon._id` | `cart.appliedDiscounts.${number}.coupon.code` | `cart.contactInfo.address.streetAddress.number` | `cart.contactInfo.address.streetAddress.name` | `cart.contactInfo.contactDetails.vatId._id` | `cart.contactInfo.contactDetails.vatId.type` | `cart.selectedShippingOption.code` | `cart.paymentCurrency` | `calculatedLineItems` | `calculatedLineItems.${number}.lineItemId` | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.amount` | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.convertedAmount` | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.formattedAmount` | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.formattedConvertedAmount` | `calculatedLineItems.${number}.pricesBreakdown.taxDetails.taxRate` | `calculatedLineItems.${number}.paymentOption` | `calculatedLineItems.${number}.taxableAddress.addressType` | `priceSummary.subtotal.amount` | `priceSummary.subtotal.convertedAmount` | `priceSummary.subtotal.formattedAmount` | `priceSummary.subtotal.formattedConvertedAmount` | `giftCard._id` | `giftCard.obfuscatedCode` | `giftCard.amount.amount` | `giftCard.amount.convertedAmount` | `giftCard.amount.formattedAmount` | `giftCard.amount.formattedConvertedAmount` | `giftCard.appId` | `taxSummary.taxableAmount.amount` | `taxSummary.taxableAmount.convertedAmount` | `taxSummary.taxableAmount.formattedAmount` | `taxSummary.taxableAmount.formattedConvertedAmount` | `taxSummary.calculationDetails.manualRateReason` | `taxSummary.calculationDetails.autoTaxFallbackDetails.fallbackReason` | `taxSummary.calculationDetails.autoTaxFallbackDetails.error.code` | `taxSummary.calculationDetails.autoTaxFallbackDetails.error.description` | `taxSummary.calculationDetails.rateType` | `shippingInfo.region._id` | `shippingInfo.region.name` | `shippingInfo.selectedCarrierServiceOption.code` | `shippingInfo.selectedCarrierServiceOption.title` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.streetAddress.number` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.streetAddress.name` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.businessLocation` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.pickupMethod` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.amount` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.convertedAmount` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.formattedAmount` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.formattedConvertedAmount` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.taxRate` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown.${number}.name` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown.${number}.rate` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.taxBreakdown` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.taxBreakdown.${number}.jurisdictionType` | `shippingInfo.selectedCarrierServiceOption.requestedShippingOption` | `shippingInfo.selectedCarrierServiceOption.otherCharges` | `shippingInfo.selectedCarrierServiceOption.otherCharges.${number}.type` | `shippingInfo.selectedCarrierServiceOption.deliveryAllocations` | `shippingInfo.selectedCarrierServiceOption.deliveryAllocations.${number}.deliveryCarrier.code` | `shippingInfo.carrierServiceOptions` | `shippingInfo.carrierServiceOptions.${number}.carrierId` | `appliedDiscounts` | `appliedDiscounts.${number}.coupon._id` | `appliedDiscounts.${number}.coupon.code` | `appliedDiscounts.${number}.coupon.amount.amount` | `appliedDiscounts.${number}.coupon.amount.convertedAmount` | `appliedDiscounts.${number}.coupon.amount.formattedAmount` | `appliedDiscounts.${number}.coupon.amount.formattedConvertedAmount` | `appliedDiscounts.${number}.coupon.name` | `appliedDiscounts.${number}.discountRule._id` | `appliedDiscounts.${number}.discountRule.name.original` | `appliedDiscounts.${number}.discountType` | `calculationErrors.generalShippingCalculationError.applicationError.code` | `calculationErrors.generalShippingCalculationError.applicationError.description` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculationErrors.carrierErrors.errors` | `calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculationErrors.orderValidationErrors` | `weightUnit` | `currency` | `payNow.subtotal.amount` | `payNow.subtotal.convertedAmount` | `payNow.subtotal.formattedAmount` | `payNow.subtotal.formattedConvertedAmount` | `payLater.subtotal.amount` | `payLater.subtotal.convertedAmount` | `payLater.subtotal.formattedAmount` | `payLater.subtotal.formattedConvertedAmount` | `membershipOptions.eligibleMemberships` | `membershipOptions.eligibleMemberships.${number}._id` | `membershipOptions.eligibleMemberships.${number}.appId` | `membershipOptions.eligibleMemberships.${number}.name.original` | `membershipOptions.eligibleMemberships.${number}.credits.total` | `membershipOptions.eligibleMemberships.${number}.credits.remaining` | `membershipOptions.eligibleMemberships.${number}.credits.balanceType` | `membershipOptions.invalidMemberships` | `membershipOptions.invalidMemberships.${number}.reason` | `membershipOptions.selectedMemberships` | `membershipOptions.selectedMemberships.${number}._id` | `membershipOptions.selectedMemberships.${number}.appId` | `additionalFees` | `additionalFees.${number}.name` | `additionalFees.${number}.price.amount` | `additionalFees.${number}.price.convertedAmount` | `additionalFees.${number}.price.formattedAmount` | `additionalFees.${number}.price.formattedConvertedAmount` | `additionalFees.${number}.taxDetails.taxRate` | `additionalFees.${number}.source` | `additionalFees.${number}.taxableAddress.addressType` | `violations` | `violations.${number}.severity` | `violations.${number}.target.other.name` | `violations.${number}.target.lineItem.name`, 6>>;
|
|
131
|
+
(options?: EstimateCurrentCartTotalsOptions): Promise<NonNullablePaths<EstimateTotalsResponse, `cart.lineItems` | `cart.lineItems.${number}.quantity` | `cart.lineItems.${number}.catalogReference.catalogItemId` | `cart.lineItems.${number}.catalogReference.appId` | `cart.lineItems.${number}.productName.original` | `cart.lineItems.${number}.price.amount` | `cart.lineItems.${number}.price.convertedAmount` | `cart.lineItems.${number}.price.formattedAmount` | `cart.lineItems.${number}.price.formattedConvertedAmount` | `cart.lineItems.${number}.availability.status` | `cart.lineItems.${number}.physicalProperties.shippable` | `cart.lineItems.${number}.physicalProperties.productDimensions.unit` | `cart.lineItems.${number}.itemType.preset` | `cart.lineItems.${number}.itemType.custom` | `cart.lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.frequency` | `cart.lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.autoRenewal` | `cart.lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.enableCustomerCancellation` | `cart.lineItems.${number}.subscriptionOptionInfo.title.original` | `cart.lineItems.${number}.subscriptionOptionInfo.description.original` | `cart.lineItems.${number}.paymentOption` | `cart.lineItems.${number}.priceDescription.original` | `cart.lineItems.${number}.selectedMembership._id` | `cart.lineItems.${number}.selectedMembership.appId` | `cart.lineItems.${number}.customLineItem` | `cart.lineItems.${number}.priceUndetermined` | `cart.lineItems.${number}.fixedQuantity` | `cart.lineItems.${number}.catalogOverrideFields.paymentOption.value` | `cart.lineItems.${number}.savePaymentMethod` | `cart.lineItems.${number}.taxableAddress.addressType` | `cart.lineItems.${number}.membersOnly` | `cart.buyerInfo.visitorId` | `cart.buyerInfo.memberId` | `cart.buyerInfo.userId` | `cart.currency` | `cart.conversionCurrency` | `cart.weightUnit` | `cart.appliedDiscounts` | `cart.appliedDiscounts.${number}.coupon._id` | `cart.appliedDiscounts.${number}.coupon.code` | `cart.contactInfo.address.streetAddress.number` | `cart.contactInfo.address.streetAddress.name` | `cart.contactInfo.contactDetails.vatId._id` | `cart.contactInfo.contactDetails.vatId.type` | `cart.selectedShippingOption.code` | `cart.paymentCurrency` | `calculatedLineItems` | `calculatedLineItems.${number}.lineItemId` | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.amount` | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.convertedAmount` | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.formattedAmount` | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.formattedConvertedAmount` | `calculatedLineItems.${number}.pricesBreakdown.taxDetails.taxRate` | `calculatedLineItems.${number}.paymentOption` | `calculatedLineItems.${number}.taxableAddress.addressType` | `priceSummary.subtotal.amount` | `priceSummary.subtotal.convertedAmount` | `priceSummary.subtotal.formattedAmount` | `priceSummary.subtotal.formattedConvertedAmount` | `giftCard._id` | `giftCard.obfuscatedCode` | `giftCard.amount.amount` | `giftCard.amount.convertedAmount` | `giftCard.amount.formattedAmount` | `giftCard.amount.formattedConvertedAmount` | `giftCard.appId` | `taxSummary.taxableAmount.amount` | `taxSummary.taxableAmount.convertedAmount` | `taxSummary.taxableAmount.formattedAmount` | `taxSummary.taxableAmount.formattedConvertedAmount` | `taxSummary.calculationDetails.manualRateReason` | `taxSummary.calculationDetails.autoTaxFallbackDetails.fallbackReason` | `taxSummary.calculationDetails.autoTaxFallbackDetails.error.code` | `taxSummary.calculationDetails.autoTaxFallbackDetails.error.description` | `taxSummary.calculationDetails.rateType` | `shippingInfo.region._id` | `shippingInfo.region.name` | `shippingInfo.selectedCarrierServiceOption.code` | `shippingInfo.selectedCarrierServiceOption.title` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.streetAddress.number` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.streetAddress.name` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.businessLocation` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.pickupMethod` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.amount` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.convertedAmount` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.formattedAmount` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.formattedConvertedAmount` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.taxRate` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown.${number}.name` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown.${number}.rate` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.taxBreakdown` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.taxBreakdown.${number}.jurisdictionType` | `shippingInfo.selectedCarrierServiceOption.requestedShippingOption` | `shippingInfo.selectedCarrierServiceOption.otherCharges` | `shippingInfo.selectedCarrierServiceOption.otherCharges.${number}.type` | `shippingInfo.selectedCarrierServiceOption.deliveryAllocations` | `shippingInfo.selectedCarrierServiceOption.deliveryAllocations.${number}.deliveryCarrier.code` | `shippingInfo.carrierServiceOptions` | `shippingInfo.carrierServiceOptions.${number}.carrierId` | `appliedDiscounts` | `appliedDiscounts.${number}.coupon.percentage` | `appliedDiscounts.${number}.coupon._id` | `appliedDiscounts.${number}.coupon.code` | `appliedDiscounts.${number}.coupon.amount.amount` | `appliedDiscounts.${number}.coupon.amount.convertedAmount` | `appliedDiscounts.${number}.coupon.amount.formattedAmount` | `appliedDiscounts.${number}.coupon.amount.formattedConvertedAmount` | `appliedDiscounts.${number}.coupon.name` | `appliedDiscounts.${number}.coupon.discountValueType` | `appliedDiscounts.${number}.discountRule.percentage` | `appliedDiscounts.${number}.discountRule._id` | `appliedDiscounts.${number}.discountRule.name.original` | `appliedDiscounts.${number}.discountRule.discountValueType` | `appliedDiscounts.${number}.discountType` | `calculationErrors.generalShippingCalculationError.applicationError.code` | `calculationErrors.generalShippingCalculationError.applicationError.description` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculationErrors.carrierErrors.errors` | `calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculationErrors.orderValidationErrors` | `weightUnit` | `currency` | `payNow.subtotal.amount` | `payNow.subtotal.convertedAmount` | `payNow.subtotal.formattedAmount` | `payNow.subtotal.formattedConvertedAmount` | `payLater.subtotal.amount` | `payLater.subtotal.convertedAmount` | `payLater.subtotal.formattedAmount` | `payLater.subtotal.formattedConvertedAmount` | `membershipOptions.eligibleMemberships` | `membershipOptions.eligibleMemberships.${number}._id` | `membershipOptions.eligibleMemberships.${number}.appId` | `membershipOptions.eligibleMemberships.${number}.name.original` | `membershipOptions.eligibleMemberships.${number}.credits.total` | `membershipOptions.eligibleMemberships.${number}.credits.remaining` | `membershipOptions.eligibleMemberships.${number}.credits.balanceType` | `membershipOptions.invalidMemberships` | `membershipOptions.invalidMemberships.${number}.reason` | `membershipOptions.selectedMemberships` | `membershipOptions.selectedMemberships.${number}._id` | `membershipOptions.selectedMemberships.${number}.appId` | `additionalFees` | `additionalFees.${number}.name` | `additionalFees.${number}.price.amount` | `additionalFees.${number}.price.convertedAmount` | `additionalFees.${number}.price.formattedAmount` | `additionalFees.${number}.price.formattedConvertedAmount` | `additionalFees.${number}.taxDetails.taxRate` | `additionalFees.${number}.source` | `additionalFees.${number}.taxableAddress.addressType` | `violations` | `violations.${number}.severity` | `violations.${number}.target.other.name` | `violations.${number}.target.lineItem.name`, 6>>;
|
|
132
132
|
}
|
|
133
133
|
declare function deleteCurrentCart$1(httpClient: HttpClient): DeleteCurrentCartSignature;
|
|
134
134
|
interface DeleteCurrentCartSignature {
|
|
@@ -2696,13 +2696,10 @@ interface V1Coupon extends V1CouponDiscountValueOneOf {
|
|
|
2696
2696
|
/**
|
|
2697
2697
|
* Percentage the coupon took off the price it applied to. For example, `10.5` for 10.5%.
|
|
2698
2698
|
*
|
|
2699
|
-
* The price it applied to depends on the applied discount's `discountType
|
|
2700
|
-
*
|
|
2701
|
-
* before
|
|
2702
|
-
*
|
|
2703
|
-
* On an entry supplied in the request's `appliedDiscounts` without `amount`, the discount is calculated
|
|
2704
|
-
* again at this percentage. An amount, when present, wins.
|
|
2705
|
-
* @internal
|
|
2699
|
+
* The price it applied to depends on the applied discount's `discountType`. For `SPECIFIC_ITEMS`, it's the
|
|
2700
|
+
* line items' price after the discounts applied before this one. For `GLOBAL`, it's the subtotal after the
|
|
2701
|
+
* line item discounts. An order discount applied before the coupon, such as an automatic discount on the
|
|
2702
|
+
* whole order, isn't taken off first.
|
|
2706
2703
|
* @format DECIMAL_VALUE
|
|
2707
2704
|
* @decimalValue options { gt:0, lte:100, maxScale:2 }
|
|
2708
2705
|
*/
|
|
@@ -2726,7 +2723,6 @@ interface V1Coupon extends V1CouponDiscountValueOneOf {
|
|
|
2726
2723
|
* the total amount the coupon took off, whatever the type.
|
|
2727
2724
|
*
|
|
2728
2725
|
* Not returned for a free-shipping coupon.
|
|
2729
|
-
* @internal
|
|
2730
2726
|
*/
|
|
2731
2727
|
discountValueType?: DiscountValueTypeWithLiterals;
|
|
2732
2728
|
}
|
|
@@ -2735,13 +2731,10 @@ interface V1CouponDiscountValueOneOf {
|
|
|
2735
2731
|
/**
|
|
2736
2732
|
* Percentage the coupon took off the price it applied to. For example, `10.5` for 10.5%.
|
|
2737
2733
|
*
|
|
2738
|
-
* The price it applied to depends on the applied discount's `discountType
|
|
2739
|
-
*
|
|
2740
|
-
* before
|
|
2741
|
-
*
|
|
2742
|
-
* On an entry supplied in the request's `appliedDiscounts` without `amount`, the discount is calculated
|
|
2743
|
-
* again at this percentage. An amount, when present, wins.
|
|
2744
|
-
* @internal
|
|
2734
|
+
* The price it applied to depends on the applied discount's `discountType`. For `SPECIFIC_ITEMS`, it's the
|
|
2735
|
+
* line items' price after the discounts applied before this one. For `GLOBAL`, it's the subtotal after the
|
|
2736
|
+
* line item discounts. An order discount applied before the coupon, such as an automatic discount on the
|
|
2737
|
+
* whole order, isn't taken off first.
|
|
2745
2738
|
* @format DECIMAL_VALUE
|
|
2746
2739
|
* @decimalValue options { gt:0, lte:100, maxScale:2 }
|
|
2747
2740
|
*/
|
|
@@ -2752,18 +2745,19 @@ declare enum DiscountValueType {
|
|
|
2752
2745
|
/**
|
|
2753
2746
|
* The discount takes a percentage off the price it applies to.
|
|
2754
2747
|
* @documentationMaturity preview
|
|
2755
|
-
* @internal
|
|
2756
2748
|
*/
|
|
2757
2749
|
PERCENTAGE = "PERCENTAGE",
|
|
2758
2750
|
/**
|
|
2759
2751
|
* The discount takes a fixed amount off the price it applies to.
|
|
2752
|
+
*
|
|
2753
|
+
* Also returned for a discount that sets a fixed price, for a buy X for an amount discount, and for a buy X
|
|
2754
|
+
* get Y coupon. For each of these, the coupon's or discount rule's `amount` holds what the discount took off.
|
|
2760
2755
|
* @documentationMaturity preview
|
|
2761
|
-
* @internal
|
|
2762
2756
|
*/
|
|
2763
2757
|
FIXED_AMOUNT = "FIXED_AMOUNT"
|
|
2764
2758
|
}
|
|
2765
2759
|
/** @enumType */
|
|
2766
|
-
type DiscountValueTypeWithLiterals = DiscountValueType;
|
|
2760
|
+
type DiscountValueTypeWithLiterals = DiscountValueType | 'PERCENTAGE' | 'FIXED_AMOUNT';
|
|
2767
2761
|
interface V1MerchantDiscount {
|
|
2768
2762
|
/** Discount value. */
|
|
2769
2763
|
amount?: MultiCurrencyPrice;
|
|
@@ -2781,10 +2775,6 @@ interface V1DiscountRule extends V1DiscountRuleDiscountValueOneOf {
|
|
|
2781
2775
|
* The price it applied to depends on the applied discount's `discountType`: the line items' price for
|
|
2782
2776
|
* `SPECIFIC_ITEMS`, the subtotal for `GLOBAL`. In each case it's the price after the discounts applied
|
|
2783
2777
|
* before this one.
|
|
2784
|
-
*
|
|
2785
|
-
* On an entry supplied in the request's `appliedDiscounts` without `amount`, the discount is calculated
|
|
2786
|
-
* again at this percentage. An amount, when present, wins.
|
|
2787
|
-
* @internal
|
|
2788
2778
|
* @format DECIMAL_VALUE
|
|
2789
2779
|
* @decimalValue options { gt:0, lte:100, maxScale:2 }
|
|
2790
2780
|
*/
|
|
@@ -2803,7 +2793,6 @@ interface V1DiscountRule extends V1DiscountRuleDiscountValueOneOf {
|
|
|
2803
2793
|
* `amount` holds the total amount the discount rule took off, whatever the type.
|
|
2804
2794
|
*
|
|
2805
2795
|
* Not returned for a free-shipping discount rule.
|
|
2806
|
-
* @internal
|
|
2807
2796
|
*/
|
|
2808
2797
|
discountValueType?: DiscountValueTypeWithLiterals;
|
|
2809
2798
|
}
|
|
@@ -2815,10 +2804,6 @@ interface V1DiscountRuleDiscountValueOneOf {
|
|
|
2815
2804
|
* The price it applied to depends on the applied discount's `discountType`: the line items' price for
|
|
2816
2805
|
* `SPECIFIC_ITEMS`, the subtotal for `GLOBAL`. In each case it's the price after the discounts applied
|
|
2817
2806
|
* before this one.
|
|
2818
|
-
*
|
|
2819
|
-
* On an entry supplied in the request's `appliedDiscounts` without `amount`, the discount is calculated
|
|
2820
|
-
* again at this percentage. An amount, when present, wins.
|
|
2821
|
-
* @internal
|
|
2822
2807
|
* @format DECIMAL_VALUE
|
|
2823
2808
|
* @decimalValue options { gt:0, lte:100, maxScale:2 }
|
|
2824
2809
|
*/
|
|
@@ -2850,7 +2835,6 @@ interface LineItemDiscount {
|
|
|
2850
2835
|
* Number of the line item's units the discount was applied to.
|
|
2851
2836
|
*
|
|
2852
2837
|
* Returned only for a `SPECIFIC_ITEMS` discount.
|
|
2853
|
-
* @internal
|
|
2854
2838
|
* @min 1
|
|
2855
2839
|
* @max 100000
|
|
2856
2840
|
*/
|
|
@@ -4502,7 +4486,7 @@ declare function updateCurrentCartLineItemQuantity(lineItems: LineItemQuantityUp
|
|
|
4502
4486
|
* @replacedBy wix.ecom.cart.v2.CurrentCartService.EstimateCurrentCart
|
|
4503
4487
|
* @targetRemovalDate 2027-02-01
|
|
4504
4488
|
*/
|
|
4505
|
-
declare function estimateCurrentCartTotals(options?: EstimateCurrentCartTotalsOptions): Promise<NonNullablePaths<EstimateTotalsResponse, `cart.lineItems` | `cart.lineItems.${number}.quantity` | `cart.lineItems.${number}.catalogReference.catalogItemId` | `cart.lineItems.${number}.catalogReference.appId` | `cart.lineItems.${number}.productName.original` | `cart.lineItems.${number}.price.amount` | `cart.lineItems.${number}.price.convertedAmount` | `cart.lineItems.${number}.price.formattedAmount` | `cart.lineItems.${number}.price.formattedConvertedAmount` | `cart.lineItems.${number}.availability.status` | `cart.lineItems.${number}.physicalProperties.shippable` | `cart.lineItems.${number}.physicalProperties.productDimensions.unit` | `cart.lineItems.${number}.itemType.preset` | `cart.lineItems.${number}.itemType.custom` | `cart.lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.frequency` | `cart.lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.autoRenewal` | `cart.lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.enableCustomerCancellation` | `cart.lineItems.${number}.subscriptionOptionInfo.title.original` | `cart.lineItems.${number}.subscriptionOptionInfo.description.original` | `cart.lineItems.${number}.paymentOption` | `cart.lineItems.${number}.priceDescription.original` | `cart.lineItems.${number}.selectedMembership._id` | `cart.lineItems.${number}.selectedMembership.appId` | `cart.lineItems.${number}.customLineItem` | `cart.lineItems.${number}.priceUndetermined` | `cart.lineItems.${number}.fixedQuantity` | `cart.lineItems.${number}.catalogOverrideFields.paymentOption.value` | `cart.lineItems.${number}.savePaymentMethod` | `cart.lineItems.${number}.taxableAddress.addressType` | `cart.lineItems.${number}.membersOnly` | `cart.buyerInfo.visitorId` | `cart.buyerInfo.memberId` | `cart.buyerInfo.userId` | `cart.currency` | `cart.conversionCurrency` | `cart.weightUnit` | `cart.appliedDiscounts` | `cart.appliedDiscounts.${number}.coupon._id` | `cart.appliedDiscounts.${number}.coupon.code` | `cart.contactInfo.address.streetAddress.number` | `cart.contactInfo.address.streetAddress.name` | `cart.contactInfo.contactDetails.vatId._id` | `cart.contactInfo.contactDetails.vatId.type` | `cart.selectedShippingOption.code` | `cart.paymentCurrency` | `calculatedLineItems` | `calculatedLineItems.${number}.lineItemId` | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.amount` | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.convertedAmount` | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.formattedAmount` | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.formattedConvertedAmount` | `calculatedLineItems.${number}.pricesBreakdown.taxDetails.taxRate` | `calculatedLineItems.${number}.paymentOption` | `calculatedLineItems.${number}.taxableAddress.addressType` | `priceSummary.subtotal.amount` | `priceSummary.subtotal.convertedAmount` | `priceSummary.subtotal.formattedAmount` | `priceSummary.subtotal.formattedConvertedAmount` | `giftCard._id` | `giftCard.obfuscatedCode` | `giftCard.amount.amount` | `giftCard.amount.convertedAmount` | `giftCard.amount.formattedAmount` | `giftCard.amount.formattedConvertedAmount` | `giftCard.appId` | `taxSummary.taxableAmount.amount` | `taxSummary.taxableAmount.convertedAmount` | `taxSummary.taxableAmount.formattedAmount` | `taxSummary.taxableAmount.formattedConvertedAmount` | `taxSummary.calculationDetails.manualRateReason` | `taxSummary.calculationDetails.autoTaxFallbackDetails.fallbackReason` | `taxSummary.calculationDetails.autoTaxFallbackDetails.error.code` | `taxSummary.calculationDetails.autoTaxFallbackDetails.error.description` | `taxSummary.calculationDetails.rateType` | `shippingInfo.region._id` | `shippingInfo.region.name` | `shippingInfo.selectedCarrierServiceOption.code` | `shippingInfo.selectedCarrierServiceOption.title` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.streetAddress.number` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.streetAddress.name` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.businessLocation` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.pickupMethod` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.amount` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.convertedAmount` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.formattedAmount` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.formattedConvertedAmount` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.taxRate` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown.${number}.name` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown.${number}.rate` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.taxBreakdown` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.taxBreakdown.${number}.jurisdictionType` | `shippingInfo.selectedCarrierServiceOption.requestedShippingOption` | `shippingInfo.selectedCarrierServiceOption.otherCharges` | `shippingInfo.selectedCarrierServiceOption.otherCharges.${number}.type` | `shippingInfo.selectedCarrierServiceOption.deliveryAllocations` | `shippingInfo.selectedCarrierServiceOption.deliveryAllocations.${number}.deliveryCarrier.code` | `shippingInfo.carrierServiceOptions` | `shippingInfo.carrierServiceOptions.${number}.carrierId` | `appliedDiscounts` | `appliedDiscounts.${number}.coupon._id` | `appliedDiscounts.${number}.coupon.code` | `appliedDiscounts.${number}.coupon.amount.amount` | `appliedDiscounts.${number}.coupon.amount.convertedAmount` | `appliedDiscounts.${number}.coupon.amount.formattedAmount` | `appliedDiscounts.${number}.coupon.amount.formattedConvertedAmount` | `appliedDiscounts.${number}.coupon.name` | `appliedDiscounts.${number}.discountRule._id` | `appliedDiscounts.${number}.discountRule.name.original` | `appliedDiscounts.${number}.discountType` | `calculationErrors.generalShippingCalculationError.applicationError.code` | `calculationErrors.generalShippingCalculationError.applicationError.description` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculationErrors.carrierErrors.errors` | `calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculationErrors.orderValidationErrors` | `weightUnit` | `currency` | `payNow.subtotal.amount` | `payNow.subtotal.convertedAmount` | `payNow.subtotal.formattedAmount` | `payNow.subtotal.formattedConvertedAmount` | `payLater.subtotal.amount` | `payLater.subtotal.convertedAmount` | `payLater.subtotal.formattedAmount` | `payLater.subtotal.formattedConvertedAmount` | `membershipOptions.eligibleMemberships` | `membershipOptions.eligibleMemberships.${number}._id` | `membershipOptions.eligibleMemberships.${number}.appId` | `membershipOptions.eligibleMemberships.${number}.name.original` | `membershipOptions.eligibleMemberships.${number}.credits.total` | `membershipOptions.eligibleMemberships.${number}.credits.remaining` | `membershipOptions.eligibleMemberships.${number}.credits.balanceType` | `membershipOptions.invalidMemberships` | `membershipOptions.invalidMemberships.${number}.reason` | `membershipOptions.selectedMemberships` | `membershipOptions.selectedMemberships.${number}._id` | `membershipOptions.selectedMemberships.${number}.appId` | `additionalFees` | `additionalFees.${number}.name` | `additionalFees.${number}.price.amount` | `additionalFees.${number}.price.convertedAmount` | `additionalFees.${number}.price.formattedAmount` | `additionalFees.${number}.price.formattedConvertedAmount` | `additionalFees.${number}.taxDetails.taxRate` | `additionalFees.${number}.source` | `additionalFees.${number}.taxableAddress.addressType` | `violations` | `violations.${number}.severity` | `violations.${number}.target.other.name` | `violations.${number}.target.lineItem.name`, 6>>;
|
|
4489
|
+
declare function estimateCurrentCartTotals(options?: EstimateCurrentCartTotalsOptions): Promise<NonNullablePaths<EstimateTotalsResponse, `cart.lineItems` | `cart.lineItems.${number}.quantity` | `cart.lineItems.${number}.catalogReference.catalogItemId` | `cart.lineItems.${number}.catalogReference.appId` | `cart.lineItems.${number}.productName.original` | `cart.lineItems.${number}.price.amount` | `cart.lineItems.${number}.price.convertedAmount` | `cart.lineItems.${number}.price.formattedAmount` | `cart.lineItems.${number}.price.formattedConvertedAmount` | `cart.lineItems.${number}.availability.status` | `cart.lineItems.${number}.physicalProperties.shippable` | `cart.lineItems.${number}.physicalProperties.productDimensions.unit` | `cart.lineItems.${number}.itemType.preset` | `cart.lineItems.${number}.itemType.custom` | `cart.lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.frequency` | `cart.lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.autoRenewal` | `cart.lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.enableCustomerCancellation` | `cart.lineItems.${number}.subscriptionOptionInfo.title.original` | `cart.lineItems.${number}.subscriptionOptionInfo.description.original` | `cart.lineItems.${number}.paymentOption` | `cart.lineItems.${number}.priceDescription.original` | `cart.lineItems.${number}.selectedMembership._id` | `cart.lineItems.${number}.selectedMembership.appId` | `cart.lineItems.${number}.customLineItem` | `cart.lineItems.${number}.priceUndetermined` | `cart.lineItems.${number}.fixedQuantity` | `cart.lineItems.${number}.catalogOverrideFields.paymentOption.value` | `cart.lineItems.${number}.savePaymentMethod` | `cart.lineItems.${number}.taxableAddress.addressType` | `cart.lineItems.${number}.membersOnly` | `cart.buyerInfo.visitorId` | `cart.buyerInfo.memberId` | `cart.buyerInfo.userId` | `cart.currency` | `cart.conversionCurrency` | `cart.weightUnit` | `cart.appliedDiscounts` | `cart.appliedDiscounts.${number}.coupon._id` | `cart.appliedDiscounts.${number}.coupon.code` | `cart.contactInfo.address.streetAddress.number` | `cart.contactInfo.address.streetAddress.name` | `cart.contactInfo.contactDetails.vatId._id` | `cart.contactInfo.contactDetails.vatId.type` | `cart.selectedShippingOption.code` | `cart.paymentCurrency` | `calculatedLineItems` | `calculatedLineItems.${number}.lineItemId` | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.amount` | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.convertedAmount` | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.formattedAmount` | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.formattedConvertedAmount` | `calculatedLineItems.${number}.pricesBreakdown.taxDetails.taxRate` | `calculatedLineItems.${number}.paymentOption` | `calculatedLineItems.${number}.taxableAddress.addressType` | `priceSummary.subtotal.amount` | `priceSummary.subtotal.convertedAmount` | `priceSummary.subtotal.formattedAmount` | `priceSummary.subtotal.formattedConvertedAmount` | `giftCard._id` | `giftCard.obfuscatedCode` | `giftCard.amount.amount` | `giftCard.amount.convertedAmount` | `giftCard.amount.formattedAmount` | `giftCard.amount.formattedConvertedAmount` | `giftCard.appId` | `taxSummary.taxableAmount.amount` | `taxSummary.taxableAmount.convertedAmount` | `taxSummary.taxableAmount.formattedAmount` | `taxSummary.taxableAmount.formattedConvertedAmount` | `taxSummary.calculationDetails.manualRateReason` | `taxSummary.calculationDetails.autoTaxFallbackDetails.fallbackReason` | `taxSummary.calculationDetails.autoTaxFallbackDetails.error.code` | `taxSummary.calculationDetails.autoTaxFallbackDetails.error.description` | `taxSummary.calculationDetails.rateType` | `shippingInfo.region._id` | `shippingInfo.region.name` | `shippingInfo.selectedCarrierServiceOption.code` | `shippingInfo.selectedCarrierServiceOption.title` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.streetAddress.number` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.streetAddress.name` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.businessLocation` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.pickupMethod` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.amount` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.convertedAmount` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.formattedAmount` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.formattedConvertedAmount` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.taxRate` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown.${number}.name` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown.${number}.rate` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.taxBreakdown` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.taxBreakdown.${number}.jurisdictionType` | `shippingInfo.selectedCarrierServiceOption.requestedShippingOption` | `shippingInfo.selectedCarrierServiceOption.otherCharges` | `shippingInfo.selectedCarrierServiceOption.otherCharges.${number}.type` | `shippingInfo.selectedCarrierServiceOption.deliveryAllocations` | `shippingInfo.selectedCarrierServiceOption.deliveryAllocations.${number}.deliveryCarrier.code` | `shippingInfo.carrierServiceOptions` | `shippingInfo.carrierServiceOptions.${number}.carrierId` | `appliedDiscounts` | `appliedDiscounts.${number}.coupon.percentage` | `appliedDiscounts.${number}.coupon._id` | `appliedDiscounts.${number}.coupon.code` | `appliedDiscounts.${number}.coupon.amount.amount` | `appliedDiscounts.${number}.coupon.amount.convertedAmount` | `appliedDiscounts.${number}.coupon.amount.formattedAmount` | `appliedDiscounts.${number}.coupon.amount.formattedConvertedAmount` | `appliedDiscounts.${number}.coupon.name` | `appliedDiscounts.${number}.coupon.discountValueType` | `appliedDiscounts.${number}.discountRule.percentage` | `appliedDiscounts.${number}.discountRule._id` | `appliedDiscounts.${number}.discountRule.name.original` | `appliedDiscounts.${number}.discountRule.discountValueType` | `appliedDiscounts.${number}.discountType` | `calculationErrors.generalShippingCalculationError.applicationError.code` | `calculationErrors.generalShippingCalculationError.applicationError.description` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculationErrors.carrierErrors.errors` | `calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculationErrors.orderValidationErrors` | `weightUnit` | `currency` | `payNow.subtotal.amount` | `payNow.subtotal.convertedAmount` | `payNow.subtotal.formattedAmount` | `payNow.subtotal.formattedConvertedAmount` | `payLater.subtotal.amount` | `payLater.subtotal.convertedAmount` | `payLater.subtotal.formattedAmount` | `payLater.subtotal.formattedConvertedAmount` | `membershipOptions.eligibleMemberships` | `membershipOptions.eligibleMemberships.${number}._id` | `membershipOptions.eligibleMemberships.${number}.appId` | `membershipOptions.eligibleMemberships.${number}.name.original` | `membershipOptions.eligibleMemberships.${number}.credits.total` | `membershipOptions.eligibleMemberships.${number}.credits.remaining` | `membershipOptions.eligibleMemberships.${number}.credits.balanceType` | `membershipOptions.invalidMemberships` | `membershipOptions.invalidMemberships.${number}.reason` | `membershipOptions.selectedMemberships` | `membershipOptions.selectedMemberships.${number}._id` | `membershipOptions.selectedMemberships.${number}.appId` | `additionalFees` | `additionalFees.${number}.name` | `additionalFees.${number}.price.amount` | `additionalFees.${number}.price.convertedAmount` | `additionalFees.${number}.price.formattedAmount` | `additionalFees.${number}.price.formattedConvertedAmount` | `additionalFees.${number}.taxDetails.taxRate` | `additionalFees.${number}.source` | `additionalFees.${number}.taxableAddress.addressType` | `violations` | `violations.${number}.severity` | `violations.${number}.target.other.name` | `violations.${number}.target.lineItem.name`, 6>>;
|
|
4506
4490
|
interface EstimateCurrentCartTotalsOptions {
|
|
4507
4491
|
/**
|
|
4508
4492
|
* Selected shipping option
|
|
@@ -2753,13 +2753,10 @@ interface V1Coupon extends V1CouponDiscountValueOneOf {
|
|
|
2753
2753
|
/**
|
|
2754
2754
|
* Percentage the coupon took off the price it applied to. For example, `10.5` for 10.5%.
|
|
2755
2755
|
*
|
|
2756
|
-
* The price it applied to depends on the applied discount's `discountType
|
|
2757
|
-
*
|
|
2758
|
-
* before
|
|
2759
|
-
*
|
|
2760
|
-
* On an entry supplied in the request's `appliedDiscounts` without `amount`, the discount is calculated
|
|
2761
|
-
* again at this percentage. An amount, when present, wins.
|
|
2762
|
-
* @internal
|
|
2756
|
+
* The price it applied to depends on the applied discount's `discountType`. For `SPECIFIC_ITEMS`, it's the
|
|
2757
|
+
* line items' price after the discounts applied before this one. For `GLOBAL`, it's the subtotal after the
|
|
2758
|
+
* line item discounts. An order discount applied before the coupon, such as an automatic discount on the
|
|
2759
|
+
* whole order, isn't taken off first.
|
|
2763
2760
|
* @format DECIMAL_VALUE
|
|
2764
2761
|
* @decimalValue options { gt:0, lte:100, maxScale:2 }
|
|
2765
2762
|
*/
|
|
@@ -2783,7 +2780,6 @@ interface V1Coupon extends V1CouponDiscountValueOneOf {
|
|
|
2783
2780
|
* the total amount the coupon took off, whatever the type.
|
|
2784
2781
|
*
|
|
2785
2782
|
* Not returned for a free-shipping coupon.
|
|
2786
|
-
* @internal
|
|
2787
2783
|
*/
|
|
2788
2784
|
discountValueType?: DiscountValueTypeWithLiterals;
|
|
2789
2785
|
}
|
|
@@ -2792,13 +2788,10 @@ interface V1CouponDiscountValueOneOf {
|
|
|
2792
2788
|
/**
|
|
2793
2789
|
* Percentage the coupon took off the price it applied to. For example, `10.5` for 10.5%.
|
|
2794
2790
|
*
|
|
2795
|
-
* The price it applied to depends on the applied discount's `discountType
|
|
2796
|
-
*
|
|
2797
|
-
* before
|
|
2798
|
-
*
|
|
2799
|
-
* On an entry supplied in the request's `appliedDiscounts` without `amount`, the discount is calculated
|
|
2800
|
-
* again at this percentage. An amount, when present, wins.
|
|
2801
|
-
* @internal
|
|
2791
|
+
* The price it applied to depends on the applied discount's `discountType`. For `SPECIFIC_ITEMS`, it's the
|
|
2792
|
+
* line items' price after the discounts applied before this one. For `GLOBAL`, it's the subtotal after the
|
|
2793
|
+
* line item discounts. An order discount applied before the coupon, such as an automatic discount on the
|
|
2794
|
+
* whole order, isn't taken off first.
|
|
2802
2795
|
* @format DECIMAL_VALUE
|
|
2803
2796
|
* @decimalValue options { gt:0, lte:100, maxScale:2 }
|
|
2804
2797
|
*/
|
|
@@ -2809,18 +2802,19 @@ declare enum DiscountValueType {
|
|
|
2809
2802
|
/**
|
|
2810
2803
|
* The discount takes a percentage off the price it applies to.
|
|
2811
2804
|
* @documentationMaturity preview
|
|
2812
|
-
* @internal
|
|
2813
2805
|
*/
|
|
2814
2806
|
PERCENTAGE = "PERCENTAGE",
|
|
2815
2807
|
/**
|
|
2816
2808
|
* The discount takes a fixed amount off the price it applies to.
|
|
2809
|
+
*
|
|
2810
|
+
* Also returned for a discount that sets a fixed price, for a buy X for an amount discount, and for a buy X
|
|
2811
|
+
* get Y coupon. For each of these, the coupon's or discount rule's `amount` holds what the discount took off.
|
|
2817
2812
|
* @documentationMaturity preview
|
|
2818
|
-
* @internal
|
|
2819
2813
|
*/
|
|
2820
2814
|
FIXED_AMOUNT = "FIXED_AMOUNT"
|
|
2821
2815
|
}
|
|
2822
2816
|
/** @enumType */
|
|
2823
|
-
type DiscountValueTypeWithLiterals = DiscountValueType;
|
|
2817
|
+
type DiscountValueTypeWithLiterals = DiscountValueType | 'PERCENTAGE' | 'FIXED_AMOUNT';
|
|
2824
2818
|
interface V1MerchantDiscount {
|
|
2825
2819
|
/** Discount value. */
|
|
2826
2820
|
amount?: MultiCurrencyPrice;
|
|
@@ -2838,10 +2832,6 @@ interface V1DiscountRule extends V1DiscountRuleDiscountValueOneOf {
|
|
|
2838
2832
|
* The price it applied to depends on the applied discount's `discountType`: the line items' price for
|
|
2839
2833
|
* `SPECIFIC_ITEMS`, the subtotal for `GLOBAL`. In each case it's the price after the discounts applied
|
|
2840
2834
|
* before this one.
|
|
2841
|
-
*
|
|
2842
|
-
* On an entry supplied in the request's `appliedDiscounts` without `amount`, the discount is calculated
|
|
2843
|
-
* again at this percentage. An amount, when present, wins.
|
|
2844
|
-
* @internal
|
|
2845
2835
|
* @format DECIMAL_VALUE
|
|
2846
2836
|
* @decimalValue options { gt:0, lte:100, maxScale:2 }
|
|
2847
2837
|
*/
|
|
@@ -2860,7 +2850,6 @@ interface V1DiscountRule extends V1DiscountRuleDiscountValueOneOf {
|
|
|
2860
2850
|
* `amount` holds the total amount the discount rule took off, whatever the type.
|
|
2861
2851
|
*
|
|
2862
2852
|
* Not returned for a free-shipping discount rule.
|
|
2863
|
-
* @internal
|
|
2864
2853
|
*/
|
|
2865
2854
|
discountValueType?: DiscountValueTypeWithLiterals;
|
|
2866
2855
|
}
|
|
@@ -2872,10 +2861,6 @@ interface V1DiscountRuleDiscountValueOneOf {
|
|
|
2872
2861
|
* The price it applied to depends on the applied discount's `discountType`: the line items' price for
|
|
2873
2862
|
* `SPECIFIC_ITEMS`, the subtotal for `GLOBAL`. In each case it's the price after the discounts applied
|
|
2874
2863
|
* before this one.
|
|
2875
|
-
*
|
|
2876
|
-
* On an entry supplied in the request's `appliedDiscounts` without `amount`, the discount is calculated
|
|
2877
|
-
* again at this percentage. An amount, when present, wins.
|
|
2878
|
-
* @internal
|
|
2879
2864
|
* @format DECIMAL_VALUE
|
|
2880
2865
|
* @decimalValue options { gt:0, lte:100, maxScale:2 }
|
|
2881
2866
|
*/
|
|
@@ -2907,7 +2892,6 @@ interface LineItemDiscount {
|
|
|
2907
2892
|
* Number of the line item's units the discount was applied to.
|
|
2908
2893
|
*
|
|
2909
2894
|
* Returned only for a `SPECIFIC_ITEMS` discount.
|
|
2910
|
-
* @internal
|
|
2911
2895
|
* @min 1
|
|
2912
2896
|
* @max 100000
|
|
2913
2897
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/auto_sdk_ecom_current-cart",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.209",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"fqdn": "wix.ecom.v1.cart"
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
|
-
"falconPackageHash": "
|
|
53
|
+
"falconPackageHash": "84523b655540906e65c4bba604d9a1e53a20455ed9640c6d50eb2191"
|
|
54
54
|
}
|