@wix/referral 1.0.0
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.
- package/build/cjs/context.d.ts +1 -0
- package/build/cjs/context.js +28 -0
- package/build/cjs/context.js.map +1 -0
- package/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +28 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +28 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/es/context.d.ts +1 -0
- package/build/es/context.js +2 -0
- package/build/es/context.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/context/package.json +7 -0
- package/meta/package.json +7 -0
- package/package.json +47 -0
- package/type-bundles/context.bundle.d.ts +676 -0
- package/type-bundles/index.bundle.d.ts +948 -0
- package/type-bundles/meta.bundle.d.ts +1053 -0
|
@@ -0,0 +1,1053 @@
|
|
|
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;
|
|
11
|
+
/**
|
|
12
|
+
* ReferralEvent ID.
|
|
13
|
+
* @readonly
|
|
14
|
+
*/
|
|
15
|
+
id?: string | null;
|
|
16
|
+
/** 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
|
+
revision?: string | null;
|
|
18
|
+
/**
|
|
19
|
+
* Represents the time this ReferralEvent was created.
|
|
20
|
+
* @readonly
|
|
21
|
+
*/
|
|
22
|
+
createdDate?: Date;
|
|
23
|
+
/**
|
|
24
|
+
* Represents the time this ReferralEvent was last updated.
|
|
25
|
+
* @readonly
|
|
26
|
+
*/
|
|
27
|
+
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;
|
|
76
|
+
/**
|
|
77
|
+
* The referred friend ID.
|
|
78
|
+
* @readonly
|
|
79
|
+
*/
|
|
80
|
+
rewardedReferredFriendId?: string;
|
|
81
|
+
/** The referral reward ID. */
|
|
82
|
+
referralRewardId?: string;
|
|
83
|
+
/** The reward type. */
|
|
84
|
+
rewardType?: Reward$1;
|
|
85
|
+
}
|
|
86
|
+
/** @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;
|
|
98
|
+
}
|
|
99
|
+
declare enum Reward$1 {
|
|
100
|
+
/** Unknown reward type. */
|
|
101
|
+
UNKNOWN = "UNKNOWN",
|
|
102
|
+
/** Reward is a coupon. */
|
|
103
|
+
COUPON = "COUPON",
|
|
104
|
+
/** Reward is loyalty points. */
|
|
105
|
+
LOYALTY_POINTS = "LOYALTY_POINTS",
|
|
106
|
+
/** No reward. */
|
|
107
|
+
NOTHING = "NOTHING"
|
|
108
|
+
}
|
|
109
|
+
interface GetReferralEventRequest$1 {
|
|
110
|
+
/** Id of the ReferralEvent to retrieve */
|
|
111
|
+
referralEventId: string;
|
|
112
|
+
}
|
|
113
|
+
interface GetReferralEventResponse$1 {
|
|
114
|
+
/** The retrieved ReferralEvent */
|
|
115
|
+
referralEvent?: ReferralEvent$1;
|
|
116
|
+
}
|
|
117
|
+
interface QueryReferralEventRequest$1 {
|
|
118
|
+
/** Query to filter ReferralEvents. */
|
|
119
|
+
query: CursorQuery$1;
|
|
120
|
+
}
|
|
121
|
+
interface CursorQuery$1 extends CursorQueryPagingMethodOneOf$1 {
|
|
122
|
+
/** 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;
|
|
124
|
+
/**
|
|
125
|
+
* Filter object in the following format:
|
|
126
|
+
* `"filter" : {
|
|
127
|
+
* "fieldName1": "value1",
|
|
128
|
+
* "fieldName2":{"$operator":"value2"}
|
|
129
|
+
* }`
|
|
130
|
+
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
131
|
+
*/
|
|
132
|
+
filter?: Record<string, any> | null;
|
|
133
|
+
/**
|
|
134
|
+
* Sort object in the following format:
|
|
135
|
+
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
136
|
+
*/
|
|
137
|
+
sort?: Sorting$1[];
|
|
138
|
+
}
|
|
139
|
+
/** @oneof */
|
|
140
|
+
interface CursorQueryPagingMethodOneOf$1 {
|
|
141
|
+
/** 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;
|
|
143
|
+
}
|
|
144
|
+
interface Sorting$1 {
|
|
145
|
+
/** Name of the field to sort by. */
|
|
146
|
+
fieldName?: string;
|
|
147
|
+
/** Sort order. */
|
|
148
|
+
order?: SortOrder$1;
|
|
149
|
+
}
|
|
150
|
+
declare enum SortOrder$1 {
|
|
151
|
+
ASC = "ASC",
|
|
152
|
+
DESC = "DESC"
|
|
153
|
+
}
|
|
154
|
+
interface CursorPaging$1 {
|
|
155
|
+
/** Maximum number of items to return in the results. */
|
|
156
|
+
limit?: number | null;
|
|
157
|
+
/**
|
|
158
|
+
* Pointer to the next or previous page in the list of results.
|
|
159
|
+
*
|
|
160
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
161
|
+
* Not relevant for the first request.
|
|
162
|
+
*/
|
|
163
|
+
cursor?: string | null;
|
|
164
|
+
}
|
|
165
|
+
interface QueryReferralEventResponse$1 {
|
|
166
|
+
/** List of ReferralEvents that match the query. */
|
|
167
|
+
referralEvents?: ReferralEvent$1[];
|
|
168
|
+
/** Paging metadata. */
|
|
169
|
+
metadata?: CursorPagingMetadata$1;
|
|
170
|
+
}
|
|
171
|
+
interface CursorPagingMetadata$1 {
|
|
172
|
+
/** Number of items returned in the response. */
|
|
173
|
+
count?: number | null;
|
|
174
|
+
/** Cursor strings that point to the next page, previous page, or both. */
|
|
175
|
+
cursors?: Cursors$1;
|
|
176
|
+
/**
|
|
177
|
+
* Whether there are more pages to retrieve following the current page.
|
|
178
|
+
*
|
|
179
|
+
* + `true`: Another page of results can be retrieved.
|
|
180
|
+
* + `false`: This is the last page.
|
|
181
|
+
*/
|
|
182
|
+
hasNext?: boolean | null;
|
|
183
|
+
}
|
|
184
|
+
interface Cursors$1 {
|
|
185
|
+
/** Cursor string pointing to the next page in the list of results. */
|
|
186
|
+
next?: string | null;
|
|
187
|
+
/** Cursor pointing to the previous page in the list of results. */
|
|
188
|
+
prev?: string | null;
|
|
189
|
+
}
|
|
190
|
+
interface GetReferralStatisticsRequest$1 {
|
|
191
|
+
}
|
|
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;
|
|
199
|
+
}
|
|
200
|
+
interface QueryReferringCustomerTotalsRequest$1 {
|
|
201
|
+
/** Query to filter ReferringCustomerTotals. */
|
|
202
|
+
query?: CursorQuery$1;
|
|
203
|
+
/** List of contact ids to filter ReferringCustomerTotals. */
|
|
204
|
+
contactIds?: string[];
|
|
205
|
+
}
|
|
206
|
+
interface QueryReferringCustomerTotalsResponse$1 {
|
|
207
|
+
/** List of ReferringCustomerTotals that match the query. */
|
|
208
|
+
referringCustomerTotals?: ReferringCustomerTotal$1[];
|
|
209
|
+
/** Paging metadata. */
|
|
210
|
+
metadata?: CursorPagingMetadata$1;
|
|
211
|
+
}
|
|
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;
|
|
248
|
+
}
|
|
249
|
+
interface QueryReferredFriendActionsRequest$1 {
|
|
250
|
+
/** Query to filter ReferredFriendActions. */
|
|
251
|
+
query?: CursorQuery$1;
|
|
252
|
+
/** List of contact ids to filter ReferredFriendActions. */
|
|
253
|
+
contactIds?: string[];
|
|
254
|
+
}
|
|
255
|
+
interface QueryReferredFriendActionsResponse$1 {
|
|
256
|
+
/** List of ReferredFriendActions that match the query. */
|
|
257
|
+
referredFriendActions?: ReferredFriendAction$1[];
|
|
258
|
+
/** Paging metadata. */
|
|
259
|
+
metadata?: CursorPagingMetadata$1;
|
|
260
|
+
}
|
|
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;
|
|
295
|
+
/**
|
|
296
|
+
* friend signup date.
|
|
297
|
+
* @readonly
|
|
298
|
+
*/
|
|
299
|
+
signupDate?: Date;
|
|
300
|
+
}
|
|
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 {
|
|
309
|
+
/**
|
|
310
|
+
* Coupon id
|
|
311
|
+
* @readonly
|
|
312
|
+
*/
|
|
313
|
+
id?: string;
|
|
314
|
+
/**
|
|
315
|
+
* Coupon code
|
|
316
|
+
* @readonly
|
|
317
|
+
*/
|
|
318
|
+
code?: string;
|
|
319
|
+
/**
|
|
320
|
+
* Coupon status
|
|
321
|
+
* @readonly
|
|
322
|
+
*/
|
|
323
|
+
status?: Status$1;
|
|
324
|
+
/**
|
|
325
|
+
* Coupon specification
|
|
326
|
+
* @readonly
|
|
327
|
+
*/
|
|
328
|
+
couponSpecification?: Coupon$1;
|
|
329
|
+
}
|
|
330
|
+
declare enum Status$1 {
|
|
331
|
+
UNKNOWN = "UNKNOWN",
|
|
332
|
+
/** Coupon is active and can be applied */
|
|
333
|
+
ACTIVE = "ACTIVE",
|
|
334
|
+
/** Coupon was already applied and can not be used anymore */
|
|
335
|
+
APPLIED = "APPLIED",
|
|
336
|
+
/** Coupon was deleted */
|
|
337
|
+
DELETED = "DELETED"
|
|
338
|
+
}
|
|
339
|
+
interface Coupon$1 extends CouponDiscountTypeOptionsOneOf$1, CouponScopeOrMinSubtotalOneOf$1 {
|
|
340
|
+
/** Options for fixed amount discount type */
|
|
341
|
+
fixedAmountOptions?: FixedAmountDiscount$1;
|
|
342
|
+
/** Options for percentage discount type */
|
|
343
|
+
percentageOptions?: PercentageDiscount$1;
|
|
344
|
+
/** Limit the coupon to carts with a subtotal above this number. */
|
|
345
|
+
minimumSubtotal?: number;
|
|
346
|
+
/** Specifies the type of line items this coupon will apply to. */
|
|
347
|
+
scope?: CouponScope$1;
|
|
348
|
+
/** Coupon name */
|
|
349
|
+
name?: string;
|
|
350
|
+
/** Coupon discount type */
|
|
351
|
+
discountType?: DiscountType$1;
|
|
352
|
+
/** Limit the coupon to only apply to one item in cart. */
|
|
353
|
+
limitedToOneItem?: boolean | null;
|
|
354
|
+
/** If true, coupon also applies to subscriptions. */
|
|
355
|
+
appliesToSubscriptions?: boolean | null;
|
|
356
|
+
/** Specifies the amount of discounted cycles for subscription item. See Stores Coupons documentation for more info. */
|
|
357
|
+
discountedCycleCount?: number | null;
|
|
358
|
+
}
|
|
359
|
+
/** @oneof */
|
|
360
|
+
interface CouponDiscountTypeOptionsOneOf$1 {
|
|
361
|
+
/** Options for fixed amount discount type */
|
|
362
|
+
fixedAmountOptions?: FixedAmountDiscount$1;
|
|
363
|
+
/** Options for percentage discount type */
|
|
364
|
+
percentageOptions?: PercentageDiscount$1;
|
|
365
|
+
}
|
|
366
|
+
/** @oneof */
|
|
367
|
+
interface CouponScopeOrMinSubtotalOneOf$1 {
|
|
368
|
+
/** Limit the coupon to carts with a subtotal above this number. */
|
|
369
|
+
minimumSubtotal?: number;
|
|
370
|
+
/** Specifies the type of line items this coupon will apply to. */
|
|
371
|
+
scope?: CouponScope$1;
|
|
372
|
+
}
|
|
373
|
+
declare enum DiscountType$1 {
|
|
374
|
+
UNKNOWN = "UNKNOWN",
|
|
375
|
+
/** Discount as a fixed amount */
|
|
376
|
+
FIXED_AMOUNT = "FIXED_AMOUNT",
|
|
377
|
+
/** Discount as a percentage */
|
|
378
|
+
PERCENTAGE = "PERCENTAGE",
|
|
379
|
+
/** Free shipping */
|
|
380
|
+
FREE_SHIPPING = "FREE_SHIPPING"
|
|
381
|
+
}
|
|
382
|
+
interface FixedAmountDiscount$1 {
|
|
383
|
+
/** Fixed amount to discount */
|
|
384
|
+
amount?: number;
|
|
385
|
+
}
|
|
386
|
+
interface PercentageDiscount$1 {
|
|
387
|
+
percentage?: number;
|
|
388
|
+
}
|
|
389
|
+
interface CouponScope$1 {
|
|
390
|
+
namespace?: string;
|
|
391
|
+
group?: Group$1;
|
|
392
|
+
}
|
|
393
|
+
interface Group$1 {
|
|
394
|
+
name?: string;
|
|
395
|
+
entityId?: string | null;
|
|
396
|
+
}
|
|
397
|
+
interface LoyaltyPoints$1 {
|
|
398
|
+
/**
|
|
399
|
+
* Loyalty transaction id
|
|
400
|
+
* @readonly
|
|
401
|
+
*/
|
|
402
|
+
transactionId?: string;
|
|
403
|
+
/**
|
|
404
|
+
* Loyalty points amount given
|
|
405
|
+
* @readonly
|
|
406
|
+
*/
|
|
407
|
+
amount?: number;
|
|
408
|
+
}
|
|
409
|
+
interface GetReferralEventResponseNonNullableFields$1 {
|
|
410
|
+
referralEvent?: {
|
|
411
|
+
referredFriendSignupEvent?: {
|
|
412
|
+
referredFriendId: string;
|
|
413
|
+
};
|
|
414
|
+
successfulReferralEvent?: {
|
|
415
|
+
referredFriendId: string;
|
|
416
|
+
referringCustomerId: string;
|
|
417
|
+
};
|
|
418
|
+
actionEvent?: {
|
|
419
|
+
referredFriendId: string;
|
|
420
|
+
referringCustomerId: string;
|
|
421
|
+
trigger?: {
|
|
422
|
+
appId: string;
|
|
423
|
+
activityType: string;
|
|
424
|
+
};
|
|
425
|
+
};
|
|
426
|
+
rewardEvent?: {
|
|
427
|
+
rewardedReferringCustomerId: string;
|
|
428
|
+
rewardedReferredFriendId: string;
|
|
429
|
+
referralRewardId: string;
|
|
430
|
+
rewardType: Reward$1;
|
|
431
|
+
};
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
interface QueryReferralEventResponseNonNullableFields$1 {
|
|
435
|
+
referralEvents: {
|
|
436
|
+
referredFriendSignupEvent?: {
|
|
437
|
+
referredFriendId: string;
|
|
438
|
+
};
|
|
439
|
+
successfulReferralEvent?: {
|
|
440
|
+
referredFriendId: string;
|
|
441
|
+
referringCustomerId: string;
|
|
442
|
+
};
|
|
443
|
+
actionEvent?: {
|
|
444
|
+
referredFriendId: string;
|
|
445
|
+
referringCustomerId: string;
|
|
446
|
+
trigger?: {
|
|
447
|
+
appId: string;
|
|
448
|
+
activityType: string;
|
|
449
|
+
};
|
|
450
|
+
};
|
|
451
|
+
rewardEvent?: {
|
|
452
|
+
rewardedReferringCustomerId: string;
|
|
453
|
+
rewardedReferredFriendId: string;
|
|
454
|
+
referralRewardId: string;
|
|
455
|
+
rewardType: Reward$1;
|
|
456
|
+
};
|
|
457
|
+
}[];
|
|
458
|
+
}
|
|
459
|
+
interface GetReferralStatisticsResponseNonNullableFields$1 {
|
|
460
|
+
totalSignUpsCompleted: number;
|
|
461
|
+
totalActionsCompleted: number;
|
|
462
|
+
totalAmountGenerated: string;
|
|
463
|
+
}
|
|
464
|
+
interface QueryReferringCustomerTotalsResponseNonNullableFields$1 {
|
|
465
|
+
referringCustomerTotals: {
|
|
466
|
+
referringCustomerId: string;
|
|
467
|
+
contactId: string;
|
|
468
|
+
totalSuccessfulReferrals: number;
|
|
469
|
+
totalAmountGenerated: string;
|
|
470
|
+
totalFriendsWithActions: number;
|
|
471
|
+
}[];
|
|
472
|
+
}
|
|
473
|
+
interface QueryReferredFriendActionsResponseNonNullableFields$1 {
|
|
474
|
+
referredFriendActions: {
|
|
475
|
+
coupon?: {
|
|
476
|
+
id: string;
|
|
477
|
+
code: string;
|
|
478
|
+
status: Status$1;
|
|
479
|
+
couponSpecification?: {
|
|
480
|
+
fixedAmountOptions?: {
|
|
481
|
+
amount: number;
|
|
482
|
+
};
|
|
483
|
+
percentageOptions?: {
|
|
484
|
+
percentage: number;
|
|
485
|
+
};
|
|
486
|
+
minimumSubtotal: number;
|
|
487
|
+
scope?: {
|
|
488
|
+
namespace: string;
|
|
489
|
+
group?: {
|
|
490
|
+
name: string;
|
|
491
|
+
};
|
|
492
|
+
};
|
|
493
|
+
name: string;
|
|
494
|
+
discountType: DiscountType$1;
|
|
495
|
+
};
|
|
496
|
+
};
|
|
497
|
+
loyaltyPoints?: {
|
|
498
|
+
transactionId: string;
|
|
499
|
+
amount: number;
|
|
500
|
+
};
|
|
501
|
+
referredFriendId: string;
|
|
502
|
+
contactId: string;
|
|
503
|
+
trigger?: {
|
|
504
|
+
appId: string;
|
|
505
|
+
activityType: string;
|
|
506
|
+
};
|
|
507
|
+
rewardType: Reward$1;
|
|
508
|
+
totalActions: number;
|
|
509
|
+
totalAmountSpent: string;
|
|
510
|
+
}[];
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
/** ReferralEvent. */
|
|
514
|
+
interface ReferralEvent extends ReferralEventEventTypeOneOf {
|
|
515
|
+
/** ReferredFriendSignupEvent is an event that is triggered when a referred friend signs up. */
|
|
516
|
+
referredFriendSignupEvent?: ReferredFriendSignupEvent;
|
|
517
|
+
/** SuccessfulReferralEvent is an event that is triggered when a referral is successful. */
|
|
518
|
+
successfulReferralEvent?: V1SuccessfulReferralEvent;
|
|
519
|
+
/** ActionEvent is an event that is triggered when an action is performed. */
|
|
520
|
+
actionEvent?: V1ActionEvent;
|
|
521
|
+
/** RewardEvent is an event that is triggered when a reward is given. */
|
|
522
|
+
rewardEvent?: RewardEvent;
|
|
523
|
+
/**
|
|
524
|
+
* ReferralEvent ID.
|
|
525
|
+
* @readonly
|
|
526
|
+
*/
|
|
527
|
+
_id?: string | null;
|
|
528
|
+
/** 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. */
|
|
529
|
+
revision?: string | null;
|
|
530
|
+
/**
|
|
531
|
+
* Represents the time this ReferralEvent was created.
|
|
532
|
+
* @readonly
|
|
533
|
+
*/
|
|
534
|
+
_createdDate?: Date;
|
|
535
|
+
/**
|
|
536
|
+
* Represents the time this ReferralEvent was last updated.
|
|
537
|
+
* @readonly
|
|
538
|
+
*/
|
|
539
|
+
_updatedDate?: Date;
|
|
540
|
+
}
|
|
541
|
+
/** @oneof */
|
|
542
|
+
interface ReferralEventEventTypeOneOf {
|
|
543
|
+
/** ReferredFriendSignupEvent is an event that is triggered when a referred friend signs up. */
|
|
544
|
+
referredFriendSignupEvent?: ReferredFriendSignupEvent;
|
|
545
|
+
/** SuccessfulReferralEvent is an event that is triggered when a referral is successful. */
|
|
546
|
+
successfulReferralEvent?: V1SuccessfulReferralEvent;
|
|
547
|
+
/** ActionEvent is an event that is triggered when an action is performed. */
|
|
548
|
+
actionEvent?: V1ActionEvent;
|
|
549
|
+
/** RewardEvent is an event that is triggered when a reward is given. */
|
|
550
|
+
rewardEvent?: RewardEvent;
|
|
551
|
+
}
|
|
552
|
+
interface ReferredFriendSignupEvent {
|
|
553
|
+
/** The referred friend ID. */
|
|
554
|
+
referredFriendId?: string;
|
|
555
|
+
}
|
|
556
|
+
interface V1SuccessfulReferralEvent {
|
|
557
|
+
/** The referred friend ID. */
|
|
558
|
+
referredFriendId?: string;
|
|
559
|
+
/** The referring customer ID. */
|
|
560
|
+
referringCustomerId?: string;
|
|
561
|
+
}
|
|
562
|
+
interface V1ActionEvent {
|
|
563
|
+
/** The referred friend ID. */
|
|
564
|
+
referredFriendId?: string;
|
|
565
|
+
/** The referring customer ID. */
|
|
566
|
+
referringCustomerId?: string;
|
|
567
|
+
/** The trigger of the action. */
|
|
568
|
+
trigger?: V1Trigger;
|
|
569
|
+
/** Amount. */
|
|
570
|
+
amount?: string | null;
|
|
571
|
+
/** Currency. */
|
|
572
|
+
currency?: string | null;
|
|
573
|
+
/** Order ID. */
|
|
574
|
+
orderId?: string | null;
|
|
575
|
+
}
|
|
576
|
+
interface V1Trigger {
|
|
577
|
+
/** The app id of the app that triggered the event. */
|
|
578
|
+
appId?: string;
|
|
579
|
+
/** The activity type that triggered the event. */
|
|
580
|
+
activityType?: string;
|
|
581
|
+
}
|
|
582
|
+
interface RewardEvent extends RewardEventReceiverOneOf {
|
|
583
|
+
/**
|
|
584
|
+
* The referring customer ID.
|
|
585
|
+
* @readonly
|
|
586
|
+
*/
|
|
587
|
+
rewardedReferringCustomerId?: string;
|
|
588
|
+
/**
|
|
589
|
+
* The referred friend ID.
|
|
590
|
+
* @readonly
|
|
591
|
+
*/
|
|
592
|
+
rewardedReferredFriendId?: string;
|
|
593
|
+
/** The referral reward ID. */
|
|
594
|
+
referralRewardId?: string;
|
|
595
|
+
/** The reward type. */
|
|
596
|
+
rewardType?: Reward;
|
|
597
|
+
}
|
|
598
|
+
/** @oneof */
|
|
599
|
+
interface RewardEventReceiverOneOf {
|
|
600
|
+
/**
|
|
601
|
+
* The referring customer ID.
|
|
602
|
+
* @readonly
|
|
603
|
+
*/
|
|
604
|
+
rewardedReferringCustomerId?: string;
|
|
605
|
+
/**
|
|
606
|
+
* The referred friend ID.
|
|
607
|
+
* @readonly
|
|
608
|
+
*/
|
|
609
|
+
rewardedReferredFriendId?: string;
|
|
610
|
+
}
|
|
611
|
+
declare enum Reward {
|
|
612
|
+
/** Unknown reward type. */
|
|
613
|
+
UNKNOWN = "UNKNOWN",
|
|
614
|
+
/** Reward is a coupon. */
|
|
615
|
+
COUPON = "COUPON",
|
|
616
|
+
/** Reward is loyalty points. */
|
|
617
|
+
LOYALTY_POINTS = "LOYALTY_POINTS",
|
|
618
|
+
/** No reward. */
|
|
619
|
+
NOTHING = "NOTHING"
|
|
620
|
+
}
|
|
621
|
+
interface GetReferralEventRequest {
|
|
622
|
+
/** Id of the ReferralEvent to retrieve */
|
|
623
|
+
referralEventId: string;
|
|
624
|
+
}
|
|
625
|
+
interface GetReferralEventResponse {
|
|
626
|
+
/** The retrieved ReferralEvent */
|
|
627
|
+
referralEvent?: ReferralEvent;
|
|
628
|
+
}
|
|
629
|
+
interface QueryReferralEventRequest {
|
|
630
|
+
/** Query to filter ReferralEvents. */
|
|
631
|
+
query: CursorQuery;
|
|
632
|
+
}
|
|
633
|
+
interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
634
|
+
/** 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`. */
|
|
635
|
+
cursorPaging?: CursorPaging;
|
|
636
|
+
/**
|
|
637
|
+
* Filter object in the following format:
|
|
638
|
+
* `"filter" : {
|
|
639
|
+
* "fieldName1": "value1",
|
|
640
|
+
* "fieldName2":{"$operator":"value2"}
|
|
641
|
+
* }`
|
|
642
|
+
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
643
|
+
*/
|
|
644
|
+
filter?: Record<string, any> | null;
|
|
645
|
+
/**
|
|
646
|
+
* Sort object in the following format:
|
|
647
|
+
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
648
|
+
*/
|
|
649
|
+
sort?: Sorting[];
|
|
650
|
+
}
|
|
651
|
+
/** @oneof */
|
|
652
|
+
interface CursorQueryPagingMethodOneOf {
|
|
653
|
+
/** 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`. */
|
|
654
|
+
cursorPaging?: CursorPaging;
|
|
655
|
+
}
|
|
656
|
+
interface Sorting {
|
|
657
|
+
/** Name of the field to sort by. */
|
|
658
|
+
fieldName?: string;
|
|
659
|
+
/** Sort order. */
|
|
660
|
+
order?: SortOrder;
|
|
661
|
+
}
|
|
662
|
+
declare enum SortOrder {
|
|
663
|
+
ASC = "ASC",
|
|
664
|
+
DESC = "DESC"
|
|
665
|
+
}
|
|
666
|
+
interface CursorPaging {
|
|
667
|
+
/** Maximum number of items to return in the results. */
|
|
668
|
+
limit?: number | null;
|
|
669
|
+
/**
|
|
670
|
+
* Pointer to the next or previous page in the list of results.
|
|
671
|
+
*
|
|
672
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
673
|
+
* Not relevant for the first request.
|
|
674
|
+
*/
|
|
675
|
+
cursor?: string | null;
|
|
676
|
+
}
|
|
677
|
+
interface QueryReferralEventResponse {
|
|
678
|
+
/** List of ReferralEvents that match the query. */
|
|
679
|
+
referralEvents?: ReferralEvent[];
|
|
680
|
+
/** Paging metadata. */
|
|
681
|
+
metadata?: CursorPagingMetadata;
|
|
682
|
+
}
|
|
683
|
+
interface CursorPagingMetadata {
|
|
684
|
+
/** Number of items returned in the response. */
|
|
685
|
+
count?: number | null;
|
|
686
|
+
/** Cursor strings that point to the next page, previous page, or both. */
|
|
687
|
+
cursors?: Cursors;
|
|
688
|
+
/**
|
|
689
|
+
* Whether there are more pages to retrieve following the current page.
|
|
690
|
+
*
|
|
691
|
+
* + `true`: Another page of results can be retrieved.
|
|
692
|
+
* + `false`: This is the last page.
|
|
693
|
+
*/
|
|
694
|
+
hasNext?: boolean | null;
|
|
695
|
+
}
|
|
696
|
+
interface Cursors {
|
|
697
|
+
/** Cursor string pointing to the next page in the list of results. */
|
|
698
|
+
next?: string | null;
|
|
699
|
+
/** Cursor pointing to the previous page in the list of results. */
|
|
700
|
+
prev?: string | null;
|
|
701
|
+
}
|
|
702
|
+
interface GetReferralStatisticsRequest {
|
|
703
|
+
}
|
|
704
|
+
interface GetReferralStatisticsResponse {
|
|
705
|
+
/** Total sign ups completed by referred friends */
|
|
706
|
+
totalSignUpsCompleted?: number;
|
|
707
|
+
/** Total actions completed by referred friends */
|
|
708
|
+
totalActionsCompleted?: number;
|
|
709
|
+
/** Total amount of purchases made by referred friends */
|
|
710
|
+
totalAmountGenerated?: string;
|
|
711
|
+
}
|
|
712
|
+
interface QueryReferringCustomerTotalsRequest {
|
|
713
|
+
/** Query to filter ReferringCustomerTotals. */
|
|
714
|
+
query?: CursorQuery;
|
|
715
|
+
/** List of contact ids to filter ReferringCustomerTotals. */
|
|
716
|
+
contactIds?: string[];
|
|
717
|
+
}
|
|
718
|
+
interface QueryReferringCustomerTotalsResponse {
|
|
719
|
+
/** List of ReferringCustomerTotals that match the query. */
|
|
720
|
+
referringCustomerTotals?: ReferringCustomerTotal[];
|
|
721
|
+
/** Paging metadata. */
|
|
722
|
+
metadata?: CursorPagingMetadata;
|
|
723
|
+
}
|
|
724
|
+
interface ReferringCustomerTotal {
|
|
725
|
+
/**
|
|
726
|
+
* Referring customer id.
|
|
727
|
+
* @readonly
|
|
728
|
+
*/
|
|
729
|
+
referringCustomerId?: string;
|
|
730
|
+
/**
|
|
731
|
+
* Contact id.
|
|
732
|
+
* @readonly
|
|
733
|
+
*/
|
|
734
|
+
contactId?: string;
|
|
735
|
+
/**
|
|
736
|
+
* Last successful referral date.
|
|
737
|
+
* @readonly
|
|
738
|
+
*/
|
|
739
|
+
lastSuccessfulReferral?: Date;
|
|
740
|
+
/**
|
|
741
|
+
* Total successful referrals made by this customer.
|
|
742
|
+
* @readonly
|
|
743
|
+
*/
|
|
744
|
+
totalSuccessfulReferrals?: number;
|
|
745
|
+
/**
|
|
746
|
+
* Total amount generated by friends referred by this customer.
|
|
747
|
+
* @readonly
|
|
748
|
+
*/
|
|
749
|
+
totalAmountGenerated?: string;
|
|
750
|
+
/**
|
|
751
|
+
* Last friend action date.
|
|
752
|
+
* @readonly
|
|
753
|
+
*/
|
|
754
|
+
lastFriendAction?: Date;
|
|
755
|
+
/**
|
|
756
|
+
* Total friends that have actions done.
|
|
757
|
+
* @readonly
|
|
758
|
+
*/
|
|
759
|
+
totalFriendsWithActions?: number;
|
|
760
|
+
}
|
|
761
|
+
interface QueryReferredFriendActionsRequest {
|
|
762
|
+
/** Query to filter ReferredFriendActions. */
|
|
763
|
+
query?: CursorQuery;
|
|
764
|
+
/** List of contact ids to filter ReferredFriendActions. */
|
|
765
|
+
contactIds?: string[];
|
|
766
|
+
}
|
|
767
|
+
interface QueryReferredFriendActionsResponse {
|
|
768
|
+
/** List of ReferredFriendActions that match the query. */
|
|
769
|
+
referredFriendActions?: ReferredFriendAction[];
|
|
770
|
+
/** Paging metadata. */
|
|
771
|
+
metadata?: CursorPagingMetadata;
|
|
772
|
+
}
|
|
773
|
+
interface ReferredFriendAction extends ReferredFriendActionRewardTypeOptionsOneOf {
|
|
774
|
+
/** Coupon reward type options. */
|
|
775
|
+
coupon?: V1Coupon;
|
|
776
|
+
/** Loyalty points reward type options. */
|
|
777
|
+
loyaltyPoints?: LoyaltyPoints;
|
|
778
|
+
/**
|
|
779
|
+
* Referred friend id.
|
|
780
|
+
* @readonly
|
|
781
|
+
*/
|
|
782
|
+
referredFriendId?: string;
|
|
783
|
+
/**
|
|
784
|
+
* Contact id.
|
|
785
|
+
* @readonly
|
|
786
|
+
*/
|
|
787
|
+
contactId?: string;
|
|
788
|
+
/**
|
|
789
|
+
* First action trigger.
|
|
790
|
+
* @readonly
|
|
791
|
+
*/
|
|
792
|
+
trigger?: V1Trigger;
|
|
793
|
+
/**
|
|
794
|
+
* First action date.
|
|
795
|
+
* @readonly
|
|
796
|
+
*/
|
|
797
|
+
actionDate?: Date;
|
|
798
|
+
/** Issued reward type. */
|
|
799
|
+
rewardType?: Reward;
|
|
800
|
+
/** Total number of actions. */
|
|
801
|
+
totalActions?: number;
|
|
802
|
+
/**
|
|
803
|
+
* Total amount spent by this referred friend.
|
|
804
|
+
* @readonly
|
|
805
|
+
*/
|
|
806
|
+
totalAmountSpent?: string;
|
|
807
|
+
/**
|
|
808
|
+
* friend signup date.
|
|
809
|
+
* @readonly
|
|
810
|
+
*/
|
|
811
|
+
signupDate?: Date;
|
|
812
|
+
}
|
|
813
|
+
/** @oneof */
|
|
814
|
+
interface ReferredFriendActionRewardTypeOptionsOneOf {
|
|
815
|
+
/** Coupon reward type options. */
|
|
816
|
+
coupon?: V1Coupon;
|
|
817
|
+
/** Loyalty points reward type options. */
|
|
818
|
+
loyaltyPoints?: LoyaltyPoints;
|
|
819
|
+
}
|
|
820
|
+
interface V1Coupon {
|
|
821
|
+
/**
|
|
822
|
+
* Coupon id
|
|
823
|
+
* @readonly
|
|
824
|
+
*/
|
|
825
|
+
_id?: string;
|
|
826
|
+
/**
|
|
827
|
+
* Coupon code
|
|
828
|
+
* @readonly
|
|
829
|
+
*/
|
|
830
|
+
code?: string;
|
|
831
|
+
/**
|
|
832
|
+
* Coupon status
|
|
833
|
+
* @readonly
|
|
834
|
+
*/
|
|
835
|
+
status?: Status;
|
|
836
|
+
/**
|
|
837
|
+
* Coupon specification
|
|
838
|
+
* @readonly
|
|
839
|
+
*/
|
|
840
|
+
couponSpecification?: Coupon;
|
|
841
|
+
}
|
|
842
|
+
declare enum Status {
|
|
843
|
+
UNKNOWN = "UNKNOWN",
|
|
844
|
+
/** Coupon is active and can be applied */
|
|
845
|
+
ACTIVE = "ACTIVE",
|
|
846
|
+
/** Coupon was already applied and can not be used anymore */
|
|
847
|
+
APPLIED = "APPLIED",
|
|
848
|
+
/** Coupon was deleted */
|
|
849
|
+
DELETED = "DELETED"
|
|
850
|
+
}
|
|
851
|
+
interface Coupon extends CouponDiscountTypeOptionsOneOf, CouponScopeOrMinSubtotalOneOf {
|
|
852
|
+
/** Options for fixed amount discount type */
|
|
853
|
+
fixedAmountOptions?: FixedAmountDiscount;
|
|
854
|
+
/** Options for percentage discount type */
|
|
855
|
+
percentageOptions?: PercentageDiscount;
|
|
856
|
+
/** Limit the coupon to carts with a subtotal above this number. */
|
|
857
|
+
minimumSubtotal?: number;
|
|
858
|
+
/** Specifies the type of line items this coupon will apply to. */
|
|
859
|
+
scope?: CouponScope;
|
|
860
|
+
/** Coupon name */
|
|
861
|
+
name?: string;
|
|
862
|
+
/** Coupon discount type */
|
|
863
|
+
discountType?: DiscountType;
|
|
864
|
+
/** Limit the coupon to only apply to one item in cart. */
|
|
865
|
+
limitedToOneItem?: boolean | null;
|
|
866
|
+
/** If true, coupon also applies to subscriptions. */
|
|
867
|
+
appliesToSubscriptions?: boolean | null;
|
|
868
|
+
/** Specifies the amount of discounted cycles for subscription item. See Stores Coupons documentation for more info. */
|
|
869
|
+
discountedCycleCount?: number | null;
|
|
870
|
+
}
|
|
871
|
+
/** @oneof */
|
|
872
|
+
interface CouponDiscountTypeOptionsOneOf {
|
|
873
|
+
/** Options for fixed amount discount type */
|
|
874
|
+
fixedAmountOptions?: FixedAmountDiscount;
|
|
875
|
+
/** Options for percentage discount type */
|
|
876
|
+
percentageOptions?: PercentageDiscount;
|
|
877
|
+
}
|
|
878
|
+
/** @oneof */
|
|
879
|
+
interface CouponScopeOrMinSubtotalOneOf {
|
|
880
|
+
/** Limit the coupon to carts with a subtotal above this number. */
|
|
881
|
+
minimumSubtotal?: number;
|
|
882
|
+
/** Specifies the type of line items this coupon will apply to. */
|
|
883
|
+
scope?: CouponScope;
|
|
884
|
+
}
|
|
885
|
+
declare enum DiscountType {
|
|
886
|
+
UNKNOWN = "UNKNOWN",
|
|
887
|
+
/** Discount as a fixed amount */
|
|
888
|
+
FIXED_AMOUNT = "FIXED_AMOUNT",
|
|
889
|
+
/** Discount as a percentage */
|
|
890
|
+
PERCENTAGE = "PERCENTAGE",
|
|
891
|
+
/** Free shipping */
|
|
892
|
+
FREE_SHIPPING = "FREE_SHIPPING"
|
|
893
|
+
}
|
|
894
|
+
interface FixedAmountDiscount {
|
|
895
|
+
/** Fixed amount to discount */
|
|
896
|
+
amount?: number;
|
|
897
|
+
}
|
|
898
|
+
interface PercentageDiscount {
|
|
899
|
+
percentage?: number;
|
|
900
|
+
}
|
|
901
|
+
interface CouponScope {
|
|
902
|
+
namespace?: string;
|
|
903
|
+
group?: Group;
|
|
904
|
+
}
|
|
905
|
+
interface Group {
|
|
906
|
+
name?: string;
|
|
907
|
+
entityId?: string | null;
|
|
908
|
+
}
|
|
909
|
+
interface LoyaltyPoints {
|
|
910
|
+
/**
|
|
911
|
+
* Loyalty transaction id
|
|
912
|
+
* @readonly
|
|
913
|
+
*/
|
|
914
|
+
transactionId?: string;
|
|
915
|
+
/**
|
|
916
|
+
* Loyalty points amount given
|
|
917
|
+
* @readonly
|
|
918
|
+
*/
|
|
919
|
+
amount?: number;
|
|
920
|
+
}
|
|
921
|
+
interface GetReferralEventResponseNonNullableFields {
|
|
922
|
+
referralEvent?: {
|
|
923
|
+
referredFriendSignupEvent?: {
|
|
924
|
+
referredFriendId: string;
|
|
925
|
+
};
|
|
926
|
+
successfulReferralEvent?: {
|
|
927
|
+
referredFriendId: string;
|
|
928
|
+
referringCustomerId: string;
|
|
929
|
+
};
|
|
930
|
+
actionEvent?: {
|
|
931
|
+
referredFriendId: string;
|
|
932
|
+
referringCustomerId: string;
|
|
933
|
+
trigger?: {
|
|
934
|
+
appId: string;
|
|
935
|
+
activityType: string;
|
|
936
|
+
};
|
|
937
|
+
};
|
|
938
|
+
rewardEvent?: {
|
|
939
|
+
rewardedReferringCustomerId: string;
|
|
940
|
+
rewardedReferredFriendId: string;
|
|
941
|
+
referralRewardId: string;
|
|
942
|
+
rewardType: Reward;
|
|
943
|
+
};
|
|
944
|
+
};
|
|
945
|
+
}
|
|
946
|
+
interface QueryReferralEventResponseNonNullableFields {
|
|
947
|
+
referralEvents: {
|
|
948
|
+
referredFriendSignupEvent?: {
|
|
949
|
+
referredFriendId: string;
|
|
950
|
+
};
|
|
951
|
+
successfulReferralEvent?: {
|
|
952
|
+
referredFriendId: string;
|
|
953
|
+
referringCustomerId: string;
|
|
954
|
+
};
|
|
955
|
+
actionEvent?: {
|
|
956
|
+
referredFriendId: string;
|
|
957
|
+
referringCustomerId: string;
|
|
958
|
+
trigger?: {
|
|
959
|
+
appId: string;
|
|
960
|
+
activityType: string;
|
|
961
|
+
};
|
|
962
|
+
};
|
|
963
|
+
rewardEvent?: {
|
|
964
|
+
rewardedReferringCustomerId: string;
|
|
965
|
+
rewardedReferredFriendId: string;
|
|
966
|
+
referralRewardId: string;
|
|
967
|
+
rewardType: Reward;
|
|
968
|
+
};
|
|
969
|
+
}[];
|
|
970
|
+
}
|
|
971
|
+
interface GetReferralStatisticsResponseNonNullableFields {
|
|
972
|
+
totalSignUpsCompleted: number;
|
|
973
|
+
totalActionsCompleted: number;
|
|
974
|
+
totalAmountGenerated: string;
|
|
975
|
+
}
|
|
976
|
+
interface QueryReferringCustomerTotalsResponseNonNullableFields {
|
|
977
|
+
referringCustomerTotals: {
|
|
978
|
+
referringCustomerId: string;
|
|
979
|
+
contactId: string;
|
|
980
|
+
totalSuccessfulReferrals: number;
|
|
981
|
+
totalAmountGenerated: string;
|
|
982
|
+
totalFriendsWithActions: number;
|
|
983
|
+
}[];
|
|
984
|
+
}
|
|
985
|
+
interface QueryReferredFriendActionsResponseNonNullableFields {
|
|
986
|
+
referredFriendActions: {
|
|
987
|
+
coupon?: {
|
|
988
|
+
_id: string;
|
|
989
|
+
code: string;
|
|
990
|
+
status: Status;
|
|
991
|
+
couponSpecification?: {
|
|
992
|
+
fixedAmountOptions?: {
|
|
993
|
+
amount: number;
|
|
994
|
+
};
|
|
995
|
+
percentageOptions?: {
|
|
996
|
+
percentage: number;
|
|
997
|
+
};
|
|
998
|
+
minimumSubtotal: number;
|
|
999
|
+
scope?: {
|
|
1000
|
+
namespace: string;
|
|
1001
|
+
group?: {
|
|
1002
|
+
name: string;
|
|
1003
|
+
};
|
|
1004
|
+
};
|
|
1005
|
+
name: string;
|
|
1006
|
+
discountType: DiscountType;
|
|
1007
|
+
};
|
|
1008
|
+
};
|
|
1009
|
+
loyaltyPoints?: {
|
|
1010
|
+
transactionId: string;
|
|
1011
|
+
amount: number;
|
|
1012
|
+
};
|
|
1013
|
+
referredFriendId: string;
|
|
1014
|
+
contactId: string;
|
|
1015
|
+
trigger?: {
|
|
1016
|
+
appId: string;
|
|
1017
|
+
activityType: string;
|
|
1018
|
+
};
|
|
1019
|
+
rewardType: Reward;
|
|
1020
|
+
totalActions: number;
|
|
1021
|
+
totalAmountSpent: string;
|
|
1022
|
+
}[];
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
1026
|
+
getUrl: (context: any) => string;
|
|
1027
|
+
httpMethod: K;
|
|
1028
|
+
path: string;
|
|
1029
|
+
pathParams: M;
|
|
1030
|
+
__requestType: T;
|
|
1031
|
+
__originalRequestType: S;
|
|
1032
|
+
__responseType: Q;
|
|
1033
|
+
__originalResponseType: R;
|
|
1034
|
+
};
|
|
1035
|
+
declare function getReferralEvent(): __PublicMethodMetaInfo<'GET', {
|
|
1036
|
+
referralEventId: string;
|
|
1037
|
+
}, GetReferralEventRequest, GetReferralEventRequest$1, GetReferralEventResponse & GetReferralEventResponseNonNullableFields, GetReferralEventResponse$1 & GetReferralEventResponseNonNullableFields$1>;
|
|
1038
|
+
declare function queryReferralEvent(): __PublicMethodMetaInfo<'POST', {}, QueryReferralEventRequest, QueryReferralEventRequest$1, QueryReferralEventResponse & QueryReferralEventResponseNonNullableFields, QueryReferralEventResponse$1 & QueryReferralEventResponseNonNullableFields$1>;
|
|
1039
|
+
declare function getReferralStatistics(): __PublicMethodMetaInfo<'GET', {}, GetReferralStatisticsRequest, GetReferralStatisticsRequest$1, GetReferralStatisticsResponse & GetReferralStatisticsResponseNonNullableFields, GetReferralStatisticsResponse$1 & GetReferralStatisticsResponseNonNullableFields$1>;
|
|
1040
|
+
declare function queryReferringCustomerTotals(): __PublicMethodMetaInfo<'POST', {}, QueryReferringCustomerTotalsRequest, QueryReferringCustomerTotalsRequest$1, QueryReferringCustomerTotalsResponse & QueryReferringCustomerTotalsResponseNonNullableFields, QueryReferringCustomerTotalsResponse$1 & QueryReferringCustomerTotalsResponseNonNullableFields$1>;
|
|
1041
|
+
declare function queryReferredFriendActions(): __PublicMethodMetaInfo<'POST', {}, QueryReferredFriendActionsRequest, QueryReferredFriendActionsRequest$1, QueryReferredFriendActionsResponse & QueryReferredFriendActionsResponseNonNullableFields, QueryReferredFriendActionsResponse$1 & QueryReferredFriendActionsResponseNonNullableFields$1>;
|
|
1042
|
+
|
|
1043
|
+
type meta___PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = __PublicMethodMetaInfo<K, M, T, S, Q, R>;
|
|
1044
|
+
declare const meta_getReferralEvent: typeof getReferralEvent;
|
|
1045
|
+
declare const meta_getReferralStatistics: typeof getReferralStatistics;
|
|
1046
|
+
declare const meta_queryReferralEvent: typeof queryReferralEvent;
|
|
1047
|
+
declare const meta_queryReferredFriendActions: typeof queryReferredFriendActions;
|
|
1048
|
+
declare const meta_queryReferringCustomerTotals: typeof queryReferringCustomerTotals;
|
|
1049
|
+
declare namespace meta {
|
|
1050
|
+
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 };
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
export { meta as tracker };
|