@wix/auto_sdk_ecom_current-cart-v-2 1.0.22 → 1.0.24
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 +28 -16
- package/build/cjs/index.js +2 -64
- package/build/cjs/index.js.map +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 +22 -19
- package/build/cjs/meta.js +0 -64
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +28 -16
- package/build/es/index.mjs +2 -64
- package/build/es/index.mjs.map +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 +22 -19
- package/build/es/meta.mjs +0 -64
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +0 -3
- 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 +28 -19
- 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 +22 -19
- package/build/internal/cjs/meta.js +0 -64
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +0 -3
- 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 +28 -19
- 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 +22 -19
- package/build/internal/es/meta.mjs +0 -64
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -25,13 +25,15 @@ interface Cart {
|
|
|
25
25
|
revision?: string | null;
|
|
26
26
|
/**
|
|
27
27
|
* Line items added to the Cart by the customer.
|
|
28
|
-
* This list may include
|
|
29
|
-
* When submitting an order, only valid items will be included in the order.
|
|
28
|
+
* This list may include items in stock and invalid out out stock.
|
|
30
29
|
* @maxSize 300
|
|
31
30
|
* @readonly
|
|
32
31
|
*/
|
|
33
32
|
lineItems?: V2LineItem[];
|
|
34
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* The sum of all line item final prices.
|
|
35
|
+
* @readonly
|
|
36
|
+
*/
|
|
35
37
|
subtotal?: ConvertedMoney;
|
|
36
38
|
/**
|
|
37
39
|
* Optional message left by the customer.
|
|
@@ -43,6 +45,7 @@ interface Cart {
|
|
|
43
45
|
* List of coupons added to the Cart.
|
|
44
46
|
* Currently, only one coupon code is supported.
|
|
45
47
|
* @maxSize 1
|
|
48
|
+
* @readonly
|
|
46
49
|
*/
|
|
47
50
|
coupons?: Coupon[];
|
|
48
51
|
/** Information about the source of the Cart, detailing the origin or context in which the Cart was created. */
|
|
@@ -227,6 +230,7 @@ interface ConvertedMoney {
|
|
|
227
230
|
* Default: `amount`.
|
|
228
231
|
* @format DECIMAL_VALUE
|
|
229
232
|
* @decimalValue options { gte:0, lte:999999999, maxScale:3 }
|
|
233
|
+
* @readonly
|
|
230
234
|
*/
|
|
231
235
|
convertedAmount?: string;
|
|
232
236
|
}
|
|
@@ -446,11 +450,6 @@ interface Image {
|
|
|
446
450
|
* @maxLength 400
|
|
447
451
|
*/
|
|
448
452
|
id?: string;
|
|
449
|
-
/**
|
|
450
|
-
* Image URL.
|
|
451
|
-
* @format WEB_URL
|
|
452
|
-
*/
|
|
453
|
-
url?: string;
|
|
454
453
|
/**
|
|
455
454
|
* Original image height.
|
|
456
455
|
* @readonly
|
|
@@ -2034,7 +2033,6 @@ interface CreateCurrentCartRequest {
|
|
|
2034
2033
|
/**
|
|
2035
2034
|
* Coupons to apply.
|
|
2036
2035
|
* Currently only one is supported.
|
|
2037
|
-
* If the coupon code is invalid, the cart will be created without it.
|
|
2038
2036
|
* @maxSize 1
|
|
2039
2037
|
* @minLength 1
|
|
2040
2038
|
* @maxLength 50
|
|
@@ -2043,7 +2041,6 @@ interface CreateCurrentCartRequest {
|
|
|
2043
2041
|
/**
|
|
2044
2042
|
* Gift cards to add.
|
|
2045
2043
|
* Currently only one is support.
|
|
2046
|
-
* If the gift card code is invalid, the cart will be created without it.
|
|
2047
2044
|
* @maxSize 1
|
|
2048
2045
|
* @minLength 8
|
|
2049
2046
|
* @maxLength 20
|
|
@@ -2118,18 +2115,14 @@ interface CustomItemPricingInfo {
|
|
|
2118
2115
|
/**
|
|
2119
2116
|
* Sale price of a single item, without modifiers.
|
|
2120
2117
|
* Includes tax if `tax_info.prices_include_tax` is true.
|
|
2121
|
-
* @format DECIMAL_VALUE
|
|
2122
|
-
* @decimalValue options { gte:0, lte:1000000000000000, maxScale:3 }
|
|
2123
2118
|
*/
|
|
2124
|
-
price?:
|
|
2119
|
+
price?: ConvertedMoney;
|
|
2125
2120
|
/**
|
|
2126
2121
|
* Full price of a single item before any discounts, without modifiers.
|
|
2127
2122
|
* Defaults to `price` when not provided.
|
|
2128
2123
|
* Includes tax if `tax_info.prices_include_tax` is true.
|
|
2129
|
-
* @format DECIMAL_VALUE
|
|
2130
|
-
* @decimalValue options { gte:0, lte:1000000000000000, maxScale:3 }
|
|
2131
2124
|
*/
|
|
2132
|
-
fullPrice?:
|
|
2125
|
+
fullPrice?: ConvertedMoney;
|
|
2133
2126
|
/**
|
|
2134
2127
|
* Additional description for the price.
|
|
2135
2128
|
* For example, when price is 0 but additional details about the actual price are needed - "Starts at $67".
|
|
@@ -2245,6 +2238,12 @@ interface RefreshCurrentCartResponse {
|
|
|
2245
2238
|
cart?: Cart;
|
|
2246
2239
|
}
|
|
2247
2240
|
interface CalculateCurrentCartRequest {
|
|
2241
|
+
/**
|
|
2242
|
+
* Whether to retrieve the latest item prices, discounts, and inventory data from the catalogs before calculating the cart.
|
|
2243
|
+
*
|
|
2244
|
+
* Default: `false`
|
|
2245
|
+
*/
|
|
2246
|
+
refreshCart?: boolean;
|
|
2248
2247
|
/**
|
|
2249
2248
|
* Specifies the level of **business validation** to perform during cart calculation,
|
|
2250
2249
|
* by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
|
|
@@ -2569,7 +2568,6 @@ interface CreateCartRequest {
|
|
|
2569
2568
|
/**
|
|
2570
2569
|
* Coupons to apply.
|
|
2571
2570
|
* Currently only one is supported.
|
|
2572
|
-
* If the coupon code is invalid, the cart will be created without it.
|
|
2573
2571
|
* @maxSize 1
|
|
2574
2572
|
* @minLength 1
|
|
2575
2573
|
* @maxLength 50
|
|
@@ -2578,7 +2576,6 @@ interface CreateCartRequest {
|
|
|
2578
2576
|
/**
|
|
2579
2577
|
* Gift cards to add.
|
|
2580
2578
|
* Currently only one is support.
|
|
2581
|
-
* If the gift card code is invalid, the cart will be created without it.
|
|
2582
2579
|
* @maxSize 1
|
|
2583
2580
|
* @minLength 8
|
|
2584
2581
|
* @maxLength 20
|
|
@@ -2634,6 +2631,12 @@ interface CalculateCartRequest {
|
|
|
2634
2631
|
* @format GUID
|
|
2635
2632
|
*/
|
|
2636
2633
|
cartId?: string;
|
|
2634
|
+
/**
|
|
2635
|
+
* Whether to retrieve the latest item prices, discounts, and inventory data from the catalogs before calculating the cart.
|
|
2636
|
+
*
|
|
2637
|
+
* Default: `false`
|
|
2638
|
+
*/
|
|
2639
|
+
refreshCart?: boolean;
|
|
2637
2640
|
/**
|
|
2638
2641
|
* Specifies the level of **business validation** to perform during cart calculation,
|
|
2639
2642
|
* by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
|
|
@@ -2737,7 +2740,7 @@ interface PlaceOrderResponse {
|
|
|
2737
2740
|
*/
|
|
2738
2741
|
paymentGatewayOrderId?: string | null;
|
|
2739
2742
|
/** Whether an order was successfully created from this cart and the payment transaction was completed. */
|
|
2740
|
-
|
|
2743
|
+
completed?: boolean;
|
|
2741
2744
|
}
|
|
2742
2745
|
interface AddLineItemsRequest {
|
|
2743
2746
|
/**
|
|
@@ -105,18 +105,10 @@ function createCurrentCart(payload) {
|
|
|
105
105
|
paths: [
|
|
106
106
|
{ path: "cart.createdDate" },
|
|
107
107
|
{ path: "cart.updatedDate" },
|
|
108
|
-
{
|
|
109
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
110
|
-
},
|
|
111
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
112
108
|
{
|
|
113
109
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
114
110
|
},
|
|
115
111
|
{ path: "cart.lineItems.attributes.serviceProperties.scheduledDate" },
|
|
116
|
-
{
|
|
117
|
-
path: "catalogItems.catalogOverrideFields.image.urlExpirationDate"
|
|
118
|
-
},
|
|
119
|
-
{ path: "customItems.attributes.image.urlExpirationDate" },
|
|
120
112
|
{
|
|
121
113
|
path: "customItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
122
114
|
},
|
|
@@ -161,10 +153,6 @@ function createCurrentCart(payload) {
|
|
|
161
153
|
paths: [
|
|
162
154
|
{ path: "cart.createdDate" },
|
|
163
155
|
{ path: "cart.updatedDate" },
|
|
164
|
-
{
|
|
165
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
166
|
-
},
|
|
167
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
168
156
|
{
|
|
169
157
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
170
158
|
},
|
|
@@ -214,10 +202,6 @@ function getCurrentCart(payload) {
|
|
|
214
202
|
paths: [
|
|
215
203
|
{ path: "cart.createdDate" },
|
|
216
204
|
{ path: "cart.updatedDate" },
|
|
217
|
-
{
|
|
218
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
219
|
-
},
|
|
220
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
221
205
|
{
|
|
222
206
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
223
207
|
},
|
|
@@ -257,10 +241,6 @@ function updateCurrentCart(payload) {
|
|
|
257
241
|
paths: [
|
|
258
242
|
{ path: "cart.createdDate" },
|
|
259
243
|
{ path: "cart.updatedDate" },
|
|
260
|
-
{
|
|
261
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
262
|
-
},
|
|
263
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
264
244
|
{
|
|
265
245
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
266
246
|
},
|
|
@@ -301,10 +281,6 @@ function updateCurrentCart(payload) {
|
|
|
301
281
|
paths: [
|
|
302
282
|
{ path: "cart.createdDate" },
|
|
303
283
|
{ path: "cart.updatedDate" },
|
|
304
|
-
{
|
|
305
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
306
|
-
},
|
|
307
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
308
284
|
{
|
|
309
285
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
310
286
|
},
|
|
@@ -375,10 +351,6 @@ function refreshCurrentCart(payload) {
|
|
|
375
351
|
paths: [
|
|
376
352
|
{ path: "cart.createdDate" },
|
|
377
353
|
{ path: "cart.updatedDate" },
|
|
378
|
-
{
|
|
379
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
380
|
-
},
|
|
381
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
382
354
|
{
|
|
383
355
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
384
356
|
},
|
|
@@ -428,10 +400,6 @@ function calculateCurrentCart(payload) {
|
|
|
428
400
|
paths: [
|
|
429
401
|
{ path: "cart.createdDate" },
|
|
430
402
|
{ path: "cart.updatedDate" },
|
|
431
|
-
{
|
|
432
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
433
|
-
},
|
|
434
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
435
403
|
{
|
|
436
404
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
437
405
|
},
|
|
@@ -477,10 +445,6 @@ function addLineItemsToCurrentCart(payload) {
|
|
|
477
445
|
{
|
|
478
446
|
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
479
447
|
paths: [
|
|
480
|
-
{
|
|
481
|
-
path: "catalogItems.catalogOverrideFields.image.urlExpirationDate"
|
|
482
|
-
},
|
|
483
|
-
{ path: "customItems.attributes.image.urlExpirationDate" },
|
|
484
448
|
{
|
|
485
449
|
path: "customItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
486
450
|
},
|
|
@@ -508,10 +472,6 @@ function addLineItemsToCurrentCart(payload) {
|
|
|
508
472
|
paths: [
|
|
509
473
|
{ path: "cart.createdDate" },
|
|
510
474
|
{ path: "cart.updatedDate" },
|
|
511
|
-
{
|
|
512
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
513
|
-
},
|
|
514
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
515
475
|
{
|
|
516
476
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
517
477
|
},
|
|
@@ -561,10 +521,6 @@ function removeLineItemsFromCurrentCart(payload) {
|
|
|
561
521
|
paths: [
|
|
562
522
|
{ path: "cart.createdDate" },
|
|
563
523
|
{ path: "cart.updatedDate" },
|
|
564
|
-
{
|
|
565
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
566
|
-
},
|
|
567
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
568
524
|
{
|
|
569
525
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
570
526
|
},
|
|
@@ -614,10 +570,6 @@ function updateLineItemsInCurrentCart(payload) {
|
|
|
614
570
|
paths: [
|
|
615
571
|
{ path: "cart.createdDate" },
|
|
616
572
|
{ path: "cart.updatedDate" },
|
|
617
|
-
{
|
|
618
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
619
|
-
},
|
|
620
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
621
573
|
{
|
|
622
574
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
623
575
|
},
|
|
@@ -667,10 +619,6 @@ function addCouponToCurrentCart(payload) {
|
|
|
667
619
|
paths: [
|
|
668
620
|
{ path: "cart.createdDate" },
|
|
669
621
|
{ path: "cart.updatedDate" },
|
|
670
|
-
{
|
|
671
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
672
|
-
},
|
|
673
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
674
622
|
{
|
|
675
623
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
676
624
|
},
|
|
@@ -720,10 +668,6 @@ function removeCouponFromCurrentCart(payload) {
|
|
|
720
668
|
paths: [
|
|
721
669
|
{ path: "cart.createdDate" },
|
|
722
670
|
{ path: "cart.updatedDate" },
|
|
723
|
-
{
|
|
724
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
725
|
-
},
|
|
726
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
727
671
|
{
|
|
728
672
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
729
673
|
},
|
|
@@ -773,10 +717,6 @@ function addGiftCardToCurrentCart(payload) {
|
|
|
773
717
|
paths: [
|
|
774
718
|
{ path: "cart.createdDate" },
|
|
775
719
|
{ path: "cart.updatedDate" },
|
|
776
|
-
{
|
|
777
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
778
|
-
},
|
|
779
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
780
720
|
{
|
|
781
721
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
782
722
|
},
|
|
@@ -826,10 +766,6 @@ function removeGiftCardFromCurrentCart(payload) {
|
|
|
826
766
|
paths: [
|
|
827
767
|
{ path: "cart.createdDate" },
|
|
828
768
|
{ path: "cart.updatedDate" },
|
|
829
|
-
{
|
|
830
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
831
|
-
},
|
|
832
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
833
769
|
{
|
|
834
770
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
835
771
|
},
|