@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 +1 @@
|
|
|
1
|
-
export { ActionEvent, AddCouponRequest, AddCouponResponse, AddCouponToCurrentCartRequest, AddCouponToCurrentCartResponse, AddGiftCardRequest, AddGiftCardResponse, AddGiftCardToCurrentCartRequest, AddGiftCardToCurrentCartResponse, AddLineItemsRequest, AddLineItemsResponse, AddLineItemsToCurrentCartOptions, AddLineItemsToCurrentCartRequest, AddLineItemsToCurrentCartResponse, AdditionalFee, AdditionalFeeSource, AdditionalFeeSourceWithLiterals, AdditionalFeeTax, Address, AddressLocation, AggregatedTaxBreakdown, ApplicableLineItems, ApplicationError, AppliedDiscount, AppliedDiscountDiscountSourceOneOf, AutoTaxFallbackCalculationDetails, BusinessInfo, CalculateCartForV1Request, CalculateCartForV1Response, CalculateCartRequest, CalculateCartResponse, CalculateCurrentCartOptions, CalculateCurrentCartRequest, CalculateCurrentCartResponse, CalculateTotalsResponse, CalculatedItemModifier, CalculatedLineItem, CalculationConfig, CalculationErrors, CalculationErrorsShippingCalculationErrorOneOf, Carrier, CarrierError, CarrierErrors, CarrierServiceOption, Cart, CartSettings, CartSource, CartSummary, CatalogItemInput, CatalogOverrideFields, CatalogReference, ChannelType, ChannelTypeWithLiterals, Charge, ChargeType, ChargeTypeWithLiterals, CheckoutStage, CheckoutStageWithLiterals, Color, ConvertedMoney, Coupon, CreateCartRequest, CreateCartResponse, CreateCurrentCartOptions, CreateCurrentCartRequest, CreateCurrentCartResponse, CreatedBy, CreatedByIdOneOf, CustomContentReference, CustomField, CustomItemAttributes, CustomItemDeliveryConfig, CustomItemInput, CustomItemPaymentConfig, CustomItemPricingInfo, CustomItemQuantityInfo, CustomItemSource, CustomItemTaxConfig, CustomerInfo, CustomerInfoIdOneOf, DeleteCartRequest, DeleteCartResponse, DeleteCurrentCartRequest, DeleteCurrentCartResponse, DeliveryAllocation, DeliveryInfo, DeliveryLogistics, DeliveryMethod, DeliveryMethodInput, 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, GetCurrentCartResponse, 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, RefreshCurrentCartResponse, Region, RemoveCouponFromCurrentCartRequest, RemoveCouponFromCurrentCartResponse, RemoveCouponRequest, RemoveCouponResponse, RemoveGiftCardFromCurrentCartRequest, RemoveGiftCardFromCurrentCartResponse, RemoveGiftCardRequest, RemoveGiftCardResponse, RemoveLineItemsFromCurrentCartRequest, RemoveLineItemsFromCurrentCartResponse, RemoveLineItemsRequest, RemoveLineItemsResponse, RestoreInfo, RuleType, RuleTypeWithLiterals, Scope, SecuredMedia, SelectedCarrierServiceOption, SelectedCarrierServiceOptionOtherCharge, SelectedCarrierServiceOptionPrices, SelectedMembership, SelectedMembershipUpdate, ServiceProperties, SetDeliveryMethodForCurrentCartRequest, SetDeliveryMethodForCurrentCartResponse, 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, UpdateCurrentCartResponse, UpdateLineItemsInCurrentCartOptions, UpdateLineItemsInCurrentCartRequest, UpdateLineItemsInCurrentCartResponse, 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.js';
|
|
1
|
+
export { ActionEvent, AddCouponRequest, AddCouponResponse, AddCouponToCurrentCartRequest, AddCouponToCurrentCartResponse, AddGiftCardRequest, AddGiftCardResponse, AddGiftCardToCurrentCartRequest, AddGiftCardToCurrentCartResponse, AddLineItemsRequest, AddLineItemsResponse, AddLineItemsToCurrentCartOptions, AddLineItemsToCurrentCartRequest, AddLineItemsToCurrentCartResponse, AdditionalFee, AdditionalFeeSource, AdditionalFeeSourceWithLiterals, AdditionalFeeTax, Address, AddressLocation, AggregatedTaxBreakdown, ApplicableLineItems, ApplicationError, AppliedDiscount, AppliedDiscountDiscountSourceOneOf, AutoTaxFallbackCalculationDetails, BusinessInfo, CalculateCartForV1Request, CalculateCartForV1Response, CalculateCartRequest, CalculateCartResponse, CalculateCurrentCartOptions, CalculateCurrentCartRequest, CalculateCurrentCartResponse, CalculateTotalsResponse, CalculatedItemModifier, CalculatedLineItem, CalculationConfig, CalculationErrors, CalculationErrorsShippingCalculationErrorOneOf, Carrier, CarrierError, CarrierErrors, CarrierServiceOption, Cart, CartSettings, CartSource, CartSummary, CatalogItemInput, CatalogOverrideFields, CatalogReference, ChannelType, ChannelTypeWithLiterals, Charge, ChargeType, ChargeTypeWithLiterals, CheckoutStage, CheckoutStageWithLiterals, Color, ConvertedMoney, Coupon, CouponInput, CreateCartRequest, CreateCartResponse, CreateCurrentCartOptions, CreateCurrentCartRequest, CreateCurrentCartResponse, CreatedBy, CreatedByIdOneOf, CustomContentReference, CustomField, CustomItemAttributes, CustomItemDeliveryConfig, CustomItemInput, CustomItemPaymentConfig, CustomItemPricingInfo, CustomItemQuantityInfo, CustomItemSource, CustomItemTaxConfig, CustomerInfo, CustomerInfoIdOneOf, DeleteCartRequest, DeleteCartResponse, DeleteCurrentCartRequest, DeleteCurrentCartResponse, DeliveryAllocation, DeliveryInfo, DeliveryLogistics, DeliveryMethod, DeliveryMethodInput, 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, GetCurrentCartResponse, GiftCard, GiftCardInput, 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, RefreshCurrentCartResponse, Region, RemoveCouponFromCurrentCartRequest, RemoveCouponFromCurrentCartResponse, RemoveCouponRequest, RemoveCouponResponse, RemoveGiftCardFromCurrentCartRequest, RemoveGiftCardFromCurrentCartResponse, RemoveGiftCardRequest, RemoveGiftCardResponse, RemoveLineItemsFromCurrentCartRequest, RemoveLineItemsFromCurrentCartResponse, RemoveLineItemsRequest, RemoveLineItemsResponse, RestoreInfo, RuleType, RuleTypeWithLiterals, Scope, SecuredMedia, SelectedCarrierServiceOption, SelectedCarrierServiceOptionOtherCharge, SelectedCarrierServiceOptionPrices, SelectedMembership, SelectedMembershipUpdate, ServiceProperties, SetDeliveryMethodForCurrentCartRequest, SetDeliveryMethodForCurrentCartResponse, 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, UpdateCurrentCartResponse, UpdateLineItemsInCurrentCartOptions, UpdateLineItemsInCurrentCartRequest, UpdateLineItemsInCurrentCartResponse, 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.js';
|
|
@@ -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;
|