@wix/referral 1.0.9 → 1.0.10

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,68 @@
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.
6
+ *
7
+ * `UNKNOWN`: Status is unknown, this status is never used.
8
+ * `DRAFT`: Rderral program is in a draft state, 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
+ /** Reward configuration for the referred friend. Specifies the reward given to a new customer who was referred to the business. */
23
27
  referredFriendReward?: Reward$3;
24
- /** Referring customer reward configuration. */
28
+ /** Reward configuration for the referring customer. Specifies the reward given to an existing customer who referred a new customer to the business. */
25
29
  referringCustomerReward?: Reward$3;
26
- /** List of actions that complete referral. */
30
+ /**
31
+ * 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.
32
+ *
33
+ * Possible values:
34
+ * -`UNKNOWN`: Action is unknown.
35
+ * -`STORE_ORDER_PLACED`: Referred friend ordered and paid for an order in a store.
36
+ * -`PLAN_ORDERED`: Referred friend ordered and paid for a plan.
37
+ * -`TICKET_ORDERED`: Referred friend ordered and paid for a ticket.
38
+ * -`SESSION_BOOKED`: Referred friend booked and paid for a session.
39
+ * -`RESTAURANT_ORDER_PLACED`: Referred friend placed and paid for a restaurant order.
40
+ */
27
41
  successfulReferralActions?: Action$1[];
28
42
  /**
29
- * Set to true if user has required plan to activate program.
43
+ * Whether the user has the required plan to use the referral program.
30
44
  * @readonly
31
- * @deprecated Set to true if user has required plan to activate program.
45
+ * @deprecated Whether the user has the required plan to use the referral program.
32
46
  * @replacedBy GetReferralProgramPremiumFeatures
33
47
  * @targetRemovalDate 2024-09-01
34
48
  */
35
49
  isPremium?: boolean;
36
- /** Emails configuration. */
50
+ /** Configures email notifications for the referral program. */
37
51
  emails?: Emails$1;
38
52
  /**
39
- * Information about available premium features
53
+ * Indicates which premium features are available for the current account.
40
54
  * @readonly
41
55
  */
42
56
  premiumFeatures?: PremiumFeatures$1;
43
57
  }
44
58
  declare enum ProgramStatus$1 {
45
- /** unknown status. */
59
+ /** Program status is unknown. */
46
60
  UNKNOWN = "UNKNOWN",
47
- /** initial program status (program was created but was not enabled yet). */
61
+ /** Initial program status. The program was created but not activated. */
48
62
  DRAFT = "DRAFT",
49
- /** program is active. */
63
+ /** Program is active. */
50
64
  ACTIVE = "ACTIVE",
51
- /** program was manually disabled by the user (this action can be reverted, meaning user can set it to be active again). */
65
+ /** Program was manually disabled by the user. Can be reactivated. */
52
66
  PAUSED = "PAUSED"
53
67
  }
54
68
  interface Reward$3 extends RewardOptionsOneOf$1 {
@@ -77,37 +91,56 @@ declare enum Type$1 {
77
91
  NOTHING = "NOTHING"
78
92
  }
79
93
  interface Coupon$5 extends CouponDiscountTypeOptionsOneOf$5, CouponScopeOrMinSubtotalOneOf$5 {
80
- /** Options for fixed amount discount type. */
94
+ /** Options for fixed amount discount. */
81
95
  fixedAmountOptions?: FixedAmountDiscount$5;
82
- /** Options for percentage discount type. */
96
+ /** Options for percentage discount. */
83
97
  percentageOptions?: PercentageDiscount$5;
84
98
  /** Limit the coupon to carts with a subtotal above this number. */
85
99
  minimumSubtotal?: number;
86
- /** Specifies the type of line items this coupon will apply to. */
100
+ /** 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
101
  scope?: CouponScope$5;
88
102
  /** Coupon name. */
89
103
  name?: string;
90
- /** Coupon discount type. */
104
+ /**
105
+ * Coupon discount type.
106
+ *
107
+ * - `UNKNOWN`: Unknown discount type.
108
+ * - `FIXED_AMOUNT`: Discount as a fixed amount.
109
+ * - `PERCENTAGE`: Discount as a perctange.
110
+ * - `FREE_SHIPPING`: Free shipping. If `true`, the coupon applies to all items in all `namespaces`.
111
+ */
91
112
  discountType?: DiscountType$5;
92
- /** Limit the coupon to only apply to one item in cart. */
113
+ /**
114
+ * Whether the coupon is limited to one item.
115
+ * If `true` and a customer pays for multiple items, the discount applies to only the lowest priced item.
116
+ * Coupons with a bookings `scope.namespace` are always limited to one item.
117
+ */
93
118
  limitedToOneItem?: boolean | null;
94
- /** If true, coupon also applies to subscriptions. */
119
+ /** Whether the coupon applies to subscription products. */
95
120
  appliesToSubscriptions?: boolean | null;
96
- /** Specifies the amount of discounted cycles for subscription item. See Stores Coupons documentation for more info. */
121
+ /**
122
+ * Specifies the amount of discounted cycles for a subscription item.
123
+ *
124
+ * - Can only be set when `scope.namespace = pricingPlans`.
125
+ * - If `discountedCycleCount` is empty, the coupon applies to all available cycles.
126
+ * - `discountedCycleCount` is ignored if `appliesToSubscriptions = true`.
127
+ *
128
+ * Max: `999`
129
+ */
97
130
  discountedCycleCount?: number | null;
98
131
  }
99
132
  /** @oneof */
100
133
  interface CouponDiscountTypeOptionsOneOf$5 {
101
- /** Options for fixed amount discount type. */
134
+ /** Options for fixed amount discount. */
102
135
  fixedAmountOptions?: FixedAmountDiscount$5;
103
- /** Options for percentage discount type. */
136
+ /** Options for percentage discount. */
104
137
  percentageOptions?: PercentageDiscount$5;
105
138
  }
106
139
  /** @oneof */
107
140
  interface CouponScopeOrMinSubtotalOneOf$5 {
108
141
  /** Limit the coupon to carts with a subtotal above this number. */
109
142
  minimumSubtotal?: number;
110
- /** Specifies the type of line items this coupon will apply to. */
143
+ /** 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
144
  scope?: CouponScope$5;
112
145
  }
113
146
  declare enum DiscountType$5 {
@@ -121,17 +154,17 @@ declare enum DiscountType$5 {
121
154
  FREE_SHIPPING = "FREE_SHIPPING"
122
155
  }
123
156
  interface FixedAmountDiscount$5 {
124
- /** Fixed amount to discount. */
157
+ /** Amount of discount as a fixed value. */
125
158
  amount?: number;
126
159
  }
127
160
  interface PercentageDiscount$5 {
128
- /** Percentage to discount. */
161
+ /** Percentage of discount. */
129
162
  percentage?: number;
130
163
  }
131
164
  interface CouponScope$5 {
132
- /** Namespace of the coupon scope. */
165
+ /** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */
133
166
  namespace?: string;
134
- /** Group of the coupon scope. */
167
+ /** Coupon scope's applied group, for example: Event or ticket in Wix Events */
135
168
  group?: Group$5;
136
169
  }
137
170
  interface Group$5 {
@@ -141,7 +174,7 @@ interface Group$5 {
141
174
  entityId?: string | null;
142
175
  }
143
176
  interface LoyaltyPoints$3 {
144
- /** Amount of points to give. */
177
+ /** Number of loyalty points to give. */
145
178
  amount?: number;
146
179
  }
147
180
  declare enum Action$1 {
@@ -159,9 +192,18 @@ declare enum Action$1 {
159
192
  RESTAURANT_ORDER_PLACED = "RESTAURANT_ORDER_PLACED"
160
193
  }
161
194
  interface Emails$1 {
162
- /** Encourage customers to refer their friends email. Select for which apps to enable. */
195
+ /**
196
+ * Encourage customers to refer their friends email. Select for which apps to enable.
197
+ *
198
+ * - `UNKNOWN`: Unknwown email.
199
+ * - `STORES`: Send an email to customers who've placed an order with stores.
200
+ * - `PRICING_PLANS`: Send an email to customers who've placed an order with pricing plans.
201
+ * - `EVENTS`: Send an email to customers who've placed an order with events.
202
+ * - `BOOKINGS`: Send an email to customers who've placed an order with bookings.
203
+ * - `RESTAURANTS`: Send an email to customers who've placed an order with restaurants.
204
+ */
163
205
  encourageToReferFriends?: App$1[];
164
- /** Notify customers about their referral reward email. Set true to enable email. */
206
+ /** Whether to notify customers about their referral reward email. Set to `true` to enable email notifications. */
165
207
  notifyCustomersAboutReward?: boolean;
166
208
  }
167
209
  declare enum App$1 {
@@ -180,7 +222,7 @@ declare enum App$1 {
180
222
  }
181
223
  interface PremiumFeatures$1 {
182
224
  /**
183
- * Set to true if user has referral program feature.
225
+ * Whether the user has the referral program feature.
184
226
  * @readonly
185
227
  */
186
228
  referralProgram?: boolean;
@@ -188,11 +230,11 @@ interface PremiumFeatures$1 {
188
230
  interface GetReferralProgramRequest$1 {
189
231
  }
190
232
  interface GetReferralProgramResponse$1 {
191
- /** The retrieved ReferralProgram. */
233
+ /** The retrieved referral program. */
192
234
  referralProgram?: ReferralProgram$1;
193
235
  }
194
236
  interface QueryReferralProgramsRequest$1 {
195
- /** Query to filter ReferralPrograms. */
237
+ /** Query options. */
196
238
  query: CursorQuery$9;
197
239
  }
198
240
  interface CursorQuery$9 extends CursorQueryPagingMethodOneOf$9 {
@@ -246,13 +288,13 @@ interface CursorPaging$9 {
246
288
  cursor?: string | null;
247
289
  }
248
290
  interface QueryReferralProgramsResponse$1 {
249
- /** ReferralPrograms that match the query. */
291
+ /** The referral programs that match the query. */
250
292
  referralPrograms?: ReferralProgram$1[];
251
293
  /** Paging metadata. */
252
294
  pagingMetadata?: CursorPagingMetadata$9;
253
295
  }
254
296
  interface CursorPagingMetadata$9 {
255
- /** Number of items returned in the response. */
297
+ /** Number of items returned in current page. */
256
298
  count?: number | null;
257
299
  /** Cursor strings that point to the next page, previous page, or both. */
258
300
  cursors?: Cursors$9;
@@ -271,56 +313,56 @@ interface Cursors$9 {
271
313
  prev?: string | null;
272
314
  }
273
315
  interface UpdateReferralProgramRequest$1 {
274
- /** ReferralProgram to be updated, may be partial. */
316
+ /** Provide a `ReferralProgram` object with the fields to update. Include the latest `revision` for a successful update. */
275
317
  referralProgram: ReferralProgram$1;
276
318
  }
277
319
  interface UpdateReferralProgramResponse$1 {
278
- /** The updated ReferralProgram. */
320
+ /** The updated referral program. */
279
321
  referralProgram?: ReferralProgram$1;
280
322
  }
281
323
  interface ActivateReferralProgramRequest$1 {
282
324
  }
283
325
  interface ActivateReferralProgramResponse$1 {
284
- /** The activated ReferralProgram. */
326
+ /** The activated referral program. */
285
327
  referralProgram?: ReferralProgram$1;
286
328
  }
287
329
  interface PauseReferralProgramRequest$1 {
288
330
  }
289
331
  interface PauseReferralProgramResponse$1 {
290
- /** The paused ReferralProgram. */
332
+ /** The paused referral program. */
291
333
  referralProgram?: ReferralProgram$1;
292
334
  }
293
335
  interface GetAISocialMediaPostsSuggestionsRequest$1 {
294
- /** The topic to generate suggestions for. */
336
+ /** The topic to generate socia media post suggestions for. */
295
337
  topic?: string;
296
338
  }
297
339
  interface GetAISocialMediaPostsSuggestionsResponse$1 {
298
- /** The generated suggestions. */
340
+ /** The generated social media post suggestions. */
299
341
  suggestions?: AISocialMediaPostSuggestion$1[];
300
- /** The refer friends page URL. */
342
+ /** The referral URL to refer friends. */
301
343
  referFriendsPageUrl?: string | null;
302
344
  }
303
345
  interface AISocialMediaPostSuggestion$1 {
304
- /** The suggested post content. */
346
+ /** Suggested post content. */
305
347
  postContent?: string;
306
- /** The suggested hashtags. */
348
+ /** Suggested hashtags. */
307
349
  hashtags?: string[];
308
350
  }
309
351
  interface GenerateAISocialMediaPostsSuggestionsRequest$1 {
310
- /** The topic to generate suggestions for. */
352
+ /** The topic to generate social media post suggestions for. */
311
353
  topic?: string;
312
354
  }
313
355
  interface GenerateAISocialMediaPostsSuggestionsResponse$1 {
314
- /** The generated suggestions. */
356
+ /** Generated social media post suggestions. */
315
357
  suggestions?: AISocialMediaPostSuggestion$1[];
316
- /** The refer friends page URL. */
358
+ /** Referral URL to refer friends. */
317
359
  referFriendsPageUrl?: string | null;
318
360
  }
319
361
  interface GetReferralProgramPremiumFeaturesRequest$1 {
320
362
  }
321
363
  interface GetReferralProgramPremiumFeaturesResponse$1 {
322
364
  /**
323
- * Set to true if user has referral program feature.
365
+ * Whether the site has the referral program feature enabled.
324
366
  * @readonly
325
367
  */
326
368
  referralProgram?: boolean;
@@ -399,57 +441,71 @@ interface GetReferralProgramPremiumFeaturesResponseNonNullableFields$1 {
399
441
  referralProgram: boolean;
400
442
  }
401
443
 
402
- /** ReferralProgram is the main entity of ReferralPrograms that can be used to manage the program. */
403
444
  interface ReferralProgram {
404
445
  /** Referral program name. */
405
446
  name?: string | null;
406
447
  /**
407
- * Referral program status.
448
+ * The status of the referral program.
449
+ *
450
+ * `UNKNOWN`: Status is unknown, this status is never used.
451
+ * `DRAFT`: Rderral program is in a draft state, currently being modified, not yet active.
452
+ * `ACTIVE`: Referral program is active.
453
+ * `PAUSED`: Referral program is paused.
408
454
  * @readonly
409
455
  */
410
456
  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. */
457
+ /** 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
458
  revision?: string | null;
413
459
  /**
414
- * Program's creation date and time.
460
+ * Date and time the program was created.
415
461
  * @readonly
416
462
  */
417
463
  _createdDate?: Date;
418
464
  /**
419
- * Program's last update date and time
465
+ * Date and time the program was updated.
420
466
  * @readonly
421
467
  */
422
468
  _updatedDate?: Date;
423
- /** Referred friend reward configuration. */
469
+ /** Reward configuration for the referred friend. Specifies the reward given to a new customer who was referred to the business. */
424
470
  referredFriendReward?: Reward$2;
425
- /** Referring customer reward configuration. */
471
+ /** Reward configuration for the referring customer. Specifies the reward given to an existing customer who referred a new customer to the business. */
426
472
  referringCustomerReward?: Reward$2;
427
- /** List of actions that complete referral. */
473
+ /**
474
+ * 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.
475
+ *
476
+ * Possible values:
477
+ * -`UNKNOWN`: Action is unknown.
478
+ * -`STORE_ORDER_PLACED`: Referred friend ordered and paid for an order in a store.
479
+ * -`PLAN_ORDERED`: Referred friend ordered and paid for a plan.
480
+ * -`TICKET_ORDERED`: Referred friend ordered and paid for a ticket.
481
+ * -`SESSION_BOOKED`: Referred friend booked and paid for a session.
482
+ * -`RESTAURANT_ORDER_PLACED`: Referred friend placed and paid for a restaurant order.
483
+ */
428
484
  successfulReferralActions?: Action[];
429
485
  /**
430
- * Set to true if user has required plan to activate program.
486
+ * Whether the user has the required plan to use the referral program.
431
487
  * @readonly
432
- * @deprecated Set to true if user has required plan to activate program.
488
+ * @deprecated Whether the user has the required plan to use the referral program.
433
489
  * @replacedBy GetReferralProgramPremiumFeatures
434
490
  * @targetRemovalDate 2024-09-01
435
491
  */
436
492
  isPremium?: boolean;
437
- /** Emails configuration. */
493
+ /** Configures email notifications for the referral program. */
438
494
  emails?: Emails;
439
495
  /**
440
- * Information about available premium features
496
+ * Indicates which premium features are available for the current account.
441
497
  * @readonly
442
498
  */
443
499
  premiumFeatures?: PremiumFeatures;
444
500
  }
445
501
  declare enum ProgramStatus {
446
- /** unknown status. */
502
+ /** Program status is unknown. */
447
503
  UNKNOWN = "UNKNOWN",
448
- /** initial program status (program was created but was not enabled yet). */
504
+ /** Initial program status. The program was created but not activated. */
449
505
  DRAFT = "DRAFT",
450
- /** program is active. */
506
+ /** Program is active. */
451
507
  ACTIVE = "ACTIVE",
452
- /** program was manually disabled by the user (this action can be reverted, meaning user can set it to be active again). */
508
+ /** Program was manually disabled by the user. Can be reactivated. */
453
509
  PAUSED = "PAUSED"
454
510
  }
455
511
  interface Reward$2 extends RewardOptionsOneOf {
@@ -478,37 +534,56 @@ declare enum Type {
478
534
  NOTHING = "NOTHING"
479
535
  }
480
536
  interface Coupon$4 extends CouponDiscountTypeOptionsOneOf$4, CouponScopeOrMinSubtotalOneOf$4 {
481
- /** Options for fixed amount discount type. */
537
+ /** Options for fixed amount discount. */
482
538
  fixedAmountOptions?: FixedAmountDiscount$4;
483
- /** Options for percentage discount type. */
539
+ /** Options for percentage discount. */
484
540
  percentageOptions?: PercentageDiscount$4;
485
541
  /** Limit the coupon to carts with a subtotal above this number. */
486
542
  minimumSubtotal?: number;
487
- /** Specifies the type of line items this coupon will apply to. */
543
+ /** 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
544
  scope?: CouponScope$4;
489
545
  /** Coupon name. */
490
546
  name?: string;
491
- /** Coupon discount type. */
547
+ /**
548
+ * Coupon discount type.
549
+ *
550
+ * - `UNKNOWN`: Unknown discount type.
551
+ * - `FIXED_AMOUNT`: Discount as a fixed amount.
552
+ * - `PERCENTAGE`: Discount as a perctange.
553
+ * - `FREE_SHIPPING`: Free shipping. If `true`, the coupon applies to all items in all `namespaces`.
554
+ */
492
555
  discountType?: DiscountType$4;
493
- /** Limit the coupon to only apply to one item in cart. */
556
+ /**
557
+ * Whether the coupon is limited to one item.
558
+ * If `true` and a customer pays for multiple items, the discount applies to only the lowest priced item.
559
+ * Coupons with a bookings `scope.namespace` are always limited to one item.
560
+ */
494
561
  limitedToOneItem?: boolean | null;
495
- /** If true, coupon also applies to subscriptions. */
562
+ /** Whether the coupon applies to subscription products. */
496
563
  appliesToSubscriptions?: boolean | null;
497
- /** Specifies the amount of discounted cycles for subscription item. See Stores Coupons documentation for more info. */
564
+ /**
565
+ * Specifies the amount of discounted cycles for a subscription item.
566
+ *
567
+ * - Can only be set when `scope.namespace = pricingPlans`.
568
+ * - If `discountedCycleCount` is empty, the coupon applies to all available cycles.
569
+ * - `discountedCycleCount` is ignored if `appliesToSubscriptions = true`.
570
+ *
571
+ * Max: `999`
572
+ */
498
573
  discountedCycleCount?: number | null;
499
574
  }
500
575
  /** @oneof */
501
576
  interface CouponDiscountTypeOptionsOneOf$4 {
502
- /** Options for fixed amount discount type. */
577
+ /** Options for fixed amount discount. */
503
578
  fixedAmountOptions?: FixedAmountDiscount$4;
504
- /** Options for percentage discount type. */
579
+ /** Options for percentage discount. */
505
580
  percentageOptions?: PercentageDiscount$4;
506
581
  }
507
582
  /** @oneof */
508
583
  interface CouponScopeOrMinSubtotalOneOf$4 {
509
584
  /** Limit the coupon to carts with a subtotal above this number. */
510
585
  minimumSubtotal?: number;
511
- /** Specifies the type of line items this coupon will apply to. */
586
+ /** 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
587
  scope?: CouponScope$4;
513
588
  }
514
589
  declare enum DiscountType$4 {
@@ -522,17 +597,17 @@ declare enum DiscountType$4 {
522
597
  FREE_SHIPPING = "FREE_SHIPPING"
523
598
  }
524
599
  interface FixedAmountDiscount$4 {
525
- /** Fixed amount to discount. */
600
+ /** Amount of discount as a fixed value. */
526
601
  amount?: number;
527
602
  }
528
603
  interface PercentageDiscount$4 {
529
- /** Percentage to discount. */
604
+ /** Percentage of discount. */
530
605
  percentage?: number;
531
606
  }
532
607
  interface CouponScope$4 {
533
- /** Namespace of the coupon scope. */
608
+ /** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */
534
609
  namespace?: string;
535
- /** Group of the coupon scope. */
610
+ /** Coupon scope's applied group, for example: Event or ticket in Wix Events */
536
611
  group?: Group$4;
537
612
  }
538
613
  interface Group$4 {
@@ -542,7 +617,7 @@ interface Group$4 {
542
617
  entityId?: string | null;
543
618
  }
544
619
  interface LoyaltyPoints$2 {
545
- /** Amount of points to give. */
620
+ /** Number of loyalty points to give. */
546
621
  amount?: number;
547
622
  }
548
623
  declare enum Action {
@@ -560,9 +635,18 @@ declare enum Action {
560
635
  RESTAURANT_ORDER_PLACED = "RESTAURANT_ORDER_PLACED"
561
636
  }
562
637
  interface Emails {
563
- /** Encourage customers to refer their friends email. Select for which apps to enable. */
638
+ /**
639
+ * Encourage customers to refer their friends email. Select for which apps to enable.
640
+ *
641
+ * - `UNKNOWN`: Unknwown email.
642
+ * - `STORES`: Send an email to customers who've placed an order with stores.
643
+ * - `PRICING_PLANS`: Send an email to customers who've placed an order with pricing plans.
644
+ * - `EVENTS`: Send an email to customers who've placed an order with events.
645
+ * - `BOOKINGS`: Send an email to customers who've placed an order with bookings.
646
+ * - `RESTAURANTS`: Send an email to customers who've placed an order with restaurants.
647
+ */
564
648
  encourageToReferFriends?: App[];
565
- /** Notify customers about their referral reward email. Set true to enable email. */
649
+ /** Whether to notify customers about their referral reward email. Set to `true` to enable email notifications. */
566
650
  notifyCustomersAboutReward?: boolean;
567
651
  }
568
652
  declare enum App {
@@ -581,7 +665,7 @@ declare enum App {
581
665
  }
582
666
  interface PremiumFeatures {
583
667
  /**
584
- * Set to true if user has referral program feature.
668
+ * Whether the user has the referral program feature.
585
669
  * @readonly
586
670
  */
587
671
  referralProgram?: boolean;
@@ -589,11 +673,11 @@ interface PremiumFeatures {
589
673
  interface GetReferralProgramRequest {
590
674
  }
591
675
  interface GetReferralProgramResponse {
592
- /** The retrieved ReferralProgram. */
676
+ /** The retrieved referral program. */
593
677
  referralProgram?: ReferralProgram;
594
678
  }
595
679
  interface QueryReferralProgramsRequest {
596
- /** Query to filter ReferralPrograms. */
680
+ /** Query options. */
597
681
  query: CursorQuery$8;
598
682
  }
599
683
  interface CursorQuery$8 extends CursorQueryPagingMethodOneOf$8 {
@@ -647,13 +731,13 @@ interface CursorPaging$8 {
647
731
  cursor?: string | null;
648
732
  }
649
733
  interface QueryReferralProgramsResponse {
650
- /** ReferralPrograms that match the query. */
734
+ /** The referral programs that match the query. */
651
735
  referralPrograms?: ReferralProgram[];
652
736
  /** Paging metadata. */
653
737
  pagingMetadata?: CursorPagingMetadata$8;
654
738
  }
655
739
  interface CursorPagingMetadata$8 {
656
- /** Number of items returned in the response. */
740
+ /** Number of items returned in current page. */
657
741
  count?: number | null;
658
742
  /** Cursor strings that point to the next page, previous page, or both. */
659
743
  cursors?: Cursors$8;
@@ -672,56 +756,56 @@ interface Cursors$8 {
672
756
  prev?: string | null;
673
757
  }
674
758
  interface UpdateReferralProgramRequest {
675
- /** ReferralProgram to be updated, may be partial. */
759
+ /** Provide a `ReferralProgram` object with the fields to update. Include the latest `revision` for a successful update. */
676
760
  referralProgram: ReferralProgram;
677
761
  }
678
762
  interface UpdateReferralProgramResponse {
679
- /** The updated ReferralProgram. */
763
+ /** The updated referral program. */
680
764
  referralProgram?: ReferralProgram;
681
765
  }
682
766
  interface ActivateReferralProgramRequest {
683
767
  }
684
768
  interface ActivateReferralProgramResponse {
685
- /** The activated ReferralProgram. */
769
+ /** The activated referral program. */
686
770
  referralProgram?: ReferralProgram;
687
771
  }
688
772
  interface PauseReferralProgramRequest {
689
773
  }
690
774
  interface PauseReferralProgramResponse {
691
- /** The paused ReferralProgram. */
775
+ /** The paused referral program. */
692
776
  referralProgram?: ReferralProgram;
693
777
  }
694
778
  interface GetAISocialMediaPostsSuggestionsRequest {
695
- /** The topic to generate suggestions for. */
779
+ /** The topic to generate socia media post suggestions for. */
696
780
  topic?: string;
697
781
  }
698
782
  interface GetAISocialMediaPostsSuggestionsResponse {
699
- /** The generated suggestions. */
783
+ /** The generated social media post suggestions. */
700
784
  suggestions?: AISocialMediaPostSuggestion[];
701
- /** The refer friends page URL. */
785
+ /** The referral URL to refer friends. */
702
786
  referFriendsPageUrl?: string | null;
703
787
  }
704
788
  interface AISocialMediaPostSuggestion {
705
- /** The suggested post content. */
789
+ /** Suggested post content. */
706
790
  postContent?: string;
707
- /** The suggested hashtags. */
791
+ /** Suggested hashtags. */
708
792
  hashtags?: string[];
709
793
  }
710
794
  interface GenerateAISocialMediaPostsSuggestionsRequest {
711
- /** The topic to generate suggestions for. */
795
+ /** The topic to generate social media post suggestions for. */
712
796
  topic?: string;
713
797
  }
714
798
  interface GenerateAISocialMediaPostsSuggestionsResponse {
715
- /** The generated suggestions. */
799
+ /** Generated social media post suggestions. */
716
800
  suggestions?: AISocialMediaPostSuggestion[];
717
- /** The refer friends page URL. */
801
+ /** Referral URL to refer friends. */
718
802
  referFriendsPageUrl?: string | null;
719
803
  }
720
804
  interface GetReferralProgramPremiumFeaturesRequest {
721
805
  }
722
806
  interface GetReferralProgramPremiumFeaturesResponse {
723
807
  /**
724
- * Set to true if user has referral program feature.
808
+ * Whether the site has the referral program feature enabled.
725
809
  * @readonly
726
810
  */
727
811
  referralProgram?: boolean;
@@ -952,26 +1036,32 @@ interface QueryReferralEventRequest$1 {
952
1036
  query: CursorQuery$7;
953
1037
  }
954
1038
  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`. */
1039
+ /**
1040
+ * Cursor paging options.
1041
+ *
1042
+ * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
1043
+ */
956
1044
  cursorPaging?: CursorPaging$7;
957
1045
  /**
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`
1046
+ * Filter object.
1047
+ *
1048
+ * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
964
1049
  */
965
1050
  filter?: Record<string, any> | null;
966
1051
  /**
967
- * Sort object in the following format:
968
- * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
1052
+ * Sort object.
1053
+ *
1054
+ * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
969
1055
  */
970
1056
  sort?: Sorting$7[];
971
1057
  }
972
1058
  /** @oneof */
973
1059
  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`. */
1060
+ /**
1061
+ * Cursor paging options.
1062
+ *
1063
+ * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
1064
+ */
975
1065
  cursorPaging?: CursorPaging$7;
976
1066
  }
977
1067
  interface Sorting$7 {
@@ -1002,7 +1092,7 @@ interface QueryReferralEventResponse$1 {
1002
1092
  metadata?: CursorPagingMetadata$7;
1003
1093
  }
1004
1094
  interface CursorPagingMetadata$7 {
1005
- /** Number of items returned in the response. */
1095
+ /** Number of items returned in current page. */
1006
1096
  count?: number | null;
1007
1097
  /** Cursor strings that point to the next page, previous page, or both. */
1008
1098
  cursors?: Cursors$7;
@@ -1171,37 +1261,56 @@ declare enum Status$5 {
1171
1261
  DELETED = "DELETED"
1172
1262
  }
1173
1263
  interface Coupon$3 extends CouponDiscountTypeOptionsOneOf$3, CouponScopeOrMinSubtotalOneOf$3 {
1174
- /** Options for fixed amount discount type. */
1264
+ /** Options for fixed amount discount. */
1175
1265
  fixedAmountOptions?: FixedAmountDiscount$3;
1176
- /** Options for percentage discount type. */
1266
+ /** Options for percentage discount. */
1177
1267
  percentageOptions?: PercentageDiscount$3;
1178
1268
  /** Limit the coupon to carts with a subtotal above this number. */
1179
1269
  minimumSubtotal?: number;
1180
- /** Specifies the type of line items this coupon will apply to. */
1270
+ /** 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
1271
  scope?: CouponScope$3;
1182
1272
  /** Coupon name. */
1183
1273
  name?: string;
1184
- /** Coupon discount type. */
1274
+ /**
1275
+ * Coupon discount type.
1276
+ *
1277
+ * - `UNKNOWN`: Unknown discount type.
1278
+ * - `FIXED_AMOUNT`: Discount as a fixed amount.
1279
+ * - `PERCENTAGE`: Discount as a perctange.
1280
+ * - `FREE_SHIPPING`: Free shipping. If `true`, the coupon applies to all items in all `namespaces`.
1281
+ */
1185
1282
  discountType?: DiscountType$3;
1186
- /** Limit the coupon to only apply to one item in cart. */
1283
+ /**
1284
+ * Whether the coupon is limited to one item.
1285
+ * If `true` and a customer pays for multiple items, the discount applies to only the lowest priced item.
1286
+ * Coupons with a bookings `scope.namespace` are always limited to one item.
1287
+ */
1187
1288
  limitedToOneItem?: boolean | null;
1188
- /** If true, coupon also applies to subscriptions. */
1289
+ /** Whether the coupon applies to subscription products. */
1189
1290
  appliesToSubscriptions?: boolean | null;
1190
- /** Specifies the amount of discounted cycles for subscription item. See Stores Coupons documentation for more info. */
1291
+ /**
1292
+ * Specifies the amount of discounted cycles for a subscription item.
1293
+ *
1294
+ * - Can only be set when `scope.namespace = pricingPlans`.
1295
+ * - If `discountedCycleCount` is empty, the coupon applies to all available cycles.
1296
+ * - `discountedCycleCount` is ignored if `appliesToSubscriptions = true`.
1297
+ *
1298
+ * Max: `999`
1299
+ */
1191
1300
  discountedCycleCount?: number | null;
1192
1301
  }
1193
1302
  /** @oneof */
1194
1303
  interface CouponDiscountTypeOptionsOneOf$3 {
1195
- /** Options for fixed amount discount type. */
1304
+ /** Options for fixed amount discount. */
1196
1305
  fixedAmountOptions?: FixedAmountDiscount$3;
1197
- /** Options for percentage discount type. */
1306
+ /** Options for percentage discount. */
1198
1307
  percentageOptions?: PercentageDiscount$3;
1199
1308
  }
1200
1309
  /** @oneof */
1201
1310
  interface CouponScopeOrMinSubtotalOneOf$3 {
1202
1311
  /** Limit the coupon to carts with a subtotal above this number. */
1203
1312
  minimumSubtotal?: number;
1204
- /** Specifies the type of line items this coupon will apply to. */
1313
+ /** 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
1314
  scope?: CouponScope$3;
1206
1315
  }
1207
1316
  declare enum DiscountType$3 {
@@ -1215,17 +1324,17 @@ declare enum DiscountType$3 {
1215
1324
  FREE_SHIPPING = "FREE_SHIPPING"
1216
1325
  }
1217
1326
  interface FixedAmountDiscount$3 {
1218
- /** Fixed amount to discount. */
1327
+ /** Amount of discount as a fixed value. */
1219
1328
  amount?: number;
1220
1329
  }
1221
1330
  interface PercentageDiscount$3 {
1222
- /** Percentage to discount. */
1331
+ /** Percentage of discount. */
1223
1332
  percentage?: number;
1224
1333
  }
1225
1334
  interface CouponScope$3 {
1226
- /** Namespace of the coupon scope. */
1335
+ /** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */
1227
1336
  namespace?: string;
1228
- /** Group of the coupon scope. */
1337
+ /** Coupon scope's applied group, for example: Event or ticket in Wix Events */
1229
1338
  group?: Group$3;
1230
1339
  }
1231
1340
  interface Group$3 {
@@ -1461,26 +1570,32 @@ interface QueryReferralEventRequest {
1461
1570
  query: CursorQuery$6;
1462
1571
  }
1463
1572
  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`. */
1573
+ /**
1574
+ * Cursor paging options.
1575
+ *
1576
+ * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
1577
+ */
1465
1578
  cursorPaging?: CursorPaging$6;
1466
1579
  /**
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`
1580
+ * Filter object.
1581
+ *
1582
+ * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
1473
1583
  */
1474
1584
  filter?: Record<string, any> | null;
1475
1585
  /**
1476
- * Sort object in the following format:
1477
- * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
1586
+ * Sort object.
1587
+ *
1588
+ * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
1478
1589
  */
1479
1590
  sort?: Sorting$6[];
1480
1591
  }
1481
1592
  /** @oneof */
1482
1593
  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`. */
1594
+ /**
1595
+ * Cursor paging options.
1596
+ *
1597
+ * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
1598
+ */
1484
1599
  cursorPaging?: CursorPaging$6;
1485
1600
  }
1486
1601
  interface Sorting$6 {
@@ -1511,7 +1626,7 @@ interface QueryReferralEventResponse {
1511
1626
  metadata?: CursorPagingMetadata$6;
1512
1627
  }
1513
1628
  interface CursorPagingMetadata$6 {
1514
- /** Number of items returned in the response. */
1629
+ /** Number of items returned in current page. */
1515
1630
  count?: number | null;
1516
1631
  /** Cursor strings that point to the next page, previous page, or both. */
1517
1632
  cursors?: Cursors$6;
@@ -1680,37 +1795,56 @@ declare enum Status$4 {
1680
1795
  DELETED = "DELETED"
1681
1796
  }
1682
1797
  interface Coupon$2 extends CouponDiscountTypeOptionsOneOf$2, CouponScopeOrMinSubtotalOneOf$2 {
1683
- /** Options for fixed amount discount type. */
1798
+ /** Options for fixed amount discount. */
1684
1799
  fixedAmountOptions?: FixedAmountDiscount$2;
1685
- /** Options for percentage discount type. */
1800
+ /** Options for percentage discount. */
1686
1801
  percentageOptions?: PercentageDiscount$2;
1687
1802
  /** Limit the coupon to carts with a subtotal above this number. */
1688
1803
  minimumSubtotal?: number;
1689
- /** Specifies the type of line items this coupon will apply to. */
1804
+ /** 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
1805
  scope?: CouponScope$2;
1691
1806
  /** Coupon name. */
1692
1807
  name?: string;
1693
- /** Coupon discount type. */
1808
+ /**
1809
+ * Coupon discount type.
1810
+ *
1811
+ * - `UNKNOWN`: Unknown discount type.
1812
+ * - `FIXED_AMOUNT`: Discount as a fixed amount.
1813
+ * - `PERCENTAGE`: Discount as a perctange.
1814
+ * - `FREE_SHIPPING`: Free shipping. If `true`, the coupon applies to all items in all `namespaces`.
1815
+ */
1694
1816
  discountType?: DiscountType$2;
1695
- /** Limit the coupon to only apply to one item in cart. */
1817
+ /**
1818
+ * Whether the coupon is limited to one item.
1819
+ * If `true` and a customer pays for multiple items, the discount applies to only the lowest priced item.
1820
+ * Coupons with a bookings `scope.namespace` are always limited to one item.
1821
+ */
1696
1822
  limitedToOneItem?: boolean | null;
1697
- /** If true, coupon also applies to subscriptions. */
1823
+ /** Whether the coupon applies to subscription products. */
1698
1824
  appliesToSubscriptions?: boolean | null;
1699
- /** Specifies the amount of discounted cycles for subscription item. See Stores Coupons documentation for more info. */
1825
+ /**
1826
+ * Specifies the amount of discounted cycles for a subscription item.
1827
+ *
1828
+ * - Can only be set when `scope.namespace = pricingPlans`.
1829
+ * - If `discountedCycleCount` is empty, the coupon applies to all available cycles.
1830
+ * - `discountedCycleCount` is ignored if `appliesToSubscriptions = true`.
1831
+ *
1832
+ * Max: `999`
1833
+ */
1700
1834
  discountedCycleCount?: number | null;
1701
1835
  }
1702
1836
  /** @oneof */
1703
1837
  interface CouponDiscountTypeOptionsOneOf$2 {
1704
- /** Options for fixed amount discount type. */
1838
+ /** Options for fixed amount discount. */
1705
1839
  fixedAmountOptions?: FixedAmountDiscount$2;
1706
- /** Options for percentage discount type. */
1840
+ /** Options for percentage discount. */
1707
1841
  percentageOptions?: PercentageDiscount$2;
1708
1842
  }
1709
1843
  /** @oneof */
1710
1844
  interface CouponScopeOrMinSubtotalOneOf$2 {
1711
1845
  /** Limit the coupon to carts with a subtotal above this number. */
1712
1846
  minimumSubtotal?: number;
1713
- /** Specifies the type of line items this coupon will apply to. */
1847
+ /** 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
1848
  scope?: CouponScope$2;
1715
1849
  }
1716
1850
  declare enum DiscountType$2 {
@@ -1724,17 +1858,17 @@ declare enum DiscountType$2 {
1724
1858
  FREE_SHIPPING = "FREE_SHIPPING"
1725
1859
  }
1726
1860
  interface FixedAmountDiscount$2 {
1727
- /** Fixed amount to discount. */
1861
+ /** Amount of discount as a fixed value. */
1728
1862
  amount?: number;
1729
1863
  }
1730
1864
  interface PercentageDiscount$2 {
1731
- /** Percentage to discount. */
1865
+ /** Percentage of discount. */
1732
1866
  percentage?: number;
1733
1867
  }
1734
1868
  interface CouponScope$2 {
1735
- /** Namespace of the coupon scope. */
1869
+ /** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */
1736
1870
  namespace?: string;
1737
- /** Group of the coupon scope. */
1871
+ /** Coupon scope's applied group, for example: Event or ticket in Wix Events */
1738
1872
  group?: Group$2;
1739
1873
  }
1740
1874
  interface Group$2 {