@wix/auto_sdk_ecom_current-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.
- package/build/cjs/index.d.ts +62 -36
- package/build/cjs/index.js +39 -17
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1 -1
- package/build/cjs/index.typings.js +39 -17
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +149 -31
- package/build/cjs/meta.js +39 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +62 -36
- package/build/es/index.mjs +39 -15
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +1 -1
- package/build/es/index.typings.mjs +39 -15
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +149 -31
- package/build/es/meta.mjs +39 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +2 -2
- package/build/internal/cjs/index.js +39 -17
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +63 -37
- package/build/internal/cjs/index.typings.js +39 -17
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +149 -31
- package/build/internal/cjs/meta.js +39 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +2 -2
- package/build/internal/es/index.mjs +39 -15
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +63 -37
- package/build/internal/es/index.typings.mjs +39 -15
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +149 -31
- package/build/internal/es/meta.mjs +39 -0
- package/build/internal/es/meta.mjs.map +1 -1
- 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
|
|
1786
|
-
/**
|
|
1787
|
-
|
|
1788
|
-
/**
|
|
1789
|
-
|
|
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
|
-
*
|
|
1792
|
-
*
|
|
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
|
-
|
|
1806
|
+
membershipError?: Details;
|
|
1807
|
+
/** Discount Rule calculation error. */
|
|
1808
|
+
discountsCalculationError?: Details;
|
|
1795
1809
|
}
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
GIFT_CARDS = "GIFT_CARDS"
|
|
1803
|
-
}
|
|
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
|
|
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 */
|
|
@@ -2961,7 +2987,7 @@ declare function refreshCurrentCart(): Promise<NonNullablePaths<RefreshCurrentCa
|
|
|
2961
2987
|
* @permissionId ecom:v2:cart:calculate_cart
|
|
2962
2988
|
* @fqn wix.ecom.cart.v2.CurrentCartService.CalculateCurrentCart
|
|
2963
2989
|
*/
|
|
2964
|
-
declare function calculateCurrentCart(options?: CalculateCurrentCartOptions): Promise<NonNullablePaths<CalculateCurrentCartResponse, `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.
|
|
2990
|
+
declare function calculateCurrentCart(options?: CalculateCurrentCartOptions): Promise<NonNullablePaths<CalculateCurrentCartResponse, `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>>;
|
|
2965
2991
|
interface CalculateCurrentCartOptions {
|
|
2966
2992
|
/**
|
|
2967
2993
|
* Specifies the level of **business validation** to perform during cart calculation,
|
|
@@ -3080,4 +3106,4 @@ declare function addGiftCardToCurrentCart(giftCardCode: string): Promise<NonNull
|
|
|
3080
3106
|
*/
|
|
3081
3107
|
declare function removeGiftCardFromCurrentCart(giftCardId: string): Promise<NonNullablePaths<RemoveGiftCardFromCurrentCartResponse, `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`, 7>>;
|
|
3082
3108
|
|
|
3083
|
-
export { type ActionEvent, type AddCouponRequest, type AddCouponResponse, type AddCouponToCurrentCartRequest, type AddCouponToCurrentCartResponse, type AddGiftCardRequest, type AddGiftCardResponse, type AddGiftCardToCurrentCartRequest, type AddGiftCardToCurrentCartResponse, type AddLineItemsRequest, type AddLineItemsResponse, type AddLineItemsToCurrentCartOptions, type AddLineItemsToCurrentCartRequest, type AddLineItemsToCurrentCartResponse, type AdditionalFee, type AdditionalFeeTax, type Address, type AddressLocation, type ApplicationError, type BusinessInfo, type CalculateCartRequest, type CalculateCartResponse, type CalculateCurrentCartOptions, type CalculateCurrentCartRequest, type CalculateCurrentCartResponse,
|
|
3109
|
+
export { type ActionEvent, type AddCouponRequest, type AddCouponResponse, type AddCouponToCurrentCartRequest, type AddCouponToCurrentCartResponse, type AddGiftCardRequest, type AddGiftCardResponse, type AddGiftCardToCurrentCartRequest, type AddGiftCardToCurrentCartResponse, type AddLineItemsRequest, type AddLineItemsResponse, type AddLineItemsToCurrentCartOptions, type AddLineItemsToCurrentCartRequest, type AddLineItemsToCurrentCartResponse, type AdditionalFee, type AdditionalFeeTax, type Address, type AddressLocation, type ApplicationError, type BusinessInfo, type CalculateCartRequest, type CalculateCartResponse, type CalculateCurrentCartOptions, 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 CreateCartRequest, type CreateCartResponse, type CreateCurrentCartOptions, 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 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 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 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 UpdateCartRequest, type UpdateCartResponse, type UpdateCurrentCartRequest, type UpdateCurrentCartResponse, type UpdateLineItemsInCurrentCartOptions, type UpdateLineItemsInCurrentCartRequest, type UpdateLineItemsInCurrentCartResponse, 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, addCouponToCurrentCart, addGiftCardToCurrentCart, addLineItemsToCurrentCart, calculateCurrentCart, createCurrentCart, deleteCurrentCart, getCurrentCart, refreshCurrentCart, removeCouponFromCurrentCart, removeGiftCardFromCurrentCart, removeLineItemsFromCurrentCart, updateCurrentCart, updateLineItemsInCurrentCart };
|
|
@@ -153,6 +153,9 @@ function createCurrentCart(payload) {
|
|
|
153
153
|
method: "POST",
|
|
154
154
|
methodFqn: "wix.ecom.cart.v2.CurrentCartService.CreateCurrentCart",
|
|
155
155
|
packageName: PACKAGE_NAME,
|
|
156
|
+
migrationOptions: {
|
|
157
|
+
optInTransformResponse: true
|
|
158
|
+
},
|
|
156
159
|
url: resolveWixEcomCartV2CurrentCartServiceUrl({
|
|
157
160
|
protoPath: "/v2/carts/current",
|
|
158
161
|
data: serializedData,
|
|
@@ -203,6 +206,9 @@ function getCurrentCart(payload) {
|
|
|
203
206
|
method: "GET",
|
|
204
207
|
methodFqn: "wix.ecom.cart.v2.CurrentCartService.GetCurrentCart",
|
|
205
208
|
packageName: PACKAGE_NAME,
|
|
209
|
+
migrationOptions: {
|
|
210
|
+
optInTransformResponse: true
|
|
211
|
+
},
|
|
206
212
|
url: resolveWixEcomCartV2CurrentCartServiceUrl({
|
|
207
213
|
protoPath: "/v2/carts/current",
|
|
208
214
|
data: payload,
|
|
@@ -287,6 +293,9 @@ function updateCurrentCart(payload) {
|
|
|
287
293
|
method: "PATCH",
|
|
288
294
|
methodFqn: "wix.ecom.cart.v2.CurrentCartService.UpdateCurrentCart",
|
|
289
295
|
packageName: PACKAGE_NAME,
|
|
296
|
+
migrationOptions: {
|
|
297
|
+
optInTransformResponse: true
|
|
298
|
+
},
|
|
290
299
|
url: resolveWixEcomCartV2CurrentCartServiceUrl({
|
|
291
300
|
protoPath: "/v2/carts/current",
|
|
292
301
|
data: serializedData,
|
|
@@ -337,6 +346,9 @@ function deleteCurrentCart(payload) {
|
|
|
337
346
|
method: "DELETE",
|
|
338
347
|
methodFqn: "wix.ecom.cart.v2.CurrentCartService.DeleteCurrentCart",
|
|
339
348
|
packageName: PACKAGE_NAME,
|
|
349
|
+
migrationOptions: {
|
|
350
|
+
optInTransformResponse: true
|
|
351
|
+
},
|
|
340
352
|
url: resolveWixEcomCartV2CurrentCartServiceUrl({
|
|
341
353
|
protoPath: "/v2/carts/current",
|
|
342
354
|
data: payload,
|
|
@@ -355,6 +367,9 @@ function refreshCurrentCart(payload) {
|
|
|
355
367
|
method: "POST",
|
|
356
368
|
methodFqn: "wix.ecom.cart.v2.CurrentCartService.RefreshCurrentCart",
|
|
357
369
|
packageName: PACKAGE_NAME,
|
|
370
|
+
migrationOptions: {
|
|
371
|
+
optInTransformResponse: true
|
|
372
|
+
},
|
|
358
373
|
url: resolveWixEcomCartV2CurrentCartServiceUrl({
|
|
359
374
|
protoPath: "/v2/carts/current/refresh",
|
|
360
375
|
data: payload,
|
|
@@ -405,6 +420,9 @@ function calculateCurrentCart(payload) {
|
|
|
405
420
|
method: "POST",
|
|
406
421
|
methodFqn: "wix.ecom.cart.v2.CurrentCartService.CalculateCurrentCart",
|
|
407
422
|
packageName: PACKAGE_NAME,
|
|
423
|
+
migrationOptions: {
|
|
424
|
+
optInTransformResponse: true
|
|
425
|
+
},
|
|
408
426
|
url: resolveWixEcomCartV2CurrentCartServiceUrl({
|
|
409
427
|
protoPath: "/v2/carts/current/calculate",
|
|
410
428
|
data: payload,
|
|
@@ -482,6 +500,9 @@ function addLineItemsToCurrentCart(payload) {
|
|
|
482
500
|
method: "POST",
|
|
483
501
|
methodFqn: "wix.ecom.cart.v2.CurrentCartService.AddLineItemsToCurrentCart",
|
|
484
502
|
packageName: PACKAGE_NAME,
|
|
503
|
+
migrationOptions: {
|
|
504
|
+
optInTransformResponse: true
|
|
505
|
+
},
|
|
485
506
|
url: resolveWixEcomCartV2CurrentCartServiceUrl({
|
|
486
507
|
protoPath: "/v2/carts/current/add-line-items",
|
|
487
508
|
data: serializedData,
|
|
@@ -532,6 +553,9 @@ function removeLineItemsFromCurrentCart(payload) {
|
|
|
532
553
|
method: "POST",
|
|
533
554
|
methodFqn: "wix.ecom.cart.v2.CurrentCartService.RemoveLineItemsFromCurrentCart",
|
|
534
555
|
packageName: PACKAGE_NAME,
|
|
556
|
+
migrationOptions: {
|
|
557
|
+
optInTransformResponse: true
|
|
558
|
+
},
|
|
535
559
|
url: resolveWixEcomCartV2CurrentCartServiceUrl({
|
|
536
560
|
protoPath: "/v2/carts/current/remove-line-items",
|
|
537
561
|
data: payload,
|
|
@@ -582,6 +606,9 @@ function updateLineItemsInCurrentCart(payload) {
|
|
|
582
606
|
method: "POST",
|
|
583
607
|
methodFqn: "wix.ecom.cart.v2.CurrentCartService.UpdateLineItemsInCurrentCart",
|
|
584
608
|
packageName: PACKAGE_NAME,
|
|
609
|
+
migrationOptions: {
|
|
610
|
+
optInTransformResponse: true
|
|
611
|
+
},
|
|
585
612
|
url: resolveWixEcomCartV2CurrentCartServiceUrl({
|
|
586
613
|
protoPath: "/v2/carts/current/update-line-items",
|
|
587
614
|
data: payload,
|
|
@@ -632,6 +659,9 @@ function addCouponToCurrentCart(payload) {
|
|
|
632
659
|
method: "POST",
|
|
633
660
|
methodFqn: "wix.ecom.cart.v2.CurrentCartService.AddCouponToCurrentCart",
|
|
634
661
|
packageName: PACKAGE_NAME,
|
|
662
|
+
migrationOptions: {
|
|
663
|
+
optInTransformResponse: true
|
|
664
|
+
},
|
|
635
665
|
url: resolveWixEcomCartV2CurrentCartServiceUrl({
|
|
636
666
|
protoPath: "/v2/carts/current/add-coupon",
|
|
637
667
|
data: payload,
|
|
@@ -682,6 +712,9 @@ function removeCouponFromCurrentCart(payload) {
|
|
|
682
712
|
method: "POST",
|
|
683
713
|
methodFqn: "wix.ecom.cart.v2.CurrentCartService.RemoveCouponFromCurrentCart",
|
|
684
714
|
packageName: PACKAGE_NAME,
|
|
715
|
+
migrationOptions: {
|
|
716
|
+
optInTransformResponse: true
|
|
717
|
+
},
|
|
685
718
|
url: resolveWixEcomCartV2CurrentCartServiceUrl({
|
|
686
719
|
protoPath: "/v2/carts/current/remove-coupon",
|
|
687
720
|
data: payload,
|
|
@@ -732,6 +765,9 @@ function addGiftCardToCurrentCart(payload) {
|
|
|
732
765
|
method: "POST",
|
|
733
766
|
methodFqn: "wix.ecom.cart.v2.CurrentCartService.AddGiftCardToCurrentCart",
|
|
734
767
|
packageName: PACKAGE_NAME,
|
|
768
|
+
migrationOptions: {
|
|
769
|
+
optInTransformResponse: true
|
|
770
|
+
},
|
|
735
771
|
url: resolveWixEcomCartV2CurrentCartServiceUrl({
|
|
736
772
|
protoPath: "/v2/carts/current/add-gift-card",
|
|
737
773
|
data: payload,
|
|
@@ -782,6 +818,9 @@ function removeGiftCardFromCurrentCart(payload) {
|
|
|
782
818
|
method: "POST",
|
|
783
819
|
methodFqn: "wix.ecom.cart.v2.CurrentCartService.RemoveGiftCardFromCurrentCart",
|
|
784
820
|
packageName: PACKAGE_NAME,
|
|
821
|
+
migrationOptions: {
|
|
822
|
+
optInTransformResponse: true
|
|
823
|
+
},
|
|
785
824
|
url: resolveWixEcomCartV2CurrentCartServiceUrl({
|
|
786
825
|
protoPath: "/v2/carts/current/remove-gift-card",
|
|
787
826
|
data: payload,
|
|
@@ -934,19 +973,6 @@ var DiscountScope = /* @__PURE__ */ ((DiscountScope2) => {
|
|
|
934
973
|
DiscountScope2["DELIVERY"] = "DELIVERY";
|
|
935
974
|
return DiscountScope2;
|
|
936
975
|
})(DiscountScope || {});
|
|
937
|
-
var CalculationComponent = /* @__PURE__ */ ((CalculationComponent2) => {
|
|
938
|
-
CalculationComponent2["UNKNOWN_CALCULATION_COMPONENT"] = "UNKNOWN_CALCULATION_COMPONENT";
|
|
939
|
-
CalculationComponent2["DISCOUNTS"] = "DISCOUNTS";
|
|
940
|
-
CalculationComponent2["DELIVERY"] = "DELIVERY";
|
|
941
|
-
CalculationComponent2["TAX"] = "TAX";
|
|
942
|
-
CalculationComponent2["MEMBERSHIPS"] = "MEMBERSHIPS";
|
|
943
|
-
CalculationComponent2["GIFT_CARDS"] = "GIFT_CARDS";
|
|
944
|
-
return CalculationComponent2;
|
|
945
|
-
})(CalculationComponent || {});
|
|
946
|
-
var ErrorCode = /* @__PURE__ */ ((ErrorCode2) => {
|
|
947
|
-
ErrorCode2["UNKNOWN_ERROR_CODE"] = "UNKNOWN_ERROR_CODE";
|
|
948
|
-
return ErrorCode2;
|
|
949
|
-
})(ErrorCode || {});
|
|
950
976
|
var RuleType = /* @__PURE__ */ ((RuleType2) => {
|
|
951
977
|
RuleType2["VALIDATION"] = "VALIDATION";
|
|
952
978
|
RuleType2["OTHER"] = "OTHER";
|
|
@@ -1653,12 +1679,10 @@ async function removeGiftCardFromCurrentCart2(giftCardId) {
|
|
|
1653
1679
|
}
|
|
1654
1680
|
}
|
|
1655
1681
|
export {
|
|
1656
|
-
CalculationComponent,
|
|
1657
1682
|
ChannelType,
|
|
1658
1683
|
DescriptionLineType,
|
|
1659
1684
|
DiscountScope,
|
|
1660
1685
|
DiscountSourceType,
|
|
1661
|
-
ErrorCode,
|
|
1662
1686
|
FileType,
|
|
1663
1687
|
ItemStatus,
|
|
1664
1688
|
ItemTypeItemType,
|