@wix/auto_sdk_ecom_current-cart-v-2 1.0.62 → 1.0.64

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.
Files changed (37) hide show
  1. package/build/cjs/index.d.ts +25 -3
  2. package/build/cjs/index.js +125 -0
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +178 -1
  5. package/build/cjs/index.typings.js +117 -0
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +123 -2
  8. package/build/cjs/meta.js +77 -0
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +25 -3
  11. package/build/es/index.mjs +124 -0
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +178 -1
  14. package/build/es/index.typings.mjs +116 -0
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +123 -2
  17. package/build/es/meta.mjs +76 -0
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +25 -3
  20. package/build/internal/cjs/index.js +125 -0
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +188 -1
  23. package/build/internal/cjs/index.typings.js +117 -0
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +123 -2
  26. package/build/internal/cjs/meta.js +77 -0
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +25 -3
  29. package/build/internal/es/index.mjs +124 -0
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +188 -1
  32. package/build/internal/es/index.typings.mjs +116 -0
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +123 -2
  35. package/build/internal/es/meta.mjs +76 -0
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +2 -2
@@ -2604,6 +2604,46 @@ interface CalculateCurrentCartResponse {
2604
2604
  /** The calculation summary. */
2605
2605
  summary?: CartSummary;
2606
2606
  }
2607
+ interface EstimateCurrentCartRequest {
2608
+ /**
2609
+ * Whether to retrieve the latest item prices, discounts, and inventory data from the catalogs before estimating the cart.
2610
+ *
2611
+ * Default: `false`
2612
+ */
2613
+ refreshCart?: boolean;
2614
+ /**
2615
+ * Specifies the level of **business validation** to perform during cart calculation,
2616
+ * by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
2617
+ */
2618
+ validationConfig?: ValidationsConfigWithLiterals;
2619
+ /**
2620
+ * Whether to calculate delivery costs.
2621
+ * Default: false
2622
+ */
2623
+ calculateDelivery?: boolean;
2624
+ /**
2625
+ * Whether to calculate any additional fees.
2626
+ * Default: false
2627
+ */
2628
+ calculateAdditionalFees?: boolean;
2629
+ /**
2630
+ * Whether to include tax calculation.
2631
+ * Default: false
2632
+ */
2633
+ calculateTax?: boolean;
2634
+ /**
2635
+ * Whether to calculate the effect of gift card balances on the cart total.
2636
+ * Gift cards are not redeemed - only reflected for estimation purposes.
2637
+ * Default: false
2638
+ */
2639
+ calculateGiftCards?: boolean;
2640
+ }
2641
+ interface EstimateCurrentCartResponse {
2642
+ /** The Cart that was calculated. */
2643
+ cart?: Cart;
2644
+ /** The calculation summary. */
2645
+ summary?: CartSummary;
2646
+ }
2607
2647
  interface AddLineItemsToCurrentCartRequest {
2608
2648
  /**
2609
2649
  * A list of catalog items to add to the cart.
@@ -3011,6 +3051,51 @@ interface RefreshCartResponse {
3011
3051
  /** Synchronized Cart. */
3012
3052
  cart?: Cart;
3013
3053
  }
3054
+ interface EstimateCartRequest {
3055
+ /**
3056
+ * ID of the Cart to calculate.
3057
+ * @format GUID
3058
+ */
3059
+ cartId?: string;
3060
+ /**
3061
+ * Whether to retrieve the latest item prices, discounts, and inventory data from the catalogs before estimating the cart.
3062
+ *
3063
+ * Default: `false`
3064
+ */
3065
+ refreshCart?: boolean;
3066
+ /**
3067
+ * Specifies the level of **business validation** to perform during cart calculation,
3068
+ * by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
3069
+ */
3070
+ validationConfig?: ValidationsConfigWithLiterals;
3071
+ /**
3072
+ * Whether to calculate delivery costs.
3073
+ * Default: false
3074
+ */
3075
+ calculateDelivery?: boolean;
3076
+ /**
3077
+ * Whether to calculate any additional fees.
3078
+ * Default: false
3079
+ */
3080
+ calculateAdditionalFees?: boolean;
3081
+ /**
3082
+ * Whether to include tax calculation.
3083
+ * Default: false
3084
+ */
3085
+ calculateTax?: boolean;
3086
+ /**
3087
+ * Whether to calculate the effect of gift card balances on the cart total.
3088
+ * Gift cards are not redeemed - only reflected for estimation purposes.
3089
+ * Default: false
3090
+ */
3091
+ calculateGiftCards?: boolean;
3092
+ }
3093
+ interface EstimateCartResponse {
3094
+ /** The Cart that was calculated. */
3095
+ cart?: Cart;
3096
+ /** The calculation summary. */
3097
+ summary?: CartSummary;
3098
+ }
3014
3099
  interface CalculateCartRequest {
3015
3100
  /**
3016
3101
  * ID of the Cart to calculate.
@@ -3880,6 +3965,16 @@ interface DiscountRule {
3880
3965
  name?: DiscountRuleName;
3881
3966
  /** Discount value. */
3882
3967
  amount?: MultiCurrencyPrice;
3968
+ /**
3969
+ * A list of item combinations for this discount rule.
3970
+ * Each entry represents a unique combination of line items that triggered
3971
+ * or received this discount, along with how many times that combination was applied together.
3972
+ * Relevant ONLY for BXGY and Quantity-based promotions.
3973
+ * In BXGY the combination will contain the "X" items with discount amount of 0.
3974
+ * @internal
3975
+ * @maxSize 1000
3976
+ */
3977
+ itemCombinations?: ItemCombination[];
3883
3978
  }
3884
3979
  interface DiscountRuleName {
3885
3980
  /**
@@ -3895,6 +3990,35 @@ interface DiscountRuleName {
3895
3990
  */
3896
3991
  translated?: string | null;
3897
3992
  }
3993
+ interface ItemCombination {
3994
+ /**
3995
+ * The number of times this exact combination of items (with the specified quantities) was applied together in the order.
3996
+ * @min 1
3997
+ * @max 100000
3998
+ */
3999
+ count?: number;
4000
+ /**
4001
+ * Line items that participated together in this combination.
4002
+ * @minSize 1
4003
+ * @maxSize 100
4004
+ */
4005
+ lineItems?: ItemCombinationLineItem[];
4006
+ }
4007
+ interface ItemCombinationLineItem {
4008
+ /**
4009
+ * The unique ID of the line item to which this discount applies.
4010
+ * @format GUID
4011
+ */
4012
+ lineItemId?: string;
4013
+ /** Total discount amount for all units (quantity) of this line item in this combination. */
4014
+ discountAmount?: MultiCurrencyPrice;
4015
+ /**
4016
+ * Number of units from this line item that participated in a single combination.
4017
+ * @min 1
4018
+ * @max 100000
4019
+ */
4020
+ quantity?: number;
4021
+ }
3898
4022
  interface LineItemDiscount {
3899
4023
  /**
3900
4024
  * ID of line item the discount applies to.
@@ -4607,6 +4731,12 @@ type CalculateCurrentCartApplicationErrors = {
4607
4731
  data?: CartAlreadyOrderedErrorData;
4608
4732
  };
4609
4733
  /** @docsIgnore */
4734
+ type EstimateCurrentCartApplicationErrors = {
4735
+ code?: 'CART_ALREADY_ORDERED';
4736
+ description?: string;
4737
+ data?: CartAlreadyOrderedErrorData;
4738
+ };
4739
+ /** @docsIgnore */
4610
4740
  type AddLineItemsToCurrentCartApplicationErrors = {
4611
4741
  code?: 'ITEM_NOT_FOUND_IN_CATALOG';
4612
4742
  description?: string;
@@ -4943,6 +5073,63 @@ interface CalculateCurrentCartOptions {
4943
5073
  */
4944
5074
  customCalculationConfig?: CalculationConfig;
4945
5075
  }
5076
+ /**
5077
+ * Estimates the cart totals based on its current state and the selected
5078
+ * calculation components.
5079
+ *
5080
+ * This API provides a partial, component-based estimation of the cart and is
5081
+ * intended for preview purposes (e.g. showing partial estimated totals).
5082
+ *
5083
+ * The estimation is controlled by boolean flags that indicate which components
5084
+ * should be included (delivery costs, additional fees, taxes, gift cards).
5085
+ * Components that are not explicitly enabled are excluded from the calculation.
5086
+ *
5087
+ * This is NOT a full cart calculation.
5088
+ *
5089
+ * Note that line items discounts are already pre-computed and applied to the Cart.
5090
+ * @public
5091
+ * @documentationMaturity preview
5092
+ * @permissionId ecom:v2:cart:estimate_cart
5093
+ * @applicableIdentity APP
5094
+ * @fqn wix.ecom.cart.v2.CurrentCartService.EstimateCurrentCart
5095
+ */
5096
+ declare function estimateCurrentCart(options?: EstimateCurrentCartOptions): Promise<NonNullablePaths<EstimateCurrentCartResponse, `cart._id` | `cart.revision` | `cart.lineItems` | `cart.lineItems.${number}._id` | `cart.lineItems.${number}.name.original` | `cart.lineItems.${number}.quantityInfo.confirmedQuantity` | `cart.lineItems.${number}.quantityInfo.requestedQuantity` | `cart.lineItems.${number}.quantityInfo.fixedQuantity` | `cart.lineItems.${number}.pricing.unitPrice.amount` | `cart.lineItems.${number}.pricing.unitPrice.convertedAmount` | `cart.lineItems.${number}.pricing.priceDescription.original` | `cart.lineItems.${number}.pricing.priceUndetermined` | `cart.lineItems.${number}.source.catalogReference.catalogItemId` | `cart.lineItems.${number}.source.catalogReference.appId` | `cart.lineItems.${number}.attributes.itemType.preset` | `cart.lineItems.${number}.attributes.itemType.custom` | `cart.lineItems.${number}.attributes.physicalProperties.shippable` | `cart.lineItems.${number}.attributes.membersOnly` | `cart.lineItems.${number}.taxConfig.taxableAddress.addressType` | `cart.lineItems.${number}.paymentConfig.savePaymentMethod` | `cart.lineItems.${number}.paymentConfig.selectedMembership._id` | `cart.lineItems.${number}.paymentConfig.selectedMembership.appId` | `cart.lineItems.${number}.paymentConfig.paymentOption` | `cart.lineItems.${number}.status` | `cart.lineItems.${number}.customLineItem` | `cart.coupons` | `cart.coupons.${number}._id` | `cart.coupons.${number}.code` | `cart.source.channelType` | `cart.source.externalReferences` | `cart.source.externalReferences.${number}.appId` | `cart.source.createdBy.visitorId` | `cart.source.createdBy.memberId` | `cart.source.createdBy.userId` | `cart.source.createdBy.appId` | `cart.source.customContentReference.appId` | `cart.source.customContentReference.componentId` | `cart.businessInfo.languageCode` | `cart.businessInfo.currencyCode` | `cart.customerInfo.visitorId` | `cart.customerInfo.memberId` | `cart.customerInfo.userId` | `cart.customerInfo.vatId._id` | `cart.customerInfo.vatId.type` | `cart.customerInfo.languageCode` | `cart.customerInfo.currencyCode` | `cart.deliveryInfo.address.streetAddress.number` | `cart.deliveryInfo.address.streetAddress.name` | `cart.deliveryInfo.method.code` | `cart.deliveryInfo.method.pickup` | `cart.deliveryInfo.weightUnit` | `cart.taxInfo.pricesIncludeTax` | `cart.paymentInfo.giftCards` | `cart.paymentInfo.giftCards.${number}._id` | `cart.paymentInfo.giftCards.${number}.obfuscatedCode` | `cart.paymentInfo.giftCards.${number}.appId` | `cart.paymentInfo.currencyCode` | `cart.orderPlaced` | `cart.currentCart` | `summary.cartId` | `summary.cartRevision` | `summary.calculationId` | `summary.lineItems` | `summary.lineItems.${number}.lineItemId` | `summary.lineItems.${number}.quantity` | `summary.lineItems.${number}.unitPrice.amount` | `summary.lineItems.${number}.unitPrice.convertedAmount` | `summary.discounts` | `summary.discounts.${number}.name.original` | `summary.discounts.${number}.source.sourceType` | `summary.discounts.${number}.scope` | `summary.deliverySummary.method.code` | `summary.deliverySummary.method.pickup` | `summary.additionalFees` | `summary.taxSummary.taxes` | `summary.taxSummary.pricesIncludeTax` | `summary.taxSummary.lineItemTaxes` | `summary.taxSummary.lineItemTaxes.${number}.lineItemId` | `summary.taxSummary.additionalFeeTaxes` | `summary.taxSummary.additionalFeeTaxes.${number}.additionalFeeCode` | `summary.paymentSummary.giftCards` | `summary.paymentSummary.giftCards.${number}.giftCardId` | `summary.paymentSummary.memberships` | `summary.paymentSummary.memberships.${number}._id` | `summary.paymentSummary.memberships.${number}.appId` | `summary.paymentSummary.subscriptionCharges` | `summary.paymentSummary.requiresPaymentAfterGiftCard` | `summary.calculationErrors.generalShippingCalculationError.applicationError.code` | `summary.calculationErrors.generalShippingCalculationError.applicationError.description` | `summary.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `summary.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `summary.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `summary.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `summary.calculationErrors.carrierErrors.errors` | `summary.calculationErrors.carrierErrors.errors.${number}.carrierId` | `summary.calculationErrors.orderValidationErrors` | `summary.spiViolations` | `summary.spiViolations.${number}.severity` | `summary.spiViolations.${number}.target.other.name` | `summary.spiViolations.${number}.target.lineItem.name`, 8> & {
5097
+ __applicationErrorsType?: EstimateCurrentCartApplicationErrors;
5098
+ }>;
5099
+ interface EstimateCurrentCartOptions {
5100
+ /**
5101
+ * Whether to retrieve the latest item prices, discounts, and inventory data from the catalogs before estimating the cart.
5102
+ *
5103
+ * Default: `false`
5104
+ */
5105
+ refreshCart?: boolean;
5106
+ /**
5107
+ * Specifies the level of **business validation** to perform during cart calculation,
5108
+ * by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
5109
+ */
5110
+ validationConfig?: ValidationsConfigWithLiterals;
5111
+ /**
5112
+ * Whether to calculate delivery costs.
5113
+ * Default: false
5114
+ */
5115
+ calculateDelivery?: boolean;
5116
+ /**
5117
+ * Whether to calculate any additional fees.
5118
+ * Default: false
5119
+ */
5120
+ calculateAdditionalFees?: boolean;
5121
+ /**
5122
+ * Whether to include tax calculation.
5123
+ * Default: false
5124
+ */
5125
+ calculateTax?: boolean;
5126
+ /**
5127
+ * Whether to calculate the effect of gift card balances on the cart total.
5128
+ * Gift cards are not redeemed - only reflected for estimation purposes.
5129
+ * Default: false
5130
+ */
5131
+ calculateGiftCards?: boolean;
5132
+ }
4946
5133
  /**
4947
5134
  * Adds line items to the Cart.
4948
5135
  * If a Current Cart is not already existing, it will be created.
@@ -5101,4 +5288,4 @@ interface UpdateFormSubmissionsInCurrentCartOptions {
5101
5288
  formSubmissions?: FormSubmission[];
5102
5289
  }
5103
5290
 
5104
- export { type ActionEvent, type AddCouponRequest, type AddCouponResponse, type AddCouponToCurrentCartApplicationErrors, type AddCouponToCurrentCartRequest, type AddCouponToCurrentCartResponse, type AddGiftCardRequest, type AddGiftCardResponse, type AddGiftCardToCurrentCartApplicationErrors, type AddGiftCardToCurrentCartRequest, type AddGiftCardToCurrentCartResponse, type AddLineItemsRequest, type AddLineItemsResponse, type AddLineItemsToCurrentCartApplicationErrors, type AddLineItemsToCurrentCartOptions, type AddLineItemsToCurrentCartRequest, type AddLineItemsToCurrentCartResponse, type AdditionalFee, AdditionalFeeSource, type AdditionalFeeSourceWithLiterals, type AdditionalFeeTax, type Address, type AddressLocation, type AggregatedTaxBreakdown, type AllLineItemsOutOfStockErrorData, type ApplicableLineItems, type ApplicationError, type AppliedDiscount, type AppliedDiscountDiscountSourceOneOf, type AutoTaxFallbackCalculationDetails, BalanceType, type BalanceTypeWithLiterals, type BusinessInfo, type CalculateCartForV1Request, type CalculateCartForV1Response, type CalculateCartRequest, type CalculateCartResponse, type CalculateCurrentCartApplicationErrors, type CalculateCurrentCartOptions, type CalculateCurrentCartRequest, type CalculateCurrentCartResponse, type CalculateTotalsResponse, type CalculatedItemModifier, type CalculatedLineItem, type CalculatedPlatformFee, type CalculationConfig, type CalculationErrors, type CalculationErrorsShippingCalculationErrorOneOf, type CalculationOverrides, type Carrier, type CarrierError, type CarrierErrors, type CarrierServiceOption, type Cart, type CartAlreadyOrderedErrorData, type CartSettings, type CartSource, type CartSummary, type CatalogItemInput, type CatalogOverrideFields, type CatalogReference, ChannelType, type ChannelTypeWithLiterals, type Charge, ChargeType, type ChargeTypeWithLiterals, CheckoutStage, type CheckoutStageWithLiterals, type Color, type ConvertedMoney, type Coupon, type CouponAdded, type CouponAlreadyExistsErrorData, type CouponInput, type CouponNotFoundInCartErrorData, type CouponRemoved, type CreateCartRequest, type CreateCartResponse, type CreateCurrentCartApplicationErrors, type CreateCurrentCartOptions, type CreateCurrentCartRequest, type CreateCurrentCartResponse, type CreatedBy, type CreatedByIdOneOf, type CustomContentReference, type CustomField, type CustomItemAttributes, type CustomItemDeliveryConfig, type CustomItemInput, type CustomItemPaymentConfig, type CustomItemPricingInfo, type CustomItemQuantityInfo, type CustomItemSource, type CustomItemTaxConfig, type CustomerInfo, type CustomerInfoIdOneOf, type DeleteCartRequest, type DeleteCartResponse, type DeleteCurrentCartRequest, type DeleteCurrentCartResponse, type DeliveryAllocation, type DeliveryInfo, type DeliveryLogistics, type DeliveryMethod, type DeliveryMethodInput, type DeliveryMethodNotFoundErrorData, type DeliverySummary, type DeliveryTimeSlot, type Description, type DescriptionLine, type DescriptionLineDescriptionLineValueOneOf, type DescriptionLineName, DescriptionLineType, type DescriptionLineTypeWithLiterals, type DescriptionLineValueOneOf, type Details, type DetailsKindOneOf, type Discount, type DiscountBenefit, type DiscountBenefitValueOneOf, type DiscountRule, type DiscountRuleName, DiscountScope, type DiscountScopeWithLiterals, type DiscountSource, DiscountSourceType, type DiscountSourceTypeWithLiterals, DiscountType, type DiscountTypeWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type DuplicateItemModifierIdsErrorData, type DuplicateLineItemUpdatesErrorData, type DuplicateModifierGroupIdsErrorData, type Empty, type EmptyLineItemUpdatesErrorData, type EmptyPaymentTokenErrorData, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ExtendedFields, type ExternalReference, FallbackReason, type FallbackReasonWithLiterals, type FieldViolation, FileType, type FileTypeWithLiterals, type FixedQuantityItemErrorData, type FormIdentifier, type FormInfo, type FormSubmission, type FreeTrialPeriod, type FullAddressContactDetails, type GetCartRequest, type GetCartResponse, type GetCheckoutURLRequest, type GetCheckoutURLResponse, type GetCurrentCartRequest, type GetCurrentCartResponse, type GiftCard, type GiftCardAdded, type GiftCardAlreadyExistsErrorData, type GiftCardInput, type GiftCardNotFoundInCartErrorData, type GiftCardRedeemErrorData, type GiftCardRemoved, type GiftCardSummary, type Group, type HandleAsyncCheckoutCompletionRequest, type HeadersEntry, type IdentificationData, type IdentificationDataIdOneOf, type InsufficientInventoryEntry, type InsufficientInventoryErrorData, type InvalidCouponCodeErrorData, InvalidCouponReason, type InvalidCouponReasonWithLiterals, type InvalidCouponStatusErrorData, type InvalidCouponStatusErrorDataDetailsOneOf, type InvalidGiftCardCodeErrorData, InvalidGiftCardReason, type InvalidGiftCardReasonWithLiterals, type InvalidGiftCardStatusErrorData, type InvalidMembership, type InvalidMembershipEntry, type InvalidMembershipErrorData, type InvalidMembershipPaymentOptionErrorData, type InvalidPaymentStatusErrorData, type InvalidPriceVerificationTokenErrorData, type InvalidThirdPartyCheckoutTokenErrorData, type ItemAttributes, type ItemDeliveryConfig, type ItemDiscount, type ItemModifier, type ItemNotFoundInCatalogErrorData, type ItemPaymentConfig, type ItemPriceBreakdown, type ItemPricingInfo, type ItemQuantityInfo, type ItemSource, ItemStatus, type ItemStatusWithLiterals, type ItemTaxConfig, type ItemTaxFullDetails, type ItemType, type ItemTypeItemTypeDataOneOf, ItemTypePreset, type ItemTypePresetWithLiterals, JurisdictionType, type JurisdictionTypeWithLiterals, type LegacyFields, type LineItem, type LineItemAdded, type LineItemDiscount, type LineItemIdentifier, type LineItemIdentifierIdOneOf, type LineItemNotFoundInCartErrorData, type LineItemPriceConflictErrorData, type LineItemPricesData, type LineItemSummary, type LineItemTax, type LineItemUpdate, ManualCalculationReason, type ManualCalculationReasonWithLiterals, type MarkCartAsCompletedRequest, type MarkCartAsCompletedResponse, type MaxItemModifiersExceededErrorData, type MaxLineItemsExceededErrorData, type MembersOnlyItemErrorData, type Membership, type MembershipName, type MembershipOptions, type MembershipPaymentCredits, type MerchantDiscount, type MessageEnvelope, type MinLineItemQuantityNotReachedDetails, type MinSubtotalNotReachedDetails, type ModifierGroup, type MultiCurrencyPrice, NameInLineItem, type NameInLineItemWithLiterals, NameInOther, type NameInOtherWithLiterals, type Other, type OtherCharge, type PaymentInfo, type PaymentOption, PaymentOptionType, type PaymentOptionTypeWithLiterals, type PaymentSummary, type PhysicalProperties, type PickupDetails, PickupMethod, type PickupMethodWithLiterals, type PlaceOrderRequest, type PlaceOrderResponse, type PlainTextValue, PlatformFeeChargeType, type PlatformFeeChargeTypeWithLiterals, type PlatformFeeSummary, type Policy, type PriceDescription, type PriceSummary, type QuantityUpdate, RateType, type RateTypeWithLiterals, type RawHttpResponse, type RedirectUrls, type RefreshCartRequest, type RefreshCartResponse, type RefreshCurrentCartApplicationErrors, type RefreshCurrentCartRequest, type RefreshCurrentCartResponse, type Region, type RemoveCouponFromCurrentCartApplicationErrors, type RemoveCouponFromCurrentCartRequest, type RemoveCouponFromCurrentCartResponse, type RemoveCouponRequest, type RemoveCouponResponse, type RemoveGiftCardFromCurrentCartApplicationErrors, type RemoveGiftCardFromCurrentCartRequest, type RemoveGiftCardFromCurrentCartResponse, type RemoveGiftCardRequest, type RemoveGiftCardResponse, type RemoveLineItemsFromCurrentCartApplicationErrors, type RemoveLineItemsFromCurrentCartRequest, type RemoveLineItemsFromCurrentCartResponse, type RemoveLineItemsRequest, type RemoveLineItemsResponse, type RestoreInfo, RuleType, type RuleTypeWithLiterals, type Scope, type SecuredMedia, type SelectedCarrierServiceOption, type SelectedCarrierServiceOptionOtherCharge, type SelectedCarrierServiceOptionPrices, type SelectedMembership, type SelectedMembershipUpdate, type SelectedMemberships, type ServiceProperties, type SetDeliveryMethodForCurrentCartApplicationErrors, type SetDeliveryMethodForCurrentCartRequest, type SetDeliveryMethodForCurrentCartResponse, type SetDeliveryMethodRequest, type SetDeliveryMethodResponse, Severity, type SeverityWithLiterals, type ShippingInformation, type ShippingOption, type ShippingPrice, type ShippingRegion, type SomeLineItemsOutOfStockErrorData, type Stage, type StageStagesOneOf, type StreetAddress, type SubscriptionCharges, SubscriptionFrequency, type SubscriptionFrequencyWithLiterals, type SubscriptionOptionInfo, type SubscriptionSettings, SuggestedFix, type SuggestedFixWithLiterals, type SystemError, type Target, type TargetTargetTypeOneOf, type Tax, type TaxBreakdown, type TaxCalculationDetails, type TaxCalculationDetailsCalculationDetailsOneOf, type TaxDetails, type TaxInfo, type TaxRateBreakdown, type TaxSummary, type TaxableAddress, type TaxableAddressTaxableAddressDataOneOf, TaxableAddressType, type TaxableAddressTypeWithLiterals, type Title, type TranslatableString, type UnmarkAsCurrentCartRequest, type UnmarkAsCurrentCartResponse, type UpdateCartRequest, type UpdateCartResponse, type UpdateCurrentCartApplicationErrors, type UpdateCurrentCartRequest, type UpdateCurrentCartResponse, type UpdateFormSubmissionsInCurrentCartOptions, type UpdateFormSubmissionsInCurrentCartRequest, type UpdateFormSubmissionsInCurrentCartResponse, type UpdateFormSubmissionsRequest, type UpdateFormSubmissionsResponse, type UpdateLineItemsInCurrentCartApplicationErrors, type UpdateLineItemsInCurrentCartOptions, type UpdateLineItemsInCurrentCartRequest, type UpdateLineItemsInCurrentCartResponse, type UpdateLineItemsRequest, type UpdateLineItemsResponse, type V1AdditionalFee, type V2AdditionalFee, type V2CalculationErrors, type V2CalculationErrorsShippingCalculationErrorOneOf, type V2CarrierError, type V2CarrierErrors, type V2Coupon, type V2GiftCard, type V2LineItem, type V2Membership, type V2PriceSummary, type V2SelectedMembership, type V2TaxSummary, type ValidationError, ValidationsConfig, type ValidationsConfigWithLiterals, type VatId, VatType, type VatTypeWithLiterals, type Violation, type ViolationWithErrorSeverityErrorData, type ViolationsList, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, WeightUnit, type WeightUnitWithLiterals, addCouponToCurrentCart, addGiftCardToCurrentCart, addLineItemsToCurrentCart, calculateCurrentCart, createCurrentCart, deleteCurrentCart, getCurrentCart, refreshCurrentCart, removeCouponFromCurrentCart, removeGiftCardFromCurrentCart, removeLineItemsFromCurrentCart, setDeliveryMethodForCurrentCart, updateCurrentCart, updateFormSubmissionsInCurrentCart, updateLineItemsInCurrentCart };
5291
+ export { type ActionEvent, type AddCouponRequest, type AddCouponResponse, type AddCouponToCurrentCartApplicationErrors, type AddCouponToCurrentCartRequest, type AddCouponToCurrentCartResponse, type AddGiftCardRequest, type AddGiftCardResponse, type AddGiftCardToCurrentCartApplicationErrors, type AddGiftCardToCurrentCartRequest, type AddGiftCardToCurrentCartResponse, type AddLineItemsRequest, type AddLineItemsResponse, type AddLineItemsToCurrentCartApplicationErrors, type AddLineItemsToCurrentCartOptions, type AddLineItemsToCurrentCartRequest, type AddLineItemsToCurrentCartResponse, type AdditionalFee, AdditionalFeeSource, type AdditionalFeeSourceWithLiterals, type AdditionalFeeTax, type Address, type AddressLocation, type AggregatedTaxBreakdown, type AllLineItemsOutOfStockErrorData, type ApplicableLineItems, type ApplicationError, type AppliedDiscount, type AppliedDiscountDiscountSourceOneOf, type AutoTaxFallbackCalculationDetails, BalanceType, type BalanceTypeWithLiterals, type BusinessInfo, type CalculateCartForV1Request, type CalculateCartForV1Response, type CalculateCartRequest, type CalculateCartResponse, type CalculateCurrentCartApplicationErrors, type CalculateCurrentCartOptions, type CalculateCurrentCartRequest, type CalculateCurrentCartResponse, type CalculateTotalsResponse, type CalculatedItemModifier, type CalculatedLineItem, type CalculatedPlatformFee, type CalculationConfig, type CalculationErrors, type CalculationErrorsShippingCalculationErrorOneOf, type CalculationOverrides, type Carrier, type CarrierError, type CarrierErrors, type CarrierServiceOption, type Cart, type CartAlreadyOrderedErrorData, type CartSettings, type CartSource, type CartSummary, type CatalogItemInput, type CatalogOverrideFields, type CatalogReference, ChannelType, type ChannelTypeWithLiterals, type Charge, ChargeType, type ChargeTypeWithLiterals, CheckoutStage, type CheckoutStageWithLiterals, type Color, type ConvertedMoney, type Coupon, type CouponAdded, type CouponAlreadyExistsErrorData, type CouponInput, type CouponNotFoundInCartErrorData, type CouponRemoved, type CreateCartRequest, type CreateCartResponse, type CreateCurrentCartApplicationErrors, type CreateCurrentCartOptions, type CreateCurrentCartRequest, type CreateCurrentCartResponse, type CreatedBy, type CreatedByIdOneOf, type CustomContentReference, type CustomField, type CustomItemAttributes, type CustomItemDeliveryConfig, type CustomItemInput, type CustomItemPaymentConfig, type CustomItemPricingInfo, type CustomItemQuantityInfo, type CustomItemSource, type CustomItemTaxConfig, type CustomerInfo, type CustomerInfoIdOneOf, type DeleteCartRequest, type DeleteCartResponse, type DeleteCurrentCartRequest, type DeleteCurrentCartResponse, type DeliveryAllocation, type DeliveryInfo, type DeliveryLogistics, type DeliveryMethod, type DeliveryMethodInput, type DeliveryMethodNotFoundErrorData, type DeliverySummary, type DeliveryTimeSlot, type Description, type DescriptionLine, type DescriptionLineDescriptionLineValueOneOf, type DescriptionLineName, DescriptionLineType, type DescriptionLineTypeWithLiterals, type DescriptionLineValueOneOf, type Details, type DetailsKindOneOf, type Discount, type DiscountBenefit, type DiscountBenefitValueOneOf, type DiscountRule, type DiscountRuleName, DiscountScope, type DiscountScopeWithLiterals, type DiscountSource, DiscountSourceType, type DiscountSourceTypeWithLiterals, DiscountType, type DiscountTypeWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type DuplicateItemModifierIdsErrorData, type DuplicateLineItemUpdatesErrorData, type DuplicateModifierGroupIdsErrorData, type Empty, type EmptyLineItemUpdatesErrorData, type EmptyPaymentTokenErrorData, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EstimateCartRequest, type EstimateCartResponse, type EstimateCurrentCartApplicationErrors, type EstimateCurrentCartOptions, type EstimateCurrentCartRequest, type EstimateCurrentCartResponse, type ExtendedFields, type ExternalReference, FallbackReason, type FallbackReasonWithLiterals, type FieldViolation, FileType, type FileTypeWithLiterals, type FixedQuantityItemErrorData, type FormIdentifier, type FormInfo, type FormSubmission, type FreeTrialPeriod, type FullAddressContactDetails, type GetCartRequest, type GetCartResponse, type GetCheckoutURLRequest, type GetCheckoutURLResponse, type GetCurrentCartRequest, type GetCurrentCartResponse, type GiftCard, type GiftCardAdded, type GiftCardAlreadyExistsErrorData, type GiftCardInput, type GiftCardNotFoundInCartErrorData, type GiftCardRedeemErrorData, type GiftCardRemoved, type GiftCardSummary, type Group, type HandleAsyncCheckoutCompletionRequest, type HeadersEntry, type IdentificationData, type IdentificationDataIdOneOf, type InsufficientInventoryEntry, type InsufficientInventoryErrorData, type InvalidCouponCodeErrorData, InvalidCouponReason, type InvalidCouponReasonWithLiterals, type InvalidCouponStatusErrorData, type InvalidCouponStatusErrorDataDetailsOneOf, type InvalidGiftCardCodeErrorData, InvalidGiftCardReason, type InvalidGiftCardReasonWithLiterals, type InvalidGiftCardStatusErrorData, type InvalidMembership, type InvalidMembershipEntry, type InvalidMembershipErrorData, type InvalidMembershipPaymentOptionErrorData, type InvalidPaymentStatusErrorData, type InvalidPriceVerificationTokenErrorData, type InvalidThirdPartyCheckoutTokenErrorData, type ItemAttributes, type ItemCombination, type ItemCombinationLineItem, type ItemDeliveryConfig, type ItemDiscount, type ItemModifier, type ItemNotFoundInCatalogErrorData, type ItemPaymentConfig, type ItemPriceBreakdown, type ItemPricingInfo, type ItemQuantityInfo, type ItemSource, ItemStatus, type ItemStatusWithLiterals, type ItemTaxConfig, type ItemTaxFullDetails, type ItemType, type ItemTypeItemTypeDataOneOf, ItemTypePreset, type ItemTypePresetWithLiterals, JurisdictionType, type JurisdictionTypeWithLiterals, type LegacyFields, type LineItem, type LineItemAdded, type LineItemDiscount, type LineItemIdentifier, type LineItemIdentifierIdOneOf, type LineItemNotFoundInCartErrorData, type LineItemPriceConflictErrorData, type LineItemPricesData, type LineItemSummary, type LineItemTax, type LineItemUpdate, ManualCalculationReason, type ManualCalculationReasonWithLiterals, type MarkCartAsCompletedRequest, type MarkCartAsCompletedResponse, type MaxItemModifiersExceededErrorData, type MaxLineItemsExceededErrorData, type MembersOnlyItemErrorData, type Membership, type MembershipName, type MembershipOptions, type MembershipPaymentCredits, type MerchantDiscount, type MessageEnvelope, type MinLineItemQuantityNotReachedDetails, type MinSubtotalNotReachedDetails, type ModifierGroup, type MultiCurrencyPrice, NameInLineItem, type NameInLineItemWithLiterals, NameInOther, type NameInOtherWithLiterals, type Other, type OtherCharge, type PaymentInfo, type PaymentOption, PaymentOptionType, type PaymentOptionTypeWithLiterals, type PaymentSummary, type PhysicalProperties, type PickupDetails, PickupMethod, type PickupMethodWithLiterals, type PlaceOrderRequest, type PlaceOrderResponse, type PlainTextValue, PlatformFeeChargeType, type PlatformFeeChargeTypeWithLiterals, type PlatformFeeSummary, type Policy, type PriceDescription, type PriceSummary, type QuantityUpdate, RateType, type RateTypeWithLiterals, type RawHttpResponse, type RedirectUrls, type RefreshCartRequest, type RefreshCartResponse, type RefreshCurrentCartApplicationErrors, type RefreshCurrentCartRequest, type RefreshCurrentCartResponse, type Region, type RemoveCouponFromCurrentCartApplicationErrors, type RemoveCouponFromCurrentCartRequest, type RemoveCouponFromCurrentCartResponse, type RemoveCouponRequest, type RemoveCouponResponse, type RemoveGiftCardFromCurrentCartApplicationErrors, type RemoveGiftCardFromCurrentCartRequest, type RemoveGiftCardFromCurrentCartResponse, type RemoveGiftCardRequest, type RemoveGiftCardResponse, type RemoveLineItemsFromCurrentCartApplicationErrors, type RemoveLineItemsFromCurrentCartRequest, type RemoveLineItemsFromCurrentCartResponse, type RemoveLineItemsRequest, type RemoveLineItemsResponse, type RestoreInfo, RuleType, type RuleTypeWithLiterals, type Scope, type SecuredMedia, type SelectedCarrierServiceOption, type SelectedCarrierServiceOptionOtherCharge, type SelectedCarrierServiceOptionPrices, type SelectedMembership, type SelectedMembershipUpdate, type SelectedMemberships, type ServiceProperties, type SetDeliveryMethodForCurrentCartApplicationErrors, type SetDeliveryMethodForCurrentCartRequest, type SetDeliveryMethodForCurrentCartResponse, type SetDeliveryMethodRequest, type SetDeliveryMethodResponse, Severity, type SeverityWithLiterals, type ShippingInformation, type ShippingOption, type ShippingPrice, type ShippingRegion, type SomeLineItemsOutOfStockErrorData, type Stage, type StageStagesOneOf, type StreetAddress, type SubscriptionCharges, SubscriptionFrequency, type SubscriptionFrequencyWithLiterals, type SubscriptionOptionInfo, type SubscriptionSettings, SuggestedFix, type SuggestedFixWithLiterals, type SystemError, type Target, type TargetTargetTypeOneOf, type Tax, type TaxBreakdown, type TaxCalculationDetails, type TaxCalculationDetailsCalculationDetailsOneOf, type TaxDetails, type TaxInfo, type TaxRateBreakdown, type TaxSummary, type TaxableAddress, type TaxableAddressTaxableAddressDataOneOf, TaxableAddressType, type TaxableAddressTypeWithLiterals, type Title, type TranslatableString, type UnmarkAsCurrentCartRequest, type UnmarkAsCurrentCartResponse, type UpdateCartRequest, type UpdateCartResponse, type UpdateCurrentCartApplicationErrors, type UpdateCurrentCartRequest, type UpdateCurrentCartResponse, type UpdateFormSubmissionsInCurrentCartOptions, type UpdateFormSubmissionsInCurrentCartRequest, type UpdateFormSubmissionsInCurrentCartResponse, type UpdateFormSubmissionsRequest, type UpdateFormSubmissionsResponse, type UpdateLineItemsInCurrentCartApplicationErrors, type UpdateLineItemsInCurrentCartOptions, type UpdateLineItemsInCurrentCartRequest, type UpdateLineItemsInCurrentCartResponse, type UpdateLineItemsRequest, type UpdateLineItemsResponse, type V1AdditionalFee, type V2AdditionalFee, type V2CalculationErrors, type V2CalculationErrorsShippingCalculationErrorOneOf, type V2CarrierError, type V2CarrierErrors, type V2Coupon, type V2GiftCard, type V2LineItem, type V2Membership, type V2PriceSummary, type V2SelectedMembership, type V2TaxSummary, type ValidationError, ValidationsConfig, type ValidationsConfigWithLiterals, type VatId, VatType, type VatTypeWithLiterals, type Violation, type ViolationWithErrorSeverityErrorData, type ViolationsList, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, WeightUnit, type WeightUnitWithLiterals, addCouponToCurrentCart, addGiftCardToCurrentCart, addLineItemsToCurrentCart, calculateCurrentCart, createCurrentCart, deleteCurrentCart, estimateCurrentCart, getCurrentCart, refreshCurrentCart, removeCouponFromCurrentCart, removeGiftCardFromCurrentCart, removeLineItemsFromCurrentCart, setDeliveryMethodForCurrentCart, updateCurrentCart, updateFormSubmissionsInCurrentCart, updateLineItemsInCurrentCart };
@@ -58,6 +58,7 @@ __export(index_typings_exports, {
58
58
  calculateCurrentCart: () => calculateCurrentCart2,
59
59
  createCurrentCart: () => createCurrentCart2,
60
60
  deleteCurrentCart: () => deleteCurrentCart2,
61
+ estimateCurrentCart: () => estimateCurrentCart2,
61
62
  getCurrentCart: () => getCurrentCart2,
62
63
  refreshCurrentCart: () => refreshCurrentCart2,
63
64
  removeCouponFromCurrentCart: () => removeCouponFromCurrentCart2,
@@ -546,6 +547,63 @@ function calculateCurrentCart(payload) {
546
547
  }
547
548
  return __calculateCurrentCart;
548
549
  }
550
+ function estimateCurrentCart(payload) {
551
+ function __estimateCurrentCart({ host }) {
552
+ const metadata = {
553
+ entityFqdn: "wix.ecom.v2.cart",
554
+ method: "POST",
555
+ methodFqn: "wix.ecom.cart.v2.CurrentCartService.EstimateCurrentCart",
556
+ packageName: PACKAGE_NAME,
557
+ migrationOptions: {
558
+ optInTransformResponse: true
559
+ },
560
+ url: resolveWixEcomCartV2CurrentCartServiceUrl({
561
+ protoPath: "/v2/carts/current/estimate",
562
+ data: payload,
563
+ host
564
+ }),
565
+ data: payload,
566
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
567
+ {
568
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
569
+ paths: [
570
+ { path: "cart.createdDate" },
571
+ { path: "cart.updatedDate" },
572
+ {
573
+ path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
574
+ },
575
+ { path: "cart.lineItems.attributes.image.urlExpirationDate" },
576
+ {
577
+ path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
578
+ },
579
+ {
580
+ path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
581
+ },
582
+ { path: "cart.lineItems.attributes.serviceProperties.endDate" },
583
+ {
584
+ path: "summary.paymentSummary.subscriptionCharges.charges.cycleBillingDate"
585
+ }
586
+ ]
587
+ },
588
+ {
589
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
590
+ paths: [
591
+ {
592
+ path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
593
+ },
594
+ { path: "cart.lineItems.attributes.physicalProperties.weight" },
595
+ { path: "cart.deliveryInfo.address.geocode.latitude" },
596
+ { path: "cart.deliveryInfo.address.geocode.longitude" },
597
+ { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
598
+ { path: "cart.paymentInfo.billingAddress.geocode.longitude" }
599
+ ]
600
+ }
601
+ ])
602
+ };
603
+ return metadata;
604
+ }
605
+ return __estimateCurrentCart;
606
+ }
549
607
  function addLineItemsToCurrentCart(payload) {
550
608
  function __addLineItemsToCurrentCart({ host }) {
551
609
  const serializedData = (0, import_transform_paths.transformPaths)(payload, [
@@ -1626,6 +1684,64 @@ async function calculateCurrentCart2(options) {
1626
1684
  throw transformedError;
1627
1685
  }
1628
1686
  }
1687
+ async function estimateCurrentCart2(options) {
1688
+ const { httpClient, sideEffects } = arguments[1];
1689
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1690
+ refreshCart: options?.refreshCart,
1691
+ validationConfig: options?.validationConfig,
1692
+ calculateDelivery: options?.calculateDelivery,
1693
+ calculateAdditionalFees: options?.calculateAdditionalFees,
1694
+ calculateTax: options?.calculateTax,
1695
+ calculateGiftCards: options?.calculateGiftCards
1696
+ });
1697
+ const reqOpts = estimateCurrentCart(payload);
1698
+ sideEffects?.onSiteCall?.();
1699
+ try {
1700
+ const result = await httpClient.request(reqOpts);
1701
+ sideEffects?.onSuccess?.(result);
1702
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1703
+ (0, import_transform_paths2.transformPaths)(result.data, [
1704
+ {
1705
+ transformFn: import_image2.transformRESTImageToSDKImage,
1706
+ paths: [
1707
+ { path: "cart.lineItems.source.catalogOverrideFields.image" },
1708
+ { path: "cart.lineItems.attributes.image" }
1709
+ ]
1710
+ },
1711
+ {
1712
+ transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
1713
+ paths: [{ path: "cart.lineItems.attributes.url" }]
1714
+ },
1715
+ {
1716
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
1717
+ paths: [
1718
+ { path: "cart.deliveryInfo.address" },
1719
+ { path: "cart.paymentInfo.billingAddress" }
1720
+ ]
1721
+ }
1722
+ ])
1723
+ );
1724
+ } catch (err) {
1725
+ const transformedError = (0, import_transform_error.transformError)(
1726
+ err,
1727
+ {
1728
+ spreadPathsToArguments: {},
1729
+ explicitPathsToArguments: {
1730
+ refreshCart: "$[0].refreshCart",
1731
+ validationConfig: "$[0].validationConfig",
1732
+ calculateDelivery: "$[0].calculateDelivery",
1733
+ calculateAdditionalFees: "$[0].calculateAdditionalFees",
1734
+ calculateTax: "$[0].calculateTax",
1735
+ calculateGiftCards: "$[0].calculateGiftCards"
1736
+ },
1737
+ singleArgumentUnchanged: false
1738
+ },
1739
+ ["options"]
1740
+ );
1741
+ sideEffects?.onError?.(err);
1742
+ throw transformedError;
1743
+ }
1744
+ }
1629
1745
  async function addLineItemsToCurrentCart2(options) {
1630
1746
  const { httpClient, sideEffects } = arguments[1];
1631
1747
  const payload = (0, import_transform_paths2.transformPaths)(
@@ -2093,6 +2209,7 @@ async function updateFormSubmissionsInCurrentCart2(options) {
2093
2209
  calculateCurrentCart,
2094
2210
  createCurrentCart,
2095
2211
  deleteCurrentCart,
2212
+ estimateCurrentCart,
2096
2213
  getCurrentCart,
2097
2214
  refreshCurrentCart,
2098
2215
  removeCouponFromCurrentCart,