@wix/auto_sdk_ecom_cart-v-2 1.0.15 → 1.0.17

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.
Files changed (37) hide show
  1. package/build/cjs/index.d.ts +68 -38
  2. package/build/cjs/index.js +53 -17
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +1 -1
  5. package/build/cjs/index.typings.js +53 -17
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +155 -33
  8. package/build/cjs/meta.js +51 -0
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +68 -38
  11. package/build/es/index.mjs +53 -15
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +1 -1
  14. package/build/es/index.typings.mjs +53 -15
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +155 -33
  17. package/build/es/meta.mjs +51 -0
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +2 -2
  20. package/build/internal/cjs/index.js +53 -17
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +69 -39
  23. package/build/internal/cjs/index.typings.js +53 -17
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +155 -33
  26. package/build/internal/cjs/meta.js +51 -0
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +2 -2
  29. package/build/internal/es/index.mjs +53 -15
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +69 -39
  32. package/build/internal/es/index.typings.mjs +53 -15
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +155 -33
  35. package/build/internal/es/meta.mjs +51 -0
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +2 -2
@@ -125,7 +125,7 @@ interface V2LineItem {
125
125
  /**
126
126
  * Custom extended fields for the line item object.
127
127
  *
128
- * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls.
128
+ * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured using the 'Checkout & Orders - Line Items Schema Plugin' in the app dashboard before they can be accessed with API calls.
129
129
  */
130
130
  extendedFields?: ExtendedFields;
131
131
  /**
@@ -1512,16 +1512,6 @@ interface CartSummary {
1512
1512
  priceSummary?: PriceSummary;
1513
1513
  /** Payment details summarizing how the customer will pay for the order. */
1514
1514
  paymentSummary?: PaymentSummary;
1515
- /**
1516
- * List of errors that occurred during the calculation process.
1517
- * @maxSize 100
1518
- */
1519
- errors?: CalculationError[];
1520
- /**
1521
- * List of business violations raised by the Validations service plugin ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/service-plugins/validations/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/service-plugins/validations-integration-service-plugin/introduction)).
1522
- * @maxSize 100
1523
- */
1524
- violations?: Violation[];
1525
1515
  /**
1526
1516
  * A token representing the Cart's calculated prices.
1527
1517
  *
@@ -1538,6 +1528,17 @@ interface CartSummary {
1538
1528
  * @maxLength 1024
1539
1529
  */
1540
1530
  priceVerificationToken?: string | null;
1531
+ /**
1532
+ * List of errors that occurred during the calculation process, returned by Totals Calculator.
1533
+ * TODO: Temporary field for backward compatibility; will be removed once we introduce the unified 'violations' model.
1534
+ */
1535
+ calculationErrors?: CalculationErrors;
1536
+ /**
1537
+ * List of business violations raised by the Validations service plugin ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/service-plugins/validations/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/service-plugins/validations-integration-service-plugin/introduction)).
1538
+ * TODO: Temporary field for backward compatibility; will be removed once we introduce the unified 'violations' model.
1539
+ * @maxSize 100
1540
+ */
1541
+ spiViolations?: Violation[];
1541
1542
  }
1542
1543
  interface LineItemSummary {
1543
1544
  /**
@@ -1782,32 +1783,37 @@ interface Charge {
1782
1783
  /** The billing date from which the charge starts. */
1783
1784
  cycleBillingDate?: Date | null;
1784
1785
  }
1785
- interface CalculationError {
1786
- /** The calculation component that caused the error. */
1787
- component?: CalculationComponentWithLiterals;
1788
- /** Machine-readable error code. */
1789
- code?: ErrorCodeWithLiterals;
1786
+ interface CalculationErrors extends CalculationErrorsShippingCalculationErrorOneOf {
1787
+ /** General shipping calculation error. */
1788
+ generalShippingCalculationError?: Details;
1789
+ /** Carrier errors. */
1790
+ carrierErrors?: CarrierErrors;
1791
+ /** Tax calculation error. */
1792
+ taxCalculationError?: Details;
1793
+ /** Coupon calculation error. */
1794
+ couponCalculationError?: Details;
1795
+ /** Gift card calculation error. */
1796
+ giftCardCalculationError?: Details;
1797
+ /**
1798
+ * Order validation errors.
1799
+ * @maxSize 100
1800
+ */
1801
+ orderValidationErrors?: ApplicationError[];
1790
1802
  /**
1791
- * Human-readable explanation.
1792
- * @maxLength 100
1803
+ * Membership payment methods calculation errors
1804
+ * For example, will indicate that a line item that must be paid with membership payment doesn't have one or selected memberships are invalid
1793
1805
  */
1794
- description?: string | null;
1795
- }
1796
- declare enum CalculationComponent {
1797
- UNKNOWN_CALCULATION_COMPONENT = "UNKNOWN_CALCULATION_COMPONENT",
1798
- DISCOUNTS = "DISCOUNTS",
1799
- DELIVERY = "DELIVERY",
1800
- TAX = "TAX",
1801
- MEMBERSHIPS = "MEMBERSHIPS",
1802
- GIFT_CARDS = "GIFT_CARDS"
1806
+ membershipError?: Details;
1807
+ /** Discount Rule calculation error. */
1808
+ discountsCalculationError?: Details;
1803
1809
  }
1804
- /** @enumType */
1805
- type CalculationComponentWithLiterals = CalculationComponent | 'UNKNOWN_CALCULATION_COMPONENT' | 'DISCOUNTS' | 'DELIVERY' | 'TAX' | 'MEMBERSHIPS' | 'GIFT_CARDS';
1806
- declare enum ErrorCode {
1807
- UNKNOWN_ERROR_CODE = "UNKNOWN_ERROR_CODE"
1810
+ /** @oneof */
1811
+ interface CalculationErrorsShippingCalculationErrorOneOf {
1812
+ /** General shipping calculation error. */
1813
+ generalShippingCalculationError?: Details;
1814
+ /** Carrier errors. */
1815
+ carrierErrors?: CarrierErrors;
1808
1816
  }
1809
- /** @enumType */
1810
- type ErrorCodeWithLiterals = ErrorCode | 'UNKNOWN_ERROR_CODE';
1811
1817
  interface Details extends DetailsKindOneOf {
1812
1818
  applicationError?: ApplicationError;
1813
1819
  validationError?: ValidationError;
@@ -1904,6 +1910,22 @@ interface SystemError {
1904
1910
  /** Error code. */
1905
1911
  errorCode?: string | null;
1906
1912
  }
1913
+ interface CarrierErrors {
1914
+ /**
1915
+ * Carrier errors.
1916
+ * @maxSize 100
1917
+ */
1918
+ errors?: CarrierError[];
1919
+ }
1920
+ interface CarrierError {
1921
+ /**
1922
+ * Carrier ID.
1923
+ * @format GUID
1924
+ */
1925
+ carrierId?: string;
1926
+ /** Error details. */
1927
+ error?: Details;
1928
+ }
1907
1929
  interface Violation {
1908
1930
  /** Severity of the violation. The violations are shown on the cart and checkout pages. A warning is displayed as yellow, and allows a site visitor to proceed with caution. An error is displayed as red, and doesn't allow a site visitor to proceed with the eCommerce flow. */
1909
1931
  severity?: SeverityWithLiterals;
@@ -2642,10 +2664,14 @@ interface PlaceOrderRequest {
2642
2664
  /**
2643
2665
  * The pricing token received from `CalculateCart`'s response.
2644
2666
  * Used to verify that the prices shown to the customer have not changed before completing checkout.
2645
- * @maxLength 1024
2646
- * @readonly
2667
+ * @maxLength 3000
2647
2668
  */
2648
2669
  pricingToken?: string | null;
2670
+ /**
2671
+ * Payment token.
2672
+ * @maxLength 100
2673
+ */
2674
+ paymentToken?: string | null;
2649
2675
  /** Urls to redirect to after payment is made. */
2650
2676
  redirectUrls?: RedirectUrls;
2651
2677
  /** Indicates the payment method should be saved on the order */
@@ -3071,7 +3097,7 @@ declare function refreshCart(cartId: string): Promise<NonNullablePaths<RefreshCa
3071
3097
  * @permissionId ecom:v2:cart:calculate_cart
3072
3098
  * @fqn wix.ecom.cart.v2.CartService.CalculateCart
3073
3099
  */
3074
- declare function calculateCart(cartId: string, options?: CalculateCartOptions): Promise<NonNullablePaths<CalculateCartResponse, `cart._id` | `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.unitPrice.formattedAmount` | `cart.lineItems.${number}.pricing.unitPrice.formattedConvertedAmount` | `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.appId` | `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.settings.lockGiftCard` | `cart.settings.lockCouponCode` | `cart.settings.policyAgreementCheckboxDisabled` | `cart.settings.manualPaymentDisabled` | `summary.cartId` | `summary.lineItems` | `summary.lineItems.${number}.lineItemId` | `summary.lineItems.${number}.quantity` | `summary.lineItems.${number}.unitPrice.amount` | `summary.lineItems.${number}.unitPrice.convertedAmount` | `summary.lineItems.${number}.unitPrice.formattedAmount` | `summary.lineItems.${number}.unitPrice.formattedConvertedAmount` | `summary.discounts` | `summary.discounts.${number}.name.original` | `summary.discounts.${number}.source.sourceType` | `summary.discounts.${number}.scope` | `summary.deliverySummary.method.appId` | `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.errors` | `summary.errors.${number}.component` | `summary.errors.${number}.code` | `summary.violations` | `summary.violations.${number}.severity` | `summary.violations.${number}.target.other.name` | `summary.violations.${number}.target.lineItem.name`, 7>>;
3100
+ declare function calculateCart(cartId: string, options?: CalculateCartOptions): Promise<NonNullablePaths<CalculateCartResponse, `cart._id` | `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.unitPrice.formattedAmount` | `cart.lineItems.${number}.pricing.unitPrice.formattedConvertedAmount` | `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.appId` | `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.settings.lockGiftCard` | `cart.settings.lockCouponCode` | `cart.settings.policyAgreementCheckboxDisabled` | `cart.settings.manualPaymentDisabled` | `summary.cartId` | `summary.lineItems` | `summary.lineItems.${number}.lineItemId` | `summary.lineItems.${number}.quantity` | `summary.lineItems.${number}.unitPrice.amount` | `summary.lineItems.${number}.unitPrice.convertedAmount` | `summary.lineItems.${number}.unitPrice.formattedAmount` | `summary.lineItems.${number}.unitPrice.formattedConvertedAmount` | `summary.discounts` | `summary.discounts.${number}.name.original` | `summary.discounts.${number}.source.sourceType` | `summary.discounts.${number}.scope` | `summary.deliverySummary.method.appId` | `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>>;
3075
3101
  interface CalculateCartOptions {
3076
3102
  /**
3077
3103
  * Specifies the level of **business validation** to perform during cart calculation,
@@ -3121,10 +3147,14 @@ interface PlaceOrderOptions {
3121
3147
  /**
3122
3148
  * The pricing token received from `CalculateCart`'s response.
3123
3149
  * Used to verify that the prices shown to the customer have not changed before completing checkout.
3124
- * @maxLength 1024
3125
- * @readonly
3150
+ * @maxLength 3000
3126
3151
  */
3127
3152
  pricingToken?: string | null;
3153
+ /**
3154
+ * Payment token.
3155
+ * @maxLength 100
3156
+ */
3157
+ paymentToken?: string | null;
3128
3158
  /** Urls to redirect to after payment is made. */
3129
3159
  redirectUrls?: RedirectUrls;
3130
3160
  /** Indicates the payment method should be saved on the order */
@@ -3283,4 +3313,4 @@ interface MarkCartAsCompletedOptions {
3283
3313
  */
3284
3314
  declare function handleAsyncCheckoutCompletion(token: string): Promise<NonNullablePaths<RawHttpResponse, `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`, 4>>;
3285
3315
 
3286
- export { type ActionEvent, type AddCouponRequest, type AddCouponResponse, type AddCouponToCurrentCartRequest, type AddCouponToCurrentCartResponse, type AddGiftCardRequest, type AddGiftCardResponse, type AddGiftCardToCurrentCartRequest, type AddGiftCardToCurrentCartResponse, type AddLineItemsOptions, type AddLineItemsRequest, type AddLineItemsResponse, type AddLineItemsToCurrentCartRequest, type AddLineItemsToCurrentCartResponse, type AdditionalFee, type AdditionalFeeTax, type Address, type AddressLocation, type ApplicationError, type BusinessInfo, type CalculateCartOptions, type CalculateCartRequest, type CalculateCartResponse, type CalculateCurrentCartRequest, type CalculateCurrentCartResponse, CalculationComponent, type CalculationComponentWithLiterals, type CalculationConfig, type CalculationError, type Cart, type CartSettings, type CartSource, type CartSummary, type CatalogItemInput, type CatalogOverrideFields, type CatalogReference, ChannelType, type ChannelTypeWithLiterals, type Charge, type Color, type Coupon, type CreateCartOptions, type CreateCartRequest, type CreateCartResponse, type CreateCurrentCartRequest, type CreateCurrentCartResponse, type CreatedBy, type CreatedByIdOneOf, type CustomContentReference, type CustomField, type CustomItemAttributes, type CustomItemDeliveryConfig, type CustomItemInput, type CustomItemPaymentConfig, type CustomItemPricingInfo, type CustomItemQuantityInfo, type CustomItemSource, type CustomItemTaxConfig, type CustomerInfo, type CustomerInfoIdOneOf, type DeleteCartRequest, type DeleteCartResponse, type DeleteCurrentCartRequest, type DeleteCurrentCartResponse, type DeliveryInfo, type DeliveryMethod, type DeliverySummary, type Description, type DescriptionLine, type DescriptionLineDescriptionLineValueOneOf, type DescriptionLineName, DescriptionLineType, type DescriptionLineTypeWithLiterals, type DescriptionLineValueOneOf, type Details, type DetailsKindOneOf, type Discount, type DiscountBenefit, type DiscountBenefitValueOneOf, DiscountScope, type DiscountScopeWithLiterals, type DiscountSource, DiscountSourceType, type DiscountSourceTypeWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, ErrorCode, type ErrorCodeWithLiterals, type ExtendedFields, type ExternalReference, type FieldViolation, FileType, type FileTypeWithLiterals, type FreeTrialPeriod, type FullAddressContactDetails, type GetCartRequest, type GetCartResponse, type GetCheckoutURLRequest, type GetCheckoutURLResponse, type GetCheckoutUrlOptions, type GetCurrentCartRequest, type GetCurrentCartResponse, type GiftCard, type GiftCardSummary, type Group, type HandleAsyncCheckoutCompletionRequest, type HeadersEntry, type IdentificationData, type IdentificationDataIdOneOf, type ItemAttributes, type ItemDeliveryConfig, type ItemDiscount, type ItemModifier, type ItemPaymentConfig, type ItemPriceBreakdown, type ItemPricingInfo, type ItemQuantityInfo, type ItemSource, ItemStatus, type ItemStatusWithLiterals, type ItemTaxConfig, type ItemType, ItemTypeItemType, type ItemTypeItemTypeDataOneOf, type ItemTypeItemTypeWithLiterals, type LegacyFields, type LineItem, type LineItemSummary, type LineItemTax, type LineItemUpdate, type MarkCartAsCompletedOptions, type MarkCartAsCompletedRequest, type MarkCartAsCompletedResponse, type Membership, type MessageEnvelope, type ModifierGroup, type MultiCurrencyPrice, NameInLineItem, type NameInLineItemWithLiterals, NameInOther, type NameInOtherWithLiterals, type Other, type PaymentInfo, type PaymentOption, PaymentOptionType, type PaymentOptionTypeWithLiterals, type PaymentSummary, type PhysicalProperties, type PlaceOrderOptions, type PlaceOrderRequest, type PlaceOrderResponse, type PlainTextValue, type Policy, type PriceDescription, type PriceSummary, type QuantityUpdate, type RawHttpResponse, type RedirectUrls, type RefreshCartRequest, type RefreshCartResponse, type RefreshCurrentCartRequest, type RefreshCurrentCartResponse, type RemoveCouponFromCurrentCartRequest, type RemoveCouponFromCurrentCartResponse, type RemoveCouponRequest, type RemoveCouponResponse, type RemoveGiftCardFromCurrentCartRequest, type RemoveGiftCardFromCurrentCartResponse, type RemoveGiftCardRequest, type RemoveGiftCardResponse, type RemoveLineItemsFromCurrentCartRequest, type RemoveLineItemsFromCurrentCartResponse, type RemoveLineItemsRequest, type RemoveLineItemsResponse, type RestoreInfo, RuleType, type RuleTypeWithLiterals, type Scope, type SecuredMedia, type SelectedMembership, type SelectedMembershipUpdate, type ServiceProperties, Severity, type SeverityWithLiterals, type StreetAddress, type SubscriptionCharges, SubscriptionFrequency, type SubscriptionFrequencyWithLiterals, type SubscriptionOptionInfo, type SubscriptionSettings, SuggestedFix, type SuggestedFixWithLiterals, type SystemError, type Target, type TargetTargetTypeOneOf, type Tax, type TaxDetails, type TaxInfo, type TaxSummary, type TaxableAddress, type TaxableAddressTaxableAddressDataOneOf, TaxableAddressType, type TaxableAddressTypeWithLiterals, type Title, type TranslatableString, type UpdateCart, type UpdateCartRequest, type UpdateCartResponse, type UpdateCurrentCartRequest, type UpdateCurrentCartResponse, type UpdateLineItemsInCurrentCartRequest, type UpdateLineItemsInCurrentCartResponse, type UpdateLineItemsOptions, type UpdateLineItemsRequest, type UpdateLineItemsResponse, type V2AdditionalFee, type V2LineItem, type ValidationError, ValidationsConfig, type ValidationsConfigWithLiterals, type VatId, VatType, type VatTypeWithLiterals, type Violation, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, WeightUnit, type WeightUnitWithLiterals, addCoupon, addGiftCard, addLineItems, calculateCart, createCart, deleteCart, getCart, getCheckoutUrl, handleAsyncCheckoutCompletion, markCartAsCompleted, placeOrder, refreshCart, removeCoupon, removeGiftCard, removeLineItems, updateCart, updateLineItems };
3316
+ export { type ActionEvent, type AddCouponRequest, type AddCouponResponse, type AddCouponToCurrentCartRequest, type AddCouponToCurrentCartResponse, type AddGiftCardRequest, type AddGiftCardResponse, type AddGiftCardToCurrentCartRequest, type AddGiftCardToCurrentCartResponse, type AddLineItemsOptions, type AddLineItemsRequest, type AddLineItemsResponse, type AddLineItemsToCurrentCartRequest, type AddLineItemsToCurrentCartResponse, type AdditionalFee, type AdditionalFeeTax, type Address, type AddressLocation, type ApplicationError, type BusinessInfo, type CalculateCartOptions, type CalculateCartRequest, type CalculateCartResponse, type CalculateCurrentCartRequest, type CalculateCurrentCartResponse, type CalculationConfig, type CalculationErrors, type CalculationErrorsShippingCalculationErrorOneOf, type CarrierError, type CarrierErrors, type Cart, type CartSettings, type CartSource, type CartSummary, type CatalogItemInput, type CatalogOverrideFields, type CatalogReference, ChannelType, type ChannelTypeWithLiterals, type Charge, type Color, type Coupon, type CreateCartOptions, type CreateCartRequest, type CreateCartResponse, type CreateCurrentCartRequest, type CreateCurrentCartResponse, type CreatedBy, type CreatedByIdOneOf, type CustomContentReference, type CustomField, type CustomItemAttributes, type CustomItemDeliveryConfig, type CustomItemInput, type CustomItemPaymentConfig, type CustomItemPricingInfo, type CustomItemQuantityInfo, type CustomItemSource, type CustomItemTaxConfig, type CustomerInfo, type CustomerInfoIdOneOf, type DeleteCartRequest, type DeleteCartResponse, type DeleteCurrentCartRequest, type DeleteCurrentCartResponse, type DeliveryInfo, type DeliveryMethod, type DeliverySummary, type Description, type DescriptionLine, type DescriptionLineDescriptionLineValueOneOf, type DescriptionLineName, DescriptionLineType, type DescriptionLineTypeWithLiterals, type DescriptionLineValueOneOf, type Details, type DetailsKindOneOf, type Discount, type DiscountBenefit, type DiscountBenefitValueOneOf, DiscountScope, type DiscountScopeWithLiterals, type DiscountSource, DiscountSourceType, type DiscountSourceTypeWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ExtendedFields, type ExternalReference, type FieldViolation, FileType, type FileTypeWithLiterals, type FreeTrialPeriod, type FullAddressContactDetails, type GetCartRequest, type GetCartResponse, type GetCheckoutURLRequest, type GetCheckoutURLResponse, type GetCheckoutUrlOptions, type GetCurrentCartRequest, type GetCurrentCartResponse, type GiftCard, type GiftCardSummary, type Group, type HandleAsyncCheckoutCompletionRequest, type HeadersEntry, type IdentificationData, type IdentificationDataIdOneOf, type ItemAttributes, type ItemDeliveryConfig, type ItemDiscount, type ItemModifier, type ItemPaymentConfig, type ItemPriceBreakdown, type ItemPricingInfo, type ItemQuantityInfo, type ItemSource, ItemStatus, type ItemStatusWithLiterals, type ItemTaxConfig, type ItemType, ItemTypeItemType, type ItemTypeItemTypeDataOneOf, type ItemTypeItemTypeWithLiterals, type LegacyFields, type LineItem, type LineItemSummary, type LineItemTax, type LineItemUpdate, type MarkCartAsCompletedOptions, type MarkCartAsCompletedRequest, type MarkCartAsCompletedResponse, type Membership, type MessageEnvelope, type ModifierGroup, type MultiCurrencyPrice, NameInLineItem, type NameInLineItemWithLiterals, NameInOther, type NameInOtherWithLiterals, type Other, type PaymentInfo, type PaymentOption, PaymentOptionType, type PaymentOptionTypeWithLiterals, type PaymentSummary, type PhysicalProperties, type PlaceOrderOptions, type PlaceOrderRequest, type PlaceOrderResponse, type PlainTextValue, type Policy, type PriceDescription, type PriceSummary, type QuantityUpdate, type RawHttpResponse, type RedirectUrls, type RefreshCartRequest, type RefreshCartResponse, type RefreshCurrentCartRequest, type RefreshCurrentCartResponse, type RemoveCouponFromCurrentCartRequest, type RemoveCouponFromCurrentCartResponse, type RemoveCouponRequest, type RemoveCouponResponse, type RemoveGiftCardFromCurrentCartRequest, type RemoveGiftCardFromCurrentCartResponse, type RemoveGiftCardRequest, type RemoveGiftCardResponse, type RemoveLineItemsFromCurrentCartRequest, type RemoveLineItemsFromCurrentCartResponse, type RemoveLineItemsRequest, type RemoveLineItemsResponse, type RestoreInfo, RuleType, type RuleTypeWithLiterals, type Scope, type SecuredMedia, type SelectedMembership, type SelectedMembershipUpdate, type ServiceProperties, Severity, type SeverityWithLiterals, type StreetAddress, type SubscriptionCharges, SubscriptionFrequency, type SubscriptionFrequencyWithLiterals, type SubscriptionOptionInfo, type SubscriptionSettings, SuggestedFix, type SuggestedFixWithLiterals, type SystemError, type Target, type TargetTargetTypeOneOf, type Tax, type TaxDetails, type TaxInfo, type TaxSummary, type TaxableAddress, type TaxableAddressTaxableAddressDataOneOf, TaxableAddressType, type TaxableAddressTypeWithLiterals, type Title, type TranslatableString, type UpdateCart, type UpdateCartRequest, type UpdateCartResponse, type UpdateCurrentCartRequest, type UpdateCurrentCartResponse, type UpdateLineItemsInCurrentCartRequest, type UpdateLineItemsInCurrentCartResponse, type UpdateLineItemsOptions, type UpdateLineItemsRequest, type UpdateLineItemsResponse, type V2AdditionalFee, type V2LineItem, type ValidationError, ValidationsConfig, type ValidationsConfigWithLiterals, type VatId, VatType, type VatTypeWithLiterals, type Violation, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, WeightUnit, type WeightUnitWithLiterals, addCoupon, addGiftCard, addLineItems, calculateCart, createCart, deleteCart, getCart, getCheckoutUrl, handleAsyncCheckoutCompletion, markCartAsCompleted, placeOrder, refreshCart, removeCoupon, removeGiftCard, removeLineItems, updateCart, updateLineItems };
@@ -20,12 +20,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // index.typings.ts
21
21
  var index_typings_exports = {};
22
22
  __export(index_typings_exports, {
23
- CalculationComponent: () => CalculationComponent,
24
23
  ChannelType: () => ChannelType,
25
24
  DescriptionLineType: () => DescriptionLineType,
26
25
  DiscountScope: () => DiscountScope,
27
26
  DiscountSourceType: () => DiscountSourceType,
28
- ErrorCode: () => ErrorCode,
29
27
  FileType: () => FileType,
30
28
  ItemStatus: () => ItemStatus,
31
29
  ItemTypeItemType: () => ItemTypeItemType,
@@ -214,6 +212,9 @@ function createCart(payload) {
214
212
  method: "POST",
215
213
  methodFqn: "wix.ecom.cart.v2.CartService.CreateCart",
216
214
  packageName: PACKAGE_NAME,
215
+ migrationOptions: {
216
+ optInTransformResponse: true
217
+ },
217
218
  url: resolveWixEcomCartV2CartServiceUrl({
218
219
  protoPath: "/v2/carts",
219
220
  data: serializedData,
@@ -264,6 +265,9 @@ function getCart(payload) {
264
265
  method: "GET",
265
266
  methodFqn: "wix.ecom.cart.v2.CartService.GetCart",
266
267
  packageName: PACKAGE_NAME,
268
+ migrationOptions: {
269
+ optInTransformResponse: true
270
+ },
267
271
  url: resolveWixEcomCartV2CartServiceUrl({
268
272
  protoPath: "/v2/carts/{cartId}",
269
273
  data: payload,
@@ -348,6 +352,9 @@ function updateCart(payload) {
348
352
  method: "PATCH",
349
353
  methodFqn: "wix.ecom.cart.v2.CartService.UpdateCart",
350
354
  packageName: PACKAGE_NAME,
355
+ migrationOptions: {
356
+ optInTransformResponse: true
357
+ },
351
358
  url: resolveWixEcomCartV2CartServiceUrl({
352
359
  protoPath: "/v2/carts/{cart.id}",
353
360
  data: serializedData,
@@ -398,6 +405,9 @@ function deleteCart(payload) {
398
405
  method: "DELETE",
399
406
  methodFqn: "wix.ecom.cart.v2.CartService.DeleteCart",
400
407
  packageName: PACKAGE_NAME,
408
+ migrationOptions: {
409
+ optInTransformResponse: true
410
+ },
401
411
  url: resolveWixEcomCartV2CartServiceUrl({
402
412
  protoPath: "/v2/carts/{cartId}",
403
413
  data: payload,
@@ -416,6 +426,9 @@ function refreshCart(payload) {
416
426
  method: "POST",
417
427
  methodFqn: "wix.ecom.cart.v2.CartService.RefreshCart",
418
428
  packageName: PACKAGE_NAME,
429
+ migrationOptions: {
430
+ optInTransformResponse: true
431
+ },
419
432
  url: resolveWixEcomCartV2CartServiceUrl({
420
433
  protoPath: "/v2/carts/{cartId}/refresh",
421
434
  data: payload,
@@ -466,6 +479,9 @@ function calculateCart(payload) {
466
479
  method: "POST",
467
480
  methodFqn: "wix.ecom.cart.v2.CartService.CalculateCart",
468
481
  packageName: PACKAGE_NAME,
482
+ migrationOptions: {
483
+ optInTransformResponse: true
484
+ },
469
485
  url: resolveWixEcomCartV2CartServiceUrl({
470
486
  protoPath: "/v2/carts/{cartId}/calculate",
471
487
  data: payload,
@@ -519,6 +535,9 @@ function getCheckoutUrl(payload) {
519
535
  method: "POST",
520
536
  methodFqn: "wix.ecom.cart.v2.CartService.GetCheckoutURL",
521
537
  packageName: PACKAGE_NAME,
538
+ migrationOptions: {
539
+ optInTransformResponse: true
540
+ },
522
541
  url: resolveWixEcomCartV2CartServiceUrl({
523
542
  protoPath: "/v2/carts/{cartId}/get-checkout-url",
524
543
  data: payload,
@@ -537,6 +556,9 @@ function placeOrder(payload) {
537
556
  method: "POST",
538
557
  methodFqn: "wix.ecom.cart.v2.CartService.PlaceOrder",
539
558
  packageName: PACKAGE_NAME,
559
+ migrationOptions: {
560
+ optInTransformResponse: true
561
+ },
540
562
  url: resolveWixEcomCartV2CartServiceUrl({
541
563
  protoPath: "/v2/carts/{cartId}/place-order",
542
564
  data: payload,
@@ -579,6 +601,9 @@ function addLineItems(payload) {
579
601
  method: "POST",
580
602
  methodFqn: "wix.ecom.cart.v2.CartService.AddLineItems",
581
603
  packageName: PACKAGE_NAME,
604
+ migrationOptions: {
605
+ optInTransformResponse: true
606
+ },
582
607
  url: resolveWixEcomCartV2CartServiceUrl({
583
608
  protoPath: "/v2/carts/{cartId}/add-line-items",
584
609
  data: serializedData,
@@ -629,6 +654,9 @@ function removeLineItems(payload) {
629
654
  method: "POST",
630
655
  methodFqn: "wix.ecom.cart.v2.CartService.RemoveLineItems",
631
656
  packageName: PACKAGE_NAME,
657
+ migrationOptions: {
658
+ optInTransformResponse: true
659
+ },
632
660
  url: resolveWixEcomCartV2CartServiceUrl({
633
661
  protoPath: "/v2/carts/{cartId}/remove-line-items",
634
662
  data: payload,
@@ -679,6 +707,9 @@ function updateLineItems(payload) {
679
707
  method: "POST",
680
708
  methodFqn: "wix.ecom.cart.v2.CartService.UpdateLineItems",
681
709
  packageName: PACKAGE_NAME,
710
+ migrationOptions: {
711
+ optInTransformResponse: true
712
+ },
682
713
  url: resolveWixEcomCartV2CartServiceUrl({
683
714
  protoPath: "/v2/carts/{cartId}/update-line-items",
684
715
  data: payload,
@@ -729,6 +760,9 @@ function addCoupon(payload) {
729
760
  method: "POST",
730
761
  methodFqn: "wix.ecom.cart.v2.CartService.AddCoupon",
731
762
  packageName: PACKAGE_NAME,
763
+ migrationOptions: {
764
+ optInTransformResponse: true
765
+ },
732
766
  url: resolveWixEcomCartV2CartServiceUrl({
733
767
  protoPath: "/v2/carts/{cartId}/add-coupon",
734
768
  data: payload,
@@ -779,6 +813,9 @@ function removeCoupon(payload) {
779
813
  method: "POST",
780
814
  methodFqn: "wix.ecom.cart.v2.CartService.RemoveCoupon",
781
815
  packageName: PACKAGE_NAME,
816
+ migrationOptions: {
817
+ optInTransformResponse: true
818
+ },
782
819
  url: resolveWixEcomCartV2CartServiceUrl({
783
820
  protoPath: "/v2/carts/{cartId}/remove-coupon",
784
821
  data: payload,
@@ -829,6 +866,9 @@ function addGiftCard(payload) {
829
866
  method: "POST",
830
867
  methodFqn: "wix.ecom.cart.v2.CartService.AddGiftCard",
831
868
  packageName: PACKAGE_NAME,
869
+ migrationOptions: {
870
+ optInTransformResponse: true
871
+ },
832
872
  url: resolveWixEcomCartV2CartServiceUrl({
833
873
  protoPath: "/v2/carts/{cartId}/add-gift-card",
834
874
  data: payload,
@@ -879,6 +919,9 @@ function removeGiftCard(payload) {
879
919
  method: "POST",
880
920
  methodFqn: "wix.ecom.cart.v2.CartService.RemoveGiftCard",
881
921
  packageName: PACKAGE_NAME,
922
+ migrationOptions: {
923
+ optInTransformResponse: true
924
+ },
882
925
  url: resolveWixEcomCartV2CartServiceUrl({
883
926
  protoPath: "/v2/carts/{cartId}/remove-gift-card",
884
927
  data: payload,
@@ -929,6 +972,9 @@ function markCartAsCompleted(payload) {
929
972
  method: "POST",
930
973
  methodFqn: "wix.ecom.cart.v2.CartService.MarkCartAsCompleted",
931
974
  packageName: PACKAGE_NAME,
975
+ migrationOptions: {
976
+ optInTransformResponse: true
977
+ },
932
978
  url: resolveWixEcomCartV2CartServiceUrl({
933
979
  protoPath: "/v2/carts/{cartId}/mark-cart-as-completed",
934
980
  data: payload,
@@ -979,6 +1025,9 @@ function handleAsyncCheckoutCompletion(payload) {
979
1025
  method: "POST",
980
1026
  methodFqn: "wix.ecom.cart.v2.CartService.HandleAsyncCheckoutCompletion",
981
1027
  packageName: PACKAGE_NAME,
1028
+ migrationOptions: {
1029
+ optInTransformResponse: true
1030
+ },
982
1031
  url: resolveWixEcomCartV2CartServiceUrl({
983
1032
  protoPath: "/v2/carts/handle-async-checkout-completion",
984
1033
  data: payload,
@@ -1105,19 +1154,6 @@ var DiscountScope = /* @__PURE__ */ ((DiscountScope2) => {
1105
1154
  DiscountScope2["DELIVERY"] = "DELIVERY";
1106
1155
  return DiscountScope2;
1107
1156
  })(DiscountScope || {});
1108
- var CalculationComponent = /* @__PURE__ */ ((CalculationComponent2) => {
1109
- CalculationComponent2["UNKNOWN_CALCULATION_COMPONENT"] = "UNKNOWN_CALCULATION_COMPONENT";
1110
- CalculationComponent2["DISCOUNTS"] = "DISCOUNTS";
1111
- CalculationComponent2["DELIVERY"] = "DELIVERY";
1112
- CalculationComponent2["TAX"] = "TAX";
1113
- CalculationComponent2["MEMBERSHIPS"] = "MEMBERSHIPS";
1114
- CalculationComponent2["GIFT_CARDS"] = "GIFT_CARDS";
1115
- return CalculationComponent2;
1116
- })(CalculationComponent || {});
1117
- var ErrorCode = /* @__PURE__ */ ((ErrorCode2) => {
1118
- ErrorCode2["UNKNOWN_ERROR_CODE"] = "UNKNOWN_ERROR_CODE";
1119
- return ErrorCode2;
1120
- })(ErrorCode || {});
1121
1157
  var RuleType = /* @__PURE__ */ ((RuleType2) => {
1122
1158
  RuleType2["VALIDATION"] = "VALIDATION";
1123
1159
  RuleType2["OTHER"] = "OTHER";
@@ -1520,6 +1556,7 @@ async function placeOrder2(cartId, options) {
1520
1556
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1521
1557
  cartId,
1522
1558
  pricingToken: options?.pricingToken,
1559
+ paymentToken: options?.paymentToken,
1523
1560
  redirectUrls: options?.redirectUrls,
1524
1561
  savePaymentMethod: options?.savePaymentMethod,
1525
1562
  delayCapture: options?.delayCapture
@@ -1538,6 +1575,7 @@ async function placeOrder2(cartId, options) {
1538
1575
  explicitPathsToArguments: {
1539
1576
  cartId: "$[0]",
1540
1577
  pricingToken: "$[1].pricingToken",
1578
+ paymentToken: "$[1].paymentToken",
1541
1579
  redirectUrls: "$[1].redirectUrls",
1542
1580
  savePaymentMethod: "$[1].savePaymentMethod",
1543
1581
  delayCapture: "$[1].delayCapture"
@@ -1974,12 +2012,10 @@ async function handleAsyncCheckoutCompletion2(token) {
1974
2012
  }
1975
2013
  // Annotate the CommonJS export names for ESM import in node:
1976
2014
  0 && (module.exports = {
1977
- CalculationComponent,
1978
2015
  ChannelType,
1979
2016
  DescriptionLineType,
1980
2017
  DiscountScope,
1981
2018
  DiscountSourceType,
1982
- ErrorCode,
1983
2019
  FileType,
1984
2020
  ItemStatus,
1985
2021
  ItemTypeItemType,