@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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
-
import { CreateCurrentCartOptions, CreateCurrentCartResponse, GetCurrentCartResponse, Cart, UpdateCurrentCartResponse, RefreshCurrentCartResponse, CalculateCurrentCartOptions, CalculateCurrentCartResponse, AddLineItemsToCurrentCartOptions, AddLineItemsToCurrentCartResponse, RemoveLineItemsFromCurrentCartResponse, UpdateLineItemsInCurrentCartOptions, UpdateLineItemsInCurrentCartResponse, AddCouponToCurrentCartResponse, RemoveCouponFromCurrentCartResponse, DeliveryMethodInput, SetDeliveryMethodForCurrentCartResponse, AddGiftCardToCurrentCartResponse, RemoveGiftCardFromCurrentCartResponse } from './index.typings.js';
|
|
2
|
+
import { CreateCurrentCartOptions, CreateCurrentCartResponse, GetCurrentCartResponse, Cart, UpdateCurrentCartResponse, RefreshCurrentCartResponse, CalculateCurrentCartOptions, CalculateCurrentCartResponse, AddLineItemsToCurrentCartOptions, AddLineItemsToCurrentCartResponse, RemoveLineItemsFromCurrentCartResponse, UpdateLineItemsInCurrentCartOptions, UpdateLineItemsInCurrentCartResponse, CouponInput, AddCouponToCurrentCartResponse, RemoveCouponFromCurrentCartResponse, DeliveryMethodInput, SetDeliveryMethodForCurrentCartResponse, GiftCardInput, AddGiftCardToCurrentCartResponse, RemoveGiftCardFromCurrentCartResponse } from './index.typings.js';
|
|
3
3
|
export { ActionEvent, AddCouponRequest, AddCouponResponse, AddCouponToCurrentCartRequest, AddGiftCardRequest, AddGiftCardResponse, AddGiftCardToCurrentCartRequest, AddLineItemsRequest, AddLineItemsResponse, AddLineItemsToCurrentCartRequest, AdditionalFee, AdditionalFeeSource, AdditionalFeeSourceWithLiterals, AdditionalFeeTax, Address, AddressLocation, AggregatedTaxBreakdown, ApplicableLineItems, ApplicationError, AppliedDiscount, AppliedDiscountDiscountSourceOneOf, AutoTaxFallbackCalculationDetails, BusinessInfo, CalculateCartForV1Request, CalculateCartForV1Response, CalculateCartRequest, CalculateCartResponse, CalculateCurrentCartRequest, CalculateTotalsResponse, CalculatedItemModifier, CalculatedLineItem, CalculationConfig, CalculationErrors, CalculationErrorsShippingCalculationErrorOneOf, Carrier, CarrierError, CarrierErrors, CarrierServiceOption, CartSettings, CartSource, CartSummary, CatalogItemInput, CatalogOverrideFields, CatalogReference, ChannelType, ChannelTypeWithLiterals, Charge, ChargeType, ChargeTypeWithLiterals, CheckoutStage, CheckoutStageWithLiterals, Color, ConvertedMoney, Coupon, CreateCartRequest, CreateCartResponse, CreateCurrentCartRequest, CreatedBy, CreatedByIdOneOf, CustomContentReference, CustomField, CustomItemAttributes, CustomItemDeliveryConfig, CustomItemInput, CustomItemPaymentConfig, CustomItemPricingInfo, CustomItemQuantityInfo, CustomItemSource, CustomItemTaxConfig, CustomerInfo, CustomerInfoIdOneOf, DeleteCartRequest, DeleteCartResponse, DeleteCurrentCartRequest, DeleteCurrentCartResponse, DeliveryAllocation, DeliveryInfo, DeliveryLogistics, DeliveryMethod, DeliverySummary, DeliveryTimeSlot, Description, DescriptionLine, DescriptionLineDescriptionLineValueOneOf, DescriptionLineName, DescriptionLineType, DescriptionLineTypeWithLiterals, DescriptionLineValueOneOf, Details, DetailsKindOneOf, Discount, DiscountBenefit, DiscountBenefitValueOneOf, DiscountRule, DiscountRuleName, DiscountScope, DiscountScopeWithLiterals, DiscountSource, DiscountSourceType, DiscountSourceTypeWithLiterals, DiscountType, DiscountTypeWithLiterals, DomainEvent, DomainEventBodyOneOf, DummyErrorDataMethodLevel, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, ExtendedFields, ExternalReference, FallbackReason, FallbackReasonWithLiterals, FieldViolation, FileType, FileTypeWithLiterals, FreeTrialPeriod, FullAddressContactDetails, GetCartRequest, GetCartResponse, GetCheckoutURLRequest, GetCheckoutURLResponse, GetCurrentCartRequest, GiftCard, GiftCardSummary, Group, HandleAsyncCheckoutCompletionRequest, HeadersEntry, IdentificationData, IdentificationDataIdOneOf, InvalidMembership, ItemAttributes, ItemDeliveryConfig, ItemDiscount, ItemModifier, ItemPaymentConfig, ItemPriceBreakdown, ItemPricingInfo, ItemQuantityInfo, ItemSource, ItemStatus, ItemStatusWithLiterals, ItemTaxConfig, ItemTaxFullDetails, ItemType, ItemTypeItemTypeDataOneOf, ItemTypePreset, ItemTypePresetWithLiterals, JurisdictionType, JurisdictionTypeWithLiterals, LegacyFields, LineItem, LineItemDiscount, LineItemIdentifier, LineItemIdentifierIdOneOf, LineItemPricesData, LineItemSummary, LineItemTax, LineItemUpdate, ManualCalculationReason, ManualCalculationReasonWithLiterals, MarkCartAsCompletedRequest, MarkCartAsCompletedResponse, Membership, MembershipName, MembershipOptions, MembershipPaymentCredits, MerchantDiscount, MessageEnvelope, ModifierGroup, MultiCurrencyPrice, NameInLineItem, NameInLineItemWithLiterals, NameInOther, NameInOtherWithLiterals, Other, OtherCharge, PaymentInfo, PaymentOption, PaymentOptionType, PaymentOptionTypeWithLiterals, PaymentSummary, PhysicalProperties, PickupDetails, PickupMethod, PickupMethodWithLiterals, PlaceOrderRequest, PlaceOrderResponse, PlainTextValue, Policy, PriceDescription, PriceSummary, QuantityUpdate, RateType, RateTypeWithLiterals, RawHttpResponse, RedirectUrls, RefreshCartRequest, RefreshCartResponse, RefreshCurrentCartRequest, Region, RemoveCouponFromCurrentCartRequest, RemoveCouponRequest, RemoveCouponResponse, RemoveGiftCardFromCurrentCartRequest, RemoveGiftCardRequest, RemoveGiftCardResponse, RemoveLineItemsFromCurrentCartRequest, RemoveLineItemsRequest, RemoveLineItemsResponse, RestoreInfo, RuleType, RuleTypeWithLiterals, Scope, SecuredMedia, SelectedCarrierServiceOption, SelectedCarrierServiceOptionOtherCharge, SelectedCarrierServiceOptionPrices, SelectedMembership, SelectedMembershipUpdate, ServiceProperties, SetDeliveryMethodForCurrentCartRequest, SetDeliveryMethodRequest, SetDeliveryMethodResponse, Severity, SeverityWithLiterals, ShippingInformation, ShippingOption, ShippingPrice, ShippingRegion, Stage, StageStagesOneOf, StreetAddress, SubscriptionCharges, SubscriptionFrequency, SubscriptionFrequencyWithLiterals, SubscriptionOptionInfo, SubscriptionSettings, SuggestedFix, SuggestedFixWithLiterals, SystemError, Target, TargetTargetTypeOneOf, Tax, TaxBreakdown, TaxCalculationDetails, TaxCalculationDetailsCalculationDetailsOneOf, TaxDetails, TaxInfo, TaxRateBreakdown, TaxSummary, TaxableAddress, TaxableAddressTaxableAddressDataOneOf, TaxableAddressType, TaxableAddressTypeWithLiterals, Title, TranslatableString, UnmarkAsCurrentCartRequest, UnmarkAsCurrentCartResponse, UpdateCartRequest, UpdateCartResponse, UpdateCurrentCartRequest, UpdateLineItemsInCurrentCartRequest, UpdateLineItemsRequest, UpdateLineItemsResponse, V1AdditionalFee, V2AdditionalFee, V2CalculationErrors, V2CalculationErrorsShippingCalculationErrorOneOf, V2CarrierError, V2CarrierErrors, V2Coupon, V2GiftCard, V2LineItem, V2Membership, V2PriceSummary, V2SelectedMembership, V2TaxSummary, ValidationError, ValidationsConfig, ValidationsConfigWithLiterals, VatId, VatType, VatTypeWithLiterals, Violation, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WeightUnit, WeightUnitWithLiterals } from './index.typings.js';
|
|
4
4
|
|
|
5
5
|
/** @internal */
|
|
@@ -91,7 +91,7 @@ interface AddCouponToCurrentCartSignature {
|
|
|
91
91
|
*
|
|
92
92
|
* Currently only one is supported.
|
|
93
93
|
*/
|
|
94
|
-
(
|
|
94
|
+
(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>>;
|
|
95
95
|
}
|
|
96
96
|
/** @internal */
|
|
97
97
|
declare function removeCouponFromCurrentCart$1(httpClient: HttpClient): RemoveCouponFromCurrentCartSignature;
|
|
@@ -121,7 +121,7 @@ interface AddGiftCardToCurrentCartSignature {
|
|
|
121
121
|
*
|
|
122
122
|
* Currently only one is supported.
|
|
123
123
|
*/
|
|
124
|
-
(
|
|
124
|
+
(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>>;
|
|
125
125
|
}
|
|
126
126
|
/** @internal */
|
|
127
127
|
declare function removeGiftCardFromCurrentCart$1(httpClient: HttpClient): RemoveGiftCardFromCurrentCartSignature;
|
|
@@ -162,4 +162,4 @@ declare const addGiftCardToCurrentCart: MaybeContext<BuildRESTFunction<typeof ad
|
|
|
162
162
|
/** @internal */
|
|
163
163
|
declare const removeGiftCardFromCurrentCart: MaybeContext<BuildRESTFunction<typeof removeGiftCardFromCurrentCart$1> & typeof removeGiftCardFromCurrentCart$1>;
|
|
164
164
|
|
|
165
|
-
export { AddCouponToCurrentCartResponse, AddGiftCardToCurrentCartResponse, AddLineItemsToCurrentCartOptions, AddLineItemsToCurrentCartResponse, CalculateCurrentCartOptions, CalculateCurrentCartResponse, Cart, CreateCurrentCartOptions, CreateCurrentCartResponse, DeliveryMethodInput, GetCurrentCartResponse, RefreshCurrentCartResponse, RemoveCouponFromCurrentCartResponse, RemoveGiftCardFromCurrentCartResponse, RemoveLineItemsFromCurrentCartResponse, SetDeliveryMethodForCurrentCartResponse, UpdateCurrentCartResponse, UpdateLineItemsInCurrentCartOptions, UpdateLineItemsInCurrentCartResponse, addCouponToCurrentCart, addGiftCardToCurrentCart, addLineItemsToCurrentCart, calculateCurrentCart, createCurrentCart, deleteCurrentCart, getCurrentCart, refreshCurrentCart, removeCouponFromCurrentCart, removeGiftCardFromCurrentCart, removeLineItemsFromCurrentCart, setDeliveryMethodForCurrentCart, updateCurrentCart, updateLineItemsInCurrentCart };
|
|
165
|
+
export { AddCouponToCurrentCartResponse, AddGiftCardToCurrentCartResponse, AddLineItemsToCurrentCartOptions, AddLineItemsToCurrentCartResponse, CalculateCurrentCartOptions, CalculateCurrentCartResponse, Cart, CouponInput, CreateCurrentCartOptions, CreateCurrentCartResponse, DeliveryMethodInput, GetCurrentCartResponse, GiftCardInput, RefreshCurrentCartResponse, RemoveCouponFromCurrentCartResponse, RemoveGiftCardFromCurrentCartResponse, RemoveLineItemsFromCurrentCartResponse, SetDeliveryMethodForCurrentCartResponse, UpdateCurrentCartResponse, UpdateLineItemsInCurrentCartOptions, UpdateLineItemsInCurrentCartResponse, 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;
|
|
@@ -1966,8 +1962,8 @@ function updateLineItemsInCurrentCart3(httpClient) {
|
|
|
1966
1962
|
);
|
|
1967
1963
|
}
|
|
1968
1964
|
function addCouponToCurrentCart3(httpClient) {
|
|
1969
|
-
return (
|
|
1970
|
-
|
|
1965
|
+
return (coupon) => addCouponToCurrentCart2(
|
|
1966
|
+
coupon,
|
|
1971
1967
|
// @ts-ignore
|
|
1972
1968
|
{ httpClient }
|
|
1973
1969
|
);
|
|
@@ -1987,8 +1983,8 @@ function setDeliveryMethodForCurrentCart3(httpClient) {
|
|
|
1987
1983
|
);
|
|
1988
1984
|
}
|
|
1989
1985
|
function addGiftCardToCurrentCart3(httpClient) {
|
|
1990
|
-
return (
|
|
1991
|
-
|
|
1986
|
+
return (giftCard) => addGiftCardToCurrentCart2(
|
|
1987
|
+
giftCard,
|
|
1992
1988
|
// @ts-ignore
|
|
1993
1989
|
{ httpClient }
|
|
1994
1990
|
);
|