@wix/auto_sdk_ecom_cart-v-2 1.0.39 → 1.0.41
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 +139 -4049
- package/build/cjs/index.js +16 -16
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +4374 -1
- package/build/cjs/index.typings.js +12 -12
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +32 -29
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +139 -4049
- package/build/es/index.mjs +16 -16
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +4374 -1
- package/build/es/index.typings.mjs +12 -12
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +32 -29
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +4 -40
- package/build/internal/cjs/index.js +16 -16
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +58 -58
- package/build/internal/cjs/index.typings.js +12 -12
- 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 -40
- package/build/internal/es/index.mjs +16 -16
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +58 -58
- package/build/internal/es/index.typings.mjs +12 -12
- 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. */
|
|
@@ -3987,7 +3989,7 @@ type GetCartApplicationErrors = {
|
|
|
3987
3989
|
};
|
|
3988
3990
|
/**
|
|
3989
3991
|
* Creates a Cart.
|
|
3990
|
-
* @
|
|
3992
|
+
* @public
|
|
3991
3993
|
* @documentationMaturity preview
|
|
3992
3994
|
* @requiredField options.catalogItems.catalogReference
|
|
3993
3995
|
* @requiredField options.catalogItems.quantity
|
|
@@ -4026,25 +4028,21 @@ 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
|
-
|
|
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
|
-
|
|
4040
|
+
giftCards?: GiftCardInput[];
|
|
4043
4041
|
}
|
|
4044
4042
|
/**
|
|
4045
4043
|
* Retrieves a Cart.
|
|
4046
4044
|
* @param cartId - ID of the Cart to retrieve.
|
|
4047
|
-
* @
|
|
4045
|
+
* @public
|
|
4048
4046
|
* @documentationMaturity preview
|
|
4049
4047
|
* @requiredField cartId
|
|
4050
4048
|
* @permissionId ecom:v2:cart:get_cart
|
|
@@ -4061,7 +4059,7 @@ declare function getCart(cartId: string): Promise<NonNullablePaths<Cart, `_id` |
|
|
|
4061
4059
|
* Use this endpoint to set and replace fields such as buyer note and delivery method.
|
|
4062
4060
|
* To add or remove elements from lists (e.g., line items, discounts, gift cards), use their dedicated endpoints.
|
|
4063
4061
|
* @param _id - Cart ID.
|
|
4064
|
-
* @
|
|
4062
|
+
* @public
|
|
4065
4063
|
* @documentationMaturity preview
|
|
4066
4064
|
* @requiredField _id
|
|
4067
4065
|
* @requiredField cart
|
|
@@ -4183,7 +4181,7 @@ interface UpdateCart {
|
|
|
4183
4181
|
/**
|
|
4184
4182
|
* Deletes a Cart.
|
|
4185
4183
|
* @param cartId - ID of the Cart to delete.
|
|
4186
|
-
* @
|
|
4184
|
+
* @public
|
|
4187
4185
|
* @documentationMaturity preview
|
|
4188
4186
|
* @requiredField cartId
|
|
4189
4187
|
* @permissionId ecom:v2:cart:delete_cart
|
|
@@ -4194,7 +4192,7 @@ declare function deleteCart(cartId: string): Promise<void>;
|
|
|
4194
4192
|
/**
|
|
4195
4193
|
* Re-evaluates prices, inventory and discounts to ensure the Cart is up-to-date with the latest changes.
|
|
4196
4194
|
* @param cartId - ID of the Cart to refresh.
|
|
4197
|
-
* @
|
|
4195
|
+
* @public
|
|
4198
4196
|
* @documentationMaturity preview
|
|
4199
4197
|
* @requiredField cartId
|
|
4200
4198
|
* @permissionId ecom:v2:cart:refresh_cart
|
|
@@ -4207,7 +4205,7 @@ declare function refreshCart(cartId: string): Promise<NonNullablePaths<RefreshCa
|
|
|
4207
4205
|
* and returns a detailed summary including subtotal, delivery costs, taxes, fees and the total price.
|
|
4208
4206
|
* Note that discounts are already pre-computed and applied to the Cart.
|
|
4209
4207
|
* @param cartId - ID of the Cart to calculate.
|
|
4210
|
-
* @
|
|
4208
|
+
* @public
|
|
4211
4209
|
* @documentationMaturity preview
|
|
4212
4210
|
* @requiredField cartId
|
|
4213
4211
|
* @permissionId ecom:v2:cart:calculate_cart
|
|
@@ -4239,7 +4237,7 @@ interface CalculateCartOptions {
|
|
|
4239
4237
|
* By default, this is the standard Wix checkout page.
|
|
4240
4238
|
* If `custom_checkout_url` is defined, it overrides the default and is returned as the checkout URL.
|
|
4241
4239
|
* @param cartId - ID of the Cart to calculate.
|
|
4242
|
-
* @
|
|
4240
|
+
* @public
|
|
4243
4241
|
* @documentationMaturity preview
|
|
4244
4242
|
* @requiredField cartId
|
|
4245
4243
|
* @permissionId ecom:v2:cart:get_checkout_url
|
|
@@ -4260,7 +4258,7 @@ interface GetCheckoutUrlOptions {
|
|
|
4260
4258
|
*
|
|
4261
4259
|
* Read more about the [eCommerce Orders API](https://dev.wix.com/api/rest/wix-ecommerce/orders-api/introduction).
|
|
4262
4260
|
* @param cartId - Cart ID.
|
|
4263
|
-
* @
|
|
4261
|
+
* @public
|
|
4264
4262
|
* @documentationMaturity preview
|
|
4265
4263
|
* @requiredField cartId
|
|
4266
4264
|
* @permissionId ecom:v2:cart:place_order
|
|
@@ -4290,7 +4288,7 @@ interface PlaceOrderOptions {
|
|
|
4290
4288
|
/**
|
|
4291
4289
|
* Adds line items to the Cart.
|
|
4292
4290
|
* @param cartId - Cart ID.
|
|
4293
|
-
* @
|
|
4291
|
+
* @public
|
|
4294
4292
|
* @documentationMaturity preview
|
|
4295
4293
|
* @requiredField cartId
|
|
4296
4294
|
* @requiredField options.catalogItems.catalogReference
|
|
@@ -4324,7 +4322,7 @@ interface AddLineItemsOptions {
|
|
|
4324
4322
|
* Removes line items from the Cart.
|
|
4325
4323
|
* @param cartId - Cart ID.
|
|
4326
4324
|
* @param lineItemIds - Line item IDs to remove from cart.
|
|
4327
|
-
* @
|
|
4325
|
+
* @public
|
|
4328
4326
|
* @documentationMaturity preview
|
|
4329
4327
|
* @requiredField cartId
|
|
4330
4328
|
* @requiredField lineItemIds
|
|
@@ -4337,7 +4335,7 @@ declare function removeLineItems(cartId: string, lineItemIds: string[]): Promise
|
|
|
4337
4335
|
* Updates line items in the Cart.
|
|
4338
4336
|
* Use this endpoint to update line items properties such as quantity and selected membership.
|
|
4339
4337
|
* @param cartId - Cart ID.
|
|
4340
|
-
* @
|
|
4338
|
+
* @public
|
|
4341
4339
|
* @documentationMaturity preview
|
|
4342
4340
|
* @requiredField cartId
|
|
4343
4341
|
* @requiredField options.lineItems.lineItemId
|
|
@@ -4358,23 +4356,24 @@ interface UpdateLineItemsOptions {
|
|
|
4358
4356
|
/**
|
|
4359
4357
|
* Adds a coupon to the Cart.
|
|
4360
4358
|
* @param cartId - Cart ID.
|
|
4361
|
-
* @param
|
|
4359
|
+
* @param coupon - Coupon to apply.
|
|
4362
4360
|
*
|
|
4363
4361
|
* Currently only one is supported.
|
|
4364
|
-
* @
|
|
4362
|
+
* @public
|
|
4365
4363
|
* @documentationMaturity preview
|
|
4366
4364
|
* @requiredField cartId
|
|
4367
|
-
* @requiredField
|
|
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,
|
|
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.
|
|
4376
4375
|
* @param couponId - Discount ID.
|
|
4377
|
-
* @
|
|
4376
|
+
* @public
|
|
4378
4377
|
* @documentationMaturity preview
|
|
4379
4378
|
* @requiredField cartId
|
|
4380
4379
|
* @requiredField couponId
|
|
@@ -4387,7 +4386,7 @@ declare function removeCoupon(cartId: string, couponId: string): Promise<NonNull
|
|
|
4387
4386
|
* Sets the delivery method for the Cart.
|
|
4388
4387
|
* @param cartId - Cart ID.
|
|
4389
4388
|
* @param deliveryMethod - Delivery method.
|
|
4390
|
-
* @
|
|
4389
|
+
* @public
|
|
4391
4390
|
* @documentationMaturity preview
|
|
4392
4391
|
* @requiredField cartId
|
|
4393
4392
|
* @requiredField deliveryMethod
|
|
@@ -4401,23 +4400,24 @@ 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
|
|
4403
|
+
* @param giftCard - Gift card code.
|
|
4405
4404
|
*
|
|
4406
4405
|
* Currently only one is supported.
|
|
4407
|
-
* @
|
|
4406
|
+
* @public
|
|
4408
4407
|
* @documentationMaturity preview
|
|
4409
4408
|
* @requiredField cartId
|
|
4410
|
-
* @requiredField
|
|
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,
|
|
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.
|
|
4419
4419
|
* @param giftCardId - Gift card ID.
|
|
4420
|
-
* @
|
|
4420
|
+
* @public
|
|
4421
4421
|
* @documentationMaturity preview
|
|
4422
4422
|
* @requiredField cartId
|
|
4423
4423
|
* @requiredField giftCardId
|
|
@@ -4431,7 +4431,7 @@ declare function removeGiftCard(cartId: string, giftCardId: string): Promise<Non
|
|
|
4431
4431
|
*
|
|
4432
4432
|
* Sets the `orderPlaced` field to `true`.
|
|
4433
4433
|
* @param cartId - Cart ID.
|
|
4434
|
-
* @
|
|
4434
|
+
* @public
|
|
4435
4435
|
* @documentationMaturity preview
|
|
4436
4436
|
* @requiredField cartId
|
|
4437
4437
|
* @permissionId ecom:v2:cart:update_cart
|
|
@@ -4452,7 +4452,7 @@ interface MarkCartAsCompletedOptions {
|
|
|
4452
4452
|
* Triggered by Wix Cashier after payment completion, this endpoint finalizes the checkout process and redirects the user to the previously provided success URL.
|
|
4453
4453
|
* In some cases, this endpoint might be called directly by the external payment provider.
|
|
4454
4454
|
* @param token - Server-signed JWT token with required information to complete checkout
|
|
4455
|
-
* @
|
|
4455
|
+
* @public
|
|
4456
4456
|
* @documentationMaturity preview
|
|
4457
4457
|
* @requiredField token
|
|
4458
4458
|
* @permissionId ecom:v2:cart:update_cart
|
|
@@ -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, 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 };
|
|
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 };
|
|
@@ -1339,9 +1339,9 @@ async function createCart2(options) {
|
|
|
1339
1339
|
cart: options?.cart,
|
|
1340
1340
|
catalogItems: options?.catalogItems,
|
|
1341
1341
|
customItems: options?.customItems,
|
|
1342
|
-
|
|
1342
|
+
coupons: options?.coupons,
|
|
1343
1343
|
deliveryMethod: options?.deliveryMethod,
|
|
1344
|
-
|
|
1344
|
+
giftCards: options?.giftCards
|
|
1345
1345
|
}),
|
|
1346
1346
|
[
|
|
1347
1347
|
{
|
|
@@ -1405,9 +1405,9 @@ async function createCart2(options) {
|
|
|
1405
1405
|
cart: "$[0].cart",
|
|
1406
1406
|
catalogItems: "$[0].catalogItems",
|
|
1407
1407
|
customItems: "$[0].customItems",
|
|
1408
|
-
|
|
1408
|
+
coupons: "$[0].coupons",
|
|
1409
1409
|
deliveryMethod: "$[0].deliveryMethod",
|
|
1410
|
-
|
|
1410
|
+
giftCards: "$[0].giftCards"
|
|
1411
1411
|
},
|
|
1412
1412
|
singleArgumentUnchanged: false
|
|
1413
1413
|
},
|
|
@@ -1877,11 +1877,11 @@ async function updateLineItems2(cartId, options) {
|
|
|
1877
1877
|
throw transformedError;
|
|
1878
1878
|
}
|
|
1879
1879
|
}
|
|
1880
|
-
async function addCoupon2(cartId,
|
|
1880
|
+
async function addCoupon2(cartId, coupon) {
|
|
1881
1881
|
const { httpClient, sideEffects } = arguments[2];
|
|
1882
1882
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1883
1883
|
cartId,
|
|
1884
|
-
|
|
1884
|
+
coupon
|
|
1885
1885
|
});
|
|
1886
1886
|
const reqOpts = addCoupon(payload);
|
|
1887
1887
|
sideEffects?.onSiteCall?.();
|
|
@@ -1915,10 +1915,10 @@ async function addCoupon2(cartId, couponCode) {
|
|
|
1915
1915
|
err,
|
|
1916
1916
|
{
|
|
1917
1917
|
spreadPathsToArguments: {},
|
|
1918
|
-
explicitPathsToArguments: { cartId: "$[0]",
|
|
1918
|
+
explicitPathsToArguments: { cartId: "$[0]", coupon: "$[1]" },
|
|
1919
1919
|
singleArgumentUnchanged: false
|
|
1920
1920
|
},
|
|
1921
|
-
["cartId", "
|
|
1921
|
+
["cartId", "coupon"]
|
|
1922
1922
|
);
|
|
1923
1923
|
sideEffects?.onError?.(err);
|
|
1924
1924
|
throw transformedError;
|
|
@@ -2018,11 +2018,11 @@ async function setDeliveryMethod2(cartId, deliveryMethod) {
|
|
|
2018
2018
|
throw transformedError;
|
|
2019
2019
|
}
|
|
2020
2020
|
}
|
|
2021
|
-
async function addGiftCard2(cartId,
|
|
2021
|
+
async function addGiftCard2(cartId, giftCard) {
|
|
2022
2022
|
const { httpClient, sideEffects } = arguments[2];
|
|
2023
2023
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
2024
2024
|
cartId,
|
|
2025
|
-
|
|
2025
|
+
giftCard
|
|
2026
2026
|
});
|
|
2027
2027
|
const reqOpts = addGiftCard(payload);
|
|
2028
2028
|
sideEffects?.onSiteCall?.();
|
|
@@ -2056,10 +2056,10 @@ async function addGiftCard2(cartId, giftCardCode) {
|
|
|
2056
2056
|
err,
|
|
2057
2057
|
{
|
|
2058
2058
|
spreadPathsToArguments: {},
|
|
2059
|
-
explicitPathsToArguments: { cartId: "$[0]",
|
|
2059
|
+
explicitPathsToArguments: { cartId: "$[0]", giftCard: "$[1]" },
|
|
2060
2060
|
singleArgumentUnchanged: false
|
|
2061
2061
|
},
|
|
2062
|
-
["cartId", "
|
|
2062
|
+
["cartId", "giftCard"]
|
|
2063
2063
|
);
|
|
2064
2064
|
sideEffects?.onError?.(err);
|
|
2065
2065
|
throw transformedError;
|