@wix/referral 1.0.1 → 1.0.3

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$3;
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$3;
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$3 extends CouponDiscountTypeOptionsOneOf$3, CouponScopeOrMinSubtotalOneOf$3 {
75
+ /** Options for fixed amount discount type. */
76
+ fixedAmountOptions?: FixedAmountDiscount$3;
77
+ /** Options for percentage discount type. */
78
+ percentageOptions?: PercentageDiscount$3;
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$3;
83
+ /** Coupon name. */
84
+ name?: string;
85
+ /** Coupon discount type. */
86
+ discountType?: DiscountType$3;
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$3 {
96
+ /** Options for fixed amount discount type. */
97
+ fixedAmountOptions?: FixedAmountDiscount$3;
98
+ /** Options for percentage discount type. */
99
+ percentageOptions?: PercentageDiscount$3;
116
100
  }
117
- interface QueryReferralEventRequest$1 {
118
- /** Query to filter ReferralEvents. */
119
- query: CursorQuery$1;
101
+ /** @oneof */
102
+ interface CouponScopeOrMinSubtotalOneOf$3 {
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$3;
120
107
  }
121
- interface CursorQuery$1 extends CursorQueryPagingMethodOneOf$1 {
108
+ declare enum DiscountType$3 {
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$3 {
119
+ /** Fixed amount to discount. */
120
+ amount?: number;
121
+ }
122
+ interface PercentageDiscount$3 {
123
+ /** Percentage to discount. */
124
+ percentage?: number;
125
+ }
126
+ interface CouponScope$3 {
127
+ /** Namespace of the coupon scope. */
128
+ namespace?: string;
129
+ /** Group of the coupon scope. */
130
+ group?: Group$3;
131
+ }
132
+ interface Group$3 {
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$7;
185
+ }
186
+ interface CursorQuery$7 extends CursorQueryPagingMethodOneOf$7 {
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$1;
188
+ cursorPaging?: CursorPaging$7;
124
189
  /**
125
190
  * Filter object in the following format:
126
191
  * `"filter" : {
@@ -134,24 +199,24 @@ interface CursorQuery$1 extends CursorQueryPagingMethodOneOf$1 {
134
199
  * Sort object in the following format:
135
200
  * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
136
201
  */
137
- sort?: Sorting$1[];
202
+ sort?: Sorting$7[];
138
203
  }
139
204
  /** @oneof */
140
- interface CursorQueryPagingMethodOneOf$1 {
205
+ interface CursorQueryPagingMethodOneOf$7 {
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$1;
207
+ cursorPaging?: CursorPaging$7;
143
208
  }
144
- interface Sorting$1 {
209
+ interface Sorting$7 {
145
210
  /** Name of the field to sort by. */
146
211
  fieldName?: string;
147
212
  /** Sort order. */
148
- order?: SortOrder$1;
213
+ order?: SortOrder$7;
149
214
  }
150
- declare enum SortOrder$1 {
215
+ declare enum SortOrder$7 {
151
216
  ASC = "ASC",
152
217
  DESC = "DESC"
153
218
  }
154
- interface CursorPaging$1 {
219
+ interface CursorPaging$7 {
155
220
  /** Maximum number of items to return in the results. */
156
221
  limit?: number | null;
157
222
  /**
@@ -162,17 +227,17 @@ interface CursorPaging$1 {
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$1;
234
+ pagingMetadata?: CursorPagingMetadata$7;
170
235
  }
171
- interface CursorPagingMetadata$1 {
236
+ interface CursorPagingMetadata$7 {
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$1;
240
+ cursors?: Cursors$7;
176
241
  /**
177
242
  * Whether there are more pages to retrieve following the current page.
178
243
  *
@@ -181,175 +246,454 @@ interface CursorPagingMetadata$1 {
181
246
  */
182
247
  hasNext?: boolean | null;
183
248
  }
184
- interface Cursors$1 {
249
+ interface Cursors$7 {
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$1;
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$1;
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$1;
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$1;
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$3;
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$3;
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$3;
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$3;
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$3;
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$3;
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$3;
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$3;
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$3;
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$3;
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;
309
615
  /**
310
- * Coupon ID.
616
+ * Referral program status.
311
617
  * @readonly
312
618
  */
313
- id?: string;
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;
314
622
  /**
315
- * Coupon code.
623
+ * Program's creation date and time.
316
624
  * @readonly
317
625
  */
318
- code?: string;
626
+ _createdDate?: Date;
319
627
  /**
320
- * Coupon status.
628
+ * Program's last update date and time
321
629
  * @readonly
322
630
  */
323
- status?: Status$1;
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[];
324
638
  /**
325
- * Coupon specification.
639
+ * Set to true if user has required plan to activate program.
326
640
  * @readonly
641
+ * @deprecated Set to true if user has required plan to activate program.
642
+ * @replacedBy GetReferralProgramPremiumFeatures
643
+ * @removalDate 2024-09-01
327
644
  */
328
- couponSpecification?: Coupon$1;
645
+ isPremium?: boolean;
646
+ /** Emails configuration. */
647
+ emails?: Emails;
329
648
  }
330
- declare enum Status$1 {
331
- /** Unknown coupon status. */
649
+ declare enum ProgramStatus {
650
+ /** unknown status. */
332
651
  UNKNOWN = "UNKNOWN",
333
- /** Coupon is active and can be applied. */
652
+ /** initial program status (program was created but was not enabled yet). */
653
+ DRAFT = "DRAFT",
654
+ /** program is active. */
334
655
  ACTIVE = "ACTIVE",
335
- /** Coupon was already applied and can not be used anymore. */
336
- APPLIED = "APPLIED",
337
- /** Coupon was deleted. */
338
- DELETED = "DELETED"
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"
339
658
  }
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;
659
+ interface Reward$2 extends RewardOptionsOneOf {
660
+ /** Options for coupon reward type. */
661
+ couponOptions?: Coupon$2;
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$2;
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$2 extends CouponDiscountTypeOptionsOneOf$2, CouponScopeOrMinSubtotalOneOf$2 {
685
+ /** Options for fixed amount discount type. */
686
+ fixedAmountOptions?: FixedAmountDiscount$2;
687
+ /** Options for percentage discount type. */
688
+ percentageOptions?: PercentageDiscount$2;
345
689
  /** Limit the coupon to carts with a subtotal above this number. */
346
690
  minimumSubtotal?: number;
347
691
  /** Specifies the type of line items this coupon will apply to. */
348
- scope?: CouponScope$1;
349
- /** Coupon name */
692
+ scope?: CouponScope$2;
693
+ /** Coupon name. */
350
694
  name?: string;
351
- /** Coupon discount type */
352
- discountType?: DiscountType$1;
695
+ /** Coupon discount type. */
696
+ discountType?: DiscountType$2;
353
697
  /** Limit the coupon to only apply to one item in cart. */
354
698
  limitedToOneItem?: boolean | null;
355
699
  /** If true, coupon also applies to subscriptions. */
@@ -358,54 +702,967 @@ interface Coupon$1 extends CouponDiscountTypeOptionsOneOf$1, CouponScopeOrMinSub
358
702
  discountedCycleCount?: number | null;
359
703
  }
360
704
  /** @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;
705
+ interface CouponDiscountTypeOptionsOneOf$2 {
706
+ /** Options for fixed amount discount type. */
707
+ fixedAmountOptions?: FixedAmountDiscount$2;
708
+ /** Options for percentage discount type. */
709
+ percentageOptions?: PercentageDiscount$2;
366
710
  }
367
711
  /** @oneof */
368
- interface CouponScopeOrMinSubtotalOneOf$1 {
712
+ interface CouponScopeOrMinSubtotalOneOf$2 {
369
713
  /** Limit the coupon to carts with a subtotal above this number. */
370
714
  minimumSubtotal?: number;
371
715
  /** Specifies the type of line items this coupon will apply to. */
372
- scope?: CouponScope$1;
716
+ scope?: CouponScope$2;
373
717
  }
374
- declare enum DiscountType$1 {
718
+ declare enum DiscountType$2 {
719
+ /** Unknown discount type. */
375
720
  UNKNOWN = "UNKNOWN",
376
- /** Discount as a fixed amount */
721
+ /** Discount as a fixed amount. */
377
722
  FIXED_AMOUNT = "FIXED_AMOUNT",
378
- /** Discount as a percentage */
723
+ /** Discount as a percentage. */
379
724
  PERCENTAGE = "PERCENTAGE",
380
- /** Free shipping */
725
+ /** Free shipping. */
381
726
  FREE_SHIPPING = "FREE_SHIPPING"
382
727
  }
383
- interface FixedAmountDiscount$1 {
384
- /** Fixed amount to discount */
728
+ interface FixedAmountDiscount$2 {
729
+ /** Fixed amount to discount. */
385
730
  amount?: number;
386
731
  }
387
- interface PercentageDiscount$1 {
732
+ interface PercentageDiscount$2 {
733
+ /** Percentage to discount. */
388
734
  percentage?: number;
389
735
  }
390
- interface CouponScope$1 {
736
+ interface CouponScope$2 {
737
+ /** Namespace of the coupon scope. */
391
738
  namespace?: string;
392
- group?: Group$1;
739
+ /** Group of the coupon scope. */
740
+ group?: Group$2;
393
741
  }
394
- interface Group$1 {
742
+ interface Group$2 {
743
+ /** Name of the group. */
395
744
  name?: string;
745
+ /** Entity ID of the group. */
396
746
  entityId?: string | null;
397
747
  }
398
- interface LoyaltyPoints$1 {
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$6;
795
+ }
796
+ interface CursorQuery$6 extends CursorQueryPagingMethodOneOf$6 {
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$6;
399
799
  /**
400
- * Loyalty transaction ID.
401
- * @readonly
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`
402
806
  */
403
- transactionId?: string;
807
+ filter?: Record<string, any> | null;
404
808
  /**
405
- * Loyalty points amount given.
406
- * @readonly
809
+ * Sort object in the following format:
810
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
407
811
  */
408
- amount?: number;
812
+ sort?: Sorting$6[];
813
+ }
814
+ /** @oneof */
815
+ interface CursorQueryPagingMethodOneOf$6 {
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$6;
818
+ }
819
+ interface Sorting$6 {
820
+ /** Name of the field to sort by. */
821
+ fieldName?: string;
822
+ /** Sort order. */
823
+ order?: SortOrder$6;
824
+ }
825
+ declare enum SortOrder$6 {
826
+ ASC = "ASC",
827
+ DESC = "DESC"
828
+ }
829
+ interface CursorPaging$6 {
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$6;
845
+ }
846
+ interface CursorPagingMetadata$6 {
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$6;
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$6 {
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$2;
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$2;
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$2;
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$2;
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$2;
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$2;
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$2;
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$2;
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$2;
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$2;
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$3<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$3<'GET', {}, GetReferralProgramRequest, GetReferralProgramRequest$1, GetReferralProgramResponse & GetReferralProgramResponseNonNullableFields, GetReferralProgramResponse$1 & GetReferralProgramResponseNonNullableFields$1>;
1232
+ declare function queryReferralPrograms(): __PublicMethodMetaInfo$3<'POST', {}, QueryReferralProgramsRequest, QueryReferralProgramsRequest$1, QueryReferralProgramsResponse & QueryReferralProgramsResponseNonNullableFields, QueryReferralProgramsResponse$1 & QueryReferralProgramsResponseNonNullableFields$1>;
1233
+ declare function updateReferralProgram(): __PublicMethodMetaInfo$3<'PATCH', {}, UpdateReferralProgramRequest, UpdateReferralProgramRequest$1, UpdateReferralProgramResponse & UpdateReferralProgramResponseNonNullableFields, UpdateReferralProgramResponse$1 & UpdateReferralProgramResponseNonNullableFields$1>;
1234
+ declare function activateReferralProgram(): __PublicMethodMetaInfo$3<'PATCH', {}, ActivateReferralProgramRequest, ActivateReferralProgramRequest$1, ActivateReferralProgramResponse & ActivateReferralProgramResponseNonNullableFields, ActivateReferralProgramResponse$1 & ActivateReferralProgramResponseNonNullableFields$1>;
1235
+ declare function pauseReferralProgram(): __PublicMethodMetaInfo$3<'PATCH', {}, PauseReferralProgramRequest, PauseReferralProgramRequest$1, PauseReferralProgramResponse & PauseReferralProgramResponseNonNullableFields, PauseReferralProgramResponse$1 & PauseReferralProgramResponseNonNullableFields$1>;
1236
+ declare function getAiSocialMediaPostsSuggestions(): __PublicMethodMetaInfo$3<'GET', {}, GetAISocialMediaPostsSuggestionsRequest, GetAISocialMediaPostsSuggestionsRequest$1, GetAISocialMediaPostsSuggestionsResponse & GetAISocialMediaPostsSuggestionsResponseNonNullableFields, GetAISocialMediaPostsSuggestionsResponse$1 & GetAISocialMediaPostsSuggestionsResponseNonNullableFields$1>;
1237
+ declare function generateAiSocialMediaPostsSuggestions(): __PublicMethodMetaInfo$3<'POST', {}, GenerateAISocialMediaPostsSuggestionsRequest, GenerateAISocialMediaPostsSuggestionsRequest$1, GenerateAISocialMediaPostsSuggestionsResponse & GenerateAISocialMediaPostsSuggestionsResponseNonNullableFields, GenerateAISocialMediaPostsSuggestionsResponse$1 & GenerateAISocialMediaPostsSuggestionsResponseNonNullableFields$1>;
1238
+ declare function getReferralProgramPremiumFeatures(): __PublicMethodMetaInfo$3<'GET', {}, GetReferralProgramPremiumFeaturesRequest, GetReferralProgramPremiumFeaturesRequest$1, GetReferralProgramPremiumFeaturesResponse & GetReferralProgramPremiumFeaturesResponseNonNullableFields, GetReferralProgramPremiumFeaturesResponse$1 & GetReferralProgramPremiumFeaturesResponseNonNullableFields$1>;
1239
+
1240
+ declare const meta$3_activateReferralProgram: typeof activateReferralProgram;
1241
+ declare const meta$3_generateAiSocialMediaPostsSuggestions: typeof generateAiSocialMediaPostsSuggestions;
1242
+ declare const meta$3_getAiSocialMediaPostsSuggestions: typeof getAiSocialMediaPostsSuggestions;
1243
+ declare const meta$3_getReferralProgram: typeof getReferralProgram;
1244
+ declare const meta$3_getReferralProgramPremiumFeatures: typeof getReferralProgramPremiumFeatures;
1245
+ declare const meta$3_pauseReferralProgram: typeof pauseReferralProgram;
1246
+ declare const meta$3_queryReferralPrograms: typeof queryReferralPrograms;
1247
+ declare const meta$3_updateReferralProgram: typeof updateReferralProgram;
1248
+ declare namespace meta$3 {
1249
+ export { type __PublicMethodMetaInfo$3 as __PublicMethodMetaInfo, meta$3_activateReferralProgram as activateReferralProgram, meta$3_generateAiSocialMediaPostsSuggestions as generateAiSocialMediaPostsSuggestions, meta$3_getAiSocialMediaPostsSuggestions as getAiSocialMediaPostsSuggestions, meta$3_getReferralProgram as getReferralProgram, meta$3_getReferralProgramPremiumFeatures as getReferralProgramPremiumFeatures, meta$3_pauseReferralProgram as pauseReferralProgram, meta$3_queryReferralPrograms as queryReferralPrograms, meta$3_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$5;
1371
+ }
1372
+ interface CursorQuery$5 extends CursorQueryPagingMethodOneOf$5 {
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$5;
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$5[];
1389
+ }
1390
+ /** @oneof */
1391
+ interface CursorQueryPagingMethodOneOf$5 {
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$5;
1394
+ }
1395
+ interface Sorting$5 {
1396
+ /** Name of the field to sort by. */
1397
+ fieldName?: string;
1398
+ /** Sort order. */
1399
+ order?: SortOrder$5;
1400
+ }
1401
+ declare enum SortOrder$5 {
1402
+ ASC = "ASC",
1403
+ DESC = "DESC"
1404
+ }
1405
+ interface CursorPaging$5 {
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$5;
1421
+ }
1422
+ interface CursorPagingMetadata$5 {
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$5;
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$5 {
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$5;
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$5;
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$5;
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$5;
1511
+ }
1512
+ interface ReferredFriendAction$1 extends ReferredFriendActionRewardTypeOptionsOneOf$1 {
1513
+ /** Coupon reward type options. */
1514
+ coupon?: V1Coupon$1;
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$1;
1556
+ /** Loyalty points reward type options. */
1557
+ loyaltyPoints?: LoyaltyPoints$1;
1558
+ }
1559
+ interface V1Coupon$1 {
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$3;
1575
+ /**
1576
+ * Coupon specification.
1577
+ * @readonly
1578
+ */
1579
+ couponSpecification?: Coupon$1;
1580
+ }
1581
+ declare enum Status$3 {
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$1 extends CouponDiscountTypeOptionsOneOf$1, CouponScopeOrMinSubtotalOneOf$1 {
1592
+ /** Options for fixed amount discount type. */
1593
+ fixedAmountOptions?: FixedAmountDiscount$1;
1594
+ /** Options for percentage discount type. */
1595
+ percentageOptions?: PercentageDiscount$1;
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$1;
1600
+ /** Coupon name. */
1601
+ name?: string;
1602
+ /** Coupon discount type. */
1603
+ discountType?: DiscountType$1;
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$1 {
1613
+ /** Options for fixed amount discount type. */
1614
+ fixedAmountOptions?: FixedAmountDiscount$1;
1615
+ /** Options for percentage discount type. */
1616
+ percentageOptions?: PercentageDiscount$1;
1617
+ }
1618
+ /** @oneof */
1619
+ interface CouponScopeOrMinSubtotalOneOf$1 {
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$1;
1624
+ }
1625
+ declare enum DiscountType$1 {
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$1 {
1636
+ /** Fixed amount to discount. */
1637
+ amount?: number;
1638
+ }
1639
+ interface PercentageDiscount$1 {
1640
+ /** Percentage to discount. */
1641
+ percentage?: number;
1642
+ }
1643
+ interface CouponScope$1 {
1644
+ /** Namespace of the coupon scope. */
1645
+ namespace?: string;
1646
+ /** Group of the coupon scope. */
1647
+ group?: Group$1;
1648
+ }
1649
+ interface Group$1 {
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;
409
1666
  }
410
1667
  interface GetReferralEventResponseNonNullableFields$1 {
411
1668
  referralEvent?: {
@@ -428,11 +1685,530 @@ interface GetReferralEventResponseNonNullableFields$1 {
428
1685
  rewardedReferringCustomerId: string;
429
1686
  rewardedReferredFriendId: string;
430
1687
  referralRewardId: string;
431
- rewardType: Reward$1;
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$3;
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$1;
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$4;
1890
+ }
1891
+ interface CursorQuery$4 extends CursorQueryPagingMethodOneOf$4 {
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$4;
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$4[];
1908
+ }
1909
+ /** @oneof */
1910
+ interface CursorQueryPagingMethodOneOf$4 {
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$4;
1913
+ }
1914
+ interface Sorting$4 {
1915
+ /** Name of the field to sort by. */
1916
+ fieldName?: string;
1917
+ /** Sort order. */
1918
+ order?: SortOrder$4;
1919
+ }
1920
+ declare enum SortOrder$4 {
1921
+ ASC = "ASC",
1922
+ DESC = "DESC"
1923
+ }
1924
+ interface CursorPaging$4 {
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$4;
1940
+ }
1941
+ interface CursorPagingMetadata$4 {
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$4;
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$4 {
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$4;
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$4;
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$4;
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$4;
2030
+ }
2031
+ interface ReferredFriendAction extends ReferredFriendActionRewardTypeOptionsOneOf {
2032
+ /** Coupon reward type options. */
2033
+ coupon?: V1Coupon;
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;
2075
+ /** Loyalty points reward type options. */
2076
+ loyaltyPoints?: LoyaltyPoints;
2077
+ }
2078
+ interface V1Coupon {
2079
+ /**
2080
+ * Coupon ID.
2081
+ * @readonly
2082
+ */
2083
+ _id?: string;
2084
+ /**
2085
+ * Coupon code.
2086
+ * @readonly
2087
+ */
2088
+ code?: string;
2089
+ /**
2090
+ * Coupon status.
2091
+ * @readonly
2092
+ */
2093
+ status?: Status$2;
2094
+ /**
2095
+ * Coupon specification.
2096
+ * @readonly
2097
+ */
2098
+ couponSpecification?: Coupon;
2099
+ }
2100
+ declare enum Status$2 {
2101
+ /** Unknown coupon status. */
2102
+ UNKNOWN = "UNKNOWN",
2103
+ /** Coupon is active and can be applied. */
2104
+ ACTIVE = "ACTIVE",
2105
+ /** Coupon was already applied and can not be used anymore. */
2106
+ APPLIED = "APPLIED",
2107
+ /** Coupon was deleted. */
2108
+ DELETED = "DELETED"
2109
+ }
2110
+ interface Coupon extends CouponDiscountTypeOptionsOneOf, CouponScopeOrMinSubtotalOneOf {
2111
+ /** Options for fixed amount discount type. */
2112
+ fixedAmountOptions?: FixedAmountDiscount;
2113
+ /** Options for percentage discount type. */
2114
+ percentageOptions?: PercentageDiscount;
2115
+ /** Limit the coupon to carts with a subtotal above this number. */
2116
+ minimumSubtotal?: number;
2117
+ /** Specifies the type of line items this coupon will apply to. */
2118
+ scope?: CouponScope;
2119
+ /** Coupon name. */
2120
+ name?: string;
2121
+ /** Coupon discount type. */
2122
+ discountType?: DiscountType;
2123
+ /** Limit the coupon to only apply to one item in cart. */
2124
+ limitedToOneItem?: boolean | null;
2125
+ /** If true, coupon also applies to subscriptions. */
2126
+ appliesToSubscriptions?: boolean | null;
2127
+ /** Specifies the amount of discounted cycles for subscription item. See Stores Coupons documentation for more info. */
2128
+ discountedCycleCount?: number | null;
2129
+ }
2130
+ /** @oneof */
2131
+ interface CouponDiscountTypeOptionsOneOf {
2132
+ /** Options for fixed amount discount type. */
2133
+ fixedAmountOptions?: FixedAmountDiscount;
2134
+ /** Options for percentage discount type. */
2135
+ percentageOptions?: PercentageDiscount;
2136
+ }
2137
+ /** @oneof */
2138
+ interface CouponScopeOrMinSubtotalOneOf {
2139
+ /** Limit the coupon to carts with a subtotal above this number. */
2140
+ minimumSubtotal?: number;
2141
+ /** Specifies the type of line items this coupon will apply to. */
2142
+ scope?: CouponScope;
2143
+ }
2144
+ declare enum DiscountType {
2145
+ /** Unknown discount type. */
2146
+ UNKNOWN = "UNKNOWN",
2147
+ /** Discount as a fixed amount. */
2148
+ FIXED_AMOUNT = "FIXED_AMOUNT",
2149
+ /** Discount as a percentage. */
2150
+ PERCENTAGE = "PERCENTAGE",
2151
+ /** Free shipping. */
2152
+ FREE_SHIPPING = "FREE_SHIPPING"
2153
+ }
2154
+ interface FixedAmountDiscount {
2155
+ /** Fixed amount to discount. */
2156
+ amount?: number;
2157
+ }
2158
+ interface PercentageDiscount {
2159
+ /** Percentage to discount. */
2160
+ percentage?: number;
2161
+ }
2162
+ interface CouponScope {
2163
+ /** Namespace of the coupon scope. */
2164
+ namespace?: string;
2165
+ /** Group of the coupon scope. */
2166
+ group?: Group;
2167
+ }
2168
+ interface Group {
2169
+ /** Name of the group. */
2170
+ name?: string;
2171
+ /** Entity ID of the group. */
2172
+ entityId?: string | null;
2173
+ }
2174
+ interface LoyaltyPoints {
2175
+ /**
2176
+ * Loyalty transaction ID.
2177
+ * @readonly
2178
+ */
2179
+ transactionId?: string;
2180
+ /**
2181
+ * Loyalty points amount given.
2182
+ * @readonly
2183
+ */
2184
+ amount?: number;
2185
+ }
2186
+ interface GetReferralEventResponseNonNullableFields {
2187
+ referralEvent?: {
2188
+ referredFriendSignupEvent?: {
2189
+ referredFriendId: string;
2190
+ };
2191
+ successfulReferralEvent?: {
2192
+ referredFriendId: string;
2193
+ referringCustomerId: string;
2194
+ };
2195
+ actionEvent?: {
2196
+ referredFriendId: string;
2197
+ referringCustomerId: string;
2198
+ trigger?: {
2199
+ appId: string;
2200
+ activityType: string;
2201
+ };
2202
+ };
2203
+ rewardEvent?: {
2204
+ rewardedReferringCustomerId: string;
2205
+ rewardedReferredFriendId: string;
2206
+ referralRewardId: string;
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$1;
2255
+ status: Status$2;
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;
496
2272
  };
497
2273
  };
498
2274
  loyaltyPoints?: {
@@ -505,135 +2281,322 @@ 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
2289
 
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;
2290
+ type __PublicMethodMetaInfo$2<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$2<'GET', {
2301
+ referralEventId: string;
2302
+ }, GetReferralEventRequest, GetReferralEventRequest$1, GetReferralEventResponse & GetReferralEventResponseNonNullableFields, GetReferralEventResponse$1 & GetReferralEventResponseNonNullableFields$1>;
2303
+ declare function queryReferralEvent(): __PublicMethodMetaInfo$2<'POST', {}, QueryReferralEventRequest, QueryReferralEventRequest$1, QueryReferralEventResponse & QueryReferralEventResponseNonNullableFields, QueryReferralEventResponse$1 & QueryReferralEventResponseNonNullableFields$1>;
2304
+ declare function getReferralStatistics(): __PublicMethodMetaInfo$2<'GET', {}, GetReferralStatisticsRequest, GetReferralStatisticsRequest$1, GetReferralStatisticsResponse & GetReferralStatisticsResponseNonNullableFields, GetReferralStatisticsResponse$1 & GetReferralStatisticsResponseNonNullableFields$1>;
2305
+ declare function queryReferringCustomerTotals(): __PublicMethodMetaInfo$2<'POST', {}, QueryReferringCustomerTotalsRequest, QueryReferringCustomerTotalsRequest$1, QueryReferringCustomerTotalsResponse & QueryReferringCustomerTotalsResponseNonNullableFields, QueryReferringCustomerTotalsResponse$1 & QueryReferringCustomerTotalsResponseNonNullableFields$1>;
2306
+ declare function queryReferredFriendActions(): __PublicMethodMetaInfo$2<'POST', {}, QueryReferredFriendActionsRequest, QueryReferredFriendActionsRequest$1, QueryReferredFriendActionsResponse & QueryReferredFriendActionsResponseNonNullableFields, QueryReferredFriendActionsResponse$1 & QueryReferredFriendActionsResponseNonNullableFields$1>;
2307
+
2308
+ declare const meta$2_getReferralEvent: typeof getReferralEvent;
2309
+ declare const meta$2_getReferralStatistics: typeof getReferralStatistics;
2310
+ declare const meta$2_queryReferralEvent: typeof queryReferralEvent;
2311
+ declare const meta$2_queryReferredFriendActions: typeof queryReferredFriendActions;
2312
+ declare const meta$2_queryReferringCustomerTotals: typeof queryReferringCustomerTotals;
2313
+ declare namespace meta$2 {
2314
+ 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 };
2315
+ }
2316
+
2317
+ /** ReferredFriend is the main entity of ReferredFriends that can be used for lorem ipsum dolor */
2318
+ interface ReferredFriend$1 {
524
2319
  /**
525
- * ReferralEvent ID.
2320
+ * ReferredFriend ID.
2321
+ * @readonly
2322
+ */
2323
+ id?: string;
2324
+ /**
2325
+ * ReferredFriend Contact ID.
2326
+ * @readonly
2327
+ */
2328
+ contactId?: string;
2329
+ /**
2330
+ * Customer who referred.
2331
+ * @readonly
2332
+ */
2333
+ referringCustomerId?: string;
2334
+ /** Status of the ReferredFriend. */
2335
+ status?: Status$1;
2336
+ /**
2337
+ * Represents the current state of an item. Each time the item is modified, its `revision` changes by the server. for an update operation to succeed, you MUST pass the latest revision.
526
2338
  * @readonly
527
2339
  */
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
2340
  revision?: string | null;
531
2341
  /**
532
- * Represents the time this ReferralEvent was created.
2342
+ * Represents the time this ReferredFriend was created.
533
2343
  * @readonly
534
2344
  */
535
- _createdDate?: Date;
2345
+ createdDate?: Date;
536
2346
  /**
537
- * Represents the time this ReferralEvent was last updated.
2347
+ * Represents the time this ReferredFriend was last updated.
538
2348
  * @readonly
539
2349
  */
540
- _updatedDate?: Date;
2350
+ updatedDate?: Date;
2351
+ }
2352
+ declare enum Status$1 {
2353
+ /** Unknown status. */
2354
+ UNKNOWN = "UNKNOWN",
2355
+ /** Initial status, when Referred friend joins site as member. */
2356
+ SIGN_UP_COMPLETED = "SIGN_UP_COMPLETED",
2357
+ /** After complete some actions (eg. Purchase Order), Action Completed Status is used. */
2358
+ ACTIONS_COMPLETED = "ACTIONS_COMPLETED"
2359
+ }
2360
+ interface CreateReferredFriendRequest$1 {
2361
+ }
2362
+ interface CreateReferredFriendResponse$1 {
2363
+ /** The created ReferredFriend. */
2364
+ referredFriend?: ReferredFriend$1;
2365
+ }
2366
+ interface GetReferredFriendRequest$1 {
2367
+ /** Id of the ReferredFriend to retrieve. */
2368
+ referredFriendId: string;
2369
+ }
2370
+ interface GetReferredFriendResponse$1 {
2371
+ /** The retrieved ReferredFriend. */
2372
+ referredFriend?: ReferredFriend$1;
2373
+ }
2374
+ interface GetReferredFriendByContactIdRequest$1 {
2375
+ /** Contact id or "me" to get current identity's Contact. */
2376
+ contactId: string;
2377
+ }
2378
+ interface GetReferredFriendByContactIdResponse$1 {
2379
+ /** The retrieved ReferredFriend. */
2380
+ referredFriend?: ReferredFriend$1;
2381
+ }
2382
+ interface UpdateReferredFriendRequest$1 {
2383
+ /** ReferredFriend to be updated, may be partial. */
2384
+ referredFriend: ReferredFriend$1;
2385
+ }
2386
+ interface UpdateReferredFriendResponse$1 {
2387
+ /** The updated ReferredFriend. */
2388
+ referredFriend?: ReferredFriend$1;
2389
+ }
2390
+ interface DeleteReferredFriendRequest$1 {
2391
+ /** Id of the ReferredFriend to delete. */
2392
+ referredFriendId: string;
2393
+ /** The revision of the ReferredFriend. */
2394
+ revision?: string;
2395
+ }
2396
+ interface DeleteReferredFriendResponse$1 {
2397
+ }
2398
+ interface QueryReferredFriendRequest$1 {
2399
+ /** Query options. */
2400
+ query: CursorQuery$3;
2401
+ }
2402
+ interface CursorQuery$3 extends CursorQueryPagingMethodOneOf$3 {
2403
+ /** 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`. */
2404
+ cursorPaging?: CursorPaging$3;
2405
+ /**
2406
+ * Filter object in the following format:
2407
+ * `"filter" : {
2408
+ * "fieldName1": "value1",
2409
+ * "fieldName2":{"$operator":"value2"}
2410
+ * }`
2411
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
2412
+ */
2413
+ filter?: Record<string, any> | null;
2414
+ /**
2415
+ * Sort object in the following format:
2416
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
2417
+ */
2418
+ sort?: Sorting$3[];
541
2419
  }
542
2420
  /** @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;
2421
+ interface CursorQueryPagingMethodOneOf$3 {
2422
+ /** 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`. */
2423
+ cursorPaging?: CursorPaging$3;
552
2424
  }
553
- interface ReferredFriendSignupEvent {
554
- /** The referred friend ID. */
555
- referredFriendId?: string;
2425
+ interface Sorting$3 {
2426
+ /** Name of the field to sort by. */
2427
+ fieldName?: string;
2428
+ /** Sort order. */
2429
+ order?: SortOrder$3;
556
2430
  }
557
- interface V1SuccessfulReferralEvent {
558
- /** The referred friend ID. */
559
- referredFriendId?: string;
560
- /** The referring customer ID. */
561
- referringCustomerId?: string;
2431
+ declare enum SortOrder$3 {
2432
+ ASC = "ASC",
2433
+ DESC = "DESC"
562
2434
  }
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;
2435
+ interface CursorPaging$3 {
2436
+ /** Maximum number of items to return in the results. */
2437
+ limit?: number | null;
2438
+ /**
2439
+ * Pointer to the next or previous page in the list of results.
2440
+ *
2441
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
2442
+ * Not relevant for the first request.
2443
+ */
2444
+ cursor?: string | null;
2445
+ }
2446
+ interface QueryReferredFriendResponse$1 {
2447
+ /** The retrieved ReferredFriends. */
2448
+ referredFriends?: ReferredFriend$1[];
2449
+ /** CursorPagingMetadata. */
2450
+ metadata?: CursorPagingMetadata$3;
2451
+ }
2452
+ interface CursorPagingMetadata$3 {
2453
+ /** Number of items returned in the response. */
2454
+ count?: number | null;
2455
+ /** Cursor strings that point to the next page, previous page, or both. */
2456
+ cursors?: Cursors$3;
2457
+ /**
2458
+ * Whether there are more pages to retrieve following the current page.
2459
+ *
2460
+ * + `true`: Another page of results can be retrieved.
2461
+ * + `false`: This is the last page.
2462
+ */
2463
+ hasNext?: boolean | null;
2464
+ }
2465
+ interface Cursors$3 {
2466
+ /** Cursor string pointing to the next page in the list of results. */
2467
+ next?: string | null;
2468
+ /** Cursor pointing to the previous page in the list of results. */
2469
+ prev?: string | null;
2470
+ }
2471
+ interface CreateReferredFriendResponseNonNullableFields$1 {
2472
+ referredFriend?: {
2473
+ id: string;
2474
+ contactId: string;
2475
+ referringCustomerId: string;
2476
+ status: Status$1;
2477
+ };
2478
+ }
2479
+ interface GetReferredFriendResponseNonNullableFields$1 {
2480
+ referredFriend?: {
2481
+ id: string;
2482
+ contactId: string;
2483
+ referringCustomerId: string;
2484
+ status: Status$1;
2485
+ };
2486
+ }
2487
+ interface GetReferredFriendByContactIdResponseNonNullableFields$1 {
2488
+ referredFriend?: {
2489
+ id: string;
2490
+ contactId: string;
2491
+ referringCustomerId: string;
2492
+ status: Status$1;
2493
+ };
576
2494
  }
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;
2495
+ interface UpdateReferredFriendResponseNonNullableFields$1 {
2496
+ referredFriend?: {
2497
+ id: string;
2498
+ contactId: string;
2499
+ referringCustomerId: string;
2500
+ status: Status$1;
2501
+ };
582
2502
  }
583
- interface RewardEvent extends RewardEventReceiverOneOf {
2503
+ interface QueryReferredFriendResponseNonNullableFields$1 {
2504
+ referredFriends: {
2505
+ id: string;
2506
+ contactId: string;
2507
+ referringCustomerId: string;
2508
+ status: Status$1;
2509
+ }[];
2510
+ }
2511
+
2512
+ /** ReferredFriend is the main entity of ReferredFriends that can be used for lorem ipsum dolor */
2513
+ interface ReferredFriend {
584
2514
  /**
585
- * The referring customer ID.
2515
+ * ReferredFriend ID.
586
2516
  * @readonly
587
2517
  */
588
- rewardedReferringCustomerId?: string;
2518
+ _id?: string;
589
2519
  /**
590
- * The referred friend ID.
2520
+ * ReferredFriend Contact ID.
591
2521
  * @readonly
592
2522
  */
593
- rewardedReferredFriendId?: string;
594
- /** The referral reward ID. */
595
- referralRewardId?: string;
596
- /** The reward type. */
597
- rewardType?: Reward;
598
- }
599
- /** @oneof */
600
- interface RewardEventReceiverOneOf {
2523
+ contactId?: string;
601
2524
  /**
602
- * The referring customer ID.
2525
+ * Customer who referred.
603
2526
  * @readonly
604
2527
  */
605
- rewardedReferringCustomerId?: string;
2528
+ referringCustomerId?: string;
2529
+ /** Status of the ReferredFriend. */
2530
+ status?: Status;
606
2531
  /**
607
- * The referred friend ID.
2532
+ * Represents the current state of an item. Each time the item is modified, its `revision` changes by the server. for an update operation to succeed, you MUST pass the latest revision.
608
2533
  * @readonly
609
2534
  */
610
- rewardedReferredFriendId?: string;
2535
+ revision?: string | null;
2536
+ /**
2537
+ * Represents the time this ReferredFriend was created.
2538
+ * @readonly
2539
+ */
2540
+ _createdDate?: Date;
2541
+ /**
2542
+ * Represents the time this ReferredFriend was last updated.
2543
+ * @readonly
2544
+ */
2545
+ _updatedDate?: Date;
611
2546
  }
612
- declare enum Reward {
613
- /** Unknown reward type. */
2547
+ declare enum Status {
2548
+ /** Unknown status. */
614
2549
  UNKNOWN = "UNKNOWN",
615
- /** Reward is a coupon. */
616
- COUPON = "COUPON",
617
- /** Reward is loyalty points. */
618
- LOYALTY_POINTS = "LOYALTY_POINTS",
619
- /** No reward. */
620
- NOTHING = "NOTHING"
2550
+ /** Initial status, when Referred friend joins site as member. */
2551
+ SIGN_UP_COMPLETED = "SIGN_UP_COMPLETED",
2552
+ /** After complete some actions (eg. Purchase Order), Action Completed Status is used. */
2553
+ ACTIONS_COMPLETED = "ACTIONS_COMPLETED"
621
2554
  }
622
- interface GetReferralEventRequest {
623
- /** Id of the ReferralEvent to retrieve */
624
- referralEventId: string;
2555
+ interface CreateReferredFriendRequest {
625
2556
  }
626
- interface GetReferralEventResponse {
627
- /** The retrieved ReferralEvent */
628
- referralEvent?: ReferralEvent;
2557
+ interface CreateReferredFriendResponse {
2558
+ /** The created ReferredFriend. */
2559
+ referredFriend?: ReferredFriend;
629
2560
  }
630
- interface QueryReferralEventRequest {
631
- /** Query to filter ReferralEvents. */
632
- query: CursorQuery;
2561
+ interface GetReferredFriendRequest {
2562
+ /** Id of the ReferredFriend to retrieve. */
2563
+ referredFriendId: string;
633
2564
  }
634
- interface CursorQuery extends CursorQueryPagingMethodOneOf {
2565
+ interface GetReferredFriendResponse {
2566
+ /** The retrieved ReferredFriend. */
2567
+ referredFriend?: ReferredFriend;
2568
+ }
2569
+ interface GetReferredFriendByContactIdRequest {
2570
+ /** Contact id or "me" to get current identity's Contact. */
2571
+ contactId: string;
2572
+ }
2573
+ interface GetReferredFriendByContactIdResponse {
2574
+ /** The retrieved ReferredFriend. */
2575
+ referredFriend?: ReferredFriend;
2576
+ }
2577
+ interface UpdateReferredFriendRequest {
2578
+ /** ReferredFriend to be updated, may be partial. */
2579
+ referredFriend: ReferredFriend;
2580
+ }
2581
+ interface UpdateReferredFriendResponse {
2582
+ /** The updated ReferredFriend. */
2583
+ referredFriend?: ReferredFriend;
2584
+ }
2585
+ interface DeleteReferredFriendRequest {
2586
+ /** Id of the ReferredFriend to delete. */
2587
+ referredFriendId: string;
2588
+ /** The revision of the ReferredFriend. */
2589
+ revision?: string;
2590
+ }
2591
+ interface DeleteReferredFriendResponse {
2592
+ }
2593
+ interface QueryReferredFriendRequest {
2594
+ /** Query options. */
2595
+ query: CursorQuery$2;
2596
+ }
2597
+ interface CursorQuery$2 extends CursorQueryPagingMethodOneOf$2 {
635
2598
  /** 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;
2599
+ cursorPaging?: CursorPaging$2;
637
2600
  /**
638
2601
  * Filter object in the following format:
639
2602
  * `"filter" : {
@@ -647,24 +2610,24 @@ interface CursorQuery extends CursorQueryPagingMethodOneOf {
647
2610
  * Sort object in the following format:
648
2611
  * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
649
2612
  */
650
- sort?: Sorting[];
2613
+ sort?: Sorting$2[];
651
2614
  }
652
2615
  /** @oneof */
653
- interface CursorQueryPagingMethodOneOf {
2616
+ interface CursorQueryPagingMethodOneOf$2 {
654
2617
  /** 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;
2618
+ cursorPaging?: CursorPaging$2;
656
2619
  }
657
- interface Sorting {
2620
+ interface Sorting$2 {
658
2621
  /** Name of the field to sort by. */
659
2622
  fieldName?: string;
660
2623
  /** Sort order. */
661
- order?: SortOrder;
2624
+ order?: SortOrder$2;
662
2625
  }
663
- declare enum SortOrder {
2626
+ declare enum SortOrder$2 {
664
2627
  ASC = "ASC",
665
2628
  DESC = "DESC"
666
2629
  }
667
- interface CursorPaging {
2630
+ interface CursorPaging$2 {
668
2631
  /** Maximum number of items to return in the results. */
669
2632
  limit?: number | null;
670
2633
  /**
@@ -675,17 +2638,17 @@ interface CursorPaging {
675
2638
  */
676
2639
  cursor?: string | null;
677
2640
  }
678
- interface QueryReferralEventResponse {
679
- /** List of ReferralEvents that match the query. */
680
- referralEvents?: ReferralEvent[];
681
- /** Paging metadata. */
682
- metadata?: CursorPagingMetadata;
2641
+ interface QueryReferredFriendResponse {
2642
+ /** The retrieved ReferredFriends. */
2643
+ referredFriends?: ReferredFriend[];
2644
+ /** CursorPagingMetadata. */
2645
+ metadata?: CursorPagingMetadata$2;
683
2646
  }
684
- interface CursorPagingMetadata {
2647
+ interface CursorPagingMetadata$2 {
685
2648
  /** Number of items returned in the response. */
686
2649
  count?: number | null;
687
2650
  /** Cursor strings that point to the next page, previous page, or both. */
688
- cursors?: Cursors;
2651
+ cursors?: Cursors$2;
689
2652
  /**
690
2653
  * Whether there are more pages to retrieve following the current page.
691
2654
  *
@@ -694,333 +2657,413 @@ interface CursorPagingMetadata {
694
2657
  */
695
2658
  hasNext?: boolean | null;
696
2659
  }
697
- interface Cursors {
2660
+ interface Cursors$2 {
698
2661
  /** Cursor string pointing to the next page in the list of results. */
699
2662
  next?: string | null;
700
2663
  /** Cursor pointing to the previous page in the list of results. */
701
2664
  prev?: string | null;
702
2665
  }
703
- interface GetReferralStatisticsRequest {
2666
+ interface CreateReferredFriendResponseNonNullableFields {
2667
+ referredFriend?: {
2668
+ _id: string;
2669
+ contactId: string;
2670
+ referringCustomerId: string;
2671
+ status: Status;
2672
+ };
704
2673
  }
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;
2674
+ interface GetReferredFriendResponseNonNullableFields {
2675
+ referredFriend?: {
2676
+ _id: string;
2677
+ contactId: string;
2678
+ referringCustomerId: string;
2679
+ status: Status;
2680
+ };
712
2681
  }
713
- interface QueryReferringCustomerTotalsRequest {
714
- /** Query to filter ReferringCustomerTotals. */
715
- query?: CursorQuery;
716
- /** List of contact ids to filter ReferringCustomerTotals. */
717
- contactIds?: string[];
2682
+ interface GetReferredFriendByContactIdResponseNonNullableFields {
2683
+ referredFriend?: {
2684
+ _id: string;
2685
+ contactId: string;
2686
+ referringCustomerId: string;
2687
+ status: Status;
2688
+ };
718
2689
  }
719
- interface QueryReferringCustomerTotalsResponse {
720
- /** List of ReferringCustomerTotals that match the query. */
721
- referringCustomerTotals?: ReferringCustomerTotal[];
722
- /** Paging metadata. */
723
- metadata?: CursorPagingMetadata;
2690
+ interface UpdateReferredFriendResponseNonNullableFields {
2691
+ referredFriend?: {
2692
+ _id: string;
2693
+ contactId: string;
2694
+ referringCustomerId: string;
2695
+ status: Status;
2696
+ };
724
2697
  }
725
- interface ReferringCustomerTotal {
2698
+ interface QueryReferredFriendResponseNonNullableFields {
2699
+ referredFriends: {
2700
+ _id: string;
2701
+ contactId: string;
2702
+ referringCustomerId: string;
2703
+ status: Status;
2704
+ }[];
2705
+ }
2706
+
2707
+ type __PublicMethodMetaInfo$1<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
2708
+ getUrl: (context: any) => string;
2709
+ httpMethod: K;
2710
+ path: string;
2711
+ pathParams: M;
2712
+ __requestType: T;
2713
+ __originalRequestType: S;
2714
+ __responseType: Q;
2715
+ __originalResponseType: R;
2716
+ };
2717
+ declare function createReferredFriend(): __PublicMethodMetaInfo$1<'POST', {}, CreateReferredFriendRequest, CreateReferredFriendRequest$1, CreateReferredFriendResponse & CreateReferredFriendResponseNonNullableFields, CreateReferredFriendResponse$1 & CreateReferredFriendResponseNonNullableFields$1>;
2718
+ declare function getReferredFriend(): __PublicMethodMetaInfo$1<'GET', {
2719
+ referredFriendId: string;
2720
+ }, GetReferredFriendRequest, GetReferredFriendRequest$1, GetReferredFriendResponse & GetReferredFriendResponseNonNullableFields, GetReferredFriendResponse$1 & GetReferredFriendResponseNonNullableFields$1>;
2721
+ declare function getReferredFriendByContactId(): __PublicMethodMetaInfo$1<'GET', {
2722
+ contactId: string;
2723
+ }, GetReferredFriendByContactIdRequest, GetReferredFriendByContactIdRequest$1, GetReferredFriendByContactIdResponse & GetReferredFriendByContactIdResponseNonNullableFields, GetReferredFriendByContactIdResponse$1 & GetReferredFriendByContactIdResponseNonNullableFields$1>;
2724
+ declare function updateReferredFriend(): __PublicMethodMetaInfo$1<'PATCH', {
2725
+ referredFriendId: string;
2726
+ }, UpdateReferredFriendRequest, UpdateReferredFriendRequest$1, UpdateReferredFriendResponse & UpdateReferredFriendResponseNonNullableFields, UpdateReferredFriendResponse$1 & UpdateReferredFriendResponseNonNullableFields$1>;
2727
+ declare function deleteReferredFriend(): __PublicMethodMetaInfo$1<'DELETE', {
2728
+ referredFriendId: string;
2729
+ }, DeleteReferredFriendRequest, DeleteReferredFriendRequest$1, DeleteReferredFriendResponse, DeleteReferredFriendResponse$1>;
2730
+ declare function queryReferredFriend(): __PublicMethodMetaInfo$1<'POST', {}, QueryReferredFriendRequest, QueryReferredFriendRequest$1, QueryReferredFriendResponse & QueryReferredFriendResponseNonNullableFields, QueryReferredFriendResponse$1 & QueryReferredFriendResponseNonNullableFields$1>;
2731
+
2732
+ declare const meta$1_createReferredFriend: typeof createReferredFriend;
2733
+ declare const meta$1_deleteReferredFriend: typeof deleteReferredFriend;
2734
+ declare const meta$1_getReferredFriend: typeof getReferredFriend;
2735
+ declare const meta$1_getReferredFriendByContactId: typeof getReferredFriendByContactId;
2736
+ declare const meta$1_queryReferredFriend: typeof queryReferredFriend;
2737
+ declare const meta$1_updateReferredFriend: typeof updateReferredFriend;
2738
+ declare namespace meta$1 {
2739
+ export { type __PublicMethodMetaInfo$1 as __PublicMethodMetaInfo, meta$1_createReferredFriend as createReferredFriend, meta$1_deleteReferredFriend as deleteReferredFriend, meta$1_getReferredFriend as getReferredFriend, meta$1_getReferredFriendByContactId as getReferredFriendByContactId, meta$1_queryReferredFriend as queryReferredFriend, meta$1_updateReferredFriend as updateReferredFriend };
2740
+ }
2741
+
2742
+ /** ReferringCustomer is the main entity of ReferringCustomers. */
2743
+ interface ReferringCustomer$1 {
726
2744
  /**
727
- * Referring customer id.
2745
+ * ReferringCustomer id.
728
2746
  * @readonly
729
2747
  */
730
- referringCustomerId?: string;
2748
+ id?: string;
731
2749
  /**
732
2750
  * Contact id.
733
2751
  * @readonly
734
2752
  */
735
2753
  contactId?: string;
736
2754
  /**
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.
2755
+ * Referral code.
748
2756
  * @readonly
749
2757
  */
750
- totalAmountGenerated?: string;
2758
+ referralCode?: string;
2759
+ /** Represents the current state of an item. Each time the item is modified, its `revision` changes by the server. for an update operation to succeed, you MUST pass the latest revision. */
2760
+ revision?: string | null;
751
2761
  /**
752
- * Last friend action date.
2762
+ * Represents the time this ReferringCustomer was created.
753
2763
  * @readonly
754
2764
  */
755
- lastFriendAction?: Date;
2765
+ createdDate?: Date;
756
2766
  /**
757
- * Total friends that have actions done.
2767
+ * Represents the time this ReferringCustomer was last updated.
758
2768
  * @readonly
759
2769
  */
760
- totalFriendsWithActions?: number;
2770
+ updatedDate?: Date;
761
2771
  }
762
- interface QueryReferredFriendActionsRequest {
763
- /** Query to filter ReferredFriendActions. */
764
- query?: CursorQuery;
765
- /** List of contact ids to filter ReferredFriendActions. */
766
- contactIds?: string[];
2772
+ interface GenerateReferringCustomerForContactRequest$1 {
2773
+ /** Contact id or "me" to generate current identity's referring customer. */
2774
+ contactId: string;
767
2775
  }
768
- interface QueryReferredFriendActionsResponse {
769
- /** List of ReferredFriendActions that match the query. */
770
- referredFriendActions?: ReferredFriendAction[];
771
- /** Paging metadata. */
772
- metadata?: CursorPagingMetadata;
2776
+ interface GenerateReferringCustomerForContactResponse$1 {
2777
+ /** The created ReferringCustomer. */
2778
+ referringCustomer?: ReferringCustomer$1;
773
2779
  }
774
- interface ReferredFriendAction extends ReferredFriendActionRewardTypeOptionsOneOf {
775
- /** Coupon reward type options. */
776
- coupon?: V1Coupon;
777
- /** Loyalty points reward type options. */
778
- loyaltyPoints?: LoyaltyPoints;
779
- /**
780
- * Referred friend id.
781
- * @readonly
782
- */
783
- referredFriendId?: string;
784
- /**
785
- * Contact id.
786
- * @readonly
787
- */
788
- contactId?: string;
2780
+ interface GetReferringCustomerRequest$1 {
2781
+ /** Id of the ReferringCustomer to retrieve. */
2782
+ referringCustomerId: string;
2783
+ }
2784
+ interface GetReferringCustomerResponse$1 {
2785
+ /** The retrieved ReferringCustomer. */
2786
+ referringCustomer?: ReferringCustomer$1;
2787
+ }
2788
+ interface GetReferringCustomerByReferralCodeRequest$1 {
2789
+ /** Referral Code of the ReferringCustomer to retrieve. */
2790
+ referralCode: string;
2791
+ }
2792
+ interface GetReferringCustomerByReferralCodeResponse$1 {
2793
+ /** The retrieved ReferringCustomer. */
2794
+ referringCustomer?: ReferringCustomer$1;
2795
+ }
2796
+ interface QueryReferringCustomersRequest$1 {
2797
+ /** Query options. */
2798
+ query: CursorQuery$1;
2799
+ }
2800
+ interface CursorQuery$1 extends CursorQueryPagingMethodOneOf$1 {
2801
+ /** 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`. */
2802
+ cursorPaging?: CursorPaging$1;
789
2803
  /**
790
- * First action trigger.
791
- * @readonly
2804
+ * Filter object in the following format:
2805
+ * `"filter" : {
2806
+ * "fieldName1": "value1",
2807
+ * "fieldName2":{"$operator":"value2"}
2808
+ * }`
2809
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
792
2810
  */
793
- trigger?: V1Trigger;
2811
+ filter?: Record<string, any> | null;
794
2812
  /**
795
- * First action date.
796
- * @readonly
2813
+ * Sort object in the following format:
2814
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
797
2815
  */
798
- actionDate?: Date;
799
- /** Issued reward type. */
800
- rewardType?: Reward;
801
- /** Total number of actions. */
802
- totalActions?: number;
2816
+ sort?: Sorting$1[];
2817
+ }
2818
+ /** @oneof */
2819
+ interface CursorQueryPagingMethodOneOf$1 {
2820
+ /** 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`. */
2821
+ cursorPaging?: CursorPaging$1;
2822
+ }
2823
+ interface Sorting$1 {
2824
+ /** Name of the field to sort by. */
2825
+ fieldName?: string;
2826
+ /** Sort order. */
2827
+ order?: SortOrder$1;
2828
+ }
2829
+ declare enum SortOrder$1 {
2830
+ ASC = "ASC",
2831
+ DESC = "DESC"
2832
+ }
2833
+ interface CursorPaging$1 {
2834
+ /** Maximum number of items to return in the results. */
2835
+ limit?: number | null;
803
2836
  /**
804
- * Total amount spent by this referred friend.
805
- * @readonly
2837
+ * Pointer to the next or previous page in the list of results.
2838
+ *
2839
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
2840
+ * Not relevant for the first request.
806
2841
  */
807
- totalAmountSpent?: string;
2842
+ cursor?: string | null;
2843
+ }
2844
+ interface QueryReferringCustomersResponse$1 {
2845
+ /** The retrieved ReferringCustomers. */
2846
+ referringCustomers?: ReferringCustomer$1[];
2847
+ /** Paging metadata. */
2848
+ metadata?: CursorPagingMetadata$1;
2849
+ }
2850
+ interface CursorPagingMetadata$1 {
2851
+ /** Number of items returned in the response. */
2852
+ count?: number | null;
2853
+ /** Cursor strings that point to the next page, previous page, or both. */
2854
+ cursors?: Cursors$1;
808
2855
  /**
809
- * friend signup date.
810
- * @readonly
2856
+ * Whether there are more pages to retrieve following the current page.
2857
+ *
2858
+ * + `true`: Another page of results can be retrieved.
2859
+ * + `false`: This is the last page.
811
2860
  */
812
- signupDate?: Date;
2861
+ hasNext?: boolean | null;
2862
+ }
2863
+ interface Cursors$1 {
2864
+ /** Cursor string pointing to the next page in the list of results. */
2865
+ next?: string | null;
2866
+ /** Cursor pointing to the previous page in the list of results. */
2867
+ prev?: string | null;
813
2868
  }
814
- /** @oneof */
815
- interface ReferredFriendActionRewardTypeOptionsOneOf {
816
- /** Coupon reward type options. */
817
- coupon?: V1Coupon;
818
- /** Loyalty points reward type options. */
819
- loyaltyPoints?: LoyaltyPoints;
2869
+ interface DeleteReferringCustomerRequest$1 {
2870
+ /** Id of the ReferringCustomer to delete. */
2871
+ referringCustomerId: string;
2872
+ /** The revision of the ReferringCustomer. */
2873
+ revision?: string;
820
2874
  }
821
- interface V1Coupon {
2875
+ interface DeleteReferringCustomerResponse$1 {
2876
+ }
2877
+ interface GenerateReferringCustomerForContactResponseNonNullableFields$1 {
2878
+ referringCustomer?: {
2879
+ id: string;
2880
+ contactId: string;
2881
+ referralCode: string;
2882
+ };
2883
+ }
2884
+ interface GetReferringCustomerResponseNonNullableFields$1 {
2885
+ referringCustomer?: {
2886
+ id: string;
2887
+ contactId: string;
2888
+ referralCode: string;
2889
+ };
2890
+ }
2891
+ interface GetReferringCustomerByReferralCodeResponseNonNullableFields$1 {
2892
+ referringCustomer?: {
2893
+ id: string;
2894
+ contactId: string;
2895
+ referralCode: string;
2896
+ };
2897
+ }
2898
+ interface QueryReferringCustomersResponseNonNullableFields$1 {
2899
+ referringCustomers: {
2900
+ id: string;
2901
+ contactId: string;
2902
+ referralCode: string;
2903
+ }[];
2904
+ }
2905
+
2906
+ /** ReferringCustomer is the main entity of ReferringCustomers. */
2907
+ interface ReferringCustomer {
822
2908
  /**
823
- * Coupon ID.
2909
+ * ReferringCustomer id.
824
2910
  * @readonly
825
2911
  */
826
2912
  _id?: string;
827
2913
  /**
828
- * Coupon code.
2914
+ * Contact id.
829
2915
  * @readonly
830
2916
  */
831
- code?: string;
2917
+ contactId?: string;
832
2918
  /**
833
- * Coupon status.
2919
+ * Referral code.
834
2920
  * @readonly
835
2921
  */
836
- status?: Status;
2922
+ referralCode?: string;
2923
+ /** Represents the current state of an item. Each time the item is modified, its `revision` changes by the server. for an update operation to succeed, you MUST pass the latest revision. */
2924
+ revision?: string | null;
837
2925
  /**
838
- * Coupon specification.
2926
+ * Represents the time this ReferringCustomer was created.
839
2927
  * @readonly
840
2928
  */
841
- couponSpecification?: Coupon;
2929
+ _createdDate?: Date;
2930
+ /**
2931
+ * Represents the time this ReferringCustomer was last updated.
2932
+ * @readonly
2933
+ */
2934
+ _updatedDate?: Date;
842
2935
  }
843
- declare enum Status {
844
- /** Unknown coupon status. */
845
- UNKNOWN = "UNKNOWN",
846
- /** Coupon is active and can be applied. */
847
- ACTIVE = "ACTIVE",
848
- /** Coupon was already applied and can not be used anymore. */
849
- APPLIED = "APPLIED",
850
- /** Coupon was deleted. */
851
- DELETED = "DELETED"
2936
+ interface GenerateReferringCustomerForContactRequest {
2937
+ /** Contact id or "me" to generate current identity's referring customer. */
2938
+ contactId: string;
852
2939
  }
853
- interface Coupon extends CouponDiscountTypeOptionsOneOf, CouponScopeOrMinSubtotalOneOf {
854
- /** Options for fixed amount discount type */
855
- fixedAmountOptions?: FixedAmountDiscount;
856
- /** Options for percentage discount type */
857
- percentageOptions?: PercentageDiscount;
858
- /** Limit the coupon to carts with a subtotal above this number. */
859
- minimumSubtotal?: number;
860
- /** Specifies the type of line items this coupon will apply to. */
861
- scope?: CouponScope;
862
- /** Coupon name */
863
- name?: string;
864
- /** Coupon discount type */
865
- discountType?: DiscountType;
866
- /** Limit the coupon to only apply to one item in cart. */
867
- limitedToOneItem?: boolean | null;
868
- /** If true, coupon also applies to subscriptions. */
869
- appliesToSubscriptions?: boolean | null;
870
- /** Specifies the amount of discounted cycles for subscription item. See Stores Coupons documentation for more info. */
871
- discountedCycleCount?: number | null;
2940
+ interface GenerateReferringCustomerForContactResponse {
2941
+ /** The created ReferringCustomer. */
2942
+ referringCustomer?: ReferringCustomer;
872
2943
  }
873
- /** @oneof */
874
- interface CouponDiscountTypeOptionsOneOf {
875
- /** Options for fixed amount discount type */
876
- fixedAmountOptions?: FixedAmountDiscount;
877
- /** Options for percentage discount type */
878
- percentageOptions?: PercentageDiscount;
2944
+ interface GetReferringCustomerRequest {
2945
+ /** Id of the ReferringCustomer to retrieve. */
2946
+ referringCustomerId: string;
879
2947
  }
880
- /** @oneof */
881
- interface CouponScopeOrMinSubtotalOneOf {
882
- /** Limit the coupon to carts with a subtotal above this number. */
883
- minimumSubtotal?: number;
884
- /** Specifies the type of line items this coupon will apply to. */
885
- scope?: CouponScope;
2948
+ interface GetReferringCustomerResponse {
2949
+ /** The retrieved ReferringCustomer. */
2950
+ referringCustomer?: ReferringCustomer;
886
2951
  }
887
- declare enum DiscountType {
888
- UNKNOWN = "UNKNOWN",
889
- /** Discount as a fixed amount */
890
- FIXED_AMOUNT = "FIXED_AMOUNT",
891
- /** Discount as a percentage */
892
- PERCENTAGE = "PERCENTAGE",
893
- /** Free shipping */
894
- FREE_SHIPPING = "FREE_SHIPPING"
2952
+ interface GetReferringCustomerByReferralCodeRequest {
2953
+ /** Referral Code of the ReferringCustomer to retrieve. */
2954
+ referralCode: string;
895
2955
  }
896
- interface FixedAmountDiscount {
897
- /** Fixed amount to discount */
898
- amount?: number;
2956
+ interface GetReferringCustomerByReferralCodeResponse {
2957
+ /** The retrieved ReferringCustomer. */
2958
+ referringCustomer?: ReferringCustomer;
899
2959
  }
900
- interface PercentageDiscount {
901
- percentage?: number;
2960
+ interface QueryReferringCustomersRequest {
2961
+ /** Query options. */
2962
+ query: CursorQuery;
902
2963
  }
903
- interface CouponScope {
904
- namespace?: string;
905
- group?: Group;
2964
+ interface CursorQuery extends CursorQueryPagingMethodOneOf {
2965
+ /** 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`. */
2966
+ cursorPaging?: CursorPaging;
2967
+ /**
2968
+ * Filter object in the following format:
2969
+ * `"filter" : {
2970
+ * "fieldName1": "value1",
2971
+ * "fieldName2":{"$operator":"value2"}
2972
+ * }`
2973
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
2974
+ */
2975
+ filter?: Record<string, any> | null;
2976
+ /**
2977
+ * Sort object in the following format:
2978
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
2979
+ */
2980
+ sort?: Sorting[];
906
2981
  }
907
- interface Group {
908
- name?: string;
909
- entityId?: string | null;
2982
+ /** @oneof */
2983
+ interface CursorQueryPagingMethodOneOf {
2984
+ /** 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`. */
2985
+ cursorPaging?: CursorPaging;
910
2986
  }
911
- interface LoyaltyPoints {
2987
+ interface Sorting {
2988
+ /** Name of the field to sort by. */
2989
+ fieldName?: string;
2990
+ /** Sort order. */
2991
+ order?: SortOrder;
2992
+ }
2993
+ declare enum SortOrder {
2994
+ ASC = "ASC",
2995
+ DESC = "DESC"
2996
+ }
2997
+ interface CursorPaging {
2998
+ /** Maximum number of items to return in the results. */
2999
+ limit?: number | null;
912
3000
  /**
913
- * Loyalty transaction ID.
914
- * @readonly
3001
+ * Pointer to the next or previous page in the list of results.
3002
+ *
3003
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
3004
+ * Not relevant for the first request.
915
3005
  */
916
- transactionId?: string;
3006
+ cursor?: string | null;
3007
+ }
3008
+ interface QueryReferringCustomersResponse {
3009
+ /** The retrieved ReferringCustomers. */
3010
+ referringCustomers?: ReferringCustomer[];
3011
+ /** Paging metadata. */
3012
+ metadata?: CursorPagingMetadata;
3013
+ }
3014
+ interface CursorPagingMetadata {
3015
+ /** Number of items returned in the response. */
3016
+ count?: number | null;
3017
+ /** Cursor strings that point to the next page, previous page, or both. */
3018
+ cursors?: Cursors;
917
3019
  /**
918
- * Loyalty points amount given.
919
- * @readonly
3020
+ * Whether there are more pages to retrieve following the current page.
3021
+ *
3022
+ * + `true`: Another page of results can be retrieved.
3023
+ * + `false`: This is the last page.
920
3024
  */
921
- amount?: number;
3025
+ hasNext?: boolean | null;
922
3026
  }
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
- };
3027
+ interface Cursors {
3028
+ /** Cursor string pointing to the next page in the list of results. */
3029
+ next?: string | null;
3030
+ /** Cursor pointing to the previous page in the list of results. */
3031
+ prev?: string | null;
947
3032
  }
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
- }[];
3033
+ interface DeleteReferringCustomerRequest {
3034
+ /** Id of the ReferringCustomer to delete. */
3035
+ referringCustomerId: string;
3036
+ /** The revision of the ReferringCustomer. */
3037
+ revision?: string;
972
3038
  }
973
- interface GetReferralStatisticsResponseNonNullableFields {
974
- totalSignUpsCompleted: number;
975
- totalActionsCompleted: number;
976
- totalAmountGenerated: string;
3039
+ interface DeleteReferringCustomerResponse {
977
3040
  }
978
- interface QueryReferringCustomerTotalsResponseNonNullableFields {
979
- referringCustomerTotals: {
980
- referringCustomerId: string;
3041
+ interface GenerateReferringCustomerForContactResponseNonNullableFields {
3042
+ referringCustomer?: {
3043
+ _id: string;
981
3044
  contactId: string;
982
- totalSuccessfulReferrals: number;
983
- totalAmountGenerated: string;
984
- totalFriendsWithActions: number;
985
- }[];
3045
+ referralCode: string;
3046
+ };
986
3047
  }
987
- interface QueryReferredFriendActionsResponseNonNullableFields {
988
- referredFriendActions: {
989
- coupon?: {
990
- _id: string;
991
- code: string;
992
- status: Status;
993
- couponSpecification?: {
994
- fixedAmountOptions?: {
995
- amount: number;
996
- };
997
- percentageOptions?: {
998
- percentage: number;
999
- };
1000
- minimumSubtotal: number;
1001
- scope?: {
1002
- namespace: string;
1003
- group?: {
1004
- name: string;
1005
- };
1006
- };
1007
- name: string;
1008
- discountType: DiscountType;
1009
- };
1010
- };
1011
- loyaltyPoints?: {
1012
- transactionId: string;
1013
- amount: number;
1014
- };
1015
- referredFriendId: string;
3048
+ interface GetReferringCustomerResponseNonNullableFields {
3049
+ referringCustomer?: {
3050
+ _id: string;
1016
3051
  contactId: string;
1017
- trigger?: {
1018
- appId: string;
1019
- activityType: string;
1020
- };
1021
- rewardType: Reward;
1022
- totalActions: number;
1023
- totalAmountSpent: string;
3052
+ referralCode: string;
3053
+ };
3054
+ }
3055
+ interface GetReferringCustomerByReferralCodeResponseNonNullableFields {
3056
+ referringCustomer?: {
3057
+ _id: string;
3058
+ contactId: string;
3059
+ referralCode: string;
3060
+ };
3061
+ }
3062
+ interface QueryReferringCustomersResponseNonNullableFields {
3063
+ referringCustomers: {
3064
+ _id: string;
3065
+ contactId: string;
3066
+ referralCode: string;
1024
3067
  }[];
1025
3068
  }
1026
3069
 
@@ -1034,22 +3077,26 @@ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q
1034
3077
  __responseType: Q;
1035
3078
  __originalResponseType: R;
1036
3079
  };
1037
- declare function getReferralEvent(): __PublicMethodMetaInfo<'GET', {
1038
- referralEventId: string;
1039
- }, GetReferralEventRequest, GetReferralEventRequest$1, GetReferralEventResponse & GetReferralEventResponseNonNullableFields, GetReferralEventResponse$1 & GetReferralEventResponseNonNullableFields$1>;
1040
- declare function queryReferralEvent(): __PublicMethodMetaInfo<'POST', {}, QueryReferralEventRequest, QueryReferralEventRequest$1, QueryReferralEventResponse & QueryReferralEventResponseNonNullableFields, QueryReferralEventResponse$1 & QueryReferralEventResponseNonNullableFields$1>;
1041
- declare function getReferralStatistics(): __PublicMethodMetaInfo<'GET', {}, GetReferralStatisticsRequest, GetReferralStatisticsRequest$1, GetReferralStatisticsResponse & GetReferralStatisticsResponseNonNullableFields, GetReferralStatisticsResponse$1 & GetReferralStatisticsResponseNonNullableFields$1>;
1042
- declare function queryReferringCustomerTotals(): __PublicMethodMetaInfo<'POST', {}, QueryReferringCustomerTotalsRequest, QueryReferringCustomerTotalsRequest$1, QueryReferringCustomerTotalsResponse & QueryReferringCustomerTotalsResponseNonNullableFields, QueryReferringCustomerTotalsResponse$1 & QueryReferringCustomerTotalsResponseNonNullableFields$1>;
1043
- declare function queryReferredFriendActions(): __PublicMethodMetaInfo<'POST', {}, QueryReferredFriendActionsRequest, QueryReferredFriendActionsRequest$1, QueryReferredFriendActionsResponse & QueryReferredFriendActionsResponseNonNullableFields, QueryReferredFriendActionsResponse$1 & QueryReferredFriendActionsResponseNonNullableFields$1>;
3080
+ declare function generateReferringCustomerForContact(): __PublicMethodMetaInfo<'POST', {}, GenerateReferringCustomerForContactRequest, GenerateReferringCustomerForContactRequest$1, GenerateReferringCustomerForContactResponse & GenerateReferringCustomerForContactResponseNonNullableFields, GenerateReferringCustomerForContactResponse$1 & GenerateReferringCustomerForContactResponseNonNullableFields$1>;
3081
+ declare function getReferringCustomer(): __PublicMethodMetaInfo<'GET', {
3082
+ referringCustomerId: string;
3083
+ }, GetReferringCustomerRequest, GetReferringCustomerRequest$1, GetReferringCustomerResponse & GetReferringCustomerResponseNonNullableFields, GetReferringCustomerResponse$1 & GetReferringCustomerResponseNonNullableFields$1>;
3084
+ declare function getReferringCustomerByReferralCode(): __PublicMethodMetaInfo<'GET', {
3085
+ referralCode: string;
3086
+ }, GetReferringCustomerByReferralCodeRequest, GetReferringCustomerByReferralCodeRequest$1, GetReferringCustomerByReferralCodeResponse & GetReferringCustomerByReferralCodeResponseNonNullableFields, GetReferringCustomerByReferralCodeResponse$1 & GetReferringCustomerByReferralCodeResponseNonNullableFields$1>;
3087
+ declare function queryReferringCustomers(): __PublicMethodMetaInfo<'POST', {}, QueryReferringCustomersRequest, QueryReferringCustomersRequest$1, QueryReferringCustomersResponse & QueryReferringCustomersResponseNonNullableFields, QueryReferringCustomersResponse$1 & QueryReferringCustomersResponseNonNullableFields$1>;
3088
+ declare function deleteReferringCustomer(): __PublicMethodMetaInfo<'DELETE', {
3089
+ referringCustomerId: string;
3090
+ }, DeleteReferringCustomerRequest, DeleteReferringCustomerRequest$1, DeleteReferringCustomerResponse, DeleteReferringCustomerResponse$1>;
1044
3091
 
1045
3092
  type meta___PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = __PublicMethodMetaInfo<K, M, T, S, Q, R>;
1046
- declare const meta_getReferralEvent: typeof getReferralEvent;
1047
- declare const meta_getReferralStatistics: typeof getReferralStatistics;
1048
- declare const meta_queryReferralEvent: typeof queryReferralEvent;
1049
- declare const meta_queryReferredFriendActions: typeof queryReferredFriendActions;
1050
- declare const meta_queryReferringCustomerTotals: typeof queryReferringCustomerTotals;
3093
+ declare const meta_deleteReferringCustomer: typeof deleteReferringCustomer;
3094
+ declare const meta_generateReferringCustomerForContact: typeof generateReferringCustomerForContact;
3095
+ declare const meta_getReferringCustomer: typeof getReferringCustomer;
3096
+ declare const meta_getReferringCustomerByReferralCode: typeof getReferringCustomerByReferralCode;
3097
+ declare const meta_queryReferringCustomers: typeof queryReferringCustomers;
1051
3098
  declare namespace meta {
1052
- export { type meta___PublicMethodMetaInfo as __PublicMethodMetaInfo, meta_getReferralEvent as getReferralEvent, meta_getReferralStatistics as getReferralStatistics, meta_queryReferralEvent as queryReferralEvent, meta_queryReferredFriendActions as queryReferredFriendActions, meta_queryReferringCustomerTotals as queryReferringCustomerTotals };
3099
+ 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 };
1053
3100
  }
1054
3101
 
1055
- export { meta as tracker };
3102
+ export { meta as customers, meta$1 as friends, meta$3 as programs, meta$2 as tracker };