@wix/referral 1.0.9 → 1.0.11

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.
@@ -1,54 +1,75 @@
1
- /** ReferralProgram is the main entity of ReferralPrograms that can be used to manage the program. */
2
1
  interface ReferralProgram$1 {
3
2
  /** Referral program name. */
4
3
  name?: string | null;
5
4
  /**
6
- * Referral program status.
5
+ * The status of the referral program. Possible values:
6
+ *
7
+ * - `UNKNOWN`: Status is unknown. This value is never used.
8
+ * - `DRAFT`: Referral program is in a draft state and is currently being modified. Not yet active.
9
+ * - `ACTIVE`: Referral program is active.
10
+ * - `PAUSED`: Referral program is paused.
7
11
  * @readonly
8
12
  */
9
13
  status?: ProgramStatus$1;
10
- /** Represents the current state of an item. Each time the item is modified, its `revision` changes. for an update operation to succeed, you MUST pass the latest revision. */
14
+ /** Revision number, which increments by 1 each time the program is updated. To prevent conflicting changes, the current `revision` must be passed when updating the program. */
11
15
  revision?: string | null;
12
16
  /**
13
- * Program's creation date and time.
17
+ * Date and time the program was created.
14
18
  * @readonly
15
19
  */
16
20
  createdDate?: Date;
17
21
  /**
18
- * Program's last update date and time
22
+ * Date and time the program was updated.
19
23
  * @readonly
20
24
  */
21
25
  updatedDate?: Date;
22
- /** Referred friend reward configuration. */
26
+ /**
27
+ * Reward configuration for the referred friend.
28
+ * Specifies the reward given to a new customer who was referred to the business.
29
+ */
23
30
  referredFriendReward?: Reward$3;
24
- /** Referring customer reward configuration. */
31
+ /**
32
+ * Reward configuration for the referring customer.
33
+ * Specifies the reward given to an existing customer who referred a new customer to the business.
34
+ */
25
35
  referringCustomerReward?: Reward$3;
26
- /** List of actions that complete referral. */
36
+ /**
37
+ * A list of actions that complete a referral. For an action to be considered successful, the referred friend must place and pay for an order.
38
+ *
39
+ * Possible values:
40
+ *
41
+ * - `UNKNOWN`: Action is unknown.
42
+ * - `STORE_ORDER_PLACED`: Referred friend ordered and paid for an order in a store.
43
+ * - `PLAN_ORDERED`: Referred friend ordered and paid for a plan.
44
+ * - `TICKET_ORDERED`: Referred friend ordered and paid for a ticket.
45
+ * - `SESSION_BOOKED`: Referred friend booked and paid for a session.
46
+ * - `RESTAURANT_ORDER_PLACED`: Referred friend placed and paid for a restaurant order.
47
+ */
27
48
  successfulReferralActions?: Action$1[];
28
49
  /**
29
- * Set to true if user has required plan to activate program.
50
+ * Whether the user has the required plan to use the referral program.
30
51
  * @readonly
31
- * @deprecated Set to true if user has required plan to activate program.
52
+ * @deprecated Whether the user has the required plan to use the referral program.
32
53
  * @replacedBy GetReferralProgramPremiumFeatures
33
54
  * @targetRemovalDate 2024-09-01
34
55
  */
35
56
  isPremium?: boolean;
36
- /** Emails configuration. */
57
+ /** Configures email notifications for the referral program. */
37
58
  emails?: Emails$1;
38
59
  /**
39
- * Information about available premium features
60
+ * Indicates which premium features are available for the current account.
40
61
  * @readonly
41
62
  */
42
63
  premiumFeatures?: PremiumFeatures$1;
43
64
  }
44
65
  declare enum ProgramStatus$1 {
45
- /** unknown status. */
66
+ /** Program status is unknown. */
46
67
  UNKNOWN = "UNKNOWN",
47
- /** initial program status (program was created but was not enabled yet). */
68
+ /** Initial program status. The program was created but not activated. */
48
69
  DRAFT = "DRAFT",
49
- /** program is active. */
70
+ /** Program is active. */
50
71
  ACTIVE = "ACTIVE",
51
- /** program was manually disabled by the user (this action can be reverted, meaning user can set it to be active again). */
72
+ /** Program was manually disabled by the user. Can be reactivated. */
52
73
  PAUSED = "PAUSED"
53
74
  }
54
75
  interface Reward$3 extends RewardOptionsOneOf$1 {
@@ -77,37 +98,56 @@ declare enum Type$1 {
77
98
  NOTHING = "NOTHING"
78
99
  }
79
100
  interface Coupon$5 extends CouponDiscountTypeOptionsOneOf$5, CouponScopeOrMinSubtotalOneOf$5 {
80
- /** Options for fixed amount discount type. */
101
+ /** Options for fixed amount discount. */
81
102
  fixedAmountOptions?: FixedAmountDiscount$5;
82
- /** Options for percentage discount type. */
103
+ /** Options for percentage discount. */
83
104
  percentageOptions?: PercentageDiscount$5;
84
105
  /** Limit the coupon to carts with a subtotal above this number. */
85
106
  minimumSubtotal?: number;
86
- /** Specifies the type of line items this coupon will apply to. */
107
+ /** Specifies the type of line items this coupon will apply to. See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */
87
108
  scope?: CouponScope$5;
88
109
  /** Coupon name. */
89
110
  name?: string;
90
- /** Coupon discount type. */
111
+ /**
112
+ * Coupon discount type.
113
+ *
114
+ * - `UNKNOWN`: Unknown discount type.
115
+ * - `FIXED_AMOUNT`: Discount as a fixed amount.
116
+ * - `PERCENTAGE`: Discount as a perctange.
117
+ * - `FREE_SHIPPING`: Free shipping. If `true`, the coupon applies to all items in all `namespaces`.
118
+ */
91
119
  discountType?: DiscountType$5;
92
- /** Limit the coupon to only apply to one item in cart. */
120
+ /**
121
+ * Whether the coupon is limited to one item.
122
+ * If `true` and a customer pays for multiple items, the discount applies to only the lowest priced item.
123
+ * Coupons with a bookings `scope.namespace` are always limited to one item.
124
+ */
93
125
  limitedToOneItem?: boolean | null;
94
- /** If true, coupon also applies to subscriptions. */
126
+ /** Whether the coupon applies to subscription products. */
95
127
  appliesToSubscriptions?: boolean | null;
96
- /** Specifies the amount of discounted cycles for subscription item. See Stores Coupons documentation for more info. */
128
+ /**
129
+ * Specifies the amount of discounted cycles for a subscription item.
130
+ *
131
+ * - Can only be set when `scope.namespace = pricingPlans`.
132
+ * - If `discountedCycleCount` is empty, the coupon applies to all available cycles.
133
+ * - `discountedCycleCount` is ignored if `appliesToSubscriptions = true`.
134
+ *
135
+ * Max: `999`
136
+ */
97
137
  discountedCycleCount?: number | null;
98
138
  }
99
139
  /** @oneof */
100
140
  interface CouponDiscountTypeOptionsOneOf$5 {
101
- /** Options for fixed amount discount type. */
141
+ /** Options for fixed amount discount. */
102
142
  fixedAmountOptions?: FixedAmountDiscount$5;
103
- /** Options for percentage discount type. */
143
+ /** Options for percentage discount. */
104
144
  percentageOptions?: PercentageDiscount$5;
105
145
  }
106
146
  /** @oneof */
107
147
  interface CouponScopeOrMinSubtotalOneOf$5 {
108
148
  /** Limit the coupon to carts with a subtotal above this number. */
109
149
  minimumSubtotal?: number;
110
- /** Specifies the type of line items this coupon will apply to. */
150
+ /** Specifies the type of line items this coupon will apply to. See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */
111
151
  scope?: CouponScope$5;
112
152
  }
113
153
  declare enum DiscountType$5 {
@@ -121,17 +161,17 @@ declare enum DiscountType$5 {
121
161
  FREE_SHIPPING = "FREE_SHIPPING"
122
162
  }
123
163
  interface FixedAmountDiscount$5 {
124
- /** Fixed amount to discount. */
164
+ /** Amount of discount as a fixed value. */
125
165
  amount?: number;
126
166
  }
127
167
  interface PercentageDiscount$5 {
128
- /** Percentage to discount. */
168
+ /** Percentage of discount. */
129
169
  percentage?: number;
130
170
  }
131
171
  interface CouponScope$5 {
132
- /** Namespace of the coupon scope. */
172
+ /** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */
133
173
  namespace?: string;
134
- /** Group of the coupon scope. */
174
+ /** Coupon scope's applied group, for example: Event or ticket in Wix Events */
135
175
  group?: Group$5;
136
176
  }
137
177
  interface Group$5 {
@@ -141,7 +181,7 @@ interface Group$5 {
141
181
  entityId?: string | null;
142
182
  }
143
183
  interface LoyaltyPoints$3 {
144
- /** Amount of points to give. */
184
+ /** Number of loyalty points to give. */
145
185
  amount?: number;
146
186
  }
147
187
  declare enum Action$1 {
@@ -159,9 +199,20 @@ declare enum Action$1 {
159
199
  RESTAURANT_ORDER_PLACED = "RESTAURANT_ORDER_PLACED"
160
200
  }
161
201
  interface Emails$1 {
162
- /** Encourage customers to refer their friends email. Select for which apps to enable. */
202
+ /**
203
+ * Encourage customers to refer their friends via email. Select which apps to enable.
204
+ *
205
+ * Available apps:
206
+ *
207
+ * - `UNKNOWN`: Unknown email.
208
+ * - `STORES`: Send an email to customers who've placed an order with stores.
209
+ * - `PRICING_PLANS`: Send an email to customers who've placed an order with pricing plans.
210
+ * - `EVENTS`: Send an email to customers who've placed an order with events.
211
+ * - `BOOKINGS`: Send an email to customers who've placed an order with bookings.
212
+ * - `RESTAURANTS`: Send an email to customers who've placed an order with restaurants.
213
+ */
163
214
  encourageToReferFriends?: App$1[];
164
- /** Notify customers about their referral reward email. Set true to enable email. */
215
+ /** Whether to notify customers about their referral reward email. Set to `true` to enable email notifications. */
165
216
  notifyCustomersAboutReward?: boolean;
166
217
  }
167
218
  declare enum App$1 {
@@ -180,7 +231,7 @@ declare enum App$1 {
180
231
  }
181
232
  interface PremiumFeatures$1 {
182
233
  /**
183
- * Set to true if user has referral program feature.
234
+ * Whether the user has the referral program feature.
184
235
  * @readonly
185
236
  */
186
237
  referralProgram?: boolean;
@@ -188,11 +239,11 @@ interface PremiumFeatures$1 {
188
239
  interface GetReferralProgramRequest$1 {
189
240
  }
190
241
  interface GetReferralProgramResponse$1 {
191
- /** The retrieved ReferralProgram. */
242
+ /** Retrieved referral program. */
192
243
  referralProgram?: ReferralProgram$1;
193
244
  }
194
245
  interface QueryReferralProgramsRequest$1 {
195
- /** Query to filter ReferralPrograms. */
246
+ /** Query options. */
196
247
  query: CursorQuery$9;
197
248
  }
198
249
  interface CursorQuery$9 extends CursorQueryPagingMethodOneOf$9 {
@@ -246,13 +297,13 @@ interface CursorPaging$9 {
246
297
  cursor?: string | null;
247
298
  }
248
299
  interface QueryReferralProgramsResponse$1 {
249
- /** ReferralPrograms that match the query. */
300
+ /** Referral programs matching the query. */
250
301
  referralPrograms?: ReferralProgram$1[];
251
302
  /** Paging metadata. */
252
303
  pagingMetadata?: CursorPagingMetadata$9;
253
304
  }
254
305
  interface CursorPagingMetadata$9 {
255
- /** Number of items returned in the response. */
306
+ /** Number of items returned in current page. */
256
307
  count?: number | null;
257
308
  /** Cursor strings that point to the next page, previous page, or both. */
258
309
  cursors?: Cursors$9;
@@ -271,56 +322,56 @@ interface Cursors$9 {
271
322
  prev?: string | null;
272
323
  }
273
324
  interface UpdateReferralProgramRequest$1 {
274
- /** ReferralProgram to be updated, may be partial. */
325
+ /** Referral program to update. Include the latest `revision` for a successful update. */
275
326
  referralProgram: ReferralProgram$1;
276
327
  }
277
328
  interface UpdateReferralProgramResponse$1 {
278
- /** The updated ReferralProgram. */
329
+ /** Updated referral program. */
279
330
  referralProgram?: ReferralProgram$1;
280
331
  }
281
332
  interface ActivateReferralProgramRequest$1 {
282
333
  }
283
334
  interface ActivateReferralProgramResponse$1 {
284
- /** The activated ReferralProgram. */
335
+ /** Activated referral program. */
285
336
  referralProgram?: ReferralProgram$1;
286
337
  }
287
338
  interface PauseReferralProgramRequest$1 {
288
339
  }
289
340
  interface PauseReferralProgramResponse$1 {
290
- /** The paused ReferralProgram. */
341
+ /** Paused referral program. */
291
342
  referralProgram?: ReferralProgram$1;
292
343
  }
293
344
  interface GetAISocialMediaPostsSuggestionsRequest$1 {
294
- /** The topic to generate suggestions for. */
345
+ /** Topic to generate social media post suggestions for. */
295
346
  topic?: string;
296
347
  }
297
348
  interface GetAISocialMediaPostsSuggestionsResponse$1 {
298
- /** The generated suggestions. */
349
+ /** Generated social media post suggestions. */
299
350
  suggestions?: AISocialMediaPostSuggestion$1[];
300
- /** The refer friends page URL. */
351
+ /** Referral URL to refer friends. */
301
352
  referFriendsPageUrl?: string | null;
302
353
  }
303
354
  interface AISocialMediaPostSuggestion$1 {
304
- /** The suggested post content. */
355
+ /** Suggested post content. */
305
356
  postContent?: string;
306
- /** The suggested hashtags. */
357
+ /** Suggested hashtags. */
307
358
  hashtags?: string[];
308
359
  }
309
360
  interface GenerateAISocialMediaPostsSuggestionsRequest$1 {
310
- /** The topic to generate suggestions for. */
361
+ /** Topic to generate social media post suggestions for. */
311
362
  topic?: string;
312
363
  }
313
364
  interface GenerateAISocialMediaPostsSuggestionsResponse$1 {
314
- /** The generated suggestions. */
365
+ /** Generated social media post suggestions. */
315
366
  suggestions?: AISocialMediaPostSuggestion$1[];
316
- /** The refer friends page URL. */
367
+ /** Referral URL to refer friends. */
317
368
  referFriendsPageUrl?: string | null;
318
369
  }
319
370
  interface GetReferralProgramPremiumFeaturesRequest$1 {
320
371
  }
321
372
  interface GetReferralProgramPremiumFeaturesResponse$1 {
322
373
  /**
323
- * Set to true if user has referral program feature.
374
+ * Whether the site has the referral program feature enabled.
324
375
  * @readonly
325
376
  */
326
377
  referralProgram?: boolean;
@@ -399,57 +450,78 @@ interface GetReferralProgramPremiumFeaturesResponseNonNullableFields$1 {
399
450
  referralProgram: boolean;
400
451
  }
401
452
 
402
- /** ReferralProgram is the main entity of ReferralPrograms that can be used to manage the program. */
403
453
  interface ReferralProgram {
404
454
  /** Referral program name. */
405
455
  name?: string | null;
406
456
  /**
407
- * Referral program status.
457
+ * The status of the referral program. Possible values:
458
+ *
459
+ * - `UNKNOWN`: Status is unknown. This value is never used.
460
+ * - `DRAFT`: Referral program is in a draft state and is currently being modified. Not yet active.
461
+ * - `ACTIVE`: Referral program is active.
462
+ * - `PAUSED`: Referral program is paused.
408
463
  * @readonly
409
464
  */
410
465
  status?: ProgramStatus;
411
- /** Represents the current state of an item. Each time the item is modified, its `revision` changes. for an update operation to succeed, you MUST pass the latest revision. */
466
+ /** Revision number, which increments by 1 each time the program is updated. To prevent conflicting changes, the current `revision` must be passed when updating the program. */
412
467
  revision?: string | null;
413
468
  /**
414
- * Program's creation date and time.
469
+ * Date and time the program was created.
415
470
  * @readonly
416
471
  */
417
472
  _createdDate?: Date;
418
473
  /**
419
- * Program's last update date and time
474
+ * Date and time the program was updated.
420
475
  * @readonly
421
476
  */
422
477
  _updatedDate?: Date;
423
- /** Referred friend reward configuration. */
478
+ /**
479
+ * Reward configuration for the referred friend.
480
+ * Specifies the reward given to a new customer who was referred to the business.
481
+ */
424
482
  referredFriendReward?: Reward$2;
425
- /** Referring customer reward configuration. */
483
+ /**
484
+ * Reward configuration for the referring customer.
485
+ * Specifies the reward given to an existing customer who referred a new customer to the business.
486
+ */
426
487
  referringCustomerReward?: Reward$2;
427
- /** List of actions that complete referral. */
488
+ /**
489
+ * A list of actions that complete a referral. For an action to be considered successful, the referred friend must place and pay for an order.
490
+ *
491
+ * Possible values:
492
+ *
493
+ * - `UNKNOWN`: Action is unknown.
494
+ * - `STORE_ORDER_PLACED`: Referred friend ordered and paid for an order in a store.
495
+ * - `PLAN_ORDERED`: Referred friend ordered and paid for a plan.
496
+ * - `TICKET_ORDERED`: Referred friend ordered and paid for a ticket.
497
+ * - `SESSION_BOOKED`: Referred friend booked and paid for a session.
498
+ * - `RESTAURANT_ORDER_PLACED`: Referred friend placed and paid for a restaurant order.
499
+ */
428
500
  successfulReferralActions?: Action[];
429
501
  /**
430
- * Set to true if user has required plan to activate program.
502
+ * Whether the user has the required plan to use the referral program.
431
503
  * @readonly
432
- * @deprecated Set to true if user has required plan to activate program.
504
+ * @deprecated Whether the user has the required plan to use the referral program.
433
505
  * @replacedBy GetReferralProgramPremiumFeatures
434
506
  * @targetRemovalDate 2024-09-01
435
507
  */
436
508
  isPremium?: boolean;
437
- /** Emails configuration. */
509
+ /** Configures email notifications for the referral program. */
438
510
  emails?: Emails;
439
511
  /**
440
- * Information about available premium features
512
+ * Indicates which premium features are available for the current account.
441
513
  * @readonly
442
514
  */
443
515
  premiumFeatures?: PremiumFeatures;
444
516
  }
445
517
  declare enum ProgramStatus {
446
- /** unknown status. */
518
+ /** Program status is unknown. */
447
519
  UNKNOWN = "UNKNOWN",
448
- /** initial program status (program was created but was not enabled yet). */
520
+ /** Initial program status. The program was created but not activated. */
449
521
  DRAFT = "DRAFT",
450
- /** program is active. */
522
+ /** Program is active. */
451
523
  ACTIVE = "ACTIVE",
452
- /** program was manually disabled by the user (this action can be reverted, meaning user can set it to be active again). */
524
+ /** Program was manually disabled by the user. Can be reactivated. */
453
525
  PAUSED = "PAUSED"
454
526
  }
455
527
  interface Reward$2 extends RewardOptionsOneOf {
@@ -478,37 +550,56 @@ declare enum Type {
478
550
  NOTHING = "NOTHING"
479
551
  }
480
552
  interface Coupon$4 extends CouponDiscountTypeOptionsOneOf$4, CouponScopeOrMinSubtotalOneOf$4 {
481
- /** Options for fixed amount discount type. */
553
+ /** Options for fixed amount discount. */
482
554
  fixedAmountOptions?: FixedAmountDiscount$4;
483
- /** Options for percentage discount type. */
555
+ /** Options for percentage discount. */
484
556
  percentageOptions?: PercentageDiscount$4;
485
557
  /** Limit the coupon to carts with a subtotal above this number. */
486
558
  minimumSubtotal?: number;
487
- /** Specifies the type of line items this coupon will apply to. */
559
+ /** Specifies the type of line items this coupon will apply to. See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */
488
560
  scope?: CouponScope$4;
489
561
  /** Coupon name. */
490
562
  name?: string;
491
- /** Coupon discount type. */
563
+ /**
564
+ * Coupon discount type.
565
+ *
566
+ * - `UNKNOWN`: Unknown discount type.
567
+ * - `FIXED_AMOUNT`: Discount as a fixed amount.
568
+ * - `PERCENTAGE`: Discount as a perctange.
569
+ * - `FREE_SHIPPING`: Free shipping. If `true`, the coupon applies to all items in all `namespaces`.
570
+ */
492
571
  discountType?: DiscountType$4;
493
- /** Limit the coupon to only apply to one item in cart. */
572
+ /**
573
+ * Whether the coupon is limited to one item.
574
+ * If `true` and a customer pays for multiple items, the discount applies to only the lowest priced item.
575
+ * Coupons with a bookings `scope.namespace` are always limited to one item.
576
+ */
494
577
  limitedToOneItem?: boolean | null;
495
- /** If true, coupon also applies to subscriptions. */
578
+ /** Whether the coupon applies to subscription products. */
496
579
  appliesToSubscriptions?: boolean | null;
497
- /** Specifies the amount of discounted cycles for subscription item. See Stores Coupons documentation for more info. */
580
+ /**
581
+ * Specifies the amount of discounted cycles for a subscription item.
582
+ *
583
+ * - Can only be set when `scope.namespace = pricingPlans`.
584
+ * - If `discountedCycleCount` is empty, the coupon applies to all available cycles.
585
+ * - `discountedCycleCount` is ignored if `appliesToSubscriptions = true`.
586
+ *
587
+ * Max: `999`
588
+ */
498
589
  discountedCycleCount?: number | null;
499
590
  }
500
591
  /** @oneof */
501
592
  interface CouponDiscountTypeOptionsOneOf$4 {
502
- /** Options for fixed amount discount type. */
593
+ /** Options for fixed amount discount. */
503
594
  fixedAmountOptions?: FixedAmountDiscount$4;
504
- /** Options for percentage discount type. */
595
+ /** Options for percentage discount. */
505
596
  percentageOptions?: PercentageDiscount$4;
506
597
  }
507
598
  /** @oneof */
508
599
  interface CouponScopeOrMinSubtotalOneOf$4 {
509
600
  /** Limit the coupon to carts with a subtotal above this number. */
510
601
  minimumSubtotal?: number;
511
- /** Specifies the type of line items this coupon will apply to. */
602
+ /** Specifies the type of line items this coupon will apply to. See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */
512
603
  scope?: CouponScope$4;
513
604
  }
514
605
  declare enum DiscountType$4 {
@@ -522,17 +613,17 @@ declare enum DiscountType$4 {
522
613
  FREE_SHIPPING = "FREE_SHIPPING"
523
614
  }
524
615
  interface FixedAmountDiscount$4 {
525
- /** Fixed amount to discount. */
616
+ /** Amount of discount as a fixed value. */
526
617
  amount?: number;
527
618
  }
528
619
  interface PercentageDiscount$4 {
529
- /** Percentage to discount. */
620
+ /** Percentage of discount. */
530
621
  percentage?: number;
531
622
  }
532
623
  interface CouponScope$4 {
533
- /** Namespace of the coupon scope. */
624
+ /** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */
534
625
  namespace?: string;
535
- /** Group of the coupon scope. */
626
+ /** Coupon scope's applied group, for example: Event or ticket in Wix Events */
536
627
  group?: Group$4;
537
628
  }
538
629
  interface Group$4 {
@@ -542,7 +633,7 @@ interface Group$4 {
542
633
  entityId?: string | null;
543
634
  }
544
635
  interface LoyaltyPoints$2 {
545
- /** Amount of points to give. */
636
+ /** Number of loyalty points to give. */
546
637
  amount?: number;
547
638
  }
548
639
  declare enum Action {
@@ -560,9 +651,20 @@ declare enum Action {
560
651
  RESTAURANT_ORDER_PLACED = "RESTAURANT_ORDER_PLACED"
561
652
  }
562
653
  interface Emails {
563
- /** Encourage customers to refer their friends email. Select for which apps to enable. */
654
+ /**
655
+ * Encourage customers to refer their friends via email. Select which apps to enable.
656
+ *
657
+ * Available apps:
658
+ *
659
+ * - `UNKNOWN`: Unknown email.
660
+ * - `STORES`: Send an email to customers who've placed an order with stores.
661
+ * - `PRICING_PLANS`: Send an email to customers who've placed an order with pricing plans.
662
+ * - `EVENTS`: Send an email to customers who've placed an order with events.
663
+ * - `BOOKINGS`: Send an email to customers who've placed an order with bookings.
664
+ * - `RESTAURANTS`: Send an email to customers who've placed an order with restaurants.
665
+ */
564
666
  encourageToReferFriends?: App[];
565
- /** Notify customers about their referral reward email. Set true to enable email. */
667
+ /** Whether to notify customers about their referral reward email. Set to `true` to enable email notifications. */
566
668
  notifyCustomersAboutReward?: boolean;
567
669
  }
568
670
  declare enum App {
@@ -581,7 +683,7 @@ declare enum App {
581
683
  }
582
684
  interface PremiumFeatures {
583
685
  /**
584
- * Set to true if user has referral program feature.
686
+ * Whether the user has the referral program feature.
585
687
  * @readonly
586
688
  */
587
689
  referralProgram?: boolean;
@@ -589,11 +691,11 @@ interface PremiumFeatures {
589
691
  interface GetReferralProgramRequest {
590
692
  }
591
693
  interface GetReferralProgramResponse {
592
- /** The retrieved ReferralProgram. */
694
+ /** Retrieved referral program. */
593
695
  referralProgram?: ReferralProgram;
594
696
  }
595
697
  interface QueryReferralProgramsRequest {
596
- /** Query to filter ReferralPrograms. */
698
+ /** Query options. */
597
699
  query: CursorQuery$8;
598
700
  }
599
701
  interface CursorQuery$8 extends CursorQueryPagingMethodOneOf$8 {
@@ -647,13 +749,13 @@ interface CursorPaging$8 {
647
749
  cursor?: string | null;
648
750
  }
649
751
  interface QueryReferralProgramsResponse {
650
- /** ReferralPrograms that match the query. */
752
+ /** Referral programs matching the query. */
651
753
  referralPrograms?: ReferralProgram[];
652
754
  /** Paging metadata. */
653
755
  pagingMetadata?: CursorPagingMetadata$8;
654
756
  }
655
757
  interface CursorPagingMetadata$8 {
656
- /** Number of items returned in the response. */
758
+ /** Number of items returned in current page. */
657
759
  count?: number | null;
658
760
  /** Cursor strings that point to the next page, previous page, or both. */
659
761
  cursors?: Cursors$8;
@@ -672,56 +774,56 @@ interface Cursors$8 {
672
774
  prev?: string | null;
673
775
  }
674
776
  interface UpdateReferralProgramRequest {
675
- /** ReferralProgram to be updated, may be partial. */
777
+ /** Referral program to update. Include the latest `revision` for a successful update. */
676
778
  referralProgram: ReferralProgram;
677
779
  }
678
780
  interface UpdateReferralProgramResponse {
679
- /** The updated ReferralProgram. */
781
+ /** Updated referral program. */
680
782
  referralProgram?: ReferralProgram;
681
783
  }
682
784
  interface ActivateReferralProgramRequest {
683
785
  }
684
786
  interface ActivateReferralProgramResponse {
685
- /** The activated ReferralProgram. */
787
+ /** Activated referral program. */
686
788
  referralProgram?: ReferralProgram;
687
789
  }
688
790
  interface PauseReferralProgramRequest {
689
791
  }
690
792
  interface PauseReferralProgramResponse {
691
- /** The paused ReferralProgram. */
793
+ /** Paused referral program. */
692
794
  referralProgram?: ReferralProgram;
693
795
  }
694
796
  interface GetAISocialMediaPostsSuggestionsRequest {
695
- /** The topic to generate suggestions for. */
797
+ /** Topic to generate social media post suggestions for. */
696
798
  topic?: string;
697
799
  }
698
800
  interface GetAISocialMediaPostsSuggestionsResponse {
699
- /** The generated suggestions. */
801
+ /** Generated social media post suggestions. */
700
802
  suggestions?: AISocialMediaPostSuggestion[];
701
- /** The refer friends page URL. */
803
+ /** Referral URL to refer friends. */
702
804
  referFriendsPageUrl?: string | null;
703
805
  }
704
806
  interface AISocialMediaPostSuggestion {
705
- /** The suggested post content. */
807
+ /** Suggested post content. */
706
808
  postContent?: string;
707
- /** The suggested hashtags. */
809
+ /** Suggested hashtags. */
708
810
  hashtags?: string[];
709
811
  }
710
812
  interface GenerateAISocialMediaPostsSuggestionsRequest {
711
- /** The topic to generate suggestions for. */
813
+ /** Topic to generate social media post suggestions for. */
712
814
  topic?: string;
713
815
  }
714
816
  interface GenerateAISocialMediaPostsSuggestionsResponse {
715
- /** The generated suggestions. */
817
+ /** Generated social media post suggestions. */
716
818
  suggestions?: AISocialMediaPostSuggestion[];
717
- /** The refer friends page URL. */
819
+ /** Referral URL to refer friends. */
718
820
  referFriendsPageUrl?: string | null;
719
821
  }
720
822
  interface GetReferralProgramPremiumFeaturesRequest {
721
823
  }
722
824
  interface GetReferralProgramPremiumFeaturesResponse {
723
825
  /**
724
- * Set to true if user has referral program feature.
826
+ * Whether the site has the referral program feature enabled.
725
827
  * @readonly
726
828
  */
727
829
  referralProgram?: boolean;
@@ -952,26 +1054,32 @@ interface QueryReferralEventRequest$1 {
952
1054
  query: CursorQuery$7;
953
1055
  }
954
1056
  interface CursorQuery$7 extends CursorQueryPagingMethodOneOf$7 {
955
- /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
1057
+ /**
1058
+ * Cursor paging options.
1059
+ *
1060
+ * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
1061
+ */
956
1062
  cursorPaging?: CursorPaging$7;
957
1063
  /**
958
- * Filter object in the following format:
959
- * `"filter" : {
960
- * "fieldName1": "value1",
961
- * "fieldName2":{"$operator":"value2"}
962
- * }`
963
- * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
1064
+ * Filter object.
1065
+ *
1066
+ * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
964
1067
  */
965
1068
  filter?: Record<string, any> | null;
966
1069
  /**
967
- * Sort object in the following format:
968
- * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
1070
+ * Sort object.
1071
+ *
1072
+ * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
969
1073
  */
970
1074
  sort?: Sorting$7[];
971
1075
  }
972
1076
  /** @oneof */
973
1077
  interface CursorQueryPagingMethodOneOf$7 {
974
- /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
1078
+ /**
1079
+ * Cursor paging options.
1080
+ *
1081
+ * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
1082
+ */
975
1083
  cursorPaging?: CursorPaging$7;
976
1084
  }
977
1085
  interface Sorting$7 {
@@ -1002,7 +1110,7 @@ interface QueryReferralEventResponse$1 {
1002
1110
  metadata?: CursorPagingMetadata$7;
1003
1111
  }
1004
1112
  interface CursorPagingMetadata$7 {
1005
- /** Number of items returned in the response. */
1113
+ /** Number of items returned in current page. */
1006
1114
  count?: number | null;
1007
1115
  /** Cursor strings that point to the next page, previous page, or both. */
1008
1116
  cursors?: Cursors$7;
@@ -1171,37 +1279,56 @@ declare enum Status$5 {
1171
1279
  DELETED = "DELETED"
1172
1280
  }
1173
1281
  interface Coupon$3 extends CouponDiscountTypeOptionsOneOf$3, CouponScopeOrMinSubtotalOneOf$3 {
1174
- /** Options for fixed amount discount type. */
1282
+ /** Options for fixed amount discount. */
1175
1283
  fixedAmountOptions?: FixedAmountDiscount$3;
1176
- /** Options for percentage discount type. */
1284
+ /** Options for percentage discount. */
1177
1285
  percentageOptions?: PercentageDiscount$3;
1178
1286
  /** Limit the coupon to carts with a subtotal above this number. */
1179
1287
  minimumSubtotal?: number;
1180
- /** Specifies the type of line items this coupon will apply to. */
1288
+ /** Specifies the type of line items this coupon will apply to. See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */
1181
1289
  scope?: CouponScope$3;
1182
1290
  /** Coupon name. */
1183
1291
  name?: string;
1184
- /** Coupon discount type. */
1292
+ /**
1293
+ * Coupon discount type.
1294
+ *
1295
+ * - `UNKNOWN`: Unknown discount type.
1296
+ * - `FIXED_AMOUNT`: Discount as a fixed amount.
1297
+ * - `PERCENTAGE`: Discount as a perctange.
1298
+ * - `FREE_SHIPPING`: Free shipping. If `true`, the coupon applies to all items in all `namespaces`.
1299
+ */
1185
1300
  discountType?: DiscountType$3;
1186
- /** Limit the coupon to only apply to one item in cart. */
1301
+ /**
1302
+ * Whether the coupon is limited to one item.
1303
+ * If `true` and a customer pays for multiple items, the discount applies to only the lowest priced item.
1304
+ * Coupons with a bookings `scope.namespace` are always limited to one item.
1305
+ */
1187
1306
  limitedToOneItem?: boolean | null;
1188
- /** If true, coupon also applies to subscriptions. */
1307
+ /** Whether the coupon applies to subscription products. */
1189
1308
  appliesToSubscriptions?: boolean | null;
1190
- /** Specifies the amount of discounted cycles for subscription item. See Stores Coupons documentation for more info. */
1309
+ /**
1310
+ * Specifies the amount of discounted cycles for a subscription item.
1311
+ *
1312
+ * - Can only be set when `scope.namespace = pricingPlans`.
1313
+ * - If `discountedCycleCount` is empty, the coupon applies to all available cycles.
1314
+ * - `discountedCycleCount` is ignored if `appliesToSubscriptions = true`.
1315
+ *
1316
+ * Max: `999`
1317
+ */
1191
1318
  discountedCycleCount?: number | null;
1192
1319
  }
1193
1320
  /** @oneof */
1194
1321
  interface CouponDiscountTypeOptionsOneOf$3 {
1195
- /** Options for fixed amount discount type. */
1322
+ /** Options for fixed amount discount. */
1196
1323
  fixedAmountOptions?: FixedAmountDiscount$3;
1197
- /** Options for percentage discount type. */
1324
+ /** Options for percentage discount. */
1198
1325
  percentageOptions?: PercentageDiscount$3;
1199
1326
  }
1200
1327
  /** @oneof */
1201
1328
  interface CouponScopeOrMinSubtotalOneOf$3 {
1202
1329
  /** Limit the coupon to carts with a subtotal above this number. */
1203
1330
  minimumSubtotal?: number;
1204
- /** Specifies the type of line items this coupon will apply to. */
1331
+ /** Specifies the type of line items this coupon will apply to. See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */
1205
1332
  scope?: CouponScope$3;
1206
1333
  }
1207
1334
  declare enum DiscountType$3 {
@@ -1215,17 +1342,17 @@ declare enum DiscountType$3 {
1215
1342
  FREE_SHIPPING = "FREE_SHIPPING"
1216
1343
  }
1217
1344
  interface FixedAmountDiscount$3 {
1218
- /** Fixed amount to discount. */
1345
+ /** Amount of discount as a fixed value. */
1219
1346
  amount?: number;
1220
1347
  }
1221
1348
  interface PercentageDiscount$3 {
1222
- /** Percentage to discount. */
1349
+ /** Percentage of discount. */
1223
1350
  percentage?: number;
1224
1351
  }
1225
1352
  interface CouponScope$3 {
1226
- /** Namespace of the coupon scope. */
1353
+ /** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */
1227
1354
  namespace?: string;
1228
- /** Group of the coupon scope. */
1355
+ /** Coupon scope's applied group, for example: Event or ticket in Wix Events */
1229
1356
  group?: Group$3;
1230
1357
  }
1231
1358
  interface Group$3 {
@@ -1461,26 +1588,32 @@ interface QueryReferralEventRequest {
1461
1588
  query: CursorQuery$6;
1462
1589
  }
1463
1590
  interface CursorQuery$6 extends CursorQueryPagingMethodOneOf$6 {
1464
- /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
1591
+ /**
1592
+ * Cursor paging options.
1593
+ *
1594
+ * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
1595
+ */
1465
1596
  cursorPaging?: CursorPaging$6;
1466
1597
  /**
1467
- * Filter object in the following format:
1468
- * `"filter" : {
1469
- * "fieldName1": "value1",
1470
- * "fieldName2":{"$operator":"value2"}
1471
- * }`
1472
- * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
1598
+ * Filter object.
1599
+ *
1600
+ * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
1473
1601
  */
1474
1602
  filter?: Record<string, any> | null;
1475
1603
  /**
1476
- * Sort object in the following format:
1477
- * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
1604
+ * Sort object.
1605
+ *
1606
+ * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
1478
1607
  */
1479
1608
  sort?: Sorting$6[];
1480
1609
  }
1481
1610
  /** @oneof */
1482
1611
  interface CursorQueryPagingMethodOneOf$6 {
1483
- /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
1612
+ /**
1613
+ * Cursor paging options.
1614
+ *
1615
+ * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
1616
+ */
1484
1617
  cursorPaging?: CursorPaging$6;
1485
1618
  }
1486
1619
  interface Sorting$6 {
@@ -1511,7 +1644,7 @@ interface QueryReferralEventResponse {
1511
1644
  metadata?: CursorPagingMetadata$6;
1512
1645
  }
1513
1646
  interface CursorPagingMetadata$6 {
1514
- /** Number of items returned in the response. */
1647
+ /** Number of items returned in current page. */
1515
1648
  count?: number | null;
1516
1649
  /** Cursor strings that point to the next page, previous page, or both. */
1517
1650
  cursors?: Cursors$6;
@@ -1680,37 +1813,56 @@ declare enum Status$4 {
1680
1813
  DELETED = "DELETED"
1681
1814
  }
1682
1815
  interface Coupon$2 extends CouponDiscountTypeOptionsOneOf$2, CouponScopeOrMinSubtotalOneOf$2 {
1683
- /** Options for fixed amount discount type. */
1816
+ /** Options for fixed amount discount. */
1684
1817
  fixedAmountOptions?: FixedAmountDiscount$2;
1685
- /** Options for percentage discount type. */
1818
+ /** Options for percentage discount. */
1686
1819
  percentageOptions?: PercentageDiscount$2;
1687
1820
  /** Limit the coupon to carts with a subtotal above this number. */
1688
1821
  minimumSubtotal?: number;
1689
- /** Specifies the type of line items this coupon will apply to. */
1822
+ /** Specifies the type of line items this coupon will apply to. See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */
1690
1823
  scope?: CouponScope$2;
1691
1824
  /** Coupon name. */
1692
1825
  name?: string;
1693
- /** Coupon discount type. */
1826
+ /**
1827
+ * Coupon discount type.
1828
+ *
1829
+ * - `UNKNOWN`: Unknown discount type.
1830
+ * - `FIXED_AMOUNT`: Discount as a fixed amount.
1831
+ * - `PERCENTAGE`: Discount as a perctange.
1832
+ * - `FREE_SHIPPING`: Free shipping. If `true`, the coupon applies to all items in all `namespaces`.
1833
+ */
1694
1834
  discountType?: DiscountType$2;
1695
- /** Limit the coupon to only apply to one item in cart. */
1835
+ /**
1836
+ * Whether the coupon is limited to one item.
1837
+ * If `true` and a customer pays for multiple items, the discount applies to only the lowest priced item.
1838
+ * Coupons with a bookings `scope.namespace` are always limited to one item.
1839
+ */
1696
1840
  limitedToOneItem?: boolean | null;
1697
- /** If true, coupon also applies to subscriptions. */
1841
+ /** Whether the coupon applies to subscription products. */
1698
1842
  appliesToSubscriptions?: boolean | null;
1699
- /** Specifies the amount of discounted cycles for subscription item. See Stores Coupons documentation for more info. */
1843
+ /**
1844
+ * Specifies the amount of discounted cycles for a subscription item.
1845
+ *
1846
+ * - Can only be set when `scope.namespace = pricingPlans`.
1847
+ * - If `discountedCycleCount` is empty, the coupon applies to all available cycles.
1848
+ * - `discountedCycleCount` is ignored if `appliesToSubscriptions = true`.
1849
+ *
1850
+ * Max: `999`
1851
+ */
1700
1852
  discountedCycleCount?: number | null;
1701
1853
  }
1702
1854
  /** @oneof */
1703
1855
  interface CouponDiscountTypeOptionsOneOf$2 {
1704
- /** Options for fixed amount discount type. */
1856
+ /** Options for fixed amount discount. */
1705
1857
  fixedAmountOptions?: FixedAmountDiscount$2;
1706
- /** Options for percentage discount type. */
1858
+ /** Options for percentage discount. */
1707
1859
  percentageOptions?: PercentageDiscount$2;
1708
1860
  }
1709
1861
  /** @oneof */
1710
1862
  interface CouponScopeOrMinSubtotalOneOf$2 {
1711
1863
  /** Limit the coupon to carts with a subtotal above this number. */
1712
1864
  minimumSubtotal?: number;
1713
- /** Specifies the type of line items this coupon will apply to. */
1865
+ /** Specifies the type of line items this coupon will apply to. See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */
1714
1866
  scope?: CouponScope$2;
1715
1867
  }
1716
1868
  declare enum DiscountType$2 {
@@ -1724,17 +1876,17 @@ declare enum DiscountType$2 {
1724
1876
  FREE_SHIPPING = "FREE_SHIPPING"
1725
1877
  }
1726
1878
  interface FixedAmountDiscount$2 {
1727
- /** Fixed amount to discount. */
1879
+ /** Amount of discount as a fixed value. */
1728
1880
  amount?: number;
1729
1881
  }
1730
1882
  interface PercentageDiscount$2 {
1731
- /** Percentage to discount. */
1883
+ /** Percentage of discount. */
1732
1884
  percentage?: number;
1733
1885
  }
1734
1886
  interface CouponScope$2 {
1735
- /** Namespace of the coupon scope. */
1887
+ /** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */
1736
1888
  namespace?: string;
1737
- /** Group of the coupon scope. */
1889
+ /** Coupon scope's applied group, for example: Event or ticket in Wix Events */
1738
1890
  group?: Group$2;
1739
1891
  }
1740
1892
  interface Group$2 {