@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.
Files changed (35) hide show
  1. package/build/cjs/index.d.ts +28 -16
  2. package/build/cjs/index.js +2 -64
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.js +2 -64
  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 -64
  8. package/build/cjs/meta.js.map +1 -1
  9. package/build/es/index.d.mts +28 -16
  10. package/build/es/index.mjs +2 -64
  11. package/build/es/index.mjs.map +1 -1
  12. package/build/es/index.typings.mjs +2 -64
  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 -64
  16. package/build/es/meta.mjs.map +1 -1
  17. package/build/internal/cjs/index.d.ts +0 -3
  18. package/build/internal/cjs/index.js +2 -64
  19. package/build/internal/cjs/index.js.map +1 -1
  20. package/build/internal/cjs/index.typings.d.ts +28 -19
  21. package/build/internal/cjs/index.typings.js +2 -64
  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 -64
  25. package/build/internal/cjs/meta.js.map +1 -1
  26. package/build/internal/es/index.d.mts +0 -3
  27. package/build/internal/es/index.mjs +2 -64
  28. package/build/internal/es/index.mjs.map +1 -1
  29. package/build/internal/es/index.typings.d.mts +28 -19
  30. package/build/internal/es/index.typings.mjs +2 -64
  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 -64
  34. package/build/internal/es/meta.mjs.map +1 -1
  35. package/package.json +2 -2
@@ -24,13 +24,15 @@ interface Cart {
24
24
  revision?: string | null;
25
25
  /**
26
26
  * Line items added to the Cart by the customer.
27
- * This list may include both valid items (in stock) and invalid ones (e.g., out of stock).
28
- * When submitting an order, only valid items will be included in the order.
27
+ * This list may include items in stock and invalid out out stock.
29
28
  * @maxSize 300
30
29
  * @readonly
31
30
  */
32
31
  lineItems?: V2LineItem[];
33
- /** The sum of all line item final prices. */
32
+ /**
33
+ * The sum of all line item final prices.
34
+ * @readonly
35
+ */
34
36
  subtotal?: ConvertedMoney;
35
37
  /**
36
38
  * Optional message left by the customer.
@@ -42,6 +44,7 @@ interface Cart {
42
44
  * List of coupons added to the Cart.
43
45
  * Currently, only one coupon code is supported.
44
46
  * @maxSize 1
47
+ * @readonly
45
48
  */
46
49
  coupons?: Coupon[];
47
50
  /** Information about the source of the Cart, detailing the origin or context in which the Cart was created. */
@@ -226,6 +229,7 @@ interface ConvertedMoney {
226
229
  * Default: `amount`.
227
230
  * @format DECIMAL_VALUE
228
231
  * @decimalValue options { gte:0, lte:999999999, maxScale:3 }
232
+ * @readonly
229
233
  */
230
234
  convertedAmount?: string;
231
235
  }
@@ -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
@@ -2033,7 +2032,6 @@ interface CreateCurrentCartRequest {
2033
2032
  /**
2034
2033
  * Coupons to apply.
2035
2034
  * Currently only one is supported.
2036
- * If the coupon code is invalid, the cart will be created without it.
2037
2035
  * @maxSize 1
2038
2036
  * @minLength 1
2039
2037
  * @maxLength 50
@@ -2042,7 +2040,6 @@ interface CreateCurrentCartRequest {
2042
2040
  /**
2043
2041
  * Gift cards to add.
2044
2042
  * Currently only one is support.
2045
- * If the gift card code is invalid, the cart will be created without it.
2046
2043
  * @maxSize 1
2047
2044
  * @minLength 8
2048
2045
  * @maxLength 20
@@ -2117,18 +2114,14 @@ interface CustomItemPricingInfo {
2117
2114
  /**
2118
2115
  * Sale price of a single item, without modifiers.
2119
2116
  * Includes tax if `tax_info.prices_include_tax` is true.
2120
- * @format DECIMAL_VALUE
2121
- * @decimalValue options { gte:0, lte:1000000000000000, maxScale:3 }
2122
2117
  */
2123
- price?: string;
2118
+ price?: ConvertedMoney;
2124
2119
  /**
2125
2120
  * Full price of a single item before any discounts, without modifiers.
2126
2121
  * Defaults to `price` when not provided.
2127
2122
  * Includes tax if `tax_info.prices_include_tax` is true.
2128
- * @format DECIMAL_VALUE
2129
- * @decimalValue options { gte:0, lte:1000000000000000, maxScale:3 }
2130
2123
  */
2131
- fullPrice?: string | null;
2124
+ fullPrice?: ConvertedMoney;
2132
2125
  /**
2133
2126
  * Additional description for the price.
2134
2127
  * For example, when price is 0 but additional details about the actual price are needed - "Starts at $67".
@@ -2244,6 +2237,12 @@ interface RefreshCurrentCartResponse {
2244
2237
  cart?: Cart;
2245
2238
  }
2246
2239
  interface CalculateCurrentCartRequest {
2240
+ /**
2241
+ * Whether to retrieve the latest item prices, discounts, and inventory data from the catalogs before calculating the cart.
2242
+ *
2243
+ * Default: `false`
2244
+ */
2245
+ refreshCart?: boolean;
2247
2246
  /**
2248
2247
  * Specifies the level of **business validation** to perform during cart calculation,
2249
2248
  * by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
@@ -2568,7 +2567,6 @@ interface CreateCartRequest {
2568
2567
  /**
2569
2568
  * Coupons to apply.
2570
2569
  * Currently only one is supported.
2571
- * If the coupon code is invalid, the cart will be created without it.
2572
2570
  * @maxSize 1
2573
2571
  * @minLength 1
2574
2572
  * @maxLength 50
@@ -2577,7 +2575,6 @@ interface CreateCartRequest {
2577
2575
  /**
2578
2576
  * Gift cards to add.
2579
2577
  * Currently only one is support.
2580
- * If the gift card code is invalid, the cart will be created without it.
2581
2578
  * @maxSize 1
2582
2579
  * @minLength 8
2583
2580
  * @maxLength 20
@@ -2633,6 +2630,12 @@ interface CalculateCartRequest {
2633
2630
  * @format GUID
2634
2631
  */
2635
2632
  cartId?: string;
2633
+ /**
2634
+ * Whether to retrieve the latest item prices, discounts, and inventory data from the catalogs before calculating the cart.
2635
+ *
2636
+ * Default: `false`
2637
+ */
2638
+ refreshCart?: boolean;
2636
2639
  /**
2637
2640
  * Specifies the level of **business validation** to perform during cart calculation,
2638
2641
  * by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
@@ -2736,7 +2739,7 @@ interface PlaceOrderResponse {
2736
2739
  */
2737
2740
  paymentGatewayOrderId?: string | null;
2738
2741
  /** Whether an order was successfully created from this cart and the payment transaction was completed. */
2739
- cartCompleted?: boolean;
2742
+ completed?: boolean;
2740
2743
  }
2741
2744
  interface AddLineItemsRequest {
2742
2745
  /**
package/build/es/meta.mjs CHANGED
@@ -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
  },