@wix/auto_sdk_ecom_cart-v-2 1.0.22 → 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 +31 -3
- package/build/cjs/index.js +2 -68
- package/build/cjs/index.js.map +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 +20 -7
- package/build/cjs/meta.js +0 -68
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +31 -3
- package/build/es/index.mjs +2 -68
- package/build/es/index.mjs.map +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 +20 -7
- package/build/es/meta.mjs +0 -68
- package/build/es/meta.mjs.map +1 -1
- 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 +31 -3
- 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 +20 -7
- package/build/internal/cjs/meta.js +0 -68
- package/build/internal/cjs/meta.js.map +1 -1
- 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 +31 -3
- 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 +20 -7
- package/build/internal/es/meta.mjs +0 -68
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -28,7 +28,10 @@ interface Cart {
|
|
|
28
28
|
* @readonly
|
|
29
29
|
*/
|
|
30
30
|
lineItems?: V2LineItem[];
|
|
31
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* The sum of all line item final prices.
|
|
33
|
+
* @readonly
|
|
34
|
+
*/
|
|
32
35
|
subtotal?: ConvertedMoney;
|
|
33
36
|
/**
|
|
34
37
|
* Optional message left by the customer.
|
|
@@ -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. */
|
|
@@ -2159,8 +2163,10 @@ interface CustomItemPaymentConfig {
|
|
|
2159
2163
|
/**
|
|
2160
2164
|
* Partial payment to be paid upfront during the checkout.
|
|
2161
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 }
|
|
2162
2168
|
*/
|
|
2163
|
-
depositAmount?:
|
|
2169
|
+
depositAmount?: string | null;
|
|
2164
2170
|
/**
|
|
2165
2171
|
* Type of selected payment option for current item.
|
|
2166
2172
|
*
|
|
@@ -2197,6 +2203,12 @@ interface RefreshCurrentCartResponse {
|
|
|
2197
2203
|
cart?: Cart;
|
|
2198
2204
|
}
|
|
2199
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;
|
|
2200
2212
|
/**
|
|
2201
2213
|
* Specifies the level of **business validation** to perform during cart calculation,
|
|
2202
2214
|
* by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
|
|
@@ -2584,6 +2596,12 @@ interface CalculateCartRequest {
|
|
|
2584
2596
|
* @format GUID
|
|
2585
2597
|
*/
|
|
2586
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;
|
|
2587
2605
|
/**
|
|
2588
2606
|
* Specifies the level of **business validation** to perform during cart calculation,
|
|
2589
2607
|
* by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
|
|
@@ -2914,7 +2932,10 @@ interface UpdateCart {
|
|
|
2914
2932
|
* @readonly
|
|
2915
2933
|
*/
|
|
2916
2934
|
lineItems?: V2LineItem[];
|
|
2917
|
-
/**
|
|
2935
|
+
/**
|
|
2936
|
+
* The sum of all line item final prices.
|
|
2937
|
+
* @readonly
|
|
2938
|
+
*/
|
|
2918
2939
|
subtotal?: ConvertedMoney;
|
|
2919
2940
|
/**
|
|
2920
2941
|
* Optional message left by the customer.
|
|
@@ -2926,6 +2947,7 @@ interface UpdateCart {
|
|
|
2926
2947
|
* List of coupons added to the Cart.
|
|
2927
2948
|
* Currently, only one coupon code is supported.
|
|
2928
2949
|
* @maxSize 1
|
|
2950
|
+
* @readonly
|
|
2929
2951
|
*/
|
|
2930
2952
|
coupons?: Coupon[];
|
|
2931
2953
|
/** Information about the source of the Cart, detailing the origin or context in which the Cart was created. */
|
|
@@ -2983,6 +3005,12 @@ interface UpdateCart {
|
|
|
2983
3005
|
extendedFields?: ExtendedFields;
|
|
2984
3006
|
}
|
|
2985
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;
|
|
2986
3014
|
/**
|
|
2987
3015
|
* Specifies the level of **business validation** to perform during cart calculation,
|
|
2988
3016
|
* by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
|
package/build/cjs/index.js
CHANGED
|
@@ -171,18 +171,10 @@ function createCart(payload) {
|
|
|
171
171
|
paths: [
|
|
172
172
|
{ path: "cart.createdDate" },
|
|
173
173
|
{ path: "cart.updatedDate" },
|
|
174
|
-
{
|
|
175
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
176
|
-
},
|
|
177
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
178
174
|
{
|
|
179
175
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
180
176
|
},
|
|
181
177
|
{ path: "cart.lineItems.attributes.serviceProperties.scheduledDate" },
|
|
182
|
-
{
|
|
183
|
-
path: "catalogItems.catalogOverrideFields.image.urlExpirationDate"
|
|
184
|
-
},
|
|
185
|
-
{ path: "customItems.attributes.image.urlExpirationDate" },
|
|
186
178
|
{
|
|
187
179
|
path: "customItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
188
180
|
},
|
|
@@ -227,10 +219,6 @@ function createCart(payload) {
|
|
|
227
219
|
paths: [
|
|
228
220
|
{ path: "cart.createdDate" },
|
|
229
221
|
{ path: "cart.updatedDate" },
|
|
230
|
-
{
|
|
231
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
232
|
-
},
|
|
233
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
234
222
|
{
|
|
235
223
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
236
224
|
},
|
|
@@ -280,10 +268,6 @@ function getCart(payload) {
|
|
|
280
268
|
paths: [
|
|
281
269
|
{ path: "cart.createdDate" },
|
|
282
270
|
{ path: "cart.updatedDate" },
|
|
283
|
-
{
|
|
284
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
285
|
-
},
|
|
286
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
287
271
|
{
|
|
288
272
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
289
273
|
},
|
|
@@ -323,10 +307,6 @@ function updateCart(payload) {
|
|
|
323
307
|
paths: [
|
|
324
308
|
{ path: "cart.createdDate" },
|
|
325
309
|
{ path: "cart.updatedDate" },
|
|
326
|
-
{
|
|
327
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
328
|
-
},
|
|
329
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
330
310
|
{
|
|
331
311
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
332
312
|
},
|
|
@@ -367,10 +347,6 @@ function updateCart(payload) {
|
|
|
367
347
|
paths: [
|
|
368
348
|
{ path: "cart.createdDate" },
|
|
369
349
|
{ path: "cart.updatedDate" },
|
|
370
|
-
{
|
|
371
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
372
|
-
},
|
|
373
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
374
350
|
{
|
|
375
351
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
376
352
|
},
|
|
@@ -441,10 +417,6 @@ function refreshCart(payload) {
|
|
|
441
417
|
paths: [
|
|
442
418
|
{ path: "cart.createdDate" },
|
|
443
419
|
{ path: "cart.updatedDate" },
|
|
444
|
-
{
|
|
445
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
446
|
-
},
|
|
447
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
448
420
|
{
|
|
449
421
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
450
422
|
},
|
|
@@ -494,10 +466,6 @@ function calculateCart(payload) {
|
|
|
494
466
|
paths: [
|
|
495
467
|
{ path: "cart.createdDate" },
|
|
496
468
|
{ path: "cart.updatedDate" },
|
|
497
|
-
{
|
|
498
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
499
|
-
},
|
|
500
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
501
469
|
{
|
|
502
470
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
503
471
|
},
|
|
@@ -585,10 +553,6 @@ function addLineItems(payload) {
|
|
|
585
553
|
{
|
|
586
554
|
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
587
555
|
paths: [
|
|
588
|
-
{
|
|
589
|
-
path: "catalogItems.catalogOverrideFields.image.urlExpirationDate"
|
|
590
|
-
},
|
|
591
|
-
{ path: "customItems.attributes.image.urlExpirationDate" },
|
|
592
556
|
{
|
|
593
557
|
path: "customItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
594
558
|
},
|
|
@@ -616,10 +580,6 @@ function addLineItems(payload) {
|
|
|
616
580
|
paths: [
|
|
617
581
|
{ path: "cart.createdDate" },
|
|
618
582
|
{ path: "cart.updatedDate" },
|
|
619
|
-
{
|
|
620
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
621
|
-
},
|
|
622
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
623
583
|
{
|
|
624
584
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
625
585
|
},
|
|
@@ -669,10 +629,6 @@ function removeLineItems(payload) {
|
|
|
669
629
|
paths: [
|
|
670
630
|
{ path: "cart.createdDate" },
|
|
671
631
|
{ path: "cart.updatedDate" },
|
|
672
|
-
{
|
|
673
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
674
|
-
},
|
|
675
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
676
632
|
{
|
|
677
633
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
678
634
|
},
|
|
@@ -722,10 +678,6 @@ function updateLineItems(payload) {
|
|
|
722
678
|
paths: [
|
|
723
679
|
{ path: "cart.createdDate" },
|
|
724
680
|
{ path: "cart.updatedDate" },
|
|
725
|
-
{
|
|
726
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
727
|
-
},
|
|
728
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
729
681
|
{
|
|
730
682
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
731
683
|
},
|
|
@@ -775,10 +727,6 @@ function addCoupon(payload) {
|
|
|
775
727
|
paths: [
|
|
776
728
|
{ path: "cart.createdDate" },
|
|
777
729
|
{ path: "cart.updatedDate" },
|
|
778
|
-
{
|
|
779
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
780
|
-
},
|
|
781
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
782
730
|
{
|
|
783
731
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
784
732
|
},
|
|
@@ -828,10 +776,6 @@ function removeCoupon(payload) {
|
|
|
828
776
|
paths: [
|
|
829
777
|
{ path: "cart.createdDate" },
|
|
830
778
|
{ path: "cart.updatedDate" },
|
|
831
|
-
{
|
|
832
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
833
|
-
},
|
|
834
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
835
779
|
{
|
|
836
780
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
837
781
|
},
|
|
@@ -881,10 +825,6 @@ function addGiftCard(payload) {
|
|
|
881
825
|
paths: [
|
|
882
826
|
{ path: "cart.createdDate" },
|
|
883
827
|
{ path: "cart.updatedDate" },
|
|
884
|
-
{
|
|
885
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
886
|
-
},
|
|
887
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
888
828
|
{
|
|
889
829
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
890
830
|
},
|
|
@@ -934,10 +874,6 @@ function removeGiftCard(payload) {
|
|
|
934
874
|
paths: [
|
|
935
875
|
{ path: "cart.createdDate" },
|
|
936
876
|
{ path: "cart.updatedDate" },
|
|
937
|
-
{
|
|
938
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
939
|
-
},
|
|
940
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
941
877
|
{
|
|
942
878
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
943
879
|
},
|
|
@@ -987,10 +923,6 @@ function markCartAsCompleted(payload) {
|
|
|
987
923
|
paths: [
|
|
988
924
|
{ path: "cart.createdDate" },
|
|
989
925
|
{ path: "cart.updatedDate" },
|
|
990
|
-
{
|
|
991
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
992
|
-
},
|
|
993
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
994
926
|
{
|
|
995
927
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
996
928
|
},
|
|
@@ -1474,6 +1406,7 @@ async function calculateCart2(cartId, options) {
|
|
|
1474
1406
|
const { httpClient, sideEffects } = arguments[2];
|
|
1475
1407
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1476
1408
|
cartId,
|
|
1409
|
+
refreshCart: options?.refreshCart,
|
|
1477
1410
|
validationsConfig: options?.validationsConfig,
|
|
1478
1411
|
customCalculationConfig: options?.customCalculationConfig
|
|
1479
1412
|
});
|
|
@@ -1511,6 +1444,7 @@ async function calculateCart2(cartId, options) {
|
|
|
1511
1444
|
spreadPathsToArguments: {},
|
|
1512
1445
|
explicitPathsToArguments: {
|
|
1513
1446
|
cartId: "$[0]",
|
|
1447
|
+
refreshCart: "$[1].refreshCart",
|
|
1514
1448
|
validationsConfig: "$[1].validationsConfig",
|
|
1515
1449
|
customCalculationConfig: "$[1].customCalculationConfig"
|
|
1516
1450
|
},
|