@wix/auto_sdk_ecom_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.
Files changed (35) hide show
  1. package/build/cjs/index.d.ts +34 -19
  2. package/build/cjs/index.js +2 -68
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.js +2 -68
  5. package/build/cjs/index.typings.js.map +1 -1
  6. package/build/cjs/meta.d.ts +22 -19
  7. package/build/cjs/meta.js +0 -68
  8. package/build/cjs/meta.js.map +1 -1
  9. package/build/es/index.d.mts +34 -19
  10. package/build/es/index.mjs +2 -68
  11. package/build/es/index.mjs.map +1 -1
  12. package/build/es/index.typings.mjs +2 -68
  13. package/build/es/index.typings.mjs.map +1 -1
  14. package/build/es/meta.d.mts +22 -19
  15. package/build/es/meta.mjs +0 -68
  16. package/build/es/meta.mjs.map +1 -1
  17. package/build/internal/cjs/index.d.ts +1 -3
  18. package/build/internal/cjs/index.js +2 -68
  19. package/build/internal/cjs/index.js.map +1 -1
  20. package/build/internal/cjs/index.typings.d.ts +35 -22
  21. package/build/internal/cjs/index.typings.js +2 -68
  22. package/build/internal/cjs/index.typings.js.map +1 -1
  23. package/build/internal/cjs/meta.d.ts +22 -19
  24. package/build/internal/cjs/meta.js +0 -68
  25. package/build/internal/cjs/meta.js.map +1 -1
  26. package/build/internal/es/index.d.mts +1 -3
  27. package/build/internal/es/index.mjs +2 -68
  28. package/build/internal/es/index.mjs.map +1 -1
  29. package/build/internal/es/index.typings.d.mts +35 -22
  30. package/build/internal/es/index.typings.mjs +2 -68
  31. package/build/internal/es/index.typings.mjs.map +1 -1
  32. package/build/internal/es/meta.d.mts +22 -19
  33. package/build/internal/es/meta.mjs +0 -68
  34. package/build/internal/es/meta.mjs.map +1 -1
  35. 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 both valid items (in stock) and invalid ones (e.g., out of stock).
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
- /** The sum of all line item final prices. */
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?: string;
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?: string | null;
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
- cartCompleted?: boolean;
2743
+ completed?: boolean;
2741
2744
  }
2742
2745
  interface AddLineItemsRequest {
2743
2746
  /**
@@ -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
  },