@wix/auto_sdk_ecom_current-cart-v-2 1.0.38 → 1.0.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +36 -38
- package/build/cjs/index.js +26 -30
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1 -1
- package/build/cjs/index.typings.js +22 -26
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +34 -32
- package/build/cjs/meta.js +10 -10
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +36 -38
- package/build/es/index.mjs +25 -29
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +1 -1
- package/build/es/index.typings.mjs +21 -25
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +34 -32
- package/build/es/meta.mjs +9 -9
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +5 -5
- package/build/internal/cjs/index.js +26 -30
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +44 -44
- package/build/internal/cjs/index.typings.js +22 -26
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +34 -32
- package/build/internal/cjs/meta.js +10 -10
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +5 -5
- package/build/internal/es/index.mjs +25 -29
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +44 -44
- package/build/internal/es/index.typings.mjs +21 -25
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +34 -32
- package/build/internal/es/meta.mjs +9 -9
- 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,
|
|
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.mjs';
|
|
@@ -941,14 +941,14 @@ var PaymentOptionType = /* @__PURE__ */ ((PaymentOptionType2) => {
|
|
|
941
941
|
PaymentOptionType2["MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER"] = "MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER";
|
|
942
942
|
return PaymentOptionType2;
|
|
943
943
|
})(PaymentOptionType || {});
|
|
944
|
-
var
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
return
|
|
951
|
-
})(
|
|
944
|
+
var ItemTypePreset = /* @__PURE__ */ ((ItemTypePreset2) => {
|
|
945
|
+
ItemTypePreset2["UNRECOGNISED"] = "UNRECOGNISED";
|
|
946
|
+
ItemTypePreset2["PHYSICAL"] = "PHYSICAL";
|
|
947
|
+
ItemTypePreset2["DIGITAL"] = "DIGITAL";
|
|
948
|
+
ItemTypePreset2["GIFT_CARD"] = "GIFT_CARD";
|
|
949
|
+
ItemTypePreset2["SERVICE"] = "SERVICE";
|
|
950
|
+
return ItemTypePreset2;
|
|
951
|
+
})(ItemTypePreset || {});
|
|
952
952
|
var SubscriptionFrequency = /* @__PURE__ */ ((SubscriptionFrequency2) => {
|
|
953
953
|
SubscriptionFrequency2["UNDEFINED"] = "UNDEFINED";
|
|
954
954
|
SubscriptionFrequency2["DAY"] = "DAY";
|
|
@@ -1148,9 +1148,9 @@ async function createCurrentCart2(options) {
|
|
|
1148
1148
|
cart: options?.cart,
|
|
1149
1149
|
catalogItems: options?.catalogItems,
|
|
1150
1150
|
customItems: options?.customItems,
|
|
1151
|
-
|
|
1151
|
+
coupons: options?.coupons,
|
|
1152
1152
|
deliveryMethod: options?.deliveryMethod,
|
|
1153
|
-
|
|
1153
|
+
giftCards: options?.giftCards
|
|
1154
1154
|
}),
|
|
1155
1155
|
[
|
|
1156
1156
|
{
|
|
@@ -1214,9 +1214,9 @@ async function createCurrentCart2(options) {
|
|
|
1214
1214
|
cart: "$[0].cart",
|
|
1215
1215
|
catalogItems: "$[0].catalogItems",
|
|
1216
1216
|
customItems: "$[0].customItems",
|
|
1217
|
-
|
|
1217
|
+
coupons: "$[0].coupons",
|
|
1218
1218
|
deliveryMethod: "$[0].deliveryMethod",
|
|
1219
|
-
|
|
1219
|
+
giftCards: "$[0].giftCards"
|
|
1220
1220
|
},
|
|
1221
1221
|
singleArgumentUnchanged: false
|
|
1222
1222
|
},
|
|
@@ -1611,11 +1611,9 @@ async function updateLineItemsInCurrentCart2(options) {
|
|
|
1611
1611
|
throw transformedError;
|
|
1612
1612
|
}
|
|
1613
1613
|
}
|
|
1614
|
-
async function addCouponToCurrentCart2(
|
|
1614
|
+
async function addCouponToCurrentCart2(coupon) {
|
|
1615
1615
|
const { httpClient, sideEffects } = arguments[1];
|
|
1616
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1617
|
-
couponCode
|
|
1618
|
-
});
|
|
1616
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({ coupon });
|
|
1619
1617
|
const reqOpts = addCouponToCurrentCart(payload);
|
|
1620
1618
|
sideEffects?.onSiteCall?.();
|
|
1621
1619
|
try {
|
|
@@ -1648,10 +1646,10 @@ async function addCouponToCurrentCart2(couponCode) {
|
|
|
1648
1646
|
err,
|
|
1649
1647
|
{
|
|
1650
1648
|
spreadPathsToArguments: {},
|
|
1651
|
-
explicitPathsToArguments: {
|
|
1649
|
+
explicitPathsToArguments: { coupon: "$[0]" },
|
|
1652
1650
|
singleArgumentUnchanged: false
|
|
1653
1651
|
},
|
|
1654
|
-
["
|
|
1652
|
+
["coupon"]
|
|
1655
1653
|
);
|
|
1656
1654
|
sideEffects?.onError?.(err);
|
|
1657
1655
|
throw transformedError;
|
|
@@ -1747,11 +1745,9 @@ async function setDeliveryMethodForCurrentCart2(deliveryMethod) {
|
|
|
1747
1745
|
throw transformedError;
|
|
1748
1746
|
}
|
|
1749
1747
|
}
|
|
1750
|
-
async function addGiftCardToCurrentCart2(
|
|
1748
|
+
async function addGiftCardToCurrentCart2(giftCard) {
|
|
1751
1749
|
const { httpClient, sideEffects } = arguments[1];
|
|
1752
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1753
|
-
giftCardCode
|
|
1754
|
-
});
|
|
1750
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({ giftCard });
|
|
1755
1751
|
const reqOpts = addGiftCardToCurrentCart(payload);
|
|
1756
1752
|
sideEffects?.onSiteCall?.();
|
|
1757
1753
|
try {
|
|
@@ -1784,10 +1780,10 @@ async function addGiftCardToCurrentCart2(giftCardCode) {
|
|
|
1784
1780
|
err,
|
|
1785
1781
|
{
|
|
1786
1782
|
spreadPathsToArguments: {},
|
|
1787
|
-
explicitPathsToArguments: {
|
|
1783
|
+
explicitPathsToArguments: { giftCard: "$[0]" },
|
|
1788
1784
|
singleArgumentUnchanged: false
|
|
1789
1785
|
},
|
|
1790
|
-
["
|
|
1786
|
+
["giftCard"]
|
|
1791
1787
|
);
|
|
1792
1788
|
sideEffects?.onError?.(err);
|
|
1793
1789
|
throw transformedError;
|
|
@@ -1851,7 +1847,7 @@ export {
|
|
|
1851
1847
|
FallbackReason,
|
|
1852
1848
|
FileType,
|
|
1853
1849
|
ItemStatus,
|
|
1854
|
-
|
|
1850
|
+
ItemTypePreset,
|
|
1855
1851
|
JurisdictionType,
|
|
1856
1852
|
ManualCalculationReason,
|
|
1857
1853
|
NameInLineItem,
|