@wix/auto_sdk_ecom_current-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.
@@ -31,7 +31,10 @@ interface Cart {
31
31
  * @readonly
32
32
  */
33
33
  lineItems?: V2LineItem[];
34
- /** The sum of all line item final prices. */
34
+ /**
35
+ * The sum of all line item final prices.
36
+ * @readonly
37
+ */
35
38
  subtotal?: ConvertedMoney;
36
39
  /**
37
40
  * Optional message left by the customer.
@@ -43,6 +46,7 @@ interface Cart {
43
46
  * List of coupons added to the Cart.
44
47
  * Currently, only one coupon code is supported.
45
48
  * @maxSize 1
49
+ * @readonly
46
50
  */
47
51
  coupons?: Coupon[];
48
52
  /** Information about the source of the Cart, detailing the origin or context in which the Cart was created. */
@@ -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
@@ -2207,8 +2206,10 @@ interface CustomItemPaymentConfig {
2207
2206
  /**
2208
2207
  * Partial payment to be paid upfront during the checkout.
2209
2208
  * Eligible for catalog items with `lineItem.paymentOption` type `DEPOSIT_ONLINE` only.
2209
+ * @format DECIMAL_VALUE
2210
+ * @decimalValue options { gte:0, lte:1000000000000000, maxScale:3 }
2210
2211
  */
2211
- depositAmount?: ConvertedMoney;
2212
+ depositAmount?: string | null;
2212
2213
  /**
2213
2214
  * Type of selected payment option for current item.
2214
2215
  *
@@ -2245,6 +2246,12 @@ interface RefreshCurrentCartResponse {
2245
2246
  cart?: Cart;
2246
2247
  }
2247
2248
  interface CalculateCurrentCartRequest {
2249
+ /**
2250
+ * Whether to retrieve the latest item prices, discounts, and inventory data from the catalogs before calculating the cart.
2251
+ *
2252
+ * Default: `false`
2253
+ */
2254
+ refreshCart?: boolean;
2248
2255
  /**
2249
2256
  * Specifies the level of **business validation** to perform during cart calculation,
2250
2257
  * by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
@@ -2634,6 +2641,12 @@ interface CalculateCartRequest {
2634
2641
  * @format GUID
2635
2642
  */
2636
2643
  cartId?: string;
2644
+ /**
2645
+ * Whether to retrieve the latest item prices, discounts, and inventory data from the catalogs before calculating the cart.
2646
+ *
2647
+ * Default: `false`
2648
+ */
2649
+ refreshCart?: boolean;
2637
2650
  /**
2638
2651
  * Specifies the level of **business validation** to perform during cart calculation,
2639
2652
  * by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
@@ -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
  },