@wix/auto_sdk_ecom_cart 1.0.102 → 1.0.104

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.
@@ -1372,7 +1372,11 @@ interface AddToCurrentCartAndEstimateTotalsRequest {
1372
1372
  * @maxSize 100
1373
1373
  */
1374
1374
  customLineItems?: CustomLineItem[];
1375
- /** Selected shipping option. */
1375
+ /**
1376
+ * Selected shipping option.
1377
+ *
1378
+ * Pass this field only when there is no existing shipping option in the cart.
1379
+ */
1376
1380
  selectedShippingOption?: SelectedShippingOption;
1377
1381
  /** Shipping address. Used for calculating tax and shipping (when applicable). */
1378
1382
  shippingAddress?: Address;
@@ -2431,7 +2435,11 @@ interface CreateCheckoutFromCurrentCartRequest {
2431
2435
  shippingAddress?: Address;
2432
2436
  /** Billing address. Used for calculating tax if all the items in the cart are not shippable. */
2433
2437
  billingAddress?: Address;
2434
- /** Selected shipping option. */
2438
+ /**
2439
+ * Selected shipping option.
2440
+ *
2441
+ * Pass this field only when there is no existing shipping option in the cart.
2442
+ */
2435
2443
  selectedShippingOption?: SelectedShippingOption;
2436
2444
  /**
2437
2445
  * Required when setting billing or shipping address and user is not logged in.
@@ -2513,7 +2521,11 @@ interface UpdateLineItemsQuantityResponse {
2513
2521
  cart?: Cart;
2514
2522
  }
2515
2523
  interface EstimateCurrentCartTotalsRequest {
2516
- /** Selected shipping option. */
2524
+ /**
2525
+ * Selected shipping option
2526
+ *
2527
+ * Pass this field only when there is no existing shipping option in the cart.
2528
+ */
2517
2529
  selectedShippingOption?: SelectedShippingOption;
2518
2530
  /** Shipping address. Used for calculating tax and shipping (when applicable). */
2519
2531
  shippingAddress?: Address;
@@ -2784,7 +2796,11 @@ interface CreateCheckoutRequest {
2784
2796
  shippingAddress?: Address;
2785
2797
  /** Billing address. Used for calculating tax if all the items in the cart are not shippable. */
2786
2798
  billingAddress?: Address;
2787
- /** Selected shipping option. */
2799
+ /**
2800
+ * Selected shipping option.
2801
+ *
2802
+ * Pass this field only when there is no existing shipping option in the cart.
2803
+ */
2788
2804
  selectedShippingOption?: SelectedShippingOption;
2789
2805
  /**
2790
2806
  * Required when setting a billing or shipping address if the site visitor isn't logged in.
@@ -2818,7 +2834,11 @@ interface EstimateTotalsRequest {
2818
2834
  * @format GUID
2819
2835
  */
2820
2836
  _id: string;
2821
- /** Selected shipping option. */
2837
+ /**
2838
+ * Selected shipping option.
2839
+ *
2840
+ * Pass this field only when there is no existing shipping option in the cart.
2841
+ */
2822
2842
  selectedShippingOption?: SelectedShippingOption;
2823
2843
  /** Shipping address. Used for calculating tax and shipping (when applicable). */
2824
2844
  shippingAddress?: Address;
@@ -2978,6 +2998,7 @@ declare function onCartDeleted(handler: (event: CartDeletedEnvelope) => void | P
2978
2998
  interface CartUpdatedEnvelope {
2979
2999
  entity: Cart;
2980
3000
  metadata: EventMetadata;
3001
+ modifiedFields: Record<string, any>;
2981
3002
  }
2982
3003
  /** @permissionScope Manage Stores - all permissions
2983
3004
  * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
@@ -3341,7 +3362,11 @@ interface CreateCheckoutOptions {
3341
3362
  shippingAddress?: Address;
3342
3363
  /** Billing address. Used for calculating tax if all the items in the cart are not shippable. */
3343
3364
  billingAddress?: Address;
3344
- /** Selected shipping option. */
3365
+ /**
3366
+ * Selected shipping option.
3367
+ *
3368
+ * Pass this field only when there is no existing shipping option in the cart.
3369
+ */
3345
3370
  selectedShippingOption?: SelectedShippingOption;
3346
3371
  /**
3347
3372
  * Required when setting a billing or shipping address if the site visitor isn't logged in.
@@ -3399,7 +3424,11 @@ declare function updateLineItemsQuantity(_id: string, lineItems: LineItemQuantit
3399
3424
  */
3400
3425
  declare function estimateTotals(_id: string, options?: EstimateTotalsOptions): Promise<NonNullablePaths<EstimateTotalsResponse, `cart.lineItems` | `cart.lineItems.${number}.quantity` | `cart.lineItems.${number}.catalogReference.catalogItemId` | `cart.lineItems.${number}.catalogReference.appId` | `cart.lineItems.${number}.productName.original` | `cart.lineItems.${number}.price.amount` | `cart.lineItems.${number}.price.convertedAmount` | `cart.lineItems.${number}.price.formattedAmount` | `cart.lineItems.${number}.price.formattedConvertedAmount` | `cart.lineItems.${number}.availability.status` | `cart.lineItems.${number}.physicalProperties.shippable` | `cart.lineItems.${number}.itemType.preset` | `cart.lineItems.${number}.itemType.custom` | `cart.lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.frequency` | `cart.lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.autoRenewal` | `cart.lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.enableCustomerCancellation` | `cart.lineItems.${number}.subscriptionOptionInfo.title.original` | `cart.lineItems.${number}.subscriptionOptionInfo.description.original` | `cart.lineItems.${number}.paymentOption` | `cart.lineItems.${number}.priceDescription.original` | `cart.lineItems.${number}.selectedMembership._id` | `cart.lineItems.${number}.selectedMembership.appId` | `cart.lineItems.${number}.customLineItem` | `cart.lineItems.${number}.priceUndetermined` | `cart.lineItems.${number}.fixedQuantity` | `cart.lineItems.${number}.catalogOverrideFields.paymentOption.value` | `cart.lineItems.${number}.savePaymentMethod` | `cart.lineItems.${number}.taxableAddress.addressType` | `cart.lineItems.${number}.membersOnly` | `cart.buyerInfo.visitorId` | `cart.buyerInfo.memberId` | `cart.buyerInfo.userId` | `cart.currency` | `cart.conversionCurrency` | `cart.weightUnit` | `cart.appliedDiscounts` | `cart.appliedDiscounts.${number}.coupon._id` | `cart.appliedDiscounts.${number}.coupon.code` | `cart.contactInfo.address.streetAddress.number` | `cart.contactInfo.address.streetAddress.name` | `cart.contactInfo.contactDetails.vatId._id` | `cart.contactInfo.contactDetails.vatId.type` | `cart.selectedShippingOption.code` | `cart.paymentCurrency` | `calculatedLineItems` | `calculatedLineItems.${number}.lineItemId` | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.amount` | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.convertedAmount` | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.formattedAmount` | `calculatedLineItems.${number}.pricesBreakdown.totalPriceAfterTax.formattedConvertedAmount` | `calculatedLineItems.${number}.pricesBreakdown.taxDetails.taxRate` | `calculatedLineItems.${number}.paymentOption` | `calculatedLineItems.${number}.taxableAddress.addressType` | `priceSummary.subtotal.amount` | `priceSummary.subtotal.convertedAmount` | `priceSummary.subtotal.formattedAmount` | `priceSummary.subtotal.formattedConvertedAmount` | `giftCard._id` | `giftCard.obfuscatedCode` | `giftCard.amount.amount` | `giftCard.amount.convertedAmount` | `giftCard.amount.formattedAmount` | `giftCard.amount.formattedConvertedAmount` | `giftCard.appId` | `taxSummary.taxableAmount.amount` | `taxSummary.taxableAmount.convertedAmount` | `taxSummary.taxableAmount.formattedAmount` | `taxSummary.taxableAmount.formattedConvertedAmount` | `taxSummary.calculationDetails.manualRateReason` | `taxSummary.calculationDetails.autoTaxFallbackDetails.fallbackReason` | `taxSummary.calculationDetails.autoTaxFallbackDetails.error.code` | `taxSummary.calculationDetails.autoTaxFallbackDetails.error.description` | `taxSummary.calculationDetails.rateType` | `shippingInfo.region._id` | `shippingInfo.region.name` | `shippingInfo.selectedCarrierServiceOption.code` | `shippingInfo.selectedCarrierServiceOption.title` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.streetAddress.number` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.streetAddress.name` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.businessLocation` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.pickupMethod` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.amount` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.convertedAmount` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.formattedAmount` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.formattedConvertedAmount` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.taxRate` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown.${number}.name` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown.${number}.rate` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.taxBreakdown` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.taxBreakdown.${number}.jurisdictionType` | `shippingInfo.selectedCarrierServiceOption.requestedShippingOption` | `shippingInfo.selectedCarrierServiceOption.otherCharges` | `shippingInfo.selectedCarrierServiceOption.otherCharges.${number}.type` | `shippingInfo.selectedCarrierServiceOption.deliveryAllocations` | `shippingInfo.selectedCarrierServiceOption.deliveryAllocations.${number}.deliveryCarrier.code` | `shippingInfo.carrierServiceOptions` | `shippingInfo.carrierServiceOptions.${number}.carrierId` | `appliedDiscounts` | `appliedDiscounts.${number}.coupon._id` | `appliedDiscounts.${number}.coupon.code` | `appliedDiscounts.${number}.coupon.amount.amount` | `appliedDiscounts.${number}.coupon.amount.convertedAmount` | `appliedDiscounts.${number}.coupon.amount.formattedAmount` | `appliedDiscounts.${number}.coupon.amount.formattedConvertedAmount` | `appliedDiscounts.${number}.coupon.name` | `appliedDiscounts.${number}.discountRule._id` | `appliedDiscounts.${number}.discountRule.name.original` | `appliedDiscounts.${number}.discountType` | `calculationErrors.generalShippingCalculationError.applicationError.code` | `calculationErrors.generalShippingCalculationError.applicationError.description` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculationErrors.carrierErrors.errors` | `calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculationErrors.orderValidationErrors` | `weightUnit` | `currency` | `payNow.subtotal.amount` | `payNow.subtotal.convertedAmount` | `payNow.subtotal.formattedAmount` | `payNow.subtotal.formattedConvertedAmount` | `payLater.subtotal.amount` | `payLater.subtotal.convertedAmount` | `payLater.subtotal.formattedAmount` | `payLater.subtotal.formattedConvertedAmount` | `membershipOptions.eligibleMemberships` | `membershipOptions.eligibleMemberships.${number}._id` | `membershipOptions.eligibleMemberships.${number}.appId` | `membershipOptions.eligibleMemberships.${number}.name.original` | `membershipOptions.eligibleMemberships.${number}.credits.total` | `membershipOptions.eligibleMemberships.${number}.credits.remaining` | `membershipOptions.invalidMemberships` | `membershipOptions.invalidMemberships.${number}.reason` | `membershipOptions.selectedMemberships` | `membershipOptions.selectedMemberships.${number}._id` | `membershipOptions.selectedMemberships.${number}.appId` | `additionalFees` | `additionalFees.${number}.name` | `additionalFees.${number}.price.amount` | `additionalFees.${number}.price.convertedAmount` | `additionalFees.${number}.price.formattedAmount` | `additionalFees.${number}.price.formattedConvertedAmount` | `additionalFees.${number}.taxDetails.taxRate` | `additionalFees.${number}.source` | `violations` | `violations.${number}.severity` | `violations.${number}.target.other.name` | `violations.${number}.target.lineItem.name`, 8>>;
3401
3426
  interface EstimateTotalsOptions {
3402
- /** Selected shipping option. */
3427
+ /**
3428
+ * Selected shipping option.
3429
+ *
3430
+ * Pass this field only when there is no existing shipping option in the cart.
3431
+ */
3403
3432
  selectedShippingOption?: SelectedShippingOption;
3404
3433
  /** Shipping address. Used for calculating tax and shipping (when applicable). */
3405
3434
  shippingAddress?: Address;