@wix/auto_sdk_ecom_cart-v-2 1.0.63 → 1.0.65

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 +28 -5
  2. package/build/cjs/index.js +138 -0
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +168 -3
  5. package/build/cjs/index.typings.js +129 -0
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +111 -2
  8. package/build/cjs/meta.js +87 -0
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +28 -5
  11. package/build/es/index.mjs +136 -0
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +168 -3
  14. package/build/es/index.typings.mjs +127 -0
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +111 -2
  17. package/build/es/meta.mjs +85 -0
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +28 -5
  20. package/build/internal/cjs/index.js +138 -0
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +168 -3
  23. package/build/internal/cjs/index.typings.js +129 -0
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +111 -2
  26. package/build/internal/cjs/meta.js +87 -0
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +28 -5
  29. package/build/internal/es/index.mjs +136 -0
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +168 -3
  32. package/build/internal/es/index.typings.mjs +127 -0
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +111 -2
  35. package/build/internal/es/meta.mjs +85 -0
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +2 -2
@@ -1654,7 +1654,22 @@ interface V2AdditionalFee {
1654
1654
  * @max 999
1655
1655
  */
1656
1656
  subscriptionCycles?: number | null;
1657
+ /** Additional fee's source. */
1658
+ source?: SourceWithLiterals;
1657
1659
  }
1660
+ declare enum Source {
1661
+ UNKNOWN_ADDITIONAL_FEE_SOURCE = "UNKNOWN_ADDITIONAL_FEE_SOURCE",
1662
+ /** The additional fee was added by an additional fee service plugin. */
1663
+ SERVICE_PLUGIN = "SERVICE_PLUGIN",
1664
+ /** The additional fee was added on the item either via the catalog or on custom line item. */
1665
+ LINE_ITEM = "LINE_ITEM",
1666
+ /** The additional fee was added by the delivery provider. */
1667
+ DELIVERY = "DELIVERY",
1668
+ /** The additional fee was added by a Wix vertical and represents a Wix platform fee. */
1669
+ PLATFORM = "PLATFORM"
1670
+ }
1671
+ /** @enumType */
1672
+ type SourceWithLiterals = Source | 'UNKNOWN_ADDITIONAL_FEE_SOURCE' | 'SERVICE_PLUGIN' | 'LINE_ITEM' | 'DELIVERY' | 'PLATFORM';
1658
1673
  interface V2TaxSummary {
1659
1674
  /**
1660
1675
  * List of taxes applied to the cart.
@@ -2604,6 +2619,46 @@ interface CalculateCurrentCartResponse {
2604
2619
  /** The calculation summary. */
2605
2620
  summary?: CartSummary;
2606
2621
  }
2622
+ interface EstimateCurrentCartRequest {
2623
+ /**
2624
+ * Whether to retrieve the latest item prices, discounts, and inventory data from the catalogs before estimating the cart.
2625
+ *
2626
+ * Default: `false`
2627
+ */
2628
+ refreshCart?: boolean;
2629
+ /**
2630
+ * Specifies the level of **business validation** to perform during cart calculation,
2631
+ * by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
2632
+ */
2633
+ validationConfig?: ValidationsConfigWithLiterals;
2634
+ /**
2635
+ * Whether to calculate delivery costs.
2636
+ * Default: false
2637
+ */
2638
+ calculateDelivery?: boolean;
2639
+ /**
2640
+ * Whether to calculate any additional fees.
2641
+ * Default: false
2642
+ */
2643
+ calculateAdditionalFees?: boolean;
2644
+ /**
2645
+ * Whether to include tax calculation.
2646
+ * Default: false
2647
+ */
2648
+ calculateTax?: boolean;
2649
+ /**
2650
+ * Whether to calculate the effect of gift card balances on the cart total.
2651
+ * Gift cards are not redeemed - only reflected for estimation purposes.
2652
+ * Default: false
2653
+ */
2654
+ calculateGiftCards?: boolean;
2655
+ }
2656
+ interface EstimateCurrentCartResponse {
2657
+ /** The Cart that was calculated. */
2658
+ cart?: Cart;
2659
+ /** The calculation summary. */
2660
+ summary?: CartSummary;
2661
+ }
2607
2662
  interface AddLineItemsToCurrentCartRequest {
2608
2663
  /**
2609
2664
  * A list of catalog items to add to the cart.
@@ -3011,6 +3066,51 @@ interface RefreshCartResponse {
3011
3066
  /** Synchronized Cart. */
3012
3067
  cart?: Cart;
3013
3068
  }
3069
+ interface EstimateCartRequest {
3070
+ /**
3071
+ * ID of the Cart to calculate.
3072
+ * @format GUID
3073
+ */
3074
+ cartId: string;
3075
+ /**
3076
+ * Whether to retrieve the latest item prices, discounts, and inventory data from the catalogs before estimating the cart.
3077
+ *
3078
+ * Default: `false`
3079
+ */
3080
+ refreshCart?: boolean;
3081
+ /**
3082
+ * Specifies the level of **business validation** to perform during cart calculation,
3083
+ * by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
3084
+ */
3085
+ validationConfig?: ValidationsConfigWithLiterals;
3086
+ /**
3087
+ * Whether to calculate delivery costs.
3088
+ * Default: false
3089
+ */
3090
+ calculateDelivery?: boolean;
3091
+ /**
3092
+ * Whether to calculate any additional fees.
3093
+ * Default: false
3094
+ */
3095
+ calculateAdditionalFees?: boolean;
3096
+ /**
3097
+ * Whether to include tax calculation.
3098
+ * Default: false
3099
+ */
3100
+ calculateTax?: boolean;
3101
+ /**
3102
+ * Whether to calculate the effect of gift card balances on the cart total.
3103
+ * Gift cards are not redeemed - only reflected for estimation purposes.
3104
+ * Default: false
3105
+ */
3106
+ calculateGiftCards?: boolean;
3107
+ }
3108
+ interface EstimateCartResponse {
3109
+ /** The Cart that was calculated. */
3110
+ cart?: Cart;
3111
+ /** The calculation summary. */
3112
+ summary?: CartSummary;
3113
+ }
3014
3114
  interface CalculateCartRequest {
3015
3115
  /**
3016
3116
  * ID of the Cart to calculate.
@@ -4640,6 +4740,12 @@ type RefreshCartApplicationErrors = {
4640
4740
  data?: CartAlreadyOrderedErrorData;
4641
4741
  };
4642
4742
  /** @docsIgnore */
4743
+ type EstimateCartApplicationErrors = {
4744
+ code?: 'CART_ALREADY_ORDERED';
4745
+ description?: string;
4746
+ data?: CartAlreadyOrderedErrorData;
4747
+ };
4748
+ /** @docsIgnore */
4643
4749
  type CalculateCartApplicationErrors = {
4644
4750
  code?: 'CART_ALREADY_ORDERED';
4645
4751
  description?: string;
@@ -5170,10 +5276,69 @@ declare function deleteCart(cartId: string): Promise<void>;
5170
5276
  declare function refreshCart(cartId: string): Promise<NonNullablePaths<RefreshCartResponse, `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`, 7> & {
5171
5277
  __applicationErrorsType?: RefreshCartApplicationErrors;
5172
5278
  }>;
5279
+ /**
5280
+ * Estimates the cart totals based on its current state and the selected
5281
+ * calculation components.
5282
+ *
5283
+ * This API provides a partial, component-based estimation of the cart and is
5284
+ * intended for preview purposes (e.g. showing partial estimated totals).
5285
+ *
5286
+ * The estimation is controlled by boolean flags that indicate which components
5287
+ * should be included (delivery costs, additional fees, taxes, gift cards).
5288
+ * Components that are not explicitly enabled are excluded from the calculation.
5289
+ *
5290
+ * This is NOT a full cart calculation.
5291
+ *
5292
+ * Note that line items discounts are already pre-computed and applied to the Cart.
5293
+ * @param cartId - ID of the Cart to calculate.
5294
+ * @public
5295
+ * @documentationMaturity preview
5296
+ * @requiredField cartId
5297
+ * @permissionId ecom:v2:cart:estimate_cart
5298
+ * @applicableIdentity APP
5299
+ * @fqn wix.ecom.cart.v2.CartService.EstimateCart
5300
+ */
5301
+ declare function estimateCart(cartId: string, options?: EstimateCartOptions): Promise<NonNullablePaths<EstimateCartResponse, `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.additionalFees.${number}.source` | `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> & {
5302
+ __applicationErrorsType?: EstimateCartApplicationErrors;
5303
+ }>;
5304
+ interface EstimateCartOptions {
5305
+ /**
5306
+ * Whether to retrieve the latest item prices, discounts, and inventory data from the catalogs before estimating the cart.
5307
+ *
5308
+ * Default: `false`
5309
+ */
5310
+ refreshCart?: boolean;
5311
+ /**
5312
+ * Specifies the level of **business validation** to perform during cart calculation,
5313
+ * by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
5314
+ */
5315
+ validationConfig?: ValidationsConfigWithLiterals;
5316
+ /**
5317
+ * Whether to calculate delivery costs.
5318
+ * Default: false
5319
+ */
5320
+ calculateDelivery?: boolean;
5321
+ /**
5322
+ * Whether to calculate any additional fees.
5323
+ * Default: false
5324
+ */
5325
+ calculateAdditionalFees?: boolean;
5326
+ /**
5327
+ * Whether to include tax calculation.
5328
+ * Default: false
5329
+ */
5330
+ calculateTax?: boolean;
5331
+ /**
5332
+ * Whether to calculate the effect of gift card balances on the cart total.
5333
+ * Gift cards are not redeemed - only reflected for estimation purposes.
5334
+ * Default: false
5335
+ */
5336
+ calculateGiftCards?: boolean;
5337
+ }
5173
5338
  /**
5174
5339
  * Calculates the cart based on its current state (line items, discounts, delivery method, etc.)
5175
5340
  * and returns a detailed summary including subtotal, delivery costs, taxes, fees and the total price.
5176
- * Note that discounts are already pre-computed and applied to the Cart.
5341
+ * Note that line items discounts are already pre-computed and applied to the Cart.
5177
5342
  * @param cartId - ID of the Cart to calculate.
5178
5343
  * @public
5179
5344
  * @documentationMaturity preview
@@ -5182,7 +5347,7 @@ declare function refreshCart(cartId: string): Promise<NonNullablePaths<RefreshCa
5182
5347
  * @applicableIdentity APP
5183
5348
  * @fqn wix.ecom.cart.v2.CartService.CalculateCart
5184
5349
  */
5185
- declare function calculateCart(cartId: string, options?: CalculateCartOptions): Promise<NonNullablePaths<CalculateCartResponse, `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> & {
5350
+ declare function calculateCart(cartId: string, options?: CalculateCartOptions): Promise<NonNullablePaths<CalculateCartResponse, `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.additionalFees.${number}.source` | `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> & {
5186
5351
  __applicationErrorsType?: CalculateCartApplicationErrors;
5187
5352
  }>;
5188
5353
  interface CalculateCartOptions {
@@ -5471,4 +5636,4 @@ interface UpdateFormSubmissionsOptions {
5471
5636
  formSubmissions?: FormSubmission[];
5472
5637
  }
5473
5638
 
5474
- export { type ActionEvent, type AddCouponApplicationErrors, type AddCouponRequest, type AddCouponResponse, type AddCouponToCurrentCartRequest, type AddCouponToCurrentCartResponse, type AddGiftCardApplicationErrors, type AddGiftCardRequest, type AddGiftCardResponse, type AddGiftCardToCurrentCartRequest, type AddGiftCardToCurrentCartResponse, type AddLineItemsApplicationErrors, type AddLineItemsOptions, type AddLineItemsRequest, type AddLineItemsResponse, 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 CalculateCartApplicationErrors, type CalculateCartForV1Request, type CalculateCartForV1Response, type CalculateCartOptions, type CalculateCartRequest, type CalculateCartResponse, 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 CreateCartApplicationErrors, type CreateCartOptions, type CreateCartRequest, type CreateCartResponse, 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 GetCheckoutUrlApplicationErrors, type GetCheckoutUrlOptions, 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 MarkCartAsCompletedOptions, 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 PlaceOrderApplicationErrors, type PlaceOrderOptions, 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 RefreshCartApplicationErrors, type RefreshCartRequest, type RefreshCartResponse, type RefreshCurrentCartRequest, type RefreshCurrentCartResponse, type Region, type RemoveCouponApplicationErrors, type RemoveCouponFromCurrentCartRequest, type RemoveCouponFromCurrentCartResponse, type RemoveCouponRequest, type RemoveCouponResponse, type RemoveGiftCardApplicationErrors, type RemoveGiftCardFromCurrentCartRequest, type RemoveGiftCardFromCurrentCartResponse, type RemoveGiftCardRequest, type RemoveGiftCardResponse, type RemoveLineItemsApplicationErrors, 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 SetDeliveryMethodApplicationErrors, 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 UpdateCart, type UpdateCartApplicationErrors, type UpdateCartRequest, type UpdateCartResponse, type UpdateCurrentCartRequest, type UpdateCurrentCartResponse, type UpdateFormSubmissionsInCurrentCartRequest, type UpdateFormSubmissionsInCurrentCartResponse, type UpdateFormSubmissionsOptions, type UpdateFormSubmissionsRequest, type UpdateFormSubmissionsResponse, type UpdateLineItemsApplicationErrors, type UpdateLineItemsInCurrentCartRequest, type UpdateLineItemsInCurrentCartResponse, type UpdateLineItemsOptions, 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, addCoupon, addGiftCard, addLineItems, calculateCart, createCart, deleteCart, getCart, getCheckoutUrl, handleAsyncCheckoutCompletion, markCartAsCompleted, placeOrder, refreshCart, removeCoupon, removeGiftCard, removeLineItems, setDeliveryMethod, updateCart, updateFormSubmissions, updateLineItems };
5639
+ export { type ActionEvent, type AddCouponApplicationErrors, type AddCouponRequest, type AddCouponResponse, type AddCouponToCurrentCartRequest, type AddCouponToCurrentCartResponse, type AddGiftCardApplicationErrors, type AddGiftCardRequest, type AddGiftCardResponse, type AddGiftCardToCurrentCartRequest, type AddGiftCardToCurrentCartResponse, type AddLineItemsApplicationErrors, type AddLineItemsOptions, type AddLineItemsRequest, type AddLineItemsResponse, 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 CalculateCartApplicationErrors, type CalculateCartForV1Request, type CalculateCartForV1Response, type CalculateCartOptions, type CalculateCartRequest, type CalculateCartResponse, 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 CreateCartApplicationErrors, type CreateCartOptions, type CreateCartRequest, type CreateCartResponse, 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 EstimateCartApplicationErrors, type EstimateCartOptions, type EstimateCartRequest, type EstimateCartResponse, 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 GetCheckoutUrlApplicationErrors, type GetCheckoutUrlOptions, 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 MarkCartAsCompletedOptions, 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 PlaceOrderApplicationErrors, type PlaceOrderOptions, 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 RefreshCartApplicationErrors, type RefreshCartRequest, type RefreshCartResponse, type RefreshCurrentCartRequest, type RefreshCurrentCartResponse, type Region, type RemoveCouponApplicationErrors, type RemoveCouponFromCurrentCartRequest, type RemoveCouponFromCurrentCartResponse, type RemoveCouponRequest, type RemoveCouponResponse, type RemoveGiftCardApplicationErrors, type RemoveGiftCardFromCurrentCartRequest, type RemoveGiftCardFromCurrentCartResponse, type RemoveGiftCardRequest, type RemoveGiftCardResponse, type RemoveLineItemsApplicationErrors, 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 SetDeliveryMethodApplicationErrors, type SetDeliveryMethodForCurrentCartRequest, type SetDeliveryMethodForCurrentCartResponse, type SetDeliveryMethodRequest, type SetDeliveryMethodResponse, Severity, type SeverityWithLiterals, type ShippingInformation, type ShippingOption, type ShippingPrice, type ShippingRegion, type SomeLineItemsOutOfStockErrorData, Source, type SourceWithLiterals, 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 UpdateCart, type UpdateCartApplicationErrors, type UpdateCartRequest, type UpdateCartResponse, type UpdateCurrentCartRequest, type UpdateCurrentCartResponse, type UpdateFormSubmissionsInCurrentCartRequest, type UpdateFormSubmissionsInCurrentCartResponse, type UpdateFormSubmissionsOptions, type UpdateFormSubmissionsRequest, type UpdateFormSubmissionsResponse, type UpdateLineItemsApplicationErrors, type UpdateLineItemsInCurrentCartRequest, type UpdateLineItemsInCurrentCartResponse, type UpdateLineItemsOptions, 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, addCoupon, addGiftCard, addLineItems, calculateCart, createCart, deleteCart, estimateCart, getCart, getCheckoutUrl, handleAsyncCheckoutCompletion, markCartAsCompleted, placeOrder, refreshCart, removeCoupon, removeGiftCard, removeLineItems, setDeliveryMethod, updateCart, updateFormSubmissions, updateLineItems };
@@ -45,6 +45,7 @@ __export(index_typings_exports, {
45
45
  RateType: () => RateType,
46
46
  RuleType: () => RuleType,
47
47
  Severity: () => Severity,
48
+ Source: () => Source,
48
49
  SubscriptionFrequency: () => SubscriptionFrequency,
49
50
  SuggestedFix: () => SuggestedFix,
50
51
  TaxableAddressType: () => TaxableAddressType,
@@ -58,6 +59,7 @@ __export(index_typings_exports, {
58
59
  calculateCart: () => calculateCart2,
59
60
  createCart: () => createCart2,
60
61
  deleteCart: () => deleteCart2,
62
+ estimateCart: () => estimateCart2,
61
63
  getCart: () => getCart2,
62
64
  getCheckoutUrl: () => getCheckoutUrl2,
63
65
  handleAsyncCheckoutCompletion: () => handleAsyncCheckoutCompletion2,
@@ -494,6 +496,63 @@ function refreshCart(payload) {
494
496
  }
495
497
  return __refreshCart;
496
498
  }
499
+ function estimateCart(payload) {
500
+ function __estimateCart({ host }) {
501
+ const metadata = {
502
+ entityFqdn: "wix.ecom.v2.cart",
503
+ method: "POST",
504
+ methodFqn: "wix.ecom.cart.v2.CartService.EstimateCart",
505
+ packageName: PACKAGE_NAME,
506
+ migrationOptions: {
507
+ optInTransformResponse: true
508
+ },
509
+ url: resolveWixEcomCartV2CartServiceUrl({
510
+ protoPath: "/v2/carts/{cartId}/estimate",
511
+ data: payload,
512
+ host
513
+ }),
514
+ data: payload,
515
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
516
+ {
517
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
518
+ paths: [
519
+ { path: "cart.createdDate" },
520
+ { path: "cart.updatedDate" },
521
+ {
522
+ path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
523
+ },
524
+ { path: "cart.lineItems.attributes.image.urlExpirationDate" },
525
+ {
526
+ path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
527
+ },
528
+ {
529
+ path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
530
+ },
531
+ { path: "cart.lineItems.attributes.serviceProperties.endDate" },
532
+ {
533
+ path: "summary.paymentSummary.subscriptionCharges.charges.cycleBillingDate"
534
+ }
535
+ ]
536
+ },
537
+ {
538
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
539
+ paths: [
540
+ {
541
+ path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
542
+ },
543
+ { path: "cart.lineItems.attributes.physicalProperties.weight" },
544
+ { path: "cart.deliveryInfo.address.geocode.latitude" },
545
+ { path: "cart.deliveryInfo.address.geocode.longitude" },
546
+ { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
547
+ { path: "cart.paymentInfo.billingAddress.geocode.longitude" }
548
+ ]
549
+ }
550
+ ])
551
+ };
552
+ return metadata;
553
+ }
554
+ return __estimateCart;
555
+ }
497
556
  function calculateCart(payload) {
498
557
  function __calculateCart({ host }) {
499
558
  const metadata = {
@@ -1294,6 +1353,14 @@ var DiscountScope = /* @__PURE__ */ ((DiscountScope2) => {
1294
1353
  DiscountScope2["DELIVERY"] = "DELIVERY";
1295
1354
  return DiscountScope2;
1296
1355
  })(DiscountScope || {});
1356
+ var Source = /* @__PURE__ */ ((Source2) => {
1357
+ Source2["UNKNOWN_ADDITIONAL_FEE_SOURCE"] = "UNKNOWN_ADDITIONAL_FEE_SOURCE";
1358
+ Source2["SERVICE_PLUGIN"] = "SERVICE_PLUGIN";
1359
+ Source2["LINE_ITEM"] = "LINE_ITEM";
1360
+ Source2["DELIVERY"] = "DELIVERY";
1361
+ Source2["PLATFORM"] = "PLATFORM";
1362
+ return Source2;
1363
+ })(Source || {});
1297
1364
  var RuleType = /* @__PURE__ */ ((RuleType2) => {
1298
1365
  RuleType2["VALIDATION"] = "VALIDATION";
1299
1366
  RuleType2["OTHER"] = "OTHER";
@@ -1702,6 +1769,66 @@ async function refreshCart2(cartId) {
1702
1769
  throw transformedError;
1703
1770
  }
1704
1771
  }
1772
+ async function estimateCart2(cartId, options) {
1773
+ const { httpClient, sideEffects } = arguments[2];
1774
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1775
+ cartId,
1776
+ refreshCart: options?.refreshCart,
1777
+ validationConfig: options?.validationConfig,
1778
+ calculateDelivery: options?.calculateDelivery,
1779
+ calculateAdditionalFees: options?.calculateAdditionalFees,
1780
+ calculateTax: options?.calculateTax,
1781
+ calculateGiftCards: options?.calculateGiftCards
1782
+ });
1783
+ const reqOpts = estimateCart(payload);
1784
+ sideEffects?.onSiteCall?.();
1785
+ try {
1786
+ const result = await httpClient.request(reqOpts);
1787
+ sideEffects?.onSuccess?.(result);
1788
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1789
+ (0, import_transform_paths2.transformPaths)(result.data, [
1790
+ {
1791
+ transformFn: import_image2.transformRESTImageToSDKImage,
1792
+ paths: [
1793
+ { path: "cart.lineItems.source.catalogOverrideFields.image" },
1794
+ { path: "cart.lineItems.attributes.image" }
1795
+ ]
1796
+ },
1797
+ {
1798
+ transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
1799
+ paths: [{ path: "cart.lineItems.attributes.url" }]
1800
+ },
1801
+ {
1802
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
1803
+ paths: [
1804
+ { path: "cart.deliveryInfo.address" },
1805
+ { path: "cart.paymentInfo.billingAddress" }
1806
+ ]
1807
+ }
1808
+ ])
1809
+ );
1810
+ } catch (err) {
1811
+ const transformedError = (0, import_transform_error.transformError)(
1812
+ err,
1813
+ {
1814
+ spreadPathsToArguments: {},
1815
+ explicitPathsToArguments: {
1816
+ cartId: "$[0]",
1817
+ refreshCart: "$[1].refreshCart",
1818
+ validationConfig: "$[1].validationConfig",
1819
+ calculateDelivery: "$[1].calculateDelivery",
1820
+ calculateAdditionalFees: "$[1].calculateAdditionalFees",
1821
+ calculateTax: "$[1].calculateTax",
1822
+ calculateGiftCards: "$[1].calculateGiftCards"
1823
+ },
1824
+ singleArgumentUnchanged: false
1825
+ },
1826
+ ["cartId", "options"]
1827
+ );
1828
+ sideEffects?.onError?.(err);
1829
+ throw transformedError;
1830
+ }
1831
+ }
1705
1832
  async function calculateCart2(cartId, options) {
1706
1833
  const { httpClient, sideEffects } = arguments[2];
1707
1834
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
@@ -2368,6 +2495,7 @@ async function updateFormSubmissions2(cartId, options) {
2368
2495
  RateType,
2369
2496
  RuleType,
2370
2497
  Severity,
2498
+ Source,
2371
2499
  SubscriptionFrequency,
2372
2500
  SuggestedFix,
2373
2501
  TaxableAddressType,
@@ -2381,6 +2509,7 @@ async function updateFormSubmissions2(cartId, options) {
2381
2509
  calculateCart,
2382
2510
  createCart,
2383
2511
  deleteCart,
2512
+ estimateCart,
2384
2513
  getCart,
2385
2514
  getCheckoutUrl,
2386
2515
  handleAsyncCheckoutCompletion,