@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
@@ -1620,7 +1620,22 @@ interface V2AdditionalFee {
1620
1620
  * @max 999
1621
1621
  */
1622
1622
  subscriptionCycles?: number | null;
1623
+ /** Additional fee's source. */
1624
+ source?: SourceWithLiterals;
1623
1625
  }
1626
+ declare enum Source {
1627
+ UNKNOWN_ADDITIONAL_FEE_SOURCE = "UNKNOWN_ADDITIONAL_FEE_SOURCE",
1628
+ /** The additional fee was added by an additional fee service plugin. */
1629
+ SERVICE_PLUGIN = "SERVICE_PLUGIN",
1630
+ /** The additional fee was added on the item either via the catalog or on custom line item. */
1631
+ LINE_ITEM = "LINE_ITEM",
1632
+ /** The additional fee was added by the delivery provider. */
1633
+ DELIVERY = "DELIVERY",
1634
+ /** The additional fee was added by a Wix vertical and represents a Wix platform fee. */
1635
+ PLATFORM = "PLATFORM"
1636
+ }
1637
+ /** @enumType */
1638
+ type SourceWithLiterals = Source | 'UNKNOWN_ADDITIONAL_FEE_SOURCE' | 'SERVICE_PLUGIN' | 'LINE_ITEM' | 'DELIVERY' | 'PLATFORM';
1624
1639
  interface V2TaxSummary {
1625
1640
  /**
1626
1641
  * List of taxes applied to the cart.
@@ -2565,6 +2580,46 @@ interface CalculateCurrentCartResponse {
2565
2580
  /** The calculation summary. */
2566
2581
  summary?: CartSummary;
2567
2582
  }
2583
+ interface EstimateCurrentCartRequest {
2584
+ /**
2585
+ * Whether to retrieve the latest item prices, discounts, and inventory data from the catalogs before estimating the cart.
2586
+ *
2587
+ * Default: `false`
2588
+ */
2589
+ refreshCart?: boolean;
2590
+ /**
2591
+ * Specifies the level of **business validation** to perform during cart calculation,
2592
+ * by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
2593
+ */
2594
+ validationConfig?: ValidationsConfigWithLiterals;
2595
+ /**
2596
+ * Whether to calculate delivery costs.
2597
+ * Default: false
2598
+ */
2599
+ calculateDelivery?: boolean;
2600
+ /**
2601
+ * Whether to calculate any additional fees.
2602
+ * Default: false
2603
+ */
2604
+ calculateAdditionalFees?: boolean;
2605
+ /**
2606
+ * Whether to include tax calculation.
2607
+ * Default: false
2608
+ */
2609
+ calculateTax?: boolean;
2610
+ /**
2611
+ * Whether to calculate the effect of gift card balances on the cart total.
2612
+ * Gift cards are not redeemed - only reflected for estimation purposes.
2613
+ * Default: false
2614
+ */
2615
+ calculateGiftCards?: boolean;
2616
+ }
2617
+ interface EstimateCurrentCartResponse {
2618
+ /** The Cart that was calculated. */
2619
+ cart?: Cart;
2620
+ /** The calculation summary. */
2621
+ summary?: CartSummary;
2622
+ }
2568
2623
  interface AddLineItemsToCurrentCartRequest {
2569
2624
  /**
2570
2625
  * A list of catalog items to add to the cart.
@@ -2972,6 +3027,51 @@ interface RefreshCartResponse {
2972
3027
  /** Synchronized Cart. */
2973
3028
  cart?: Cart;
2974
3029
  }
3030
+ interface EstimateCartRequest {
3031
+ /**
3032
+ * ID of the Cart to calculate.
3033
+ * @format GUID
3034
+ */
3035
+ cartId: string;
3036
+ /**
3037
+ * Whether to retrieve the latest item prices, discounts, and inventory data from the catalogs before estimating the cart.
3038
+ *
3039
+ * Default: `false`
3040
+ */
3041
+ refreshCart?: boolean;
3042
+ /**
3043
+ * Specifies the level of **business validation** to perform during cart calculation,
3044
+ * by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
3045
+ */
3046
+ validationConfig?: ValidationsConfigWithLiterals;
3047
+ /**
3048
+ * Whether to calculate delivery costs.
3049
+ * Default: false
3050
+ */
3051
+ calculateDelivery?: boolean;
3052
+ /**
3053
+ * Whether to calculate any additional fees.
3054
+ * Default: false
3055
+ */
3056
+ calculateAdditionalFees?: boolean;
3057
+ /**
3058
+ * Whether to include tax calculation.
3059
+ * Default: false
3060
+ */
3061
+ calculateTax?: boolean;
3062
+ /**
3063
+ * Whether to calculate the effect of gift card balances on the cart total.
3064
+ * Gift cards are not redeemed - only reflected for estimation purposes.
3065
+ * Default: false
3066
+ */
3067
+ calculateGiftCards?: boolean;
3068
+ }
3069
+ interface EstimateCartResponse {
3070
+ /** The Cart that was calculated. */
3071
+ cart?: Cart;
3072
+ /** The calculation summary. */
3073
+ summary?: CartSummary;
3074
+ }
2975
3075
  interface CalculateCartRequest {
2976
3076
  /**
2977
3077
  * ID of the Cart to calculate.
@@ -4516,6 +4616,12 @@ type RefreshCartApplicationErrors = {
4516
4616
  data?: CartAlreadyOrderedErrorData;
4517
4617
  };
4518
4618
  /** @docsIgnore */
4619
+ type EstimateCartApplicationErrors = {
4620
+ code?: 'CART_ALREADY_ORDERED';
4621
+ description?: string;
4622
+ data?: CartAlreadyOrderedErrorData;
4623
+ };
4624
+ /** @docsIgnore */
4519
4625
  type CalculateCartApplicationErrors = {
4520
4626
  code?: 'CART_ALREADY_ORDERED';
4521
4627
  description?: string;
@@ -5039,10 +5145,69 @@ declare function deleteCart(cartId: string): Promise<void>;
5039
5145
  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> & {
5040
5146
  __applicationErrorsType?: RefreshCartApplicationErrors;
5041
5147
  }>;
5148
+ /**
5149
+ * Estimates the cart totals based on its current state and the selected
5150
+ * calculation components.
5151
+ *
5152
+ * This API provides a partial, component-based estimation of the cart and is
5153
+ * intended for preview purposes (e.g. showing partial estimated totals).
5154
+ *
5155
+ * The estimation is controlled by boolean flags that indicate which components
5156
+ * should be included (delivery costs, additional fees, taxes, gift cards).
5157
+ * Components that are not explicitly enabled are excluded from the calculation.
5158
+ *
5159
+ * This is NOT a full cart calculation.
5160
+ *
5161
+ * Note that line items discounts are already pre-computed and applied to the Cart.
5162
+ * @param cartId - ID of the Cart to calculate.
5163
+ * @public
5164
+ * @documentationMaturity preview
5165
+ * @requiredField cartId
5166
+ * @permissionId ecom:v2:cart:estimate_cart
5167
+ * @applicableIdentity APP
5168
+ * @fqn wix.ecom.cart.v2.CartService.EstimateCart
5169
+ */
5170
+ 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> & {
5171
+ __applicationErrorsType?: EstimateCartApplicationErrors;
5172
+ }>;
5173
+ interface EstimateCartOptions {
5174
+ /**
5175
+ * Whether to retrieve the latest item prices, discounts, and inventory data from the catalogs before estimating the cart.
5176
+ *
5177
+ * Default: `false`
5178
+ */
5179
+ refreshCart?: boolean;
5180
+ /**
5181
+ * Specifies the level of **business validation** to perform during cart calculation,
5182
+ * by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
5183
+ */
5184
+ validationConfig?: ValidationsConfigWithLiterals;
5185
+ /**
5186
+ * Whether to calculate delivery costs.
5187
+ * Default: false
5188
+ */
5189
+ calculateDelivery?: boolean;
5190
+ /**
5191
+ * Whether to calculate any additional fees.
5192
+ * Default: false
5193
+ */
5194
+ calculateAdditionalFees?: boolean;
5195
+ /**
5196
+ * Whether to include tax calculation.
5197
+ * Default: false
5198
+ */
5199
+ calculateTax?: boolean;
5200
+ /**
5201
+ * Whether to calculate the effect of gift card balances on the cart total.
5202
+ * Gift cards are not redeemed - only reflected for estimation purposes.
5203
+ * Default: false
5204
+ */
5205
+ calculateGiftCards?: boolean;
5206
+ }
5042
5207
  /**
5043
5208
  * Calculates the cart based on its current state (line items, discounts, delivery method, etc.)
5044
5209
  * and returns a detailed summary including subtotal, delivery costs, taxes, fees and the total price.
5045
- * Note that discounts are already pre-computed and applied to the Cart.
5210
+ * Note that line items discounts are already pre-computed and applied to the Cart.
5046
5211
  * @param cartId - ID of the Cart to calculate.
5047
5212
  * @public
5048
5213
  * @documentationMaturity preview
@@ -5051,7 +5216,7 @@ declare function refreshCart(cartId: string): Promise<NonNullablePaths<RefreshCa
5051
5216
  * @applicableIdentity APP
5052
5217
  * @fqn wix.ecom.cart.v2.CartService.CalculateCart
5053
5218
  */
5054
- 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> & {
5219
+ 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> & {
5055
5220
  __applicationErrorsType?: CalculateCartApplicationErrors;
5056
5221
  }>;
5057
5222
  interface CalculateCartOptions {
@@ -5340,4 +5505,4 @@ interface UpdateFormSubmissionsOptions {
5340
5505
  formSubmissions?: FormSubmission[];
5341
5506
  }
5342
5507
 
5343
- 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 };
5508
+ 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 };
@@ -421,6 +421,63 @@ function refreshCart(payload) {
421
421
  }
422
422
  return __refreshCart;
423
423
  }
424
+ function estimateCart(payload) {
425
+ function __estimateCart({ host }) {
426
+ const metadata = {
427
+ entityFqdn: "wix.ecom.v2.cart",
428
+ method: "POST",
429
+ methodFqn: "wix.ecom.cart.v2.CartService.EstimateCart",
430
+ packageName: PACKAGE_NAME,
431
+ migrationOptions: {
432
+ optInTransformResponse: true
433
+ },
434
+ url: resolveWixEcomCartV2CartServiceUrl({
435
+ protoPath: "/v2/carts/{cartId}/estimate",
436
+ data: payload,
437
+ host
438
+ }),
439
+ data: payload,
440
+ transformResponse: (payload2) => transformPaths(payload2, [
441
+ {
442
+ transformFn: transformRESTTimestampToSDKTimestamp,
443
+ paths: [
444
+ { path: "cart.createdDate" },
445
+ { path: "cart.updatedDate" },
446
+ {
447
+ path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
448
+ },
449
+ { path: "cart.lineItems.attributes.image.urlExpirationDate" },
450
+ {
451
+ path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
452
+ },
453
+ {
454
+ path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
455
+ },
456
+ { path: "cart.lineItems.attributes.serviceProperties.endDate" },
457
+ {
458
+ path: "summary.paymentSummary.subscriptionCharges.charges.cycleBillingDate"
459
+ }
460
+ ]
461
+ },
462
+ {
463
+ transformFn: transformRESTFloatToSDKFloat,
464
+ paths: [
465
+ {
466
+ path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
467
+ },
468
+ { path: "cart.lineItems.attributes.physicalProperties.weight" },
469
+ { path: "cart.deliveryInfo.address.geocode.latitude" },
470
+ { path: "cart.deliveryInfo.address.geocode.longitude" },
471
+ { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
472
+ { path: "cart.paymentInfo.billingAddress.geocode.longitude" }
473
+ ]
474
+ }
475
+ ])
476
+ };
477
+ return metadata;
478
+ }
479
+ return __estimateCart;
480
+ }
424
481
  function calculateCart(payload) {
425
482
  function __calculateCart({ host }) {
426
483
  const metadata = {
@@ -1221,6 +1278,14 @@ var DiscountScope = /* @__PURE__ */ ((DiscountScope2) => {
1221
1278
  DiscountScope2["DELIVERY"] = "DELIVERY";
1222
1279
  return DiscountScope2;
1223
1280
  })(DiscountScope || {});
1281
+ var Source = /* @__PURE__ */ ((Source2) => {
1282
+ Source2["UNKNOWN_ADDITIONAL_FEE_SOURCE"] = "UNKNOWN_ADDITIONAL_FEE_SOURCE";
1283
+ Source2["SERVICE_PLUGIN"] = "SERVICE_PLUGIN";
1284
+ Source2["LINE_ITEM"] = "LINE_ITEM";
1285
+ Source2["DELIVERY"] = "DELIVERY";
1286
+ Source2["PLATFORM"] = "PLATFORM";
1287
+ return Source2;
1288
+ })(Source || {});
1224
1289
  var RuleType = /* @__PURE__ */ ((RuleType2) => {
1225
1290
  RuleType2["VALIDATION"] = "VALIDATION";
1226
1291
  RuleType2["OTHER"] = "OTHER";
@@ -1629,6 +1694,66 @@ async function refreshCart2(cartId) {
1629
1694
  throw transformedError;
1630
1695
  }
1631
1696
  }
1697
+ async function estimateCart2(cartId, options) {
1698
+ const { httpClient, sideEffects } = arguments[2];
1699
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1700
+ cartId,
1701
+ refreshCart: options?.refreshCart,
1702
+ validationConfig: options?.validationConfig,
1703
+ calculateDelivery: options?.calculateDelivery,
1704
+ calculateAdditionalFees: options?.calculateAdditionalFees,
1705
+ calculateTax: options?.calculateTax,
1706
+ calculateGiftCards: options?.calculateGiftCards
1707
+ });
1708
+ const reqOpts = estimateCart(payload);
1709
+ sideEffects?.onSiteCall?.();
1710
+ try {
1711
+ const result = await httpClient.request(reqOpts);
1712
+ sideEffects?.onSuccess?.(result);
1713
+ return renameKeysFromRESTResponseToSDKResponse(
1714
+ transformPaths2(result.data, [
1715
+ {
1716
+ transformFn: transformRESTImageToSDKImage,
1717
+ paths: [
1718
+ { path: "cart.lineItems.source.catalogOverrideFields.image" },
1719
+ { path: "cart.lineItems.attributes.image" }
1720
+ ]
1721
+ },
1722
+ {
1723
+ transformFn: transformRESTPageURLV2ToSDKPageURLV2,
1724
+ paths: [{ path: "cart.lineItems.attributes.url" }]
1725
+ },
1726
+ {
1727
+ transformFn: transformRESTAddressToSDKAddress,
1728
+ paths: [
1729
+ { path: "cart.deliveryInfo.address" },
1730
+ { path: "cart.paymentInfo.billingAddress" }
1731
+ ]
1732
+ }
1733
+ ])
1734
+ );
1735
+ } catch (err) {
1736
+ const transformedError = sdkTransformError(
1737
+ err,
1738
+ {
1739
+ spreadPathsToArguments: {},
1740
+ explicitPathsToArguments: {
1741
+ cartId: "$[0]",
1742
+ refreshCart: "$[1].refreshCart",
1743
+ validationConfig: "$[1].validationConfig",
1744
+ calculateDelivery: "$[1].calculateDelivery",
1745
+ calculateAdditionalFees: "$[1].calculateAdditionalFees",
1746
+ calculateTax: "$[1].calculateTax",
1747
+ calculateGiftCards: "$[1].calculateGiftCards"
1748
+ },
1749
+ singleArgumentUnchanged: false
1750
+ },
1751
+ ["cartId", "options"]
1752
+ );
1753
+ sideEffects?.onError?.(err);
1754
+ throw transformedError;
1755
+ }
1756
+ }
1632
1757
  async function calculateCart2(cartId, options) {
1633
1758
  const { httpClient, sideEffects } = arguments[2];
1634
1759
  const payload = renameKeysFromSDKRequestToRESTRequest({
@@ -2294,6 +2419,7 @@ export {
2294
2419
  RateType,
2295
2420
  RuleType,
2296
2421
  Severity,
2422
+ Source,
2297
2423
  SubscriptionFrequency,
2298
2424
  SuggestedFix,
2299
2425
  TaxableAddressType,
@@ -2307,6 +2433,7 @@ export {
2307
2433
  calculateCart2 as calculateCart,
2308
2434
  createCart2 as createCart,
2309
2435
  deleteCart2 as deleteCart,
2436
+ estimateCart2 as estimateCart,
2310
2437
  getCart2 as getCart,
2311
2438
  getCheckoutUrl2 as getCheckoutUrl,
2312
2439
  handleAsyncCheckoutCompletion2 as handleAsyncCheckoutCompletion,