@wix/auto_sdk_ecom_cart-v-2 1.0.38 → 1.0.40

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 +36 -38
  2. package/build/cjs/index.js +26 -26
  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 +22 -22
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +34 -32
  8. package/build/cjs/meta.js +10 -10
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +36 -38
  11. package/build/es/index.mjs +25 -25
  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 +21 -21
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +34 -32
  17. package/build/es/meta.mjs +9 -9
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +5 -5
  20. package/build/internal/cjs/index.js +26 -26
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +44 -44
  23. package/build/internal/cjs/index.typings.js +22 -22
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +34 -32
  26. package/build/internal/cjs/meta.js +10 -10
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +5 -5
  29. package/build/internal/es/index.mjs +25 -25
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +44 -44
  32. package/build/internal/es/index.typings.mjs +21 -21
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +34 -32
  35. package/build/internal/es/meta.mjs +9 -9
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +2 -2
@@ -533,18 +533,18 @@ interface Policy {
533
533
  }
534
534
  interface ItemType extends ItemTypeItemTypeDataOneOf {
535
535
  /** Preset item type. */
536
- preset?: ItemTypeItemTypeWithLiterals;
536
+ preset?: ItemTypePresetWithLiterals;
537
537
  /** Custom item type. When none of the preset types are suitable, specifies the custom type. */
538
538
  custom?: string;
539
539
  }
540
540
  /** @oneof */
541
541
  interface ItemTypeItemTypeDataOneOf {
542
542
  /** Preset item type. */
543
- preset?: ItemTypeItemTypeWithLiterals;
543
+ preset?: ItemTypePresetWithLiterals;
544
544
  /** Custom item type. When none of the preset types are suitable, specifies the custom type. */
545
545
  custom?: string;
546
546
  }
547
- declare enum ItemTypeItemType {
547
+ declare enum ItemTypePreset {
548
548
  UNRECOGNISED = "UNRECOGNISED",
549
549
  PHYSICAL = "PHYSICAL",
550
550
  DIGITAL = "DIGITAL",
@@ -552,7 +552,7 @@ declare enum ItemTypeItemType {
552
552
  SERVICE = "SERVICE"
553
553
  }
554
554
  /** @enumType */
555
- type ItemTypeItemTypeWithLiterals = ItemTypeItemType | 'UNRECOGNISED' | 'PHYSICAL' | 'DIGITAL' | 'GIFT_CARD' | 'SERVICE';
555
+ type ItemTypePresetWithLiterals = ItemTypePreset | 'UNRECOGNISED' | 'PHYSICAL' | 'DIGITAL' | 'GIFT_CARD' | 'SERVICE';
556
556
  interface SubscriptionOptionInfo {
557
557
  /** Subscription option settings. */
558
558
  subscriptionSettings?: SubscriptionSettings;
@@ -910,10 +910,7 @@ interface V2Coupon {
910
910
  code?: string;
911
911
  }
912
912
  interface CartSource {
913
- /**
914
- * Sales channel that created the Cart.
915
- * @immutable
916
- */
913
+ /** Sales channel that created the Cart. */
917
914
  channelType?: ChannelTypeWithLiterals;
918
915
  /**
919
916
  * References to an external app and resource associated with this Cart.
@@ -1353,6 +1350,8 @@ interface V2GiftCard {
1353
1350
  * @maxLength 50
1354
1351
  */
1355
1352
  externalId?: string | null;
1353
+ /** The amount requested to redeem from this gift card. */
1354
+ requestedRedeemAmount?: ConvertedMoney;
1356
1355
  }
1357
1356
  /** Full contact details for an address */
1358
1357
  interface FullAddressContactDetails {
@@ -2017,20 +2016,16 @@ interface CreateCurrentCartRequest {
2017
2016
  * Coupons to apply.
2018
2017
  * Currently only one is supported.
2019
2018
  * @maxSize 1
2020
- * @minLength 1
2021
- * @maxLength 50
2022
2019
  */
2023
- couponCodes?: string[];
2020
+ coupons?: CouponInput[];
2024
2021
  /** Delivery method to set. */
2025
2022
  deliveryMethod?: DeliveryMethodInput;
2026
2023
  /**
2027
2024
  * Gift cards to add.
2028
2025
  * Currently only one is support.
2029
2026
  * @maxSize 1
2030
- * @minLength 8
2031
- * @maxLength 20
2032
2027
  */
2033
- giftCardCodes?: string[];
2028
+ giftCards?: GiftCardInput[];
2034
2029
  }
2035
2030
  interface CatalogItemInput {
2036
2031
  /** A reference to the catalog item. */
@@ -2194,6 +2189,14 @@ interface CustomItemPaymentConfig {
2194
2189
  */
2195
2190
  paymentOption?: PaymentOptionTypeWithLiterals;
2196
2191
  }
2192
+ interface CouponInput {
2193
+ /**
2194
+ * Coupon code.
2195
+ * @minLength 1
2196
+ * @maxLength 50
2197
+ */
2198
+ code?: string;
2199
+ }
2197
2200
  interface DeliveryMethodInput {
2198
2201
  /**
2199
2202
  * Delivery method code.
@@ -2206,6 +2209,16 @@ interface DeliveryMethodInput {
2206
2209
  */
2207
2210
  appId?: string | null;
2208
2211
  }
2212
+ interface GiftCardInput {
2213
+ /**
2214
+ * Gift card code.
2215
+ * @minLength 8
2216
+ * @maxLength 20
2217
+ */
2218
+ code?: string;
2219
+ /** The amount requested to redeem from this gift card. */
2220
+ redeemAmount?: ConvertedMoney;
2221
+ }
2209
2222
  interface CreateCurrentCartResponse {
2210
2223
  /** The created Cart. */
2211
2224
  cart?: Cart;
@@ -2365,10 +2378,8 @@ interface AddCouponToCurrentCartRequest {
2365
2378
  * Coupon to apply.
2366
2379
  *
2367
2380
  * Currently only one is supported.
2368
- * @minLength 1
2369
- * @maxLength 50
2370
2381
  */
2371
- couponCode?: string;
2382
+ coupon?: CouponInput;
2372
2383
  }
2373
2384
  interface AddCouponToCurrentCartResponse {
2374
2385
  /** Updated Cart. */
@@ -2398,9 +2409,8 @@ interface AddGiftCardToCurrentCartRequest {
2398
2409
  * Gift card code.
2399
2410
  *
2400
2411
  * Currently only one is supported.
2401
- * @maxLength 50
2402
2412
  */
2403
- giftCardCode?: string;
2413
+ giftCard?: GiftCardInput;
2404
2414
  }
2405
2415
  interface AddGiftCardToCurrentCartResponse {
2406
2416
  /** Updated Cart. */
@@ -2578,20 +2588,16 @@ interface CreateCartRequest {
2578
2588
  * Coupons to apply.
2579
2589
  * Currently only one is supported.
2580
2590
  * @maxSize 1
2581
- * @minLength 1
2582
- * @maxLength 50
2583
2591
  */
2584
- couponCodes?: string[];
2592
+ coupons?: CouponInput[];
2585
2593
  /** Delivery method to set. */
2586
2594
  deliveryMethod?: DeliveryMethodInput;
2587
2595
  /**
2588
2596
  * Gift cards to add.
2589
2597
  * Currently only one is support.
2590
2598
  * @maxSize 1
2591
- * @minLength 8
2592
- * @maxLength 20
2593
2599
  */
2594
- giftCardCodes?: string[];
2600
+ giftCards?: GiftCardInput[];
2595
2601
  }
2596
2602
  interface CreateCartResponse {
2597
2603
  /** The created Cart. */
@@ -3872,10 +3878,8 @@ interface AddCouponRequest {
3872
3878
  * Coupon to apply.
3873
3879
  *
3874
3880
  * Currently only one is supported.
3875
- * @minLength 1
3876
- * @maxLength 50
3877
3881
  */
3878
- couponCode: string;
3882
+ coupon: CouponInput;
3879
3883
  }
3880
3884
  interface AddCouponResponse {
3881
3885
  /** Updated Cart. */
@@ -3920,10 +3924,8 @@ interface AddGiftCardRequest {
3920
3924
  * Gift card code.
3921
3925
  *
3922
3926
  * Currently only one is supported.
3923
- * @minLength 8
3924
- * @maxLength 20
3925
3927
  */
3926
- giftCardCode: string;
3928
+ giftCard: GiftCardInput;
3927
3929
  }
3928
3930
  interface AddGiftCardResponse {
3929
3931
  /** Updated Cart. */
@@ -4026,20 +4028,16 @@ interface CreateCartOptions {
4026
4028
  * Coupons to apply.
4027
4029
  * Currently only one is supported.
4028
4030
  * @maxSize 1
4029
- * @minLength 1
4030
- * @maxLength 50
4031
4031
  */
4032
- couponCodes?: string[];
4032
+ coupons?: CouponInput[];
4033
4033
  /** Delivery method to set. */
4034
4034
  deliveryMethod?: DeliveryMethodInput;
4035
4035
  /**
4036
4036
  * Gift cards to add.
4037
4037
  * Currently only one is support.
4038
4038
  * @maxSize 1
4039
- * @minLength 8
4040
- * @maxLength 20
4041
4039
  */
4042
- giftCardCodes?: string[];
4040
+ giftCards?: GiftCardInput[];
4043
4041
  }
4044
4042
  /**
4045
4043
  * Retrieves a Cart.
@@ -4358,18 +4356,19 @@ interface UpdateLineItemsOptions {
4358
4356
  /**
4359
4357
  * Adds a coupon to the Cart.
4360
4358
  * @param cartId - Cart ID.
4361
- * @param couponCode - Coupon to apply.
4359
+ * @param coupon - Coupon to apply.
4362
4360
  *
4363
4361
  * Currently only one is supported.
4364
4362
  * @internal
4365
4363
  * @documentationMaturity preview
4366
4364
  * @requiredField cartId
4367
- * @requiredField couponCode
4365
+ * @requiredField coupon
4366
+ * @requiredField coupon.code
4368
4367
  * @permissionId ecom:v2:cart:update_cart
4369
4368
  * @applicableIdentity APP
4370
4369
  * @fqn wix.ecom.cart.v2.CartService.AddCoupon
4371
4370
  */
4372
- declare function addCoupon(cartId: string, couponCode: string): Promise<NonNullablePaths<AddCouponResponse, `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>>;
4371
+ declare function addCoupon(cartId: string, coupon: NonNullablePaths<CouponInput, `code`, 2>): Promise<NonNullablePaths<AddCouponResponse, `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>>;
4373
4372
  /**
4374
4373
  * Removes a coupon from the Cart.
4375
4374
  * @param cartId - Cart ID.
@@ -4401,18 +4400,19 @@ declare function setDeliveryMethod(cartId: string, deliveryMethod: NonNullablePa
4401
4400
  * Adds a gift card to the Cart.
4402
4401
  * Once added, the gift card’s balance will be used as a payment method during checkout, either partially or fully covering the cart total.
4403
4402
  * @param cartId - Cart ID.
4404
- * @param giftCardCode - Gift card code.
4403
+ * @param giftCard - Gift card code.
4405
4404
  *
4406
4405
  * Currently only one is supported.
4407
4406
  * @internal
4408
4407
  * @documentationMaturity preview
4409
4408
  * @requiredField cartId
4410
- * @requiredField giftCardCode
4409
+ * @requiredField giftCard
4410
+ * @requiredField giftCard.code
4411
4411
  * @permissionId ecom:v2:cart:update_cart
4412
4412
  * @applicableIdentity APP
4413
4413
  * @fqn wix.ecom.cart.v2.CartService.AddGiftCard
4414
4414
  */
4415
- declare function addGiftCard(cartId: string, giftCardCode: string): Promise<NonNullablePaths<AddGiftCardResponse, `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>>;
4415
+ declare function addGiftCard(cartId: string, giftCard: NonNullablePaths<GiftCardInput, `code`, 2>): Promise<NonNullablePaths<AddGiftCardResponse, `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>>;
4416
4416
  /**
4417
4417
  * Removes a gift card from the Cart.
4418
4418
  * @param cartId - Cart ID.
@@ -4461,4 +4461,4 @@ interface MarkCartAsCompletedOptions {
4461
4461
  */
4462
4462
  declare function handleAsyncCheckoutCompletion(token: string): Promise<NonNullablePaths<RawHttpResponse, `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`, 4>>;
4463
4463
 
4464
- 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, AdditionalFeeSource, type AdditionalFeeSourceWithLiterals, type AdditionalFeeTax, type Address, type AddressLocation, type AggregatedTaxBreakdown, type ApplicableLineItems, type ApplicationError, type AppliedDiscount, type AppliedDiscountDiscountSourceOneOf, type AutoTaxFallbackCalculationDetails, type BusinessInfo, type CalculateCartForV1Request, type CalculateCartForV1Response, type CalculateCartOptions, type CalculateCartRequest, type CalculateCartResponse, type CalculateCurrentCartRequest, type CalculateCurrentCartResponse, type CalculateTotalsResponse, type CalculatedItemModifier, type CalculatedLineItem, type CalculationConfig, type CalculationErrors, type CalculationErrorsShippingCalculationErrorOneOf, type Carrier, type CarrierError, type CarrierErrors, type CarrierServiceOption, type Cart, 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 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 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 DummyErrorDataMethodLevel, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ExtendedFields, type ExternalReference, FallbackReason, type FallbackReasonWithLiterals, type FieldViolation, FileType, type FileTypeWithLiterals, type FreeTrialPeriod, type FullAddressContactDetails, type GetCartApplicationErrors, 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 InvalidMembership, type ItemAttributes, type ItemDeliveryConfig, type ItemDiscount, type ItemModifier, type ItemPaymentConfig, type ItemPriceBreakdown, type ItemPricingInfo, type ItemQuantityInfo, type ItemSource, ItemStatus, type ItemStatusWithLiterals, type ItemTaxConfig, type ItemTaxFullDetails, type ItemType, ItemTypeItemType, type ItemTypeItemTypeDataOneOf, type ItemTypeItemTypeWithLiterals, JurisdictionType, type JurisdictionTypeWithLiterals, type LegacyFields, type LineItem, type LineItemDiscount, type LineItemIdentifier, type LineItemIdentifierIdOneOf, type LineItemPricesData, type LineItemSummary, type LineItemTax, type LineItemUpdate, ManualCalculationReason, type ManualCalculationReasonWithLiterals, type MarkCartAsCompletedOptions, type MarkCartAsCompletedRequest, type MarkCartAsCompletedResponse, type Membership, type MembershipName, type MembershipOptions, type MembershipPaymentCredits, type MerchantDiscount, type MessageEnvelope, 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 PlaceOrderOptions, type PlaceOrderRequest, type PlaceOrderResponse, type PlainTextValue, type Policy, type PriceDescription, type PriceSummary, type QuantityUpdate, RateType, type RateTypeWithLiterals, type RawHttpResponse, type RedirectUrls, type RefreshCartRequest, type RefreshCartResponse, type RefreshCurrentCartRequest, type RefreshCurrentCartResponse, type Region, 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 SelectedCarrierServiceOption, type SelectedCarrierServiceOptionOtherCharge, type SelectedCarrierServiceOptionPrices, type SelectedMembership, type SelectedMembershipUpdate, type ServiceProperties, type SetDeliveryMethodForCurrentCartRequest, type SetDeliveryMethodForCurrentCartResponse, type SetDeliveryMethodRequest, type SetDeliveryMethodResponse, Severity, type SeverityWithLiterals, type ShippingInformation, type ShippingOption, type ShippingPrice, type ShippingRegion, 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 UpdateCartRequest, type UpdateCartResponse, type UpdateCurrentCartRequest, type UpdateCurrentCartResponse, 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, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, WeightUnit, type WeightUnitWithLiterals, addCoupon, addGiftCard, addLineItems, calculateCart, createCart, deleteCart, getCart, getCheckoutUrl, handleAsyncCheckoutCompletion, markCartAsCompleted, placeOrder, refreshCart, removeCoupon, removeGiftCard, removeLineItems, setDeliveryMethod, updateCart, updateLineItems };
4464
+ 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, AdditionalFeeSource, type AdditionalFeeSourceWithLiterals, type AdditionalFeeTax, type Address, type AddressLocation, type AggregatedTaxBreakdown, type ApplicableLineItems, type ApplicationError, type AppliedDiscount, type AppliedDiscountDiscountSourceOneOf, type AutoTaxFallbackCalculationDetails, type BusinessInfo, type CalculateCartForV1Request, type CalculateCartForV1Response, type CalculateCartOptions, type CalculateCartRequest, type CalculateCartResponse, type CalculateCurrentCartRequest, type CalculateCurrentCartResponse, type CalculateTotalsResponse, type CalculatedItemModifier, type CalculatedLineItem, type CalculationConfig, type CalculationErrors, type CalculationErrorsShippingCalculationErrorOneOf, type Carrier, type CarrierError, type CarrierErrors, type CarrierServiceOption, type Cart, 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 CouponInput, 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 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 DummyErrorDataMethodLevel, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ExtendedFields, type ExternalReference, FallbackReason, type FallbackReasonWithLiterals, type FieldViolation, FileType, type FileTypeWithLiterals, type FreeTrialPeriod, type FullAddressContactDetails, type GetCartApplicationErrors, type GetCartRequest, type GetCartResponse, type GetCheckoutURLRequest, type GetCheckoutURLResponse, type GetCheckoutUrlOptions, type GetCurrentCartRequest, type GetCurrentCartResponse, type GiftCard, type GiftCardInput, type GiftCardSummary, type Group, type HandleAsyncCheckoutCompletionRequest, type HeadersEntry, type IdentificationData, type IdentificationDataIdOneOf, type InvalidMembership, type ItemAttributes, type ItemDeliveryConfig, type ItemDiscount, type ItemModifier, 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 LineItemDiscount, type LineItemIdentifier, type LineItemIdentifierIdOneOf, type LineItemPricesData, type LineItemSummary, type LineItemTax, type LineItemUpdate, ManualCalculationReason, type ManualCalculationReasonWithLiterals, type MarkCartAsCompletedOptions, type MarkCartAsCompletedRequest, type MarkCartAsCompletedResponse, type Membership, type MembershipName, type MembershipOptions, type MembershipPaymentCredits, type MerchantDiscount, type MessageEnvelope, 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 PlaceOrderOptions, type PlaceOrderRequest, type PlaceOrderResponse, type PlainTextValue, type Policy, type PriceDescription, type PriceSummary, type QuantityUpdate, RateType, type RateTypeWithLiterals, type RawHttpResponse, type RedirectUrls, type RefreshCartRequest, type RefreshCartResponse, type RefreshCurrentCartRequest, type RefreshCurrentCartResponse, type Region, 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 SelectedCarrierServiceOption, type SelectedCarrierServiceOptionOtherCharge, type SelectedCarrierServiceOptionPrices, type SelectedMembership, type SelectedMembershipUpdate, type ServiceProperties, type SetDeliveryMethodForCurrentCartRequest, type SetDeliveryMethodForCurrentCartResponse, type SetDeliveryMethodRequest, type SetDeliveryMethodResponse, Severity, type SeverityWithLiterals, type ShippingInformation, type ShippingOption, type ShippingPrice, type ShippingRegion, 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 UpdateCartRequest, type UpdateCartResponse, type UpdateCurrentCartRequest, type UpdateCurrentCartResponse, 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, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, WeightUnit, type WeightUnitWithLiterals, addCoupon, addGiftCard, addLineItems, calculateCart, createCart, deleteCart, getCart, getCheckoutUrl, handleAsyncCheckoutCompletion, markCartAsCompleted, placeOrder, refreshCart, removeCoupon, removeGiftCard, removeLineItems, setDeliveryMethod, updateCart, updateLineItems };
@@ -1064,14 +1064,14 @@ var PaymentOptionType = /* @__PURE__ */ ((PaymentOptionType2) => {
1064
1064
  PaymentOptionType2["MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER"] = "MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER";
1065
1065
  return PaymentOptionType2;
1066
1066
  })(PaymentOptionType || {});
1067
- var ItemTypeItemType = /* @__PURE__ */ ((ItemTypeItemType2) => {
1068
- ItemTypeItemType2["UNRECOGNISED"] = "UNRECOGNISED";
1069
- ItemTypeItemType2["PHYSICAL"] = "PHYSICAL";
1070
- ItemTypeItemType2["DIGITAL"] = "DIGITAL";
1071
- ItemTypeItemType2["GIFT_CARD"] = "GIFT_CARD";
1072
- ItemTypeItemType2["SERVICE"] = "SERVICE";
1073
- return ItemTypeItemType2;
1074
- })(ItemTypeItemType || {});
1067
+ var ItemTypePreset = /* @__PURE__ */ ((ItemTypePreset2) => {
1068
+ ItemTypePreset2["UNRECOGNISED"] = "UNRECOGNISED";
1069
+ ItemTypePreset2["PHYSICAL"] = "PHYSICAL";
1070
+ ItemTypePreset2["DIGITAL"] = "DIGITAL";
1071
+ ItemTypePreset2["GIFT_CARD"] = "GIFT_CARD";
1072
+ ItemTypePreset2["SERVICE"] = "SERVICE";
1073
+ return ItemTypePreset2;
1074
+ })(ItemTypePreset || {});
1075
1075
  var SubscriptionFrequency = /* @__PURE__ */ ((SubscriptionFrequency2) => {
1076
1076
  SubscriptionFrequency2["UNDEFINED"] = "UNDEFINED";
1077
1077
  SubscriptionFrequency2["DAY"] = "DAY";
@@ -1271,9 +1271,9 @@ async function createCart2(options) {
1271
1271
  cart: options?.cart,
1272
1272
  catalogItems: options?.catalogItems,
1273
1273
  customItems: options?.customItems,
1274
- couponCodes: options?.couponCodes,
1274
+ coupons: options?.coupons,
1275
1275
  deliveryMethod: options?.deliveryMethod,
1276
- giftCardCodes: options?.giftCardCodes
1276
+ giftCards: options?.giftCards
1277
1277
  }),
1278
1278
  [
1279
1279
  {
@@ -1337,9 +1337,9 @@ async function createCart2(options) {
1337
1337
  cart: "$[0].cart",
1338
1338
  catalogItems: "$[0].catalogItems",
1339
1339
  customItems: "$[0].customItems",
1340
- couponCodes: "$[0].couponCodes",
1340
+ coupons: "$[0].coupons",
1341
1341
  deliveryMethod: "$[0].deliveryMethod",
1342
- giftCardCodes: "$[0].giftCardCodes"
1342
+ giftCards: "$[0].giftCards"
1343
1343
  },
1344
1344
  singleArgumentUnchanged: false
1345
1345
  },
@@ -1809,11 +1809,11 @@ async function updateLineItems2(cartId, options) {
1809
1809
  throw transformedError;
1810
1810
  }
1811
1811
  }
1812
- async function addCoupon2(cartId, couponCode) {
1812
+ async function addCoupon2(cartId, coupon) {
1813
1813
  const { httpClient, sideEffects } = arguments[2];
1814
1814
  const payload = renameKeysFromSDKRequestToRESTRequest({
1815
1815
  cartId,
1816
- couponCode
1816
+ coupon
1817
1817
  });
1818
1818
  const reqOpts = addCoupon(payload);
1819
1819
  sideEffects?.onSiteCall?.();
@@ -1847,10 +1847,10 @@ async function addCoupon2(cartId, couponCode) {
1847
1847
  err,
1848
1848
  {
1849
1849
  spreadPathsToArguments: {},
1850
- explicitPathsToArguments: { cartId: "$[0]", couponCode: "$[1]" },
1850
+ explicitPathsToArguments: { cartId: "$[0]", coupon: "$[1]" },
1851
1851
  singleArgumentUnchanged: false
1852
1852
  },
1853
- ["cartId", "couponCode"]
1853
+ ["cartId", "coupon"]
1854
1854
  );
1855
1855
  sideEffects?.onError?.(err);
1856
1856
  throw transformedError;
@@ -1950,11 +1950,11 @@ async function setDeliveryMethod2(cartId, deliveryMethod) {
1950
1950
  throw transformedError;
1951
1951
  }
1952
1952
  }
1953
- async function addGiftCard2(cartId, giftCardCode) {
1953
+ async function addGiftCard2(cartId, giftCard) {
1954
1954
  const { httpClient, sideEffects } = arguments[2];
1955
1955
  const payload = renameKeysFromSDKRequestToRESTRequest({
1956
1956
  cartId,
1957
- giftCardCode
1957
+ giftCard
1958
1958
  });
1959
1959
  const reqOpts = addGiftCard(payload);
1960
1960
  sideEffects?.onSiteCall?.();
@@ -1988,10 +1988,10 @@ async function addGiftCard2(cartId, giftCardCode) {
1988
1988
  err,
1989
1989
  {
1990
1990
  spreadPathsToArguments: {},
1991
- explicitPathsToArguments: { cartId: "$[0]", giftCardCode: "$[1]" },
1991
+ explicitPathsToArguments: { cartId: "$[0]", giftCard: "$[1]" },
1992
1992
  singleArgumentUnchanged: false
1993
1993
  },
1994
- ["cartId", "giftCardCode"]
1994
+ ["cartId", "giftCard"]
1995
1995
  );
1996
1996
  sideEffects?.onError?.(err);
1997
1997
  throw transformedError;
@@ -2126,7 +2126,7 @@ export {
2126
2126
  FallbackReason,
2127
2127
  FileType,
2128
2128
  ItemStatus,
2129
- ItemTypeItemType,
2129
+ ItemTypePreset,
2130
2130
  JurisdictionType,
2131
2131
  ManualCalculationReason,
2132
2132
  NameInLineItem,