@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
|
/**
|
|
@@ -162,18 +162,10 @@ function createCurrentCart(payload) {
|
|
|
162
162
|
paths: [
|
|
163
163
|
{ path: "cart.createdDate" },
|
|
164
164
|
{ path: "cart.updatedDate" },
|
|
165
|
-
{
|
|
166
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
167
|
-
},
|
|
168
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
169
165
|
{
|
|
170
166
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
171
167
|
},
|
|
172
168
|
{ path: "cart.lineItems.attributes.serviceProperties.scheduledDate" },
|
|
173
|
-
{
|
|
174
|
-
path: "catalogItems.catalogOverrideFields.image.urlExpirationDate"
|
|
175
|
-
},
|
|
176
|
-
{ path: "customItems.attributes.image.urlExpirationDate" },
|
|
177
169
|
{
|
|
178
170
|
path: "customItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
179
171
|
},
|
|
@@ -218,10 +210,6 @@ function createCurrentCart(payload) {
|
|
|
218
210
|
paths: [
|
|
219
211
|
{ path: "cart.createdDate" },
|
|
220
212
|
{ path: "cart.updatedDate" },
|
|
221
|
-
{
|
|
222
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
223
|
-
},
|
|
224
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
225
213
|
{
|
|
226
214
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
227
215
|
},
|
|
@@ -271,10 +259,6 @@ function getCurrentCart(payload) {
|
|
|
271
259
|
paths: [
|
|
272
260
|
{ path: "cart.createdDate" },
|
|
273
261
|
{ path: "cart.updatedDate" },
|
|
274
|
-
{
|
|
275
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
276
|
-
},
|
|
277
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
278
262
|
{
|
|
279
263
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
280
264
|
},
|
|
@@ -314,10 +298,6 @@ function updateCurrentCart(payload) {
|
|
|
314
298
|
paths: [
|
|
315
299
|
{ path: "cart.createdDate" },
|
|
316
300
|
{ path: "cart.updatedDate" },
|
|
317
|
-
{
|
|
318
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
319
|
-
},
|
|
320
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
321
301
|
{
|
|
322
302
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
323
303
|
},
|
|
@@ -358,10 +338,6 @@ function updateCurrentCart(payload) {
|
|
|
358
338
|
paths: [
|
|
359
339
|
{ path: "cart.createdDate" },
|
|
360
340
|
{ path: "cart.updatedDate" },
|
|
361
|
-
{
|
|
362
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
363
|
-
},
|
|
364
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
365
341
|
{
|
|
366
342
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
367
343
|
},
|
|
@@ -432,10 +408,6 @@ function refreshCurrentCart(payload) {
|
|
|
432
408
|
paths: [
|
|
433
409
|
{ path: "cart.createdDate" },
|
|
434
410
|
{ path: "cart.updatedDate" },
|
|
435
|
-
{
|
|
436
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
437
|
-
},
|
|
438
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
439
411
|
{
|
|
440
412
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
441
413
|
},
|
|
@@ -485,10 +457,6 @@ function calculateCurrentCart(payload) {
|
|
|
485
457
|
paths: [
|
|
486
458
|
{ path: "cart.createdDate" },
|
|
487
459
|
{ path: "cart.updatedDate" },
|
|
488
|
-
{
|
|
489
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
490
|
-
},
|
|
491
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
492
460
|
{
|
|
493
461
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
494
462
|
},
|
|
@@ -534,10 +502,6 @@ function addLineItemsToCurrentCart(payload) {
|
|
|
534
502
|
{
|
|
535
503
|
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
536
504
|
paths: [
|
|
537
|
-
{
|
|
538
|
-
path: "catalogItems.catalogOverrideFields.image.urlExpirationDate"
|
|
539
|
-
},
|
|
540
|
-
{ path: "customItems.attributes.image.urlExpirationDate" },
|
|
541
505
|
{
|
|
542
506
|
path: "customItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
543
507
|
},
|
|
@@ -565,10 +529,6 @@ function addLineItemsToCurrentCart(payload) {
|
|
|
565
529
|
paths: [
|
|
566
530
|
{ path: "cart.createdDate" },
|
|
567
531
|
{ path: "cart.updatedDate" },
|
|
568
|
-
{
|
|
569
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
570
|
-
},
|
|
571
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
572
532
|
{
|
|
573
533
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
574
534
|
},
|
|
@@ -618,10 +578,6 @@ function removeLineItemsFromCurrentCart(payload) {
|
|
|
618
578
|
paths: [
|
|
619
579
|
{ path: "cart.createdDate" },
|
|
620
580
|
{ path: "cart.updatedDate" },
|
|
621
|
-
{
|
|
622
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
623
|
-
},
|
|
624
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
625
581
|
{
|
|
626
582
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
627
583
|
},
|
|
@@ -671,10 +627,6 @@ function updateLineItemsInCurrentCart(payload) {
|
|
|
671
627
|
paths: [
|
|
672
628
|
{ path: "cart.createdDate" },
|
|
673
629
|
{ path: "cart.updatedDate" },
|
|
674
|
-
{
|
|
675
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
676
|
-
},
|
|
677
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
678
630
|
{
|
|
679
631
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
680
632
|
},
|
|
@@ -724,10 +676,6 @@ function addCouponToCurrentCart(payload) {
|
|
|
724
676
|
paths: [
|
|
725
677
|
{ path: "cart.createdDate" },
|
|
726
678
|
{ path: "cart.updatedDate" },
|
|
727
|
-
{
|
|
728
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
729
|
-
},
|
|
730
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
731
679
|
{
|
|
732
680
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
733
681
|
},
|
|
@@ -777,10 +725,6 @@ function removeCouponFromCurrentCart(payload) {
|
|
|
777
725
|
paths: [
|
|
778
726
|
{ path: "cart.createdDate" },
|
|
779
727
|
{ path: "cart.updatedDate" },
|
|
780
|
-
{
|
|
781
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
782
|
-
},
|
|
783
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
784
728
|
{
|
|
785
729
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
786
730
|
},
|
|
@@ -830,10 +774,6 @@ function addGiftCardToCurrentCart(payload) {
|
|
|
830
774
|
paths: [
|
|
831
775
|
{ path: "cart.createdDate" },
|
|
832
776
|
{ path: "cart.updatedDate" },
|
|
833
|
-
{
|
|
834
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
835
|
-
},
|
|
836
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
837
777
|
{
|
|
838
778
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
839
779
|
},
|
|
@@ -883,10 +823,6 @@ function removeGiftCardFromCurrentCart(payload) {
|
|
|
883
823
|
paths: [
|
|
884
824
|
{ path: "cart.createdDate" },
|
|
885
825
|
{ path: "cart.updatedDate" },
|
|
886
|
-
{
|
|
887
|
-
path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
|
|
888
|
-
},
|
|
889
|
-
{ path: "cart.lineItems.attributes.image.urlExpirationDate" },
|
|
890
826
|
{
|
|
891
827
|
path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
|
|
892
828
|
},
|