@wix/auto_sdk_ecom_current-cart-v-2 1.0.39 → 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.
- package/build/cjs/index.d.ts +32 -34
- package/build/cjs/index.js +16 -20
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1 -1
- package/build/cjs/index.typings.js +12 -16
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +30 -28
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +32 -34
- package/build/es/index.mjs +16 -20
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +1 -1
- package/build/es/index.typings.mjs +12 -16
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +30 -28
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +4 -4
- package/build/internal/cjs/index.js +16 -20
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +40 -40
- package/build/internal/cjs/index.typings.js +12 -16
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +30 -28
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +4 -4
- package/build/internal/es/index.mjs +16 -20
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +40 -40
- package/build/internal/es/index.typings.mjs +12 -16
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +30 -28
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
3928
|
+
giftCard?: GiftCardInput;
|
|
3927
3929
|
}
|
|
3928
3930
|
interface AddGiftCardResponse {
|
|
3929
3931
|
/** Updated Cart. */
|
|
@@ -4018,20 +4020,16 @@ interface CreateCurrentCartOptions {
|
|
|
4018
4020
|
* Coupons to apply.
|
|
4019
4021
|
* Currently only one is supported.
|
|
4020
4022
|
* @maxSize 1
|
|
4021
|
-
* @minLength 1
|
|
4022
|
-
* @maxLength 50
|
|
4023
4023
|
*/
|
|
4024
|
-
|
|
4024
|
+
coupons?: CouponInput[];
|
|
4025
4025
|
/** Delivery method to set. */
|
|
4026
4026
|
deliveryMethod?: DeliveryMethodInput;
|
|
4027
4027
|
/**
|
|
4028
4028
|
* Gift cards to add.
|
|
4029
4029
|
* Currently only one is support.
|
|
4030
4030
|
* @maxSize 1
|
|
4031
|
-
* @minLength 8
|
|
4032
|
-
* @maxLength 20
|
|
4033
4031
|
*/
|
|
4034
|
-
|
|
4032
|
+
giftCards?: GiftCardInput[];
|
|
4035
4033
|
}
|
|
4036
4034
|
/**
|
|
4037
4035
|
* Retrieves the Current Cart of the customer.
|
|
@@ -4167,17 +4165,18 @@ interface UpdateLineItemsInCurrentCartOptions {
|
|
|
4167
4165
|
}
|
|
4168
4166
|
/**
|
|
4169
4167
|
* Applies a coupon to the Cart.
|
|
4170
|
-
* @param
|
|
4168
|
+
* @param coupon - Coupon to apply.
|
|
4171
4169
|
*
|
|
4172
4170
|
* Currently only one is supported.
|
|
4173
4171
|
* @internal
|
|
4174
4172
|
* @documentationMaturity preview
|
|
4175
|
-
* @requiredField
|
|
4173
|
+
* @requiredField coupon
|
|
4174
|
+
* @requiredField coupon.code
|
|
4176
4175
|
* @permissionId ecom:v2:cart:update_cart
|
|
4177
4176
|
* @applicableIdentity APP
|
|
4178
4177
|
* @fqn wix.ecom.cart.v2.CurrentCartService.AddCouponToCurrentCart
|
|
4179
4178
|
*/
|
|
4180
|
-
declare function addCouponToCurrentCart(
|
|
4179
|
+
declare function addCouponToCurrentCart(coupon: NonNullablePaths<CouponInput, `code`, 2>): Promise<NonNullablePaths<AddCouponToCurrentCartResponse, `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>>;
|
|
4181
4180
|
/**
|
|
4182
4181
|
* Removes a coupon from the Cart.
|
|
4183
4182
|
* @param couponId - Coupon ID.
|
|
@@ -4204,17 +4203,18 @@ declare function setDeliveryMethodForCurrentCart(deliveryMethod: NonNullablePath
|
|
|
4204
4203
|
/**
|
|
4205
4204
|
* Adds a gift card to the Current Cart.
|
|
4206
4205
|
* Once added, the gift card’s balance will be used as a payment method during checkout, either partially or fully covering the cart total.
|
|
4207
|
-
* @param
|
|
4206
|
+
* @param giftCard - Gift card code.
|
|
4208
4207
|
*
|
|
4209
4208
|
* Currently only one is supported.
|
|
4210
4209
|
* @internal
|
|
4211
4210
|
* @documentationMaturity preview
|
|
4212
|
-
* @requiredField
|
|
4211
|
+
* @requiredField giftCard
|
|
4212
|
+
* @requiredField giftCard.code
|
|
4213
4213
|
* @permissionId ecom:v2:cart:update_cart
|
|
4214
4214
|
* @applicableIdentity APP
|
|
4215
4215
|
* @fqn wix.ecom.cart.v2.CurrentCartService.AddGiftCardToCurrentCart
|
|
4216
4216
|
*/
|
|
4217
|
-
declare function addGiftCardToCurrentCart(
|
|
4217
|
+
declare function addGiftCardToCurrentCart(giftCard: NonNullablePaths<GiftCardInput, `code`, 2>): Promise<NonNullablePaths<AddGiftCardToCurrentCartResponse, `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>>;
|
|
4218
4218
|
/**
|
|
4219
4219
|
* Removes a gift card from the Current Cart.
|
|
4220
4220
|
* @param giftCardId - Gift card ID.
|
|
@@ -4227,4 +4227,4 @@ declare function addGiftCardToCurrentCart(giftCardCode: string): Promise<NonNull
|
|
|
4227
4227
|
*/
|
|
4228
4228
|
declare function removeGiftCardFromCurrentCart(giftCardId: string): Promise<NonNullablePaths<RemoveGiftCardFromCurrentCartResponse, `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>>;
|
|
4229
4229
|
|
|
4230
|
-
export { type ActionEvent, type AddCouponRequest, type AddCouponResponse, type AddCouponToCurrentCartRequest, type AddCouponToCurrentCartResponse, type AddGiftCardRequest, type AddGiftCardResponse, type AddGiftCardToCurrentCartRequest, type AddGiftCardToCurrentCartResponse, type AddLineItemsRequest, type AddLineItemsResponse, type AddLineItemsToCurrentCartOptions, 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 CalculateCartRequest, type CalculateCartResponse, type CalculateCurrentCartOptions, 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 CreateCartRequest, type CreateCartResponse, type CreateCurrentCartOptions, 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 GetCartRequest, type GetCartResponse, type GetCheckoutURLRequest, type GetCheckoutURLResponse, 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, 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 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 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 UpdateCartRequest, type UpdateCartResponse, type UpdateCurrentCartRequest, type UpdateCurrentCartResponse, type UpdateLineItemsInCurrentCartOptions, type UpdateLineItemsInCurrentCartRequest, type UpdateLineItemsInCurrentCartResponse, 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, addCouponToCurrentCart, addGiftCardToCurrentCart, addLineItemsToCurrentCart, calculateCurrentCart, createCurrentCart, deleteCurrentCart, getCurrentCart, refreshCurrentCart, removeCouponFromCurrentCart, removeGiftCardFromCurrentCart, removeLineItemsFromCurrentCart, setDeliveryMethodForCurrentCart, updateCurrentCart, updateLineItemsInCurrentCart };
|
|
4230
|
+
export { type ActionEvent, type AddCouponRequest, type AddCouponResponse, type AddCouponToCurrentCartRequest, type AddCouponToCurrentCartResponse, type AddGiftCardRequest, type AddGiftCardResponse, type AddGiftCardToCurrentCartRequest, type AddGiftCardToCurrentCartResponse, type AddLineItemsRequest, type AddLineItemsResponse, type AddLineItemsToCurrentCartOptions, 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 CalculateCartRequest, type CalculateCartResponse, type CalculateCurrentCartOptions, 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 CreateCartRequest, type CreateCartResponse, type CreateCurrentCartOptions, 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 GetCartRequest, type GetCartResponse, type GetCheckoutURLRequest, type GetCheckoutURLResponse, 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 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 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 UpdateCartRequest, type UpdateCartResponse, type UpdateCurrentCartRequest, type UpdateCurrentCartResponse, type UpdateLineItemsInCurrentCartOptions, type UpdateLineItemsInCurrentCartRequest, type UpdateLineItemsInCurrentCartResponse, 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, addCouponToCurrentCart, addGiftCardToCurrentCart, addLineItemsToCurrentCart, calculateCurrentCart, createCurrentCart, deleteCurrentCart, getCurrentCart, refreshCurrentCart, removeCouponFromCurrentCart, removeGiftCardFromCurrentCart, removeLineItemsFromCurrentCart, setDeliveryMethodForCurrentCart, updateCurrentCart, updateLineItemsInCurrentCart };
|
|
@@ -1212,9 +1212,9 @@ async function createCurrentCart2(options) {
|
|
|
1212
1212
|
cart: options?.cart,
|
|
1213
1213
|
catalogItems: options?.catalogItems,
|
|
1214
1214
|
customItems: options?.customItems,
|
|
1215
|
-
|
|
1215
|
+
coupons: options?.coupons,
|
|
1216
1216
|
deliveryMethod: options?.deliveryMethod,
|
|
1217
|
-
|
|
1217
|
+
giftCards: options?.giftCards
|
|
1218
1218
|
}),
|
|
1219
1219
|
[
|
|
1220
1220
|
{
|
|
@@ -1278,9 +1278,9 @@ async function createCurrentCart2(options) {
|
|
|
1278
1278
|
cart: "$[0].cart",
|
|
1279
1279
|
catalogItems: "$[0].catalogItems",
|
|
1280
1280
|
customItems: "$[0].customItems",
|
|
1281
|
-
|
|
1281
|
+
coupons: "$[0].coupons",
|
|
1282
1282
|
deliveryMethod: "$[0].deliveryMethod",
|
|
1283
|
-
|
|
1283
|
+
giftCards: "$[0].giftCards"
|
|
1284
1284
|
},
|
|
1285
1285
|
singleArgumentUnchanged: false
|
|
1286
1286
|
},
|
|
@@ -1675,11 +1675,9 @@ async function updateLineItemsInCurrentCart2(options) {
|
|
|
1675
1675
|
throw transformedError;
|
|
1676
1676
|
}
|
|
1677
1677
|
}
|
|
1678
|
-
async function addCouponToCurrentCart2(
|
|
1678
|
+
async function addCouponToCurrentCart2(coupon) {
|
|
1679
1679
|
const { httpClient, sideEffects } = arguments[1];
|
|
1680
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1681
|
-
couponCode
|
|
1682
|
-
});
|
|
1680
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ coupon });
|
|
1683
1681
|
const reqOpts = addCouponToCurrentCart(payload);
|
|
1684
1682
|
sideEffects?.onSiteCall?.();
|
|
1685
1683
|
try {
|
|
@@ -1712,10 +1710,10 @@ async function addCouponToCurrentCart2(couponCode) {
|
|
|
1712
1710
|
err,
|
|
1713
1711
|
{
|
|
1714
1712
|
spreadPathsToArguments: {},
|
|
1715
|
-
explicitPathsToArguments: {
|
|
1713
|
+
explicitPathsToArguments: { coupon: "$[0]" },
|
|
1716
1714
|
singleArgumentUnchanged: false
|
|
1717
1715
|
},
|
|
1718
|
-
["
|
|
1716
|
+
["coupon"]
|
|
1719
1717
|
);
|
|
1720
1718
|
sideEffects?.onError?.(err);
|
|
1721
1719
|
throw transformedError;
|
|
@@ -1811,11 +1809,9 @@ async function setDeliveryMethodForCurrentCart2(deliveryMethod) {
|
|
|
1811
1809
|
throw transformedError;
|
|
1812
1810
|
}
|
|
1813
1811
|
}
|
|
1814
|
-
async function addGiftCardToCurrentCart2(
|
|
1812
|
+
async function addGiftCardToCurrentCart2(giftCard) {
|
|
1815
1813
|
const { httpClient, sideEffects } = arguments[1];
|
|
1816
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1817
|
-
giftCardCode
|
|
1818
|
-
});
|
|
1814
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ giftCard });
|
|
1819
1815
|
const reqOpts = addGiftCardToCurrentCart(payload);
|
|
1820
1816
|
sideEffects?.onSiteCall?.();
|
|
1821
1817
|
try {
|
|
@@ -1848,10 +1844,10 @@ async function addGiftCardToCurrentCart2(giftCardCode) {
|
|
|
1848
1844
|
err,
|
|
1849
1845
|
{
|
|
1850
1846
|
spreadPathsToArguments: {},
|
|
1851
|
-
explicitPathsToArguments: {
|
|
1847
|
+
explicitPathsToArguments: { giftCard: "$[0]" },
|
|
1852
1848
|
singleArgumentUnchanged: false
|
|
1853
1849
|
},
|
|
1854
|
-
["
|
|
1850
|
+
["giftCard"]
|
|
1855
1851
|
);
|
|
1856
1852
|
sideEffects?.onError?.(err);
|
|
1857
1853
|
throw transformedError;
|