@wix/auto_sdk_ecom_current-cart-v-2 1.0.21 → 1.0.23
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 +70 -53
- package/build/cjs/index.js +2 -64
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1 -1
- package/build/cjs/index.typings.js +2 -64
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +64 -58
- package/build/cjs/meta.js +0 -64
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +70 -53
- package/build/es/index.mjs +2 -64
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +1 -1
- package/build/es/index.typings.mjs +2 -64
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +64 -58
- package/build/es/meta.mjs +0 -64
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +13 -13
- package/build/internal/cjs/index.js +2 -64
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +82 -65
- package/build/internal/cjs/index.typings.js +2 -64
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +64 -58
- package/build/internal/cjs/meta.js +0 -64
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +13 -13
- package/build/internal/es/index.mjs +2 -64
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +82 -65
- package/build/internal/es/index.typings.mjs +2 -64
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +64 -58
- package/build/internal/es/meta.mjs +0 -64
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
package/build/es/index.d.mts
CHANGED
|
@@ -28,8 +28,11 @@ interface Cart {
|
|
|
28
28
|
* @readonly
|
|
29
29
|
*/
|
|
30
30
|
lineItems?: V2LineItem[];
|
|
31
|
-
/**
|
|
32
|
-
|
|
31
|
+
/**
|
|
32
|
+
* The sum of all line item final prices.
|
|
33
|
+
* @readonly
|
|
34
|
+
*/
|
|
35
|
+
subtotal?: ConvertedMoney;
|
|
33
36
|
/**
|
|
34
37
|
* Optional message left by the customer.
|
|
35
38
|
* Usually intended for the merchant and contain special instructions, requests, or clarifications related to the order.
|
|
@@ -40,6 +43,7 @@ interface Cart {
|
|
|
40
43
|
* List of coupons added to the Cart.
|
|
41
44
|
* Currently, only one coupon code is supported.
|
|
42
45
|
* @maxSize 1
|
|
46
|
+
* @readonly
|
|
43
47
|
*/
|
|
44
48
|
coupons?: Coupon[];
|
|
45
49
|
/** Information about the source of the Cart, detailing the origin or context in which the Cart was created. */
|
|
@@ -195,12 +199,12 @@ interface ItemPricingInfo {
|
|
|
195
199
|
* Final unit price after applying automatic discounts.
|
|
196
200
|
* Includes tax if `tax_info.prices_include_tax` is true.
|
|
197
201
|
*/
|
|
198
|
-
unitPrice?:
|
|
202
|
+
unitPrice?: ConvertedMoney;
|
|
199
203
|
/**
|
|
200
204
|
* Final total price for this item (unit price × quantity).
|
|
201
205
|
* Includes tax if `tax_info.prices_include_tax` is true.
|
|
202
206
|
*/
|
|
203
|
-
totalPrice?:
|
|
207
|
+
totalPrice?: ConvertedMoney;
|
|
204
208
|
/**
|
|
205
209
|
* Additional description for the price.
|
|
206
210
|
* For example, when price is 0 but additional details about the actual price are needed - "Starts at $67".
|
|
@@ -211,28 +215,21 @@ interface ItemPricingInfo {
|
|
|
211
215
|
/** Detailed breakdown of price components. */
|
|
212
216
|
breakdown?: ItemPriceBreakdown;
|
|
213
217
|
}
|
|
214
|
-
interface
|
|
218
|
+
interface ConvertedMoney {
|
|
215
219
|
/**
|
|
216
|
-
*
|
|
217
|
-
* @
|
|
220
|
+
* Monetary amount in the original currency, as specified in `business_info.currency_code`.
|
|
221
|
+
* @format DECIMAL_VALUE
|
|
222
|
+
* @decimalValue options { gte:0, lte:999999999, maxScale:3 }
|
|
218
223
|
*/
|
|
219
224
|
amount?: string;
|
|
220
225
|
/**
|
|
221
|
-
*
|
|
222
|
-
*
|
|
223
|
-
*
|
|
226
|
+
* Monetary amount in the converted currency, as specified in `customer_info.currency_code`.
|
|
227
|
+
*
|
|
228
|
+
* Default: `amount`.
|
|
229
|
+
* @format DECIMAL_VALUE
|
|
230
|
+
* @decimalValue options { gte:0, lte:999999999, maxScale:3 }
|
|
224
231
|
*/
|
|
225
232
|
convertedAmount?: string;
|
|
226
|
-
/**
|
|
227
|
-
* Amount formatted with currency symbol.
|
|
228
|
-
* @readonly
|
|
229
|
-
*/
|
|
230
|
-
formattedAmount?: string;
|
|
231
|
-
/**
|
|
232
|
-
* Converted amount formatted with currency symbol.
|
|
233
|
-
* @readonly
|
|
234
|
-
*/
|
|
235
|
-
formattedConvertedAmount?: string;
|
|
236
233
|
}
|
|
237
234
|
interface PriceDescription {
|
|
238
235
|
/**
|
|
@@ -255,17 +252,17 @@ interface ItemPriceBreakdown {
|
|
|
255
252
|
* Full catalog price of a single item before any discounts, including modifiers.
|
|
256
253
|
* Includes tax if `tax_info.prices_include_tax` is true.
|
|
257
254
|
*/
|
|
258
|
-
fullPrice?:
|
|
255
|
+
fullPrice?: ConvertedMoney;
|
|
259
256
|
/**
|
|
260
257
|
* Catalog sale price of a single item, including modifiers.
|
|
261
258
|
* Includes tax if `tax_info.prices_include_tax` is true.
|
|
262
259
|
*/
|
|
263
|
-
salePrice?:
|
|
260
|
+
salePrice?: ConvertedMoney;
|
|
264
261
|
/**
|
|
265
262
|
* Total price of all item modifiers for the entire quantity of this item.
|
|
266
263
|
* Includes tax if `tax_info.prices_include_tax` is true.
|
|
267
264
|
*/
|
|
268
|
-
totalModifiersPrice?:
|
|
265
|
+
totalModifiersPrice?: ConvertedMoney;
|
|
269
266
|
}
|
|
270
267
|
interface ItemSource {
|
|
271
268
|
/**
|
|
@@ -717,7 +714,7 @@ interface ItemPaymentConfig {
|
|
|
717
714
|
* Partial payment to be paid upfront during the checkout.
|
|
718
715
|
* Eligible for catalog items with `lineItem.paymentOption` type `DEPOSIT_ONLINE` only.
|
|
719
716
|
*/
|
|
720
|
-
depositAmount?:
|
|
717
|
+
depositAmount?: ConvertedMoney;
|
|
721
718
|
/**
|
|
722
719
|
* Selected membership to be used as payment for this item.
|
|
723
720
|
* Must be used with `lineItem.paymentOption` set to `MEMBERSHIP` or `MEMBERSHIP_OFFLINE`.
|
|
@@ -846,7 +843,7 @@ interface ItemModifier {
|
|
|
846
843
|
/** Additional details. */
|
|
847
844
|
details?: TranslatableString;
|
|
848
845
|
/** The price of the modifier. */
|
|
849
|
-
price?:
|
|
846
|
+
price?: ConvertedMoney;
|
|
850
847
|
}
|
|
851
848
|
/**
|
|
852
849
|
* Currently, only automatic discounts are applied to line items.
|
|
@@ -856,7 +853,7 @@ interface ItemDiscount {
|
|
|
856
853
|
/** The display name of the discount. */
|
|
857
854
|
name?: TranslatableString;
|
|
858
855
|
/** The amount discounted from the item's sale price (per unit). */
|
|
859
|
-
amountOff?:
|
|
856
|
+
amountOff?: ConvertedMoney;
|
|
860
857
|
}
|
|
861
858
|
interface Scope {
|
|
862
859
|
/** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */
|
|
@@ -1390,9 +1387,9 @@ interface LegacyFields {
|
|
|
1390
1387
|
*/
|
|
1391
1388
|
appliedDiscounts?: Discount[];
|
|
1392
1389
|
/** The coupon discount amount. */
|
|
1393
|
-
couponDiscount?:
|
|
1390
|
+
couponDiscount?: ConvertedMoney;
|
|
1394
1391
|
/** The sum of all line items after applying all discounts. */
|
|
1395
|
-
subtotalAfterCouponDiscount?:
|
|
1392
|
+
subtotalAfterCouponDiscount?: ConvertedMoney;
|
|
1396
1393
|
}
|
|
1397
1394
|
interface Discount {
|
|
1398
1395
|
/** The display name of the discount. */
|
|
@@ -1447,7 +1444,7 @@ declare enum DiscountScope {
|
|
|
1447
1444
|
type DiscountScopeWithLiterals = DiscountScope | 'UNKNOWN_DISCOUNT_SCOPE' | 'CART_SUBTOTAL' | 'LINE_ITEM' | 'DELIVERY';
|
|
1448
1445
|
interface DiscountBenefit extends DiscountBenefitValueOneOf {
|
|
1449
1446
|
/** A specific monetary value deducted from the total cost. */
|
|
1450
|
-
amountOff?:
|
|
1447
|
+
amountOff?: ConvertedMoney;
|
|
1451
1448
|
/**
|
|
1452
1449
|
* The ID of line item that the discount applies to.
|
|
1453
1450
|
* Relevant for item-level discounts only.
|
|
@@ -1458,7 +1455,7 @@ interface DiscountBenefit extends DiscountBenefitValueOneOf {
|
|
|
1458
1455
|
/** @oneof */
|
|
1459
1456
|
interface DiscountBenefitValueOneOf {
|
|
1460
1457
|
/** A specific monetary value deducted from the total cost. */
|
|
1461
|
-
amountOff?:
|
|
1458
|
+
amountOff?: ConvertedMoney;
|
|
1462
1459
|
}
|
|
1463
1460
|
interface CartSummary {
|
|
1464
1461
|
/**
|
|
@@ -1533,12 +1530,12 @@ interface LineItemSummary {
|
|
|
1533
1530
|
* Final unit price after applying automatic discounts.
|
|
1534
1531
|
* Includes tax if `tax_summary.prices_include_tax` is true.
|
|
1535
1532
|
*/
|
|
1536
|
-
unitPrice?:
|
|
1533
|
+
unitPrice?: ConvertedMoney;
|
|
1537
1534
|
/**
|
|
1538
1535
|
* Total price for the line item (unit price × quantity).
|
|
1539
1536
|
* Includes tax if `tax_summary.prices_include_tax` is true.
|
|
1540
1537
|
*/
|
|
1541
|
-
totalPrice?:
|
|
1538
|
+
totalPrice?: ConvertedMoney;
|
|
1542
1539
|
}
|
|
1543
1540
|
interface DeliverySummary {
|
|
1544
1541
|
/** The calculated delivery method. */
|
|
@@ -1547,7 +1544,7 @@ interface DeliverySummary {
|
|
|
1547
1544
|
* Delivery price after discount.
|
|
1548
1545
|
* Includes tax if `tax_summary.prices_include_tax` is true.
|
|
1549
1546
|
*/
|
|
1550
|
-
price?:
|
|
1547
|
+
price?: ConvertedMoney;
|
|
1551
1548
|
}
|
|
1552
1549
|
interface V2AdditionalFee {
|
|
1553
1550
|
/**
|
|
@@ -1575,7 +1572,7 @@ interface V2AdditionalFee {
|
|
|
1575
1572
|
* Additional fee's price.
|
|
1576
1573
|
* Includes tax if `tax_summary.prices_include_tax` is true.
|
|
1577
1574
|
*/
|
|
1578
|
-
price?:
|
|
1575
|
+
price?: ConvertedMoney;
|
|
1579
1576
|
/**
|
|
1580
1577
|
* Number of subscription cycle this fee applies to.
|
|
1581
1578
|
* If None and discount is linked to subscription line item, it applies to all cycles.
|
|
@@ -1604,7 +1601,7 @@ interface TaxSummary {
|
|
|
1604
1601
|
*/
|
|
1605
1602
|
lineItemTaxes?: LineItemTax[];
|
|
1606
1603
|
/** Tax applied to the delivery method. */
|
|
1607
|
-
deliveryTax?:
|
|
1604
|
+
deliveryTax?: ConvertedMoney;
|
|
1608
1605
|
/**
|
|
1609
1606
|
* Taxes applied to additional fees.
|
|
1610
1607
|
* @maxSize 100
|
|
@@ -1615,16 +1612,16 @@ interface Tax {
|
|
|
1615
1612
|
/** The name of the tax. */
|
|
1616
1613
|
name?: TranslatableString;
|
|
1617
1614
|
/** Amount for which tax is calculated. */
|
|
1618
|
-
taxableAmount?:
|
|
1615
|
+
taxableAmount?: ConvertedMoney;
|
|
1619
1616
|
/** Amount that is exempt from tax. */
|
|
1620
|
-
exemptAmount?:
|
|
1617
|
+
exemptAmount?: ConvertedMoney;
|
|
1621
1618
|
/**
|
|
1622
1619
|
* Tax rate %, as a decimal point between 0 and 1.
|
|
1623
1620
|
* @decimalValue options { gte:0, lte:1, maxScale:6 }
|
|
1624
1621
|
*/
|
|
1625
1622
|
rate?: string | null;
|
|
1626
1623
|
/** Calculated tax, based on `taxable_amount` and `rate`. */
|
|
1627
|
-
amount?:
|
|
1624
|
+
amount?: ConvertedMoney;
|
|
1628
1625
|
}
|
|
1629
1626
|
interface LineItemTax {
|
|
1630
1627
|
/**
|
|
@@ -1633,7 +1630,7 @@ interface LineItemTax {
|
|
|
1633
1630
|
*/
|
|
1634
1631
|
lineItemId?: string;
|
|
1635
1632
|
/** Tax amount applied to the additional fee. */
|
|
1636
|
-
tax?:
|
|
1633
|
+
tax?: ConvertedMoney;
|
|
1637
1634
|
}
|
|
1638
1635
|
interface AdditionalFeeTax {
|
|
1639
1636
|
/**
|
|
@@ -1643,34 +1640,34 @@ interface AdditionalFeeTax {
|
|
|
1643
1640
|
*/
|
|
1644
1641
|
additionalFeeCode?: string;
|
|
1645
1642
|
/** Tax amount applied to the additional fee. */
|
|
1646
|
-
tax?:
|
|
1643
|
+
tax?: ConvertedMoney;
|
|
1647
1644
|
}
|
|
1648
1645
|
interface PriceSummary {
|
|
1649
1646
|
/**
|
|
1650
1647
|
* Total price of all line items after applying item-level discounts.
|
|
1651
1648
|
* Includes tax if `tax_summary.prices_include_tax` is true.
|
|
1652
1649
|
*/
|
|
1653
|
-
subtotal?:
|
|
1650
|
+
subtotal?: ConvertedMoney;
|
|
1654
1651
|
/**
|
|
1655
1652
|
* Total cart-level discount applied to the subtotal.
|
|
1656
1653
|
* Line-item discounts are reflected in the subtotal and not included here.
|
|
1657
1654
|
* Currently supports only a single coupon.
|
|
1658
1655
|
*/
|
|
1659
|
-
discount?:
|
|
1656
|
+
discount?: ConvertedMoney;
|
|
1660
1657
|
/**
|
|
1661
1658
|
* Final delivery cost for the cart.
|
|
1662
1659
|
* Includes tax if `tax_summary.prices_include_tax` is true.
|
|
1663
1660
|
*/
|
|
1664
|
-
delivery?:
|
|
1661
|
+
delivery?: ConvertedMoney;
|
|
1665
1662
|
/**
|
|
1666
1663
|
* Total additional fees associated with the cart.
|
|
1667
1664
|
* Includes tax if `tax_summary.prices_include_tax` is true.
|
|
1668
1665
|
*/
|
|
1669
|
-
additionalFees?:
|
|
1666
|
+
additionalFees?: ConvertedMoney;
|
|
1670
1667
|
/** Total tax amount calculated across all applicable components (items, discounts, delivery, and fees). */
|
|
1671
|
-
tax?:
|
|
1668
|
+
tax?: ConvertedMoney;
|
|
1672
1669
|
/** Total amount to be paid. */
|
|
1673
|
-
total?:
|
|
1670
|
+
total?: ConvertedMoney;
|
|
1674
1671
|
}
|
|
1675
1672
|
interface PaymentSummary {
|
|
1676
1673
|
/**
|
|
@@ -1692,13 +1689,13 @@ interface PaymentSummary {
|
|
|
1692
1689
|
/** Indicates whether a remaining payment is required to create the order, after applying gift cards. */
|
|
1693
1690
|
requiresPaymentAfterGiftCard?: boolean;
|
|
1694
1691
|
/** The total amount due after applying all gift cards. */
|
|
1695
|
-
totalAfterGiftCards?:
|
|
1692
|
+
totalAfterGiftCards?: ConvertedMoney;
|
|
1696
1693
|
/** The upfront amount to be charged immediately when placing the order (after applying gift cards). */
|
|
1697
|
-
payNow?:
|
|
1694
|
+
payNow?: ConvertedMoney;
|
|
1698
1695
|
/** The remaining amount to be collected later. */
|
|
1699
|
-
payLater?:
|
|
1696
|
+
payLater?: ConvertedMoney;
|
|
1700
1697
|
/** The amount to be charged after a free trial period (typically for subscription-based products). */
|
|
1701
|
-
payAfterFreeTrial?:
|
|
1698
|
+
payAfterFreeTrial?: ConvertedMoney;
|
|
1702
1699
|
}
|
|
1703
1700
|
interface GiftCardSummary {
|
|
1704
1701
|
/**
|
|
@@ -1707,7 +1704,7 @@ interface GiftCardSummary {
|
|
|
1707
1704
|
*/
|
|
1708
1705
|
giftCardId?: string;
|
|
1709
1706
|
/** The amount to be reduced from the gift card's balance. */
|
|
1710
|
-
redeemAmount?:
|
|
1707
|
+
redeemAmount?: ConvertedMoney;
|
|
1711
1708
|
}
|
|
1712
1709
|
interface Membership {
|
|
1713
1710
|
/**
|
|
@@ -2166,8 +2163,10 @@ interface CustomItemPaymentConfig {
|
|
|
2166
2163
|
/**
|
|
2167
2164
|
* Partial payment to be paid upfront during the checkout.
|
|
2168
2165
|
* Eligible for catalog items with `lineItem.paymentOption` type `DEPOSIT_ONLINE` only.
|
|
2166
|
+
* @format DECIMAL_VALUE
|
|
2167
|
+
* @decimalValue options { gte:0, lte:1000000000000000, maxScale:3 }
|
|
2169
2168
|
*/
|
|
2170
|
-
depositAmount?:
|
|
2169
|
+
depositAmount?: string | null;
|
|
2171
2170
|
/**
|
|
2172
2171
|
* Type of selected payment option for current item.
|
|
2173
2172
|
*
|
|
@@ -2204,6 +2203,12 @@ interface RefreshCurrentCartResponse {
|
|
|
2204
2203
|
cart?: Cart;
|
|
2205
2204
|
}
|
|
2206
2205
|
interface CalculateCurrentCartRequest {
|
|
2206
|
+
/**
|
|
2207
|
+
* Whether to retrieve the latest item prices, discounts, and inventory data from the catalogs before calculating the cart.
|
|
2208
|
+
*
|
|
2209
|
+
* Default: `false`
|
|
2210
|
+
*/
|
|
2211
|
+
refreshCart?: boolean;
|
|
2207
2212
|
/**
|
|
2208
2213
|
* Specifies the level of **business validation** to perform during cart calculation,
|
|
2209
2214
|
* by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
|
|
@@ -2591,6 +2596,12 @@ interface CalculateCartRequest {
|
|
|
2591
2596
|
* @format GUID
|
|
2592
2597
|
*/
|
|
2593
2598
|
cartId?: string;
|
|
2599
|
+
/**
|
|
2600
|
+
* Whether to retrieve the latest item prices, discounts, and inventory data from the catalogs before calculating the cart.
|
|
2601
|
+
*
|
|
2602
|
+
* Default: `false`
|
|
2603
|
+
*/
|
|
2604
|
+
refreshCart?: boolean;
|
|
2594
2605
|
/**
|
|
2595
2606
|
* Specifies the level of **business validation** to perform during cart calculation,
|
|
2596
2607
|
* by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
|
|
@@ -2890,6 +2901,12 @@ interface CreateCurrentCartOptions {
|
|
|
2890
2901
|
giftCardCodes?: string[];
|
|
2891
2902
|
}
|
|
2892
2903
|
interface CalculateCurrentCartOptions {
|
|
2904
|
+
/**
|
|
2905
|
+
* Whether to retrieve the latest item prices, discounts, and inventory data from the catalogs before calculating the cart.
|
|
2906
|
+
*
|
|
2907
|
+
* Default: `false`
|
|
2908
|
+
*/
|
|
2909
|
+
refreshCart?: boolean;
|
|
2893
2910
|
/**
|
|
2894
2911
|
* Specifies the level of **business validation** to perform during cart calculation,
|
|
2895
2912
|
* by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
|
|
@@ -2922,4 +2939,4 @@ interface UpdateLineItemsInCurrentCartOptions {
|
|
|
2922
2939
|
lineItems?: LineItemUpdate[];
|
|
2923
2940
|
}
|
|
2924
2941
|
|
|
2925
|
-
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,
|
|
2942
|
+
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 ConvertedMoney, 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, 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 };
|
package/build/es/index.mjs
CHANGED
|
@@ -112,18 +112,10 @@ function createCurrentCart(payload) {
|
|
|
112
112
|
paths: [
|
|
113
113
|
{ path: "cart.createdDate" },
|
|
114
114
|
{ path: "cart.updatedDate" },
|
|
115
|
-
{
|
|
116
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
117
|
-
},
|
|
118
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
119
115
|
{
|
|
120
116
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
121
117
|
},
|
|
122
118
|
{ path: "cart.lineItems.attributes.serviceProperties.scheduledDate" },
|
|
123
|
-
{
|
|
124
|
-
path: "catalogItems.catalogOverrideFields.image.urlExpirationDate"
|
|
125
|
-
},
|
|
126
|
-
{ path: "customItems.attributes.image.urlExpirationDate" },
|
|
127
119
|
{
|
|
128
120
|
path: "customItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
129
121
|
},
|
|
@@ -168,10 +160,6 @@ function createCurrentCart(payload) {
|
|
|
168
160
|
paths: [
|
|
169
161
|
{ path: "cart.createdDate" },
|
|
170
162
|
{ path: "cart.updatedDate" },
|
|
171
|
-
{
|
|
172
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
173
|
-
},
|
|
174
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
175
163
|
{
|
|
176
164
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
177
165
|
},
|
|
@@ -221,10 +209,6 @@ function getCurrentCart(payload) {
|
|
|
221
209
|
paths: [
|
|
222
210
|
{ path: "cart.createdDate" },
|
|
223
211
|
{ path: "cart.updatedDate" },
|
|
224
|
-
{
|
|
225
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
226
|
-
},
|
|
227
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
228
212
|
{
|
|
229
213
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
230
214
|
},
|
|
@@ -264,10 +248,6 @@ function updateCurrentCart(payload) {
|
|
|
264
248
|
paths: [
|
|
265
249
|
{ path: "cart.createdDate" },
|
|
266
250
|
{ path: "cart.updatedDate" },
|
|
267
|
-
{
|
|
268
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
269
|
-
},
|
|
270
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
271
251
|
{
|
|
272
252
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
273
253
|
},
|
|
@@ -308,10 +288,6 @@ function updateCurrentCart(payload) {
|
|
|
308
288
|
paths: [
|
|
309
289
|
{ path: "cart.createdDate" },
|
|
310
290
|
{ path: "cart.updatedDate" },
|
|
311
|
-
{
|
|
312
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
313
|
-
},
|
|
314
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
315
291
|
{
|
|
316
292
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
317
293
|
},
|
|
@@ -382,10 +358,6 @@ function refreshCurrentCart(payload) {
|
|
|
382
358
|
paths: [
|
|
383
359
|
{ path: "cart.createdDate" },
|
|
384
360
|
{ path: "cart.updatedDate" },
|
|
385
|
-
{
|
|
386
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
387
|
-
},
|
|
388
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
389
361
|
{
|
|
390
362
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
391
363
|
},
|
|
@@ -435,10 +407,6 @@ function calculateCurrentCart(payload) {
|
|
|
435
407
|
paths: [
|
|
436
408
|
{ path: "cart.createdDate" },
|
|
437
409
|
{ path: "cart.updatedDate" },
|
|
438
|
-
{
|
|
439
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
440
|
-
},
|
|
441
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
442
410
|
{
|
|
443
411
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
444
412
|
},
|
|
@@ -484,10 +452,6 @@ function addLineItemsToCurrentCart(payload) {
|
|
|
484
452
|
{
|
|
485
453
|
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
486
454
|
paths: [
|
|
487
|
-
{
|
|
488
|
-
path: "catalogItems.catalogOverrideFields.image.urlExpirationDate"
|
|
489
|
-
},
|
|
490
|
-
{ path: "customItems.attributes.image.urlExpirationDate" },
|
|
491
455
|
{
|
|
492
456
|
path: "customItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
493
457
|
},
|
|
@@ -515,10 +479,6 @@ function addLineItemsToCurrentCart(payload) {
|
|
|
515
479
|
paths: [
|
|
516
480
|
{ path: "cart.createdDate" },
|
|
517
481
|
{ path: "cart.updatedDate" },
|
|
518
|
-
{
|
|
519
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
520
|
-
},
|
|
521
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
522
482
|
{
|
|
523
483
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
524
484
|
},
|
|
@@ -568,10 +528,6 @@ function removeLineItemsFromCurrentCart(payload) {
|
|
|
568
528
|
paths: [
|
|
569
529
|
{ path: "cart.createdDate" },
|
|
570
530
|
{ path: "cart.updatedDate" },
|
|
571
|
-
{
|
|
572
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
573
|
-
},
|
|
574
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
575
531
|
{
|
|
576
532
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
577
533
|
},
|
|
@@ -621,10 +577,6 @@ function updateLineItemsInCurrentCart(payload) {
|
|
|
621
577
|
paths: [
|
|
622
578
|
{ path: "cart.createdDate" },
|
|
623
579
|
{ path: "cart.updatedDate" },
|
|
624
|
-
{
|
|
625
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
626
|
-
},
|
|
627
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
628
580
|
{
|
|
629
581
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
630
582
|
},
|
|
@@ -674,10 +626,6 @@ function addCouponToCurrentCart(payload) {
|
|
|
674
626
|
paths: [
|
|
675
627
|
{ path: "cart.createdDate" },
|
|
676
628
|
{ path: "cart.updatedDate" },
|
|
677
|
-
{
|
|
678
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
679
|
-
},
|
|
680
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
681
629
|
{
|
|
682
630
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
683
631
|
},
|
|
@@ -727,10 +675,6 @@ function removeCouponFromCurrentCart(payload) {
|
|
|
727
675
|
paths: [
|
|
728
676
|
{ path: "cart.createdDate" },
|
|
729
677
|
{ path: "cart.updatedDate" },
|
|
730
|
-
{
|
|
731
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
732
|
-
},
|
|
733
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
734
678
|
{
|
|
735
679
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
736
680
|
},
|
|
@@ -780,10 +724,6 @@ function addGiftCardToCurrentCart(payload) {
|
|
|
780
724
|
paths: [
|
|
781
725
|
{ path: "cart.createdDate" },
|
|
782
726
|
{ path: "cart.updatedDate" },
|
|
783
|
-
{
|
|
784
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
785
|
-
},
|
|
786
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
787
727
|
{
|
|
788
728
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
789
729
|
},
|
|
@@ -833,10 +773,6 @@ function removeGiftCardFromCurrentCart(payload) {
|
|
|
833
773
|
paths: [
|
|
834
774
|
{ path: "cart.createdDate" },
|
|
835
775
|
{ path: "cart.updatedDate" },
|
|
836
|
-
{
|
|
837
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
838
|
-
},
|
|
839
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
840
776
|
{
|
|
841
777
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
842
778
|
},
|
|
@@ -1292,6 +1228,7 @@ async function refreshCurrentCart2() {
|
|
|
1292
1228
|
async function calculateCurrentCart2(options) {
|
|
1293
1229
|
const { httpClient, sideEffects } = arguments[1];
|
|
1294
1230
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1231
|
+
refreshCart: options?.refreshCart,
|
|
1295
1232
|
validationsConfig: options?.validationsConfig,
|
|
1296
1233
|
customCalculationConfig: options?.customCalculationConfig
|
|
1297
1234
|
});
|
|
@@ -1328,6 +1265,7 @@ async function calculateCurrentCart2(options) {
|
|
|
1328
1265
|
{
|
|
1329
1266
|
spreadPathsToArguments: {},
|
|
1330
1267
|
explicitPathsToArguments: {
|
|
1268
|
+
refreshCart: "$[0].refreshCart",
|
|
1331
1269
|
validationsConfig: "$[0].validationsConfig",
|
|
1332
1270
|
customCalculationConfig: "$[0].customCalculationConfig"
|
|
1333
1271
|
},
|