@wix/auto_sdk_ecom_cart-v-2 1.0.16 → 1.0.18

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.
@@ -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
  /**
@@ -1237,7 +1237,7 @@ interface AddressLocation {
1237
1237
  interface DeliveryMethod {
1238
1238
  /**
1239
1239
  * The carrier app id
1240
- * @format GUID
1240
+ * @maxLength 50
1241
1241
  */
1242
1242
  appId?: string;
1243
1243
  /**
@@ -1460,16 +1460,6 @@ interface CartSummary {
1460
1460
  priceSummary?: PriceSummary;
1461
1461
  /** Payment details summarizing how the customer will pay for the order. */
1462
1462
  paymentSummary?: PaymentSummary;
1463
- /**
1464
- * List of errors that occurred during the calculation process.
1465
- * @maxSize 100
1466
- */
1467
- errors?: CalculationError[];
1468
- /**
1469
- * 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)).
1470
- * @maxSize 100
1471
- */
1472
- violations?: Violation[];
1473
1463
  /**
1474
1464
  * A token representing the Cart's calculated prices.
1475
1465
  *
@@ -1486,6 +1476,17 @@ interface CartSummary {
1486
1476
  * @maxLength 1024
1487
1477
  */
1488
1478
  priceVerificationToken?: string | null;
1479
+ /**
1480
+ * List of errors that occurred during the calculation process, returned by Totals Calculator.
1481
+ * TODO: Temporary field for backward compatibility; will be removed once we introduce the unified 'violations' model.
1482
+ */
1483
+ calculationErrors?: CalculationErrors;
1484
+ /**
1485
+ * 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)).
1486
+ * TODO: Temporary field for backward compatibility; will be removed once we introduce the unified 'violations' model.
1487
+ * @maxSize 100
1488
+ */
1489
+ spiViolations?: Violation[];
1489
1490
  }
1490
1491
  interface LineItemSummary {
1491
1492
  /**
@@ -1730,32 +1731,149 @@ interface Charge {
1730
1731
  /** The billing date from which the charge starts. */
1731
1732
  cycleBillingDate?: Date | null;
1732
1733
  }
1733
- interface CalculationError {
1734
- /** The calculation component that caused the error. */
1735
- component?: CalculationComponentWithLiterals;
1736
- /** Machine-readable error code. */
1737
- code?: ErrorCodeWithLiterals;
1734
+ interface CalculationErrors extends CalculationErrorsShippingCalculationErrorOneOf {
1735
+ /** General shipping calculation error. */
1736
+ generalShippingCalculationError?: Details;
1737
+ /** Carrier errors. */
1738
+ carrierErrors?: CarrierErrors;
1739
+ /** Tax calculation error. */
1740
+ taxCalculationError?: Details;
1741
+ /** Coupon calculation error. */
1742
+ couponCalculationError?: Details;
1743
+ /** Gift card calculation error. */
1744
+ giftCardCalculationError?: Details;
1745
+ /**
1746
+ * Order validation errors.
1747
+ * @maxSize 100
1748
+ */
1749
+ orderValidationErrors?: ApplicationError[];
1738
1750
  /**
1739
- * Human-readable explanation.
1740
- * @maxLength 100
1751
+ * Membership payment methods calculation errors
1752
+ * For example, will indicate that a line item that must be paid with membership payment doesn't have one or selected memberships are invalid
1741
1753
  */
1742
- description?: string | null;
1754
+ membershipError?: Details;
1755
+ /** Discount Rule calculation error. */
1756
+ discountsCalculationError?: Details;
1743
1757
  }
1744
- declare enum CalculationComponent {
1745
- UNKNOWN_CALCULATION_COMPONENT = "UNKNOWN_CALCULATION_COMPONENT",
1746
- DISCOUNTS = "DISCOUNTS",
1747
- DELIVERY = "DELIVERY",
1748
- TAX = "TAX",
1749
- MEMBERSHIPS = "MEMBERSHIPS",
1750
- GIFT_CARDS = "GIFT_CARDS"
1758
+ /** @oneof */
1759
+ interface CalculationErrorsShippingCalculationErrorOneOf {
1760
+ /** General shipping calculation error. */
1761
+ generalShippingCalculationError?: Details;
1762
+ /** Carrier errors. */
1763
+ carrierErrors?: CarrierErrors;
1751
1764
  }
1752
- /** @enumType */
1753
- type CalculationComponentWithLiterals = CalculationComponent | 'UNKNOWN_CALCULATION_COMPONENT' | 'DISCOUNTS' | 'DELIVERY' | 'TAX' | 'MEMBERSHIPS' | 'GIFT_CARDS';
1754
- declare enum ErrorCode {
1755
- UNKNOWN_ERROR_CODE = "UNKNOWN_ERROR_CODE"
1765
+ interface Details extends DetailsKindOneOf {
1766
+ applicationError?: ApplicationError;
1767
+ validationError?: ValidationError;
1768
+ systemError?: SystemError;
1769
+ /**
1770
+ * deprecated in API's - to enable migration from rendering arbitrary tracing to rest response
1771
+ * @deprecated
1772
+ */
1773
+ tracing?: Record<string, string>;
1774
+ }
1775
+ /** @oneof */
1776
+ interface DetailsKindOneOf {
1777
+ applicationError?: ApplicationError;
1778
+ validationError?: ValidationError;
1779
+ systemError?: SystemError;
1780
+ }
1781
+ interface ApplicationError {
1782
+ /** Error code. */
1783
+ code?: string;
1784
+ /** Description of the error. */
1785
+ description?: string;
1786
+ /** Data related to the error. */
1787
+ data?: Record<string, any> | null;
1788
+ }
1789
+ /**
1790
+ * example result:
1791
+ * {
1792
+ * "fieldViolations": [
1793
+ * {
1794
+ * "field": "fieldA",
1795
+ * "description": "invalid music note. supported notes: [do,re,mi,fa,sol,la,ti]",
1796
+ * "violatedRule": "OTHER",
1797
+ * "ruleName": "INVALID_NOTE",
1798
+ * "data": {
1799
+ * "value": "FI"
1800
+ * }
1801
+ * },
1802
+ * {
1803
+ * "field": "fieldB",
1804
+ * "description": "field value out of range. supported range: [0-20]",
1805
+ * "violatedRule": "MAX",
1806
+ * "data": {
1807
+ * "threshold": 20
1808
+ * }
1809
+ * },
1810
+ * {
1811
+ * "field": "fieldC",
1812
+ * "description": "invalid phone number. provide a valid phone number of size: [7-12], supported characters: [0-9, +, -, (, )]",
1813
+ * "violatedRule": "FORMAT",
1814
+ * "data": {
1815
+ * "type": "PHONE"
1816
+ * }
1817
+ * }
1818
+ * ]
1819
+ * }
1820
+ */
1821
+ interface ValidationError {
1822
+ fieldViolations?: FieldViolation[];
1823
+ }
1824
+ declare enum RuleType {
1825
+ VALIDATION = "VALIDATION",
1826
+ OTHER = "OTHER",
1827
+ MAX = "MAX",
1828
+ MIN = "MIN",
1829
+ MAX_LENGTH = "MAX_LENGTH",
1830
+ MIN_LENGTH = "MIN_LENGTH",
1831
+ MAX_SIZE = "MAX_SIZE",
1832
+ MIN_SIZE = "MIN_SIZE",
1833
+ FORMAT = "FORMAT",
1834
+ DECIMAL_LTE = "DECIMAL_LTE",
1835
+ DECIMAL_GTE = "DECIMAL_GTE",
1836
+ DECIMAL_LT = "DECIMAL_LT",
1837
+ DECIMAL_GT = "DECIMAL_GT",
1838
+ DECIMAL_MAX_SCALE = "DECIMAL_MAX_SCALE",
1839
+ INVALID_ENUM_VALUE = "INVALID_ENUM_VALUE",
1840
+ REQUIRED_FIELD = "REQUIRED_FIELD",
1841
+ FIELD_NOT_ALLOWED = "FIELD_NOT_ALLOWED",
1842
+ ONE_OF_ALIGNMENT = "ONE_OF_ALIGNMENT",
1843
+ EXACT_LENGTH = "EXACT_LENGTH",
1844
+ EXACT_SIZE = "EXACT_SIZE",
1845
+ REQUIRED_ONE_OF_FIELD = "REQUIRED_ONE_OF_FIELD"
1756
1846
  }
1757
1847
  /** @enumType */
1758
- type ErrorCodeWithLiterals = ErrorCode | 'UNKNOWN_ERROR_CODE';
1848
+ type RuleTypeWithLiterals = RuleType | 'VALIDATION' | 'OTHER' | 'MAX' | 'MIN' | 'MAX_LENGTH' | 'MIN_LENGTH' | 'MAX_SIZE' | 'MIN_SIZE' | 'FORMAT' | 'DECIMAL_LTE' | 'DECIMAL_GTE' | 'DECIMAL_LT' | 'DECIMAL_GT' | 'DECIMAL_MAX_SCALE' | 'INVALID_ENUM_VALUE' | 'REQUIRED_FIELD' | 'FIELD_NOT_ALLOWED' | 'ONE_OF_ALIGNMENT' | 'EXACT_LENGTH' | 'EXACT_SIZE' | 'REQUIRED_ONE_OF_FIELD';
1849
+ interface FieldViolation {
1850
+ field?: string;
1851
+ description?: string;
1852
+ violatedRule?: RuleTypeWithLiterals;
1853
+ /** applicable when violated_rule=OTHER */
1854
+ ruleName?: string | null;
1855
+ data?: Record<string, any> | null;
1856
+ }
1857
+ interface SystemError {
1858
+ /** Error code. */
1859
+ errorCode?: string | null;
1860
+ }
1861
+ interface CarrierErrors {
1862
+ /**
1863
+ * Carrier errors.
1864
+ * @maxSize 100
1865
+ */
1866
+ errors?: CarrierError[];
1867
+ }
1868
+ interface CarrierError {
1869
+ /**
1870
+ * Carrier ID.
1871
+ * @format GUID
1872
+ */
1873
+ carrierId?: string;
1874
+ /** Error details. */
1875
+ error?: Details;
1876
+ }
1759
1877
  interface Violation {
1760
1878
  /** 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. */
1761
1879
  severity?: SeverityWithLiterals;
@@ -2175,10 +2293,14 @@ interface PlaceOrderRequest {
2175
2293
  /**
2176
2294
  * The pricing token received from `CalculateCart`'s response.
2177
2295
  * Used to verify that the prices shown to the customer have not changed before completing checkout.
2178
- * @maxLength 1024
2179
- * @readonly
2296
+ * @maxLength 3000
2180
2297
  */
2181
2298
  pricingToken?: string | null;
2299
+ /**
2300
+ * Payment token.
2301
+ * @maxLength 100
2302
+ */
2303
+ paymentToken?: string | null;
2182
2304
  /** Urls to redirect to after payment is made. */
2183
2305
  redirectUrls?: RedirectUrls;
2184
2306
  /** Indicates the payment method should be saved on the order */
@@ -1,6 +1,6 @@
1
1
  import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
2
  import { CreateCartOptions, Cart, UpdateCart, RefreshCartResponse, CalculateCartOptions, CalculateCartResponse, GetCheckoutUrlOptions, GetCheckoutURLResponse, PlaceOrderOptions, PlaceOrderResponse, AddLineItemsOptions, AddLineItemsResponse, RemoveLineItemsResponse, UpdateLineItemsOptions, UpdateLineItemsResponse, AddCouponResponse, RemoveCouponResponse, AddGiftCardResponse, RemoveGiftCardResponse, MarkCartAsCompletedOptions, MarkCartAsCompletedResponse, RawHttpResponse } from './index.typings.js';
3
- export { ActionEvent, AddCouponRequest, AddCouponToCurrentCartRequest, AddCouponToCurrentCartResponse, AddGiftCardRequest, AddGiftCardToCurrentCartRequest, AddGiftCardToCurrentCartResponse, AddLineItemsRequest, AddLineItemsToCurrentCartRequest, AddLineItemsToCurrentCartResponse, AdditionalFee, AdditionalFeeTax, Address, AddressLocation, ApplicationError, BusinessInfo, CalculateCartRequest, CalculateCurrentCartRequest, CalculateCurrentCartResponse, CalculationComponent, CalculationComponentWithLiterals, CalculationConfig, CalculationError, CartSettings, CartSource, CartSummary, CatalogItemInput, CatalogOverrideFields, CatalogReference, ChannelType, ChannelTypeWithLiterals, Charge, Color, Coupon, CreateCartRequest, CreateCartResponse, CreateCurrentCartRequest, CreateCurrentCartResponse, CreatedBy, CreatedByIdOneOf, CustomContentReference, CustomField, CustomItemAttributes, CustomItemDeliveryConfig, CustomItemInput, CustomItemPaymentConfig, CustomItemPricingInfo, CustomItemQuantityInfo, CustomItemSource, CustomItemTaxConfig, CustomerInfo, CustomerInfoIdOneOf, DeleteCartRequest, DeleteCartResponse, DeleteCurrentCartRequest, DeleteCurrentCartResponse, DeliveryInfo, DeliveryMethod, DeliverySummary, Description, DescriptionLine, DescriptionLineDescriptionLineValueOneOf, DescriptionLineName, DescriptionLineType, DescriptionLineTypeWithLiterals, DescriptionLineValueOneOf, Details, DetailsKindOneOf, Discount, DiscountBenefit, DiscountBenefitValueOneOf, DiscountScope, DiscountScopeWithLiterals, DiscountSource, DiscountSourceType, DiscountSourceTypeWithLiterals, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, ErrorCode, ErrorCodeWithLiterals, ExtendedFields, ExternalReference, FieldViolation, FileType, FileTypeWithLiterals, FreeTrialPeriod, FullAddressContactDetails, GetCartRequest, GetCartResponse, GetCheckoutURLRequest, GetCurrentCartRequest, GetCurrentCartResponse, GiftCard, GiftCardSummary, Group, HandleAsyncCheckoutCompletionRequest, HeadersEntry, IdentificationData, IdentificationDataIdOneOf, ItemAttributes, ItemDeliveryConfig, ItemDiscount, ItemModifier, ItemPaymentConfig, ItemPriceBreakdown, ItemPricingInfo, ItemQuantityInfo, ItemSource, ItemStatus, ItemStatusWithLiterals, ItemTaxConfig, ItemType, ItemTypeItemType, ItemTypeItemTypeDataOneOf, ItemTypeItemTypeWithLiterals, LegacyFields, LineItem, LineItemSummary, LineItemTax, LineItemUpdate, MarkCartAsCompletedRequest, Membership, MessageEnvelope, ModifierGroup, MultiCurrencyPrice, NameInLineItem, NameInLineItemWithLiterals, NameInOther, NameInOtherWithLiterals, Other, PaymentInfo, PaymentOption, PaymentOptionType, PaymentOptionTypeWithLiterals, PaymentSummary, PhysicalProperties, PlaceOrderRequest, PlainTextValue, Policy, PriceDescription, PriceSummary, QuantityUpdate, RedirectUrls, RefreshCartRequest, RefreshCurrentCartRequest, RefreshCurrentCartResponse, RemoveCouponFromCurrentCartRequest, RemoveCouponFromCurrentCartResponse, RemoveCouponRequest, RemoveGiftCardFromCurrentCartRequest, RemoveGiftCardFromCurrentCartResponse, RemoveGiftCardRequest, RemoveLineItemsFromCurrentCartRequest, RemoveLineItemsFromCurrentCartResponse, RemoveLineItemsRequest, RestoreInfo, RuleType, RuleTypeWithLiterals, Scope, SecuredMedia, SelectedMembership, SelectedMembershipUpdate, ServiceProperties, Severity, SeverityWithLiterals, StreetAddress, SubscriptionCharges, SubscriptionFrequency, SubscriptionFrequencyWithLiterals, SubscriptionOptionInfo, SubscriptionSettings, SuggestedFix, SuggestedFixWithLiterals, SystemError, Target, TargetTargetTypeOneOf, Tax, TaxDetails, TaxInfo, TaxSummary, TaxableAddress, TaxableAddressTaxableAddressDataOneOf, TaxableAddressType, TaxableAddressTypeWithLiterals, Title, TranslatableString, UpdateCartRequest, UpdateCartResponse, UpdateCurrentCartRequest, UpdateCurrentCartResponse, UpdateLineItemsInCurrentCartRequest, UpdateLineItemsInCurrentCartResponse, UpdateLineItemsRequest, V2AdditionalFee, V2LineItem, ValidationError, ValidationsConfig, ValidationsConfigWithLiterals, VatId, VatType, VatTypeWithLiterals, Violation, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WeightUnit, WeightUnitWithLiterals } from './index.typings.js';
3
+ export { ActionEvent, AddCouponRequest, AddCouponToCurrentCartRequest, AddCouponToCurrentCartResponse, AddGiftCardRequest, AddGiftCardToCurrentCartRequest, AddGiftCardToCurrentCartResponse, AddLineItemsRequest, AddLineItemsToCurrentCartRequest, AddLineItemsToCurrentCartResponse, AdditionalFee, AdditionalFeeTax, Address, AddressLocation, ApplicationError, BusinessInfo, CalculateCartRequest, CalculateCurrentCartRequest, CalculateCurrentCartResponse, CalculationConfig, CalculationErrors, CalculationErrorsShippingCalculationErrorOneOf, CarrierError, CarrierErrors, CartSettings, CartSource, CartSummary, CatalogItemInput, CatalogOverrideFields, CatalogReference, ChannelType, ChannelTypeWithLiterals, Charge, Color, Coupon, CreateCartRequest, CreateCartResponse, CreateCurrentCartRequest, CreateCurrentCartResponse, CreatedBy, CreatedByIdOneOf, CustomContentReference, CustomField, CustomItemAttributes, CustomItemDeliveryConfig, CustomItemInput, CustomItemPaymentConfig, CustomItemPricingInfo, CustomItemQuantityInfo, CustomItemSource, CustomItemTaxConfig, CustomerInfo, CustomerInfoIdOneOf, DeleteCartRequest, DeleteCartResponse, DeleteCurrentCartRequest, DeleteCurrentCartResponse, DeliveryInfo, DeliveryMethod, DeliverySummary, Description, DescriptionLine, DescriptionLineDescriptionLineValueOneOf, DescriptionLineName, DescriptionLineType, DescriptionLineTypeWithLiterals, DescriptionLineValueOneOf, Details, DetailsKindOneOf, Discount, DiscountBenefit, DiscountBenefitValueOneOf, DiscountScope, DiscountScopeWithLiterals, DiscountSource, DiscountSourceType, DiscountSourceTypeWithLiterals, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, ExtendedFields, ExternalReference, FieldViolation, FileType, FileTypeWithLiterals, FreeTrialPeriod, FullAddressContactDetails, GetCartRequest, GetCartResponse, GetCheckoutURLRequest, GetCurrentCartRequest, GetCurrentCartResponse, GiftCard, GiftCardSummary, Group, HandleAsyncCheckoutCompletionRequest, HeadersEntry, IdentificationData, IdentificationDataIdOneOf, ItemAttributes, ItemDeliveryConfig, ItemDiscount, ItemModifier, ItemPaymentConfig, ItemPriceBreakdown, ItemPricingInfo, ItemQuantityInfo, ItemSource, ItemStatus, ItemStatusWithLiterals, ItemTaxConfig, ItemType, ItemTypeItemType, ItemTypeItemTypeDataOneOf, ItemTypeItemTypeWithLiterals, LegacyFields, LineItem, LineItemSummary, LineItemTax, LineItemUpdate, MarkCartAsCompletedRequest, Membership, MessageEnvelope, ModifierGroup, MultiCurrencyPrice, NameInLineItem, NameInLineItemWithLiterals, NameInOther, NameInOtherWithLiterals, Other, PaymentInfo, PaymentOption, PaymentOptionType, PaymentOptionTypeWithLiterals, PaymentSummary, PhysicalProperties, PlaceOrderRequest, PlainTextValue, Policy, PriceDescription, PriceSummary, QuantityUpdate, RedirectUrls, RefreshCartRequest, RefreshCurrentCartRequest, RefreshCurrentCartResponse, RemoveCouponFromCurrentCartRequest, RemoveCouponFromCurrentCartResponse, RemoveCouponRequest, RemoveGiftCardFromCurrentCartRequest, RemoveGiftCardFromCurrentCartResponse, RemoveGiftCardRequest, RemoveLineItemsFromCurrentCartRequest, RemoveLineItemsFromCurrentCartResponse, RemoveLineItemsRequest, RestoreInfo, RuleType, RuleTypeWithLiterals, Scope, SecuredMedia, SelectedMembership, SelectedMembershipUpdate, ServiceProperties, Severity, SeverityWithLiterals, StreetAddress, SubscriptionCharges, SubscriptionFrequency, SubscriptionFrequencyWithLiterals, SubscriptionOptionInfo, SubscriptionSettings, SuggestedFix, SuggestedFixWithLiterals, SystemError, Target, TargetTargetTypeOneOf, Tax, TaxDetails, TaxInfo, TaxSummary, TaxableAddress, TaxableAddressTaxableAddressDataOneOf, TaxableAddressType, TaxableAddressTypeWithLiterals, Title, TranslatableString, UpdateCartRequest, UpdateCartResponse, UpdateCurrentCartRequest, UpdateCurrentCartResponse, UpdateLineItemsInCurrentCartRequest, UpdateLineItemsInCurrentCartResponse, UpdateLineItemsRequest, V2AdditionalFee, V2LineItem, ValidationError, ValidationsConfig, ValidationsConfigWithLiterals, VatId, VatType, VatTypeWithLiterals, Violation, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WeightUnit, WeightUnitWithLiterals } from './index.typings.js';
4
4
 
5
5
  /** @internal */
6
6
  declare function createCart$1(httpClient: HttpClient): CreateCartSignature;
@@ -63,7 +63,7 @@ interface CalculateCartSignature {
63
63
  * This is a read-only operation that does not modify the cart.
64
64
  * @param - ID of the Cart to calculate.
65
65
  */
66
- (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>>;
66
+ (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>>;
67
67
  }
68
68
  /** @internal */
69
69
  declare function getCheckoutUrl$1(httpClient: HttpClient): GetCheckoutUrlSignature;
@@ -20,12 +20,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // index.ts
21
21
  var index_exports = {};
22
22
  __export(index_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,
@@ -1156,19 +1154,6 @@ var DiscountScope = /* @__PURE__ */ ((DiscountScope2) => {
1156
1154
  DiscountScope2["DELIVERY"] = "DELIVERY";
1157
1155
  return DiscountScope2;
1158
1156
  })(DiscountScope || {});
1159
- var CalculationComponent = /* @__PURE__ */ ((CalculationComponent2) => {
1160
- CalculationComponent2["UNKNOWN_CALCULATION_COMPONENT"] = "UNKNOWN_CALCULATION_COMPONENT";
1161
- CalculationComponent2["DISCOUNTS"] = "DISCOUNTS";
1162
- CalculationComponent2["DELIVERY"] = "DELIVERY";
1163
- CalculationComponent2["TAX"] = "TAX";
1164
- CalculationComponent2["MEMBERSHIPS"] = "MEMBERSHIPS";
1165
- CalculationComponent2["GIFT_CARDS"] = "GIFT_CARDS";
1166
- return CalculationComponent2;
1167
- })(CalculationComponent || {});
1168
- var ErrorCode = /* @__PURE__ */ ((ErrorCode2) => {
1169
- ErrorCode2["UNKNOWN_ERROR_CODE"] = "UNKNOWN_ERROR_CODE";
1170
- return ErrorCode2;
1171
- })(ErrorCode || {});
1172
1157
  var RuleType = /* @__PURE__ */ ((RuleType2) => {
1173
1158
  RuleType2["VALIDATION"] = "VALIDATION";
1174
1159
  RuleType2["OTHER"] = "OTHER";
@@ -1571,6 +1556,7 @@ async function placeOrder2(cartId, options) {
1571
1556
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1572
1557
  cartId,
1573
1558
  pricingToken: options?.pricingToken,
1559
+ paymentToken: options?.paymentToken,
1574
1560
  redirectUrls: options?.redirectUrls,
1575
1561
  savePaymentMethod: options?.savePaymentMethod,
1576
1562
  delayCapture: options?.delayCapture
@@ -1589,6 +1575,7 @@ async function placeOrder2(cartId, options) {
1589
1575
  explicitPathsToArguments: {
1590
1576
  cartId: "$[0]",
1591
1577
  pricingToken: "$[1].pricingToken",
1578
+ paymentToken: "$[1].paymentToken",
1592
1579
  redirectUrls: "$[1].redirectUrls",
1593
1580
  savePaymentMethod: "$[1].savePaymentMethod",
1594
1581
  delayCapture: "$[1].delayCapture"
@@ -2178,12 +2165,10 @@ var markCartAsCompleted4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTMo
2178
2165
  var handleAsyncCheckoutCompletion4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(handleAsyncCheckoutCompletion3);
2179
2166
  // Annotate the CommonJS export names for ESM import in node:
2180
2167
  0 && (module.exports = {
2181
- CalculationComponent,
2182
2168
  ChannelType,
2183
2169
  DescriptionLineType,
2184
2170
  DiscountScope,
2185
2171
  DiscountSourceType,
2186
- ErrorCode,
2187
2172
  FileType,
2188
2173
  ItemStatus,
2189
2174
  ItemTypeItemType,