@wix/auto_sdk_ecom_cart-v-2 1.0.142 → 1.0.143
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 +15 -3
- package/build/cjs/index.js +63 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +54 -17
- package/build/cjs/index.typings.js +55 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +42 -18
- package/build/cjs/meta.js +49 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +58 -1
- package/build/cjs/schemas.js +141 -67
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.d.mts +15 -3
- package/build/es/index.mjs +62 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +54 -17
- package/build/es/index.typings.mjs +54 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +42 -18
- package/build/es/meta.mjs +48 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +58 -1
- package/build/es/schemas.mjs +139 -67
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +15 -3
- package/build/internal/cjs/index.js +63 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +61 -18
- package/build/internal/cjs/index.typings.js +55 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +42 -18
- package/build/internal/cjs/meta.js +49 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +58 -1
- package/build/internal/cjs/schemas.js +141 -67
- package/build/internal/cjs/schemas.js.map +1 -1
- package/build/internal/es/index.d.mts +15 -3
- package/build/internal/es/index.mjs +62 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +61 -18
- package/build/internal/es/index.typings.mjs +54 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +42 -18
- package/build/internal/es/meta.mjs +48 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +58 -1
- package/build/internal/es/schemas.mjs +139 -67
- package/build/internal/es/schemas.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 { CreateCartOptions, Cart, CreateCartApplicationErrors, UpdateCart, UpdateCartApplicationErrors, RefreshCartResponse, RefreshCartApplicationErrors, EstimateCartOptions, EstimateCartResponse, EstimateCartApplicationErrors, CalculateCartOptions, CalculateCartResponse, CalculateCartApplicationErrors, GetCheckoutUrlOptions, GetCheckoutURLResponse, GetCheckoutUrlApplicationErrors, PlaceOrderOptions, PlaceOrderResponse, PlaceOrderApplicationErrors, AddLineItemsOptions, AddLineItemsResponse, AddLineItemsApplicationErrors, RemoveLineItemsResponse, RemoveLineItemsApplicationErrors, UpdateLineItemsOptions, UpdateLineItemsResponse, UpdateLineItemsApplicationErrors, CouponInput, AddCouponResponse, AddCouponApplicationErrors, RemoveCouponResponse, RemoveCouponApplicationErrors, DeliveryMethodInput, SetDeliveryMethodResponse, SetDeliveryMethodApplicationErrors, RemoveDeliveryMethodResponse, RemoveDeliveryMethodApplicationErrors, GiftCardInput, AddGiftCardResponse, AddGiftCardApplicationErrors, RemoveGiftCardResponse, RemoveGiftCardApplicationErrors, MarkCartAsCompletedOptions, MarkCartAsCompletedResponse, UpdateFormSubmissionsOptions, UpdateFormSubmissionsResponse } from './index.typings.js';
|
|
3
|
-
export { AccountInfo, ActionEvent, AddCouponRequest, AddCouponToCurrentCartRequest, AddCouponToCurrentCartResponse, AddGiftCardRequest, AddGiftCardToCurrentCartRequest, AddGiftCardToCurrentCartResponse, AddLineItemsRequest, AddLineItemsToCurrentCartRequest, AddLineItemsToCurrentCartResponse, AdditionalFee, AdditionalFeeSource, AdditionalFeeSourceWithLiterals, AdditionalFeeTax, Address, AddressLocation, AggregatedTaxBreakdown, ApplicableLineItems, ApplicationError, AppliedDiscount, AppliedDiscountDiscountSourceOneOf, AutoTaxFallbackCalculationDetails, BalanceType, BalanceTypeWithLiterals, BillingSettings, BusinessInfo, CalculateCartForV1Request, CalculateCartForV1Response, CalculateCartRequest, CalculateCurrentCartRequest, CalculateCurrentCartResponse, 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, CreateCurrentCartResponse, CreatedBy, CreatedByIdOneOf, CustomContentReference, CustomField, CustomItemAttributes, CustomItemDeliveryConfig, CustomItemInput, CustomItemPaymentConfig, CustomItemPricingInfo, CustomItemQuantityInfo, CustomItemSource, CustomItemTaxConfig, CustomValidationErrorData, CustomerInfo, CustomerInfoIdOneOf, DeleteCartRequest, DeleteCartResponse, DeleteCurrentCartRequest, DeleteCurrentCartResponse, DeliveryAllocation, DeliveryInfo, DeliveryLogistics, DeliveryMethod, DeliveryMethodNotFoundErrorData, DeliverySummary, DeliveryTimeSlot, Description, DescriptionLine, DescriptionLineDescriptionLineValueOneOf, DescriptionLineName, DescriptionLineType, DescriptionLineTypeWithLiterals, DescriptionLineValueOneOf, Details, DetailsKindOneOf, Dimensions, DimensionsUnit, DimensionsUnitWithLiterals, Discount, DiscountBenefit, DiscountBenefitValueOneOf, DiscountRule, DiscountRuleName, DiscountScope, DiscountScopeWithLiterals, DiscountSource, DiscountSourceType, DiscountSourceTypeWithLiterals, DiscountType, DiscountTypeWithLiterals, DomainEvent, DomainEventBodyOneOf, DuplicateItemModifierIdsErrorData, DuplicateLineItemUpdatesErrorData, DuplicateModifierGroupIdsErrorData, Empty, EmptyLineItemUpdatesErrorData, EmptyPaymentTokenErrorData, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EstimateCartRequest, EstimateCurrentCartRequest, EstimateCurrentCartResponse, ExtendedFields, ExternalReference, FallbackReason, FallbackReasonWithLiterals, FieldViolation, FileType, FileTypeWithLiterals, FixedQuantityItemErrorData, FormIdentifier, FormInfo, FormSubmission, FreeTrialPeriod, FullAddressContactDetails, GetCartRequest, GetCartResponse, GetCheckoutURLRequest, GetCurrentCartRequest, GetCurrentCartResponse, GiftCard, GiftCardAdded, GiftCardAlreadyExistsErrorData, GiftCardCalculationError, GiftCardNotFoundInCartErrorData, GiftCardRedeemErrorData, GiftCardRemoved, GiftCardSummary, Group, HandleAsyncCheckoutCompletionRequest, HeadersEntry, IdentificationData, IdentificationDataIdOneOf, InsufficientInventoryEntry, InsufficientInventoryErrorData, InvalidCartErrorData, 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, LineItemsOutOfStockErrorData, ManualCalculationReason, ManualCalculationReasonWithLiterals, MarkCartAsCompletedRequest, 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, PlainTextValue, PlatformFeeChargeType, PlatformFeeChargeTypeWithLiterals, PlatformFeeSummary, Policy, PriceDescription, PriceSummary, ProductPeriodAlignment, ProductPeriodAlignmentWithLiterals, QuantityUpdate, RateType, RateTypeWithLiterals,
|
|
2
|
+
import { CreateCartOptions, Cart, CreateCartApplicationErrors, UpdateCart, UpdateCartApplicationErrors, RefreshCartResponse, RefreshCartApplicationErrors, EstimateCartOptions, EstimateCartResponse, EstimateCartApplicationErrors, CalculateCartOptions, CalculateCartResponse, CalculateCartApplicationErrors, GetCheckoutUrlOptions, GetCheckoutURLResponse, GetCheckoutUrlApplicationErrors, PlaceOrderOptions, PlaceOrderResponse, PlaceOrderApplicationErrors, AddLineItemsOptions, AddLineItemsResponse, AddLineItemsApplicationErrors, RemoveLineItemsResponse, RemoveLineItemsApplicationErrors, UpdateLineItemsOptions, UpdateLineItemsResponse, UpdateLineItemsApplicationErrors, CouponInput, AddCouponResponse, AddCouponApplicationErrors, RemoveCouponResponse, RemoveCouponApplicationErrors, DeliveryMethodInput, SetDeliveryMethodResponse, SetDeliveryMethodApplicationErrors, RemoveDeliveryMethodResponse, RemoveDeliveryMethodApplicationErrors, GiftCardInput, AddGiftCardResponse, AddGiftCardApplicationErrors, RemoveGiftCardResponse, RemoveGiftCardApplicationErrors, MarkCartAsCompletedOptions, MarkCartAsCompletedResponse, RawHttpResponse, UpdateFormSubmissionsOptions, UpdateFormSubmissionsResponse } from './index.typings.js';
|
|
3
|
+
export { AccountInfo, ActionEvent, AddCouponRequest, AddCouponToCurrentCartRequest, AddCouponToCurrentCartResponse, AddGiftCardRequest, AddGiftCardToCurrentCartRequest, AddGiftCardToCurrentCartResponse, AddLineItemsRequest, AddLineItemsToCurrentCartRequest, AddLineItemsToCurrentCartResponse, AdditionalFee, AdditionalFeeSource, AdditionalFeeSourceWithLiterals, AdditionalFeeTax, Address, AddressLocation, AggregatedTaxBreakdown, ApplicableLineItems, ApplicationError, AppliedDiscount, AppliedDiscountDiscountSourceOneOf, AutoTaxFallbackCalculationDetails, BalanceType, BalanceTypeWithLiterals, BillingSettings, BusinessInfo, CalculateCartForV1Request, CalculateCartForV1Response, CalculateCartRequest, CalculateCurrentCartRequest, CalculateCurrentCartResponse, CalculateTotalsResponse, CalculatedItemModifier, CalculatedLineItem, CalculatedPlatformFee, CalculationConfig, CalculationErrors, CalculationErrorsShippingCalculationErrorOneOf, CalculationOverrides, Carrier, CarrierError, CarrierErrors, CarrierServiceOption, CartAlreadyOrderedErrorData, CartEstimationIndicators, CartSettings, CartSource, CartSummary, CatalogItemInput, CatalogOverrideFields, CatalogReference, ChannelType, ChannelTypeWithLiterals, Charge, ChargeType, ChargeTypeWithLiterals, CheckoutStage, CheckoutStageWithLiterals, Color, ConvertedMoney, Coupon, CouponAdded, CouponAlreadyExistsErrorData, CouponNotFoundInCartErrorData, CouponRemoved, CreateCartRequest, CreateCartResponse, CreateCurrentCartRequest, CreateCurrentCartResponse, CreatedBy, CreatedByIdOneOf, CustomContentReference, CustomField, CustomItemAttributes, CustomItemDeliveryConfig, CustomItemInput, CustomItemPaymentConfig, CustomItemPricingInfo, CustomItemQuantityInfo, CustomItemSource, CustomItemTaxConfig, CustomValidationErrorData, CustomerInfo, CustomerInfoIdOneOf, DeleteCartRequest, DeleteCartResponse, DeleteCurrentCartRequest, DeleteCurrentCartResponse, DeliveryAllocation, DeliveryInfo, DeliveryLogistics, DeliveryMethod, DeliveryMethodNotFoundErrorData, DeliverySummary, DeliveryTimeSlot, Description, DescriptionLine, DescriptionLineDescriptionLineValueOneOf, DescriptionLineName, DescriptionLineType, DescriptionLineTypeWithLiterals, DescriptionLineValueOneOf, Details, DetailsKindOneOf, Dimensions, DimensionsUnit, DimensionsUnitWithLiterals, Discount, DiscountBenefit, DiscountBenefitValueOneOf, DiscountRule, DiscountRuleName, DiscountScope, DiscountScopeWithLiterals, DiscountSource, DiscountSourceType, DiscountSourceTypeWithLiterals, DiscountType, DiscountTypeWithLiterals, DomainEvent, DomainEventBodyOneOf, DuplicateItemModifierIdsErrorData, DuplicateLineItemUpdatesErrorData, DuplicateModifierGroupIdsErrorData, Empty, EmptyLineItemUpdatesErrorData, EmptyPaymentTokenErrorData, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EstimateCartRequest, EstimateCurrentCartRequest, EstimateCurrentCartResponse, ExtendedFields, ExternalReference, FallbackReason, FallbackReasonWithLiterals, FieldViolation, FileType, FileTypeWithLiterals, FixedQuantityItemErrorData, FormIdentifier, FormInfo, FormSubmission, FreeTrialPeriod, FullAddressContactDetails, GetCartRequest, GetCartResponse, GetCheckoutURLRequest, GetCurrentCartRequest, GetCurrentCartResponse, GiftCard, GiftCardAdded, GiftCardAlreadyExistsErrorData, GiftCardCalculationError, GiftCardNotFoundInCartErrorData, GiftCardRedeemErrorData, GiftCardRemoved, GiftCardSummary, Group, HandleAsyncCheckoutCompletionRequest, HeadersEntry, IdentificationData, IdentificationDataIdOneOf, InsufficientInventoryEntry, InsufficientInventoryErrorData, InvalidCartErrorData, 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, LineItemsOutOfStockErrorData, ManualCalculationReason, ManualCalculationReasonWithLiterals, MarkCartAsCompletedRequest, 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, PlainTextValue, PlatformFeeChargeType, PlatformFeeChargeTypeWithLiterals, PlatformFeeSummary, Policy, PriceDescription, PriceSummary, ProductPeriodAlignment, ProductPeriodAlignmentWithLiterals, QuantityUpdate, RateType, RateTypeWithLiterals, RedirectUrls, RefreshCartRequest, RefreshCurrentCartRequest, RefreshCurrentCartResponse, Region, RemoveCouponFromCurrentCartRequest, RemoveCouponFromCurrentCartResponse, RemoveCouponRequest, RemoveDeliveryMethodFromCurrentCartRequest, RemoveDeliveryMethodFromCurrentCartResponse, RemoveDeliveryMethodRequest, RemoveGiftCardFromCurrentCartRequest, RemoveGiftCardFromCurrentCartResponse, RemoveGiftCardRequest, RemoveLineItemsFromCurrentCartRequest, RemoveLineItemsFromCurrentCartResponse, RemoveLineItemsRequest, RestoreInfo, RuleType, RuleTypeWithLiterals, Scope, SecuredMedia, SelectedCarrierServiceOption, SelectedCarrierServiceOptionOtherCharge, SelectedCarrierServiceOptionPrices, SelectedMembership, SelectedMembershipUpdate, SelectedMemberships, ServiceProperties, SetDeliveryMethodForCurrentCartRequest, SetDeliveryMethodForCurrentCartResponse, SetDeliveryMethodRequest, Severity, SeverityWithLiterals, ShippingInformation, ShippingOption, ShippingPrice, ShippingRegion, Source, SourceWithLiterals, Stage, StageStagesOneOf, StreetAddress, SubscriptionCharges, SubscriptionFrequency, SubscriptionFrequencyWithLiterals, SubscriptionOptionInfo, SubscriptionSettings, SubtotalBelowOrderMinimumErrorData, 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, UpdateFormSubmissionsInCurrentCartRequest, UpdateFormSubmissionsInCurrentCartResponse, UpdateFormSubmissionsRequest, UpdateLineItemsInCurrentCartRequest, UpdateLineItemsInCurrentCartResponse, UpdateLineItemsRequest, V1AdditionalFee, V2AdditionalFee, V2CalculationErrors, V2CalculationErrorsShippingCalculationErrorOneOf, V2CarrierError, V2CarrierErrors, V2Coupon, V2GiftCard, V2LineItem, V2LineItemDiscount, V2Membership, V2PriceSummary, V2SelectedMembership, V2TaxSummary, V2Violation, V2ViolationDataOneOf, ValidationError, ValidationsConfig, ValidationsConfigWithLiterals, VatId, VatType, VatTypeWithLiterals, Violation, ViolationCode, ViolationCodeWithLiterals, ViolationScope, ViolationScopeWithLiterals, ViolationSeverity, ViolationSeverityWithLiterals, ViolationWithErrorSeverityErrorData, ViolationsList, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WeightUnit, WeightUnitWithLiterals } from './index.typings.js';
|
|
4
4
|
|
|
5
5
|
declare function createCart$1(httpClient: HttpClient): CreateCartSignature;
|
|
6
6
|
interface CreateCartSignature {
|
|
@@ -221,6 +221,17 @@ interface MarkCartAsCompletedSignature {
|
|
|
221
221
|
*/
|
|
222
222
|
(cartId: string, options?: MarkCartAsCompletedOptions): Promise<NonNullablePaths<MarkCartAsCompletedResponse, `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.openAccess` | `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` | `cart.demo`, 7>>;
|
|
223
223
|
}
|
|
224
|
+
declare function handleAsyncCheckoutCompletion$1(httpClient: HttpClient): HandleAsyncCheckoutCompletionSignature;
|
|
225
|
+
interface HandleAsyncCheckoutCompletionSignature {
|
|
226
|
+
/**
|
|
227
|
+
* Handles asynchronous checkout completion and redirects to a specified URL.
|
|
228
|
+
*
|
|
229
|
+
* Triggered by Wix Cashier after payment completion, this endpoint finalizes the checkout process and redirects the user to the previously provided success URL.
|
|
230
|
+
* In some cases, this endpoint might be called directly by the external payment provider.
|
|
231
|
+
* @param - Server-signed JWT with data required to complete checkout.
|
|
232
|
+
*/
|
|
233
|
+
(token: string): Promise<NonNullablePaths<RawHttpResponse, `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`, 4>>;
|
|
234
|
+
}
|
|
224
235
|
declare function updateFormSubmissions$1(httpClient: HttpClient): UpdateFormSubmissionsSignature;
|
|
225
236
|
interface UpdateFormSubmissionsSignature {
|
|
226
237
|
/**
|
|
@@ -251,6 +262,7 @@ declare const removeDeliveryMethod: MaybeContext<BuildRESTFunction<typeof remove
|
|
|
251
262
|
declare const addGiftCard: MaybeContext<BuildRESTFunction<typeof addGiftCard$1> & typeof addGiftCard$1>;
|
|
252
263
|
declare const removeGiftCard: MaybeContext<BuildRESTFunction<typeof removeGiftCard$1> & typeof removeGiftCard$1>;
|
|
253
264
|
declare const markCartAsCompleted: MaybeContext<BuildRESTFunction<typeof markCartAsCompleted$1> & typeof markCartAsCompleted$1>;
|
|
265
|
+
declare const handleAsyncCheckoutCompletion: MaybeContext<BuildRESTFunction<typeof handleAsyncCheckoutCompletion$1> & typeof handleAsyncCheckoutCompletion$1>;
|
|
254
266
|
declare const updateFormSubmissions: MaybeContext<BuildRESTFunction<typeof updateFormSubmissions$1> & typeof updateFormSubmissions$1>;
|
|
255
267
|
|
|
256
|
-
export { AddCouponApplicationErrors, AddCouponResponse, AddGiftCardApplicationErrors, AddGiftCardResponse, AddLineItemsApplicationErrors, AddLineItemsOptions, AddLineItemsResponse, CalculateCartApplicationErrors, CalculateCartOptions, CalculateCartResponse, Cart, CouponInput, CreateCartApplicationErrors, CreateCartOptions, DeliveryMethodInput, EstimateCartApplicationErrors, EstimateCartOptions, EstimateCartResponse, GetCheckoutURLResponse, GetCheckoutUrlApplicationErrors, GetCheckoutUrlOptions, GiftCardInput, MarkCartAsCompletedOptions, MarkCartAsCompletedResponse, PlaceOrderApplicationErrors, PlaceOrderOptions, PlaceOrderResponse, RefreshCartApplicationErrors, RefreshCartResponse, RemoveCouponApplicationErrors, RemoveCouponResponse, RemoveDeliveryMethodApplicationErrors, RemoveDeliveryMethodResponse, RemoveGiftCardApplicationErrors, RemoveGiftCardResponse, RemoveLineItemsApplicationErrors, RemoveLineItemsResponse, SetDeliveryMethodApplicationErrors, SetDeliveryMethodResponse, UpdateCart, UpdateCartApplicationErrors, UpdateFormSubmissionsOptions, UpdateFormSubmissionsResponse, UpdateLineItemsApplicationErrors, UpdateLineItemsOptions, UpdateLineItemsResponse, addCoupon, addGiftCard, addLineItems, calculateCart, createCart, deleteCart, estimateCart, getCart, getCheckoutUrl, markCartAsCompleted, placeOrder, refreshCart, removeCoupon, removeDeliveryMethod, removeGiftCard, removeLineItems, setDeliveryMethod, updateCart, updateFormSubmissions, updateLineItems };
|
|
268
|
+
export { AddCouponApplicationErrors, AddCouponResponse, AddGiftCardApplicationErrors, AddGiftCardResponse, AddLineItemsApplicationErrors, AddLineItemsOptions, AddLineItemsResponse, CalculateCartApplicationErrors, CalculateCartOptions, CalculateCartResponse, Cart, CouponInput, CreateCartApplicationErrors, CreateCartOptions, DeliveryMethodInput, EstimateCartApplicationErrors, EstimateCartOptions, EstimateCartResponse, GetCheckoutURLResponse, GetCheckoutUrlApplicationErrors, GetCheckoutUrlOptions, GiftCardInput, MarkCartAsCompletedOptions, MarkCartAsCompletedResponse, PlaceOrderApplicationErrors, PlaceOrderOptions, PlaceOrderResponse, RawHttpResponse, RefreshCartApplicationErrors, RefreshCartResponse, RemoveCouponApplicationErrors, RemoveCouponResponse, RemoveDeliveryMethodApplicationErrors, RemoveDeliveryMethodResponse, RemoveGiftCardApplicationErrors, RemoveGiftCardResponse, RemoveLineItemsApplicationErrors, RemoveLineItemsResponse, SetDeliveryMethodApplicationErrors, SetDeliveryMethodResponse, UpdateCart, UpdateCartApplicationErrors, UpdateFormSubmissionsOptions, UpdateFormSubmissionsResponse, UpdateLineItemsApplicationErrors, UpdateLineItemsOptions, UpdateLineItemsResponse, addCoupon, addGiftCard, addLineItems, calculateCart, createCart, deleteCart, estimateCart, getCart, getCheckoutUrl, handleAsyncCheckoutCompletion, markCartAsCompleted, placeOrder, refreshCart, removeCoupon, removeDeliveryMethod, removeGiftCard, removeLineItems, setDeliveryMethod, updateCart, updateFormSubmissions, updateLineItems };
|
package/build/cjs/index.js
CHANGED
|
@@ -67,6 +67,7 @@ __export(index_exports, {
|
|
|
67
67
|
estimateCart: () => estimateCart4,
|
|
68
68
|
getCart: () => getCart4,
|
|
69
69
|
getCheckoutUrl: () => getCheckoutUrl4,
|
|
70
|
+
handleAsyncCheckoutCompletion: () => handleAsyncCheckoutCompletion4,
|
|
70
71
|
markCartAsCompleted: () => markCartAsCompleted4,
|
|
71
72
|
placeOrder: () => placeOrder4,
|
|
72
73
|
refreshCart: () => refreshCart4,
|
|
@@ -89,6 +90,7 @@ var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-
|
|
|
89
90
|
var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
|
|
90
91
|
var import_float = require("@wix/sdk-runtime/transformations/float");
|
|
91
92
|
var import_float2 = require("@wix/sdk-runtime/transformations/float");
|
|
93
|
+
var import_bytes = require("@wix/sdk-runtime/transformations/bytes");
|
|
92
94
|
var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
|
|
93
95
|
var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
94
96
|
var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
|
|
@@ -1271,6 +1273,33 @@ function markCartAsCompleted(payload) {
|
|
|
1271
1273
|
}
|
|
1272
1274
|
return __markCartAsCompleted;
|
|
1273
1275
|
}
|
|
1276
|
+
function handleAsyncCheckoutCompletion(payload) {
|
|
1277
|
+
function __handleAsyncCheckoutCompletion({ host }) {
|
|
1278
|
+
const metadata = {
|
|
1279
|
+
entityFqdn: "wix.ecom.v2.cart",
|
|
1280
|
+
method: "POST",
|
|
1281
|
+
methodFqn: "wix.ecom.cart.v2.CartService.HandleAsyncCheckoutCompletion",
|
|
1282
|
+
packageName: PACKAGE_NAME,
|
|
1283
|
+
migrationOptions: {
|
|
1284
|
+
optInTransformResponse: true
|
|
1285
|
+
},
|
|
1286
|
+
url: resolveWixEcomCartV2CartServiceUrl({
|
|
1287
|
+
protoPath: "/v2/carts/handle-async-checkout-completion",
|
|
1288
|
+
data: payload,
|
|
1289
|
+
host
|
|
1290
|
+
}),
|
|
1291
|
+
data: payload,
|
|
1292
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
1293
|
+
{
|
|
1294
|
+
transformFn: import_bytes.transformRESTBytesToSDKBytes,
|
|
1295
|
+
paths: [{ path: "body" }]
|
|
1296
|
+
}
|
|
1297
|
+
])
|
|
1298
|
+
};
|
|
1299
|
+
return metadata;
|
|
1300
|
+
}
|
|
1301
|
+
return __handleAsyncCheckoutCompletion;
|
|
1302
|
+
}
|
|
1274
1303
|
function updateFormSubmissions(payload) {
|
|
1275
1304
|
function __updateFormSubmissions({ host }) {
|
|
1276
1305
|
const metadata = {
|
|
@@ -1431,6 +1460,7 @@ var ChannelType = /* @__PURE__ */ ((ChannelType2) => {
|
|
|
1431
1460
|
ChannelType2["PAYPAL_AGENTIC_CHECKOUT"] = "PAYPAL_AGENTIC_CHECKOUT";
|
|
1432
1461
|
ChannelType2["STRIPE_AGENTIC_CHECKOUT"] = "STRIPE_AGENTIC_CHECKOUT";
|
|
1433
1462
|
ChannelType2["WIX_INVOICES_PLATFORM"] = "WIX_INVOICES_PLATFORM";
|
|
1463
|
+
ChannelType2["UCP_AGENTIC_CHECKOUT"] = "UCP_AGENTIC_CHECKOUT";
|
|
1434
1464
|
return ChannelType2;
|
|
1435
1465
|
})(ChannelType || {});
|
|
1436
1466
|
var VatType = /* @__PURE__ */ ((VatType2) => {
|
|
@@ -1534,6 +1564,7 @@ var ViolationCode = /* @__PURE__ */ ((ViolationCode2) => {
|
|
|
1534
1564
|
ViolationCode2["INVALID_GIFT_CARD_CODE"] = "INVALID_GIFT_CARD_CODE";
|
|
1535
1565
|
ViolationCode2["INVALID_GIFT_CARD_STATUS"] = "INVALID_GIFT_CARD_STATUS";
|
|
1536
1566
|
ViolationCode2["CANNOT_PAY_FOR_GIFT_CARD_WITH_GIFT_CARD"] = "CANNOT_PAY_FOR_GIFT_CARD_WITH_GIFT_CARD";
|
|
1567
|
+
ViolationCode2["SUBTOTAL_BELOW_ORDER_MINIMUM"] = "SUBTOTAL_BELOW_ORDER_MINIMUM";
|
|
1537
1568
|
return ViolationCode2;
|
|
1538
1569
|
})(ViolationCode || {});
|
|
1539
1570
|
var ViolationSeverity = /* @__PURE__ */ ((ViolationSeverity2) => {
|
|
@@ -2567,6 +2598,29 @@ async function markCartAsCompleted2(cartId, options) {
|
|
|
2567
2598
|
throw transformedError;
|
|
2568
2599
|
}
|
|
2569
2600
|
}
|
|
2601
|
+
async function handleAsyncCheckoutCompletion2(token) {
|
|
2602
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
2603
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ token });
|
|
2604
|
+
const reqOpts = handleAsyncCheckoutCompletion(payload);
|
|
2605
|
+
sideEffects?.onSiteCall?.();
|
|
2606
|
+
try {
|
|
2607
|
+
const result = await httpClient.request(reqOpts);
|
|
2608
|
+
sideEffects?.onSuccess?.(result);
|
|
2609
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
2610
|
+
} catch (err) {
|
|
2611
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
2612
|
+
err,
|
|
2613
|
+
{
|
|
2614
|
+
spreadPathsToArguments: {},
|
|
2615
|
+
explicitPathsToArguments: { token: "$[0]" },
|
|
2616
|
+
singleArgumentUnchanged: false
|
|
2617
|
+
},
|
|
2618
|
+
["token"]
|
|
2619
|
+
);
|
|
2620
|
+
sideEffects?.onError?.(err);
|
|
2621
|
+
throw transformedError;
|
|
2622
|
+
}
|
|
2623
|
+
}
|
|
2570
2624
|
async function updateFormSubmissions2(cartId, options) {
|
|
2571
2625
|
const { httpClient, sideEffects } = arguments[2];
|
|
2572
2626
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -2766,6 +2820,13 @@ function markCartAsCompleted3(httpClient) {
|
|
|
2766
2820
|
{ httpClient }
|
|
2767
2821
|
);
|
|
2768
2822
|
}
|
|
2823
|
+
function handleAsyncCheckoutCompletion3(httpClient) {
|
|
2824
|
+
return (token) => handleAsyncCheckoutCompletion2(
|
|
2825
|
+
token,
|
|
2826
|
+
// @ts-ignore
|
|
2827
|
+
{ httpClient }
|
|
2828
|
+
);
|
|
2829
|
+
}
|
|
2769
2830
|
function updateFormSubmissions3(httpClient) {
|
|
2770
2831
|
return (cartId, options) => updateFormSubmissions2(
|
|
2771
2832
|
cartId,
|
|
@@ -2796,6 +2857,7 @@ var removeDeliveryMethod4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTM
|
|
|
2796
2857
|
var addGiftCard4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(addGiftCard3);
|
|
2797
2858
|
var removeGiftCard4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(removeGiftCard3);
|
|
2798
2859
|
var markCartAsCompleted4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(markCartAsCompleted3);
|
|
2860
|
+
var handleAsyncCheckoutCompletion4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(handleAsyncCheckoutCompletion3);
|
|
2799
2861
|
var updateFormSubmissions4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateFormSubmissions3);
|
|
2800
2862
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2801
2863
|
0 && (module.exports = {
|
|
@@ -2846,6 +2908,7 @@ var updateFormSubmissions4 = /* @__PURE__ */ (0, import_rest_modules3.createREST
|
|
|
2846
2908
|
estimateCart,
|
|
2847
2909
|
getCart,
|
|
2848
2910
|
getCheckoutUrl,
|
|
2911
|
+
handleAsyncCheckoutCompletion,
|
|
2849
2912
|
markCartAsCompleted,
|
|
2850
2913
|
placeOrder,
|
|
2851
2914
|
refreshCart,
|