@wix/auto_sdk_ecom_cart-v-2 1.0.26 → 1.0.27

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 +62 -8
  2. package/build/cjs/index.js +109 -0
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +1 -1
  5. package/build/cjs/index.typings.js +100 -0
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +64 -9
  8. package/build/cjs/meta.js +69 -0
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +62 -8
  11. package/build/es/index.mjs +108 -0
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +1 -1
  14. package/build/es/index.typings.mjs +99 -0
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +64 -9
  17. package/build/es/meta.mjs +68 -0
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +16 -4
  20. package/build/internal/cjs/index.js +109 -0
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +76 -9
  23. package/build/internal/cjs/index.typings.js +100 -0
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +64 -9
  26. package/build/internal/cjs/meta.js +69 -0
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +16 -4
  29. package/build/internal/es/index.mjs +108 -0
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +76 -9
  32. package/build/internal/es/index.typings.mjs +99 -0
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +64 -9
  35. package/build/internal/es/meta.mjs +68 -0
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +2 -2
@@ -1191,7 +1191,10 @@ type VatTypeWithLiterals = VatType | 'UNSPECIFIED' | 'CPF' | 'CNPJ';
1191
1191
  interface DeliveryInfo {
1192
1192
  /** The delivery address. */
1193
1193
  address?: Address;
1194
- /** The selected delivery method by the customer. */
1194
+ /**
1195
+ * The selected delivery method by the customer.
1196
+ * @readonly
1197
+ */
1195
1198
  method?: DeliveryMethod;
1196
1199
  /**
1197
1200
  * The unit of weight measurement when shipping items (e.g., KG, LB).
@@ -1262,7 +1265,7 @@ interface DeliveryMethod {
1262
1265
  /**
1263
1266
  * Unique code that acts as an ID for a shipping rate.
1264
1267
  * For example, `"usps_std_overnight"`.
1265
- * @maxLength 250
1268
+ * @maxLength 100
1266
1269
  */
1267
1270
  code?: string;
1268
1271
  /**
@@ -1273,13 +1276,9 @@ interface DeliveryMethod {
1273
1276
  /**
1274
1277
  * Delivery rate title.
1275
1278
  * For example, `"USPS Standard Overnight Delivery"`, `"Standard"`, or `"First-Class Package International"`.
1276
- * @readonly
1277
1279
  */
1278
1280
  title?: TranslatableString;
1279
- /**
1280
- * Whether the delivery method is a pickup option.
1281
- * @readonly
1282
- */
1281
+ /** Whether the delivery method is a pickup option. */
1283
1282
  pickup?: boolean;
1284
1283
  }
1285
1284
  declare enum WeightUnit {
@@ -1298,6 +1297,11 @@ interface TaxInfo {
1298
1297
  * @readonly
1299
1298
  */
1300
1299
  pricesIncludeTax?: boolean;
1300
+ /**
1301
+ * Tax exempt group ID to use for tax exemptions.
1302
+ * @format GUID
1303
+ */
1304
+ taxExemptGroupId?: string | null;
1301
1305
  }
1302
1306
  interface PaymentInfo {
1303
1307
  /**
@@ -1491,6 +1495,11 @@ interface CartSummary {
1491
1495
  * @format GUID
1492
1496
  */
1493
1497
  cartId?: string;
1498
+ /**
1499
+ * A unique identifier for this specific cart calculation.
1500
+ * @format GUID
1501
+ */
1502
+ calculationId?: string;
1494
1503
  /**
1495
1504
  * Summarized details for each line item in the cart.
1496
1505
  * @maxSize 300
@@ -2028,6 +2037,8 @@ interface CreateCurrentCartRequest {
2028
2037
  * @maxLength 50
2029
2038
  */
2030
2039
  couponCodes?: string[];
2040
+ /** Delivery method to set. */
2041
+ deliveryMethod?: DeliveryMethodInput;
2031
2042
  /**
2032
2043
  * Gift cards to add.
2033
2044
  * Currently only one is support.
@@ -2199,6 +2210,18 @@ interface CustomItemPaymentConfig {
2199
2210
  */
2200
2211
  paymentOption?: PaymentOptionTypeWithLiterals;
2201
2212
  }
2213
+ interface DeliveryMethodInput {
2214
+ /**
2215
+ * Delivery method code.
2216
+ * @maxLength 100
2217
+ */
2218
+ code?: string;
2219
+ /**
2220
+ * Carrier app id.
2221
+ * @format GUID
2222
+ */
2223
+ appId?: string | null;
2224
+ }
2202
2225
  interface CreateCurrentCartResponse {
2203
2226
  /** The created Cart. */
2204
2227
  cart?: Cart;
@@ -2378,6 +2401,14 @@ interface RemoveCouponFromCurrentCartResponse {
2378
2401
  /** Updated Cart. */
2379
2402
  cart?: Cart;
2380
2403
  }
2404
+ interface SetDeliveryMethodForCurrentCartRequest {
2405
+ /** Delivery method. */
2406
+ deliveryMethod?: DeliveryMethodInput;
2407
+ }
2408
+ interface SetDeliveryMethodForCurrentCartResponse {
2409
+ /** Updated Cart. */
2410
+ cart?: Cart;
2411
+ }
2381
2412
  interface AddGiftCardToCurrentCartRequest {
2382
2413
  /**
2383
2414
  * Gift card code.
@@ -2402,6 +2433,12 @@ interface RemoveGiftCardFromCurrentCartResponse {
2402
2433
  /** Updated Cart. */
2403
2434
  cart?: Cart;
2404
2435
  }
2436
+ interface UnmarkAsCurrentCartRequest {
2437
+ }
2438
+ interface UnmarkAsCurrentCartResponse {
2439
+ /** Cart that was unmarked as current cart, if such existed. */
2440
+ cart?: Cart;
2441
+ }
2405
2442
  interface DomainEvent extends DomainEventBodyOneOf {
2406
2443
  createdEvent?: EntityCreatedEvent;
2407
2444
  updatedEvent?: EntityUpdatedEvent;
@@ -2561,6 +2598,8 @@ interface CreateCartRequest {
2561
2598
  * @maxLength 50
2562
2599
  */
2563
2600
  couponCodes?: string[];
2601
+ /** Delivery method to set. */
2602
+ deliveryMethod?: DeliveryMethodInput;
2564
2603
  /**
2565
2604
  * Gift cards to add.
2566
2605
  * Currently only one is support.
@@ -2821,6 +2860,19 @@ interface RemoveCouponResponse {
2821
2860
  /** Updated Cart. */
2822
2861
  cart?: Cart;
2823
2862
  }
2863
+ interface SetDeliveryMethodRequest {
2864
+ /**
2865
+ * Cart ID.
2866
+ * @format GUID
2867
+ */
2868
+ cartId: string;
2869
+ /** Delivery method. */
2870
+ deliveryMethod: DeliveryMethodInput;
2871
+ }
2872
+ interface SetDeliveryMethodResponse {
2873
+ /** Updated Cart. */
2874
+ cart?: Cart;
2875
+ }
2824
2876
  interface AddGiftCardRequest {
2825
2877
  /**
2826
2878
  * Cart ID.
@@ -2934,6 +2986,8 @@ interface CreateCartOptions {
2934
2986
  * @maxLength 50
2935
2987
  */
2936
2988
  couponCodes?: string[];
2989
+ /** Delivery method to set. */
2990
+ deliveryMethod?: DeliveryMethodInput;
2937
2991
  /**
2938
2992
  * Gift cards to add.
2939
2993
  * Currently only one is support.
@@ -3103,7 +3157,7 @@ declare function refreshCart(cartId: string): Promise<NonNullablePaths<RefreshCa
3103
3157
  * @permissionId ecom:v2:cart:calculate_cart
3104
3158
  * @fqn wix.ecom.cart.v2.CartService.CalculateCart
3105
3159
  */
3106
- declare function calculateCart(cartId: string, options?: CalculateCartOptions): Promise<NonNullablePaths<CalculateCartResponse, `cart._id` | `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.settings.lockGiftCard` | `cart.settings.lockCouponCode` | `cart.settings.policyAgreementCheckboxDisabled` | `cart.settings.manualPaymentDisabled` | `summary.cartId` | `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>>;
3160
+ declare function calculateCart(cartId: string, options?: CalculateCartOptions): Promise<NonNullablePaths<CalculateCartResponse, `cart._id` | `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.settings.lockGiftCard` | `cart.settings.lockCouponCode` | `cart.settings.policyAgreementCheckboxDisabled` | `cart.settings.manualPaymentDisabled` | `summary.cartId` | `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>>;
3107
3161
  interface CalculateCartOptions {
3108
3162
  /**
3109
3163
  * Whether to retrieve the latest item prices, discounts, and inventory data from the catalogs before calculating the cart.
@@ -3265,6 +3319,19 @@ declare function addCoupon(cartId: string, couponCode: string): Promise<NonNulla
3265
3319
  * @fqn wix.ecom.cart.v2.CartService.RemoveCoupon
3266
3320
  */
3267
3321
  declare function removeCoupon(cartId: string, couponId: string): Promise<NonNullablePaths<RemoveCouponResponse, `cart._id` | `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.settings.lockGiftCard` | `cart.settings.lockCouponCode` | `cart.settings.policyAgreementCheckboxDisabled` | `cart.settings.manualPaymentDisabled`, 7>>;
3322
+ /**
3323
+ * Sets the delivery method for the Cart.
3324
+ * @param cartId - Cart ID.
3325
+ * @param deliveryMethod - Delivery method.
3326
+ * @internal
3327
+ * @documentationMaturity preview
3328
+ * @requiredField cartId
3329
+ * @requiredField deliveryMethod
3330
+ * @requiredField deliveryMethod.code
3331
+ * @permissionId ecom:v2:cart:update_cart
3332
+ * @fqn wix.ecom.cart.v2.CartService.SetDeliveryMethod
3333
+ */
3334
+ declare function setDeliveryMethod(cartId: string, deliveryMethod: NonNullablePaths<DeliveryMethodInput, `code`, 2>): Promise<NonNullablePaths<SetDeliveryMethodResponse, `cart._id` | `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.settings.lockGiftCard` | `cart.settings.lockCouponCode` | `cart.settings.policyAgreementCheckboxDisabled` | `cart.settings.manualPaymentDisabled`, 7>>;
3268
3335
  /**
3269
3336
  * Adds a gift card to the Cart.
3270
3337
  * Once added, the gift card’s balance will be used as a payment method during checkout, either partially or fully covering the cart total.
@@ -3325,4 +3392,4 @@ interface MarkCartAsCompletedOptions {
3325
3392
  */
3326
3393
  declare function handleAsyncCheckoutCompletion(token: string): Promise<NonNullablePaths<RawHttpResponse, `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`, 4>>;
3327
3394
 
3328
- export { type ActionEvent, type AddCouponRequest, type AddCouponResponse, type AddCouponToCurrentCartRequest, type AddCouponToCurrentCartResponse, type AddGiftCardRequest, type AddGiftCardResponse, type AddGiftCardToCurrentCartRequest, type AddGiftCardToCurrentCartResponse, type AddLineItemsOptions, type AddLineItemsRequest, type AddLineItemsResponse, type AddLineItemsToCurrentCartRequest, type AddLineItemsToCurrentCartResponse, type AdditionalFee, type AdditionalFeeTax, type Address, type AddressLocation, type ApplicationError, type BusinessInfo, type CalculateCartOptions, type CalculateCartRequest, type CalculateCartResponse, type CalculateCurrentCartRequest, type CalculateCurrentCartResponse, type CalculationConfig, type CalculationErrors, type CalculationErrorsShippingCalculationErrorOneOf, type CarrierError, type CarrierErrors, type Cart, type CartSettings, type CartSource, type CartSummary, type CatalogItemInput, type CatalogOverrideFields, type CatalogReference, ChannelType, type ChannelTypeWithLiterals, type Charge, type Color, type ConvertedMoney, type Coupon, 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 DeliveryInfo, type DeliveryMethod, type DeliverySummary, type Description, type DescriptionLine, type DescriptionLineDescriptionLineValueOneOf, type DescriptionLineName, DescriptionLineType, type DescriptionLineTypeWithLiterals, type DescriptionLineValueOneOf, type Details, type DetailsKindOneOf, type Discount, type DiscountBenefit, type DiscountBenefitValueOneOf, DiscountScope, type DiscountScopeWithLiterals, type DiscountSource, DiscountSourceType, type DiscountSourceTypeWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ExtendedFields, type ExternalReference, type FieldViolation, FileType, type FileTypeWithLiterals, type FreeTrialPeriod, type FullAddressContactDetails, type GetCartRequest, type GetCartResponse, type GetCheckoutURLRequest, type GetCheckoutURLResponse, type GetCheckoutUrlOptions, type GetCurrentCartRequest, type GetCurrentCartResponse, type GiftCard, type GiftCardSummary, type Group, type HandleAsyncCheckoutCompletionRequest, type HeadersEntry, type IdentificationData, type IdentificationDataIdOneOf, type ItemAttributes, type ItemDeliveryConfig, type ItemDiscount, type ItemModifier, type ItemPaymentConfig, type ItemPriceBreakdown, type ItemPricingInfo, type ItemQuantityInfo, type ItemSource, ItemStatus, type ItemStatusWithLiterals, type ItemTaxConfig, type ItemType, ItemTypeItemType, type ItemTypeItemTypeDataOneOf, type ItemTypeItemTypeWithLiterals, type LegacyFields, type LineItem, type LineItemSummary, type LineItemTax, type LineItemUpdate, type MarkCartAsCompletedOptions, type MarkCartAsCompletedRequest, type MarkCartAsCompletedResponse, type Membership, type MessageEnvelope, type ModifierGroup, NameInLineItem, type NameInLineItemWithLiterals, NameInOther, type NameInOtherWithLiterals, type Other, type PaymentInfo, type PaymentOption, PaymentOptionType, type PaymentOptionTypeWithLiterals, type PaymentSummary, type PhysicalProperties, type PlaceOrderOptions, type PlaceOrderRequest, type PlaceOrderResponse, type PlainTextValue, type Policy, type PriceDescription, type PriceSummary, type QuantityUpdate, type RawHttpResponse, type RedirectUrls, type RefreshCartRequest, type RefreshCartResponse, type RefreshCurrentCartRequest, type RefreshCurrentCartResponse, type RemoveCouponFromCurrentCartRequest, type RemoveCouponFromCurrentCartResponse, type RemoveCouponRequest, type RemoveCouponResponse, type RemoveGiftCardFromCurrentCartRequest, type RemoveGiftCardFromCurrentCartResponse, type RemoveGiftCardRequest, type RemoveGiftCardResponse, type RemoveLineItemsFromCurrentCartRequest, type RemoveLineItemsFromCurrentCartResponse, type RemoveLineItemsRequest, type RemoveLineItemsResponse, type RestoreInfo, RuleType, type RuleTypeWithLiterals, type Scope, type SecuredMedia, type SelectedMembership, type SelectedMembershipUpdate, type ServiceProperties, Severity, type SeverityWithLiterals, type StreetAddress, type SubscriptionCharges, SubscriptionFrequency, type SubscriptionFrequencyWithLiterals, type SubscriptionOptionInfo, type SubscriptionSettings, SuggestedFix, type SuggestedFixWithLiterals, type SystemError, type Target, type TargetTargetTypeOneOf, type Tax, type TaxDetails, type TaxInfo, type TaxSummary, type TaxableAddress, type TaxableAddressTaxableAddressDataOneOf, TaxableAddressType, type TaxableAddressTypeWithLiterals, type Title, type TranslatableString, type UpdateCart, type UpdateCartRequest, type UpdateCartResponse, type UpdateCurrentCartRequest, type UpdateCurrentCartResponse, type UpdateLineItemsInCurrentCartRequest, type UpdateLineItemsInCurrentCartResponse, type UpdateLineItemsOptions, type UpdateLineItemsRequest, type UpdateLineItemsResponse, type V2AdditionalFee, type V2LineItem, type ValidationError, ValidationsConfig, type ValidationsConfigWithLiterals, type VatId, VatType, type VatTypeWithLiterals, type Violation, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, WeightUnit, type WeightUnitWithLiterals, addCoupon, addGiftCard, addLineItems, calculateCart, createCart, deleteCart, getCart, getCheckoutUrl, handleAsyncCheckoutCompletion, markCartAsCompleted, placeOrder, refreshCart, removeCoupon, removeGiftCard, removeLineItems, updateCart, updateLineItems };
3395
+ export { type ActionEvent, type AddCouponRequest, type AddCouponResponse, type AddCouponToCurrentCartRequest, type AddCouponToCurrentCartResponse, type AddGiftCardRequest, type AddGiftCardResponse, type AddGiftCardToCurrentCartRequest, type AddGiftCardToCurrentCartResponse, type AddLineItemsOptions, type AddLineItemsRequest, type AddLineItemsResponse, type AddLineItemsToCurrentCartRequest, type AddLineItemsToCurrentCartResponse, type AdditionalFee, type AdditionalFeeTax, type Address, type AddressLocation, type ApplicationError, type BusinessInfo, type CalculateCartOptions, type CalculateCartRequest, type CalculateCartResponse, type CalculateCurrentCartRequest, type CalculateCurrentCartResponse, type CalculationConfig, type CalculationErrors, type CalculationErrorsShippingCalculationErrorOneOf, type CarrierError, type CarrierErrors, type Cart, type CartSettings, type CartSource, type CartSummary, type CatalogItemInput, type CatalogOverrideFields, type CatalogReference, ChannelType, type ChannelTypeWithLiterals, type Charge, type Color, type ConvertedMoney, type Coupon, 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 DeliveryInfo, type DeliveryMethod, type DeliveryMethodInput, type DeliverySummary, type Description, type DescriptionLine, type DescriptionLineDescriptionLineValueOneOf, type DescriptionLineName, DescriptionLineType, type DescriptionLineTypeWithLiterals, type DescriptionLineValueOneOf, type Details, type DetailsKindOneOf, type Discount, type DiscountBenefit, type DiscountBenefitValueOneOf, DiscountScope, type DiscountScopeWithLiterals, type DiscountSource, DiscountSourceType, type DiscountSourceTypeWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ExtendedFields, type ExternalReference, type FieldViolation, FileType, type FileTypeWithLiterals, type FreeTrialPeriod, type FullAddressContactDetails, type GetCartRequest, type GetCartResponse, type GetCheckoutURLRequest, type GetCheckoutURLResponse, type GetCheckoutUrlOptions, type GetCurrentCartRequest, type GetCurrentCartResponse, type GiftCard, type GiftCardSummary, type Group, type HandleAsyncCheckoutCompletionRequest, type HeadersEntry, type IdentificationData, type IdentificationDataIdOneOf, type ItemAttributes, type ItemDeliveryConfig, type ItemDiscount, type ItemModifier, type ItemPaymentConfig, type ItemPriceBreakdown, type ItemPricingInfo, type ItemQuantityInfo, type ItemSource, ItemStatus, type ItemStatusWithLiterals, type ItemTaxConfig, type ItemType, ItemTypeItemType, type ItemTypeItemTypeDataOneOf, type ItemTypeItemTypeWithLiterals, type LegacyFields, type LineItem, type LineItemSummary, type LineItemTax, type LineItemUpdate, type MarkCartAsCompletedOptions, type MarkCartAsCompletedRequest, type MarkCartAsCompletedResponse, type Membership, type MessageEnvelope, type ModifierGroup, NameInLineItem, type NameInLineItemWithLiterals, NameInOther, type NameInOtherWithLiterals, type Other, type PaymentInfo, type PaymentOption, PaymentOptionType, type PaymentOptionTypeWithLiterals, type PaymentSummary, type PhysicalProperties, type PlaceOrderOptions, type PlaceOrderRequest, type PlaceOrderResponse, type PlainTextValue, type Policy, type PriceDescription, type PriceSummary, type QuantityUpdate, type RawHttpResponse, type RedirectUrls, type RefreshCartRequest, type RefreshCartResponse, type RefreshCurrentCartRequest, type RefreshCurrentCartResponse, type RemoveCouponFromCurrentCartRequest, type RemoveCouponFromCurrentCartResponse, type RemoveCouponRequest, type RemoveCouponResponse, type RemoveGiftCardFromCurrentCartRequest, type RemoveGiftCardFromCurrentCartResponse, type RemoveGiftCardRequest, type RemoveGiftCardResponse, type RemoveLineItemsFromCurrentCartRequest, type RemoveLineItemsFromCurrentCartResponse, type RemoveLineItemsRequest, type RemoveLineItemsResponse, type RestoreInfo, RuleType, type RuleTypeWithLiterals, type Scope, type SecuredMedia, type SelectedMembership, type SelectedMembershipUpdate, type ServiceProperties, type SetDeliveryMethodForCurrentCartRequest, type SetDeliveryMethodForCurrentCartResponse, type SetDeliveryMethodRequest, type SetDeliveryMethodResponse, Severity, type SeverityWithLiterals, type StreetAddress, type SubscriptionCharges, SubscriptionFrequency, type SubscriptionFrequencyWithLiterals, type SubscriptionOptionInfo, type SubscriptionSettings, SuggestedFix, type SuggestedFixWithLiterals, type SystemError, type Target, type TargetTargetTypeOneOf, type Tax, type TaxDetails, type TaxInfo, type TaxSummary, type TaxableAddress, type TaxableAddressTaxableAddressDataOneOf, TaxableAddressType, type TaxableAddressTypeWithLiterals, type Title, type TranslatableString, type UnmarkAsCurrentCartRequest, type UnmarkAsCurrentCartResponse, type UpdateCart, type UpdateCartRequest, type UpdateCartResponse, type UpdateCurrentCartRequest, type UpdateCurrentCartResponse, type UpdateLineItemsInCurrentCartRequest, type UpdateLineItemsInCurrentCartResponse, type UpdateLineItemsOptions, type UpdateLineItemsRequest, type UpdateLineItemsResponse, type V2AdditionalFee, type V2LineItem, type ValidationError, ValidationsConfig, type ValidationsConfigWithLiterals, type VatId, VatType, type VatTypeWithLiterals, type Violation, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, WeightUnit, type WeightUnitWithLiterals, addCoupon, addGiftCard, addLineItems, calculateCart, createCart, deleteCart, getCart, getCheckoutUrl, handleAsyncCheckoutCompletion, markCartAsCompleted, placeOrder, refreshCart, removeCoupon, removeGiftCard, removeLineItems, setDeliveryMethod, updateCart, updateLineItems };
@@ -745,6 +745,55 @@ function removeCoupon(payload) {
745
745
  }
746
746
  return __removeCoupon;
747
747
  }
748
+ function setDeliveryMethod(payload) {
749
+ function __setDeliveryMethod({ host }) {
750
+ const metadata = {
751
+ entityFqdn: "wix.ecom.v2.cart",
752
+ method: "POST",
753
+ methodFqn: "wix.ecom.cart.v2.CartService.SetDeliveryMethod",
754
+ packageName: PACKAGE_NAME,
755
+ migrationOptions: {
756
+ optInTransformResponse: true
757
+ },
758
+ url: resolveWixEcomCartV2CartServiceUrl({
759
+ protoPath: "/v2/carts/{cartId}/set-delivery-method",
760
+ data: payload,
761
+ host
762
+ }),
763
+ data: payload,
764
+ transformResponse: (payload2) => transformPaths(payload2, [
765
+ {
766
+ transformFn: transformRESTTimestampToSDKTimestamp,
767
+ paths: [
768
+ { path: "cart.createdDate" },
769
+ { path: "cart.updatedDate" },
770
+ {
771
+ path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
772
+ },
773
+ {
774
+ path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
775
+ }
776
+ ]
777
+ },
778
+ {
779
+ transformFn: transformRESTFloatToSDKFloat,
780
+ paths: [
781
+ {
782
+ path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
783
+ },
784
+ { path: "cart.lineItems.attributes.physicalProperties.weight" },
785
+ { path: "cart.deliveryInfo.address.geocode.latitude" },
786
+ { path: "cart.deliveryInfo.address.geocode.longitude" },
787
+ { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
788
+ { path: "cart.paymentInfo.billingAddress.geocode.longitude" }
789
+ ]
790
+ }
791
+ ])
792
+ };
793
+ return metadata;
794
+ }
795
+ return __setDeliveryMethod;
796
+ }
748
797
  function addGiftCard(payload) {
749
798
  function __addGiftCard({ host }) {
750
799
  const metadata = {
@@ -1093,6 +1142,7 @@ async function createCart2(options) {
1093
1142
  catalogItems: options?.catalogItems,
1094
1143
  customItems: options?.customItems,
1095
1144
  couponCodes: options?.couponCodes,
1145
+ deliveryMethod: options?.deliveryMethod,
1096
1146
  giftCardCodes: options?.giftCardCodes
1097
1147
  }),
1098
1148
  [
@@ -1158,6 +1208,7 @@ async function createCart2(options) {
1158
1208
  catalogItems: "$[0].catalogItems",
1159
1209
  customItems: "$[0].customItems",
1160
1210
  couponCodes: "$[0].couponCodes",
1211
+ deliveryMethod: "$[0].deliveryMethod",
1161
1212
  giftCardCodes: "$[0].giftCardCodes"
1162
1213
  },
1163
1214
  singleArgumentUnchanged: false
@@ -1722,6 +1773,53 @@ async function removeCoupon2(cartId, couponId) {
1722
1773
  throw transformedError;
1723
1774
  }
1724
1775
  }
1776
+ async function setDeliveryMethod2(cartId, deliveryMethod) {
1777
+ const { httpClient, sideEffects } = arguments[2];
1778
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1779
+ cartId,
1780
+ deliveryMethod
1781
+ });
1782
+ const reqOpts = setDeliveryMethod(payload);
1783
+ sideEffects?.onSiteCall?.();
1784
+ try {
1785
+ const result = await httpClient.request(reqOpts);
1786
+ sideEffects?.onSuccess?.(result);
1787
+ return renameKeysFromRESTResponseToSDKResponse(
1788
+ transformPaths2(result.data, [
1789
+ {
1790
+ transformFn: transformRESTImageToSDKImage,
1791
+ paths: [
1792
+ { path: "cart.lineItems.source.catalogOverrideFields.image" },
1793
+ { path: "cart.lineItems.attributes.image" }
1794
+ ]
1795
+ },
1796
+ {
1797
+ transformFn: transformRESTPageURLV2ToSDKPageURLV2,
1798
+ paths: [{ path: "cart.lineItems.attributes.url" }]
1799
+ },
1800
+ {
1801
+ transformFn: transformRESTAddressToSDKAddress,
1802
+ paths: [
1803
+ { path: "cart.deliveryInfo.address" },
1804
+ { path: "cart.paymentInfo.billingAddress" }
1805
+ ]
1806
+ }
1807
+ ])
1808
+ );
1809
+ } catch (err) {
1810
+ const transformedError = sdkTransformError(
1811
+ err,
1812
+ {
1813
+ spreadPathsToArguments: {},
1814
+ explicitPathsToArguments: { cartId: "$[0]", deliveryMethod: "$[1]" },
1815
+ singleArgumentUnchanged: false
1816
+ },
1817
+ ["cartId", "deliveryMethod"]
1818
+ );
1819
+ sideEffects?.onError?.(err);
1820
+ throw transformedError;
1821
+ }
1822
+ }
1725
1823
  async function addGiftCard2(cartId, giftCardCode) {
1726
1824
  const { httpClient, sideEffects } = arguments[2];
1727
1825
  const payload = renameKeysFromSDKRequestToRESTRequest({
@@ -1921,6 +2019,7 @@ export {
1921
2019
  removeCoupon2 as removeCoupon,
1922
2020
  removeGiftCard2 as removeGiftCard,
1923
2021
  removeLineItems2 as removeLineItems,
2022
+ setDeliveryMethod2 as setDeliveryMethod,
1924
2023
  updateCart2 as updateCart,
1925
2024
  updateLineItems2 as updateLineItems
1926
2025
  };