@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.
@@ -30,7 +30,10 @@ interface Cart {
30
30
  * @readonly
31
31
  */
32
32
  lineItems?: V2LineItem[];
33
- /** The sum of all line item final prices. */
33
+ /**
34
+ * The sum of all line item final prices.
35
+ * @readonly
36
+ */
34
37
  subtotal?: ConvertedMoney;
35
38
  /**
36
39
  * Optional message left by the customer.
@@ -42,6 +45,7 @@ interface Cart {
42
45
  * List of coupons added to the Cart.
43
46
  * Currently, only one coupon code is supported.
44
47
  * @maxSize 1
48
+ * @readonly
45
49
  */
46
50
  coupons?: Coupon[];
47
51
  /** Information about the source of the Cart, detailing the origin or context in which the Cart was created. */
@@ -445,11 +449,6 @@ interface Image {
445
449
  * @maxLength 400
446
450
  */
447
451
  id?: string;
448
- /**
449
- * Image URL.
450
- * @format WEB_URL
451
- */
452
- url?: string;
453
452
  /**
454
453
  * Original image height.
455
454
  * @readonly
@@ -2206,8 +2205,10 @@ interface CustomItemPaymentConfig {
2206
2205
  /**
2207
2206
  * Partial payment to be paid upfront during the checkout.
2208
2207
  * Eligible for catalog items with `lineItem.paymentOption` type `DEPOSIT_ONLINE` only.
2208
+ * @format DECIMAL_VALUE
2209
+ * @decimalValue options { gte:0, lte:1000000000000000, maxScale:3 }
2209
2210
  */
2210
- depositAmount?: ConvertedMoney;
2211
+ depositAmount?: string | null;
2211
2212
  /**
2212
2213
  * Type of selected payment option for current item.
2213
2214
  *
@@ -2244,6 +2245,12 @@ interface RefreshCurrentCartResponse {
2244
2245
  cart?: Cart;
2245
2246
  }
2246
2247
  interface CalculateCurrentCartRequest {
2248
+ /**
2249
+ * Whether to retrieve the latest item prices, discounts, and inventory data from the catalogs before calculating the cart.
2250
+ *
2251
+ * Default: `false`
2252
+ */
2253
+ refreshCart?: boolean;
2247
2254
  /**
2248
2255
  * Specifies the level of **business validation** to perform during cart calculation,
2249
2256
  * by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
@@ -2633,6 +2640,12 @@ interface CalculateCartRequest {
2633
2640
  * @format GUID
2634
2641
  */
2635
2642
  cartId: string;
2643
+ /**
2644
+ * Whether to retrieve the latest item prices, discounts, and inventory data from the catalogs before calculating the cart.
2645
+ *
2646
+ * Default: `false`
2647
+ */
2648
+ refreshCart?: boolean;
2636
2649
  /**
2637
2650
  * Specifies the level of **business validation** to perform during cart calculation,
2638
2651
  * by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
package/build/cjs/meta.js CHANGED
@@ -167,18 +167,10 @@ function createCart(payload) {
167
167
  paths: [
168
168
  { path: "cart.createdDate" },
169
169
  { path: "cart.updatedDate" },
170
- {
171
- path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
172
- },
173
- { path: "cart.lineItems.attributes.image.urlExpirationDate" },
174
170
  {
175
171
  path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
176
172
  },
177
173
  { path: "cart.lineItems.attributes.serviceProperties.scheduledDate" },
178
- {
179
- path: "catalogItems.catalogOverrideFields.image.urlExpirationDate"
180
- },
181
- { path: "customItems.attributes.image.urlExpirationDate" },
182
174
  {
183
175
  path: "customItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
184
176
  },
@@ -223,10 +215,6 @@ function createCart(payload) {
223
215
  paths: [
224
216
  { path: "cart.createdDate" },
225
217
  { path: "cart.updatedDate" },
226
- {
227
- path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
228
- },
229
- { path: "cart.lineItems.attributes.image.urlExpirationDate" },
230
218
  {
231
219
  path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
232
220
  },
@@ -276,10 +264,6 @@ function getCart(payload) {
276
264
  paths: [
277
265
  { path: "cart.createdDate" },
278
266
  { path: "cart.updatedDate" },
279
- {
280
- path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
281
- },
282
- { path: "cart.lineItems.attributes.image.urlExpirationDate" },
283
267
  {
284
268
  path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
285
269
  },
@@ -319,10 +303,6 @@ function updateCart(payload) {
319
303
  paths: [
320
304
  { path: "cart.createdDate" },
321
305
  { path: "cart.updatedDate" },
322
- {
323
- path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
324
- },
325
- { path: "cart.lineItems.attributes.image.urlExpirationDate" },
326
306
  {
327
307
  path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
328
308
  },
@@ -363,10 +343,6 @@ function updateCart(payload) {
363
343
  paths: [
364
344
  { path: "cart.createdDate" },
365
345
  { path: "cart.updatedDate" },
366
- {
367
- path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
368
- },
369
- { path: "cart.lineItems.attributes.image.urlExpirationDate" },
370
346
  {
371
347
  path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
372
348
  },
@@ -437,10 +413,6 @@ function refreshCart(payload) {
437
413
  paths: [
438
414
  { path: "cart.createdDate" },
439
415
  { path: "cart.updatedDate" },
440
- {
441
- path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
442
- },
443
- { path: "cart.lineItems.attributes.image.urlExpirationDate" },
444
416
  {
445
417
  path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
446
418
  },
@@ -490,10 +462,6 @@ function calculateCart(payload) {
490
462
  paths: [
491
463
  { path: "cart.createdDate" },
492
464
  { path: "cart.updatedDate" },
493
- {
494
- path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
495
- },
496
- { path: "cart.lineItems.attributes.image.urlExpirationDate" },
497
465
  {
498
466
  path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
499
467
  },
@@ -581,10 +549,6 @@ function addLineItems(payload) {
581
549
  {
582
550
  transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
583
551
  paths: [
584
- {
585
- path: "catalogItems.catalogOverrideFields.image.urlExpirationDate"
586
- },
587
- { path: "customItems.attributes.image.urlExpirationDate" },
588
552
  {
589
553
  path: "customItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
590
554
  },
@@ -612,10 +576,6 @@ function addLineItems(payload) {
612
576
  paths: [
613
577
  { path: "cart.createdDate" },
614
578
  { path: "cart.updatedDate" },
615
- {
616
- path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
617
- },
618
- { path: "cart.lineItems.attributes.image.urlExpirationDate" },
619
579
  {
620
580
  path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
621
581
  },
@@ -665,10 +625,6 @@ function removeLineItems(payload) {
665
625
  paths: [
666
626
  { path: "cart.createdDate" },
667
627
  { path: "cart.updatedDate" },
668
- {
669
- path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
670
- },
671
- { path: "cart.lineItems.attributes.image.urlExpirationDate" },
672
628
  {
673
629
  path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
674
630
  },
@@ -718,10 +674,6 @@ function updateLineItems(payload) {
718
674
  paths: [
719
675
  { path: "cart.createdDate" },
720
676
  { path: "cart.updatedDate" },
721
- {
722
- path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
723
- },
724
- { path: "cart.lineItems.attributes.image.urlExpirationDate" },
725
677
  {
726
678
  path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
727
679
  },
@@ -771,10 +723,6 @@ function addCoupon(payload) {
771
723
  paths: [
772
724
  { path: "cart.createdDate" },
773
725
  { path: "cart.updatedDate" },
774
- {
775
- path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
776
- },
777
- { path: "cart.lineItems.attributes.image.urlExpirationDate" },
778
726
  {
779
727
  path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
780
728
  },
@@ -824,10 +772,6 @@ function removeCoupon(payload) {
824
772
  paths: [
825
773
  { path: "cart.createdDate" },
826
774
  { path: "cart.updatedDate" },
827
- {
828
- path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
829
- },
830
- { path: "cart.lineItems.attributes.image.urlExpirationDate" },
831
775
  {
832
776
  path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
833
777
  },
@@ -877,10 +821,6 @@ function addGiftCard(payload) {
877
821
  paths: [
878
822
  { path: "cart.createdDate" },
879
823
  { path: "cart.updatedDate" },
880
- {
881
- path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
882
- },
883
- { path: "cart.lineItems.attributes.image.urlExpirationDate" },
884
824
  {
885
825
  path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
886
826
  },
@@ -930,10 +870,6 @@ function removeGiftCard(payload) {
930
870
  paths: [
931
871
  { path: "cart.createdDate" },
932
872
  { path: "cart.updatedDate" },
933
- {
934
- path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
935
- },
936
- { path: "cart.lineItems.attributes.image.urlExpirationDate" },
937
873
  {
938
874
  path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
939
875
  },
@@ -983,10 +919,6 @@ function markCartAsCompleted(payload) {
983
919
  paths: [
984
920
  { path: "cart.createdDate" },
985
921
  { path: "cart.updatedDate" },
986
- {
987
- path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
988
- },
989
- { path: "cart.lineItems.attributes.image.urlExpirationDate" },
990
922
  {
991
923
  path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
992
924
  },