@wix/auto_sdk_ecom_current-cart-v-2 1.0.62 → 1.0.64
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 +25 -3
- package/build/cjs/index.js +125 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +178 -1
- package/build/cjs/index.typings.js +117 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +123 -2
- package/build/cjs/meta.js +77 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +25 -3
- package/build/es/index.mjs +124 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +178 -1
- package/build/es/index.typings.mjs +116 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +123 -2
- package/build/es/meta.mjs +76 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +25 -3
- package/build/internal/cjs/index.js +125 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +188 -1
- package/build/internal/cjs/index.typings.js +117 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +123 -2
- package/build/internal/cjs/meta.js +77 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +25 -3
- package/build/internal/es/index.mjs +124 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +188 -1
- package/build/internal/es/index.typings.mjs +116 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +123 -2
- package/build/internal/es/meta.mjs +76 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
-
import { CreateCurrentCartOptions, CreateCurrentCartResponse, CreateCurrentCartApplicationErrors, GetCurrentCartResponse, Cart, UpdateCurrentCartResponse, UpdateCurrentCartApplicationErrors, RefreshCurrentCartResponse, RefreshCurrentCartApplicationErrors, CalculateCurrentCartOptions, CalculateCurrentCartResponse, CalculateCurrentCartApplicationErrors, AddLineItemsToCurrentCartOptions, AddLineItemsToCurrentCartResponse, AddLineItemsToCurrentCartApplicationErrors, RemoveLineItemsFromCurrentCartResponse, RemoveLineItemsFromCurrentCartApplicationErrors, UpdateLineItemsInCurrentCartOptions, UpdateLineItemsInCurrentCartResponse, UpdateLineItemsInCurrentCartApplicationErrors, CouponInput, AddCouponToCurrentCartResponse, AddCouponToCurrentCartApplicationErrors, RemoveCouponFromCurrentCartResponse, RemoveCouponFromCurrentCartApplicationErrors, DeliveryMethodInput, SetDeliveryMethodForCurrentCartResponse, SetDeliveryMethodForCurrentCartApplicationErrors, GiftCardInput, AddGiftCardToCurrentCartResponse, AddGiftCardToCurrentCartApplicationErrors, RemoveGiftCardFromCurrentCartResponse, RemoveGiftCardFromCurrentCartApplicationErrors, UpdateFormSubmissionsInCurrentCartOptions, UpdateFormSubmissionsInCurrentCartResponse } from './index.typings.js';
|
|
3
|
-
export { ActionEvent, AddCouponRequest, AddCouponResponse, AddCouponToCurrentCartRequest, AddGiftCardRequest, AddGiftCardResponse, AddGiftCardToCurrentCartRequest, AddLineItemsRequest, AddLineItemsResponse, AddLineItemsToCurrentCartRequest, AdditionalFee, AdditionalFeeSource, AdditionalFeeSourceWithLiterals, AdditionalFeeTax, Address, AddressLocation, AggregatedTaxBreakdown, AllLineItemsOutOfStockErrorData, ApplicableLineItems, ApplicationError, AppliedDiscount, AppliedDiscountDiscountSourceOneOf, AutoTaxFallbackCalculationDetails, BalanceType, BalanceTypeWithLiterals, BusinessInfo, CalculateCartForV1Request, CalculateCartForV1Response, CalculateCartRequest, CalculateCartResponse, CalculateCurrentCartRequest, CalculateTotalsResponse, CalculatedItemModifier, CalculatedLineItem, CalculatedPlatformFee, CalculationConfig, CalculationErrors, CalculationErrorsShippingCalculationErrorOneOf, CalculationOverrides, Carrier, CarrierError, CarrierErrors, CarrierServiceOption, CartAlreadyOrderedErrorData, CartSettings, CartSource, CartSummary, CatalogItemInput, CatalogOverrideFields, CatalogReference, ChannelType, ChannelTypeWithLiterals, Charge, ChargeType, ChargeTypeWithLiterals, CheckoutStage, CheckoutStageWithLiterals, Color, ConvertedMoney, Coupon, CouponAdded, CouponAlreadyExistsErrorData, CouponNotFoundInCartErrorData, CouponRemoved, 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, DeliveryMethodNotFoundErrorData, 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, DuplicateItemModifierIdsErrorData, DuplicateLineItemUpdatesErrorData, DuplicateModifierGroupIdsErrorData, Empty, EmptyLineItemUpdatesErrorData, EmptyPaymentTokenErrorData, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, ExtendedFields, ExternalReference, FallbackReason, FallbackReasonWithLiterals, FieldViolation, FileType, FileTypeWithLiterals, FixedQuantityItemErrorData, FormIdentifier, FormInfo, FormSubmission, FreeTrialPeriod, FullAddressContactDetails, GetCartRequest, GetCartResponse, GetCheckoutURLRequest, GetCheckoutURLResponse, GetCurrentCartRequest, GiftCard, GiftCardAdded, GiftCardAlreadyExistsErrorData, GiftCardNotFoundInCartErrorData, GiftCardRedeemErrorData, GiftCardRemoved, GiftCardSummary, Group, HandleAsyncCheckoutCompletionRequest, HeadersEntry, IdentificationData, IdentificationDataIdOneOf, InsufficientInventoryEntry, InsufficientInventoryErrorData, InvalidCouponCodeErrorData, InvalidCouponReason, InvalidCouponReasonWithLiterals, InvalidCouponStatusErrorData, InvalidCouponStatusErrorDataDetailsOneOf, InvalidGiftCardCodeErrorData, InvalidGiftCardReason, InvalidGiftCardReasonWithLiterals, InvalidGiftCardStatusErrorData, InvalidMembership, InvalidMembershipEntry, InvalidMembershipErrorData, InvalidMembershipPaymentOptionErrorData, InvalidPaymentStatusErrorData, InvalidPriceVerificationTokenErrorData, InvalidThirdPartyCheckoutTokenErrorData, ItemAttributes, ItemDeliveryConfig, ItemDiscount, ItemModifier, ItemNotFoundInCatalogErrorData, ItemPaymentConfig, ItemPriceBreakdown, ItemPricingInfo, ItemQuantityInfo, ItemSource, ItemStatus, ItemStatusWithLiterals, ItemTaxConfig, ItemTaxFullDetails, ItemType, ItemTypeItemTypeDataOneOf, ItemTypePreset, ItemTypePresetWithLiterals, JurisdictionType, JurisdictionTypeWithLiterals, LegacyFields, LineItem, LineItemAdded, LineItemDiscount, LineItemIdentifier, LineItemIdentifierIdOneOf, LineItemNotFoundInCartErrorData, LineItemPriceConflictErrorData, LineItemPricesData, LineItemSummary, LineItemTax, LineItemUpdate, ManualCalculationReason, ManualCalculationReasonWithLiterals, MarkCartAsCompletedRequest, MarkCartAsCompletedResponse, MaxItemModifiersExceededErrorData, MaxLineItemsExceededErrorData, MembersOnlyItemErrorData, Membership, MembershipName, MembershipOptions, MembershipPaymentCredits, MerchantDiscount, MessageEnvelope, MinLineItemQuantityNotReachedDetails, MinSubtotalNotReachedDetails, ModifierGroup, MultiCurrencyPrice, NameInLineItem, NameInLineItemWithLiterals, NameInOther, NameInOtherWithLiterals, Other, OtherCharge, PaymentInfo, PaymentOption, PaymentOptionType, PaymentOptionTypeWithLiterals, PaymentSummary, PhysicalProperties, PickupDetails, PickupMethod, PickupMethodWithLiterals, PlaceOrderRequest, PlaceOrderResponse, PlainTextValue, PlatformFeeChargeType, PlatformFeeChargeTypeWithLiterals, PlatformFeeSummary, 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, SelectedMemberships, ServiceProperties, SetDeliveryMethodForCurrentCartRequest, SetDeliveryMethodRequest, SetDeliveryMethodResponse, Severity, SeverityWithLiterals, ShippingInformation, ShippingOption, ShippingPrice, ShippingRegion, SomeLineItemsOutOfStockErrorData, 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, UpdateFormSubmissionsInCurrentCartRequest, UpdateFormSubmissionsRequest, UpdateFormSubmissionsResponse, UpdateLineItemsInCurrentCartRequest, UpdateLineItemsRequest, UpdateLineItemsResponse, V1AdditionalFee, V2AdditionalFee, V2CalculationErrors, V2CalculationErrorsShippingCalculationErrorOneOf, V2CarrierError, V2CarrierErrors, V2Coupon, V2GiftCard, V2LineItem, V2Membership, V2PriceSummary, V2SelectedMembership, V2TaxSummary, ValidationError, ValidationsConfig, ValidationsConfigWithLiterals, VatId, VatType, VatTypeWithLiterals, Violation, ViolationWithErrorSeverityErrorData, ViolationsList, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WeightUnit, WeightUnitWithLiterals } from './index.typings.js';
|
|
2
|
+
import { CreateCurrentCartOptions, CreateCurrentCartResponse, CreateCurrentCartApplicationErrors, GetCurrentCartResponse, Cart, UpdateCurrentCartResponse, UpdateCurrentCartApplicationErrors, RefreshCurrentCartResponse, RefreshCurrentCartApplicationErrors, CalculateCurrentCartOptions, CalculateCurrentCartResponse, CalculateCurrentCartApplicationErrors, EstimateCurrentCartOptions, EstimateCurrentCartResponse, EstimateCurrentCartApplicationErrors, AddLineItemsToCurrentCartOptions, AddLineItemsToCurrentCartResponse, AddLineItemsToCurrentCartApplicationErrors, RemoveLineItemsFromCurrentCartResponse, RemoveLineItemsFromCurrentCartApplicationErrors, UpdateLineItemsInCurrentCartOptions, UpdateLineItemsInCurrentCartResponse, UpdateLineItemsInCurrentCartApplicationErrors, CouponInput, AddCouponToCurrentCartResponse, AddCouponToCurrentCartApplicationErrors, RemoveCouponFromCurrentCartResponse, RemoveCouponFromCurrentCartApplicationErrors, DeliveryMethodInput, SetDeliveryMethodForCurrentCartResponse, SetDeliveryMethodForCurrentCartApplicationErrors, GiftCardInput, AddGiftCardToCurrentCartResponse, AddGiftCardToCurrentCartApplicationErrors, RemoveGiftCardFromCurrentCartResponse, RemoveGiftCardFromCurrentCartApplicationErrors, UpdateFormSubmissionsInCurrentCartOptions, UpdateFormSubmissionsInCurrentCartResponse } from './index.typings.js';
|
|
3
|
+
export { ActionEvent, AddCouponRequest, AddCouponResponse, AddCouponToCurrentCartRequest, AddGiftCardRequest, AddGiftCardResponse, AddGiftCardToCurrentCartRequest, AddLineItemsRequest, AddLineItemsResponse, AddLineItemsToCurrentCartRequest, AdditionalFee, AdditionalFeeSource, AdditionalFeeSourceWithLiterals, AdditionalFeeTax, Address, AddressLocation, AggregatedTaxBreakdown, AllLineItemsOutOfStockErrorData, ApplicableLineItems, ApplicationError, AppliedDiscount, AppliedDiscountDiscountSourceOneOf, AutoTaxFallbackCalculationDetails, BalanceType, BalanceTypeWithLiterals, BusinessInfo, CalculateCartForV1Request, CalculateCartForV1Response, CalculateCartRequest, CalculateCartResponse, CalculateCurrentCartRequest, CalculateTotalsResponse, CalculatedItemModifier, CalculatedLineItem, CalculatedPlatformFee, CalculationConfig, CalculationErrors, CalculationErrorsShippingCalculationErrorOneOf, CalculationOverrides, Carrier, CarrierError, CarrierErrors, CarrierServiceOption, CartAlreadyOrderedErrorData, CartSettings, CartSource, CartSummary, CatalogItemInput, CatalogOverrideFields, CatalogReference, ChannelType, ChannelTypeWithLiterals, Charge, ChargeType, ChargeTypeWithLiterals, CheckoutStage, CheckoutStageWithLiterals, Color, ConvertedMoney, Coupon, CouponAdded, CouponAlreadyExistsErrorData, CouponNotFoundInCartErrorData, CouponRemoved, 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, DeliveryMethodNotFoundErrorData, 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, DuplicateItemModifierIdsErrorData, DuplicateLineItemUpdatesErrorData, DuplicateModifierGroupIdsErrorData, Empty, EmptyLineItemUpdatesErrorData, EmptyPaymentTokenErrorData, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EstimateCartRequest, EstimateCartResponse, EstimateCurrentCartRequest, ExtendedFields, ExternalReference, FallbackReason, FallbackReasonWithLiterals, FieldViolation, FileType, FileTypeWithLiterals, FixedQuantityItemErrorData, FormIdentifier, FormInfo, FormSubmission, FreeTrialPeriod, FullAddressContactDetails, GetCartRequest, GetCartResponse, GetCheckoutURLRequest, GetCheckoutURLResponse, GetCurrentCartRequest, GiftCard, GiftCardAdded, GiftCardAlreadyExistsErrorData, GiftCardNotFoundInCartErrorData, GiftCardRedeemErrorData, GiftCardRemoved, GiftCardSummary, Group, HandleAsyncCheckoutCompletionRequest, HeadersEntry, IdentificationData, IdentificationDataIdOneOf, InsufficientInventoryEntry, InsufficientInventoryErrorData, InvalidCouponCodeErrorData, InvalidCouponReason, InvalidCouponReasonWithLiterals, InvalidCouponStatusErrorData, InvalidCouponStatusErrorDataDetailsOneOf, InvalidGiftCardCodeErrorData, InvalidGiftCardReason, InvalidGiftCardReasonWithLiterals, InvalidGiftCardStatusErrorData, InvalidMembership, InvalidMembershipEntry, InvalidMembershipErrorData, InvalidMembershipPaymentOptionErrorData, InvalidPaymentStatusErrorData, InvalidPriceVerificationTokenErrorData, InvalidThirdPartyCheckoutTokenErrorData, ItemAttributes, ItemCombination, ItemCombinationLineItem, ItemDeliveryConfig, ItemDiscount, ItemModifier, ItemNotFoundInCatalogErrorData, ItemPaymentConfig, ItemPriceBreakdown, ItemPricingInfo, ItemQuantityInfo, ItemSource, ItemStatus, ItemStatusWithLiterals, ItemTaxConfig, ItemTaxFullDetails, ItemType, ItemTypeItemTypeDataOneOf, ItemTypePreset, ItemTypePresetWithLiterals, JurisdictionType, JurisdictionTypeWithLiterals, LegacyFields, LineItem, LineItemAdded, LineItemDiscount, LineItemIdentifier, LineItemIdentifierIdOneOf, LineItemNotFoundInCartErrorData, LineItemPriceConflictErrorData, LineItemPricesData, LineItemSummary, LineItemTax, LineItemUpdate, ManualCalculationReason, ManualCalculationReasonWithLiterals, MarkCartAsCompletedRequest, MarkCartAsCompletedResponse, MaxItemModifiersExceededErrorData, MaxLineItemsExceededErrorData, MembersOnlyItemErrorData, Membership, MembershipName, MembershipOptions, MembershipPaymentCredits, MerchantDiscount, MessageEnvelope, MinLineItemQuantityNotReachedDetails, MinSubtotalNotReachedDetails, ModifierGroup, MultiCurrencyPrice, NameInLineItem, NameInLineItemWithLiterals, NameInOther, NameInOtherWithLiterals, Other, OtherCharge, PaymentInfo, PaymentOption, PaymentOptionType, PaymentOptionTypeWithLiterals, PaymentSummary, PhysicalProperties, PickupDetails, PickupMethod, PickupMethodWithLiterals, PlaceOrderRequest, PlaceOrderResponse, PlainTextValue, PlatformFeeChargeType, PlatformFeeChargeTypeWithLiterals, PlatformFeeSummary, 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, SelectedMemberships, ServiceProperties, SetDeliveryMethodForCurrentCartRequest, SetDeliveryMethodRequest, SetDeliveryMethodResponse, Severity, SeverityWithLiterals, ShippingInformation, ShippingOption, ShippingPrice, ShippingRegion, SomeLineItemsOutOfStockErrorData, 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, UpdateFormSubmissionsInCurrentCartRequest, UpdateFormSubmissionsRequest, UpdateFormSubmissionsResponse, UpdateLineItemsInCurrentCartRequest, UpdateLineItemsRequest, UpdateLineItemsResponse, V1AdditionalFee, V2AdditionalFee, V2CalculationErrors, V2CalculationErrorsShippingCalculationErrorOneOf, V2CarrierError, V2CarrierErrors, V2Coupon, V2GiftCard, V2LineItem, V2Membership, V2PriceSummary, V2SelectedMembership, V2TaxSummary, ValidationError, ValidationsConfig, ValidationsConfigWithLiterals, VatId, VatType, VatTypeWithLiterals, Violation, ViolationWithErrorSeverityErrorData, ViolationsList, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WeightUnit, WeightUnitWithLiterals } from './index.typings.js';
|
|
4
4
|
|
|
5
5
|
declare function createCurrentCart$1(httpClient: HttpClient): CreateCurrentCartSignature;
|
|
6
6
|
interface CreateCurrentCartSignature {
|
|
@@ -57,6 +57,27 @@ interface CalculateCurrentCartSignature {
|
|
|
57
57
|
__applicationErrorsType?: CalculateCurrentCartApplicationErrors;
|
|
58
58
|
}>;
|
|
59
59
|
}
|
|
60
|
+
declare function estimateCurrentCart$1(httpClient: HttpClient): EstimateCurrentCartSignature;
|
|
61
|
+
interface EstimateCurrentCartSignature {
|
|
62
|
+
/**
|
|
63
|
+
* Estimates the cart totals based on its current state and the selected
|
|
64
|
+
* calculation components.
|
|
65
|
+
*
|
|
66
|
+
* This API provides a partial, component-based estimation of the cart and is
|
|
67
|
+
* intended for preview purposes (e.g. showing partial estimated totals).
|
|
68
|
+
*
|
|
69
|
+
* The estimation is controlled by boolean flags that indicate which components
|
|
70
|
+
* should be included (delivery costs, additional fees, taxes, gift cards).
|
|
71
|
+
* Components that are not explicitly enabled are excluded from the calculation.
|
|
72
|
+
*
|
|
73
|
+
* This is NOT a full cart calculation.
|
|
74
|
+
*
|
|
75
|
+
* Note that line items discounts are already pre-computed and applied to the Cart.
|
|
76
|
+
*/
|
|
77
|
+
(options?: EstimateCurrentCartOptions): Promise<NonNullablePaths<EstimateCurrentCartResponse, `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` | `summary.cartId` | `summary.cartRevision` | `summary.calculationId` | `summary.lineItems` | `summary.lineItems.${number}.lineItemId` | `summary.lineItems.${number}.quantity` | `summary.lineItems.${number}.unitPrice.amount` | `summary.lineItems.${number}.unitPrice.convertedAmount` | `summary.discounts` | `summary.discounts.${number}.name.original` | `summary.discounts.${number}.source.sourceType` | `summary.discounts.${number}.scope` | `summary.deliverySummary.method.code` | `summary.deliverySummary.method.pickup` | `summary.additionalFees` | `summary.taxSummary.taxes` | `summary.taxSummary.pricesIncludeTax` | `summary.taxSummary.lineItemTaxes` | `summary.taxSummary.lineItemTaxes.${number}.lineItemId` | `summary.taxSummary.additionalFeeTaxes` | `summary.taxSummary.additionalFeeTaxes.${number}.additionalFeeCode` | `summary.paymentSummary.giftCards` | `summary.paymentSummary.giftCards.${number}.giftCardId` | `summary.paymentSummary.memberships` | `summary.paymentSummary.memberships.${number}._id` | `summary.paymentSummary.memberships.${number}.appId` | `summary.paymentSummary.subscriptionCharges` | `summary.paymentSummary.requiresPaymentAfterGiftCard` | `summary.calculationErrors.generalShippingCalculationError.applicationError.code` | `summary.calculationErrors.generalShippingCalculationError.applicationError.description` | `summary.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `summary.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `summary.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `summary.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `summary.calculationErrors.carrierErrors.errors` | `summary.calculationErrors.carrierErrors.errors.${number}.carrierId` | `summary.calculationErrors.orderValidationErrors` | `summary.spiViolations` | `summary.spiViolations.${number}.severity` | `summary.spiViolations.${number}.target.other.name` | `summary.spiViolations.${number}.target.lineItem.name`, 8> & {
|
|
78
|
+
__applicationErrorsType?: EstimateCurrentCartApplicationErrors;
|
|
79
|
+
}>;
|
|
80
|
+
}
|
|
60
81
|
declare function addLineItemsToCurrentCart$1(httpClient: HttpClient): AddLineItemsToCurrentCartSignature;
|
|
61
82
|
interface AddLineItemsToCurrentCartSignature {
|
|
62
83
|
/**
|
|
@@ -154,6 +175,7 @@ declare const updateCurrentCart: MaybeContext<BuildRESTFunction<typeof updateCur
|
|
|
154
175
|
declare const deleteCurrentCart: MaybeContext<BuildRESTFunction<typeof deleteCurrentCart$1> & typeof deleteCurrentCart$1>;
|
|
155
176
|
declare const refreshCurrentCart: MaybeContext<BuildRESTFunction<typeof refreshCurrentCart$1> & typeof refreshCurrentCart$1>;
|
|
156
177
|
declare const calculateCurrentCart: MaybeContext<BuildRESTFunction<typeof calculateCurrentCart$1> & typeof calculateCurrentCart$1>;
|
|
178
|
+
declare const estimateCurrentCart: MaybeContext<BuildRESTFunction<typeof estimateCurrentCart$1> & typeof estimateCurrentCart$1>;
|
|
157
179
|
declare const addLineItemsToCurrentCart: MaybeContext<BuildRESTFunction<typeof addLineItemsToCurrentCart$1> & typeof addLineItemsToCurrentCart$1>;
|
|
158
180
|
declare const removeLineItemsFromCurrentCart: MaybeContext<BuildRESTFunction<typeof removeLineItemsFromCurrentCart$1> & typeof removeLineItemsFromCurrentCart$1>;
|
|
159
181
|
declare const updateLineItemsInCurrentCart: MaybeContext<BuildRESTFunction<typeof updateLineItemsInCurrentCart$1> & typeof updateLineItemsInCurrentCart$1>;
|
|
@@ -164,4 +186,4 @@ declare const addGiftCardToCurrentCart: MaybeContext<BuildRESTFunction<typeof ad
|
|
|
164
186
|
declare const removeGiftCardFromCurrentCart: MaybeContext<BuildRESTFunction<typeof removeGiftCardFromCurrentCart$1> & typeof removeGiftCardFromCurrentCart$1>;
|
|
165
187
|
declare const updateFormSubmissionsInCurrentCart: MaybeContext<BuildRESTFunction<typeof updateFormSubmissionsInCurrentCart$1> & typeof updateFormSubmissionsInCurrentCart$1>;
|
|
166
188
|
|
|
167
|
-
export { AddCouponToCurrentCartApplicationErrors, AddCouponToCurrentCartResponse, AddGiftCardToCurrentCartApplicationErrors, AddGiftCardToCurrentCartResponse, AddLineItemsToCurrentCartApplicationErrors, AddLineItemsToCurrentCartOptions, AddLineItemsToCurrentCartResponse, CalculateCurrentCartApplicationErrors, CalculateCurrentCartOptions, CalculateCurrentCartResponse, Cart, CouponInput, CreateCurrentCartApplicationErrors, CreateCurrentCartOptions, CreateCurrentCartResponse, DeliveryMethodInput, GetCurrentCartResponse, GiftCardInput, RefreshCurrentCartApplicationErrors, RefreshCurrentCartResponse, RemoveCouponFromCurrentCartApplicationErrors, RemoveCouponFromCurrentCartResponse, RemoveGiftCardFromCurrentCartApplicationErrors, RemoveGiftCardFromCurrentCartResponse, RemoveLineItemsFromCurrentCartApplicationErrors, RemoveLineItemsFromCurrentCartResponse, SetDeliveryMethodForCurrentCartApplicationErrors, SetDeliveryMethodForCurrentCartResponse, UpdateCurrentCartApplicationErrors, UpdateCurrentCartResponse, UpdateFormSubmissionsInCurrentCartOptions, UpdateFormSubmissionsInCurrentCartResponse, UpdateLineItemsInCurrentCartApplicationErrors, UpdateLineItemsInCurrentCartOptions, UpdateLineItemsInCurrentCartResponse, addCouponToCurrentCart, addGiftCardToCurrentCart, addLineItemsToCurrentCart, calculateCurrentCart, createCurrentCart, deleteCurrentCart, getCurrentCart, refreshCurrentCart, removeCouponFromCurrentCart, removeGiftCardFromCurrentCart, removeLineItemsFromCurrentCart, setDeliveryMethodForCurrentCart, updateCurrentCart, updateFormSubmissionsInCurrentCart, updateLineItemsInCurrentCart };
|
|
189
|
+
export { AddCouponToCurrentCartApplicationErrors, AddCouponToCurrentCartResponse, AddGiftCardToCurrentCartApplicationErrors, AddGiftCardToCurrentCartResponse, AddLineItemsToCurrentCartApplicationErrors, AddLineItemsToCurrentCartOptions, AddLineItemsToCurrentCartResponse, CalculateCurrentCartApplicationErrors, CalculateCurrentCartOptions, CalculateCurrentCartResponse, Cart, CouponInput, CreateCurrentCartApplicationErrors, CreateCurrentCartOptions, CreateCurrentCartResponse, DeliveryMethodInput, EstimateCurrentCartApplicationErrors, EstimateCurrentCartOptions, EstimateCurrentCartResponse, GetCurrentCartResponse, GiftCardInput, RefreshCurrentCartApplicationErrors, RefreshCurrentCartResponse, RemoveCouponFromCurrentCartApplicationErrors, RemoveCouponFromCurrentCartResponse, RemoveGiftCardFromCurrentCartApplicationErrors, RemoveGiftCardFromCurrentCartResponse, RemoveLineItemsFromCurrentCartApplicationErrors, RemoveLineItemsFromCurrentCartResponse, SetDeliveryMethodForCurrentCartApplicationErrors, SetDeliveryMethodForCurrentCartResponse, UpdateCurrentCartApplicationErrors, UpdateCurrentCartResponse, UpdateFormSubmissionsInCurrentCartOptions, UpdateFormSubmissionsInCurrentCartResponse, UpdateLineItemsInCurrentCartApplicationErrors, UpdateLineItemsInCurrentCartOptions, UpdateLineItemsInCurrentCartResponse, addCouponToCurrentCart, addGiftCardToCurrentCart, addLineItemsToCurrentCart, calculateCurrentCart, createCurrentCart, deleteCurrentCart, estimateCurrentCart, getCurrentCart, refreshCurrentCart, removeCouponFromCurrentCart, removeGiftCardFromCurrentCart, removeLineItemsFromCurrentCart, setDeliveryMethodForCurrentCart, updateCurrentCart, updateFormSubmissionsInCurrentCart, updateLineItemsInCurrentCart };
|
package/build/cjs/index.js
CHANGED
|
@@ -58,6 +58,7 @@ __export(index_exports, {
|
|
|
58
58
|
calculateCurrentCart: () => calculateCurrentCart4,
|
|
59
59
|
createCurrentCart: () => createCurrentCart4,
|
|
60
60
|
deleteCurrentCart: () => deleteCurrentCart4,
|
|
61
|
+
estimateCurrentCart: () => estimateCurrentCart4,
|
|
61
62
|
getCurrentCart: () => getCurrentCart4,
|
|
62
63
|
refreshCurrentCart: () => refreshCurrentCart4,
|
|
63
64
|
removeCouponFromCurrentCart: () => removeCouponFromCurrentCart4,
|
|
@@ -546,6 +547,63 @@ function calculateCurrentCart(payload) {
|
|
|
546
547
|
}
|
|
547
548
|
return __calculateCurrentCart;
|
|
548
549
|
}
|
|
550
|
+
function estimateCurrentCart(payload) {
|
|
551
|
+
function __estimateCurrentCart({ host }) {
|
|
552
|
+
const metadata = {
|
|
553
|
+
entityFqdn: "wix.ecom.v2.cart",
|
|
554
|
+
method: "POST",
|
|
555
|
+
methodFqn: "wix.ecom.cart.v2.CurrentCartService.EstimateCurrentCart",
|
|
556
|
+
packageName: PACKAGE_NAME,
|
|
557
|
+
migrationOptions: {
|
|
558
|
+
optInTransformResponse: true
|
|
559
|
+
},
|
|
560
|
+
url: resolveWixEcomCartV2CurrentCartServiceUrl({
|
|
561
|
+
protoPath: "/v2/carts/current/estimate",
|
|
562
|
+
data: payload,
|
|
563
|
+
host
|
|
564
|
+
}),
|
|
565
|
+
data: payload,
|
|
566
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
567
|
+
{
|
|
568
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
569
|
+
paths: [
|
|
570
|
+
{ path: "cart.createdDate" },
|
|
571
|
+
{ path: "cart.updatedDate" },
|
|
572
|
+
{
|
|
573
|
+
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
574
|
+
},
|
|
575
|
+
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
576
|
+
{
|
|
577
|
+
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
|
|
581
|
+
},
|
|
582
|
+
{ path: "cart.lineItems.attributes.serviceProperties.endDate" },
|
|
583
|
+
{
|
|
584
|
+
path: "summary.paymentSummary.subscriptionCharges.charges.cycleBillingDate"
|
|
585
|
+
}
|
|
586
|
+
]
|
|
587
|
+
},
|
|
588
|
+
{
|
|
589
|
+
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
590
|
+
paths: [
|
|
591
|
+
{
|
|
592
|
+
path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
|
|
593
|
+
},
|
|
594
|
+
{ path: "cart.lineItems.attributes.physicalProperties.weight" },
|
|
595
|
+
{ path: "cart.deliveryInfo.address.geocode.latitude" },
|
|
596
|
+
{ path: "cart.deliveryInfo.address.geocode.longitude" },
|
|
597
|
+
{ path: "cart.paymentInfo.billingAddress.geocode.latitude" },
|
|
598
|
+
{ path: "cart.paymentInfo.billingAddress.geocode.longitude" }
|
|
599
|
+
]
|
|
600
|
+
}
|
|
601
|
+
])
|
|
602
|
+
};
|
|
603
|
+
return metadata;
|
|
604
|
+
}
|
|
605
|
+
return __estimateCurrentCart;
|
|
606
|
+
}
|
|
549
607
|
function addLineItemsToCurrentCart(payload) {
|
|
550
608
|
function __addLineItemsToCurrentCart({ host }) {
|
|
551
609
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
@@ -1626,6 +1684,64 @@ async function calculateCurrentCart2(options) {
|
|
|
1626
1684
|
throw transformedError;
|
|
1627
1685
|
}
|
|
1628
1686
|
}
|
|
1687
|
+
async function estimateCurrentCart2(options) {
|
|
1688
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1689
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1690
|
+
refreshCart: options?.refreshCart,
|
|
1691
|
+
validationConfig: options?.validationConfig,
|
|
1692
|
+
calculateDelivery: options?.calculateDelivery,
|
|
1693
|
+
calculateAdditionalFees: options?.calculateAdditionalFees,
|
|
1694
|
+
calculateTax: options?.calculateTax,
|
|
1695
|
+
calculateGiftCards: options?.calculateGiftCards
|
|
1696
|
+
});
|
|
1697
|
+
const reqOpts = estimateCurrentCart(payload);
|
|
1698
|
+
sideEffects?.onSiteCall?.();
|
|
1699
|
+
try {
|
|
1700
|
+
const result = await httpClient.request(reqOpts);
|
|
1701
|
+
sideEffects?.onSuccess?.(result);
|
|
1702
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
|
|
1703
|
+
(0, import_transform_paths2.transformPaths)(result.data, [
|
|
1704
|
+
{
|
|
1705
|
+
transformFn: import_image2.transformRESTImageToSDKImage,
|
|
1706
|
+
paths: [
|
|
1707
|
+
{ path: "cart.lineItems.source.catalogOverrideFields.image" },
|
|
1708
|
+
{ path: "cart.lineItems.attributes.image" }
|
|
1709
|
+
]
|
|
1710
|
+
},
|
|
1711
|
+
{
|
|
1712
|
+
transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
|
|
1713
|
+
paths: [{ path: "cart.lineItems.attributes.url" }]
|
|
1714
|
+
},
|
|
1715
|
+
{
|
|
1716
|
+
transformFn: import_address2.transformRESTAddressToSDKAddress,
|
|
1717
|
+
paths: [
|
|
1718
|
+
{ path: "cart.deliveryInfo.address" },
|
|
1719
|
+
{ path: "cart.paymentInfo.billingAddress" }
|
|
1720
|
+
]
|
|
1721
|
+
}
|
|
1722
|
+
])
|
|
1723
|
+
);
|
|
1724
|
+
} catch (err) {
|
|
1725
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1726
|
+
err,
|
|
1727
|
+
{
|
|
1728
|
+
spreadPathsToArguments: {},
|
|
1729
|
+
explicitPathsToArguments: {
|
|
1730
|
+
refreshCart: "$[0].refreshCart",
|
|
1731
|
+
validationConfig: "$[0].validationConfig",
|
|
1732
|
+
calculateDelivery: "$[0].calculateDelivery",
|
|
1733
|
+
calculateAdditionalFees: "$[0].calculateAdditionalFees",
|
|
1734
|
+
calculateTax: "$[0].calculateTax",
|
|
1735
|
+
calculateGiftCards: "$[0].calculateGiftCards"
|
|
1736
|
+
},
|
|
1737
|
+
singleArgumentUnchanged: false
|
|
1738
|
+
},
|
|
1739
|
+
["options"]
|
|
1740
|
+
);
|
|
1741
|
+
sideEffects?.onError?.(err);
|
|
1742
|
+
throw transformedError;
|
|
1743
|
+
}
|
|
1744
|
+
}
|
|
1629
1745
|
async function addLineItemsToCurrentCart2(options) {
|
|
1630
1746
|
const { httpClient, sideEffects } = arguments[1];
|
|
1631
1747
|
const payload = (0, import_transform_paths2.transformPaths)(
|
|
@@ -2094,6 +2210,13 @@ function calculateCurrentCart3(httpClient) {
|
|
|
2094
2210
|
{ httpClient }
|
|
2095
2211
|
);
|
|
2096
2212
|
}
|
|
2213
|
+
function estimateCurrentCart3(httpClient) {
|
|
2214
|
+
return (options) => estimateCurrentCart2(
|
|
2215
|
+
options,
|
|
2216
|
+
// @ts-ignore
|
|
2217
|
+
{ httpClient }
|
|
2218
|
+
);
|
|
2219
|
+
}
|
|
2097
2220
|
function addLineItemsToCurrentCart3(httpClient) {
|
|
2098
2221
|
return (options) => addLineItemsToCurrentCart2(
|
|
2099
2222
|
options,
|
|
@@ -2166,6 +2289,7 @@ var updateCurrentCart4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModu
|
|
|
2166
2289
|
var deleteCurrentCart4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteCurrentCart3);
|
|
2167
2290
|
var refreshCurrentCart4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(refreshCurrentCart3);
|
|
2168
2291
|
var calculateCurrentCart4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(calculateCurrentCart3);
|
|
2292
|
+
var estimateCurrentCart4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(estimateCurrentCart3);
|
|
2169
2293
|
var addLineItemsToCurrentCart4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(addLineItemsToCurrentCart3);
|
|
2170
2294
|
var removeLineItemsFromCurrentCart4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(removeLineItemsFromCurrentCart3);
|
|
2171
2295
|
var updateLineItemsInCurrentCart4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateLineItemsInCurrentCart3);
|
|
@@ -2215,6 +2339,7 @@ var updateFormSubmissionsInCurrentCart4 = /* @__PURE__ */ (0, import_rest_module
|
|
|
2215
2339
|
calculateCurrentCart,
|
|
2216
2340
|
createCurrentCart,
|
|
2217
2341
|
deleteCurrentCart,
|
|
2342
|
+
estimateCurrentCart,
|
|
2218
2343
|
getCurrentCart,
|
|
2219
2344
|
refreshCurrentCart,
|
|
2220
2345
|
removeCouponFromCurrentCart,
|