@wix/auto_sdk_ecom_cart 1.0.3 → 1.0.4

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 (41) hide show
  1. package/build/cjs/src/ecom-v1-cart-cart.http.d.ts +7 -12
  2. package/build/cjs/src/ecom-v1-cart-cart.http.js +13 -12
  3. package/build/cjs/src/ecom-v1-cart-cart.http.js.map +1 -1
  4. package/build/cjs/src/ecom-v1-cart-cart.public.d.ts +7 -12
  5. package/build/cjs/src/ecom-v1-cart-cart.public.js.map +1 -1
  6. package/build/cjs/src/ecom-v1-cart-cart.types.d.ts +652 -144
  7. package/build/cjs/src/ecom-v1-cart-cart.types.js.map +1 -1
  8. package/build/cjs/src/ecom-v1-cart-cart.universal.d.ts +753 -168
  9. package/build/cjs/src/ecom-v1-cart-cart.universal.js +32 -15
  10. package/build/cjs/src/ecom-v1-cart-cart.universal.js.map +1 -1
  11. package/build/es/src/ecom-v1-cart-cart.http.d.ts +7 -12
  12. package/build/es/src/ecom-v1-cart-cart.http.js +13 -12
  13. package/build/es/src/ecom-v1-cart-cart.http.js.map +1 -1
  14. package/build/es/src/ecom-v1-cart-cart.public.d.ts +7 -12
  15. package/build/es/src/ecom-v1-cart-cart.public.js.map +1 -1
  16. package/build/es/src/ecom-v1-cart-cart.types.d.ts +652 -144
  17. package/build/es/src/ecom-v1-cart-cart.types.js.map +1 -1
  18. package/build/es/src/ecom-v1-cart-cart.universal.d.ts +753 -168
  19. package/build/es/src/ecom-v1-cart-cart.universal.js +32 -15
  20. package/build/es/src/ecom-v1-cart-cart.universal.js.map +1 -1
  21. package/build/internal/cjs/src/ecom-v1-cart-cart.http.d.ts +7 -12
  22. package/build/internal/cjs/src/ecom-v1-cart-cart.http.js +13 -12
  23. package/build/internal/cjs/src/ecom-v1-cart-cart.http.js.map +1 -1
  24. package/build/internal/cjs/src/ecom-v1-cart-cart.public.d.ts +7 -12
  25. package/build/internal/cjs/src/ecom-v1-cart-cart.public.js.map +1 -1
  26. package/build/internal/cjs/src/ecom-v1-cart-cart.types.d.ts +652 -144
  27. package/build/internal/cjs/src/ecom-v1-cart-cart.types.js.map +1 -1
  28. package/build/internal/cjs/src/ecom-v1-cart-cart.universal.d.ts +760 -173
  29. package/build/internal/cjs/src/ecom-v1-cart-cart.universal.js +32 -15
  30. package/build/internal/cjs/src/ecom-v1-cart-cart.universal.js.map +1 -1
  31. package/build/internal/es/src/ecom-v1-cart-cart.http.d.ts +7 -12
  32. package/build/internal/es/src/ecom-v1-cart-cart.http.js +13 -12
  33. package/build/internal/es/src/ecom-v1-cart-cart.http.js.map +1 -1
  34. package/build/internal/es/src/ecom-v1-cart-cart.public.d.ts +7 -12
  35. package/build/internal/es/src/ecom-v1-cart-cart.public.js.map +1 -1
  36. package/build/internal/es/src/ecom-v1-cart-cart.types.d.ts +652 -144
  37. package/build/internal/es/src/ecom-v1-cart-cart.types.js.map +1 -1
  38. package/build/internal/es/src/ecom-v1-cart-cart.universal.d.ts +760 -173
  39. package/build/internal/es/src/ecom-v1-cart-cart.universal.js +32 -15
  40. package/build/internal/es/src/ecom-v1-cart-cart.universal.js.map +1 -1
  41. package/package.json +2 -2
@@ -1,17 +1,26 @@
1
1
  export interface Cart {
2
- /** Cart ID. */
2
+ /**
3
+ * Cart ID.
4
+ * @format GUID
5
+ */
3
6
  _id?: string | null;
4
7
  /**
5
8
  * Line items.
9
+ * @minSize 1
10
+ * @maxSize 300
6
11
  * @readonly
7
12
  */
8
13
  lineItems?: LineItem[];
9
- /** [Buyer note](https://support.wix.com/en/article/wix-stores-viewing-buyer-notes) left by the customer. */
14
+ /**
15
+ * [Buyer note](https://support.wix.com/en/article/wix-stores-viewing-buyer-notes) left by the customer.
16
+ * @maxLength 1000
17
+ */
10
18
  buyerNote?: string | null;
11
19
  /** Buyer information. */
12
20
  buyerInfo?: BuyerInfo;
13
21
  /**
14
22
  * Currency used for pricing.
23
+ * @format CURRENCY
15
24
  * @readonly
16
25
  */
17
26
  currency?: string;
@@ -19,6 +28,7 @@ export interface Cart {
19
28
  * Currency code used for all the converted prices that are returned.
20
29
  * For a site that supports multiple currencies, this is the currency the buyer selected.
21
30
  * @readonly
31
+ * @format CURRENCY
22
32
  */
23
33
  conversionCurrency?: string;
24
34
  /**
@@ -45,6 +55,7 @@ export interface Cart {
45
55
  /**
46
56
  * ID of the checkout that originated from this cart.
47
57
  * @readonly
58
+ * @format GUID
48
59
  */
49
60
  checkoutId?: string | null;
50
61
  /**
@@ -68,10 +79,12 @@ export interface Cart {
68
79
  * `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page.
69
80
  *
70
81
  * This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
82
+ * @maxLength 1000
71
83
  */
72
84
  overrideCheckoutUrl?: string | null;
73
85
  /**
74
86
  * Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.
87
+ * @format GUID
75
88
  * @readonly
76
89
  */
77
90
  purchaseFlowId?: string | null;
@@ -80,16 +93,22 @@ export interface Cart {
80
93
  /**
81
94
  * The business location ID associated with the cart.
82
95
  * Learn more about the [Locations API](https://dev.wix.com/docs/rest/business-management/locations/introduction).
96
+ * @format GUID
83
97
  */
84
98
  businessLocationId?: string | null;
85
99
  }
86
100
  export interface LineItem {
87
101
  /**
88
102
  * Line item ID.
103
+ * @format GUID
89
104
  * @readonly
90
105
  */
91
106
  _id?: string | null;
92
- /** Item quantity. */
107
+ /**
108
+ * Item quantity.
109
+ * @min 1
110
+ * @max 100000
111
+ */
93
112
  quantity?: number;
94
113
  /** Catalog and item reference. Holds IDs for the item and the catalog it came from, as well as further optional info. Optional for custom line items, which don't trigger the Catalog service plugin. */
95
114
  catalogReference?: CatalogReference;
@@ -170,6 +189,8 @@ export interface LineItem {
170
189
  * + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID.
171
190
  * + in most cases, this field is the same as `catalogReference.catalogItemId`.
172
191
  * + Used in membership validation.
192
+ * @minLength 1
193
+ * @maxLength 36
173
194
  * @readonly
174
195
  */
175
196
  rootCatalogItemId?: string | null;
@@ -186,13 +207,14 @@ export interface LineItem {
186
207
  /** Selected membership to be used as payment for this item. Must be used with `lineItem.paymentOption` set to `MEMBERSHIP` or `MEMBERSHIP_OFFLINE`. This field can be empty when `lineItem.paymentOption` is set to `MEMBERSHIP_OFFLINE`. */
187
208
  selectedMembership?: SelectedMembership;
188
209
  /**
189
- * The Item's Delivery Profile Id
190
- * @internal
210
+ * Delivery profile ID.
211
+ * @format GUID
191
212
  * @readonly
192
213
  */
193
214
  deliveryProfileId?: string | null;
194
215
  /**
195
216
  * Tax group ID for this line item.
217
+ * @format GUID
196
218
  * @readonly
197
219
  */
198
220
  taxGroupId?: string | null;
@@ -203,6 +225,8 @@ export interface LineItem {
203
225
  customLineItem?: boolean;
204
226
  /**
205
227
  * Item payment policy that requires customer consent to complete purchase. The payment policy will be displayed on the checkout page.
228
+ * @minLength 1
229
+ * @maxLength 2500
206
230
  * @readonly
207
231
  */
208
232
  consentRequiredPaymentPolicy?: string | null;
@@ -233,7 +257,7 @@ export interface LineItem {
233
257
  */
234
258
  savePaymentMethod?: boolean;
235
259
  /**
236
- * Address to be used for tax calculation.
260
+ * Address to use for tax calculation purposes.
237
261
  * @internal
238
262
  */
239
263
  taxableAddress?: TaxableAddress;
@@ -248,11 +272,13 @@ export interface LineItem {
248
272
  * Policies to be displayed to the customer on the checkout page.
249
273
  * @internal
250
274
  * @readonly
275
+ * @maxSize 5
251
276
  */
252
277
  policies?: Policy[];
253
278
  /**
254
279
  * ID of the app managing the inventory.
255
280
  * @internal
281
+ * @format GUID
256
282
  */
257
283
  inventoryAppId?: string | null;
258
284
  /**
@@ -266,7 +292,11 @@ export interface LineItem {
266
292
  }
267
293
  /** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
268
294
  export interface CatalogReference {
269
- /** ID of the item within the catalog it belongs to. */
295
+ /**
296
+ * ID of the item within the catalog it belongs to.
297
+ * @minLength 1
298
+ * @maxLength 36
299
+ */
270
300
  catalogItemId?: string;
271
301
  /**
272
302
  * ID of the app providing the catalog.
@@ -277,6 +307,7 @@ export interface CatalogReference {
277
307
  * + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`
278
308
  * + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
279
309
  * + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`
310
+ * @minLength 1
280
311
  */
281
312
  appId?: string;
282
313
  /**
@@ -289,17 +320,29 @@ export interface CatalogReference {
289
320
  options?: Record<string, any> | null;
290
321
  }
291
322
  export interface ProductName {
292
- /** **Required** - Original product name (in site's default language). */
323
+ /**
324
+ * **Required** - Original product name (in site's default language).
325
+ * @minLength 1
326
+ * @maxLength 200
327
+ */
293
328
  original?: string;
294
- /** Description product name translated into buyer's language. Defaults to `original` when not defined. */
329
+ /**
330
+ * Description product name translated into buyer's language. Defaults to `original` when not defined.
331
+ * @minLength 1
332
+ * @maxLength 400
333
+ */
295
334
  translated?: string | null;
296
335
  }
297
336
  export interface MultiCurrencyPrice {
298
- /** Amount. */
337
+ /**
338
+ * Amount.
339
+ * @decimalValue options { gte:0, lte:1000000000000000 }
340
+ */
299
341
  amount?: string;
300
342
  /**
301
343
  * Converted amount.
302
344
  * @readonly
345
+ * @decimalValue options { gte:0, lte:1000000000000000 }
303
346
  */
304
347
  convertedAmount?: string;
305
348
  /**
@@ -332,21 +375,39 @@ export interface DescriptionLineValueOneOf {
332
375
  export interface DescriptionLineDescriptionLineValueOneOf {
333
376
  }
334
377
  export interface DescriptionLineName {
335
- /** Description line name in site's default language. */
378
+ /**
379
+ * Description line name in site's default language.
380
+ * @maxLength 100
381
+ */
336
382
  original?: string;
337
- /** Description line name translated into buyer's language. Defaults to `original` when not defined. */
383
+ /**
384
+ * Description line name translated into buyer's language. Defaults to `original` when not defined.
385
+ * @maxLength 200
386
+ */
338
387
  translated?: string | null;
339
388
  }
340
389
  export interface PlainTextValue {
341
- /** Description line plain text value in site's default language. */
390
+ /**
391
+ * Description line plain text value in site's default language.
392
+ * @maxLength 600
393
+ */
342
394
  original?: string;
343
- /** Description line plain text value translated into buyer's language. Defaults to `original` when not defined. */
395
+ /**
396
+ * Description line plain text value translated into buyer's language. Defaults to `original` when not defined.
397
+ * @maxLength 600
398
+ */
344
399
  translated?: string | null;
345
400
  }
346
401
  export interface Color {
347
- /** Description line color name in site's default language. */
402
+ /**
403
+ * Description line color name in site's default language.
404
+ * @maxLength 500
405
+ */
348
406
  original?: string;
349
- /** Description line color name translated into buyer's language. Defaults to `original` when not defined. */
407
+ /**
408
+ * Description line color name translated into buyer's language. Defaults to `original` when not defined.
409
+ * @maxLength 500
410
+ */
350
411
  translated?: string | null;
351
412
  /**
352
413
  * HEX or RGB color code for display.
@@ -396,7 +457,10 @@ export declare enum ItemAvailabilityStatus {
396
457
  export interface PhysicalProperties {
397
458
  /** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */
398
459
  weight?: number | null;
399
- /** Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku). */
460
+ /**
461
+ * Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku).
462
+ * @maxLength 40
463
+ */
400
464
  sku?: string | null;
401
465
  /** Whether this line item is shippable. */
402
466
  shippable?: boolean;
@@ -449,11 +513,16 @@ export interface SubscriptionSettings {
449
513
  *
450
514
  * Default: `1`.
451
515
  * If SubscriptionFrequency is Day the minimum interval is 7
516
+ * @min 1
517
+ * @max 50
452
518
  */
453
519
  interval?: number | null;
454
520
  /** Whether subscription is renewed automatically at the end of each period. */
455
521
  autoRenewal?: boolean;
456
- /** Number of billing cycles before subscription ends. Ignored if `autoRenewal` is `true`. */
522
+ /**
523
+ * Number of billing cycles before subscription ends. Ignored if `autoRenewal` is `true`.
524
+ * @min 1
525
+ */
457
526
  billingCycles?: number | null;
458
527
  /**
459
528
  * Whether to allow the customer to cancel the subscription..
@@ -483,29 +552,53 @@ export declare enum SubscriptionFrequency {
483
552
  export interface FreeTrialPeriod {
484
553
  /** Frequency of priod. Values: DAY, WEEK, MONTH, YEAR */
485
554
  frequency?: SubscriptionFrequency;
486
- /** interval of period */
555
+ /**
556
+ * interval of period
557
+ * @min 1
558
+ * @max 50
559
+ */
487
560
  interval?: number;
488
561
  }
489
562
  export interface Title {
490
- /** Subscription option name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope). */
563
+ /**
564
+ * Subscription option name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).
565
+ * @minLength 1
566
+ * @maxLength 150
567
+ */
491
568
  original?: string;
492
569
  /**
493
570
  * Subscription option name translated into the buyer's language.
494
571
  *
495
572
  * Default: Same as `original`.
573
+ * @minLength 1
574
+ * @maxLength 150
496
575
  */
497
576
  translated?: string | null;
498
577
  }
499
578
  export interface Description {
500
- /** Subscription option description. */
579
+ /**
580
+ * Subscription option description.
581
+ * @maxLength 500
582
+ */
501
583
  original?: string;
502
- /** Translated subscription option description. */
584
+ /**
585
+ * Translated subscription option description.
586
+ * @maxLength 500
587
+ */
503
588
  translated?: string | null;
504
589
  }
505
590
  export interface SecuredMedia {
506
- /** Media ID in Wix Media Manager. */
591
+ /**
592
+ * Media ID in Wix Media Manager.
593
+ * @minLength 1
594
+ * @maxLength 100
595
+ */
507
596
  _id?: string;
508
- /** Original filename. */
597
+ /**
598
+ * Original filename.
599
+ * @minLength 1
600
+ * @maxLength 1000
601
+ */
509
602
  fileName?: string;
510
603
  /** File type. */
511
604
  fileType?: FileType;
@@ -534,33 +627,59 @@ export declare enum PaymentOptionType {
534
627
  export interface ServiceProperties {
535
628
  /** The date and time for which the service is supposed to be provided. For example, the time of the class. */
536
629
  scheduledDate?: Date | null;
537
- /** The number of people participating in this service. For example, the number of people attending the class or the number of people per hotel room. */
630
+ /**
631
+ * The number of people participating in this service. For example, the number of people attending the class or the number of people per hotel room.
632
+ * @min 1
633
+ * @max 10000
634
+ */
538
635
  numberOfParticipants?: number | null;
539
636
  }
540
637
  export interface PriceDescription {
541
638
  /**
542
639
  * **Required** - Original price description (in site's default language).
543
640
  *
641
+ * @minLength 1
642
+ * @maxLength 100
544
643
  */
545
644
  original?: string;
546
- /** Product name translated into buyer's language. Defaults to `original` when not defined. */
645
+ /**
646
+ * Product name translated into buyer's language. Defaults to `original` when not defined.
647
+ * @minLength 1
648
+ * @maxLength 100
649
+ */
547
650
  translated?: string | null;
548
651
  }
549
652
  /** Selected Membership */
550
653
  export interface SelectedMembership {
551
- /** Membership ID. */
654
+ /**
655
+ * Membership ID.
656
+ * @minLength 1
657
+ * @maxLength 100
658
+ */
552
659
  _id?: string;
553
- /** ID of the app providing this payment option. */
660
+ /**
661
+ * ID of the app providing this payment option.
662
+ * @format GUID
663
+ */
554
664
  appId?: string;
555
665
  }
556
666
  export interface CatalogOverrideFields {
557
667
  /** Item name. */
558
668
  productName?: ProductName;
559
- /** Item price **after** discounts. */
669
+ /**
670
+ * Item price **after** discounts.
671
+ * @decimalValue options { gte:0, lte:999999999, maxScale:3 }
672
+ */
560
673
  price?: string | null;
561
- /** Item price **before** discounts. */
674
+ /**
675
+ * Item price **before** discounts.
676
+ * @decimalValue options { gte:0, lte:999999999, maxScale:3 }
677
+ */
562
678
  fullPrice?: string | null;
563
- /** Item description lines. Used when displaying the line item to customers. */
679
+ /**
680
+ * Item description lines. Used when displaying the line item to customers.
681
+ * @maxSize 20
682
+ */
564
683
  descriptionLines?: DescriptionLine[];
565
684
  /** Physical properties of the item. */
566
685
  physicalProperties?: PhysicalProperties;
@@ -568,7 +687,11 @@ export interface CatalogOverrideFields {
568
687
  image?: string;
569
688
  /** Payment method selected for the item. */
570
689
  paymentOption?: PaymentOption;
571
- /** Only eligible for catalog items with `lineItem.paymentOption.value` type of `DEPOSIT_ONLINE`. */
690
+ /**
691
+ * Only eligible for catalog items with `lineItem.paymentOption.value` type of `DEPOSIT_ONLINE`.
692
+ * @format DECIMAL_VALUE
693
+ * @decimalValue options { gt:0, lte:999999999, maxScale:3 }
694
+ */
572
695
  depositAmount?: string | null;
573
696
  /**
574
697
  * Whether to save the payment method on the order.
@@ -579,11 +702,9 @@ export interface CatalogOverrideFields {
579
702
  }
580
703
  export interface PaymentOption {
581
704
  /**
582
- * + `FULL_PAYMENT_ONLINE`: The entire payment for this item happens as part of the checkout.
583
- * + `FULL_PAYMENT_OFFLINE`: The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods.
584
- * + `MEMBERSHIP`: Payment for this item is done by charging a membership. When selected, `price` is `0`.
585
- * + `DEPOSIT_ONLINE`: Partial payment to be paid upfront during the checkout. Initial amount to be paid for each line item is specified in `depositAmount`.
586
- * + `MEMBERSHIP_OFFLINE`: Payment for this item can only be done by charging a membership and must be manually redeemed in the dashboard by the site admin. When selected, `price` is `0`.
705
+ * Type of selected payment option for current item.
706
+ *
707
+ * Default: `FULL_PAYMENT_ONLINE`
587
708
  */
588
709
  value?: PaymentOptionType;
589
710
  }
@@ -614,47 +735,67 @@ export interface ExtendedFields {
614
735
  namespaces?: Record<string, Record<string, any>>;
615
736
  }
616
737
  export interface Policy {
617
- /** Policy title - should be translated */
738
+ /**
739
+ * Policy title - should be translated
740
+ * @minLength 1
741
+ * @maxLength 29
742
+ */
618
743
  title?: string | null;
619
- /** Policy content - should be translated */
744
+ /**
745
+ * Policy content - should be translated
746
+ * @minLength 1
747
+ * @maxLength 3000
748
+ */
620
749
  content?: string;
621
750
  }
622
751
  /** Buyer Info */
623
752
  export interface BuyerInfo extends BuyerInfoIdOneOf {
624
753
  /**
625
754
  * Visitor ID - if the buyer is **not** a site member.
755
+ * @format GUID
626
756
  * @readonly
627
757
  */
628
758
  visitorId?: string;
629
759
  /**
630
760
  * Member ID - if the buyer is a site member.
761
+ * @format GUID
631
762
  * @readonly
632
763
  */
633
764
  memberId?: string;
634
765
  /**
635
766
  * User ID - if the cart owner is a Wix user.
767
+ * @format GUID
636
768
  * @readonly
637
769
  */
638
770
  userId?: string;
639
- /** Contact ID. For more information, see the Contacts API. */
771
+ /**
772
+ * Contact ID. For more information, see the Contacts API.
773
+ * @format GUID
774
+ */
640
775
  contactId?: string | null;
641
- /** Buyer email address. */
776
+ /**
777
+ * Buyer email address.
778
+ * @format EMAIL
779
+ */
642
780
  email?: string | null;
643
781
  }
644
782
  /** @oneof */
645
783
  export interface BuyerInfoIdOneOf {
646
784
  /**
647
785
  * Visitor ID - if the buyer is **not** a site member.
786
+ * @format GUID
648
787
  * @readonly
649
788
  */
650
789
  visitorId?: string;
651
790
  /**
652
791
  * Member ID - if the buyer is a site member.
792
+ * @format GUID
653
793
  * @readonly
654
794
  */
655
795
  memberId?: string;
656
796
  /**
657
797
  * User ID - if the cart owner is a Wix user.
798
+ * @format GUID
658
799
  * @readonly
659
800
  */
660
801
  userId?: string;
@@ -711,7 +852,10 @@ export interface MerchantDiscount {
711
852
  amount?: MultiCurrencyPrice;
712
853
  }
713
854
  export interface DiscountRule {
714
- /** Discount rule ID */
855
+ /**
856
+ * Discount rule ID
857
+ * @format GUID
858
+ */
715
859
  _id?: string;
716
860
  /** Discount rule name */
717
861
  name?: DiscountRuleName;
@@ -719,9 +863,17 @@ export interface DiscountRule {
719
863
  amount?: MultiCurrencyPrice;
720
864
  }
721
865
  export interface DiscountRuleName {
722
- /** Original discount rule name (in site's default language). */
866
+ /**
867
+ * Original discount rule name (in site's default language).
868
+ * @minLength 1
869
+ * @maxLength 256
870
+ */
723
871
  original?: string;
724
- /** Discount rule name translated into buyer's language. Defaults to `original` when not defined. */
872
+ /**
873
+ * Discount rule name translated into buyer's language. Defaults to `original` when not defined.
874
+ * @minLength 1
875
+ * @maxLength 500
876
+ */
725
877
  translated?: string | null;
726
878
  }
727
879
  export declare enum DiscountType {
@@ -741,19 +893,37 @@ export interface AddressWithContact {
741
893
  }
742
894
  /** Physical address */
743
895
  export interface Address {
744
- /** Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format. */
896
+ /**
897
+ * Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.
898
+ * @format COUNTRY
899
+ */
745
900
  country?: string | null;
746
- /** Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format. */
901
+ /**
902
+ * Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format.
903
+ * @maxLength 50
904
+ */
747
905
  subdivision?: string | null;
748
- /** City name. */
906
+ /**
907
+ * City name.
908
+ * @maxLength 50
909
+ */
749
910
  city?: string | null;
750
- /** Postal or zip code. */
911
+ /**
912
+ * Postal or zip code.
913
+ * @maxLength 50
914
+ */
751
915
  postalCode?: string | null;
752
916
  /** Street address. */
753
917
  streetAddress?: StreetAddress;
754
- /** Main address line (usually street name and number). */
918
+ /**
919
+ * Main address line (usually street name and number).
920
+ * @maxLength 150
921
+ */
755
922
  addressLine1?: string | null;
756
- /** Free text providing more detailed address info. Usually contains apt, suite, floor. */
923
+ /**
924
+ * Free text providing more detailed address info. Usually contains apt, suite, floor.
925
+ * @maxLength 100
926
+ */
757
927
  addressLine2?: string | null;
758
928
  /**
759
929
  * Country's full name.
@@ -780,13 +950,25 @@ export interface AddressLocation {
780
950
  }
781
951
  /** Full contact details for an address */
782
952
  export interface FullAddressContactDetails {
783
- /** First name. */
953
+ /**
954
+ * First name.
955
+ * @maxLength 100
956
+ */
784
957
  firstName?: string | null;
785
- /** Last name. */
958
+ /**
959
+ * Last name.
960
+ * @maxLength 100
961
+ */
786
962
  lastName?: string | null;
787
- /** Phone number. */
963
+ /**
964
+ * Phone number.
965
+ * @format PHONE
966
+ */
788
967
  phone?: string | null;
789
- /** Company name. */
968
+ /**
969
+ * Company name.
970
+ * @maxLength 1000
971
+ */
790
972
  company?: string | null;
791
973
  /** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */
792
974
  vatId?: VatId;
@@ -812,9 +994,16 @@ export declare enum VatType {
812
994
  CNPJ = "CNPJ"
813
995
  }
814
996
  export interface SelectedShippingOption {
815
- /** Carrier ID. */
997
+ /**
998
+ * Carrier ID.
999
+ * @format GUID
1000
+ */
816
1001
  carrierId?: string | null;
817
- /** Selected shipping option code. For example, "usps_std_overnight". */
1002
+ /**
1003
+ * Selected shipping option code. For example, "usps_std_overnight".
1004
+ * @minLength 1
1005
+ * @maxLength 100
1006
+ */
818
1007
  code?: string;
819
1008
  }
820
1009
  export interface GetCurrentCartRequest {
@@ -828,22 +1017,36 @@ export interface UpdateCartRequest {
828
1017
  cartInfo?: Cart;
829
1018
  /** The code of an existing coupon to apply to the cart. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */
830
1019
  couponCode?: string | null;
831
- /** Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will be applied to the whole cart. */
1020
+ /**
1021
+ * Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will be applied to the whole cart.
1022
+ * @maxSize 100
1023
+ */
832
1024
  merchantDiscounts?: MerchantDiscountInput[];
833
- /** Catalog line items. */
1025
+ /**
1026
+ * Catalog line items.
1027
+ * @maxSize 300
1028
+ */
834
1029
  lineItems?: LineItem[];
835
1030
  /**
836
1031
  * Custom line items. Custom line items don't trigger the Catalog service plugin.
837
1032
  *
838
1033
  * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
839
1034
  * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
1035
+ * @maxSize 300
840
1036
  */
841
1037
  customLineItems?: CustomLineItem[];
842
1038
  }
843
1039
  export interface MerchantDiscountInput {
844
- /** Discount amount. */
1040
+ /**
1041
+ * Discount amount.
1042
+ * @decimalValue options { gte:0 }
1043
+ */
845
1044
  amount?: string;
846
- /** IDs of the line items the discount applies to. */
1045
+ /**
1046
+ * IDs of the line items the discount applies to.
1047
+ * @format GUID
1048
+ * @maxSize 300
1049
+ */
847
1050
  lineItemIds?: string[];
848
1051
  }
849
1052
  export interface CustomLineItem {
@@ -852,17 +1055,24 @@ export interface CustomLineItem {
852
1055
  *
853
1056
  * Min: `1`
854
1057
  * Max: `100000`
1058
+ * @min 1
1059
+ * @max 100000
855
1060
  */
856
1061
  quantity?: number;
857
1062
  /**
858
1063
  * Custom line item price.
859
1064
  *
860
1065
  * Must be a number or a decimal without symbols.
1066
+ * @format DECIMAL_VALUE
1067
+ * @decimalValue options { gte:0, lte:1000000000000000 }
861
1068
  */
862
1069
  price?: string;
863
1070
  /** Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */
864
1071
  priceDescription?: PriceDescription;
865
- /** Custom line item description lines. Used for displaying the cart, checkout and order. */
1072
+ /**
1073
+ * Custom line item description lines. Used for displaying the cart, checkout and order.
1074
+ * @maxSize 10
1075
+ */
866
1076
  descriptionLines?: DescriptionLine[];
867
1077
  /**
868
1078
  * Custom line item media. Supported formats:
@@ -874,9 +1084,13 @@ export interface CustomLineItem {
874
1084
  * Custom line item ID. If passed, `id` must be unique.
875
1085
  *
876
1086
  * Default: auto-generated ID
1087
+ * @format GUID
877
1088
  */
878
1089
  _id?: string | null;
879
- /** Tax group ID for this custom line item. */
1090
+ /**
1091
+ * Tax group ID for this custom line item.
1092
+ * @format GUID
1093
+ */
880
1094
  taxGroupId?: string | null;
881
1095
  /** Name of the item or product. */
882
1096
  productName?: ProductName;
@@ -884,11 +1098,15 @@ export interface CustomLineItem {
884
1098
  url?: string;
885
1099
  /** Item type. Either a preset type or custom. */
886
1100
  itemType?: ItemType;
887
- /** Item price **before** catalog-defined discount. Defaults to `price` when not provided. */
1101
+ /**
1102
+ * Item price **before** catalog-defined discount. Defaults to `price` when not provided.
1103
+ * @format DECIMAL_VALUE
1104
+ */
888
1105
  fullPrice?: string | null;
889
1106
  /**
890
1107
  * Item quantity available for purchase. Only return this if inventory is managed.
891
1108
  * Not returning this field means that the buyer can "infinitely" tick up the number of items in the cart.
1109
+ * @max 100000
892
1110
  */
893
1111
  quantityAvailable?: number | null;
894
1112
  /** Physical properties of the item. */
@@ -913,6 +1131,8 @@ export interface CustomLineItem {
913
1131
  * + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID.
914
1132
  * + In most cases, this field is the same as `catalogReference.catalogItemId`.
915
1133
  * + Used in membership validation.
1134
+ * @minLength 1
1135
+ * @maxLength 36
916
1136
  */
917
1137
  rootCatalogItemId?: string | null;
918
1138
  /**
@@ -920,11 +1140,12 @@ export interface CustomLineItem {
920
1140
  *
921
1141
  * Eligible for catalog items with type `DEPOSIT_ONLINE`.
922
1142
  * When omitted, the item's price will not be split and is expected to be paid in a single installment.
1143
+ * @format DECIMAL_VALUE
923
1144
  */
924
1145
  depositAmount?: string | null;
925
1146
  /**
926
- * Delivery Profile ID.
927
- * @internal
1147
+ * Delivery profile ID.
1148
+ * @format GUID
928
1149
  */
929
1150
  deliveryProfileId?: string | null;
930
1151
  /** Catalog and item reference. Includes IDs for the item and the catalog it came from, as well as further optional info. Optional for custom line items, which don't trigger the Catalog service plugin. */
@@ -945,6 +1166,8 @@ export interface CustomLineItem {
945
1166
  fixedQuantity?: boolean;
946
1167
  /**
947
1168
  * Item payment policy that requires customer consent to complete purchase. The payment policy will be displayed on the checkout page.
1169
+ * @minLength 1
1170
+ * @maxLength 1000
948
1171
  * @readonly
949
1172
  */
950
1173
  consentRequiredPaymentPolicy?: string | null;
@@ -958,11 +1181,13 @@ export interface CustomLineItem {
958
1181
  /**
959
1182
  * Policies to be displayed to the customer on the checkout page.
960
1183
  * @internal
1184
+ * @maxSize 5
961
1185
  */
962
1186
  policies?: Policy[];
963
1187
  /**
964
1188
  * ID of the app managing the inventory.
965
1189
  * @internal
1190
+ * @format GUID
966
1191
  */
967
1192
  inventoryAppId?: string | null;
968
1193
  /**
@@ -972,25 +1197,35 @@ export interface CustomLineItem {
972
1197
  * @internal
973
1198
  */
974
1199
  membersOnly?: boolean;
1200
+ /**
1201
+ * Address to use for tax calculation purposes.
1202
+ * @internal
1203
+ */
1204
+ taxableAddress?: TaxableAddress;
975
1205
  }
976
1206
  export interface UpdateCartResponse {
977
1207
  /** Updated Cart. */
978
1208
  cart?: Cart;
979
1209
  }
980
1210
  export interface AddToCurrentCartRequest {
981
- /** Catalog line items. */
1211
+ /**
1212
+ * Catalog line items.
1213
+ * @maxSize 100
1214
+ */
982
1215
  lineItems?: LineItem[];
983
1216
  /**
984
1217
  * Custom line items. Custom line items don't trigger the Catalog service plugin.
985
1218
  *
986
1219
  * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
987
1220
  * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
1221
+ * @maxSize 100
988
1222
  */
989
1223
  customLineItems?: CustomLineItem[];
990
1224
  /**
991
1225
  * Business location ID.
992
1226
  * To update a cart's business location ID, use the UpdateCart method.
993
1227
  * Learn more about the [Locations API](https://dev.wix.com/docs/rest/business-management/locations/introduction).
1228
+ * @format GUID
994
1229
  */
995
1230
  businessLocationId?: string | null;
996
1231
  }
@@ -999,13 +1234,17 @@ export interface AddToCartResponse {
999
1234
  cart?: Cart;
1000
1235
  }
1001
1236
  export interface AddToCurrentCartAndEstimateTotalsRequest {
1002
- /** Catalog line items. */
1237
+ /**
1238
+ * Catalog line items.
1239
+ * @maxSize 100
1240
+ */
1003
1241
  lineItems?: LineItem[];
1004
1242
  /**
1005
1243
  * Custom line items. Custom line items don't trigger the Catalog service plugin.
1006
1244
  *
1007
1245
  * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
1008
1246
  * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
1247
+ * @maxSize 100
1009
1248
  */
1010
1249
  customLineItems?: CustomLineItem[];
1011
1250
  /** Selected shipping option. */
@@ -1030,15 +1269,31 @@ export interface AddToCurrentCartAndEstimateTotalsRequest {
1030
1269
  calculateShipping?: boolean | null;
1031
1270
  }
1032
1271
  export interface SelectedMemberships {
1033
- /** Selected memberships. */
1272
+ /**
1273
+ * Selected memberships.
1274
+ * @maxSize 300
1275
+ */
1034
1276
  memberships?: HostSelectedMembership[];
1035
1277
  }
1036
1278
  export interface HostSelectedMembership {
1037
- /** Membership ID. */
1279
+ /**
1280
+ * Membership ID.
1281
+ * @minLength 1
1282
+ * @maxLength 100
1283
+ */
1038
1284
  _id?: string;
1039
- /** ID of the app providing this payment option. */
1285
+ /**
1286
+ * ID of the app providing this payment option.
1287
+ * @format GUID
1288
+ */
1040
1289
  appId?: string;
1041
- /** IDs of the line items this membership applies to. */
1290
+ /**
1291
+ * IDs of the line items this membership applies to.
1292
+ * @minSize 1
1293
+ * @maxSize 300
1294
+ * @minLength 1
1295
+ * @maxLength 100
1296
+ */
1042
1297
  lineItemIds?: string[];
1043
1298
  }
1044
1299
  export interface EstimateTotalsResponse {
@@ -1060,7 +1315,10 @@ export interface EstimateTotalsResponse {
1060
1315
  calculationErrors?: CalculationErrors;
1061
1316
  /** Weight measurement unit - defaults to site's weight unit. */
1062
1317
  weightUnit?: WeightUnit;
1063
- /** Currency used for pricing in this store. */
1318
+ /**
1319
+ * Currency used for pricing in this store.
1320
+ * @format CURRENCY
1321
+ */
1064
1322
  currency?: string;
1065
1323
  /**
1066
1324
  * Minimal amount to pay in order to place the order.
@@ -1074,7 +1332,10 @@ export interface EstimateTotalsResponse {
1074
1332
  payLater?: PriceSummary;
1075
1333
  /** Information about valid and invalid memberships, and which ones are selected for usage. */
1076
1334
  membershipOptions?: MembershipOptions;
1077
- /** Additional fees */
1335
+ /**
1336
+ * Additional fees
1337
+ * @maxSize 100
1338
+ */
1078
1339
  additionalFees?: AdditionalFee[];
1079
1340
  /**
1080
1341
  * List of validation violations raised by the [Validations Custom Extension SPI](https://www.wix.com/velo/reference/spis/wix-ecom/ecom-validations/introduction).
@@ -1121,7 +1382,10 @@ export interface LineItemPricesData {
1121
1382
  export interface ItemTaxFullDetails {
1122
1383
  /** Amount for which tax is calculated. */
1123
1384
  taxableAmount?: MultiCurrencyPrice;
1124
- /** Tax rate %, as a decimal point between 0 and 1. */
1385
+ /**
1386
+ * Tax rate %, as a decimal point between 0 and 1.
1387
+ * @decimalValue options { gte:0, lte:1, maxScale:6 }
1388
+ */
1125
1389
  taxRate?: string;
1126
1390
  /** Calculated tax, based on `taxable_amount` and `tax_rate`. */
1127
1391
  totalTax?: MultiCurrencyPrice;
@@ -1133,9 +1397,15 @@ export interface ItemTaxFullDetails {
1133
1397
  rateBreakdown?: TaxRateBreakdown[];
1134
1398
  }
1135
1399
  export interface TaxRateBreakdown {
1136
- /** Name of tax against which the calculation was performed. */
1400
+ /**
1401
+ * Name of tax against which the calculation was performed.
1402
+ * @maxLength 100
1403
+ */
1137
1404
  name?: string;
1138
- /** Rate at which this tax detail was calculated. */
1405
+ /**
1406
+ * Rate at which this tax detail was calculated.
1407
+ * @decimalValue options { gte:0, lte:1, maxScale:6 }
1408
+ */
1139
1409
  rate?: string;
1140
1410
  /** Amount of tax for this tax detail. */
1141
1411
  tax?: MultiCurrencyPrice;
@@ -1145,21 +1415,31 @@ export interface TaxRateBreakdown {
1145
1415
  * It holds the tax amount and the tax rate for each tax authority that apply on the line item.
1146
1416
  */
1147
1417
  export interface TaxBreakdown {
1148
- /** The name of the jurisdiction to which this tax detail applies. For example, "New York" or "Quebec". */
1418
+ /**
1419
+ * The name of the jurisdiction to which this tax detail applies. For example, "New York" or "Quebec".
1420
+ * @maxLength 200
1421
+ */
1149
1422
  jurisdiction?: string | null;
1150
1423
  /** The amount of this line item price that was considered nontaxable. (Decimal value) */
1151
1424
  nonTaxableAmount?: MultiCurrencyPrice;
1152
- /** The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.0000 signifies 200% tax. (Decimal value) */
1425
+ /**
1426
+ * The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.0000 signifies 200% tax. (Decimal value)
1427
+ * @decimalValue options { gte:0, maxScale:6 }
1428
+ */
1153
1429
  rate?: string | null;
1154
1430
  /** The amount of tax estimated for this line item. (Decimal value) */
1155
1431
  taxAmount?: MultiCurrencyPrice;
1156
1432
  /** The taxable amount of this line item. */
1157
1433
  taxableAmount?: MultiCurrencyPrice;
1158
- /** The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, "Sales Tax", "Income Tax", "Value Added Tax", etc. */
1434
+ /**
1435
+ * The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, "Sales Tax", "Income Tax", "Value Added Tax", etc.
1436
+ * @maxLength 200
1437
+ */
1159
1438
  taxType?: string | null;
1160
1439
  /**
1161
1440
  * The name of the tax against which this tax amount was calculated. For example, "NY State Sales Tax", "Quebec GST", etc.
1162
1441
  * This name should be explicit enough to allow the merchant to understand what tax was calculated.
1442
+ * @maxLength 200
1163
1443
  */
1164
1444
  taxName?: string | null;
1165
1445
  /** The type of the jurisdiction in which this tax detail applies. */
@@ -1198,11 +1478,16 @@ export interface GiftCard {
1198
1478
  obfuscatedCode?: string;
1199
1479
  /** Gift card value. */
1200
1480
  amount?: MultiCurrencyPrice;
1201
- /** App ID of the gift card provider. */
1481
+ /**
1482
+ * App ID of the gift card provider.
1483
+ * @format GUID
1484
+ */
1202
1485
  appId?: string;
1203
1486
  /**
1204
1487
  * External ID in the gift card provider's system.
1205
1488
  * Used for integration and tracking across different platforms.
1489
+ * @minLength 1
1490
+ * @maxLength 50
1206
1491
  */
1207
1492
  externalId?: string | null;
1208
1493
  }
@@ -1289,15 +1574,27 @@ export interface ApplicationError {
1289
1574
  * Tax breakdown is the tax amount split to the tax authorities that applied on the line item.
1290
1575
  */
1291
1576
  export interface AggregatedTaxBreakdown {
1292
- /** The name of the tax against which this tax amount was calculated. */
1577
+ /**
1578
+ * The name of the tax against which this tax amount was calculated.
1579
+ * @maxLength 200
1580
+ */
1293
1581
  taxName?: string;
1294
- /** The type of tax that was calculated. Depends on the company's nexus settings as well as the jurisdiction's tax laws. */
1582
+ /**
1583
+ * The type of tax that was calculated. Depends on the company's nexus settings as well as the jurisdiction's tax laws.
1584
+ * @maxLength 200
1585
+ */
1295
1586
  taxType?: string;
1296
- /** The name of the jurisdiction in which this tax detail applies. */
1587
+ /**
1588
+ * The name of the jurisdiction in which this tax detail applies.
1589
+ * @maxLength 200
1590
+ */
1297
1591
  jurisdiction?: string;
1298
1592
  /** The type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
1299
1593
  jurisdictionTypeEnum?: JurisdictionType;
1300
- /** The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.000 signifies 200% tax. (Decimal value) */
1594
+ /**
1595
+ * The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.000 signifies 200% tax. (Decimal value)
1596
+ * @decimalValue options { gte:0, maxScale:6 }
1597
+ */
1301
1598
  rate?: string;
1302
1599
  /** The sum of all the tax from line items that calculated by the tax identifiers. */
1303
1600
  aggregatedTaxAmount?: MultiCurrencyPrice;
@@ -1313,18 +1610,26 @@ export interface ShippingInformation {
1313
1610
  export interface ShippingRegion {
1314
1611
  /**
1315
1612
  * Shipping region ID.
1613
+ * @format GUID
1316
1614
  * @readonly
1317
1615
  */
1318
1616
  _id?: string;
1319
- /** Shipping region name. */
1617
+ /**
1618
+ * Shipping region name.
1619
+ * @maxLength 100
1620
+ */
1320
1621
  name?: string;
1321
1622
  }
1322
1623
  export interface SelectedCarrierServiceOption {
1323
- /** Unique identifier of selected option. For example, "usps_std_overnight". */
1624
+ /**
1625
+ * Unique identifier of selected option. For example, "usps_std_overnight".
1626
+ * @maxLength 100
1627
+ */
1324
1628
  code?: string;
1325
1629
  /**
1326
1630
  * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale).
1327
1631
  * For example, "Standard" or "First-Class Package International".
1632
+ * @maxLength 250
1328
1633
  * @readonly
1329
1634
  */
1330
1635
  title?: string;
@@ -1345,17 +1650,29 @@ export interface SelectedCarrierServiceOption {
1345
1650
  requestedShippingOption?: boolean;
1346
1651
  /** Other charges */
1347
1652
  otherCharges?: SelectedCarrierServiceOptionOtherCharge[];
1348
- /** This carrier's unique ID */
1653
+ /**
1654
+ * This carrier's unique ID
1655
+ * @format GUID
1656
+ */
1349
1657
  carrierId?: string | null;
1350
- /** Delivery solution allocations to different delivery carriers and delivery regions */
1658
+ /**
1659
+ * Delivery solution allocations to different delivery carriers and delivery regions
1660
+ * @maxSize 300
1661
+ */
1351
1662
  deliveryAllocations?: DeliveryAllocation[];
1352
1663
  /** If the delivery solution is a partial and doesn't apply to all items. */
1353
1664
  partial?: boolean | null;
1354
1665
  }
1355
1666
  export interface DeliveryLogistics {
1356
- /** Expected delivery time, in free text. For example, "3-5 business days". */
1667
+ /**
1668
+ * Expected delivery time, in free text. For example, "3-5 business days".
1669
+ * @maxLength 500
1670
+ */
1357
1671
  deliveryTime?: string | null;
1358
- /** Instructions for caller, e.g for pickup: "Please deliver during opening hours, and please don't park in disabled parking spot". */
1672
+ /**
1673
+ * Instructions for caller, e.g for pickup: "Please deliver during opening hours, and please don't park in disabled parking spot".
1674
+ * @maxLength 1000
1675
+ */
1359
1676
  instructions?: string | null;
1360
1677
  /** Pickup details. */
1361
1678
  pickupDetails?: PickupDetails;
@@ -1397,7 +1714,10 @@ export interface SelectedCarrierServiceOptionPrices {
1397
1714
  export interface SelectedCarrierServiceOptionOtherCharge {
1398
1715
  /** Type of additional cost. */
1399
1716
  type?: ChargeType;
1400
- /** Details of the charge, such as 'Full Coverage Insurance of up to 80% of value of shipment'. */
1717
+ /**
1718
+ * Details of the charge, such as 'Full Coverage Insurance of up to 80% of value of shipment'.
1719
+ * @maxLength 200
1720
+ */
1401
1721
  details?: string | null;
1402
1722
  /** Price of added charge. */
1403
1723
  cost?: SelectedCarrierServiceOptionPrices;
@@ -1415,23 +1735,43 @@ export interface DeliveryAllocation {
1415
1735
  applicableLineItems?: ApplicableLineItems;
1416
1736
  }
1417
1737
  export interface Carrier {
1418
- /** The carrier app id */
1738
+ /**
1739
+ * The carrier app id
1740
+ * @format GUID
1741
+ */
1419
1742
  appId?: string | null;
1420
- /** Unique code that acts as an ID for a shipping rate. For example, `"usps_std_overnight"`. */
1743
+ /**
1744
+ * Unique code that acts as an ID for a shipping rate. For example, `"usps_std_overnight"`.
1745
+ * @maxLength 250
1746
+ */
1421
1747
  code?: string;
1422
1748
  }
1423
1749
  export interface Region {
1424
- /** The delivery region id. */
1750
+ /**
1751
+ * The delivery region id.
1752
+ * @format GUID
1753
+ */
1425
1754
  _id?: string | null;
1426
- /** The delivery region name. */
1755
+ /**
1756
+ * The delivery region name.
1757
+ * @maxLength 100
1758
+ */
1427
1759
  name?: string | null;
1428
1760
  }
1429
1761
  export interface ApplicableLineItems {
1430
- /** Line items that the delivery solution is for. */
1762
+ /**
1763
+ * Line items that the delivery solution is for.
1764
+ * @maxSize 300
1765
+ * @minLength 1
1766
+ * @maxLength 100
1767
+ */
1431
1768
  lineItemIds?: string[];
1432
1769
  }
1433
1770
  export interface CarrierServiceOption {
1434
- /** Carrier ID. */
1771
+ /**
1772
+ * Carrier ID.
1773
+ * @format GUID
1774
+ */
1435
1775
  carrierId?: string;
1436
1776
  /** Shipping options offered by this carrier for this request. */
1437
1777
  shippingOptions?: ShippingOption[];
@@ -1440,18 +1780,23 @@ export interface ShippingOption {
1440
1780
  /**
1441
1781
  * Unique code of provided shipping option like "usps_std_overnight".
1442
1782
  * For legacy calculators this would be the UUID of the option.
1783
+ * @maxLength 100
1443
1784
  */
1444
1785
  code?: string;
1445
1786
  /**
1446
1787
  * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale).
1447
1788
  * For example, "Standard" or "First-Class Package International".
1789
+ * @maxLength 250
1448
1790
  */
1449
1791
  title?: string;
1450
1792
  /** Delivery logistics. */
1451
1793
  logistics?: DeliveryLogistics;
1452
1794
  /** Sipping price information. */
1453
1795
  cost?: ShippingPrice;
1454
- /** Delivery solution allocations to different delivery carriers and delivery regions */
1796
+ /**
1797
+ * Delivery solution allocations to different delivery carriers and delivery regions
1798
+ * @maxSize 300
1799
+ */
1455
1800
  deliveryAllocations?: DeliveryAllocation[];
1456
1801
  /** If the delivery solution is a partial and doesn't apply to all items. */
1457
1802
  partial?: boolean | null;
@@ -1479,6 +1824,7 @@ export interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
1479
1824
  discountType?: AppliedDiscountDiscountType;
1480
1825
  /**
1481
1826
  * IDs of the line items the discount applies to.
1827
+ * @format GUID
1482
1828
  * @deprecated IDs of line items the discount applies to.
1483
1829
  * @replacedBy line_items_discounts
1484
1830
  * @targetRemovalDate 2024-06-01
@@ -1488,6 +1834,8 @@ export interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
1488
1834
  * Number of subscription cycle this discount applies to
1489
1835
  * default None - all billing cycle
1490
1836
  * @internal
1837
+ * @min 1
1838
+ * @max 999
1491
1839
  */
1492
1840
  subscriptionCycles?: number | null;
1493
1841
  }
@@ -1519,11 +1867,18 @@ export interface V1Coupon {
1519
1867
  export interface V1MerchantDiscount {
1520
1868
  /** Discount value. */
1521
1869
  amount?: MultiCurrencyPrice;
1522
- /** Discount Percentage. Will be calculated from items price before other discounts. */
1870
+ /**
1871
+ * Discount Percentage. Will be calculated from items price before other discounts.
1872
+ * @min 1
1873
+ * @max 100
1874
+ */
1523
1875
  percentage?: number | null;
1524
1876
  }
1525
1877
  export interface V1DiscountRule {
1526
- /** Discount rule ID */
1878
+ /**
1879
+ * Discount rule ID
1880
+ * @format GUID
1881
+ */
1527
1882
  _id?: string;
1528
1883
  /** Discount rule name */
1529
1884
  name?: V1DiscountRuleName;
@@ -1531,13 +1886,24 @@ export interface V1DiscountRule {
1531
1886
  amount?: MultiCurrencyPrice;
1532
1887
  }
1533
1888
  export interface V1DiscountRuleName {
1534
- /** Original discount rule name (in site's default language). */
1889
+ /**
1890
+ * Original discount rule name (in site's default language).
1891
+ * @minLength 1
1892
+ * @maxLength 256
1893
+ */
1535
1894
  original?: string;
1536
- /** Translated discount rule name according to buyer language. Defaults to `original` when not provided. */
1895
+ /**
1896
+ * Translated discount rule name according to buyer language. Defaults to `original` when not provided.
1897
+ * @minLength 1
1898
+ * @maxLength 500
1899
+ */
1537
1900
  translated?: string | null;
1538
1901
  }
1539
1902
  export interface LineItemDiscount {
1540
- /** ID of line item the discount applies to. */
1903
+ /**
1904
+ * ID of line item the discount applies to.
1905
+ * @format GUID
1906
+ */
1541
1907
  _id?: string;
1542
1908
  /** Discount value. */
1543
1909
  totalDiscountAmount?: MultiCurrencyPrice;
@@ -1667,21 +2033,43 @@ export interface CarrierError {
1667
2033
  error?: Details;
1668
2034
  }
1669
2035
  export interface MembershipOptions {
1670
- /** List of payment options that can be used. */
2036
+ /**
2037
+ * List of payment options that can be used.
2038
+ * @maxSize 300
2039
+ */
1671
2040
  eligibleMemberships?: Membership[];
1672
- /** List of payment options that are owned by the member, but cannot be used due to reason provided. */
2041
+ /**
2042
+ * List of payment options that are owned by the member, but cannot be used due to reason provided.
2043
+ * @maxSize 300
2044
+ */
1673
2045
  invalidMemberships?: InvalidMembership[];
1674
- /** The selected membership payment options and which line items they apply to. */
2046
+ /**
2047
+ * The selected membership payment options and which line items they apply to.
2048
+ * @maxSize 300
2049
+ */
1675
2050
  selectedMemberships?: HostSelectedMembership[];
1676
2051
  }
1677
2052
  export interface Membership {
1678
- /** Membership ID. */
2053
+ /**
2054
+ * Membership ID.
2055
+ * @minLength 1
2056
+ * @maxLength 100
2057
+ */
1679
2058
  _id?: string;
1680
- /** ID of the application providing this payment option. */
2059
+ /**
2060
+ * ID of the application providing this payment option.
2061
+ * @format GUID
2062
+ */
1681
2063
  appId?: string;
1682
2064
  /** The name of this membership. */
1683
2065
  name?: MembershipName;
1684
- /** Line item IDs which are "paid" for by this membership. */
2066
+ /**
2067
+ * Line item IDs which are "paid" for by this membership.
2068
+ * @minSize 1
2069
+ * @maxSize 300
2070
+ * @minLength 1
2071
+ * @maxLength 100
2072
+ */
1685
2073
  lineItemIds?: string[];
1686
2074
  /** Optional - For a membership that has limited credits, information about credit usage. */
1687
2075
  credits?: MembershipPaymentCredits;
@@ -1691,13 +2079,22 @@ export interface Membership {
1691
2079
  additionalData?: Record<string, any> | null;
1692
2080
  }
1693
2081
  export interface MembershipName {
1694
- /** Membership name. */
2082
+ /**
2083
+ * Membership name.
2084
+ * @maxLength 100
2085
+ */
1695
2086
  original?: string;
1696
- /** Membership name translated into buyer's language. Defaults to `original` when not defined. */
2087
+ /**
2088
+ * Membership name translated into buyer's language. Defaults to `original` when not defined.
2089
+ * @maxLength 100
2090
+ */
1697
2091
  translated?: string | null;
1698
2092
  }
1699
2093
  export interface MembershipPaymentCredits {
1700
- /** Membership's total amount of credits. */
2094
+ /**
2095
+ * Membership's total amount of credits.
2096
+ * @min 1
2097
+ */
1701
2098
  total?: number;
1702
2099
  /** Membership's remaining amount of credits. */
1703
2100
  remaining?: number;
@@ -1705,19 +2102,35 @@ export interface MembershipPaymentCredits {
1705
2102
  export interface InvalidMembership {
1706
2103
  /** Membership details. */
1707
2104
  membership?: Membership;
1708
- /** Reason why this membership is invalid and cannot be used. */
2105
+ /**
2106
+ * Reason why this membership is invalid and cannot be used.
2107
+ * @minLength 1
2108
+ * @maxLength 100
2109
+ */
1709
2110
  reason?: string;
1710
2111
  }
1711
2112
  export interface AdditionalFee {
1712
- /** Additional fee's unique code (or ID) for future processing. */
2113
+ /**
2114
+ * Additional fee's unique code (or ID) for future processing.
2115
+ * @minLength 1
2116
+ * @maxLength 100
2117
+ */
1713
2118
  code?: string | null;
1714
- /** Translated additional fee's name. */
2119
+ /**
2120
+ * Translated additional fee's name.
2121
+ * @minLength 1
2122
+ * @maxLength 50
2123
+ */
1715
2124
  name?: string;
1716
2125
  /** Additional fee's price. */
1717
2126
  price?: MultiCurrencyPrice;
1718
2127
  /** Tax details. */
1719
2128
  taxDetails?: ItemTaxFullDetails;
1720
- /** Provider's app id. */
2129
+ /**
2130
+ * Provider's app id.
2131
+ * @minLength 1
2132
+ * @maxLength 100
2133
+ */
1721
2134
  providerAppId?: string | null;
1722
2135
  /** Additional fee's price before tax. */
1723
2136
  priceBeforeTax?: MultiCurrencyPrice;
@@ -1726,12 +2139,15 @@ export interface AdditionalFee {
1726
2139
  /**
1727
2140
  * Optional - Line items associated with this additional fee.
1728
2141
  * If no `lineItemIds` are provided, the fee will be associated with the whole cart/checkout/order.
2142
+ * @format GUID
1729
2143
  */
1730
2144
  lineItemIds?: string[];
1731
2145
  /**
1732
2146
  * Number of subscription cycle this fee applies to
1733
2147
  * default None - all billing cycle
1734
2148
  * @internal
2149
+ * @min 1
2150
+ * @max 999
1735
2151
  */
1736
2152
  subscriptionCycles?: number | null;
1737
2153
  /** the source the additional fee was added from */
@@ -1751,7 +2167,11 @@ export interface Violation {
1751
2167
  severity?: Severity;
1752
2168
  /** Target location on a checkout or cart page where the violation will be displayed. */
1753
2169
  target?: Target;
1754
- /** Violation description. Can include rich text. Only HTTP or HTTPS links in the following format are allowed: `<a href="https://www.wix.com">Click me</a>`. */
2170
+ /**
2171
+ * Violation description. Can include rich text. Only HTTP or HTTPS links in the following format are allowed: `<a href="https://www.wix.com">Click me</a>`.
2172
+ * @minLength 1
2173
+ * @maxLength 1000
2174
+ */
1755
2175
  description?: string | null;
1756
2176
  }
1757
2177
  export declare enum Severity {
@@ -1810,7 +2230,12 @@ export interface TargetLineItem {
1810
2230
  suggestedFix?: SuggestedFix;
1811
2231
  }
1812
2232
  export interface RemoveLineItemsFromCurrentCartRequest {
1813
- /** IDs of the line items to remove from the cart. */
2233
+ /**
2234
+ * IDs of the line items to remove from the cart.
2235
+ * @format GUID
2236
+ * @minSize 1
2237
+ * @maxSize 100
2238
+ */
1814
2239
  lineItemIds?: string[];
1815
2240
  }
1816
2241
  export interface RemoveLineItemsResponse {
@@ -1826,7 +2251,10 @@ export interface CreateCheckoutFromCurrentCartRequest {
1826
2251
  billingAddress?: Address;
1827
2252
  /** Selected shipping option. */
1828
2253
  selectedShippingOption?: SelectedShippingOption;
1829
- /** Mandatory when setting a billing or shipping address if the site visitor isn't logged in. */
2254
+ /**
2255
+ * Mandatory when setting a billing or shipping address if the site visitor isn't logged in.
2256
+ * @format EMAIL
2257
+ */
1830
2258
  email?: string | null;
1831
2259
  }
1832
2260
  export declare enum ChannelType {
@@ -1874,13 +2302,24 @@ export interface RemoveCouponResponse {
1874
2302
  cart?: Cart;
1875
2303
  }
1876
2304
  export interface UpdateCurrentCartLineItemQuantityRequest {
1877
- /** Line item IDs and their new quantity. */
2305
+ /**
2306
+ * Line item IDs and their new quantity.
2307
+ * @minSize 1
2308
+ * @maxSize 100
2309
+ */
1878
2310
  lineItems?: LineItemQuantityUpdate[];
1879
2311
  }
1880
2312
  export interface LineItemQuantityUpdate {
1881
- /** Line item ID. Required. */
2313
+ /**
2314
+ * Line item ID. Required.
2315
+ * @format GUID
2316
+ */
1882
2317
  _id?: string;
1883
- /** New quantity. Number must be 1 or higher. Required. */
2318
+ /**
2319
+ * New quantity. Number must be 1 or higher. Required.
2320
+ * @min 1
2321
+ * @max 100000
2322
+ */
1884
2323
  quantity?: number;
1885
2324
  }
1886
2325
  export interface UpdateLineItemsQuantityResponse {
@@ -1984,9 +2423,15 @@ export interface ActionEvent {
1984
2423
  body?: string;
1985
2424
  }
1986
2425
  export interface MessageEnvelope {
1987
- /** App instance ID. */
2426
+ /**
2427
+ * App instance ID.
2428
+ * @format GUID
2429
+ */
1988
2430
  instanceId?: string | null;
1989
- /** Event type. */
2431
+ /**
2432
+ * Event type.
2433
+ * @maxLength 150
2434
+ */
1990
2435
  eventType?: string;
1991
2436
  /** The identification type and identity data. */
1992
2437
  identity?: IdentificationData;
@@ -1994,26 +2439,50 @@ export interface MessageEnvelope {
1994
2439
  data?: string;
1995
2440
  }
1996
2441
  export interface IdentificationData extends IdentificationDataIdOneOf {
1997
- /** ID of a site visitor that has not logged in to the site. */
2442
+ /**
2443
+ * ID of a site visitor that has not logged in to the site.
2444
+ * @format GUID
2445
+ */
1998
2446
  anonymousVisitorId?: string;
1999
- /** ID of a site visitor that has logged in to the site. */
2447
+ /**
2448
+ * ID of a site visitor that has logged in to the site.
2449
+ * @format GUID
2450
+ */
2000
2451
  memberId?: string;
2001
- /** ID of a Wix user (site owner, contributor, etc.). */
2452
+ /**
2453
+ * ID of a Wix user (site owner, contributor, etc.).
2454
+ * @format GUID
2455
+ */
2002
2456
  wixUserId?: string;
2003
- /** ID of an app. */
2457
+ /**
2458
+ * ID of an app.
2459
+ * @format GUID
2460
+ */
2004
2461
  appId?: string;
2005
2462
  /** @readonly */
2006
2463
  identityType?: WebhookIdentityType;
2007
2464
  }
2008
2465
  /** @oneof */
2009
2466
  export interface IdentificationDataIdOneOf {
2010
- /** ID of a site visitor that has not logged in to the site. */
2467
+ /**
2468
+ * ID of a site visitor that has not logged in to the site.
2469
+ * @format GUID
2470
+ */
2011
2471
  anonymousVisitorId?: string;
2012
- /** ID of a site visitor that has logged in to the site. */
2472
+ /**
2473
+ * ID of a site visitor that has logged in to the site.
2474
+ * @format GUID
2475
+ */
2013
2476
  memberId?: string;
2014
- /** ID of a Wix user (site owner, contributor, etc.). */
2477
+ /**
2478
+ * ID of a Wix user (site owner, contributor, etc.).
2479
+ * @format GUID
2480
+ */
2015
2481
  wixUserId?: string;
2016
- /** ID of an app. */
2482
+ /**
2483
+ * ID of an app.
2484
+ * @format GUID
2485
+ */
2017
2486
  appId?: string;
2018
2487
  }
2019
2488
  export declare enum WebhookIdentityType {
@@ -2028,15 +2497,22 @@ export interface CreateCartRequest {
2028
2497
  cartInfo?: Cart;
2029
2498
  /** The code of an existing coupon to apply to the cart. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */
2030
2499
  couponCode?: string | null;
2031
- /** Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will apply to the whole cart. */
2500
+ /**
2501
+ * Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will apply to the whole cart.
2502
+ * @maxSize 100
2503
+ */
2032
2504
  merchantDiscounts?: MerchantDiscountInput[];
2033
- /** Catalog line items. */
2505
+ /**
2506
+ * Catalog line items.
2507
+ * @maxSize 300
2508
+ */
2034
2509
  lineItems?: LineItem[];
2035
2510
  /**
2036
2511
  * Custom line items. Custom line items don't trigger the Catalog service plugin.
2037
2512
  *
2038
2513
  * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
2039
2514
  * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
2515
+ * @maxSize 300
2040
2516
  */
2041
2517
  customLineItems?: CustomLineItem[];
2042
2518
  }
@@ -2045,7 +2521,10 @@ export interface CreateCartResponse {
2045
2521
  cart?: Cart;
2046
2522
  }
2047
2523
  export interface GetCartRequest {
2048
- /** ID of the cart to retrieve. */
2524
+ /**
2525
+ * ID of the cart to retrieve.
2526
+ * @format GUID
2527
+ */
2049
2528
  _id: string;
2050
2529
  }
2051
2530
  export interface GetCartResponse {
@@ -2053,7 +2532,10 @@ export interface GetCartResponse {
2053
2532
  cart?: Cart;
2054
2533
  }
2055
2534
  export interface GetCartByCheckoutIdRequest {
2056
- /** Checkout ID. */
2535
+ /**
2536
+ * Checkout ID.
2537
+ * @format GUID
2538
+ */
2057
2539
  _id: string;
2058
2540
  }
2059
2541
  export interface GetCartByCheckoutIdResponse {
@@ -2061,32 +2543,51 @@ export interface GetCartByCheckoutIdResponse {
2061
2543
  cart?: Cart;
2062
2544
  }
2063
2545
  export interface AddToCartRequest {
2064
- /** Cart ID. */
2546
+ /**
2547
+ * Cart ID.
2548
+ * @format GUID
2549
+ */
2065
2550
  _id: string;
2066
- /** Catalog line items. */
2551
+ /**
2552
+ * Catalog line items.
2553
+ * @maxSize 100
2554
+ */
2067
2555
  lineItems?: LineItem[];
2068
2556
  /**
2069
2557
  * Custom line items. Custom line items don't trigger the Catalog service plugin.
2070
2558
  *
2071
2559
  * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
2072
2560
  * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
2561
+ * @maxSize 100
2073
2562
  */
2074
2563
  customLineItems?: CustomLineItem[];
2075
2564
  /**
2076
2565
  * The business location ID associated with the cart.
2077
2566
  * The `businessLocationId` field cannot be passed if one already exists on the cart. To update a cart's business location ID, use the UpdateCart method.
2078
2567
  * Learn more about the [Locations API](https://dev.wix.com/docs/rest/business-management/locations/introduction).
2568
+ * @format GUID
2079
2569
  */
2080
2570
  businessLocationId?: string | null;
2081
2571
  }
2082
2572
  export interface RemoveLineItemsRequest {
2083
- /** Cart ID. */
2573
+ /**
2574
+ * Cart ID.
2575
+ * @format GUID
2576
+ */
2084
2577
  _id: string;
2085
- /** IDs of the line items to remove from the cart. */
2578
+ /**
2579
+ * IDs of the line items to remove from the cart.
2580
+ * @format GUID
2581
+ * @minSize 1
2582
+ * @maxSize 100
2583
+ */
2086
2584
  lineItemIds: string[];
2087
2585
  }
2088
2586
  export interface CreateCheckoutRequest {
2089
- /** Cart ID. */
2587
+ /**
2588
+ * Cart ID.
2589
+ * @format GUID
2590
+ */
2090
2591
  _id: string;
2091
2592
  /** **Required**. Sales channel type. */
2092
2593
  channelType?: ChannelType;
@@ -2096,21 +2597,37 @@ export interface CreateCheckoutRequest {
2096
2597
  billingAddress?: Address;
2097
2598
  /** Selected shipping option. */
2098
2599
  selectedShippingOption?: SelectedShippingOption;
2099
- /** Mandatory when setting a billing or shipping address if the site visitor isn't logged in. */
2600
+ /**
2601
+ * Mandatory when setting a billing or shipping address if the site visitor isn't logged in.
2602
+ * @format EMAIL
2603
+ */
2100
2604
  email?: string | null;
2101
2605
  }
2102
2606
  export interface RemoveCouponRequest {
2103
- /** Cart ID. */
2607
+ /**
2608
+ * Cart ID.
2609
+ * @format GUID
2610
+ */
2104
2611
  _id: string;
2105
2612
  }
2106
2613
  export interface UpdateLineItemsQuantityRequest {
2107
- /** Cart ID. */
2614
+ /**
2615
+ * Cart ID.
2616
+ * @format GUID
2617
+ */
2108
2618
  _id: string;
2109
- /** Line item IDs and their new quantity. */
2619
+ /**
2620
+ * Line item IDs and their new quantity.
2621
+ * @minSize 1
2622
+ * @maxSize 100
2623
+ */
2110
2624
  lineItems: LineItemQuantityUpdate[];
2111
2625
  }
2112
2626
  export interface EstimateTotalsRequest {
2113
- /** Cart ID. */
2627
+ /**
2628
+ * Cart ID.
2629
+ * @format GUID
2630
+ */
2114
2631
  _id: string;
2115
2632
  /** Selected shipping option. */
2116
2633
  selectedShippingOption?: SelectedShippingOption;
@@ -2134,13 +2651,19 @@ export interface EstimateTotalsRequest {
2134
2651
  calculateShipping?: boolean | null;
2135
2652
  }
2136
2653
  export interface DeleteCartRequest {
2137
- /** ID of the cart to delete. */
2654
+ /**
2655
+ * ID of the cart to delete.
2656
+ * @format GUID
2657
+ */
2138
2658
  _id: string;
2139
2659
  }
2140
2660
  export interface Empty {
2141
2661
  }
2142
2662
  export interface RemoveBusinessLocationRequest {
2143
- /** Cart ID. */
2663
+ /**
2664
+ * Cart ID.
2665
+ * @format GUID
2666
+ */
2144
2667
  _id: string;
2145
2668
  }
2146
2669
  export interface RemoveBusinessLocationResponse {
@@ -2660,9 +3183,15 @@ export interface RemoveBusinessLocationResponseNonNullableFields {
2660
3183
  cart?: CartNonNullableFields;
2661
3184
  }
2662
3185
  export interface BaseEventMetadata {
2663
- /** App instance ID. */
3186
+ /**
3187
+ * App instance ID.
3188
+ * @format GUID
3189
+ */
2664
3190
  instanceId?: string | null;
2665
- /** Event type. */
3191
+ /**
3192
+ * Event type.
3193
+ * @maxLength 150
3194
+ */
2666
3195
  eventType?: string;
2667
3196
  /** The identification type and identity data. */
2668
3197
  identity?: IdentificationData;
@@ -2727,6 +3256,8 @@ export interface CartDeletedEnvelope {
2727
3256
  * @permissionId ECOM.READ_CARTS
2728
3257
  * @webhook
2729
3258
  * @eventType wix.ecom.v1.cart_deleted
3259
+ * @serviceIdentifier com.wix.ecom.cart.api.v1.CurrentCartService
3260
+ * @slug deleted
2730
3261
  */
2731
3262
  export declare function onCartDeleted(handler: (event: CartDeletedEnvelope) => void | Promise<void>): void;
2732
3263
  export interface CartUpdatedEnvelope {
@@ -2750,6 +3281,7 @@ export interface CartUpdatedEnvelope {
2750
3281
  * @permissionId ECOM.READ_CARTS
2751
3282
  * @webhook
2752
3283
  * @eventType wix.ecom.v1.cart_updated
3284
+ * @slug updated
2753
3285
  */
2754
3286
  export declare function onCartUpdated(handler: (event: CartUpdatedEnvelope) => void | Promise<void>): void;
2755
3287
  export interface CartCreatedEnvelope {
@@ -2775,6 +3307,8 @@ export interface CartCreatedEnvelope {
2775
3307
  * @permissionId ECOM.READ_CARTS
2776
3308
  * @webhook
2777
3309
  * @eventType wix.ecom.v1.cart_created
3310
+ * @serviceIdentifier com.wix.ecom.cart.api.v1.CartService
3311
+ * @slug created
2778
3312
  */
2779
3313
  export declare function onCartCreated(handler: (event: CartCreatedEnvelope) => void | Promise<void>): void;
2780
3314
  /**
@@ -2785,8 +3319,8 @@ export declare function onCartCreated(handler: (event: CartCreatedEnvelope) => v
2785
3319
  *
2786
3320
  * > **Note:** When adding catalog items, `options.lineItems.catalogReference` is required.
2787
3321
  * @public
2788
- * @requiredField options.customLineItems.descriptionLines
2789
3322
  * @requiredField options.customLineItems.descriptionLines.name
3323
+ * @requiredField options.customLineItems.descriptionLines.value
2790
3324
  * @requiredField options.customLineItems.itemType
2791
3325
  * @requiredField options.customLineItems.price
2792
3326
  * @requiredField options.customLineItems.productName
@@ -2800,12 +3334,16 @@ export declare function onCartCreated(handler: (event: CartCreatedEnvelope) => v
2800
3334
  * @permissionId ECOM.ADMIN_MODIFY_CARTS
2801
3335
  * @permissionScope Manage Stores - all permissions
2802
3336
  * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3337
+ * @permissionScope Manage Restaurants - all permissions
3338
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
2803
3339
  * @permissionScope Manage eCommerce - all permissions
2804
3340
  * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
2805
3341
  * @permissionScope Manage Stores - all permissions
2806
3342
  * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
2807
3343
  * @permissionScope Manage eCommerce - Admin Permissions
2808
3344
  * @permissionScopeId SCOPE.ECOM.MANAGE-ADMIN
3345
+ * @permissionScope Manage Restaurants - all permissions
3346
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
2809
3347
  * @permissionScope Manage eCommerce - all permissions
2810
3348
  * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
2811
3349
  * @applicableIdentity APP
@@ -2819,29 +3357,35 @@ export interface CreateCartOptions {
2819
3357
  cartInfo?: Cart;
2820
3358
  /** The code of an existing coupon to apply to the cart. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */
2821
3359
  couponCode?: string | null;
2822
- /** Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will apply to the whole cart. */
3360
+ /**
3361
+ * Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will apply to the whole cart.
3362
+ * @maxSize 100
3363
+ */
2823
3364
  merchantDiscounts?: MerchantDiscountInput[];
2824
- /** Catalog line items. */
3365
+ /**
3366
+ * Catalog line items.
3367
+ * @maxSize 300
3368
+ */
2825
3369
  lineItems?: LineItem[];
2826
3370
  /**
2827
3371
  * Custom line items. Custom line items don't trigger the Catalog service plugin.
2828
3372
  *
2829
3373
  * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
2830
3374
  * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
3375
+ * @maxSize 300
2831
3376
  */
2832
3377
  customLineItems?: CustomLineItem[];
2833
3378
  }
2834
3379
  /**
2835
3380
  * Updates a specified cart's properties.
2836
3381
  *
2837
- *
2838
- * The `updateCart()` function returns a Promise that resolves when the specified cart's properties are updated.
3382
+ * After a cart is updated, call `refreshCart()` to update the cart's UI elements and trigger the `onCartChange()` event.
2839
3383
  *
2840
3384
  * > **Note:** When updating catalog items, `options.lineItems.catalogReference` is required.
2841
3385
  * @public
2842
3386
  * @requiredField _id
2843
- * @requiredField options.customLineItems.descriptionLines
2844
3387
  * @requiredField options.customLineItems.descriptionLines.name
3388
+ * @requiredField options.customLineItems.descriptionLines.value
2845
3389
  * @requiredField options.customLineItems.itemType
2846
3390
  * @requiredField options.customLineItems.productName
2847
3391
  * @requiredField options.lineItems.catalogReference
@@ -2851,12 +3395,16 @@ export interface CreateCartOptions {
2851
3395
  * @permissionId ECOM.ADMIN_MODIFY_CARTS
2852
3396
  * @permissionScope Manage Stores - all permissions
2853
3397
  * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3398
+ * @permissionScope Manage Restaurants - all permissions
3399
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
2854
3400
  * @permissionScope Manage eCommerce - all permissions
2855
3401
  * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
2856
3402
  * @permissionScope Manage Stores - all permissions
2857
3403
  * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
2858
3404
  * @permissionScope Manage eCommerce - Admin Permissions
2859
3405
  * @permissionScopeId SCOPE.ECOM.MANAGE-ADMIN
3406
+ * @permissionScope Manage Restaurants - all permissions
3407
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
2860
3408
  * @permissionScope Manage eCommerce - all permissions
2861
3409
  * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
2862
3410
  * @applicableIdentity APP
@@ -2868,19 +3416,28 @@ export declare function updateCart(_id: string | null, options?: UpdateCartOptio
2868
3416
  export interface UpdateCartOptions {
2869
3417
  /** The information for the cart being updated. */
2870
3418
  cartInfo: {
2871
- /** ID of the cart to be updated. */
3419
+ /**
3420
+ * ID of the cart to be updated.
3421
+ * @format GUID
3422
+ */
2872
3423
  _id?: string | null;
2873
3424
  /**
2874
3425
  * Line items.
3426
+ * @minSize 1
3427
+ * @maxSize 300
2875
3428
  * @readonly
2876
3429
  */
2877
3430
  lineItems?: LineItem[];
2878
- /** [Buyer note](https://support.wix.com/en/article/wix-stores-viewing-buyer-notes) left by the customer. */
3431
+ /**
3432
+ * [Buyer note](https://support.wix.com/en/article/wix-stores-viewing-buyer-notes) left by the customer.
3433
+ * @maxLength 1000
3434
+ */
2879
3435
  buyerNote?: string | null;
2880
3436
  /** Buyer information. */
2881
3437
  buyerInfo?: BuyerInfo;
2882
3438
  /**
2883
3439
  * Currency used for pricing.
3440
+ * @format CURRENCY
2884
3441
  * @readonly
2885
3442
  */
2886
3443
  currency?: string;
@@ -2888,6 +3445,7 @@ export interface UpdateCartOptions {
2888
3445
  * Currency code used for all the converted prices that are returned.
2889
3446
  * For a site that supports multiple currencies, this is the currency the buyer selected.
2890
3447
  * @readonly
3448
+ * @format CURRENCY
2891
3449
  */
2892
3450
  conversionCurrency?: string;
2893
3451
  /**
@@ -2914,6 +3472,7 @@ export interface UpdateCartOptions {
2914
3472
  /**
2915
3473
  * ID of the checkout that originated from this cart.
2916
3474
  * @readonly
3475
+ * @format GUID
2917
3476
  */
2918
3477
  checkoutId?: string | null;
2919
3478
  /**
@@ -2937,10 +3496,12 @@ export interface UpdateCartOptions {
2937
3496
  * `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page.
2938
3497
  *
2939
3498
  * This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
3499
+ * @maxLength 1000
2940
3500
  */
2941
3501
  overrideCheckoutUrl?: string | null;
2942
3502
  /**
2943
3503
  * Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.
3504
+ * @format GUID
2944
3505
  * @readonly
2945
3506
  */
2946
3507
  purchaseFlowId?: string | null;
@@ -2949,20 +3510,28 @@ export interface UpdateCartOptions {
2949
3510
  /**
2950
3511
  * The business location ID associated with the cart.
2951
3512
  * Learn more about the [Locations API](https://dev.wix.com/docs/rest/business-management/locations/introduction).
3513
+ * @format GUID
2952
3514
  */
2953
3515
  businessLocationId?: string | null;
2954
3516
  };
2955
3517
  /** The code of an existing coupon to apply to the cart. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */
2956
3518
  couponCode?: string | null;
2957
- /** Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will be applied to the whole cart. */
3519
+ /**
3520
+ * Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will be applied to the whole cart.
3521
+ * @maxSize 100
3522
+ */
2958
3523
  merchantDiscounts?: MerchantDiscountInput[];
2959
- /** Catalog line items. */
3524
+ /**
3525
+ * Catalog line items.
3526
+ * @maxSize 300
3527
+ */
2960
3528
  lineItems?: LineItem[];
2961
3529
  /**
2962
3530
  * Custom line items. Custom line items don't trigger the Catalog service plugin.
2963
3531
  *
2964
3532
  * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
2965
3533
  * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
3534
+ * @maxSize 300
2966
3535
  */
2967
3536
  customLineItems?: CustomLineItem[];
2968
3537
  }
@@ -3024,15 +3593,14 @@ export declare function getCartByCheckoutId(_id: string): Promise<GetCartByCheck
3024
3593
  /**
3025
3594
  * Adds catalog line items to a cart.
3026
3595
  *
3027
- *
3028
- * The `addToCart()` function returns a Promise that resolves to the updated cart when the specified items have been added.
3596
+ * After a cart is updated, call `refreshCart()` to update the cart's UI elements and trigger the `onCartChange()` event.
3029
3597
  *
3030
3598
  * > **Note:** When adding catalog items, `options.lineItems.catalogReference` is required.
3031
3599
  * @param _id - Cart ID.
3032
3600
  * @public
3033
3601
  * @requiredField _id
3034
- * @requiredField options.customLineItems.descriptionLines
3035
3602
  * @requiredField options.customLineItems.descriptionLines.name
3603
+ * @requiredField options.customLineItems.descriptionLines.value
3036
3604
  * @requiredField options.customLineItems.itemType
3037
3605
  * @requiredField options.customLineItems.price
3038
3606
  * @requiredField options.customLineItems.productName
@@ -3045,12 +3613,16 @@ export declare function getCartByCheckoutId(_id: string): Promise<GetCartByCheck
3045
3613
  * @permissionId ECOM.ADMIN_MODIFY_CARTS
3046
3614
  * @permissionScope Manage Stores - all permissions
3047
3615
  * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3616
+ * @permissionScope Manage Restaurants - all permissions
3617
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
3048
3618
  * @permissionScope Manage eCommerce - all permissions
3049
3619
  * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
3050
3620
  * @permissionScope Manage Stores - all permissions
3051
3621
  * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3052
3622
  * @permissionScope Manage eCommerce - Admin Permissions
3053
3623
  * @permissionScopeId SCOPE.ECOM.MANAGE-ADMIN
3624
+ * @permissionScope Manage Restaurants - all permissions
3625
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
3054
3626
  * @permissionScope Manage eCommerce - all permissions
3055
3627
  * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
3056
3628
  * @applicableIdentity APP
@@ -3060,27 +3632,31 @@ export declare function getCartByCheckoutId(_id: string): Promise<GetCartByCheck
3060
3632
  */
3061
3633
  export declare function addToCart(_id: string, options?: AddToCartOptions): Promise<AddToCartResponse & AddToCartResponseNonNullableFields>;
3062
3634
  export interface AddToCartOptions {
3063
- /** Catalog line items. */
3635
+ /**
3636
+ * Catalog line items.
3637
+ * @maxSize 100
3638
+ */
3064
3639
  lineItems?: LineItem[];
3065
3640
  /**
3066
3641
  * Custom line items. Custom line items don't trigger the Catalog service plugin.
3067
3642
  *
3068
3643
  * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
3069
3644
  * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
3645
+ * @maxSize 100
3070
3646
  */
3071
3647
  customLineItems?: CustomLineItem[];
3072
3648
  /**
3073
3649
  * The business location ID associated with the cart.
3074
3650
  * The `businessLocationId` field cannot be passed if one already exists on the cart. To update a cart's business location ID, use the UpdateCart method.
3075
3651
  * Learn more about the [Locations API](https://dev.wix.com/docs/rest/business-management/locations/introduction).
3652
+ * @format GUID
3076
3653
  */
3077
3654
  businessLocationId?: string | null;
3078
3655
  }
3079
3656
  /**
3080
3657
  * Removes line items from the specified cart.
3081
3658
  *
3082
- *
3083
- * The `removeLineItems()` function returns a Promise that resolves to the updated cart when the line items are removed from the specified cart.
3659
+ * After a cart is updated, call `refreshCart()` to update the cart's UI elements and trigger the `onCartChange()` event.
3084
3660
  * @public
3085
3661
  * @requiredField _id
3086
3662
  * @requiredField lineItemIds
@@ -3089,6 +3665,8 @@ export interface AddToCartOptions {
3089
3665
  * @permissionId ECOM.MODIFY_CARTS
3090
3666
  * @permissionScope Manage Stores - all permissions
3091
3667
  * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3668
+ * @permissionScope Manage Restaurants - all permissions
3669
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
3092
3670
  * @permissionScope Manage eCommerce - all permissions
3093
3671
  * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
3094
3672
  * @applicableIdentity APP
@@ -3135,20 +3713,24 @@ export interface CreateCheckoutOptions {
3135
3713
  billingAddress?: Address;
3136
3714
  /** Selected shipping option. */
3137
3715
  selectedShippingOption?: SelectedShippingOption;
3138
- /** Mandatory when setting a billing or shipping address if the site visitor isn't logged in. */
3716
+ /**
3717
+ * Mandatory when setting a billing or shipping address if the site visitor isn't logged in.
3718
+ * @format EMAIL
3719
+ */
3139
3720
  email?: string | null;
3140
3721
  }
3141
3722
  /**
3142
3723
  * Removes the coupon from a specified cart.
3143
3724
  *
3144
- *
3145
- * The `removeCoupon()` function returns a Promise that resolves to the updated cart when the coupon is removed from the specified cart.
3725
+ * After a cart is updated, call `refreshCart()` to update the cart's UI elements and trigger the `onCartChange()` event.
3146
3726
  * @param _id - Cart ID.
3147
3727
  * @public
3148
3728
  * @requiredField _id
3149
3729
  * @permissionId ECOM.MODIFY_CARTS
3150
3730
  * @permissionScope Manage Stores - all permissions
3151
3731
  * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3732
+ * @permissionScope Manage Restaurants - all permissions
3733
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
3152
3734
  * @permissionScope Manage eCommerce - all permissions
3153
3735
  * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
3154
3736
  * @applicableIdentity APP
@@ -3160,12 +3742,11 @@ export declare function removeCoupon(_id: string): Promise<RemoveCouponResponse
3160
3742
  /**
3161
3743
  * Updates the quantity of one or more line items in a specified cart.
3162
3744
  *
3745
+ * After a cart is updated, call `refreshCart()` to update the cart's UI elements and trigger the `onCartChange()` event.
3163
3746
  *
3164
- * The `updateLineItemsQuantity()` function returns a Promise that resolves when the quantities of the specified cart's line items are updated.
3747
+ * This method is only for updating the quantity of line items. To entirely remove a line item from the cart, use `removeLineItems()`. To add a new line item to the cart, use `addToCart()`.
3165
3748
  *
3166
- * This endpoint is only for updating the quantity of line items. To entirely remove a line item from the cart, use [`removeLineItems()`](#removelineitems). To add a new line item to the cart, use [`addToCart()`](#addtocart).
3167
- *
3168
- * This endpoint checks the amount of stock remaining for this line item. If the specified `quantity` is greater than the remaining stock, then the `quantity` returned in the response is the total amount of remaining stock.
3749
+ * This method checks the amount of stock remaining for this line item. If the specified `quantity` is greater than the remaining stock, then the `quantity` returned in the response is the total amount of remaining stock.
3169
3750
  * @param _id - Cart ID.
3170
3751
  * @param lineItems - Line item IDs and their new quantity.
3171
3752
  * @public
@@ -3174,6 +3755,8 @@ export declare function removeCoupon(_id: string): Promise<RemoveCouponResponse
3174
3755
  * @permissionId ECOM.MODIFY_CARTS
3175
3756
  * @permissionScope Manage Stores - all permissions
3176
3757
  * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3758
+ * @permissionScope Manage Restaurants - all permissions
3759
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
3177
3760
  * @permissionScope Manage eCommerce - all permissions
3178
3761
  * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
3179
3762
  * @applicableIdentity APP
@@ -3247,6 +3830,8 @@ export interface EstimateTotalsOptions {
3247
3830
  * @permissionId ECOM.MODIFY_CARTS
3248
3831
  * @permissionScope Manage Stores - all permissions
3249
3832
  * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3833
+ * @permissionScope Manage Restaurants - all permissions
3834
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
3250
3835
  * @permissionScope Manage eCommerce - all permissions
3251
3836
  * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
3252
3837
  * @applicableIdentity APP
@@ -3264,6 +3849,8 @@ export declare function deleteCart(_id: string): Promise<void>;
3264
3849
  * @permissionId ECOM.MODIFY_CARTS
3265
3850
  * @permissionScope Manage Stores - all permissions
3266
3851
  * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3852
+ * @permissionScope Manage Restaurants - all permissions
3853
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
3267
3854
  * @permissionScope Manage eCommerce - all permissions
3268
3855
  * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
3269
3856
  * @applicableIdentity APP