@wix/referral 1.0.54 → 1.0.55

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,3207 +0,0 @@
1
- interface ReferralProgram$1 {
2
- /** Referral program name. */
3
- name?: string | null;
4
- /** @readonly */
5
- status?: ProgramStatus$1;
6
- /**
7
- * Revision number, which increments by 1 each time the program is updated.
8
- * To prevent conflicting changes, the current `revision` must be passed when updating the program.
9
- */
10
- revision?: string | null;
11
- /**
12
- * Date and time the program was created.
13
- * @readonly
14
- */
15
- createdDate?: Date | null;
16
- /**
17
- * Date and time the program was last updated.
18
- * @readonly
19
- */
20
- updatedDate?: Date | null;
21
- /**
22
- * Reward configuration for the referred friend.
23
- * Specifies the reward given to a new customer who was referred to the business.
24
- */
25
- referredFriendReward?: Reward$3;
26
- /**
27
- * Reward configuration for the referring customer.
28
- * Specifies the reward given to an existing customer who referred a new customer to the business.
29
- */
30
- referringCustomerReward?: Reward$3;
31
- /** List of actions that complete a referral. For an action to be considered successful, the referred friend must place and pay for an item. */
32
- successfulReferralActions?: Action$1[];
33
- /** Configures email notifications for the referral program. */
34
- emails?: Emails$1;
35
- /**
36
- * Indicates which premium features are available for the current account.
37
- * @readonly
38
- */
39
- premiumFeatures?: PremiumFeatures$1;
40
- }
41
- /** Status of the referral program. */
42
- declare enum ProgramStatus$1 {
43
- /** Unknown program status. */
44
- UNKNOWN = "UNKNOWN",
45
- /** Referral program is in a draft state and is being modified. It is not yet active. */
46
- DRAFT = "DRAFT",
47
- /** Referral program is active. */
48
- ACTIVE = "ACTIVE",
49
- /** Referral program is paused. */
50
- PAUSED = "PAUSED"
51
- }
52
- interface Reward$3 extends RewardOptionsOneOf$1 {
53
- /** Options for coupon reward type. */
54
- couponOptions?: Coupon$5;
55
- /** Options for the Loyalty points reward type. */
56
- loyaltyPointsOptions?: LoyaltyPoints$3;
57
- /** Type of the reward. */
58
- type?: Type$1;
59
- }
60
- /** @oneof */
61
- interface RewardOptionsOneOf$1 {
62
- /** Options for coupon reward type. */
63
- couponOptions?: Coupon$5;
64
- /** Options for the Loyalty points reward type. */
65
- loyaltyPointsOptions?: LoyaltyPoints$3;
66
- }
67
- declare enum Type$1 {
68
- /** Unknown reward type. */
69
- UNKNOWN = "UNKNOWN",
70
- /** Coupon reward type. */
71
- COUPON = "COUPON",
72
- /** Loyalty points reward type. */
73
- LOYALTY_POINTS = "LOYALTY_POINTS",
74
- /** No reward type. */
75
- NOTHING = "NOTHING"
76
- }
77
- interface Coupon$5 extends CouponDiscountTypeOptionsOneOf$5, CouponScopeOrMinSubtotalOneOf$5 {
78
- /** Options for fixed amount discount. */
79
- fixedAmountOptions?: FixedAmountDiscount$5;
80
- /** Options for percentage discounts. */
81
- percentageOptions?: PercentageDiscount$5;
82
- /** Limit the coupon to carts with a subtotal above this number. */
83
- minimumSubtotal?: number;
84
- /** 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). */
85
- scope?: CouponScope$5;
86
- /** Coupon name. */
87
- name?: string;
88
- /** Coupon discount type. */
89
- discountType?: DiscountType$5;
90
- /**
91
- * Whether the coupon is limited to one item.
92
- * If `true` and a customer pays for multiple items, the discount applies to only the lowest priced item.
93
- * Coupons with a bookings `scope.namespace` are always limited to one item.
94
- */
95
- limitedToOneItem?: boolean | null;
96
- /** Whether the coupon applies to subscription products. */
97
- appliesToSubscriptions?: boolean | null;
98
- /**
99
- * Specifies the amount of discounted cycles for a subscription item.
100
- *
101
- * - Can only be set when `scope.namespace = pricingPlans`.
102
- * - If `discountedCycleCount` is empty, the coupon applies to all available cycles.
103
- * - `discountedCycleCount` is ignored if `appliesToSubscriptions = true`.
104
- *
105
- * Max: `999`
106
- */
107
- discountedCycleCount?: number | null;
108
- }
109
- /** @oneof */
110
- interface CouponDiscountTypeOptionsOneOf$5 {
111
- /** Options for fixed amount discount. */
112
- fixedAmountOptions?: FixedAmountDiscount$5;
113
- /** Options for percentage discounts. */
114
- percentageOptions?: PercentageDiscount$5;
115
- }
116
- /** @oneof */
117
- interface CouponScopeOrMinSubtotalOneOf$5 {
118
- /** Limit the coupon to carts with a subtotal above this number. */
119
- minimumSubtotal?: number;
120
- /** 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). */
121
- scope?: CouponScope$5;
122
- }
123
- declare enum DiscountType$5 {
124
- /** Unknown discount type. */
125
- UNKNOWN = "UNKNOWN",
126
- /** Discount as a fixed amount. */
127
- FIXED_AMOUNT = "FIXED_AMOUNT",
128
- /** Discount as a percentage. */
129
- PERCENTAGE = "PERCENTAGE",
130
- /** Free shipping. If `true`, the coupon applies to all items in all `namespaces`. */
131
- FREE_SHIPPING = "FREE_SHIPPING"
132
- }
133
- interface FixedAmountDiscount$5 {
134
- /** Amount of the discount as a fixed value. */
135
- amount?: number;
136
- }
137
- interface PercentageDiscount$5 {
138
- /** Percentage of discount. */
139
- percentage?: number;
140
- }
141
- interface CouponScope$5 {
142
- /** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */
143
- namespace?: string;
144
- /** Coupon scope's applied group, for example, Event or ticket in Wix Events. */
145
- group?: Group$5;
146
- }
147
- interface Group$5 {
148
- /** Name of the group. */
149
- name?: string;
150
- /** Entity ID of the group. */
151
- entityId?: string | null;
152
- }
153
- interface LoyaltyPoints$3 {
154
- /** Number of loyalty points to give. */
155
- amount?: number;
156
- }
157
- declare enum Action$1 {
158
- /** Unknown action. */
159
- UNKNOWN = "UNKNOWN",
160
- /** Referred friend ordered and paid for an order in a store. */
161
- STORE_ORDER_PLACED = "STORE_ORDER_PLACED",
162
- /** Referred friend ordered and paid for a plan. */
163
- PLAN_ORDERED = "PLAN_ORDERED",
164
- /** Referred friend ordered and paid for a ticket. */
165
- TICKET_ORDERED = "TICKET_ORDERED",
166
- /** Referred friend booked and paid for a session. */
167
- SESSION_BOOKED = "SESSION_BOOKED",
168
- /** Referred friend placed and paid for a restaurant order. */
169
- RESTAURANT_ORDER_PLACED = "RESTAURANT_ORDER_PLACED",
170
- /** Referred friend joined an online program. */
171
- ONLINE_PROGRAM_JOINED = "ONLINE_PROGRAM_JOINED"
172
- }
173
- interface Emails$1 {
174
- /** Configures email invitations to encourage customers to refer their friends. Select the apps for which this feature is enabled. */
175
- encourageToReferFriends?: App$1[];
176
- /**
177
- * Whether to send email notifications to referring customers when they receive a referral reward.
178
- * If true, referring customers will be notified by email when their referred friend completes a qualifying action (for example, placing an order).
179
- */
180
- notifyCustomersAboutReward?: boolean;
181
- }
182
- declare enum App$1 {
183
- /** Unknown app. */
184
- UNKNOWN = "UNKNOWN",
185
- /** Send an email to customers who've placed an order with stores. */
186
- STORES = "STORES",
187
- /** Send an email to customers who've placed an order with pricing plans. */
188
- PRICING_PLANS = "PRICING_PLANS",
189
- /** Send an email to customers who've placed an order with events. */
190
- EVENTS = "EVENTS",
191
- /** Send an email to customers who've placed an order with bookings. */
192
- BOOKINGS = "BOOKINGS",
193
- /** Send an email to customers who've placed an order with restaurants. */
194
- RESTAURANTS = "RESTAURANTS"
195
- }
196
- interface PremiumFeatures$1 {
197
- /**
198
- * Whether the site owner has access to the referral program feature.
199
- * @readonly
200
- */
201
- referralProgram?: boolean;
202
- }
203
- interface GetReferralProgramRequest$1 {
204
- }
205
- interface GetReferralProgramResponse$1 {
206
- /** Retrieved referral program. */
207
- referralProgram?: ReferralProgram$1;
208
- }
209
- interface UpdateReferralProgramRequest$1 {
210
- /** Referral program to update. Include the latest `revision` for a successful update. */
211
- referralProgram: ReferralProgram$1;
212
- }
213
- interface UpdateReferralProgramResponse$1 {
214
- /** Updated referral program. */
215
- referralProgram?: ReferralProgram$1;
216
- }
217
- interface ActivateReferralProgramRequest$1 {
218
- }
219
- interface ActivateReferralProgramResponse$1 {
220
- /** Activated referral program. */
221
- referralProgram?: ReferralProgram$1;
222
- }
223
- interface PauseReferralProgramRequest$1 {
224
- }
225
- interface PauseReferralProgramResponse$1 {
226
- /** Paused referral program. */
227
- referralProgram?: ReferralProgram$1;
228
- }
229
- interface GetAISocialMediaPostsSuggestionsRequest$1 {
230
- /** Topic to generate social media post suggestions for. For example, fitness, education, technology. */
231
- topic?: string;
232
- }
233
- interface GetAISocialMediaPostsSuggestionsResponse$1 {
234
- /** Generated social media post suggestions. */
235
- suggestions?: AISocialMediaPostSuggestion$1[];
236
- /** Referral URL to refer friends. */
237
- referFriendsPageUrl?: string | null;
238
- }
239
- interface AISocialMediaPostSuggestion$1 {
240
- /** Suggested post content. */
241
- postContent?: string;
242
- /** Suggested hashtags. */
243
- hashtags?: string[];
244
- }
245
- interface GenerateAISocialMediaPostsSuggestionsRequest$1 {
246
- /** Topic to generate social media post suggestions for. For example, fitness, education, technology. */
247
- topic?: string;
248
- }
249
- interface GenerateAISocialMediaPostsSuggestionsResponse$1 {
250
- /** Generated social media post suggestions. */
251
- suggestions?: AISocialMediaPostSuggestion$1[];
252
- /** Referral URL to refer friends. */
253
- referFriendsPageUrl?: string | null;
254
- }
255
- interface GetReferralProgramPremiumFeaturesRequest$1 {
256
- }
257
- interface GetReferralProgramPremiumFeaturesResponse$1 {
258
- /**
259
- * Whether the site has the referral program feature enabled.
260
- * @readonly
261
- */
262
- referralProgram?: boolean;
263
- }
264
- interface FixedAmountDiscountNonNullableFields$5 {
265
- amount: number;
266
- }
267
- interface PercentageDiscountNonNullableFields$5 {
268
- percentage: number;
269
- }
270
- interface GroupNonNullableFields$5 {
271
- name: string;
272
- }
273
- interface CouponScopeNonNullableFields$5 {
274
- namespace: string;
275
- group?: GroupNonNullableFields$5;
276
- }
277
- interface CouponNonNullableFields$5 {
278
- fixedAmountOptions?: FixedAmountDiscountNonNullableFields$5;
279
- percentageOptions?: PercentageDiscountNonNullableFields$5;
280
- minimumSubtotal: number;
281
- scope?: CouponScopeNonNullableFields$5;
282
- name: string;
283
- discountType: DiscountType$5;
284
- }
285
- interface LoyaltyPointsNonNullableFields$3 {
286
- amount: number;
287
- }
288
- interface RewardNonNullableFields$1 {
289
- couponOptions?: CouponNonNullableFields$5;
290
- loyaltyPointsOptions?: LoyaltyPointsNonNullableFields$3;
291
- type: Type$1;
292
- }
293
- interface EmailsNonNullableFields$1 {
294
- encourageToReferFriends: App$1[];
295
- notifyCustomersAboutReward: boolean;
296
- }
297
- interface PremiumFeaturesNonNullableFields$1 {
298
- referralProgram: boolean;
299
- }
300
- interface ReferralProgramNonNullableFields$1 {
301
- status: ProgramStatus$1;
302
- referredFriendReward?: RewardNonNullableFields$1;
303
- referringCustomerReward?: RewardNonNullableFields$1;
304
- successfulReferralActions: Action$1[];
305
- emails?: EmailsNonNullableFields$1;
306
- premiumFeatures?: PremiumFeaturesNonNullableFields$1;
307
- }
308
- interface GetReferralProgramResponseNonNullableFields$1 {
309
- referralProgram?: ReferralProgramNonNullableFields$1;
310
- }
311
- interface UpdateReferralProgramResponseNonNullableFields$1 {
312
- referralProgram?: ReferralProgramNonNullableFields$1;
313
- }
314
- interface ActivateReferralProgramResponseNonNullableFields$1 {
315
- referralProgram?: ReferralProgramNonNullableFields$1;
316
- }
317
- interface PauseReferralProgramResponseNonNullableFields$1 {
318
- referralProgram?: ReferralProgramNonNullableFields$1;
319
- }
320
- interface AISocialMediaPostSuggestionNonNullableFields$1 {
321
- postContent: string;
322
- hashtags: string[];
323
- }
324
- interface GetAISocialMediaPostsSuggestionsResponseNonNullableFields$1 {
325
- suggestions: AISocialMediaPostSuggestionNonNullableFields$1[];
326
- }
327
- interface GenerateAISocialMediaPostsSuggestionsResponseNonNullableFields$1 {
328
- suggestions: AISocialMediaPostSuggestionNonNullableFields$1[];
329
- }
330
- interface GetReferralProgramPremiumFeaturesResponseNonNullableFields$1 {
331
- referralProgram: boolean;
332
- }
333
-
334
- interface ReferralProgram {
335
- /** Referral program name. */
336
- name?: string | null;
337
- /** @readonly */
338
- status?: ProgramStatus;
339
- /**
340
- * Revision number, which increments by 1 each time the program is updated.
341
- * To prevent conflicting changes, the current `revision` must be passed when updating the program.
342
- */
343
- revision?: string | null;
344
- /**
345
- * Date and time the program was created.
346
- * @readonly
347
- */
348
- _createdDate?: Date | null;
349
- /**
350
- * Date and time the program was last updated.
351
- * @readonly
352
- */
353
- _updatedDate?: Date | null;
354
- /**
355
- * Reward configuration for the referred friend.
356
- * Specifies the reward given to a new customer who was referred to the business.
357
- */
358
- referredFriendReward?: Reward$2;
359
- /**
360
- * Reward configuration for the referring customer.
361
- * Specifies the reward given to an existing customer who referred a new customer to the business.
362
- */
363
- referringCustomerReward?: Reward$2;
364
- /** List of actions that complete a referral. For an action to be considered successful, the referred friend must place and pay for an item. */
365
- successfulReferralActions?: Action[];
366
- /** Configures email notifications for the referral program. */
367
- emails?: Emails;
368
- /**
369
- * Indicates which premium features are available for the current account.
370
- * @readonly
371
- */
372
- premiumFeatures?: PremiumFeatures;
373
- }
374
- /** Status of the referral program. */
375
- declare enum ProgramStatus {
376
- /** Unknown program status. */
377
- UNKNOWN = "UNKNOWN",
378
- /** Referral program is in a draft state and is being modified. It is not yet active. */
379
- DRAFT = "DRAFT",
380
- /** Referral program is active. */
381
- ACTIVE = "ACTIVE",
382
- /** Referral program is paused. */
383
- PAUSED = "PAUSED"
384
- }
385
- interface Reward$2 extends RewardOptionsOneOf {
386
- /** Options for coupon reward type. */
387
- couponOptions?: Coupon$4;
388
- /** Options for the Loyalty points reward type. */
389
- loyaltyPointsOptions?: LoyaltyPoints$2;
390
- /** Type of the reward. */
391
- type?: Type;
392
- }
393
- /** @oneof */
394
- interface RewardOptionsOneOf {
395
- /** Options for coupon reward type. */
396
- couponOptions?: Coupon$4;
397
- /** Options for the Loyalty points reward type. */
398
- loyaltyPointsOptions?: LoyaltyPoints$2;
399
- }
400
- declare enum Type {
401
- /** Unknown reward type. */
402
- UNKNOWN = "UNKNOWN",
403
- /** Coupon reward type. */
404
- COUPON = "COUPON",
405
- /** Loyalty points reward type. */
406
- LOYALTY_POINTS = "LOYALTY_POINTS",
407
- /** No reward type. */
408
- NOTHING = "NOTHING"
409
- }
410
- interface Coupon$4 extends CouponDiscountTypeOptionsOneOf$4, CouponScopeOrMinSubtotalOneOf$4 {
411
- /** Options for fixed amount discount. */
412
- fixedAmountOptions?: FixedAmountDiscount$4;
413
- /** Options for percentage discounts. */
414
- percentageOptions?: PercentageDiscount$4;
415
- /** Limit the coupon to carts with a subtotal above this number. */
416
- minimumSubtotal?: number;
417
- /** 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). */
418
- scope?: CouponScope$4;
419
- /** Coupon name. */
420
- name?: string;
421
- /** Coupon discount type. */
422
- discountType?: DiscountType$4;
423
- /**
424
- * Whether the coupon is limited to one item.
425
- * If `true` and a customer pays for multiple items, the discount applies to only the lowest priced item.
426
- * Coupons with a bookings `scope.namespace` are always limited to one item.
427
- */
428
- limitedToOneItem?: boolean | null;
429
- /** Whether the coupon applies to subscription products. */
430
- appliesToSubscriptions?: boolean | null;
431
- /**
432
- * Specifies the amount of discounted cycles for a subscription item.
433
- *
434
- * - Can only be set when `scope.namespace = pricingPlans`.
435
- * - If `discountedCycleCount` is empty, the coupon applies to all available cycles.
436
- * - `discountedCycleCount` is ignored if `appliesToSubscriptions = true`.
437
- *
438
- * Max: `999`
439
- */
440
- discountedCycleCount?: number | null;
441
- }
442
- /** @oneof */
443
- interface CouponDiscountTypeOptionsOneOf$4 {
444
- /** Options for fixed amount discount. */
445
- fixedAmountOptions?: FixedAmountDiscount$4;
446
- /** Options for percentage discounts. */
447
- percentageOptions?: PercentageDiscount$4;
448
- }
449
- /** @oneof */
450
- interface CouponScopeOrMinSubtotalOneOf$4 {
451
- /** Limit the coupon to carts with a subtotal above this number. */
452
- minimumSubtotal?: number;
453
- /** 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). */
454
- scope?: CouponScope$4;
455
- }
456
- declare enum DiscountType$4 {
457
- /** Unknown discount type. */
458
- UNKNOWN = "UNKNOWN",
459
- /** Discount as a fixed amount. */
460
- FIXED_AMOUNT = "FIXED_AMOUNT",
461
- /** Discount as a percentage. */
462
- PERCENTAGE = "PERCENTAGE",
463
- /** Free shipping. If `true`, the coupon applies to all items in all `namespaces`. */
464
- FREE_SHIPPING = "FREE_SHIPPING"
465
- }
466
- interface FixedAmountDiscount$4 {
467
- /** Amount of the discount as a fixed value. */
468
- amount?: number;
469
- }
470
- interface PercentageDiscount$4 {
471
- /** Percentage of discount. */
472
- percentage?: number;
473
- }
474
- interface CouponScope$4 {
475
- /** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */
476
- namespace?: string;
477
- /** Coupon scope's applied group, for example, Event or ticket in Wix Events. */
478
- group?: Group$4;
479
- }
480
- interface Group$4 {
481
- /** Name of the group. */
482
- name?: string;
483
- /** Entity ID of the group. */
484
- entityId?: string | null;
485
- }
486
- interface LoyaltyPoints$2 {
487
- /** Number of loyalty points to give. */
488
- amount?: number;
489
- }
490
- declare enum Action {
491
- /** Unknown action. */
492
- UNKNOWN = "UNKNOWN",
493
- /** Referred friend ordered and paid for an order in a store. */
494
- STORE_ORDER_PLACED = "STORE_ORDER_PLACED",
495
- /** Referred friend ordered and paid for a plan. */
496
- PLAN_ORDERED = "PLAN_ORDERED",
497
- /** Referred friend ordered and paid for a ticket. */
498
- TICKET_ORDERED = "TICKET_ORDERED",
499
- /** Referred friend booked and paid for a session. */
500
- SESSION_BOOKED = "SESSION_BOOKED",
501
- /** Referred friend placed and paid for a restaurant order. */
502
- RESTAURANT_ORDER_PLACED = "RESTAURANT_ORDER_PLACED",
503
- /** Referred friend joined an online program. */
504
- ONLINE_PROGRAM_JOINED = "ONLINE_PROGRAM_JOINED"
505
- }
506
- interface Emails {
507
- /** Configures email invitations to encourage customers to refer their friends. Select the apps for which this feature is enabled. */
508
- encourageToReferFriends?: App[];
509
- /**
510
- * Whether to send email notifications to referring customers when they receive a referral reward.
511
- * If true, referring customers will be notified by email when their referred friend completes a qualifying action (for example, placing an order).
512
- */
513
- notifyCustomersAboutReward?: boolean;
514
- }
515
- declare enum App {
516
- /** Unknown app. */
517
- UNKNOWN = "UNKNOWN",
518
- /** Send an email to customers who've placed an order with stores. */
519
- STORES = "STORES",
520
- /** Send an email to customers who've placed an order with pricing plans. */
521
- PRICING_PLANS = "PRICING_PLANS",
522
- /** Send an email to customers who've placed an order with events. */
523
- EVENTS = "EVENTS",
524
- /** Send an email to customers who've placed an order with bookings. */
525
- BOOKINGS = "BOOKINGS",
526
- /** Send an email to customers who've placed an order with restaurants. */
527
- RESTAURANTS = "RESTAURANTS"
528
- }
529
- interface PremiumFeatures {
530
- /**
531
- * Whether the site owner has access to the referral program feature.
532
- * @readonly
533
- */
534
- referralProgram?: boolean;
535
- }
536
- interface GetReferralProgramRequest {
537
- }
538
- interface GetReferralProgramResponse {
539
- /** Retrieved referral program. */
540
- referralProgram?: ReferralProgram;
541
- }
542
- interface UpdateReferralProgramRequest {
543
- /** Referral program to update. Include the latest `revision` for a successful update. */
544
- referralProgram: ReferralProgram;
545
- }
546
- interface UpdateReferralProgramResponse {
547
- /** Updated referral program. */
548
- referralProgram?: ReferralProgram;
549
- }
550
- interface ActivateReferralProgramRequest {
551
- }
552
- interface ActivateReferralProgramResponse {
553
- /** Activated referral program. */
554
- referralProgram?: ReferralProgram;
555
- }
556
- interface PauseReferralProgramRequest {
557
- }
558
- interface PauseReferralProgramResponse {
559
- /** Paused referral program. */
560
- referralProgram?: ReferralProgram;
561
- }
562
- interface GetAISocialMediaPostsSuggestionsRequest {
563
- /** Topic to generate social media post suggestions for. For example, fitness, education, technology. */
564
- topic?: string;
565
- }
566
- interface GetAISocialMediaPostsSuggestionsResponse {
567
- /** Generated social media post suggestions. */
568
- suggestions?: AISocialMediaPostSuggestion[];
569
- /** Referral URL to refer friends. */
570
- referFriendsPageUrl?: string | null;
571
- }
572
- interface AISocialMediaPostSuggestion {
573
- /** Suggested post content. */
574
- postContent?: string;
575
- /** Suggested hashtags. */
576
- hashtags?: string[];
577
- }
578
- interface GenerateAISocialMediaPostsSuggestionsRequest {
579
- /** Topic to generate social media post suggestions for. For example, fitness, education, technology. */
580
- topic?: string;
581
- }
582
- interface GenerateAISocialMediaPostsSuggestionsResponse {
583
- /** Generated social media post suggestions. */
584
- suggestions?: AISocialMediaPostSuggestion[];
585
- /** Referral URL to refer friends. */
586
- referFriendsPageUrl?: string | null;
587
- }
588
- interface GetReferralProgramPremiumFeaturesRequest {
589
- }
590
- interface GetReferralProgramPremiumFeaturesResponse {
591
- /**
592
- * Whether the site has the referral program feature enabled.
593
- * @readonly
594
- */
595
- referralProgram?: boolean;
596
- }
597
- interface FixedAmountDiscountNonNullableFields$4 {
598
- amount: number;
599
- }
600
- interface PercentageDiscountNonNullableFields$4 {
601
- percentage: number;
602
- }
603
- interface GroupNonNullableFields$4 {
604
- name: string;
605
- }
606
- interface CouponScopeNonNullableFields$4 {
607
- namespace: string;
608
- group?: GroupNonNullableFields$4;
609
- }
610
- interface CouponNonNullableFields$4 {
611
- fixedAmountOptions?: FixedAmountDiscountNonNullableFields$4;
612
- percentageOptions?: PercentageDiscountNonNullableFields$4;
613
- minimumSubtotal: number;
614
- scope?: CouponScopeNonNullableFields$4;
615
- name: string;
616
- discountType: DiscountType$4;
617
- }
618
- interface LoyaltyPointsNonNullableFields$2 {
619
- amount: number;
620
- }
621
- interface RewardNonNullableFields {
622
- couponOptions?: CouponNonNullableFields$4;
623
- loyaltyPointsOptions?: LoyaltyPointsNonNullableFields$2;
624
- type: Type;
625
- }
626
- interface EmailsNonNullableFields {
627
- encourageToReferFriends: App[];
628
- notifyCustomersAboutReward: boolean;
629
- }
630
- interface PremiumFeaturesNonNullableFields {
631
- referralProgram: boolean;
632
- }
633
- interface ReferralProgramNonNullableFields {
634
- status: ProgramStatus;
635
- referredFriendReward?: RewardNonNullableFields;
636
- referringCustomerReward?: RewardNonNullableFields;
637
- successfulReferralActions: Action[];
638
- emails?: EmailsNonNullableFields;
639
- premiumFeatures?: PremiumFeaturesNonNullableFields;
640
- }
641
- interface GetReferralProgramResponseNonNullableFields {
642
- referralProgram?: ReferralProgramNonNullableFields;
643
- }
644
- interface UpdateReferralProgramResponseNonNullableFields {
645
- referralProgram?: ReferralProgramNonNullableFields;
646
- }
647
- interface ActivateReferralProgramResponseNonNullableFields {
648
- referralProgram?: ReferralProgramNonNullableFields;
649
- }
650
- interface PauseReferralProgramResponseNonNullableFields {
651
- referralProgram?: ReferralProgramNonNullableFields;
652
- }
653
- interface AISocialMediaPostSuggestionNonNullableFields {
654
- postContent: string;
655
- hashtags: string[];
656
- }
657
- interface GetAISocialMediaPostsSuggestionsResponseNonNullableFields {
658
- suggestions: AISocialMediaPostSuggestionNonNullableFields[];
659
- }
660
- interface GenerateAISocialMediaPostsSuggestionsResponseNonNullableFields {
661
- suggestions: AISocialMediaPostSuggestionNonNullableFields[];
662
- }
663
- interface GetReferralProgramPremiumFeaturesResponseNonNullableFields {
664
- referralProgram: boolean;
665
- }
666
-
667
- type __PublicMethodMetaInfo$4<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
668
- getUrl: (context: any) => string;
669
- httpMethod: K;
670
- path: string;
671
- pathParams: M;
672
- __requestType: T;
673
- __originalRequestType: S;
674
- __responseType: Q;
675
- __originalResponseType: R;
676
- };
677
- declare function getReferralProgram(): __PublicMethodMetaInfo$4<'GET', {}, GetReferralProgramRequest, GetReferralProgramRequest$1, GetReferralProgramResponse & GetReferralProgramResponseNonNullableFields, GetReferralProgramResponse$1 & GetReferralProgramResponseNonNullableFields$1>;
678
- declare function updateReferralProgram(): __PublicMethodMetaInfo$4<'PATCH', {}, UpdateReferralProgramRequest, UpdateReferralProgramRequest$1, UpdateReferralProgramResponse & UpdateReferralProgramResponseNonNullableFields, UpdateReferralProgramResponse$1 & UpdateReferralProgramResponseNonNullableFields$1>;
679
- declare function activateReferralProgram(): __PublicMethodMetaInfo$4<'PATCH', {}, ActivateReferralProgramRequest, ActivateReferralProgramRequest$1, ActivateReferralProgramResponse & ActivateReferralProgramResponseNonNullableFields, ActivateReferralProgramResponse$1 & ActivateReferralProgramResponseNonNullableFields$1>;
680
- declare function pauseReferralProgram(): __PublicMethodMetaInfo$4<'PATCH', {}, PauseReferralProgramRequest, PauseReferralProgramRequest$1, PauseReferralProgramResponse & PauseReferralProgramResponseNonNullableFields, PauseReferralProgramResponse$1 & PauseReferralProgramResponseNonNullableFields$1>;
681
- declare function getAiSocialMediaPostsSuggestions(): __PublicMethodMetaInfo$4<'GET', {}, GetAISocialMediaPostsSuggestionsRequest, GetAISocialMediaPostsSuggestionsRequest$1, GetAISocialMediaPostsSuggestionsResponse & GetAISocialMediaPostsSuggestionsResponseNonNullableFields, GetAISocialMediaPostsSuggestionsResponse$1 & GetAISocialMediaPostsSuggestionsResponseNonNullableFields$1>;
682
- declare function generateAiSocialMediaPostsSuggestions(): __PublicMethodMetaInfo$4<'POST', {}, GenerateAISocialMediaPostsSuggestionsRequest, GenerateAISocialMediaPostsSuggestionsRequest$1, GenerateAISocialMediaPostsSuggestionsResponse & GenerateAISocialMediaPostsSuggestionsResponseNonNullableFields, GenerateAISocialMediaPostsSuggestionsResponse$1 & GenerateAISocialMediaPostsSuggestionsResponseNonNullableFields$1>;
683
- declare function getReferralProgramPremiumFeatures(): __PublicMethodMetaInfo$4<'GET', {}, GetReferralProgramPremiumFeaturesRequest, GetReferralProgramPremiumFeaturesRequest$1, GetReferralProgramPremiumFeaturesResponse & GetReferralProgramPremiumFeaturesResponseNonNullableFields, GetReferralProgramPremiumFeaturesResponse$1 & GetReferralProgramPremiumFeaturesResponseNonNullableFields$1>;
684
-
685
- declare const meta$4_activateReferralProgram: typeof activateReferralProgram;
686
- declare const meta$4_generateAiSocialMediaPostsSuggestions: typeof generateAiSocialMediaPostsSuggestions;
687
- declare const meta$4_getAiSocialMediaPostsSuggestions: typeof getAiSocialMediaPostsSuggestions;
688
- declare const meta$4_getReferralProgram: typeof getReferralProgram;
689
- declare const meta$4_getReferralProgramPremiumFeatures: typeof getReferralProgramPremiumFeatures;
690
- declare const meta$4_pauseReferralProgram: typeof pauseReferralProgram;
691
- declare const meta$4_updateReferralProgram: typeof updateReferralProgram;
692
- declare namespace meta$4 {
693
- export { type __PublicMethodMetaInfo$4 as __PublicMethodMetaInfo, meta$4_activateReferralProgram as activateReferralProgram, meta$4_generateAiSocialMediaPostsSuggestions as generateAiSocialMediaPostsSuggestions, meta$4_getAiSocialMediaPostsSuggestions as getAiSocialMediaPostsSuggestions, meta$4_getReferralProgram as getReferralProgram, meta$4_getReferralProgramPremiumFeatures as getReferralProgramPremiumFeatures, meta$4_pauseReferralProgram as pauseReferralProgram, meta$4_updateReferralProgram as updateReferralProgram };
694
- }
695
-
696
- interface ReferralEvent$1 extends ReferralEventEventTypeOneOf$1 {
697
- /** Event triggered when a referred friend signs up. */
698
- referredFriendSignupEvent?: ReferredFriendSignupEvent$1;
699
- /** Event triggered when a referral is successful. For example, customer places and pays for an order. */
700
- successfulReferralEvent?: V1SuccessfulReferralEvent$1;
701
- /** Event triggered when an action is performed. For example, placing an order. */
702
- actionEvent?: V1ActionEvent$1;
703
- /** Event triggered when a reward is given. */
704
- rewardEvent?: RewardEvent$1;
705
- /**
706
- * Referral event ID.
707
- * @readonly
708
- */
709
- id?: string | null;
710
- /**
711
- * Revision number, which increments by 1 each time the referral event is updated.
712
- * To prevent conflicting changes, the current revision must be passed when updating the referral event.
713
- */
714
- revision?: string | null;
715
- /**
716
- * Date and time the referral event was created.
717
- * @readonly
718
- */
719
- createdDate?: Date | null;
720
- /**
721
- * Date and time the referral event was last updated.
722
- * @readonly
723
- */
724
- updatedDate?: Date | null;
725
- }
726
- /** @oneof */
727
- interface ReferralEventEventTypeOneOf$1 {
728
- /** Event triggered when a referred friend signs up. */
729
- referredFriendSignupEvent?: ReferredFriendSignupEvent$1;
730
- /** Event triggered when a referral is successful. For example, customer places and pays for an order. */
731
- successfulReferralEvent?: V1SuccessfulReferralEvent$1;
732
- /** Event triggered when an action is performed. For example, placing an order. */
733
- actionEvent?: V1ActionEvent$1;
734
- /** Event triggered when a reward is given. */
735
- rewardEvent?: RewardEvent$1;
736
- }
737
- interface ReferredFriendSignupEvent$1 {
738
- /** ID of the referred friend */
739
- referredFriendId?: string;
740
- }
741
- interface V1SuccessfulReferralEvent$1 {
742
- /** ID of the referred friend */
743
- referredFriendId?: string;
744
- /** ID of the referring customer */
745
- referringCustomerId?: string;
746
- }
747
- interface V1ActionEvent$1 {
748
- /** ID of the referred friend */
749
- referredFriendId?: string;
750
- /** ID of the referring customer */
751
- referringCustomerId?: string;
752
- /** Trigger for the action */
753
- trigger?: V1Trigger$1;
754
- /** Amount associated with the action. */
755
- amount?: string | null;
756
- /** Currency of the amount. */
757
- currency?: string | null;
758
- /** ID of the associated order. */
759
- orderId?: string | null;
760
- }
761
- interface V1Trigger$1 {
762
- /** ID of the app that triggered the event */
763
- appId?: string;
764
- /** Type of activity that triggered the event */
765
- activityType?: string;
766
- }
767
- interface RewardEvent$1 extends RewardEventReceiverOneOf$1 {
768
- /**
769
- * ID of the rewarded referring customer.
770
- * @readonly
771
- */
772
- rewardedReferringCustomerId?: string;
773
- /**
774
- * ID of the rewarded referred friend.
775
- * @readonly
776
- */
777
- rewardedReferredFriendId?: string;
778
- /** ID of the referral reward. */
779
- referralRewardId?: string;
780
- /** Type of reward. */
781
- rewardType?: Reward$1;
782
- }
783
- /** @oneof */
784
- interface RewardEventReceiverOneOf$1 {
785
- /**
786
- * ID of the rewarded referring customer.
787
- * @readonly
788
- */
789
- rewardedReferringCustomerId?: string;
790
- /**
791
- * ID of the rewarded referred friend.
792
- * @readonly
793
- */
794
- rewardedReferredFriendId?: string;
795
- }
796
- declare enum Reward$1 {
797
- /** Unknown reward. This field is not used. */
798
- UNKNOWN = "UNKNOWN",
799
- /** Reward is a coupon */
800
- COUPON = "COUPON",
801
- /** Reward is loyalty points. */
802
- LOYALTY_POINTS = "LOYALTY_POINTS",
803
- /** No reward. */
804
- NOTHING = "NOTHING"
805
- }
806
- interface GetReferralEventRequest$1 {
807
- /** ID of the referral event to retrieve. */
808
- referralEventId: string;
809
- }
810
- interface GetReferralEventResponse$1 {
811
- /** Retrieved referral event. */
812
- referralEvent?: ReferralEvent$1;
813
- }
814
- interface QueryReferralEventRequest$1 {
815
- /** Query to filter referral events */
816
- query: CursorQuery$7;
817
- }
818
- interface CursorQuery$7 extends CursorQueryPagingMethodOneOf$7 {
819
- /**
820
- * Cursor paging options.
821
- *
822
- * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
823
- */
824
- cursorPaging?: CursorPaging$7;
825
- /**
826
- * Filter object.
827
- *
828
- * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
829
- */
830
- filter?: Record<string, any> | null;
831
- /**
832
- * Sort object.
833
- *
834
- * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
835
- */
836
- sort?: Sorting$7[];
837
- }
838
- /** @oneof */
839
- interface CursorQueryPagingMethodOneOf$7 {
840
- /**
841
- * Cursor paging options.
842
- *
843
- * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
844
- */
845
- cursorPaging?: CursorPaging$7;
846
- }
847
- interface Sorting$7 {
848
- /** Name of the field to sort by. */
849
- fieldName?: string;
850
- /** Sort order. */
851
- order?: SortOrder$7;
852
- }
853
- declare enum SortOrder$7 {
854
- ASC = "ASC",
855
- DESC = "DESC"
856
- }
857
- interface CursorPaging$7 {
858
- /** Maximum number of items to return in the results. */
859
- limit?: number | null;
860
- /**
861
- * Pointer to the next or previous page in the list of results.
862
- *
863
- * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
864
- * Not relevant for the first request.
865
- */
866
- cursor?: string | null;
867
- }
868
- interface QueryReferralEventResponse$1 {
869
- /** List of referral events. */
870
- referralEvents?: ReferralEvent$1[];
871
- /** Metadata for the paginated results. */
872
- metadata?: CursorPagingMetadata$7;
873
- }
874
- interface CursorPagingMetadata$7 {
875
- /** Number of items returned in current page. */
876
- count?: number | null;
877
- /** Cursor strings that point to the next page, previous page, or both. */
878
- cursors?: Cursors$7;
879
- /**
880
- * Whether there are more pages to retrieve following the current page.
881
- *
882
- * + `true`: Another page of results can be retrieved.
883
- * + `false`: This is the last page.
884
- */
885
- hasNext?: boolean | null;
886
- }
887
- interface Cursors$7 {
888
- /** Cursor string pointing to the next page in the list of results. */
889
- next?: string | null;
890
- /** Cursor pointing to the previous page in the list of results. */
891
- prev?: string | null;
892
- }
893
- interface GetReferralStatisticsRequest$1 {
894
- }
895
- interface GetReferralStatisticsResponse$1 {
896
- /** Total number of sign-ups completed by referred friends. */
897
- totalSignUpsCompleted?: number;
898
- /** Total number of actions completed by referred friends. */
899
- totalActionsCompleted?: number;
900
- /** Total amount of purchases made by referred friends. */
901
- totalAmountGenerated?: string;
902
- }
903
- interface QueryReferringCustomerTotalsRequest$1 {
904
- /** Query to filter referring customer totals. */
905
- query?: CursorQuery$7;
906
- /** List of contact IDs to filter referring customer totals. */
907
- contactIds?: string[];
908
- }
909
- interface QueryReferringCustomerTotalsResponse$1 {
910
- referringCustomerTotals?: ReferringCustomerTotal$1[];
911
- /** Paging metadata */
912
- metadata?: CursorPagingMetadata$7;
913
- }
914
- interface ReferringCustomerTotal$1 {
915
- /**
916
- * ID of the referring customer.
917
- * @readonly
918
- */
919
- referringCustomerId?: string;
920
- /**
921
- * Contact ID.
922
- * @readonly
923
- */
924
- contactId?: string;
925
- /**
926
- * Date and time of the last successful referral.
927
- * @readonly
928
- */
929
- lastSuccessfulReferral?: Date | null;
930
- /**
931
- * Total number of successful referrals made by this customer.
932
- * @readonly
933
- */
934
- totalSuccessfulReferrals?: number;
935
- /**
936
- * Total amount of revenue generated by friends referred by this customer.
937
- * @readonly
938
- */
939
- totalAmountGenerated?: string;
940
- /**
941
- * Date and time of the last friend action.
942
- * @readonly
943
- */
944
- lastFriendAction?: Date | null;
945
- /**
946
- * Number of friends who have completed actions.
947
- * @readonly
948
- */
949
- totalFriendsWithActions?: number;
950
- }
951
- interface QueryReferredFriendActionsRequest$1 {
952
- /** Query to filter referred friend actions. */
953
- query?: CursorQuery$7;
954
- /** List of contact IDs to filter referred friend actions. */
955
- contactIds?: string[];
956
- }
957
- interface QueryReferredFriendActionsResponse$1 {
958
- /** List of referred friend actions matching the query. */
959
- referredFriendActions?: ReferredFriendAction$1[];
960
- /** Paging metadata */
961
- metadata?: CursorPagingMetadata$7;
962
- }
963
- interface ReferredFriendAction$1 extends ReferredFriendActionRewardTypeOptionsOneOf$1 {
964
- /** Coupon reward type options. */
965
- coupon?: V1Coupon$3;
966
- /** Loyalty points reward type options. */
967
- loyaltyPoints?: LoyaltyPoints$1;
968
- /**
969
- * Referred friend ID.
970
- * @readonly
971
- */
972
- referredFriendId?: string;
973
- /**
974
- * Contact ID.
975
- * @readonly
976
- */
977
- contactId?: string;
978
- /**
979
- * Trigger for the first action.
980
- * @readonly
981
- */
982
- trigger?: V1Trigger$1;
983
- /**
984
- * Date and time of the first action.
985
- * @readonly
986
- */
987
- actionDate?: Date | null;
988
- /** Type of issued reward. */
989
- rewardType?: Reward$1;
990
- /** Number of actions completed. */
991
- totalActions?: number;
992
- /**
993
- * Total amount spent by this referred friend.
994
- * @readonly
995
- */
996
- totalAmountSpent?: string;
997
- /**
998
- * Date and time of friend signup.
999
- * @readonly
1000
- */
1001
- signupDate?: Date | null;
1002
- }
1003
- /** @oneof */
1004
- interface ReferredFriendActionRewardTypeOptionsOneOf$1 {
1005
- /** Coupon reward type options. */
1006
- coupon?: V1Coupon$3;
1007
- /** Loyalty points reward type options. */
1008
- loyaltyPoints?: LoyaltyPoints$1;
1009
- }
1010
- interface V1Coupon$3 {
1011
- /**
1012
- * Coupon ID. Example: `8934b045-7052-4a90-be2b-832c70afc9da`.
1013
- * @readonly
1014
- */
1015
- id?: string;
1016
- /**
1017
- * The code that customers can use to apply the coupon. Example: `6RFD2A3HSPXW`.
1018
- * @readonly
1019
- */
1020
- code?: string;
1021
- /**
1022
- * Current status of the coupon.
1023
- * @readonly
1024
- */
1025
- status?: Status$5;
1026
- /**
1027
- * Detailed specifications of the coupon.
1028
- * @readonly
1029
- */
1030
- couponSpecification?: Coupon$3;
1031
- }
1032
- declare enum Status$5 {
1033
- /** Coupon status is unknown or not specified. */
1034
- UNKNOWN = "UNKNOWN",
1035
- /** Coupon is active and can be applied to purchases. */
1036
- ACTIVE = "ACTIVE",
1037
- /** Coupon was applied and can't be used again. */
1038
- APPLIED = "APPLIED",
1039
- /** Coupon was deleted and is no longer valid. */
1040
- DELETED = "DELETED"
1041
- }
1042
- interface Coupon$3 extends CouponDiscountTypeOptionsOneOf$3, CouponScopeOrMinSubtotalOneOf$3 {
1043
- /** Options for fixed amount discount. */
1044
- fixedAmountOptions?: FixedAmountDiscount$3;
1045
- /** Options for percentage discounts. */
1046
- percentageOptions?: PercentageDiscount$3;
1047
- /** Limit the coupon to carts with a subtotal above this number. */
1048
- minimumSubtotal?: number;
1049
- /** 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). */
1050
- scope?: CouponScope$3;
1051
- /** Coupon name. */
1052
- name?: string;
1053
- /** Coupon discount type. */
1054
- discountType?: DiscountType$3;
1055
- /**
1056
- * Whether the coupon is limited to one item.
1057
- * If `true` and a customer pays for multiple items, the discount applies to only the lowest priced item.
1058
- * Coupons with a bookings `scope.namespace` are always limited to one item.
1059
- */
1060
- limitedToOneItem?: boolean | null;
1061
- /** Whether the coupon applies to subscription products. */
1062
- appliesToSubscriptions?: boolean | null;
1063
- /**
1064
- * Specifies the amount of discounted cycles for a subscription item.
1065
- *
1066
- * - Can only be set when `scope.namespace = pricingPlans`.
1067
- * - If `discountedCycleCount` is empty, the coupon applies to all available cycles.
1068
- * - `discountedCycleCount` is ignored if `appliesToSubscriptions = true`.
1069
- *
1070
- * Max: `999`
1071
- */
1072
- discountedCycleCount?: number | null;
1073
- }
1074
- /** @oneof */
1075
- interface CouponDiscountTypeOptionsOneOf$3 {
1076
- /** Options for fixed amount discount. */
1077
- fixedAmountOptions?: FixedAmountDiscount$3;
1078
- /** Options for percentage discounts. */
1079
- percentageOptions?: PercentageDiscount$3;
1080
- }
1081
- /** @oneof */
1082
- interface CouponScopeOrMinSubtotalOneOf$3 {
1083
- /** Limit the coupon to carts with a subtotal above this number. */
1084
- minimumSubtotal?: number;
1085
- /** 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). */
1086
- scope?: CouponScope$3;
1087
- }
1088
- declare enum DiscountType$3 {
1089
- /** Unknown discount type. */
1090
- UNKNOWN = "UNKNOWN",
1091
- /** Discount as a fixed amount. */
1092
- FIXED_AMOUNT = "FIXED_AMOUNT",
1093
- /** Discount as a percentage. */
1094
- PERCENTAGE = "PERCENTAGE",
1095
- /** Free shipping. If `true`, the coupon applies to all items in all `namespaces`. */
1096
- FREE_SHIPPING = "FREE_SHIPPING"
1097
- }
1098
- interface FixedAmountDiscount$3 {
1099
- /** Amount of the discount as a fixed value. */
1100
- amount?: number;
1101
- }
1102
- interface PercentageDiscount$3 {
1103
- /** Percentage of discount. */
1104
- percentage?: number;
1105
- }
1106
- interface CouponScope$3 {
1107
- /** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */
1108
- namespace?: string;
1109
- /** Coupon scope's applied group, for example, Event or ticket in Wix Events. */
1110
- group?: Group$3;
1111
- }
1112
- interface Group$3 {
1113
- /** Name of the group. */
1114
- name?: string;
1115
- /** Entity ID of the group. */
1116
- entityId?: string | null;
1117
- }
1118
- interface LoyaltyPoints$1 {
1119
- /**
1120
- * Loyalty transaction ID.
1121
- * @readonly
1122
- */
1123
- transactionId?: string;
1124
- /**
1125
- * The number of loyalty points awarded.
1126
- * @readonly
1127
- */
1128
- amount?: number;
1129
- }
1130
- interface ReferredFriendSignupEventNonNullableFields$1 {
1131
- referredFriendId: string;
1132
- }
1133
- interface V1SuccessfulReferralEventNonNullableFields$1 {
1134
- referredFriendId: string;
1135
- referringCustomerId: string;
1136
- }
1137
- interface V1TriggerNonNullableFields$1 {
1138
- appId: string;
1139
- activityType: string;
1140
- }
1141
- interface V1ActionEventNonNullableFields$1 {
1142
- referredFriendId: string;
1143
- referringCustomerId: string;
1144
- trigger?: V1TriggerNonNullableFields$1;
1145
- }
1146
- interface RewardEventNonNullableFields$1 {
1147
- rewardedReferringCustomerId: string;
1148
- rewardedReferredFriendId: string;
1149
- referralRewardId: string;
1150
- rewardType: Reward$1;
1151
- }
1152
- interface ReferralEventNonNullableFields$1 {
1153
- referredFriendSignupEvent?: ReferredFriendSignupEventNonNullableFields$1;
1154
- successfulReferralEvent?: V1SuccessfulReferralEventNonNullableFields$1;
1155
- actionEvent?: V1ActionEventNonNullableFields$1;
1156
- rewardEvent?: RewardEventNonNullableFields$1;
1157
- }
1158
- interface GetReferralEventResponseNonNullableFields$1 {
1159
- referralEvent?: ReferralEventNonNullableFields$1;
1160
- }
1161
- interface QueryReferralEventResponseNonNullableFields$1 {
1162
- referralEvents: ReferralEventNonNullableFields$1[];
1163
- }
1164
- interface GetReferralStatisticsResponseNonNullableFields$1 {
1165
- totalSignUpsCompleted: number;
1166
- totalActionsCompleted: number;
1167
- totalAmountGenerated: string;
1168
- }
1169
- interface ReferringCustomerTotalNonNullableFields$1 {
1170
- referringCustomerId: string;
1171
- contactId: string;
1172
- totalSuccessfulReferrals: number;
1173
- totalAmountGenerated: string;
1174
- totalFriendsWithActions: number;
1175
- }
1176
- interface QueryReferringCustomerTotalsResponseNonNullableFields$1 {
1177
- referringCustomerTotals: ReferringCustomerTotalNonNullableFields$1[];
1178
- }
1179
- interface FixedAmountDiscountNonNullableFields$3 {
1180
- amount: number;
1181
- }
1182
- interface PercentageDiscountNonNullableFields$3 {
1183
- percentage: number;
1184
- }
1185
- interface GroupNonNullableFields$3 {
1186
- name: string;
1187
- }
1188
- interface CouponScopeNonNullableFields$3 {
1189
- namespace: string;
1190
- group?: GroupNonNullableFields$3;
1191
- }
1192
- interface CouponNonNullableFields$3 {
1193
- fixedAmountOptions?: FixedAmountDiscountNonNullableFields$3;
1194
- percentageOptions?: PercentageDiscountNonNullableFields$3;
1195
- minimumSubtotal: number;
1196
- scope?: CouponScopeNonNullableFields$3;
1197
- name: string;
1198
- discountType: DiscountType$3;
1199
- }
1200
- interface V1CouponNonNullableFields$3 {
1201
- id: string;
1202
- code: string;
1203
- status: Status$5;
1204
- couponSpecification?: CouponNonNullableFields$3;
1205
- }
1206
- interface LoyaltyPointsNonNullableFields$1 {
1207
- transactionId: string;
1208
- amount: number;
1209
- }
1210
- interface ReferredFriendActionNonNullableFields$1 {
1211
- coupon?: V1CouponNonNullableFields$3;
1212
- loyaltyPoints?: LoyaltyPointsNonNullableFields$1;
1213
- referredFriendId: string;
1214
- contactId: string;
1215
- trigger?: V1TriggerNonNullableFields$1;
1216
- rewardType: Reward$1;
1217
- totalActions: number;
1218
- totalAmountSpent: string;
1219
- }
1220
- interface QueryReferredFriendActionsResponseNonNullableFields$1 {
1221
- referredFriendActions: ReferredFriendActionNonNullableFields$1[];
1222
- }
1223
-
1224
- interface ReferralEvent extends ReferralEventEventTypeOneOf {
1225
- /** Event triggered when a referred friend signs up. */
1226
- referredFriendSignupEvent?: ReferredFriendSignupEvent;
1227
- /** Event triggered when a referral is successful. For example, customer places and pays for an order. */
1228
- successfulReferralEvent?: V1SuccessfulReferralEvent;
1229
- /** Event triggered when an action is performed. For example, placing an order. */
1230
- actionEvent?: V1ActionEvent;
1231
- /** Event triggered when a reward is given. */
1232
- rewardEvent?: RewardEvent;
1233
- /**
1234
- * Referral event ID.
1235
- * @readonly
1236
- */
1237
- _id?: string | null;
1238
- /**
1239
- * Revision number, which increments by 1 each time the referral event is updated.
1240
- * To prevent conflicting changes, the current revision must be passed when updating the referral event.
1241
- */
1242
- revision?: string | null;
1243
- /**
1244
- * Date and time the referral event was created.
1245
- * @readonly
1246
- */
1247
- _createdDate?: Date | null;
1248
- /**
1249
- * Date and time the referral event was last updated.
1250
- * @readonly
1251
- */
1252
- _updatedDate?: Date | null;
1253
- }
1254
- /** @oneof */
1255
- interface ReferralEventEventTypeOneOf {
1256
- /** Event triggered when a referred friend signs up. */
1257
- referredFriendSignupEvent?: ReferredFriendSignupEvent;
1258
- /** Event triggered when a referral is successful. For example, customer places and pays for an order. */
1259
- successfulReferralEvent?: V1SuccessfulReferralEvent;
1260
- /** Event triggered when an action is performed. For example, placing an order. */
1261
- actionEvent?: V1ActionEvent;
1262
- /** Event triggered when a reward is given. */
1263
- rewardEvent?: RewardEvent;
1264
- }
1265
- interface ReferredFriendSignupEvent {
1266
- /** ID of the referred friend */
1267
- referredFriendId?: string;
1268
- }
1269
- interface V1SuccessfulReferralEvent {
1270
- /** ID of the referred friend */
1271
- referredFriendId?: string;
1272
- /** ID of the referring customer */
1273
- referringCustomerId?: string;
1274
- }
1275
- interface V1ActionEvent {
1276
- /** ID of the referred friend */
1277
- referredFriendId?: string;
1278
- /** ID of the referring customer */
1279
- referringCustomerId?: string;
1280
- /** Trigger for the action */
1281
- trigger?: V1Trigger;
1282
- /** Amount associated with the action. */
1283
- amount?: string | null;
1284
- /** Currency of the amount. */
1285
- currency?: string | null;
1286
- /** ID of the associated order. */
1287
- orderId?: string | null;
1288
- }
1289
- interface V1Trigger {
1290
- /** ID of the app that triggered the event */
1291
- appId?: string;
1292
- /** Type of activity that triggered the event */
1293
- activityType?: string;
1294
- }
1295
- interface RewardEvent extends RewardEventReceiverOneOf {
1296
- /**
1297
- * ID of the rewarded referring customer.
1298
- * @readonly
1299
- */
1300
- rewardedReferringCustomerId?: string;
1301
- /**
1302
- * ID of the rewarded referred friend.
1303
- * @readonly
1304
- */
1305
- rewardedReferredFriendId?: string;
1306
- /** ID of the referral reward. */
1307
- referralRewardId?: string;
1308
- /** Type of reward. */
1309
- rewardType?: Reward;
1310
- }
1311
- /** @oneof */
1312
- interface RewardEventReceiverOneOf {
1313
- /**
1314
- * ID of the rewarded referring customer.
1315
- * @readonly
1316
- */
1317
- rewardedReferringCustomerId?: string;
1318
- /**
1319
- * ID of the rewarded referred friend.
1320
- * @readonly
1321
- */
1322
- rewardedReferredFriendId?: string;
1323
- }
1324
- declare enum Reward {
1325
- /** Unknown reward. This field is not used. */
1326
- UNKNOWN = "UNKNOWN",
1327
- /** Reward is a coupon */
1328
- COUPON = "COUPON",
1329
- /** Reward is loyalty points. */
1330
- LOYALTY_POINTS = "LOYALTY_POINTS",
1331
- /** No reward. */
1332
- NOTHING = "NOTHING"
1333
- }
1334
- interface GetReferralEventRequest {
1335
- /** ID of the referral event to retrieve. */
1336
- referralEventId: string;
1337
- }
1338
- interface GetReferralEventResponse {
1339
- /** Retrieved referral event. */
1340
- referralEvent?: ReferralEvent;
1341
- }
1342
- interface QueryReferralEventRequest {
1343
- /** Query to filter referral events */
1344
- query: CursorQuery$6;
1345
- }
1346
- interface CursorQuery$6 extends CursorQueryPagingMethodOneOf$6 {
1347
- /**
1348
- * Cursor paging options.
1349
- *
1350
- * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
1351
- */
1352
- cursorPaging?: CursorPaging$6;
1353
- /**
1354
- * Filter object.
1355
- *
1356
- * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
1357
- */
1358
- filter?: Record<string, any> | null;
1359
- /**
1360
- * Sort object.
1361
- *
1362
- * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
1363
- */
1364
- sort?: Sorting$6[];
1365
- }
1366
- /** @oneof */
1367
- interface CursorQueryPagingMethodOneOf$6 {
1368
- /**
1369
- * Cursor paging options.
1370
- *
1371
- * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
1372
- */
1373
- cursorPaging?: CursorPaging$6;
1374
- }
1375
- interface Sorting$6 {
1376
- /** Name of the field to sort by. */
1377
- fieldName?: string;
1378
- /** Sort order. */
1379
- order?: SortOrder$6;
1380
- }
1381
- declare enum SortOrder$6 {
1382
- ASC = "ASC",
1383
- DESC = "DESC"
1384
- }
1385
- interface CursorPaging$6 {
1386
- /** Maximum number of items to return in the results. */
1387
- limit?: number | null;
1388
- /**
1389
- * Pointer to the next or previous page in the list of results.
1390
- *
1391
- * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
1392
- * Not relevant for the first request.
1393
- */
1394
- cursor?: string | null;
1395
- }
1396
- interface QueryReferralEventResponse {
1397
- /** List of referral events. */
1398
- referralEvents?: ReferralEvent[];
1399
- /** Metadata for the paginated results. */
1400
- metadata?: CursorPagingMetadata$6;
1401
- }
1402
- interface CursorPagingMetadata$6 {
1403
- /** Number of items returned in current page. */
1404
- count?: number | null;
1405
- /** Cursor strings that point to the next page, previous page, or both. */
1406
- cursors?: Cursors$6;
1407
- /**
1408
- * Whether there are more pages to retrieve following the current page.
1409
- *
1410
- * + `true`: Another page of results can be retrieved.
1411
- * + `false`: This is the last page.
1412
- */
1413
- hasNext?: boolean | null;
1414
- }
1415
- interface Cursors$6 {
1416
- /** Cursor string pointing to the next page in the list of results. */
1417
- next?: string | null;
1418
- /** Cursor pointing to the previous page in the list of results. */
1419
- prev?: string | null;
1420
- }
1421
- interface GetReferralStatisticsRequest {
1422
- }
1423
- interface GetReferralStatisticsResponse {
1424
- /** Total number of sign-ups completed by referred friends. */
1425
- totalSignUpsCompleted?: number;
1426
- /** Total number of actions completed by referred friends. */
1427
- totalActionsCompleted?: number;
1428
- /** Total amount of purchases made by referred friends. */
1429
- totalAmountGenerated?: string;
1430
- }
1431
- interface QueryReferringCustomerTotalsRequest {
1432
- /** Query to filter referring customer totals. */
1433
- query?: CursorQuery$6;
1434
- /** List of contact IDs to filter referring customer totals. */
1435
- contactIds?: string[];
1436
- }
1437
- interface QueryReferringCustomerTotalsResponse {
1438
- referringCustomerTotals?: ReferringCustomerTotal[];
1439
- /** Paging metadata */
1440
- metadata?: CursorPagingMetadata$6;
1441
- }
1442
- interface ReferringCustomerTotal {
1443
- /**
1444
- * ID of the referring customer.
1445
- * @readonly
1446
- */
1447
- referringCustomerId?: string;
1448
- /**
1449
- * Contact ID.
1450
- * @readonly
1451
- */
1452
- contactId?: string;
1453
- /**
1454
- * Date and time of the last successful referral.
1455
- * @readonly
1456
- */
1457
- lastSuccessfulReferral?: Date | null;
1458
- /**
1459
- * Total number of successful referrals made by this customer.
1460
- * @readonly
1461
- */
1462
- totalSuccessfulReferrals?: number;
1463
- /**
1464
- * Total amount of revenue generated by friends referred by this customer.
1465
- * @readonly
1466
- */
1467
- totalAmountGenerated?: string;
1468
- /**
1469
- * Date and time of the last friend action.
1470
- * @readonly
1471
- */
1472
- lastFriendAction?: Date | null;
1473
- /**
1474
- * Number of friends who have completed actions.
1475
- * @readonly
1476
- */
1477
- totalFriendsWithActions?: number;
1478
- }
1479
- interface QueryReferredFriendActionsRequest {
1480
- /** Query to filter referred friend actions. */
1481
- query?: CursorQuery$6;
1482
- /** List of contact IDs to filter referred friend actions. */
1483
- contactIds?: string[];
1484
- }
1485
- interface QueryReferredFriendActionsResponse {
1486
- /** List of referred friend actions matching the query. */
1487
- referredFriendActions?: ReferredFriendAction[];
1488
- /** Paging metadata */
1489
- metadata?: CursorPagingMetadata$6;
1490
- }
1491
- interface ReferredFriendAction extends ReferredFriendActionRewardTypeOptionsOneOf {
1492
- /** Coupon reward type options. */
1493
- coupon?: V1Coupon$2;
1494
- /** Loyalty points reward type options. */
1495
- loyaltyPoints?: LoyaltyPoints;
1496
- /**
1497
- * Referred friend ID.
1498
- * @readonly
1499
- */
1500
- referredFriendId?: string;
1501
- /**
1502
- * Contact ID.
1503
- * @readonly
1504
- */
1505
- contactId?: string;
1506
- /**
1507
- * Trigger for the first action.
1508
- * @readonly
1509
- */
1510
- trigger?: V1Trigger;
1511
- /**
1512
- * Date and time of the first action.
1513
- * @readonly
1514
- */
1515
- actionDate?: Date | null;
1516
- /** Type of issued reward. */
1517
- rewardType?: Reward;
1518
- /** Number of actions completed. */
1519
- totalActions?: number;
1520
- /**
1521
- * Total amount spent by this referred friend.
1522
- * @readonly
1523
- */
1524
- totalAmountSpent?: string;
1525
- /**
1526
- * Date and time of friend signup.
1527
- * @readonly
1528
- */
1529
- signupDate?: Date | null;
1530
- }
1531
- /** @oneof */
1532
- interface ReferredFriendActionRewardTypeOptionsOneOf {
1533
- /** Coupon reward type options. */
1534
- coupon?: V1Coupon$2;
1535
- /** Loyalty points reward type options. */
1536
- loyaltyPoints?: LoyaltyPoints;
1537
- }
1538
- interface V1Coupon$2 {
1539
- /**
1540
- * Coupon ID. Example: `8934b045-7052-4a90-be2b-832c70afc9da`.
1541
- * @readonly
1542
- */
1543
- _id?: string;
1544
- /**
1545
- * The code that customers can use to apply the coupon. Example: `6RFD2A3HSPXW`.
1546
- * @readonly
1547
- */
1548
- code?: string;
1549
- /**
1550
- * Current status of the coupon.
1551
- * @readonly
1552
- */
1553
- status?: Status$4;
1554
- /**
1555
- * Detailed specifications of the coupon.
1556
- * @readonly
1557
- */
1558
- couponSpecification?: Coupon$2;
1559
- }
1560
- declare enum Status$4 {
1561
- /** Coupon status is unknown or not specified. */
1562
- UNKNOWN = "UNKNOWN",
1563
- /** Coupon is active and can be applied to purchases. */
1564
- ACTIVE = "ACTIVE",
1565
- /** Coupon was applied and can't be used again. */
1566
- APPLIED = "APPLIED",
1567
- /** Coupon was deleted and is no longer valid. */
1568
- DELETED = "DELETED"
1569
- }
1570
- interface Coupon$2 extends CouponDiscountTypeOptionsOneOf$2, CouponScopeOrMinSubtotalOneOf$2 {
1571
- /** Options for fixed amount discount. */
1572
- fixedAmountOptions?: FixedAmountDiscount$2;
1573
- /** Options for percentage discounts. */
1574
- percentageOptions?: PercentageDiscount$2;
1575
- /** Limit the coupon to carts with a subtotal above this number. */
1576
- minimumSubtotal?: number;
1577
- /** 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). */
1578
- scope?: CouponScope$2;
1579
- /** Coupon name. */
1580
- name?: string;
1581
- /** Coupon discount type. */
1582
- discountType?: DiscountType$2;
1583
- /**
1584
- * Whether the coupon is limited to one item.
1585
- * If `true` and a customer pays for multiple items, the discount applies to only the lowest priced item.
1586
- * Coupons with a bookings `scope.namespace` are always limited to one item.
1587
- */
1588
- limitedToOneItem?: boolean | null;
1589
- /** Whether the coupon applies to subscription products. */
1590
- appliesToSubscriptions?: boolean | null;
1591
- /**
1592
- * Specifies the amount of discounted cycles for a subscription item.
1593
- *
1594
- * - Can only be set when `scope.namespace = pricingPlans`.
1595
- * - If `discountedCycleCount` is empty, the coupon applies to all available cycles.
1596
- * - `discountedCycleCount` is ignored if `appliesToSubscriptions = true`.
1597
- *
1598
- * Max: `999`
1599
- */
1600
- discountedCycleCount?: number | null;
1601
- }
1602
- /** @oneof */
1603
- interface CouponDiscountTypeOptionsOneOf$2 {
1604
- /** Options for fixed amount discount. */
1605
- fixedAmountOptions?: FixedAmountDiscount$2;
1606
- /** Options for percentage discounts. */
1607
- percentageOptions?: PercentageDiscount$2;
1608
- }
1609
- /** @oneof */
1610
- interface CouponScopeOrMinSubtotalOneOf$2 {
1611
- /** Limit the coupon to carts with a subtotal above this number. */
1612
- minimumSubtotal?: number;
1613
- /** 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). */
1614
- scope?: CouponScope$2;
1615
- }
1616
- declare enum DiscountType$2 {
1617
- /** Unknown discount type. */
1618
- UNKNOWN = "UNKNOWN",
1619
- /** Discount as a fixed amount. */
1620
- FIXED_AMOUNT = "FIXED_AMOUNT",
1621
- /** Discount as a percentage. */
1622
- PERCENTAGE = "PERCENTAGE",
1623
- /** Free shipping. If `true`, the coupon applies to all items in all `namespaces`. */
1624
- FREE_SHIPPING = "FREE_SHIPPING"
1625
- }
1626
- interface FixedAmountDiscount$2 {
1627
- /** Amount of the discount as a fixed value. */
1628
- amount?: number;
1629
- }
1630
- interface PercentageDiscount$2 {
1631
- /** Percentage of discount. */
1632
- percentage?: number;
1633
- }
1634
- interface CouponScope$2 {
1635
- /** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */
1636
- namespace?: string;
1637
- /** Coupon scope's applied group, for example, Event or ticket in Wix Events. */
1638
- group?: Group$2;
1639
- }
1640
- interface Group$2 {
1641
- /** Name of the group. */
1642
- name?: string;
1643
- /** Entity ID of the group. */
1644
- entityId?: string | null;
1645
- }
1646
- interface LoyaltyPoints {
1647
- /**
1648
- * Loyalty transaction ID.
1649
- * @readonly
1650
- */
1651
- transactionId?: string;
1652
- /**
1653
- * The number of loyalty points awarded.
1654
- * @readonly
1655
- */
1656
- amount?: number;
1657
- }
1658
- interface ReferredFriendSignupEventNonNullableFields {
1659
- referredFriendId: string;
1660
- }
1661
- interface V1SuccessfulReferralEventNonNullableFields {
1662
- referredFriendId: string;
1663
- referringCustomerId: string;
1664
- }
1665
- interface V1TriggerNonNullableFields {
1666
- appId: string;
1667
- activityType: string;
1668
- }
1669
- interface V1ActionEventNonNullableFields {
1670
- referredFriendId: string;
1671
- referringCustomerId: string;
1672
- trigger?: V1TriggerNonNullableFields;
1673
- }
1674
- interface RewardEventNonNullableFields {
1675
- rewardedReferringCustomerId: string;
1676
- rewardedReferredFriendId: string;
1677
- referralRewardId: string;
1678
- rewardType: Reward;
1679
- }
1680
- interface ReferralEventNonNullableFields {
1681
- referredFriendSignupEvent?: ReferredFriendSignupEventNonNullableFields;
1682
- successfulReferralEvent?: V1SuccessfulReferralEventNonNullableFields;
1683
- actionEvent?: V1ActionEventNonNullableFields;
1684
- rewardEvent?: RewardEventNonNullableFields;
1685
- }
1686
- interface GetReferralEventResponseNonNullableFields {
1687
- referralEvent?: ReferralEventNonNullableFields;
1688
- }
1689
- interface QueryReferralEventResponseNonNullableFields {
1690
- referralEvents: ReferralEventNonNullableFields[];
1691
- }
1692
- interface GetReferralStatisticsResponseNonNullableFields {
1693
- totalSignUpsCompleted: number;
1694
- totalActionsCompleted: number;
1695
- totalAmountGenerated: string;
1696
- }
1697
- interface ReferringCustomerTotalNonNullableFields {
1698
- referringCustomerId: string;
1699
- contactId: string;
1700
- totalSuccessfulReferrals: number;
1701
- totalAmountGenerated: string;
1702
- totalFriendsWithActions: number;
1703
- }
1704
- interface QueryReferringCustomerTotalsResponseNonNullableFields {
1705
- referringCustomerTotals: ReferringCustomerTotalNonNullableFields[];
1706
- }
1707
- interface FixedAmountDiscountNonNullableFields$2 {
1708
- amount: number;
1709
- }
1710
- interface PercentageDiscountNonNullableFields$2 {
1711
- percentage: number;
1712
- }
1713
- interface GroupNonNullableFields$2 {
1714
- name: string;
1715
- }
1716
- interface CouponScopeNonNullableFields$2 {
1717
- namespace: string;
1718
- group?: GroupNonNullableFields$2;
1719
- }
1720
- interface CouponNonNullableFields$2 {
1721
- fixedAmountOptions?: FixedAmountDiscountNonNullableFields$2;
1722
- percentageOptions?: PercentageDiscountNonNullableFields$2;
1723
- minimumSubtotal: number;
1724
- scope?: CouponScopeNonNullableFields$2;
1725
- name: string;
1726
- discountType: DiscountType$2;
1727
- }
1728
- interface V1CouponNonNullableFields$2 {
1729
- _id: string;
1730
- code: string;
1731
- status: Status$4;
1732
- couponSpecification?: CouponNonNullableFields$2;
1733
- }
1734
- interface LoyaltyPointsNonNullableFields {
1735
- transactionId: string;
1736
- amount: number;
1737
- }
1738
- interface ReferredFriendActionNonNullableFields {
1739
- coupon?: V1CouponNonNullableFields$2;
1740
- loyaltyPoints?: LoyaltyPointsNonNullableFields;
1741
- referredFriendId: string;
1742
- contactId: string;
1743
- trigger?: V1TriggerNonNullableFields;
1744
- rewardType: Reward;
1745
- totalActions: number;
1746
- totalAmountSpent: string;
1747
- }
1748
- interface QueryReferredFriendActionsResponseNonNullableFields {
1749
- referredFriendActions: ReferredFriendActionNonNullableFields[];
1750
- }
1751
-
1752
- type __PublicMethodMetaInfo$3<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
1753
- getUrl: (context: any) => string;
1754
- httpMethod: K;
1755
- path: string;
1756
- pathParams: M;
1757
- __requestType: T;
1758
- __originalRequestType: S;
1759
- __responseType: Q;
1760
- __originalResponseType: R;
1761
- };
1762
- declare function getReferralEvent(): __PublicMethodMetaInfo$3<'GET', {
1763
- referralEventId: string;
1764
- }, GetReferralEventRequest, GetReferralEventRequest$1, GetReferralEventResponse & GetReferralEventResponseNonNullableFields, GetReferralEventResponse$1 & GetReferralEventResponseNonNullableFields$1>;
1765
- declare function queryReferralEvent(): __PublicMethodMetaInfo$3<'POST', {}, QueryReferralEventRequest, QueryReferralEventRequest$1, QueryReferralEventResponse & QueryReferralEventResponseNonNullableFields, QueryReferralEventResponse$1 & QueryReferralEventResponseNonNullableFields$1>;
1766
- declare function getReferralStatistics(): __PublicMethodMetaInfo$3<'GET', {}, GetReferralStatisticsRequest, GetReferralStatisticsRequest$1, GetReferralStatisticsResponse & GetReferralStatisticsResponseNonNullableFields, GetReferralStatisticsResponse$1 & GetReferralStatisticsResponseNonNullableFields$1>;
1767
- declare function queryReferringCustomerTotals(): __PublicMethodMetaInfo$3<'POST', {}, QueryReferringCustomerTotalsRequest, QueryReferringCustomerTotalsRequest$1, QueryReferringCustomerTotalsResponse & QueryReferringCustomerTotalsResponseNonNullableFields, QueryReferringCustomerTotalsResponse$1 & QueryReferringCustomerTotalsResponseNonNullableFields$1>;
1768
- declare function queryReferredFriendActions(): __PublicMethodMetaInfo$3<'POST', {}, QueryReferredFriendActionsRequest, QueryReferredFriendActionsRequest$1, QueryReferredFriendActionsResponse & QueryReferredFriendActionsResponseNonNullableFields, QueryReferredFriendActionsResponse$1 & QueryReferredFriendActionsResponseNonNullableFields$1>;
1769
-
1770
- declare const meta$3_getReferralEvent: typeof getReferralEvent;
1771
- declare const meta$3_getReferralStatistics: typeof getReferralStatistics;
1772
- declare const meta$3_queryReferralEvent: typeof queryReferralEvent;
1773
- declare const meta$3_queryReferredFriendActions: typeof queryReferredFriendActions;
1774
- declare const meta$3_queryReferringCustomerTotals: typeof queryReferringCustomerTotals;
1775
- declare namespace meta$3 {
1776
- export { type __PublicMethodMetaInfo$3 as __PublicMethodMetaInfo, meta$3_getReferralEvent as getReferralEvent, meta$3_getReferralStatistics as getReferralStatistics, meta$3_queryReferralEvent as queryReferralEvent, meta$3_queryReferredFriendActions as queryReferredFriendActions, meta$3_queryReferringCustomerTotals as queryReferringCustomerTotals };
1777
- }
1778
-
1779
- interface ReferralReward$1 extends ReferralRewardReceiverOneOf$1, ReferralRewardRewardTypeOptionsOneOf$1 {
1780
- /**
1781
- * ID of the referring customer who received the reward.
1782
- * @readonly
1783
- */
1784
- rewardedReferringCustomerId?: string;
1785
- /**
1786
- * ID of the referred friend who received the reward.
1787
- * @readonly
1788
- */
1789
- rewardedReferredFriendId?: string;
1790
- /** Details of a coupon reward. Present when `reward_type` is `COUPON`. */
1791
- coupon?: V1Coupon$1;
1792
- /** Details of a loyalty points reward. Present when `reward_type` is `LOYALTY_POINTS`. */
1793
- loyaltyPoints?: V1LoyaltyPoints$1;
1794
- /**
1795
- * Referral reward ID.
1796
- * @readonly
1797
- */
1798
- id?: string | null;
1799
- /**
1800
- * Revision number, which increments by 1 each time the referral reward is updated.
1801
- * To prevent conflicting changes, the current revision must be passed when updating the referral reward.
1802
- */
1803
- revision?: string | null;
1804
- /**
1805
- * Date and time the referral reward was created.
1806
- * @readonly
1807
- */
1808
- createdDate?: Date | null;
1809
- /**
1810
- * Date and time the referral reward was last updated.
1811
- * @readonly
1812
- */
1813
- updatedDate?: Date | null;
1814
- /** Type of reward given. */
1815
- rewardType?: RewardTypeType$1;
1816
- }
1817
- /** @oneof */
1818
- interface ReferralRewardReceiverOneOf$1 {
1819
- /**
1820
- * ID of the referring customer who received the reward.
1821
- * @readonly
1822
- */
1823
- rewardedReferringCustomerId?: string;
1824
- /**
1825
- * ID of the referred friend who received the reward.
1826
- * @readonly
1827
- */
1828
- rewardedReferredFriendId?: string;
1829
- }
1830
- /** @oneof */
1831
- interface ReferralRewardRewardTypeOptionsOneOf$1 {
1832
- /** Details of a coupon reward. Present when `reward_type` is `COUPON`. */
1833
- coupon?: V1Coupon$1;
1834
- /** Details of a loyalty points reward. Present when `reward_type` is `LOYALTY_POINTS`. */
1835
- loyaltyPoints?: V1LoyaltyPoints$1;
1836
- }
1837
- declare enum RewardTypeType$1 {
1838
- /** Unknown reward type. */
1839
- UNKNOWN = "UNKNOWN",
1840
- /** Loyalty coupon is given. */
1841
- COUPON = "COUPON",
1842
- /** Loyalty points are awarded. */
1843
- LOYALTY_POINTS = "LOYALTY_POINTS",
1844
- /** No reward is given. */
1845
- NOTHING = "NOTHING"
1846
- }
1847
- interface V1Coupon$1 {
1848
- /**
1849
- * Coupon ID. Example: `8934b045-7052-4a90-be2b-832c70afc9da`.
1850
- * @readonly
1851
- */
1852
- id?: string;
1853
- /**
1854
- * The code that customers can use to apply the coupon. Example: `6RFD2A3HSPXW`.
1855
- * @readonly
1856
- */
1857
- code?: string;
1858
- /**
1859
- * Current status of the coupon.
1860
- * @readonly
1861
- */
1862
- status?: Status$3;
1863
- /**
1864
- * Detailed specifications of the coupon.
1865
- * @readonly
1866
- */
1867
- couponSpecification?: Coupon$1;
1868
- }
1869
- declare enum Status$3 {
1870
- /** Coupon status is unknown or not specified. */
1871
- UNKNOWN = "UNKNOWN",
1872
- /** Coupon is active and can be applied to purchases. */
1873
- ACTIVE = "ACTIVE",
1874
- /** Coupon was applied and can't be used again. */
1875
- APPLIED = "APPLIED",
1876
- /** Coupon was deleted and is no longer valid. */
1877
- DELETED = "DELETED"
1878
- }
1879
- interface Coupon$1 extends CouponDiscountTypeOptionsOneOf$1, CouponScopeOrMinSubtotalOneOf$1 {
1880
- /** Options for fixed amount discount. */
1881
- fixedAmountOptions?: FixedAmountDiscount$1;
1882
- /** Options for percentage discounts. */
1883
- percentageOptions?: PercentageDiscount$1;
1884
- /** Limit the coupon to carts with a subtotal above this number. */
1885
- minimumSubtotal?: number;
1886
- /** 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). */
1887
- scope?: CouponScope$1;
1888
- /** Coupon name. */
1889
- name?: string;
1890
- /** Coupon discount type. */
1891
- discountType?: DiscountType$1;
1892
- /**
1893
- * Whether the coupon is limited to one item.
1894
- * If `true` and a customer pays for multiple items, the discount applies to only the lowest priced item.
1895
- * Coupons with a bookings `scope.namespace` are always limited to one item.
1896
- */
1897
- limitedToOneItem?: boolean | null;
1898
- /** Whether the coupon applies to subscription products. */
1899
- appliesToSubscriptions?: boolean | null;
1900
- /**
1901
- * Specifies the amount of discounted cycles for a subscription item.
1902
- *
1903
- * - Can only be set when `scope.namespace = pricingPlans`.
1904
- * - If `discountedCycleCount` is empty, the coupon applies to all available cycles.
1905
- * - `discountedCycleCount` is ignored if `appliesToSubscriptions = true`.
1906
- *
1907
- * Max: `999`
1908
- */
1909
- discountedCycleCount?: number | null;
1910
- }
1911
- /** @oneof */
1912
- interface CouponDiscountTypeOptionsOneOf$1 {
1913
- /** Options for fixed amount discount. */
1914
- fixedAmountOptions?: FixedAmountDiscount$1;
1915
- /** Options for percentage discounts. */
1916
- percentageOptions?: PercentageDiscount$1;
1917
- }
1918
- /** @oneof */
1919
- interface CouponScopeOrMinSubtotalOneOf$1 {
1920
- /** Limit the coupon to carts with a subtotal above this number. */
1921
- minimumSubtotal?: number;
1922
- /** 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). */
1923
- scope?: CouponScope$1;
1924
- }
1925
- declare enum DiscountType$1 {
1926
- /** Unknown discount type. */
1927
- UNKNOWN = "UNKNOWN",
1928
- /** Discount as a fixed amount. */
1929
- FIXED_AMOUNT = "FIXED_AMOUNT",
1930
- /** Discount as a percentage. */
1931
- PERCENTAGE = "PERCENTAGE",
1932
- /** Free shipping. If `true`, the coupon applies to all items in all `namespaces`. */
1933
- FREE_SHIPPING = "FREE_SHIPPING"
1934
- }
1935
- interface FixedAmountDiscount$1 {
1936
- /** Amount of the discount as a fixed value. */
1937
- amount?: number;
1938
- }
1939
- interface PercentageDiscount$1 {
1940
- /** Percentage of discount. */
1941
- percentage?: number;
1942
- }
1943
- interface CouponScope$1 {
1944
- /** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */
1945
- namespace?: string;
1946
- /** Coupon scope's applied group, for example, Event or ticket in Wix Events. */
1947
- group?: Group$1;
1948
- }
1949
- interface Group$1 {
1950
- /** Name of the group. */
1951
- name?: string;
1952
- /** Entity ID of the group. */
1953
- entityId?: string | null;
1954
- }
1955
- interface V1LoyaltyPoints$1 {
1956
- /**
1957
- * Loyalty transaction ID.
1958
- * @readonly
1959
- */
1960
- transactionId?: string;
1961
- /**
1962
- * The number of loyalty points awarded.
1963
- * @readonly
1964
- */
1965
- amount?: number;
1966
- }
1967
- interface GetReferralRewardRequest$1 {
1968
- /** Referral reward ID. */
1969
- id: string;
1970
- }
1971
- interface GetReferralRewardResponse$1 {
1972
- /** Retrieved referral reward. */
1973
- referralReward?: ReferralReward$1;
1974
- }
1975
- interface QueryReferralRewardsRequest$1 {
1976
- /** Query to filter referral rewards. */
1977
- query: CursorQuery$5;
1978
- /** Contact ID to filter rewards by. Use `"me"` for current identity's rewards. */
1979
- contactId?: string | null;
1980
- }
1981
- interface CursorQuery$5 extends CursorQueryPagingMethodOneOf$5 {
1982
- /**
1983
- * Cursor paging options.
1984
- *
1985
- * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
1986
- */
1987
- cursorPaging?: CursorPaging$5;
1988
- /**
1989
- * Filter object.
1990
- *
1991
- * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
1992
- */
1993
- filter?: Record<string, any> | null;
1994
- /**
1995
- * Sort object.
1996
- *
1997
- * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
1998
- */
1999
- sort?: Sorting$5[];
2000
- }
2001
- /** @oneof */
2002
- interface CursorQueryPagingMethodOneOf$5 {
2003
- /**
2004
- * Cursor paging options.
2005
- *
2006
- * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
2007
- */
2008
- cursorPaging?: CursorPaging$5;
2009
- }
2010
- interface Sorting$5 {
2011
- /** Name of the field to sort by. */
2012
- fieldName?: string;
2013
- /** Sort order. */
2014
- order?: SortOrder$5;
2015
- }
2016
- declare enum SortOrder$5 {
2017
- ASC = "ASC",
2018
- DESC = "DESC"
2019
- }
2020
- interface CursorPaging$5 {
2021
- /** Maximum number of items to return in the results. */
2022
- limit?: number | null;
2023
- /**
2024
- * Pointer to the next or previous page in the list of results.
2025
- *
2026
- * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
2027
- * Not relevant for the first request.
2028
- */
2029
- cursor?: string | null;
2030
- }
2031
- interface QueryReferralRewardsResponse$1 {
2032
- /** Retrieved referral rewards. */
2033
- referralRewards?: ReferralReward$1[];
2034
- /** Metadata for paging. */
2035
- metadata?: CursorPagingMetadata$5;
2036
- }
2037
- interface CursorPagingMetadata$5 {
2038
- /** Number of items returned in current page. */
2039
- count?: number | null;
2040
- /** Cursor strings that point to the next page, previous page, or both. */
2041
- cursors?: Cursors$5;
2042
- /**
2043
- * Whether there are more pages to retrieve following the current page.
2044
- *
2045
- * + `true`: Another page of results can be retrieved.
2046
- * + `false`: This is the last page.
2047
- */
2048
- hasNext?: boolean | null;
2049
- }
2050
- interface Cursors$5 {
2051
- /** Cursor string pointing to the next page in the list of results. */
2052
- next?: string | null;
2053
- /** Cursor pointing to the previous page in the list of results. */
2054
- prev?: string | null;
2055
- }
2056
- interface FixedAmountDiscountNonNullableFields$1 {
2057
- amount: number;
2058
- }
2059
- interface PercentageDiscountNonNullableFields$1 {
2060
- percentage: number;
2061
- }
2062
- interface GroupNonNullableFields$1 {
2063
- name: string;
2064
- }
2065
- interface CouponScopeNonNullableFields$1 {
2066
- namespace: string;
2067
- group?: GroupNonNullableFields$1;
2068
- }
2069
- interface CouponNonNullableFields$1 {
2070
- fixedAmountOptions?: FixedAmountDiscountNonNullableFields$1;
2071
- percentageOptions?: PercentageDiscountNonNullableFields$1;
2072
- minimumSubtotal: number;
2073
- scope?: CouponScopeNonNullableFields$1;
2074
- name: string;
2075
- discountType: DiscountType$1;
2076
- }
2077
- interface V1CouponNonNullableFields$1 {
2078
- id: string;
2079
- code: string;
2080
- status: Status$3;
2081
- couponSpecification?: CouponNonNullableFields$1;
2082
- }
2083
- interface V1LoyaltyPointsNonNullableFields$1 {
2084
- transactionId: string;
2085
- amount: number;
2086
- }
2087
- interface ReferralRewardNonNullableFields$1 {
2088
- rewardedReferringCustomerId: string;
2089
- rewardedReferredFriendId: string;
2090
- coupon?: V1CouponNonNullableFields$1;
2091
- loyaltyPoints?: V1LoyaltyPointsNonNullableFields$1;
2092
- rewardType: RewardTypeType$1;
2093
- }
2094
- interface GetReferralRewardResponseNonNullableFields$1 {
2095
- referralReward?: ReferralRewardNonNullableFields$1;
2096
- }
2097
- interface QueryReferralRewardsResponseNonNullableFields$1 {
2098
- referralRewards: ReferralRewardNonNullableFields$1[];
2099
- }
2100
-
2101
- interface ReferralReward extends ReferralRewardReceiverOneOf, ReferralRewardRewardTypeOptionsOneOf {
2102
- /**
2103
- * ID of the referring customer who received the reward.
2104
- * @readonly
2105
- */
2106
- rewardedReferringCustomerId?: string;
2107
- /**
2108
- * ID of the referred friend who received the reward.
2109
- * @readonly
2110
- */
2111
- rewardedReferredFriendId?: string;
2112
- /** Details of a coupon reward. Present when `reward_type` is `COUPON`. */
2113
- coupon?: V1Coupon;
2114
- /** Details of a loyalty points reward. Present when `reward_type` is `LOYALTY_POINTS`. */
2115
- loyaltyPoints?: V1LoyaltyPoints;
2116
- /**
2117
- * Referral reward ID.
2118
- * @readonly
2119
- */
2120
- _id?: string | null;
2121
- /**
2122
- * Revision number, which increments by 1 each time the referral reward is updated.
2123
- * To prevent conflicting changes, the current revision must be passed when updating the referral reward.
2124
- */
2125
- revision?: string | null;
2126
- /**
2127
- * Date and time the referral reward was created.
2128
- * @readonly
2129
- */
2130
- _createdDate?: Date | null;
2131
- /**
2132
- * Date and time the referral reward was last updated.
2133
- * @readonly
2134
- */
2135
- _updatedDate?: Date | null;
2136
- /** Type of reward given. */
2137
- rewardType?: RewardTypeType;
2138
- }
2139
- /** @oneof */
2140
- interface ReferralRewardReceiverOneOf {
2141
- /**
2142
- * ID of the referring customer who received the reward.
2143
- * @readonly
2144
- */
2145
- rewardedReferringCustomerId?: string;
2146
- /**
2147
- * ID of the referred friend who received the reward.
2148
- * @readonly
2149
- */
2150
- rewardedReferredFriendId?: string;
2151
- }
2152
- /** @oneof */
2153
- interface ReferralRewardRewardTypeOptionsOneOf {
2154
- /** Details of a coupon reward. Present when `reward_type` is `COUPON`. */
2155
- coupon?: V1Coupon;
2156
- /** Details of a loyalty points reward. Present when `reward_type` is `LOYALTY_POINTS`. */
2157
- loyaltyPoints?: V1LoyaltyPoints;
2158
- }
2159
- declare enum RewardTypeType {
2160
- /** Unknown reward type. */
2161
- UNKNOWN = "UNKNOWN",
2162
- /** Loyalty coupon is given. */
2163
- COUPON = "COUPON",
2164
- /** Loyalty points are awarded. */
2165
- LOYALTY_POINTS = "LOYALTY_POINTS",
2166
- /** No reward is given. */
2167
- NOTHING = "NOTHING"
2168
- }
2169
- interface V1Coupon {
2170
- /**
2171
- * Coupon ID. Example: `8934b045-7052-4a90-be2b-832c70afc9da`.
2172
- * @readonly
2173
- */
2174
- _id?: string;
2175
- /**
2176
- * The code that customers can use to apply the coupon. Example: `6RFD2A3HSPXW`.
2177
- * @readonly
2178
- */
2179
- code?: string;
2180
- /**
2181
- * Current status of the coupon.
2182
- * @readonly
2183
- */
2184
- status?: Status$2;
2185
- /**
2186
- * Detailed specifications of the coupon.
2187
- * @readonly
2188
- */
2189
- couponSpecification?: Coupon;
2190
- }
2191
- declare enum Status$2 {
2192
- /** Coupon status is unknown or not specified. */
2193
- UNKNOWN = "UNKNOWN",
2194
- /** Coupon is active and can be applied to purchases. */
2195
- ACTIVE = "ACTIVE",
2196
- /** Coupon was applied and can't be used again. */
2197
- APPLIED = "APPLIED",
2198
- /** Coupon was deleted and is no longer valid. */
2199
- DELETED = "DELETED"
2200
- }
2201
- interface Coupon extends CouponDiscountTypeOptionsOneOf, CouponScopeOrMinSubtotalOneOf {
2202
- /** Options for fixed amount discount. */
2203
- fixedAmountOptions?: FixedAmountDiscount;
2204
- /** Options for percentage discounts. */
2205
- percentageOptions?: PercentageDiscount;
2206
- /** Limit the coupon to carts with a subtotal above this number. */
2207
- minimumSubtotal?: number;
2208
- /** 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). */
2209
- scope?: CouponScope;
2210
- /** Coupon name. */
2211
- name?: string;
2212
- /** Coupon discount type. */
2213
- discountType?: DiscountType;
2214
- /**
2215
- * Whether the coupon is limited to one item.
2216
- * If `true` and a customer pays for multiple items, the discount applies to only the lowest priced item.
2217
- * Coupons with a bookings `scope.namespace` are always limited to one item.
2218
- */
2219
- limitedToOneItem?: boolean | null;
2220
- /** Whether the coupon applies to subscription products. */
2221
- appliesToSubscriptions?: boolean | null;
2222
- /**
2223
- * Specifies the amount of discounted cycles for a subscription item.
2224
- *
2225
- * - Can only be set when `scope.namespace = pricingPlans`.
2226
- * - If `discountedCycleCount` is empty, the coupon applies to all available cycles.
2227
- * - `discountedCycleCount` is ignored if `appliesToSubscriptions = true`.
2228
- *
2229
- * Max: `999`
2230
- */
2231
- discountedCycleCount?: number | null;
2232
- }
2233
- /** @oneof */
2234
- interface CouponDiscountTypeOptionsOneOf {
2235
- /** Options for fixed amount discount. */
2236
- fixedAmountOptions?: FixedAmountDiscount;
2237
- /** Options for percentage discounts. */
2238
- percentageOptions?: PercentageDiscount;
2239
- }
2240
- /** @oneof */
2241
- interface CouponScopeOrMinSubtotalOneOf {
2242
- /** Limit the coupon to carts with a subtotal above this number. */
2243
- minimumSubtotal?: number;
2244
- /** 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). */
2245
- scope?: CouponScope;
2246
- }
2247
- declare enum DiscountType {
2248
- /** Unknown discount type. */
2249
- UNKNOWN = "UNKNOWN",
2250
- /** Discount as a fixed amount. */
2251
- FIXED_AMOUNT = "FIXED_AMOUNT",
2252
- /** Discount as a percentage. */
2253
- PERCENTAGE = "PERCENTAGE",
2254
- /** Free shipping. If `true`, the coupon applies to all items in all `namespaces`. */
2255
- FREE_SHIPPING = "FREE_SHIPPING"
2256
- }
2257
- interface FixedAmountDiscount {
2258
- /** Amount of the discount as a fixed value. */
2259
- amount?: number;
2260
- }
2261
- interface PercentageDiscount {
2262
- /** Percentage of discount. */
2263
- percentage?: number;
2264
- }
2265
- interface CouponScope {
2266
- /** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */
2267
- namespace?: string;
2268
- /** Coupon scope's applied group, for example, Event or ticket in Wix Events. */
2269
- group?: Group;
2270
- }
2271
- interface Group {
2272
- /** Name of the group. */
2273
- name?: string;
2274
- /** Entity ID of the group. */
2275
- entityId?: string | null;
2276
- }
2277
- interface V1LoyaltyPoints {
2278
- /**
2279
- * Loyalty transaction ID.
2280
- * @readonly
2281
- */
2282
- transactionId?: string;
2283
- /**
2284
- * The number of loyalty points awarded.
2285
- * @readonly
2286
- */
2287
- amount?: number;
2288
- }
2289
- interface GetReferralRewardRequest {
2290
- /** Referral reward ID. */
2291
- _id: string;
2292
- }
2293
- interface GetReferralRewardResponse {
2294
- /** Retrieved referral reward. */
2295
- referralReward?: ReferralReward;
2296
- }
2297
- interface QueryReferralRewardsRequest {
2298
- /** Query to filter referral rewards. */
2299
- query: CursorQuery$4;
2300
- /** Contact ID to filter rewards by. Use `"me"` for current identity's rewards. */
2301
- contactId?: string | null;
2302
- }
2303
- interface CursorQuery$4 extends CursorQueryPagingMethodOneOf$4 {
2304
- /**
2305
- * Cursor paging options.
2306
- *
2307
- * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
2308
- */
2309
- cursorPaging?: CursorPaging$4;
2310
- /**
2311
- * Filter object.
2312
- *
2313
- * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
2314
- */
2315
- filter?: Record<string, any> | null;
2316
- /**
2317
- * Sort object.
2318
- *
2319
- * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
2320
- */
2321
- sort?: Sorting$4[];
2322
- }
2323
- /** @oneof */
2324
- interface CursorQueryPagingMethodOneOf$4 {
2325
- /**
2326
- * Cursor paging options.
2327
- *
2328
- * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
2329
- */
2330
- cursorPaging?: CursorPaging$4;
2331
- }
2332
- interface Sorting$4 {
2333
- /** Name of the field to sort by. */
2334
- fieldName?: string;
2335
- /** Sort order. */
2336
- order?: SortOrder$4;
2337
- }
2338
- declare enum SortOrder$4 {
2339
- ASC = "ASC",
2340
- DESC = "DESC"
2341
- }
2342
- interface CursorPaging$4 {
2343
- /** Maximum number of items to return in the results. */
2344
- limit?: number | null;
2345
- /**
2346
- * Pointer to the next or previous page in the list of results.
2347
- *
2348
- * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
2349
- * Not relevant for the first request.
2350
- */
2351
- cursor?: string | null;
2352
- }
2353
- interface QueryReferralRewardsResponse {
2354
- /** Retrieved referral rewards. */
2355
- referralRewards?: ReferralReward[];
2356
- /** Metadata for paging. */
2357
- metadata?: CursorPagingMetadata$4;
2358
- }
2359
- interface CursorPagingMetadata$4 {
2360
- /** Number of items returned in current page. */
2361
- count?: number | null;
2362
- /** Cursor strings that point to the next page, previous page, or both. */
2363
- cursors?: Cursors$4;
2364
- /**
2365
- * Whether there are more pages to retrieve following the current page.
2366
- *
2367
- * + `true`: Another page of results can be retrieved.
2368
- * + `false`: This is the last page.
2369
- */
2370
- hasNext?: boolean | null;
2371
- }
2372
- interface Cursors$4 {
2373
- /** Cursor string pointing to the next page in the list of results. */
2374
- next?: string | null;
2375
- /** Cursor pointing to the previous page in the list of results. */
2376
- prev?: string | null;
2377
- }
2378
- interface FixedAmountDiscountNonNullableFields {
2379
- amount: number;
2380
- }
2381
- interface PercentageDiscountNonNullableFields {
2382
- percentage: number;
2383
- }
2384
- interface GroupNonNullableFields {
2385
- name: string;
2386
- }
2387
- interface CouponScopeNonNullableFields {
2388
- namespace: string;
2389
- group?: GroupNonNullableFields;
2390
- }
2391
- interface CouponNonNullableFields {
2392
- fixedAmountOptions?: FixedAmountDiscountNonNullableFields;
2393
- percentageOptions?: PercentageDiscountNonNullableFields;
2394
- minimumSubtotal: number;
2395
- scope?: CouponScopeNonNullableFields;
2396
- name: string;
2397
- discountType: DiscountType;
2398
- }
2399
- interface V1CouponNonNullableFields {
2400
- _id: string;
2401
- code: string;
2402
- status: Status$2;
2403
- couponSpecification?: CouponNonNullableFields;
2404
- }
2405
- interface V1LoyaltyPointsNonNullableFields {
2406
- transactionId: string;
2407
- amount: number;
2408
- }
2409
- interface ReferralRewardNonNullableFields {
2410
- rewardedReferringCustomerId: string;
2411
- rewardedReferredFriendId: string;
2412
- coupon?: V1CouponNonNullableFields;
2413
- loyaltyPoints?: V1LoyaltyPointsNonNullableFields;
2414
- rewardType: RewardTypeType;
2415
- }
2416
- interface GetReferralRewardResponseNonNullableFields {
2417
- referralReward?: ReferralRewardNonNullableFields;
2418
- }
2419
- interface QueryReferralRewardsResponseNonNullableFields {
2420
- referralRewards: ReferralRewardNonNullableFields[];
2421
- }
2422
-
2423
- type __PublicMethodMetaInfo$2<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
2424
- getUrl: (context: any) => string;
2425
- httpMethod: K;
2426
- path: string;
2427
- pathParams: M;
2428
- __requestType: T;
2429
- __originalRequestType: S;
2430
- __responseType: Q;
2431
- __originalResponseType: R;
2432
- };
2433
- declare function getReferralReward(): __PublicMethodMetaInfo$2<'GET', {
2434
- id: string;
2435
- }, GetReferralRewardRequest, GetReferralRewardRequest$1, GetReferralRewardResponse & GetReferralRewardResponseNonNullableFields, GetReferralRewardResponse$1 & GetReferralRewardResponseNonNullableFields$1>;
2436
- declare function queryReferralRewards(): __PublicMethodMetaInfo$2<'POST', {}, QueryReferralRewardsRequest, QueryReferralRewardsRequest$1, QueryReferralRewardsResponse & QueryReferralRewardsResponseNonNullableFields, QueryReferralRewardsResponse$1 & QueryReferralRewardsResponseNonNullableFields$1>;
2437
-
2438
- declare const meta$2_getReferralReward: typeof getReferralReward;
2439
- declare const meta$2_queryReferralRewards: typeof queryReferralRewards;
2440
- declare namespace meta$2 {
2441
- export { type __PublicMethodMetaInfo$2 as __PublicMethodMetaInfo, meta$2_getReferralReward as getReferralReward, meta$2_queryReferralRewards as queryReferralRewards };
2442
- }
2443
-
2444
- interface ReferredFriend$1 {
2445
- /**
2446
- * ID of the referred friend.
2447
- * @readonly
2448
- */
2449
- id?: string;
2450
- /**
2451
- * Contact ID of the referred friend.
2452
- * @readonly
2453
- */
2454
- contactId?: string;
2455
- /**
2456
- * ID of the customer who referred this friend.
2457
- * @readonly
2458
- */
2459
- referringCustomerId?: string;
2460
- /** Status of the referred friend. */
2461
- status?: Status$1;
2462
- /**
2463
- * Revision number, which increments by 1 each time the referred friend is updated.
2464
- * To prevent conflicting changes, the current revision must be passed when updating the referred friend.
2465
- * @readonly
2466
- */
2467
- revision?: string | null;
2468
- /**
2469
- * Date and time the referred friend was created.
2470
- * @readonly
2471
- */
2472
- createdDate?: Date | null;
2473
- /**
2474
- * Date and time the referred friend was last updated.
2475
- * @readonly
2476
- */
2477
- updatedDate?: Date | null;
2478
- }
2479
- declare enum Status$1 {
2480
- /** Unknown status. */
2481
- UNKNOWN = "UNKNOWN",
2482
- /** Initial status when the referred friend joins the site as a member. */
2483
- SIGN_UP_COMPLETED = "SIGN_UP_COMPLETED",
2484
- /** Status after the referred friend completes a specific action, such as making a purchase. */
2485
- ACTIONS_COMPLETED = "ACTIONS_COMPLETED"
2486
- }
2487
- interface CreateReferredFriendRequest$1 {
2488
- /** Referral code for the referred friend. */
2489
- referralCode?: string | null;
2490
- }
2491
- interface CreateReferredFriendResponse$1 {
2492
- /** Created referred friend. */
2493
- referredFriend?: ReferredFriend$1;
2494
- }
2495
- interface GetReferredFriendRequest$1 {
2496
- /** ID of the referred friend to retrieve. */
2497
- referredFriendId: string;
2498
- }
2499
- interface GetReferredFriendResponse$1 {
2500
- /** Retrieved referred friend. */
2501
- referredFriend?: ReferredFriend$1;
2502
- }
2503
- interface GetReferredFriendByContactIdRequest$1 {
2504
- /** Contact ID or "me" to get the current identity's contact. */
2505
- contactId: string;
2506
- }
2507
- interface GetReferredFriendByContactIdResponse$1 {
2508
- /** Retrieved referred friend. */
2509
- referredFriend?: ReferredFriend$1;
2510
- }
2511
- interface UpdateReferredFriendRequest$1 {
2512
- /** Referred friend to be updated. May be partial. */
2513
- referredFriend: ReferredFriend$1;
2514
- }
2515
- interface UpdateReferredFriendResponse$1 {
2516
- /** Updated referred friend. */
2517
- referredFriend?: ReferredFriend$1;
2518
- }
2519
- interface DeleteReferredFriendRequest$1 {
2520
- /** ID of the referred friend to delete. */
2521
- referredFriendId: string;
2522
- /**
2523
- * Revision number, which increments by 1 each time the referred friend is updated.
2524
- * To prevent conflicting changes, the current revision must be passed when deleting the referred friend.
2525
- */
2526
- revision?: string;
2527
- }
2528
- interface DeleteReferredFriendResponse$1 {
2529
- }
2530
- interface QueryReferredFriendRequest$1 {
2531
- /** Query options. */
2532
- query: CursorQuery$3;
2533
- }
2534
- interface CursorQuery$3 extends CursorQueryPagingMethodOneOf$3 {
2535
- /**
2536
- * Cursor paging options.
2537
- *
2538
- * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
2539
- */
2540
- cursorPaging?: CursorPaging$3;
2541
- /**
2542
- * Filter object.
2543
- *
2544
- * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
2545
- */
2546
- filter?: Record<string, any> | null;
2547
- /**
2548
- * Sort object.
2549
- *
2550
- * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
2551
- */
2552
- sort?: Sorting$3[];
2553
- }
2554
- /** @oneof */
2555
- interface CursorQueryPagingMethodOneOf$3 {
2556
- /**
2557
- * Cursor paging options.
2558
- *
2559
- * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
2560
- */
2561
- cursorPaging?: CursorPaging$3;
2562
- }
2563
- interface Sorting$3 {
2564
- /** Name of the field to sort by. */
2565
- fieldName?: string;
2566
- /** Sort order. */
2567
- order?: SortOrder$3;
2568
- }
2569
- declare enum SortOrder$3 {
2570
- ASC = "ASC",
2571
- DESC = "DESC"
2572
- }
2573
- interface CursorPaging$3 {
2574
- /** Maximum number of items to return in the results. */
2575
- limit?: number | null;
2576
- /**
2577
- * Pointer to the next or previous page in the list of results.
2578
- *
2579
- * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
2580
- * Not relevant for the first request.
2581
- */
2582
- cursor?: string | null;
2583
- }
2584
- interface QueryReferredFriendResponse$1 {
2585
- /** Retrieved referred friends. */
2586
- referredFriends?: ReferredFriend$1[];
2587
- /** Cursor paging metadata. */
2588
- metadata?: CursorPagingMetadata$3;
2589
- }
2590
- interface CursorPagingMetadata$3 {
2591
- /** Number of items returned in current page. */
2592
- count?: number | null;
2593
- /** Cursor strings that point to the next page, previous page, or both. */
2594
- cursors?: Cursors$3;
2595
- /**
2596
- * Whether there are more pages to retrieve following the current page.
2597
- *
2598
- * + `true`: Another page of results can be retrieved.
2599
- * + `false`: This is the last page.
2600
- */
2601
- hasNext?: boolean | null;
2602
- }
2603
- interface Cursors$3 {
2604
- /** Cursor string pointing to the next page in the list of results. */
2605
- next?: string | null;
2606
- /** Cursor pointing to the previous page in the list of results. */
2607
- prev?: string | null;
2608
- }
2609
- interface ReferredFriendNonNullableFields$1 {
2610
- id: string;
2611
- contactId: string;
2612
- referringCustomerId: string;
2613
- status: Status$1;
2614
- }
2615
- interface CreateReferredFriendResponseNonNullableFields$1 {
2616
- referredFriend?: ReferredFriendNonNullableFields$1;
2617
- }
2618
- interface GetReferredFriendResponseNonNullableFields$1 {
2619
- referredFriend?: ReferredFriendNonNullableFields$1;
2620
- }
2621
- interface GetReferredFriendByContactIdResponseNonNullableFields$1 {
2622
- referredFriend?: ReferredFriendNonNullableFields$1;
2623
- }
2624
- interface UpdateReferredFriendResponseNonNullableFields$1 {
2625
- referredFriend?: ReferredFriendNonNullableFields$1;
2626
- }
2627
- interface QueryReferredFriendResponseNonNullableFields$1 {
2628
- referredFriends: ReferredFriendNonNullableFields$1[];
2629
- }
2630
-
2631
- interface ReferredFriend {
2632
- /**
2633
- * ID of the referred friend.
2634
- * @readonly
2635
- */
2636
- _id?: string;
2637
- /**
2638
- * Contact ID of the referred friend.
2639
- * @readonly
2640
- */
2641
- contactId?: string;
2642
- /**
2643
- * ID of the customer who referred this friend.
2644
- * @readonly
2645
- */
2646
- referringCustomerId?: string;
2647
- /** Status of the referred friend. */
2648
- status?: Status;
2649
- /**
2650
- * Revision number, which increments by 1 each time the referred friend is updated.
2651
- * To prevent conflicting changes, the current revision must be passed when updating the referred friend.
2652
- * @readonly
2653
- */
2654
- revision?: string | null;
2655
- /**
2656
- * Date and time the referred friend was created.
2657
- * @readonly
2658
- */
2659
- _createdDate?: Date | null;
2660
- /**
2661
- * Date and time the referred friend was last updated.
2662
- * @readonly
2663
- */
2664
- _updatedDate?: Date | null;
2665
- }
2666
- declare enum Status {
2667
- /** Unknown status. */
2668
- UNKNOWN = "UNKNOWN",
2669
- /** Initial status when the referred friend joins the site as a member. */
2670
- SIGN_UP_COMPLETED = "SIGN_UP_COMPLETED",
2671
- /** Status after the referred friend completes a specific action, such as making a purchase. */
2672
- ACTIONS_COMPLETED = "ACTIONS_COMPLETED"
2673
- }
2674
- interface CreateReferredFriendRequest {
2675
- /** Referral code for the referred friend. */
2676
- referralCode?: string | null;
2677
- }
2678
- interface CreateReferredFriendResponse {
2679
- /** Created referred friend. */
2680
- referredFriend?: ReferredFriend;
2681
- }
2682
- interface GetReferredFriendRequest {
2683
- /** ID of the referred friend to retrieve. */
2684
- referredFriendId: string;
2685
- }
2686
- interface GetReferredFriendResponse {
2687
- /** Retrieved referred friend. */
2688
- referredFriend?: ReferredFriend;
2689
- }
2690
- interface GetReferredFriendByContactIdRequest {
2691
- /** Contact ID or "me" to get the current identity's contact. */
2692
- contactId: string;
2693
- }
2694
- interface GetReferredFriendByContactIdResponse {
2695
- /** Retrieved referred friend. */
2696
- referredFriend?: ReferredFriend;
2697
- }
2698
- interface UpdateReferredFriendRequest {
2699
- /** Referred friend to be updated. May be partial. */
2700
- referredFriend: ReferredFriend;
2701
- }
2702
- interface UpdateReferredFriendResponse {
2703
- /** Updated referred friend. */
2704
- referredFriend?: ReferredFriend;
2705
- }
2706
- interface DeleteReferredFriendRequest {
2707
- /** ID of the referred friend to delete. */
2708
- referredFriendId: string;
2709
- /**
2710
- * Revision number, which increments by 1 each time the referred friend is updated.
2711
- * To prevent conflicting changes, the current revision must be passed when deleting the referred friend.
2712
- */
2713
- revision?: string;
2714
- }
2715
- interface DeleteReferredFriendResponse {
2716
- }
2717
- interface QueryReferredFriendRequest {
2718
- /** Query options. */
2719
- query: CursorQuery$2;
2720
- }
2721
- interface CursorQuery$2 extends CursorQueryPagingMethodOneOf$2 {
2722
- /**
2723
- * Cursor paging options.
2724
- *
2725
- * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
2726
- */
2727
- cursorPaging?: CursorPaging$2;
2728
- /**
2729
- * Filter object.
2730
- *
2731
- * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
2732
- */
2733
- filter?: Record<string, any> | null;
2734
- /**
2735
- * Sort object.
2736
- *
2737
- * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
2738
- */
2739
- sort?: Sorting$2[];
2740
- }
2741
- /** @oneof */
2742
- interface CursorQueryPagingMethodOneOf$2 {
2743
- /**
2744
- * Cursor paging options.
2745
- *
2746
- * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
2747
- */
2748
- cursorPaging?: CursorPaging$2;
2749
- }
2750
- interface Sorting$2 {
2751
- /** Name of the field to sort by. */
2752
- fieldName?: string;
2753
- /** Sort order. */
2754
- order?: SortOrder$2;
2755
- }
2756
- declare enum SortOrder$2 {
2757
- ASC = "ASC",
2758
- DESC = "DESC"
2759
- }
2760
- interface CursorPaging$2 {
2761
- /** Maximum number of items to return in the results. */
2762
- limit?: number | null;
2763
- /**
2764
- * Pointer to the next or previous page in the list of results.
2765
- *
2766
- * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
2767
- * Not relevant for the first request.
2768
- */
2769
- cursor?: string | null;
2770
- }
2771
- interface QueryReferredFriendResponse {
2772
- /** Retrieved referred friends. */
2773
- referredFriends?: ReferredFriend[];
2774
- /** Cursor paging metadata. */
2775
- metadata?: CursorPagingMetadata$2;
2776
- }
2777
- interface CursorPagingMetadata$2 {
2778
- /** Number of items returned in current page. */
2779
- count?: number | null;
2780
- /** Cursor strings that point to the next page, previous page, or both. */
2781
- cursors?: Cursors$2;
2782
- /**
2783
- * Whether there are more pages to retrieve following the current page.
2784
- *
2785
- * + `true`: Another page of results can be retrieved.
2786
- * + `false`: This is the last page.
2787
- */
2788
- hasNext?: boolean | null;
2789
- }
2790
- interface Cursors$2 {
2791
- /** Cursor string pointing to the next page in the list of results. */
2792
- next?: string | null;
2793
- /** Cursor pointing to the previous page in the list of results. */
2794
- prev?: string | null;
2795
- }
2796
- interface ReferredFriendNonNullableFields {
2797
- _id: string;
2798
- contactId: string;
2799
- referringCustomerId: string;
2800
- status: Status;
2801
- }
2802
- interface CreateReferredFriendResponseNonNullableFields {
2803
- referredFriend?: ReferredFriendNonNullableFields;
2804
- }
2805
- interface GetReferredFriendResponseNonNullableFields {
2806
- referredFriend?: ReferredFriendNonNullableFields;
2807
- }
2808
- interface GetReferredFriendByContactIdResponseNonNullableFields {
2809
- referredFriend?: ReferredFriendNonNullableFields;
2810
- }
2811
- interface UpdateReferredFriendResponseNonNullableFields {
2812
- referredFriend?: ReferredFriendNonNullableFields;
2813
- }
2814
- interface QueryReferredFriendResponseNonNullableFields {
2815
- referredFriends: ReferredFriendNonNullableFields[];
2816
- }
2817
-
2818
- type __PublicMethodMetaInfo$1<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
2819
- getUrl: (context: any) => string;
2820
- httpMethod: K;
2821
- path: string;
2822
- pathParams: M;
2823
- __requestType: T;
2824
- __originalRequestType: S;
2825
- __responseType: Q;
2826
- __originalResponseType: R;
2827
- };
2828
- declare function createReferredFriend(): __PublicMethodMetaInfo$1<'POST', {}, CreateReferredFriendRequest, CreateReferredFriendRequest$1, CreateReferredFriendResponse & CreateReferredFriendResponseNonNullableFields, CreateReferredFriendResponse$1 & CreateReferredFriendResponseNonNullableFields$1>;
2829
- declare function getReferredFriend(): __PublicMethodMetaInfo$1<'GET', {
2830
- referredFriendId: string;
2831
- }, GetReferredFriendRequest, GetReferredFriendRequest$1, GetReferredFriendResponse & GetReferredFriendResponseNonNullableFields, GetReferredFriendResponse$1 & GetReferredFriendResponseNonNullableFields$1>;
2832
- declare function getReferredFriendByContactId(): __PublicMethodMetaInfo$1<'GET', {
2833
- contactId: string;
2834
- }, GetReferredFriendByContactIdRequest, GetReferredFriendByContactIdRequest$1, GetReferredFriendByContactIdResponse & GetReferredFriendByContactIdResponseNonNullableFields, GetReferredFriendByContactIdResponse$1 & GetReferredFriendByContactIdResponseNonNullableFields$1>;
2835
- declare function updateReferredFriend(): __PublicMethodMetaInfo$1<'PATCH', {
2836
- referredFriendId: string;
2837
- }, UpdateReferredFriendRequest, UpdateReferredFriendRequest$1, UpdateReferredFriendResponse & UpdateReferredFriendResponseNonNullableFields, UpdateReferredFriendResponse$1 & UpdateReferredFriendResponseNonNullableFields$1>;
2838
- declare function deleteReferredFriend(): __PublicMethodMetaInfo$1<'DELETE', {
2839
- referredFriendId: string;
2840
- }, DeleteReferredFriendRequest, DeleteReferredFriendRequest$1, DeleteReferredFriendResponse, DeleteReferredFriendResponse$1>;
2841
- declare function queryReferredFriend(): __PublicMethodMetaInfo$1<'POST', {}, QueryReferredFriendRequest, QueryReferredFriendRequest$1, QueryReferredFriendResponse & QueryReferredFriendResponseNonNullableFields, QueryReferredFriendResponse$1 & QueryReferredFriendResponseNonNullableFields$1>;
2842
-
2843
- declare const meta$1_createReferredFriend: typeof createReferredFriend;
2844
- declare const meta$1_deleteReferredFriend: typeof deleteReferredFriend;
2845
- declare const meta$1_getReferredFriend: typeof getReferredFriend;
2846
- declare const meta$1_getReferredFriendByContactId: typeof getReferredFriendByContactId;
2847
- declare const meta$1_queryReferredFriend: typeof queryReferredFriend;
2848
- declare const meta$1_updateReferredFriend: typeof updateReferredFriend;
2849
- declare namespace meta$1 {
2850
- export { type __PublicMethodMetaInfo$1 as __PublicMethodMetaInfo, meta$1_createReferredFriend as createReferredFriend, meta$1_deleteReferredFriend as deleteReferredFriend, meta$1_getReferredFriend as getReferredFriend, meta$1_getReferredFriendByContactId as getReferredFriendByContactId, meta$1_queryReferredFriend as queryReferredFriend, meta$1_updateReferredFriend as updateReferredFriend };
2851
- }
2852
-
2853
- interface ReferringCustomer$1 {
2854
- /**
2855
- * ID of the referring customer.
2856
- * @readonly
2857
- */
2858
- id?: string;
2859
- /**
2860
- * Contact ID associated with the referring customer.
2861
- * @readonly
2862
- */
2863
- contactId?: string;
2864
- /**
2865
- * Unique code for the referral. For example, `GxpxwAoMqxH8`.
2866
- * @readonly
2867
- */
2868
- referralCode?: string;
2869
- /**
2870
- * Revision number, which increments by 1 each time the referring customer is updated.
2871
- * To prevent conflicting changes, the current revision must be passed when updating the referring customer.
2872
- */
2873
- revision?: string | null;
2874
- /**
2875
- * Date and time the referring customer was created.
2876
- * @readonly
2877
- */
2878
- createdDate?: Date | null;
2879
- /**
2880
- * Date and time the referring customer was last updated.
2881
- * @readonly
2882
- */
2883
- updatedDate?: Date | null;
2884
- }
2885
- interface GenerateReferringCustomerForContactRequest$1 {
2886
- /** Contact ID or `"me"` to generate the current identity's referring customer. */
2887
- contactId: string;
2888
- }
2889
- interface GenerateReferringCustomerForContactResponse$1 {
2890
- /** Created referring customer. */
2891
- referringCustomer?: ReferringCustomer$1;
2892
- }
2893
- interface GetReferringCustomerRequest$1 {
2894
- /** ID of the referring customer to retrieve. */
2895
- referringCustomerId: string;
2896
- }
2897
- interface GetReferringCustomerResponse$1 {
2898
- /** Retrieved referring customer. */
2899
- referringCustomer?: ReferringCustomer$1;
2900
- }
2901
- interface GetReferringCustomerByReferralCodeRequest$1 {
2902
- /** Referral code of the referring customer to retrieve. */
2903
- referralCode: string;
2904
- }
2905
- interface GetReferringCustomerByReferralCodeResponse$1 {
2906
- /** Retrieved referring customer. */
2907
- referringCustomer?: ReferringCustomer$1;
2908
- }
2909
- interface QueryReferringCustomersRequest$1 {
2910
- /** Query options. */
2911
- query: CursorQuery$1;
2912
- }
2913
- interface CursorQuery$1 extends CursorQueryPagingMethodOneOf$1 {
2914
- /**
2915
- * Cursor paging options.
2916
- *
2917
- * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
2918
- */
2919
- cursorPaging?: CursorPaging$1;
2920
- /**
2921
- * Filter object.
2922
- *
2923
- * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
2924
- */
2925
- filter?: Record<string, any> | null;
2926
- /**
2927
- * Sort object.
2928
- *
2929
- * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
2930
- */
2931
- sort?: Sorting$1[];
2932
- }
2933
- /** @oneof */
2934
- interface CursorQueryPagingMethodOneOf$1 {
2935
- /**
2936
- * Cursor paging options.
2937
- *
2938
- * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
2939
- */
2940
- cursorPaging?: CursorPaging$1;
2941
- }
2942
- interface Sorting$1 {
2943
- /** Name of the field to sort by. */
2944
- fieldName?: string;
2945
- /** Sort order. */
2946
- order?: SortOrder$1;
2947
- }
2948
- declare enum SortOrder$1 {
2949
- ASC = "ASC",
2950
- DESC = "DESC"
2951
- }
2952
- interface CursorPaging$1 {
2953
- /** Maximum number of items to return in the results. */
2954
- limit?: number | null;
2955
- /**
2956
- * Pointer to the next or previous page in the list of results.
2957
- *
2958
- * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
2959
- * Not relevant for the first request.
2960
- */
2961
- cursor?: string | null;
2962
- }
2963
- interface QueryReferringCustomersResponse$1 {
2964
- /** List of retrieved referring customers. */
2965
- referringCustomers?: ReferringCustomer$1[];
2966
- /** Paging metadata. */
2967
- metadata?: CursorPagingMetadata$1;
2968
- }
2969
- interface CursorPagingMetadata$1 {
2970
- /** Number of items returned in current page. */
2971
- count?: number | null;
2972
- /** Cursor strings that point to the next page, previous page, or both. */
2973
- cursors?: Cursors$1;
2974
- /**
2975
- * Whether there are more pages to retrieve following the current page.
2976
- *
2977
- * + `true`: Another page of results can be retrieved.
2978
- * + `false`: This is the last page.
2979
- */
2980
- hasNext?: boolean | null;
2981
- }
2982
- interface Cursors$1 {
2983
- /** Cursor string pointing to the next page in the list of results. */
2984
- next?: string | null;
2985
- /** Cursor pointing to the previous page in the list of results. */
2986
- prev?: string | null;
2987
- }
2988
- interface DeleteReferringCustomerRequest$1 {
2989
- /** ID of the referring customer to delete. */
2990
- referringCustomerId: string;
2991
- /** Revision number of the referring customer. */
2992
- revision?: string;
2993
- }
2994
- interface DeleteReferringCustomerResponse$1 {
2995
- }
2996
- interface ReferringCustomerNonNullableFields$1 {
2997
- id: string;
2998
- contactId: string;
2999
- referralCode: string;
3000
- }
3001
- interface GenerateReferringCustomerForContactResponseNonNullableFields$1 {
3002
- referringCustomer?: ReferringCustomerNonNullableFields$1;
3003
- }
3004
- interface GetReferringCustomerResponseNonNullableFields$1 {
3005
- referringCustomer?: ReferringCustomerNonNullableFields$1;
3006
- }
3007
- interface GetReferringCustomerByReferralCodeResponseNonNullableFields$1 {
3008
- referringCustomer?: ReferringCustomerNonNullableFields$1;
3009
- }
3010
- interface QueryReferringCustomersResponseNonNullableFields$1 {
3011
- referringCustomers: ReferringCustomerNonNullableFields$1[];
3012
- }
3013
-
3014
- interface ReferringCustomer {
3015
- /**
3016
- * ID of the referring customer.
3017
- * @readonly
3018
- */
3019
- _id?: string;
3020
- /**
3021
- * Contact ID associated with the referring customer.
3022
- * @readonly
3023
- */
3024
- contactId?: string;
3025
- /**
3026
- * Unique code for the referral. For example, `GxpxwAoMqxH8`.
3027
- * @readonly
3028
- */
3029
- referralCode?: string;
3030
- /**
3031
- * Revision number, which increments by 1 each time the referring customer is updated.
3032
- * To prevent conflicting changes, the current revision must be passed when updating the referring customer.
3033
- */
3034
- revision?: string | null;
3035
- /**
3036
- * Date and time the referring customer was created.
3037
- * @readonly
3038
- */
3039
- _createdDate?: Date | null;
3040
- /**
3041
- * Date and time the referring customer was last updated.
3042
- * @readonly
3043
- */
3044
- _updatedDate?: Date | null;
3045
- }
3046
- interface GenerateReferringCustomerForContactRequest {
3047
- /** Contact ID or `"me"` to generate the current identity's referring customer. */
3048
- contactId: string;
3049
- }
3050
- interface GenerateReferringCustomerForContactResponse {
3051
- /** Created referring customer. */
3052
- referringCustomer?: ReferringCustomer;
3053
- }
3054
- interface GetReferringCustomerRequest {
3055
- /** ID of the referring customer to retrieve. */
3056
- referringCustomerId: string;
3057
- }
3058
- interface GetReferringCustomerResponse {
3059
- /** Retrieved referring customer. */
3060
- referringCustomer?: ReferringCustomer;
3061
- }
3062
- interface GetReferringCustomerByReferralCodeRequest {
3063
- /** Referral code of the referring customer to retrieve. */
3064
- referralCode: string;
3065
- }
3066
- interface GetReferringCustomerByReferralCodeResponse {
3067
- /** Retrieved referring customer. */
3068
- referringCustomer?: ReferringCustomer;
3069
- }
3070
- interface QueryReferringCustomersRequest {
3071
- /** Query options. */
3072
- query: CursorQuery;
3073
- }
3074
- interface CursorQuery extends CursorQueryPagingMethodOneOf {
3075
- /**
3076
- * Cursor paging options.
3077
- *
3078
- * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
3079
- */
3080
- cursorPaging?: CursorPaging;
3081
- /**
3082
- * Filter object.
3083
- *
3084
- * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
3085
- */
3086
- filter?: Record<string, any> | null;
3087
- /**
3088
- * Sort object.
3089
- *
3090
- * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
3091
- */
3092
- sort?: Sorting[];
3093
- }
3094
- /** @oneof */
3095
- interface CursorQueryPagingMethodOneOf {
3096
- /**
3097
- * Cursor paging options.
3098
- *
3099
- * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
3100
- */
3101
- cursorPaging?: CursorPaging;
3102
- }
3103
- interface Sorting {
3104
- /** Name of the field to sort by. */
3105
- fieldName?: string;
3106
- /** Sort order. */
3107
- order?: SortOrder;
3108
- }
3109
- declare enum SortOrder {
3110
- ASC = "ASC",
3111
- DESC = "DESC"
3112
- }
3113
- interface CursorPaging {
3114
- /** Maximum number of items to return in the results. */
3115
- limit?: number | null;
3116
- /**
3117
- * Pointer to the next or previous page in the list of results.
3118
- *
3119
- * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
3120
- * Not relevant for the first request.
3121
- */
3122
- cursor?: string | null;
3123
- }
3124
- interface QueryReferringCustomersResponse {
3125
- /** List of retrieved referring customers. */
3126
- referringCustomers?: ReferringCustomer[];
3127
- /** Paging metadata. */
3128
- metadata?: CursorPagingMetadata;
3129
- }
3130
- interface CursorPagingMetadata {
3131
- /** Number of items returned in current page. */
3132
- count?: number | null;
3133
- /** Cursor strings that point to the next page, previous page, or both. */
3134
- cursors?: Cursors;
3135
- /**
3136
- * Whether there are more pages to retrieve following the current page.
3137
- *
3138
- * + `true`: Another page of results can be retrieved.
3139
- * + `false`: This is the last page.
3140
- */
3141
- hasNext?: boolean | null;
3142
- }
3143
- interface Cursors {
3144
- /** Cursor string pointing to the next page in the list of results. */
3145
- next?: string | null;
3146
- /** Cursor pointing to the previous page in the list of results. */
3147
- prev?: string | null;
3148
- }
3149
- interface DeleteReferringCustomerRequest {
3150
- /** ID of the referring customer to delete. */
3151
- referringCustomerId: string;
3152
- /** Revision number of the referring customer. */
3153
- revision?: string;
3154
- }
3155
- interface DeleteReferringCustomerResponse {
3156
- }
3157
- interface ReferringCustomerNonNullableFields {
3158
- _id: string;
3159
- contactId: string;
3160
- referralCode: string;
3161
- }
3162
- interface GenerateReferringCustomerForContactResponseNonNullableFields {
3163
- referringCustomer?: ReferringCustomerNonNullableFields;
3164
- }
3165
- interface GetReferringCustomerResponseNonNullableFields {
3166
- referringCustomer?: ReferringCustomerNonNullableFields;
3167
- }
3168
- interface GetReferringCustomerByReferralCodeResponseNonNullableFields {
3169
- referringCustomer?: ReferringCustomerNonNullableFields;
3170
- }
3171
- interface QueryReferringCustomersResponseNonNullableFields {
3172
- referringCustomers: ReferringCustomerNonNullableFields[];
3173
- }
3174
-
3175
- type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
3176
- getUrl: (context: any) => string;
3177
- httpMethod: K;
3178
- path: string;
3179
- pathParams: M;
3180
- __requestType: T;
3181
- __originalRequestType: S;
3182
- __responseType: Q;
3183
- __originalResponseType: R;
3184
- };
3185
- declare function generateReferringCustomerForContact(): __PublicMethodMetaInfo<'POST', {}, GenerateReferringCustomerForContactRequest, GenerateReferringCustomerForContactRequest$1, GenerateReferringCustomerForContactResponse & GenerateReferringCustomerForContactResponseNonNullableFields, GenerateReferringCustomerForContactResponse$1 & GenerateReferringCustomerForContactResponseNonNullableFields$1>;
3186
- declare function getReferringCustomer(): __PublicMethodMetaInfo<'GET', {
3187
- referringCustomerId: string;
3188
- }, GetReferringCustomerRequest, GetReferringCustomerRequest$1, GetReferringCustomerResponse & GetReferringCustomerResponseNonNullableFields, GetReferringCustomerResponse$1 & GetReferringCustomerResponseNonNullableFields$1>;
3189
- declare function getReferringCustomerByReferralCode(): __PublicMethodMetaInfo<'GET', {
3190
- referralCode: string;
3191
- }, GetReferringCustomerByReferralCodeRequest, GetReferringCustomerByReferralCodeRequest$1, GetReferringCustomerByReferralCodeResponse & GetReferringCustomerByReferralCodeResponseNonNullableFields, GetReferringCustomerByReferralCodeResponse$1 & GetReferringCustomerByReferralCodeResponseNonNullableFields$1>;
3192
- declare function queryReferringCustomers(): __PublicMethodMetaInfo<'POST', {}, QueryReferringCustomersRequest, QueryReferringCustomersRequest$1, QueryReferringCustomersResponse & QueryReferringCustomersResponseNonNullableFields, QueryReferringCustomersResponse$1 & QueryReferringCustomersResponseNonNullableFields$1>;
3193
- declare function deleteReferringCustomer(): __PublicMethodMetaInfo<'DELETE', {
3194
- referringCustomerId: string;
3195
- }, DeleteReferringCustomerRequest, DeleteReferringCustomerRequest$1, DeleteReferringCustomerResponse, DeleteReferringCustomerResponse$1>;
3196
-
3197
- type meta___PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = __PublicMethodMetaInfo<K, M, T, S, Q, R>;
3198
- declare const meta_deleteReferringCustomer: typeof deleteReferringCustomer;
3199
- declare const meta_generateReferringCustomerForContact: typeof generateReferringCustomerForContact;
3200
- declare const meta_getReferringCustomer: typeof getReferringCustomer;
3201
- declare const meta_getReferringCustomerByReferralCode: typeof getReferringCustomerByReferralCode;
3202
- declare const meta_queryReferringCustomers: typeof queryReferringCustomers;
3203
- declare namespace meta {
3204
- export { type meta___PublicMethodMetaInfo as __PublicMethodMetaInfo, meta_deleteReferringCustomer as deleteReferringCustomer, meta_generateReferringCustomerForContact as generateReferringCustomerForContact, meta_getReferringCustomer as getReferringCustomer, meta_getReferringCustomerByReferralCode as getReferringCustomerByReferralCode, meta_queryReferringCustomers as queryReferringCustomers };
3205
- }
3206
-
3207
- export { meta as customers, meta$1 as friends, meta$4 as programs, meta$2 as rewards, meta$3 as tracker };