@wix/referral 1.0.4 → 1.0.6

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