@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.
- package/build/cjs/index.d.ts +69 -39
- package/build/cjs/index.js +2 -17
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1 -1
- package/build/cjs/index.typings.js +2 -17
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +156 -34
- package/build/es/index.d.mts +69 -39
- package/build/es/index.mjs +2 -15
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +1 -1
- package/build/es/index.typings.mjs +2 -15
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +156 -34
- package/build/internal/cjs/index.d.ts +2 -2
- package/build/internal/cjs/index.js +2 -17
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +70 -40
- package/build/internal/cjs/index.typings.js +2 -17
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +156 -34
- package/build/internal/es/index.d.mts +2 -2
- package/build/internal/es/index.mjs +2 -15
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +70 -40
- package/build/internal/es/index.typings.mjs +2 -15
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +156 -34
- package/package.json +2 -2
|
@@ -126,7 +126,7 @@ interface V2LineItem {
|
|
|
126
126
|
/**
|
|
127
127
|
* Custom extended fields for the line item object.
|
|
128
128
|
*
|
|
129
|
-
* [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.
|
|
129
|
+
* [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.
|
|
130
130
|
*/
|
|
131
131
|
extendedFields?: ExtendedFields;
|
|
132
132
|
/**
|
|
@@ -1238,7 +1238,7 @@ interface AddressLocation {
|
|
|
1238
1238
|
interface DeliveryMethod {
|
|
1239
1239
|
/**
|
|
1240
1240
|
* The carrier app id
|
|
1241
|
-
* @
|
|
1241
|
+
* @maxLength 50
|
|
1242
1242
|
*/
|
|
1243
1243
|
appId?: string;
|
|
1244
1244
|
/**
|
|
@@ -1461,16 +1461,6 @@ interface CartSummary {
|
|
|
1461
1461
|
priceSummary?: PriceSummary;
|
|
1462
1462
|
/** Payment details summarizing how the customer will pay for the order. */
|
|
1463
1463
|
paymentSummary?: PaymentSummary;
|
|
1464
|
-
/**
|
|
1465
|
-
* List of errors that occurred during the calculation process.
|
|
1466
|
-
* @maxSize 100
|
|
1467
|
-
*/
|
|
1468
|
-
errors?: CalculationError[];
|
|
1469
|
-
/**
|
|
1470
|
-
* 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)).
|
|
1471
|
-
* @maxSize 100
|
|
1472
|
-
*/
|
|
1473
|
-
violations?: Violation[];
|
|
1474
1464
|
/**
|
|
1475
1465
|
* A token representing the Cart's calculated prices.
|
|
1476
1466
|
*
|
|
@@ -1487,6 +1477,17 @@ interface CartSummary {
|
|
|
1487
1477
|
* @maxLength 1024
|
|
1488
1478
|
*/
|
|
1489
1479
|
priceVerificationToken?: string | null;
|
|
1480
|
+
/**
|
|
1481
|
+
* List of errors that occurred during the calculation process, returned by Totals Calculator.
|
|
1482
|
+
* TODO: Temporary field for backward compatibility; will be removed once we introduce the unified 'violations' model.
|
|
1483
|
+
*/
|
|
1484
|
+
calculationErrors?: CalculationErrors;
|
|
1485
|
+
/**
|
|
1486
|
+
* 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)).
|
|
1487
|
+
* TODO: Temporary field for backward compatibility; will be removed once we introduce the unified 'violations' model.
|
|
1488
|
+
* @maxSize 100
|
|
1489
|
+
*/
|
|
1490
|
+
spiViolations?: Violation[];
|
|
1490
1491
|
}
|
|
1491
1492
|
interface LineItemSummary {
|
|
1492
1493
|
/**
|
|
@@ -1731,32 +1732,149 @@ interface Charge {
|
|
|
1731
1732
|
/** The billing date from which the charge starts. */
|
|
1732
1733
|
cycleBillingDate?: Date | null;
|
|
1733
1734
|
}
|
|
1734
|
-
interface
|
|
1735
|
-
/**
|
|
1736
|
-
|
|
1737
|
-
/**
|
|
1738
|
-
|
|
1735
|
+
interface CalculationErrors extends CalculationErrorsShippingCalculationErrorOneOf {
|
|
1736
|
+
/** General shipping calculation error. */
|
|
1737
|
+
generalShippingCalculationError?: Details;
|
|
1738
|
+
/** Carrier errors. */
|
|
1739
|
+
carrierErrors?: CarrierErrors;
|
|
1740
|
+
/** Tax calculation error. */
|
|
1741
|
+
taxCalculationError?: Details;
|
|
1742
|
+
/** Coupon calculation error. */
|
|
1743
|
+
couponCalculationError?: Details;
|
|
1744
|
+
/** Gift card calculation error. */
|
|
1745
|
+
giftCardCalculationError?: Details;
|
|
1746
|
+
/**
|
|
1747
|
+
* Order validation errors.
|
|
1748
|
+
* @maxSize 100
|
|
1749
|
+
*/
|
|
1750
|
+
orderValidationErrors?: ApplicationError[];
|
|
1739
1751
|
/**
|
|
1740
|
-
*
|
|
1741
|
-
*
|
|
1752
|
+
* Membership payment methods calculation errors
|
|
1753
|
+
* For example, will indicate that a line item that must be paid with membership payment doesn't have one or selected memberships are invalid
|
|
1742
1754
|
*/
|
|
1743
|
-
|
|
1755
|
+
membershipError?: Details;
|
|
1756
|
+
/** Discount Rule calculation error. */
|
|
1757
|
+
discountsCalculationError?: Details;
|
|
1744
1758
|
}
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
GIFT_CARDS = "GIFT_CARDS"
|
|
1759
|
+
/** @oneof */
|
|
1760
|
+
interface CalculationErrorsShippingCalculationErrorOneOf {
|
|
1761
|
+
/** General shipping calculation error. */
|
|
1762
|
+
generalShippingCalculationError?: Details;
|
|
1763
|
+
/** Carrier errors. */
|
|
1764
|
+
carrierErrors?: CarrierErrors;
|
|
1752
1765
|
}
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1766
|
+
interface Details extends DetailsKindOneOf {
|
|
1767
|
+
applicationError?: ApplicationError;
|
|
1768
|
+
validationError?: ValidationError;
|
|
1769
|
+
systemError?: SystemError;
|
|
1770
|
+
/**
|
|
1771
|
+
* deprecated in API's - to enable migration from rendering arbitrary tracing to rest response
|
|
1772
|
+
* @deprecated
|
|
1773
|
+
*/
|
|
1774
|
+
tracing?: Record<string, string>;
|
|
1775
|
+
}
|
|
1776
|
+
/** @oneof */
|
|
1777
|
+
interface DetailsKindOneOf {
|
|
1778
|
+
applicationError?: ApplicationError;
|
|
1779
|
+
validationError?: ValidationError;
|
|
1780
|
+
systemError?: SystemError;
|
|
1781
|
+
}
|
|
1782
|
+
interface ApplicationError {
|
|
1783
|
+
/** Error code. */
|
|
1784
|
+
code?: string;
|
|
1785
|
+
/** Description of the error. */
|
|
1786
|
+
description?: string;
|
|
1787
|
+
/** Data related to the error. */
|
|
1788
|
+
data?: Record<string, any> | null;
|
|
1789
|
+
}
|
|
1790
|
+
/**
|
|
1791
|
+
* example result:
|
|
1792
|
+
* {
|
|
1793
|
+
* "fieldViolations": [
|
|
1794
|
+
* {
|
|
1795
|
+
* "field": "fieldA",
|
|
1796
|
+
* "description": "invalid music note. supported notes: [do,re,mi,fa,sol,la,ti]",
|
|
1797
|
+
* "violatedRule": "OTHER",
|
|
1798
|
+
* "ruleName": "INVALID_NOTE",
|
|
1799
|
+
* "data": {
|
|
1800
|
+
* "value": "FI"
|
|
1801
|
+
* }
|
|
1802
|
+
* },
|
|
1803
|
+
* {
|
|
1804
|
+
* "field": "fieldB",
|
|
1805
|
+
* "description": "field value out of range. supported range: [0-20]",
|
|
1806
|
+
* "violatedRule": "MAX",
|
|
1807
|
+
* "data": {
|
|
1808
|
+
* "threshold": 20
|
|
1809
|
+
* }
|
|
1810
|
+
* },
|
|
1811
|
+
* {
|
|
1812
|
+
* "field": "fieldC",
|
|
1813
|
+
* "description": "invalid phone number. provide a valid phone number of size: [7-12], supported characters: [0-9, +, -, (, )]",
|
|
1814
|
+
* "violatedRule": "FORMAT",
|
|
1815
|
+
* "data": {
|
|
1816
|
+
* "type": "PHONE"
|
|
1817
|
+
* }
|
|
1818
|
+
* }
|
|
1819
|
+
* ]
|
|
1820
|
+
* }
|
|
1821
|
+
*/
|
|
1822
|
+
interface ValidationError {
|
|
1823
|
+
fieldViolations?: FieldViolation[];
|
|
1824
|
+
}
|
|
1825
|
+
declare enum RuleType {
|
|
1826
|
+
VALIDATION = "VALIDATION",
|
|
1827
|
+
OTHER = "OTHER",
|
|
1828
|
+
MAX = "MAX",
|
|
1829
|
+
MIN = "MIN",
|
|
1830
|
+
MAX_LENGTH = "MAX_LENGTH",
|
|
1831
|
+
MIN_LENGTH = "MIN_LENGTH",
|
|
1832
|
+
MAX_SIZE = "MAX_SIZE",
|
|
1833
|
+
MIN_SIZE = "MIN_SIZE",
|
|
1834
|
+
FORMAT = "FORMAT",
|
|
1835
|
+
DECIMAL_LTE = "DECIMAL_LTE",
|
|
1836
|
+
DECIMAL_GTE = "DECIMAL_GTE",
|
|
1837
|
+
DECIMAL_LT = "DECIMAL_LT",
|
|
1838
|
+
DECIMAL_GT = "DECIMAL_GT",
|
|
1839
|
+
DECIMAL_MAX_SCALE = "DECIMAL_MAX_SCALE",
|
|
1840
|
+
INVALID_ENUM_VALUE = "INVALID_ENUM_VALUE",
|
|
1841
|
+
REQUIRED_FIELD = "REQUIRED_FIELD",
|
|
1842
|
+
FIELD_NOT_ALLOWED = "FIELD_NOT_ALLOWED",
|
|
1843
|
+
ONE_OF_ALIGNMENT = "ONE_OF_ALIGNMENT",
|
|
1844
|
+
EXACT_LENGTH = "EXACT_LENGTH",
|
|
1845
|
+
EXACT_SIZE = "EXACT_SIZE",
|
|
1846
|
+
REQUIRED_ONE_OF_FIELD = "REQUIRED_ONE_OF_FIELD"
|
|
1757
1847
|
}
|
|
1758
1848
|
/** @enumType */
|
|
1759
|
-
type
|
|
1849
|
+
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';
|
|
1850
|
+
interface FieldViolation {
|
|
1851
|
+
field?: string;
|
|
1852
|
+
description?: string;
|
|
1853
|
+
violatedRule?: RuleTypeWithLiterals;
|
|
1854
|
+
/** applicable when violated_rule=OTHER */
|
|
1855
|
+
ruleName?: string | null;
|
|
1856
|
+
data?: Record<string, any> | null;
|
|
1857
|
+
}
|
|
1858
|
+
interface SystemError {
|
|
1859
|
+
/** Error code. */
|
|
1860
|
+
errorCode?: string | null;
|
|
1861
|
+
}
|
|
1862
|
+
interface CarrierErrors {
|
|
1863
|
+
/**
|
|
1864
|
+
* Carrier errors.
|
|
1865
|
+
* @maxSize 100
|
|
1866
|
+
*/
|
|
1867
|
+
errors?: CarrierError[];
|
|
1868
|
+
}
|
|
1869
|
+
interface CarrierError {
|
|
1870
|
+
/**
|
|
1871
|
+
* Carrier ID.
|
|
1872
|
+
* @format GUID
|
|
1873
|
+
*/
|
|
1874
|
+
carrierId?: string;
|
|
1875
|
+
/** Error details. */
|
|
1876
|
+
error?: Details;
|
|
1877
|
+
}
|
|
1760
1878
|
interface Violation {
|
|
1761
1879
|
/** 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. */
|
|
1762
1880
|
severity?: SeverityWithLiterals;
|
|
@@ -2176,10 +2294,14 @@ interface PlaceOrderRequest {
|
|
|
2176
2294
|
/**
|
|
2177
2295
|
* The pricing token received from `CalculateCart`'s response.
|
|
2178
2296
|
* Used to verify that the prices shown to the customer have not changed before completing checkout.
|
|
2179
|
-
* @maxLength
|
|
2180
|
-
* @readonly
|
|
2297
|
+
* @maxLength 3000
|
|
2181
2298
|
*/
|
|
2182
2299
|
pricingToken?: string | null;
|
|
2300
|
+
/**
|
|
2301
|
+
* Payment token.
|
|
2302
|
+
* @maxLength 100
|
|
2303
|
+
*/
|
|
2304
|
+
paymentToken?: string | null;
|
|
2183
2305
|
/** Urls to redirect to after payment is made. */
|
|
2184
2306
|
redirectUrls?: RedirectUrls;
|
|
2185
2307
|
/** 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.mjs';
|
|
3
|
-
export { ActionEvent, AddCouponRequest, AddCouponToCurrentCartRequest, AddCouponToCurrentCartResponse, AddGiftCardRequest, AddGiftCardToCurrentCartRequest, AddGiftCardToCurrentCartResponse, AddLineItemsRequest, AddLineItemsToCurrentCartRequest, AddLineItemsToCurrentCartResponse, AdditionalFee, AdditionalFeeTax, Address, AddressLocation, ApplicationError, BusinessInfo, CalculateCartRequest, CalculateCurrentCartRequest, CalculateCurrentCartResponse,
|
|
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.mjs';
|
|
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.
|
|
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;
|
|
@@ -1096,19 +1096,6 @@ var DiscountScope = /* @__PURE__ */ ((DiscountScope2) => {
|
|
|
1096
1096
|
DiscountScope2["DELIVERY"] = "DELIVERY";
|
|
1097
1097
|
return DiscountScope2;
|
|
1098
1098
|
})(DiscountScope || {});
|
|
1099
|
-
var CalculationComponent = /* @__PURE__ */ ((CalculationComponent2) => {
|
|
1100
|
-
CalculationComponent2["UNKNOWN_CALCULATION_COMPONENT"] = "UNKNOWN_CALCULATION_COMPONENT";
|
|
1101
|
-
CalculationComponent2["DISCOUNTS"] = "DISCOUNTS";
|
|
1102
|
-
CalculationComponent2["DELIVERY"] = "DELIVERY";
|
|
1103
|
-
CalculationComponent2["TAX"] = "TAX";
|
|
1104
|
-
CalculationComponent2["MEMBERSHIPS"] = "MEMBERSHIPS";
|
|
1105
|
-
CalculationComponent2["GIFT_CARDS"] = "GIFT_CARDS";
|
|
1106
|
-
return CalculationComponent2;
|
|
1107
|
-
})(CalculationComponent || {});
|
|
1108
|
-
var ErrorCode = /* @__PURE__ */ ((ErrorCode2) => {
|
|
1109
|
-
ErrorCode2["UNKNOWN_ERROR_CODE"] = "UNKNOWN_ERROR_CODE";
|
|
1110
|
-
return ErrorCode2;
|
|
1111
|
-
})(ErrorCode || {});
|
|
1112
1099
|
var RuleType = /* @__PURE__ */ ((RuleType2) => {
|
|
1113
1100
|
RuleType2["VALIDATION"] = "VALIDATION";
|
|
1114
1101
|
RuleType2["OTHER"] = "OTHER";
|
|
@@ -1511,6 +1498,7 @@ async function placeOrder2(cartId, options) {
|
|
|
1511
1498
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1512
1499
|
cartId,
|
|
1513
1500
|
pricingToken: options?.pricingToken,
|
|
1501
|
+
paymentToken: options?.paymentToken,
|
|
1514
1502
|
redirectUrls: options?.redirectUrls,
|
|
1515
1503
|
savePaymentMethod: options?.savePaymentMethod,
|
|
1516
1504
|
delayCapture: options?.delayCapture
|
|
@@ -1529,6 +1517,7 @@ async function placeOrder2(cartId, options) {
|
|
|
1529
1517
|
explicitPathsToArguments: {
|
|
1530
1518
|
cartId: "$[0]",
|
|
1531
1519
|
pricingToken: "$[1].pricingToken",
|
|
1520
|
+
paymentToken: "$[1].paymentToken",
|
|
1532
1521
|
redirectUrls: "$[1].redirectUrls",
|
|
1533
1522
|
savePaymentMethod: "$[1].savePaymentMethod",
|
|
1534
1523
|
delayCapture: "$[1].delayCapture"
|
|
@@ -2117,12 +2106,10 @@ var removeGiftCard4 = /* @__PURE__ */ createRESTModule(removeGiftCard3);
|
|
|
2117
2106
|
var markCartAsCompleted4 = /* @__PURE__ */ createRESTModule(markCartAsCompleted3);
|
|
2118
2107
|
var handleAsyncCheckoutCompletion4 = /* @__PURE__ */ createRESTModule(handleAsyncCheckoutCompletion3);
|
|
2119
2108
|
export {
|
|
2120
|
-
CalculationComponent,
|
|
2121
2109
|
ChannelType,
|
|
2122
2110
|
DescriptionLineType,
|
|
2123
2111
|
DiscountScope,
|
|
2124
2112
|
DiscountSourceType,
|
|
2125
|
-
ErrorCode,
|
|
2126
2113
|
FileType,
|
|
2127
2114
|
ItemStatus,
|
|
2128
2115
|
ItemTypeItemType,
|