@wix/auto_sdk_ecom_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 +76 -55
- package/build/cjs/index.js +2 -68
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1 -1
- package/build/cjs/index.typings.js +2 -68
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +64 -58
- package/build/cjs/meta.js +0 -68
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +76 -55
- package/build/es/index.mjs +2 -68
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +1 -1
- package/build/es/index.typings.mjs +2 -68
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +64 -58
- package/build/es/meta.mjs +0 -68
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +14 -14
- package/build/internal/cjs/index.js +2 -68
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +89 -68
- package/build/internal/cjs/index.typings.js +2 -68
- 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 -68
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +14 -14
- package/build/internal/es/index.mjs +2 -68
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +89 -68
- package/build/internal/es/index.typings.mjs +2 -68
- 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 -68
- 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).
|
|
@@ -2921,8 +2932,11 @@ interface UpdateCart {
|
|
|
2921
2932
|
* @readonly
|
|
2922
2933
|
*/
|
|
2923
2934
|
lineItems?: V2LineItem[];
|
|
2924
|
-
/**
|
|
2925
|
-
|
|
2935
|
+
/**
|
|
2936
|
+
* The sum of all line item final prices.
|
|
2937
|
+
* @readonly
|
|
2938
|
+
*/
|
|
2939
|
+
subtotal?: ConvertedMoney;
|
|
2926
2940
|
/**
|
|
2927
2941
|
* Optional message left by the customer.
|
|
2928
2942
|
* Usually intended for the merchant and contain special instructions, requests, or clarifications related to the order.
|
|
@@ -2933,6 +2947,7 @@ interface UpdateCart {
|
|
|
2933
2947
|
* List of coupons added to the Cart.
|
|
2934
2948
|
* Currently, only one coupon code is supported.
|
|
2935
2949
|
* @maxSize 1
|
|
2950
|
+
* @readonly
|
|
2936
2951
|
*/
|
|
2937
2952
|
coupons?: Coupon[];
|
|
2938
2953
|
/** Information about the source of the Cart, detailing the origin or context in which the Cart was created. */
|
|
@@ -2990,6 +3005,12 @@ interface UpdateCart {
|
|
|
2990
3005
|
extendedFields?: ExtendedFields;
|
|
2991
3006
|
}
|
|
2992
3007
|
interface CalculateCartOptions {
|
|
3008
|
+
/**
|
|
3009
|
+
* Whether to retrieve the latest item prices, discounts, and inventory data from the catalogs before calculating the cart.
|
|
3010
|
+
*
|
|
3011
|
+
* Default: `false`
|
|
3012
|
+
*/
|
|
3013
|
+
refreshCart?: boolean;
|
|
2993
3014
|
/**
|
|
2994
3015
|
* Specifies the level of **business validation** to perform during cart calculation,
|
|
2995
3016
|
* by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
|
|
@@ -3055,4 +3076,4 @@ interface MarkCartAsCompletedOptions {
|
|
|
3055
3076
|
orderId?: string | null;
|
|
3056
3077
|
}
|
|
3057
3078
|
|
|
3058
|
-
export { type ActionEvent, type AddCouponRequest, type AddCouponResponse, type AddCouponToCurrentCartRequest, type AddCouponToCurrentCartResponse, type AddGiftCardRequest, type AddGiftCardResponse, type AddGiftCardToCurrentCartRequest, type AddGiftCardToCurrentCartResponse, type AddLineItemsOptions, type AddLineItemsRequest, type AddLineItemsResponse, type AddLineItemsToCurrentCartRequest, type AddLineItemsToCurrentCartResponse, type AdditionalFee, type AdditionalFeeTax, type Address, type AddressLocation, type ApplicationError, type BusinessInfo, type CalculateCartOptions, type CalculateCartRequest, type CalculateCartResponse, type CalculateCurrentCartRequest, type CalculateCurrentCartResponse, type CalculationConfig, type CalculationErrors, type CalculationErrorsShippingCalculationErrorOneOf, type CarrierError, type CarrierErrors, type Cart, type CartSettings, type CartSource, type CartSummary, type CatalogItemInput, type CatalogOverrideFields, type CatalogReference, ChannelType, type ChannelTypeWithLiterals, type Charge, type Color, type Coupon, type CreateCartOptions, type CreateCartRequest, type CreateCartResponse, type CreateCurrentCartRequest, type CreateCurrentCartResponse, type CreatedBy, type CreatedByIdOneOf, type CustomContentReference, type CustomField, type CustomItemAttributes, type CustomItemDeliveryConfig, type CustomItemInput, type CustomItemPaymentConfig, type CustomItemPricingInfo, type CustomItemQuantityInfo, type CustomItemSource, type CustomItemTaxConfig, type CustomerInfo, type CustomerInfoIdOneOf, type DeleteCartRequest, type DeleteCartResponse, type DeleteCurrentCartRequest, type DeleteCurrentCartResponse, type DeliveryInfo, type DeliveryMethod, type DeliverySummary, type Description, type DescriptionLine, type DescriptionLineDescriptionLineValueOneOf, type DescriptionLineName, DescriptionLineType, type DescriptionLineTypeWithLiterals, type DescriptionLineValueOneOf, type Details, type DetailsKindOneOf, type Discount, type DiscountBenefit, type DiscountBenefitValueOneOf, DiscountScope, type DiscountScopeWithLiterals, type DiscountSource, DiscountSourceType, type DiscountSourceTypeWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ExtendedFields, type ExternalReference, type FieldViolation, FileType, type FileTypeWithLiterals, type FreeTrialPeriod, type FullAddressContactDetails, type GetCartRequest, type GetCartResponse, type GetCheckoutURLRequest, type GetCheckoutURLResponse, type GetCheckoutUrlOptions, type GetCurrentCartRequest, type GetCurrentCartResponse, type GiftCard, type GiftCardSummary, type Group, type HandleAsyncCheckoutCompletionRequest, type HeadersEntry, type IdentificationData, type IdentificationDataIdOneOf, type ItemAttributes, type ItemDeliveryConfig, type ItemDiscount, type ItemModifier, type ItemPaymentConfig, type ItemPriceBreakdown, type ItemPricingInfo, type ItemQuantityInfo, type ItemSource, ItemStatus, type ItemStatusWithLiterals, type ItemTaxConfig, type ItemType, ItemTypeItemType, type ItemTypeItemTypeDataOneOf, type ItemTypeItemTypeWithLiterals, type LegacyFields, type LineItem, type LineItemSummary, type LineItemTax, type LineItemUpdate, type MarkCartAsCompletedOptions, type MarkCartAsCompletedRequest, type MarkCartAsCompletedResponse, type Membership, type MessageEnvelope, type ModifierGroup,
|
|
3079
|
+
export { type ActionEvent, type AddCouponRequest, type AddCouponResponse, type AddCouponToCurrentCartRequest, type AddCouponToCurrentCartResponse, type AddGiftCardRequest, type AddGiftCardResponse, type AddGiftCardToCurrentCartRequest, type AddGiftCardToCurrentCartResponse, type AddLineItemsOptions, type AddLineItemsRequest, type AddLineItemsResponse, type AddLineItemsToCurrentCartRequest, type AddLineItemsToCurrentCartResponse, type AdditionalFee, type AdditionalFeeTax, type Address, type AddressLocation, type ApplicationError, type BusinessInfo, type CalculateCartOptions, type CalculateCartRequest, type CalculateCartResponse, type CalculateCurrentCartRequest, type CalculateCurrentCartResponse, type CalculationConfig, type CalculationErrors, type CalculationErrorsShippingCalculationErrorOneOf, type CarrierError, type CarrierErrors, type Cart, type CartSettings, type CartSource, type CartSummary, type CatalogItemInput, type CatalogOverrideFields, type CatalogReference, ChannelType, type ChannelTypeWithLiterals, type Charge, type Color, type ConvertedMoney, type Coupon, type CreateCartOptions, type CreateCartRequest, type CreateCartResponse, type CreateCurrentCartRequest, type CreateCurrentCartResponse, type CreatedBy, type CreatedByIdOneOf, type CustomContentReference, type CustomField, type CustomItemAttributes, type CustomItemDeliveryConfig, type CustomItemInput, type CustomItemPaymentConfig, type CustomItemPricingInfo, type CustomItemQuantityInfo, type CustomItemSource, type CustomItemTaxConfig, type CustomerInfo, type CustomerInfoIdOneOf, type DeleteCartRequest, type DeleteCartResponse, type DeleteCurrentCartRequest, type DeleteCurrentCartResponse, type DeliveryInfo, type DeliveryMethod, type DeliverySummary, type Description, type DescriptionLine, type DescriptionLineDescriptionLineValueOneOf, type DescriptionLineName, DescriptionLineType, type DescriptionLineTypeWithLiterals, type DescriptionLineValueOneOf, type Details, type DetailsKindOneOf, type Discount, type DiscountBenefit, type DiscountBenefitValueOneOf, DiscountScope, type DiscountScopeWithLiterals, type DiscountSource, DiscountSourceType, type DiscountSourceTypeWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ExtendedFields, type ExternalReference, type FieldViolation, FileType, type FileTypeWithLiterals, type FreeTrialPeriod, type FullAddressContactDetails, type GetCartRequest, type GetCartResponse, type GetCheckoutURLRequest, type GetCheckoutURLResponse, type GetCheckoutUrlOptions, type GetCurrentCartRequest, type GetCurrentCartResponse, type GiftCard, type GiftCardSummary, type Group, type HandleAsyncCheckoutCompletionRequest, type HeadersEntry, type IdentificationData, type IdentificationDataIdOneOf, type ItemAttributes, type ItemDeliveryConfig, type ItemDiscount, type ItemModifier, type ItemPaymentConfig, type ItemPriceBreakdown, type ItemPricingInfo, type ItemQuantityInfo, type ItemSource, ItemStatus, type ItemStatusWithLiterals, type ItemTaxConfig, type ItemType, ItemTypeItemType, type ItemTypeItemTypeDataOneOf, type ItemTypeItemTypeWithLiterals, type LegacyFields, type LineItem, type LineItemSummary, type LineItemTax, type LineItemUpdate, type MarkCartAsCompletedOptions, type MarkCartAsCompletedRequest, type MarkCartAsCompletedResponse, type Membership, type MessageEnvelope, type ModifierGroup, NameInLineItem, type NameInLineItemWithLiterals, NameInOther, type NameInOtherWithLiterals, type Other, type PaymentInfo, type PaymentOption, PaymentOptionType, type PaymentOptionTypeWithLiterals, type PaymentSummary, type PhysicalProperties, type PlaceOrderOptions, type PlaceOrderRequest, type PlaceOrderResponse, type PlainTextValue, type Policy, type PriceDescription, type PriceSummary, type QuantityUpdate, type RawHttpResponse, type RedirectUrls, type RefreshCartRequest, type RefreshCartResponse, type RefreshCurrentCartRequest, type RefreshCurrentCartResponse, type RemoveCouponFromCurrentCartRequest, type RemoveCouponFromCurrentCartResponse, type RemoveCouponRequest, type RemoveCouponResponse, type RemoveGiftCardFromCurrentCartRequest, type RemoveGiftCardFromCurrentCartResponse, type RemoveGiftCardRequest, type RemoveGiftCardResponse, type RemoveLineItemsFromCurrentCartRequest, type RemoveLineItemsFromCurrentCartResponse, type RemoveLineItemsRequest, type RemoveLineItemsResponse, type RestoreInfo, RuleType, type RuleTypeWithLiterals, type Scope, type SecuredMedia, type SelectedMembership, type SelectedMembershipUpdate, type ServiceProperties, Severity, type SeverityWithLiterals, type StreetAddress, type SubscriptionCharges, SubscriptionFrequency, type SubscriptionFrequencyWithLiterals, type SubscriptionOptionInfo, type SubscriptionSettings, SuggestedFix, type SuggestedFixWithLiterals, type SystemError, type Target, type TargetTargetTypeOneOf, type Tax, type TaxDetails, type TaxInfo, type TaxSummary, type TaxableAddress, type TaxableAddressTaxableAddressDataOneOf, TaxableAddressType, type TaxableAddressTypeWithLiterals, type Title, type TranslatableString, type UpdateCart, type UpdateCartRequest, type UpdateCartResponse, type UpdateCurrentCartRequest, type UpdateCurrentCartResponse, type UpdateLineItemsInCurrentCartRequest, type UpdateLineItemsInCurrentCartResponse, type UpdateLineItemsOptions, type UpdateLineItemsRequest, type UpdateLineItemsResponse, type V2AdditionalFee, type V2LineItem, type ValidationError, ValidationsConfig, type ValidationsConfigWithLiterals, type VatId, VatType, type VatTypeWithLiterals, type Violation, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, WeightUnit, type WeightUnitWithLiterals };
|
package/build/es/index.mjs
CHANGED
|
@@ -113,18 +113,10 @@ function createCart(payload) {
|
|
|
113
113
|
paths: [
|
|
114
114
|
{ path: "cart.createdDate" },
|
|
115
115
|
{ path: "cart.updatedDate" },
|
|
116
|
-
{
|
|
117
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
118
|
-
},
|
|
119
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
120
116
|
{
|
|
121
117
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
122
118
|
},
|
|
123
119
|
{ path: "cart.lineItems.attributes.serviceProperties.scheduledDate" },
|
|
124
|
-
{
|
|
125
|
-
path: "catalogItems.catalogOverrideFields.image.urlExpirationDate"
|
|
126
|
-
},
|
|
127
|
-
{ path: "customItems.attributes.image.urlExpirationDate" },
|
|
128
120
|
{
|
|
129
121
|
path: "customItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
130
122
|
},
|
|
@@ -169,10 +161,6 @@ function createCart(payload) {
|
|
|
169
161
|
paths: [
|
|
170
162
|
{ path: "cart.createdDate" },
|
|
171
163
|
{ path: "cart.updatedDate" },
|
|
172
|
-
{
|
|
173
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
174
|
-
},
|
|
175
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
176
164
|
{
|
|
177
165
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
178
166
|
},
|
|
@@ -222,10 +210,6 @@ function getCart(payload) {
|
|
|
222
210
|
paths: [
|
|
223
211
|
{ path: "cart.createdDate" },
|
|
224
212
|
{ path: "cart.updatedDate" },
|
|
225
|
-
{
|
|
226
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
227
|
-
},
|
|
228
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
229
213
|
{
|
|
230
214
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
231
215
|
},
|
|
@@ -265,10 +249,6 @@ function updateCart(payload) {
|
|
|
265
249
|
paths: [
|
|
266
250
|
{ path: "cart.createdDate" },
|
|
267
251
|
{ path: "cart.updatedDate" },
|
|
268
|
-
{
|
|
269
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
270
|
-
},
|
|
271
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
272
252
|
{
|
|
273
253
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
274
254
|
},
|
|
@@ -309,10 +289,6 @@ function updateCart(payload) {
|
|
|
309
289
|
paths: [
|
|
310
290
|
{ path: "cart.createdDate" },
|
|
311
291
|
{ path: "cart.updatedDate" },
|
|
312
|
-
{
|
|
313
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
314
|
-
},
|
|
315
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
316
292
|
{
|
|
317
293
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
318
294
|
},
|
|
@@ -383,10 +359,6 @@ function refreshCart(payload) {
|
|
|
383
359
|
paths: [
|
|
384
360
|
{ path: "cart.createdDate" },
|
|
385
361
|
{ path: "cart.updatedDate" },
|
|
386
|
-
{
|
|
387
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
388
|
-
},
|
|
389
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
390
362
|
{
|
|
391
363
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
392
364
|
},
|
|
@@ -436,10 +408,6 @@ function calculateCart(payload) {
|
|
|
436
408
|
paths: [
|
|
437
409
|
{ path: "cart.createdDate" },
|
|
438
410
|
{ path: "cart.updatedDate" },
|
|
439
|
-
{
|
|
440
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
441
|
-
},
|
|
442
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
443
411
|
{
|
|
444
412
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
445
413
|
},
|
|
@@ -527,10 +495,6 @@ function addLineItems(payload) {
|
|
|
527
495
|
{
|
|
528
496
|
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
529
497
|
paths: [
|
|
530
|
-
{
|
|
531
|
-
path: "catalogItems.catalogOverrideFields.image.urlExpirationDate"
|
|
532
|
-
},
|
|
533
|
-
{ path: "customItems.attributes.image.urlExpirationDate" },
|
|
534
498
|
{
|
|
535
499
|
path: "customItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
536
500
|
},
|
|
@@ -558,10 +522,6 @@ function addLineItems(payload) {
|
|
|
558
522
|
paths: [
|
|
559
523
|
{ path: "cart.createdDate" },
|
|
560
524
|
{ path: "cart.updatedDate" },
|
|
561
|
-
{
|
|
562
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
563
|
-
},
|
|
564
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
565
525
|
{
|
|
566
526
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
567
527
|
},
|
|
@@ -611,10 +571,6 @@ function removeLineItems(payload) {
|
|
|
611
571
|
paths: [
|
|
612
572
|
{ path: "cart.createdDate" },
|
|
613
573
|
{ path: "cart.updatedDate" },
|
|
614
|
-
{
|
|
615
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
616
|
-
},
|
|
617
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
618
574
|
{
|
|
619
575
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
620
576
|
},
|
|
@@ -664,10 +620,6 @@ function updateLineItems(payload) {
|
|
|
664
620
|
paths: [
|
|
665
621
|
{ path: "cart.createdDate" },
|
|
666
622
|
{ path: "cart.updatedDate" },
|
|
667
|
-
{
|
|
668
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
669
|
-
},
|
|
670
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
671
623
|
{
|
|
672
624
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
673
625
|
},
|
|
@@ -717,10 +669,6 @@ function addCoupon(payload) {
|
|
|
717
669
|
paths: [
|
|
718
670
|
{ path: "cart.createdDate" },
|
|
719
671
|
{ path: "cart.updatedDate" },
|
|
720
|
-
{
|
|
721
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
722
|
-
},
|
|
723
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
724
672
|
{
|
|
725
673
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
726
674
|
},
|
|
@@ -770,10 +718,6 @@ function removeCoupon(payload) {
|
|
|
770
718
|
paths: [
|
|
771
719
|
{ path: "cart.createdDate" },
|
|
772
720
|
{ path: "cart.updatedDate" },
|
|
773
|
-
{
|
|
774
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
775
|
-
},
|
|
776
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
777
721
|
{
|
|
778
722
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
779
723
|
},
|
|
@@ -823,10 +767,6 @@ function addGiftCard(payload) {
|
|
|
823
767
|
paths: [
|
|
824
768
|
{ path: "cart.createdDate" },
|
|
825
769
|
{ path: "cart.updatedDate" },
|
|
826
|
-
{
|
|
827
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
828
|
-
},
|
|
829
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
830
770
|
{
|
|
831
771
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
832
772
|
},
|
|
@@ -876,10 +816,6 @@ function removeGiftCard(payload) {
|
|
|
876
816
|
paths: [
|
|
877
817
|
{ path: "cart.createdDate" },
|
|
878
818
|
{ path: "cart.updatedDate" },
|
|
879
|
-
{
|
|
880
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
881
|
-
},
|
|
882
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
883
819
|
{
|
|
884
820
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
885
821
|
},
|
|
@@ -929,10 +865,6 @@ function markCartAsCompleted(payload) {
|
|
|
929
865
|
paths: [
|
|
930
866
|
{ path: "cart.createdDate" },
|
|
931
867
|
{ path: "cart.updatedDate" },
|
|
932
|
-
{
|
|
933
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
934
|
-
},
|
|
935
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
936
868
|
{
|
|
937
869
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
938
870
|
},
|
|
@@ -1416,6 +1348,7 @@ async function calculateCart2(cartId, options) {
|
|
|
1416
1348
|
const { httpClient, sideEffects } = arguments[2];
|
|
1417
1349
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1418
1350
|
cartId,
|
|
1351
|
+
refreshCart: options?.refreshCart,
|
|
1419
1352
|
validationsConfig: options?.validationsConfig,
|
|
1420
1353
|
customCalculationConfig: options?.customCalculationConfig
|
|
1421
1354
|
});
|
|
@@ -1453,6 +1386,7 @@ async function calculateCart2(cartId, options) {
|
|
|
1453
1386
|
spreadPathsToArguments: {},
|
|
1454
1387
|
explicitPathsToArguments: {
|
|
1455
1388
|
cartId: "$[0]",
|
|
1389
|
+
refreshCart: "$[1].refreshCart",
|
|
1456
1390
|
validationsConfig: "$[1].validationsConfig",
|
|
1457
1391
|
customCalculationConfig: "$[1].customCalculationConfig"
|
|
1458
1392
|
},
|