@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
@@ -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/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
  },