@wix/referral 1.0.3 → 1.0.5
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 -1
- package/build/cjs/context.js +2 -2
- package/build/cjs/context.js.map +1 -1
- package/build/cjs/index.d.ts +1 -1
- package/build/cjs/index.js +2 -2
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/meta.d.ts +1 -1
- package/build/cjs/meta.js +2 -2
- package/build/cjs/meta.js.map +1 -1
- package/build/es/context.d.ts +1 -1
- package/build/es/context.js +1 -1
- package/build/es/context.js.map +1 -1
- package/build/es/index.d.ts +1 -1
- package/build/es/index.js +1 -1
- package/build/es/index.js.map +1 -1
- package/build/es/meta.d.ts +1 -1
- package/build/es/meta.js +1 -1
- package/build/es/meta.js.map +1 -1
- package/package.json +4 -4
- package/type-bundles/context.bundle.d.ts +652 -963
- package/type-bundles/index.bundle.d.ts +880 -2113
- package/type-bundles/meta.bundle.d.ts +863 -1469
|
@@ -1,198 +1,129 @@
|
|
|
1
|
-
/**
|
|
2
|
-
interface
|
|
3
|
-
/**
|
|
4
|
-
|
|
1
|
+
/** ReferralEvent. */
|
|
2
|
+
interface ReferralEvent extends ReferralEventEventTypeOneOf {
|
|
3
|
+
/** ReferredFriendSignupEvent is an event that is triggered when a referred friend signs up. */
|
|
4
|
+
referredFriendSignupEvent?: ReferredFriendSignupEvent;
|
|
5
|
+
/** SuccessfulReferralEvent is an event that is triggered when a referral is successful. */
|
|
6
|
+
successfulReferralEvent?: V1SuccessfulReferralEvent;
|
|
7
|
+
/** ActionEvent is an event that is triggered when an action is performed. */
|
|
8
|
+
actionEvent?: V1ActionEvent;
|
|
9
|
+
/** RewardEvent is an event that is triggered when a reward is given. */
|
|
10
|
+
rewardEvent?: RewardEvent;
|
|
5
11
|
/**
|
|
6
|
-
*
|
|
12
|
+
* ReferralEvent ID.
|
|
7
13
|
* @readonly
|
|
8
14
|
*/
|
|
9
|
-
|
|
15
|
+
_id?: string | null;
|
|
10
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. */
|
|
11
17
|
revision?: string | null;
|
|
12
18
|
/**
|
|
13
|
-
*
|
|
19
|
+
* Represents the time this ReferralEvent was created.
|
|
14
20
|
* @readonly
|
|
15
21
|
*/
|
|
16
22
|
_createdDate?: Date;
|
|
17
23
|
/**
|
|
18
|
-
*
|
|
24
|
+
* Represents the time this ReferralEvent was last updated.
|
|
19
25
|
* @readonly
|
|
20
26
|
*/
|
|
21
27
|
_updatedDate?: Date;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
}
|
|
29
|
+
/** @oneof */
|
|
30
|
+
interface ReferralEventEventTypeOneOf {
|
|
31
|
+
/** ReferredFriendSignupEvent is an event that is triggered when a referred friend signs up. */
|
|
32
|
+
referredFriendSignupEvent?: ReferredFriendSignupEvent;
|
|
33
|
+
/** SuccessfulReferralEvent is an event that is triggered when a referral is successful. */
|
|
34
|
+
successfulReferralEvent?: V1SuccessfulReferralEvent;
|
|
35
|
+
/** ActionEvent is an event that is triggered when an action is performed. */
|
|
36
|
+
actionEvent?: V1ActionEvent;
|
|
37
|
+
/** RewardEvent is an event that is triggered when a reward is given. */
|
|
38
|
+
rewardEvent?: RewardEvent;
|
|
39
|
+
}
|
|
40
|
+
interface ReferredFriendSignupEvent {
|
|
41
|
+
/** The referred friend ID. */
|
|
42
|
+
referredFriendId?: string;
|
|
43
|
+
}
|
|
44
|
+
interface V1SuccessfulReferralEvent {
|
|
45
|
+
/** The referred friend ID. */
|
|
46
|
+
referredFriendId?: string;
|
|
47
|
+
/** The referring customer ID. */
|
|
48
|
+
referringCustomerId?: string;
|
|
49
|
+
}
|
|
50
|
+
interface V1ActionEvent {
|
|
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;
|
|
57
|
+
/** Amount. */
|
|
58
|
+
amount?: string | null;
|
|
59
|
+
/** Currency. */
|
|
60
|
+
currency?: string | null;
|
|
61
|
+
/** Order ID. */
|
|
62
|
+
orderId?: string | null;
|
|
63
|
+
}
|
|
64
|
+
interface V1Trigger {
|
|
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 extends RewardEventReceiverOneOf {
|
|
28
71
|
/**
|
|
29
|
-
*
|
|
72
|
+
* The referring customer ID.
|
|
30
73
|
* @readonly
|
|
31
|
-
* @deprecated Set to true if user has required plan to activate program.
|
|
32
|
-
* @replacedBy GetReferralProgramPremiumFeatures
|
|
33
|
-
* @removalDate 2024-09-01
|
|
34
74
|
*/
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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$1 extends RewardOptionsOneOf {
|
|
50
|
-
/** Options for coupon reward type. */
|
|
51
|
-
couponOptions?: Coupon$1;
|
|
52
|
-
/** Options for Loyalty points reward type. */
|
|
53
|
-
loyaltyPointsOptions?: LoyaltyPoints$1;
|
|
54
|
-
/** Type of the reward. */
|
|
55
|
-
type?: Type;
|
|
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;
|
|
56
85
|
}
|
|
57
86
|
/** @oneof */
|
|
58
|
-
interface
|
|
59
|
-
/**
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
87
|
+
interface RewardEventReceiverOneOf {
|
|
88
|
+
/**
|
|
89
|
+
* The referring customer ID.
|
|
90
|
+
* @readonly
|
|
91
|
+
*/
|
|
92
|
+
rewardedReferringCustomerId?: string;
|
|
93
|
+
/**
|
|
94
|
+
* The referred friend ID.
|
|
95
|
+
* @readonly
|
|
96
|
+
*/
|
|
97
|
+
rewardedReferredFriendId?: string;
|
|
63
98
|
}
|
|
64
|
-
declare enum
|
|
99
|
+
declare enum Reward$1 {
|
|
65
100
|
/** Unknown reward type. */
|
|
66
101
|
UNKNOWN = "UNKNOWN",
|
|
67
|
-
/**
|
|
102
|
+
/** Reward is a coupon. */
|
|
68
103
|
COUPON = "COUPON",
|
|
69
|
-
/**
|
|
104
|
+
/** Reward is loyalty points. */
|
|
70
105
|
LOYALTY_POINTS = "LOYALTY_POINTS",
|
|
71
|
-
/** No reward
|
|
106
|
+
/** No reward. */
|
|
72
107
|
NOTHING = "NOTHING"
|
|
73
108
|
}
|
|
74
|
-
interface
|
|
75
|
-
/**
|
|
76
|
-
|
|
77
|
-
/** Options for percentage discount type. */
|
|
78
|
-
percentageOptions?: PercentageDiscount$1;
|
|
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$1;
|
|
83
|
-
/** Coupon name. */
|
|
84
|
-
name?: string;
|
|
85
|
-
/** Coupon discount type. */
|
|
86
|
-
discountType?: DiscountType$1;
|
|
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;
|
|
93
|
-
}
|
|
94
|
-
/** @oneof */
|
|
95
|
-
interface CouponDiscountTypeOptionsOneOf$1 {
|
|
96
|
-
/** Options for fixed amount discount type. */
|
|
97
|
-
fixedAmountOptions?: FixedAmountDiscount$1;
|
|
98
|
-
/** Options for percentage discount type. */
|
|
99
|
-
percentageOptions?: PercentageDiscount$1;
|
|
100
|
-
}
|
|
101
|
-
/** @oneof */
|
|
102
|
-
interface CouponScopeOrMinSubtotalOneOf$1 {
|
|
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$1;
|
|
107
|
-
}
|
|
108
|
-
declare enum DiscountType$1 {
|
|
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$1 {
|
|
119
|
-
/** Fixed amount to discount. */
|
|
120
|
-
amount?: number;
|
|
121
|
-
}
|
|
122
|
-
interface PercentageDiscount$1 {
|
|
123
|
-
/** Percentage to discount. */
|
|
124
|
-
percentage?: number;
|
|
125
|
-
}
|
|
126
|
-
interface CouponScope$1 {
|
|
127
|
-
/** Namespace of the coupon scope. */
|
|
128
|
-
namespace?: string;
|
|
129
|
-
/** Group of the coupon scope. */
|
|
130
|
-
group?: Group$1;
|
|
109
|
+
interface CreateReferralEventRequest {
|
|
110
|
+
/** ReferralEvent to be created */
|
|
111
|
+
referralEvent?: ReferralEvent;
|
|
131
112
|
}
|
|
132
|
-
interface
|
|
133
|
-
/**
|
|
134
|
-
|
|
135
|
-
/** Entity ID of the group. */
|
|
136
|
-
entityId?: string | null;
|
|
113
|
+
interface CreateReferralEventResponse {
|
|
114
|
+
/** The created ReferralEvent */
|
|
115
|
+
referralEvent?: ReferralEvent;
|
|
137
116
|
}
|
|
138
|
-
interface
|
|
139
|
-
/**
|
|
140
|
-
|
|
117
|
+
interface GetReferralEventRequest {
|
|
118
|
+
/** Id of the ReferralEvent to retrieve */
|
|
119
|
+
referralEventId: string;
|
|
141
120
|
}
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
|
|
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 {
|
|
157
|
-
/** Encourage customers to refer their friends email. Select for which apps to enable. */
|
|
158
|
-
encourageToReferFriends?: App[];
|
|
159
|
-
/** Notify customers about their referral reward email. Set true to enable email. */
|
|
160
|
-
notifyCustomersAboutReward?: boolean;
|
|
161
|
-
}
|
|
162
|
-
declare enum App {
|
|
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 {
|
|
177
|
-
}
|
|
178
|
-
interface GetReferralProgramResponse {
|
|
179
|
-
/** The retrieved ReferralProgram. */
|
|
180
|
-
referralProgram?: ReferralProgram;
|
|
181
|
-
}
|
|
182
|
-
interface BulkGetReferralProgramRequest {
|
|
183
|
-
}
|
|
184
|
-
interface BulkGetReferralProgramResponse {
|
|
185
|
-
/** Referral programs. */
|
|
186
|
-
programInSites?: ProgramInSite[];
|
|
187
|
-
}
|
|
188
|
-
interface ProgramInSite {
|
|
189
|
-
/** Metasite ID. */
|
|
190
|
-
metaSiteId?: string;
|
|
191
|
-
/** Referral program. */
|
|
192
|
-
referralProgram?: ReferralProgram;
|
|
121
|
+
interface GetReferralEventResponse {
|
|
122
|
+
/** The retrieved ReferralEvent */
|
|
123
|
+
referralEvent?: ReferralEvent;
|
|
193
124
|
}
|
|
194
|
-
interface
|
|
195
|
-
/** Query to filter
|
|
125
|
+
interface QueryReferralEventRequest {
|
|
126
|
+
/** Query to filter ReferralEvents. */
|
|
196
127
|
query: CursorQuery$3;
|
|
197
128
|
}
|
|
198
129
|
interface CursorQuery$3 extends CursorQueryPagingMethodOneOf$3 {
|
|
@@ -239,11 +170,11 @@ interface CursorPaging$3 {
|
|
|
239
170
|
*/
|
|
240
171
|
cursor?: string | null;
|
|
241
172
|
}
|
|
242
|
-
interface
|
|
243
|
-
/**
|
|
244
|
-
|
|
173
|
+
interface QueryReferralEventResponse {
|
|
174
|
+
/** List of ReferralEvents that match the query. */
|
|
175
|
+
referralEvents?: ReferralEvent[];
|
|
245
176
|
/** Paging metadata. */
|
|
246
|
-
|
|
177
|
+
metadata?: CursorPagingMetadata$3;
|
|
247
178
|
}
|
|
248
179
|
interface CursorPagingMetadata$3 {
|
|
249
180
|
/** Number of items returned in the response. */
|
|
@@ -264,956 +195,336 @@ interface Cursors$3 {
|
|
|
264
195
|
/** Cursor pointing to the previous page in the list of results. */
|
|
265
196
|
prev?: string | null;
|
|
266
197
|
}
|
|
267
|
-
interface
|
|
268
|
-
/** ReferralProgram to be updated, may be partial. */
|
|
269
|
-
referralProgram: ReferralProgram;
|
|
270
|
-
}
|
|
271
|
-
interface UpdateReferralProgramResponse {
|
|
272
|
-
/** The updated ReferralProgram. */
|
|
273
|
-
referralProgram?: ReferralProgram;
|
|
274
|
-
}
|
|
275
|
-
interface ActivateReferralProgramRequest {
|
|
276
|
-
}
|
|
277
|
-
interface ActivateReferralProgramResponse {
|
|
278
|
-
/** The activated ReferralProgram. */
|
|
279
|
-
referralProgram?: ReferralProgram;
|
|
280
|
-
}
|
|
281
|
-
interface PauseReferralProgramRequest {
|
|
282
|
-
}
|
|
283
|
-
interface PauseReferralProgramResponse {
|
|
284
|
-
/** The paused ReferralProgram. */
|
|
285
|
-
referralProgram?: ReferralProgram;
|
|
286
|
-
}
|
|
287
|
-
interface GetAISocialMediaPostsSuggestionsRequest {
|
|
288
|
-
/** The topic to generate suggestions for. */
|
|
289
|
-
topic?: string;
|
|
290
|
-
}
|
|
291
|
-
interface GetAISocialMediaPostsSuggestionsResponse {
|
|
292
|
-
/** The generated suggestions. */
|
|
293
|
-
suggestions?: AISocialMediaPostSuggestion[];
|
|
294
|
-
/** The refer friends page URL. */
|
|
295
|
-
referFriendsPageUrl?: string | null;
|
|
296
|
-
}
|
|
297
|
-
interface AISocialMediaPostSuggestion {
|
|
298
|
-
/** The suggested post content. */
|
|
299
|
-
postContent?: string;
|
|
300
|
-
/** The suggested hashtags. */
|
|
301
|
-
hashtags?: string[];
|
|
198
|
+
interface GetReferralStatisticsRequest {
|
|
302
199
|
}
|
|
303
|
-
interface
|
|
304
|
-
/**
|
|
305
|
-
|
|
200
|
+
interface GetReferralStatisticsResponse {
|
|
201
|
+
/** Total sign ups completed by referred friends */
|
|
202
|
+
totalSignUpsCompleted?: number;
|
|
203
|
+
/** Total actions completed by referred friends */
|
|
204
|
+
totalActionsCompleted?: number;
|
|
205
|
+
/** Total amount of purchases made by referred friends */
|
|
206
|
+
totalAmountGenerated?: string;
|
|
306
207
|
}
|
|
307
|
-
interface
|
|
308
|
-
/**
|
|
309
|
-
|
|
310
|
-
/**
|
|
311
|
-
|
|
208
|
+
interface QueryReferringCustomerTotalsRequest {
|
|
209
|
+
/** Query to filter ReferringCustomerTotals. */
|
|
210
|
+
query?: CursorQuery$3;
|
|
211
|
+
/** List of contact ids to filter ReferringCustomerTotals. */
|
|
212
|
+
contactIds?: string[];
|
|
312
213
|
}
|
|
313
|
-
interface
|
|
214
|
+
interface QueryReferringCustomerTotalsResponse {
|
|
215
|
+
/** List of ReferringCustomerTotals that match the query. */
|
|
216
|
+
referringCustomerTotals?: ReferringCustomerTotal[];
|
|
217
|
+
/** Paging metadata. */
|
|
218
|
+
metadata?: CursorPagingMetadata$3;
|
|
314
219
|
}
|
|
315
|
-
interface
|
|
220
|
+
interface ReferringCustomerTotal {
|
|
316
221
|
/**
|
|
317
|
-
*
|
|
222
|
+
* Referring customer id.
|
|
318
223
|
* @readonly
|
|
319
224
|
*/
|
|
320
|
-
|
|
321
|
-
}
|
|
322
|
-
interface DomainEvent$3 extends DomainEventBodyOneOf$3 {
|
|
323
|
-
createdEvent?: EntityCreatedEvent$3;
|
|
324
|
-
updatedEvent?: EntityUpdatedEvent$3;
|
|
325
|
-
deletedEvent?: EntityDeletedEvent$3;
|
|
326
|
-
actionEvent?: ActionEvent$3;
|
|
225
|
+
referringCustomerId?: string;
|
|
327
226
|
/**
|
|
328
|
-
*
|
|
329
|
-
*
|
|
227
|
+
* Contact id.
|
|
228
|
+
* @readonly
|
|
330
229
|
*/
|
|
331
|
-
|
|
230
|
+
contactId?: string;
|
|
332
231
|
/**
|
|
333
|
-
*
|
|
334
|
-
*
|
|
232
|
+
* Last successful referral date.
|
|
233
|
+
* @readonly
|
|
335
234
|
*/
|
|
336
|
-
|
|
235
|
+
lastSuccessfulReferral?: Date;
|
|
337
236
|
/**
|
|
338
|
-
*
|
|
339
|
-
*
|
|
340
|
-
* Example: created/updated/deleted/started/completed/email_opened
|
|
237
|
+
* Total successful referrals made by this customer.
|
|
238
|
+
* @readonly
|
|
341
239
|
*/
|
|
342
|
-
|
|
343
|
-
/** ID of the entity associated with the event. */
|
|
344
|
-
entityId?: string;
|
|
345
|
-
/** Event timestamp. */
|
|
346
|
-
eventTime?: Date;
|
|
240
|
+
totalSuccessfulReferrals?: number;
|
|
347
241
|
/**
|
|
348
|
-
*
|
|
349
|
-
*
|
|
242
|
+
* Total amount generated by friends referred by this customer.
|
|
243
|
+
* @readonly
|
|
350
244
|
*/
|
|
351
|
-
|
|
352
|
-
/** If present, indicates the action that triggered the event. */
|
|
353
|
-
originatedFrom?: string | null;
|
|
245
|
+
totalAmountGenerated?: string;
|
|
354
246
|
/**
|
|
355
|
-
*
|
|
356
|
-
*
|
|
357
|
-
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
358
|
-
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
359
|
-
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
360
|
-
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
247
|
+
* Last friend action date.
|
|
248
|
+
* @readonly
|
|
361
249
|
*/
|
|
362
|
-
|
|
363
|
-
}
|
|
364
|
-
/** @oneof */
|
|
365
|
-
interface DomainEventBodyOneOf$3 {
|
|
366
|
-
createdEvent?: EntityCreatedEvent$3;
|
|
367
|
-
updatedEvent?: EntityUpdatedEvent$3;
|
|
368
|
-
deletedEvent?: EntityDeletedEvent$3;
|
|
369
|
-
actionEvent?: ActionEvent$3;
|
|
370
|
-
}
|
|
371
|
-
interface EntityCreatedEvent$3 {
|
|
372
|
-
entity?: string;
|
|
373
|
-
}
|
|
374
|
-
interface UndeleteInfo$3 {
|
|
375
|
-
deletedDate?: Date;
|
|
376
|
-
}
|
|
377
|
-
interface EntityUpdatedEvent$3 {
|
|
250
|
+
lastFriendAction?: Date;
|
|
378
251
|
/**
|
|
379
|
-
*
|
|
380
|
-
*
|
|
381
|
-
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
252
|
+
* Total friends that have actions done.
|
|
253
|
+
* @readonly
|
|
382
254
|
*/
|
|
383
|
-
|
|
255
|
+
totalFriendsWithActions?: number;
|
|
384
256
|
}
|
|
385
|
-
interface
|
|
386
|
-
/**
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
body?: string;
|
|
391
|
-
}
|
|
392
|
-
interface Empty$2 {
|
|
393
|
-
}
|
|
394
|
-
interface MetaSiteSpecialEvent extends MetaSiteSpecialEventPayloadOneOf {
|
|
395
|
-
/** Emitted on a meta site creation. */
|
|
396
|
-
siteCreated?: SiteCreated;
|
|
397
|
-
/** Emitted on a meta site transfer completion. */
|
|
398
|
-
siteTransferred?: SiteTransferred;
|
|
399
|
-
/** Emitted on a meta site deletion. */
|
|
400
|
-
siteDeleted?: SiteDeleted;
|
|
401
|
-
/** Emitted on a meta site restoration. */
|
|
402
|
-
siteUndeleted?: SiteUndeleted;
|
|
403
|
-
/** Emitted on the first* publish of the meta site (* switching from unpublished to published state). */
|
|
404
|
-
sitePublished?: SitePublished;
|
|
405
|
-
/** Emitted on a meta site unpublish. */
|
|
406
|
-
siteUnpublished?: SiteUnpublished;
|
|
407
|
-
/** Emitted when meta site is marked as template. */
|
|
408
|
-
siteMarkedAsTemplate?: SiteMarkedAsTemplate;
|
|
409
|
-
/** Emitted when meta site is marked as a WixSite. */
|
|
410
|
-
siteMarkedAsWixSite?: SiteMarkedAsWixSite;
|
|
411
|
-
/** Emitted when an application is provisioned (installed). */
|
|
412
|
-
serviceProvisioned?: ServiceProvisioned;
|
|
413
|
-
/** Emitted when an application is removed (uninstalled). */
|
|
414
|
-
serviceRemoved?: ServiceRemoved;
|
|
415
|
-
/** Emitted when meta site name (URL slug) is changed. */
|
|
416
|
-
siteRenamedPayload?: SiteRenamed;
|
|
417
|
-
/** Emitted when meta site was permanently deleted. */
|
|
418
|
-
hardDeleted?: SiteHardDeleted;
|
|
419
|
-
/** Emitted on a namespace change. */
|
|
420
|
-
namespaceChanged?: NamespaceChanged;
|
|
421
|
-
/** Emitted when Studio is attached. */
|
|
422
|
-
studioAssigned?: StudioAssigned;
|
|
423
|
-
/** Emitted when Studio is detached. */
|
|
424
|
-
studioUnassigned?: StudioUnassigned;
|
|
425
|
-
/** A meta site id. */
|
|
426
|
-
metaSiteId?: string;
|
|
427
|
-
/** A meta site version. Monotonically increasing. */
|
|
428
|
-
version?: string;
|
|
429
|
-
/** A timestamp of the event. */
|
|
430
|
-
timestamp?: string;
|
|
431
|
-
/** A list of "assets" (applications). The same as MetaSiteContext. */
|
|
432
|
-
assets?: Asset[];
|
|
257
|
+
interface QueryReferredFriendActionsRequest {
|
|
258
|
+
/** Query to filter ReferredFriendActions. */
|
|
259
|
+
query?: CursorQuery$3;
|
|
260
|
+
/** List of contact ids to filter ReferredFriendActions. */
|
|
261
|
+
contactIds?: string[];
|
|
433
262
|
}
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
siteTransferred?: SiteTransferred;
|
|
440
|
-
/** Emitted on a meta site deletion. */
|
|
441
|
-
siteDeleted?: SiteDeleted;
|
|
442
|
-
/** Emitted on a meta site restoration. */
|
|
443
|
-
siteUndeleted?: SiteUndeleted;
|
|
444
|
-
/** Emitted on the first* publish of the meta site (* switching from unpublished to published state). */
|
|
445
|
-
sitePublished?: SitePublished;
|
|
446
|
-
/** Emitted on a meta site unpublish. */
|
|
447
|
-
siteUnpublished?: SiteUnpublished;
|
|
448
|
-
/** Emitted when meta site is marked as template. */
|
|
449
|
-
siteMarkedAsTemplate?: SiteMarkedAsTemplate;
|
|
450
|
-
/** Emitted when meta site is marked as a WixSite. */
|
|
451
|
-
siteMarkedAsWixSite?: SiteMarkedAsWixSite;
|
|
452
|
-
/** Emitted when an application is provisioned (installed). */
|
|
453
|
-
serviceProvisioned?: ServiceProvisioned;
|
|
454
|
-
/** Emitted when an application is removed (uninstalled). */
|
|
455
|
-
serviceRemoved?: ServiceRemoved;
|
|
456
|
-
/** Emitted when meta site name (URL slug) is changed. */
|
|
457
|
-
siteRenamedPayload?: SiteRenamed;
|
|
458
|
-
/** Emitted when meta site was permanently deleted. */
|
|
459
|
-
hardDeleted?: SiteHardDeleted;
|
|
460
|
-
/** Emitted on a namespace change. */
|
|
461
|
-
namespaceChanged?: NamespaceChanged;
|
|
462
|
-
/** Emitted when Studio is attached. */
|
|
463
|
-
studioAssigned?: StudioAssigned;
|
|
464
|
-
/** Emitted when Studio is detached. */
|
|
465
|
-
studioUnassigned?: StudioUnassigned;
|
|
466
|
-
}
|
|
467
|
-
interface Asset {
|
|
468
|
-
/** An application definition id (app_id in dev-center). For legacy reasons may be UUID or a string (from Java Enum). */
|
|
469
|
-
appDefId?: string;
|
|
470
|
-
/** An instance id. For legacy reasons may be UUID or a string. */
|
|
471
|
-
instanceId?: string;
|
|
472
|
-
/** An application state. */
|
|
473
|
-
state?: State;
|
|
474
|
-
}
|
|
475
|
-
declare enum State {
|
|
476
|
-
UNKNOWN = "UNKNOWN",
|
|
477
|
-
ENABLED = "ENABLED",
|
|
478
|
-
DISABLED = "DISABLED",
|
|
479
|
-
PENDING = "PENDING",
|
|
480
|
-
DEMO = "DEMO"
|
|
481
|
-
}
|
|
482
|
-
interface SiteCreated {
|
|
483
|
-
/** A template identifier (empty if not created from a template). */
|
|
484
|
-
originTemplateId?: string;
|
|
485
|
-
/** An account id of the owner. */
|
|
486
|
-
ownerId?: string;
|
|
487
|
-
/** A context in which meta site was created. */
|
|
488
|
-
context?: SiteCreatedContext;
|
|
489
|
-
/**
|
|
490
|
-
* A meta site id from which this site was created.
|
|
491
|
-
*
|
|
492
|
-
* In case of a creation from a template it's a template id.
|
|
493
|
-
* In case of a site duplication ("Save As" in dashboard or duplicate in UM) it's an id of a source site.
|
|
494
|
-
*/
|
|
495
|
-
originMetaSiteId?: string | null;
|
|
496
|
-
/** A meta site name (URL slug). */
|
|
497
|
-
siteName?: string;
|
|
498
|
-
/** A namespace. */
|
|
499
|
-
namespace?: Namespace;
|
|
500
|
-
}
|
|
501
|
-
declare enum SiteCreatedContext {
|
|
502
|
-
/** A valid option, we don't expose all reasons why site might be created. */
|
|
503
|
-
OTHER = "OTHER",
|
|
504
|
-
/** A meta site was created from template. */
|
|
505
|
-
FROM_TEMPLATE = "FROM_TEMPLATE",
|
|
506
|
-
/** A meta site was created by copying of the transfferred meta site. */
|
|
507
|
-
DUPLICATE_BY_SITE_TRANSFER = "DUPLICATE_BY_SITE_TRANSFER",
|
|
508
|
-
/** A copy of existing meta site. */
|
|
509
|
-
DUPLICATE = "DUPLICATE",
|
|
510
|
-
/** A meta site was created as a transfferred site (copy of the original), old flow, should die soon. */
|
|
511
|
-
OLD_SITE_TRANSFER = "OLD_SITE_TRANSFER",
|
|
512
|
-
/** deprecated A meta site was created for Flash editor. */
|
|
513
|
-
FLASH = "FLASH"
|
|
514
|
-
}
|
|
515
|
-
declare enum Namespace {
|
|
516
|
-
UNKNOWN_NAMESPACE = "UNKNOWN_NAMESPACE",
|
|
517
|
-
/** Default namespace for UGC sites. MetaSites with this namespace will be shown in a user's site list by default. */
|
|
518
|
-
WIX = "WIX",
|
|
519
|
-
/** ShoutOut stand alone product. These are siteless (no actual Wix site, no HtmlWeb). MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
520
|
-
SHOUT_OUT = "SHOUT_OUT",
|
|
521
|
-
/** MetaSites created by the Albums product, they appear as part of the Albums app. MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
522
|
-
ALBUMS = "ALBUMS",
|
|
523
|
-
/** Part of the WixStores migration flow, a user tries to migrate and gets this site to view and if the user likes it then stores removes this namespace and deletes the old site with the old stores. MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
524
|
-
WIX_STORES_TEST_DRIVE = "WIX_STORES_TEST_DRIVE",
|
|
525
|
-
/** Hotels standalone (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
526
|
-
HOTELS = "HOTELS",
|
|
527
|
-
/** Clubs siteless MetaSites, a club without a wix website. MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
528
|
-
CLUBS = "CLUBS",
|
|
529
|
-
/** A partially created ADI website. MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
530
|
-
ONBOARDING_DRAFT = "ONBOARDING_DRAFT",
|
|
531
|
-
/** AppBuilder for AppStudio / shmite (c). MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
532
|
-
DEV_SITE = "DEV_SITE",
|
|
533
|
-
/** LogoMaker websites offered to the user after logo purchase. MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
534
|
-
LOGOS = "LOGOS",
|
|
535
|
-
/** VideoMaker websites offered to the user after video purchase. MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
536
|
-
VIDEO_MAKER = "VIDEO_MAKER",
|
|
537
|
-
/** MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
538
|
-
PARTNER_DASHBOARD = "PARTNER_DASHBOARD",
|
|
539
|
-
/** MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
540
|
-
DEV_CENTER_COMPANY = "DEV_CENTER_COMPANY",
|
|
541
|
-
/**
|
|
542
|
-
* A draft created by HTML editor on open. Upon "first save" it will be moved to be of WIX domain.
|
|
543
|
-
*
|
|
544
|
-
* Meta site with this namespace will *not* be shown in a user's site list by default.
|
|
545
|
-
*/
|
|
546
|
-
HTML_DRAFT = "HTML_DRAFT",
|
|
547
|
-
/**
|
|
548
|
-
* the user-journey for Fitness users who want to start from managing their business instead of designing their website.
|
|
549
|
-
* Will be accessible from Site List and will not have a website app.
|
|
550
|
-
* Once the user attaches a site, the site will become a regular wixsite.
|
|
551
|
-
*/
|
|
552
|
-
SITELESS_BUSINESS = "SITELESS_BUSINESS",
|
|
553
|
-
/** Belongs to "strategic products" company. Supports new product in the creator's economy space. */
|
|
554
|
-
CREATOR_ECONOMY = "CREATOR_ECONOMY",
|
|
555
|
-
/** It is to be used in the Business First efforts. */
|
|
556
|
-
DASHBOARD_FIRST = "DASHBOARD_FIRST",
|
|
557
|
-
/** Bookings business flow with no site. */
|
|
558
|
-
ANYWHERE = "ANYWHERE",
|
|
559
|
-
/** Namespace for Headless Backoffice with no editor */
|
|
560
|
-
HEADLESS = "HEADLESS",
|
|
561
|
-
/**
|
|
562
|
-
* Namespace for master site that will exist in parent account that will be referenced by subaccounts
|
|
563
|
-
* The site will be used for account level CSM feature for enterprise
|
|
564
|
-
*/
|
|
565
|
-
ACCOUNT_MASTER_CMS = "ACCOUNT_MASTER_CMS",
|
|
566
|
-
/** Rise.ai Siteless account management for Gift Cards and Store Credit. */
|
|
567
|
-
RISE = "RISE",
|
|
568
|
-
/**
|
|
569
|
-
* As part of the branded app new funnel, users now can create a meta site that will be branded app first.
|
|
570
|
-
* There's a blank site behind the scene but it's blank).
|
|
571
|
-
* The Mobile company will be the owner of this namespace.
|
|
572
|
-
*/
|
|
573
|
-
BRANDED_FIRST = "BRANDED_FIRST"
|
|
574
|
-
}
|
|
575
|
-
/** Site transferred to another user. */
|
|
576
|
-
interface SiteTransferred {
|
|
577
|
-
/** A previous owner id (user that transfers meta site). */
|
|
578
|
-
oldOwnerId?: string;
|
|
579
|
-
/** A new owner id (user that accepts meta site). */
|
|
580
|
-
newOwnerId?: string;
|
|
581
|
-
}
|
|
582
|
-
/** Soft deletion of the meta site. Could be restored. */
|
|
583
|
-
interface SiteDeleted {
|
|
584
|
-
/** A deletion context. */
|
|
585
|
-
deleteContext?: DeleteContext;
|
|
586
|
-
}
|
|
587
|
-
interface DeleteContext {
|
|
588
|
-
/** When the meta site was deleted. */
|
|
589
|
-
dateDeleted?: Date;
|
|
590
|
-
/** A status. */
|
|
591
|
-
deleteStatus?: DeleteStatus;
|
|
592
|
-
/** A reason (flow). */
|
|
593
|
-
deleteOrigin?: string;
|
|
594
|
-
/** A service that deleted it. */
|
|
595
|
-
initiatorId?: string | null;
|
|
596
|
-
}
|
|
597
|
-
declare enum DeleteStatus {
|
|
598
|
-
UNKNOWN = "UNKNOWN",
|
|
599
|
-
TRASH = "TRASH",
|
|
600
|
-
DELETED = "DELETED",
|
|
601
|
-
PENDING_PURGE = "PENDING_PURGE"
|
|
602
|
-
}
|
|
603
|
-
/** Restoration of the meta site. */
|
|
604
|
-
interface SiteUndeleted {
|
|
605
|
-
}
|
|
606
|
-
/** First publish of a meta site. Or subsequent publish after unpublish. */
|
|
607
|
-
interface SitePublished {
|
|
608
|
-
}
|
|
609
|
-
interface SiteUnpublished {
|
|
610
|
-
/** A list of URLs previously associated with the meta site. */
|
|
611
|
-
urls?: string[];
|
|
612
|
-
}
|
|
613
|
-
interface SiteMarkedAsTemplate {
|
|
614
|
-
}
|
|
615
|
-
interface SiteMarkedAsWixSite {
|
|
616
|
-
}
|
|
617
|
-
interface ServiceProvisioned {
|
|
618
|
-
/** Either UUID or EmbeddedServiceType. */
|
|
619
|
-
appDefId?: string;
|
|
620
|
-
/** Not only UUID. Something here could be something weird. */
|
|
621
|
-
instanceId?: string;
|
|
622
|
-
/** An instance id from which this instance is originated. */
|
|
623
|
-
originInstanceId?: string;
|
|
624
|
-
/** A version. */
|
|
625
|
-
version?: string | null;
|
|
626
|
-
}
|
|
627
|
-
interface ServiceRemoved {
|
|
628
|
-
/** Either UUID or EmbeddedServiceType. */
|
|
629
|
-
appDefId?: string;
|
|
630
|
-
/** Not only UUID. Something here could be something weird. */
|
|
631
|
-
instanceId?: string;
|
|
632
|
-
/** A version. */
|
|
633
|
-
version?: string | null;
|
|
634
|
-
}
|
|
635
|
-
/** Rename of the site. Meaning, free public url has been changed as well. */
|
|
636
|
-
interface SiteRenamed {
|
|
637
|
-
/** A new meta site name (URL slug). */
|
|
638
|
-
newSiteName?: string;
|
|
639
|
-
/** A previous meta site name (URL slug). */
|
|
640
|
-
oldSiteName?: string;
|
|
641
|
-
}
|
|
642
|
-
/**
|
|
643
|
-
* Hard deletion of the meta site.
|
|
644
|
-
*
|
|
645
|
-
* Could not be restored. Therefore it's desirable to cleanup data.
|
|
646
|
-
*/
|
|
647
|
-
interface SiteHardDeleted {
|
|
648
|
-
/** A deletion context. */
|
|
649
|
-
deleteContext?: DeleteContext;
|
|
650
|
-
}
|
|
651
|
-
interface NamespaceChanged {
|
|
652
|
-
/** A previous namespace. */
|
|
653
|
-
oldNamespace?: Namespace;
|
|
654
|
-
/** A new namespace. */
|
|
655
|
-
newNamespace?: Namespace;
|
|
656
|
-
}
|
|
657
|
-
/** Assigned Studio editor */
|
|
658
|
-
interface StudioAssigned {
|
|
659
|
-
}
|
|
660
|
-
/** Unassigned Studio editor */
|
|
661
|
-
interface StudioUnassigned {
|
|
662
|
-
}
|
|
663
|
-
interface HtmlSitePublished {
|
|
664
|
-
/** Application instance ID */
|
|
665
|
-
appInstanceId?: string;
|
|
666
|
-
/** Application type */
|
|
667
|
-
appType?: string;
|
|
668
|
-
/** Revision */
|
|
669
|
-
revision?: string;
|
|
670
|
-
/** MSID */
|
|
671
|
-
metaSiteId?: string | null;
|
|
672
|
-
/** optional branch id if publish is done from branch */
|
|
673
|
-
branchId?: string | null;
|
|
674
|
-
/** The site's last transactionId */
|
|
675
|
-
lastTransactionId?: string | null;
|
|
676
|
-
/** A list of the site's pages */
|
|
677
|
-
pages?: Page[];
|
|
678
|
-
/** Site's publish date */
|
|
679
|
-
publishDate?: string;
|
|
680
|
-
}
|
|
681
|
-
interface Page {
|
|
682
|
-
/** Page's Id */
|
|
683
|
-
_id?: string;
|
|
263
|
+
interface QueryReferredFriendActionsResponse {
|
|
264
|
+
/** List of ReferredFriendActions that match the query. */
|
|
265
|
+
referredFriendActions?: ReferredFriendAction[];
|
|
266
|
+
/** Paging metadata. */
|
|
267
|
+
metadata?: CursorPagingMetadata$3;
|
|
684
268
|
}
|
|
685
|
-
interface
|
|
686
|
-
/**
|
|
687
|
-
|
|
688
|
-
/**
|
|
689
|
-
|
|
690
|
-
* assignment of a floating subscription or a re-assignement from a different site.
|
|
691
|
-
*/
|
|
692
|
-
assigned?: SubscriptionAssigned;
|
|
693
|
-
/** Triggered when a subscription is canceled. */
|
|
694
|
-
cancelled?: SubscriptionCancelled;
|
|
695
|
-
/** Triggered when the subscription's auto renew is turned on. */
|
|
696
|
-
autoRenewTurnedOn?: SubscriptionAutoRenewTurnedOn;
|
|
697
|
-
/** Triggered when the subscription's auto renew is turned off. */
|
|
698
|
-
autoRenewTurnedOff?: SubscriptionAutoRenewTurnedOff;
|
|
269
|
+
interface ReferredFriendAction extends ReferredFriendActionRewardTypeOptionsOneOf {
|
|
270
|
+
/** Coupon reward type options. */
|
|
271
|
+
coupon?: V1Coupon$1;
|
|
272
|
+
/** Loyalty points reward type options. */
|
|
273
|
+
loyaltyPoints?: LoyaltyPoints$1;
|
|
699
274
|
/**
|
|
700
|
-
*
|
|
701
|
-
*
|
|
275
|
+
* Referred friend id.
|
|
276
|
+
* @readonly
|
|
702
277
|
*/
|
|
703
|
-
|
|
278
|
+
referredFriendId?: string;
|
|
704
279
|
/**
|
|
705
|
-
*
|
|
706
|
-
*
|
|
707
|
-
* subscription for the target account. The event returns both the original
|
|
708
|
-
* and the new subscription.
|
|
280
|
+
* Contact id.
|
|
281
|
+
* @readonly
|
|
709
282
|
*/
|
|
710
|
-
|
|
711
|
-
/** Triggered when a recurring charge succeeds for a subscription. */
|
|
712
|
-
recurringChargeSucceeded?: RecurringChargeSucceeded;
|
|
283
|
+
contactId?: string;
|
|
713
284
|
/**
|
|
714
|
-
*
|
|
715
|
-
*
|
|
285
|
+
* First action trigger.
|
|
286
|
+
* @readonly
|
|
716
287
|
*/
|
|
717
|
-
|
|
288
|
+
trigger?: V1Trigger;
|
|
718
289
|
/**
|
|
719
|
-
*
|
|
720
|
-
*
|
|
290
|
+
* First action date.
|
|
291
|
+
* @readonly
|
|
721
292
|
*/
|
|
722
|
-
|
|
293
|
+
actionDate?: Date;
|
|
294
|
+
/** Issued reward type. */
|
|
295
|
+
rewardType?: Reward$1;
|
|
296
|
+
/** Total number of actions. */
|
|
297
|
+
totalActions?: number;
|
|
723
298
|
/**
|
|
724
|
-
*
|
|
725
|
-
*
|
|
299
|
+
* Total amount spent by this referred friend.
|
|
300
|
+
* @readonly
|
|
726
301
|
*/
|
|
727
|
-
|
|
728
|
-
/** ID of the subscription's event. */
|
|
729
|
-
eventId?: string | null;
|
|
302
|
+
totalAmountSpent?: string;
|
|
730
303
|
/**
|
|
731
|
-
*
|
|
732
|
-
*
|
|
733
|
-
* `YYYY-MM-DDThh:mm:ss.sssZ` format.
|
|
304
|
+
* friend signup date.
|
|
305
|
+
* @readonly
|
|
734
306
|
*/
|
|
735
|
-
|
|
307
|
+
signupDate?: Date;
|
|
736
308
|
}
|
|
737
309
|
/** @oneof */
|
|
738
|
-
interface
|
|
739
|
-
/**
|
|
740
|
-
|
|
741
|
-
/**
|
|
742
|
-
|
|
743
|
-
* assignment of a floating subscription or a re-assignement from a different site.
|
|
744
|
-
*/
|
|
745
|
-
assigned?: SubscriptionAssigned;
|
|
746
|
-
/** Triggered when a subscription is canceled. */
|
|
747
|
-
cancelled?: SubscriptionCancelled;
|
|
748
|
-
/** Triggered when the subscription's auto renew is turned on. */
|
|
749
|
-
autoRenewTurnedOn?: SubscriptionAutoRenewTurnedOn;
|
|
750
|
-
/** Triggered when the subscription's auto renew is turned off. */
|
|
751
|
-
autoRenewTurnedOff?: SubscriptionAutoRenewTurnedOff;
|
|
752
|
-
/**
|
|
753
|
-
* Triggered when a subscription is unassigned from a Wix site and becomes
|
|
754
|
-
* floating.
|
|
755
|
-
*/
|
|
756
|
-
unassigned?: SubscriptionUnassigned;
|
|
757
|
-
/**
|
|
758
|
-
* Triggered when a subscription is transferred from one Wix account to another.
|
|
759
|
-
* A transfer includes cancelling the original subscription and creating a new
|
|
760
|
-
* subscription for the target account. The event returns both the original
|
|
761
|
-
* and the new subscription.
|
|
762
|
-
*/
|
|
763
|
-
transferred?: SubscriptionTransferred;
|
|
764
|
-
/** Triggered when a recurring charge succeeds for a subscription. */
|
|
765
|
-
recurringChargeSucceeded?: RecurringChargeSucceeded;
|
|
766
|
-
/**
|
|
767
|
-
* Triggered when a subscription was updated including when its product has been
|
|
768
|
-
* up- or downgraded or the billing cycle is changed.
|
|
769
|
-
*/
|
|
770
|
-
contractSwitched?: ContractSwitched;
|
|
771
|
-
/**
|
|
772
|
-
* Triggered when a subscription gets close to the end of its billing cycle.
|
|
773
|
-
* The exact number of days is defined in the billing system.
|
|
774
|
-
*/
|
|
775
|
-
nearEndOfPeriod?: SubscriptionNearEndOfPeriod;
|
|
776
|
-
/**
|
|
777
|
-
* Triggered when a subscription is updated and the change doesn't happen
|
|
778
|
-
* immediately but at the end of the current billing cycle.
|
|
779
|
-
*/
|
|
780
|
-
pendingChange?: SubscriptionPendingChange;
|
|
310
|
+
interface ReferredFriendActionRewardTypeOptionsOneOf {
|
|
311
|
+
/** Coupon reward type options. */
|
|
312
|
+
coupon?: V1Coupon$1;
|
|
313
|
+
/** Loyalty points reward type options. */
|
|
314
|
+
loyaltyPoints?: LoyaltyPoints$1;
|
|
781
315
|
}
|
|
782
|
-
|
|
783
|
-
interface SubscriptionCreated {
|
|
784
|
-
/** Created subscription. */
|
|
785
|
-
subscription?: Subscription;
|
|
786
|
-
/** Metadata for the `created` event. */
|
|
787
|
-
metadata?: Record<string, string>;
|
|
316
|
+
interface V1Coupon$1 {
|
|
788
317
|
/**
|
|
789
|
-
*
|
|
790
|
-
*
|
|
791
|
-
* by the billing system
|
|
318
|
+
* Coupon ID.
|
|
319
|
+
* @readonly
|
|
792
320
|
*/
|
|
793
|
-
reactivationData?: ReactivationData;
|
|
794
|
-
}
|
|
795
|
-
/**
|
|
796
|
-
* A subscription holds information about a Premium product that a Wix account
|
|
797
|
-
* owner has purchased including details about the billing.
|
|
798
|
-
*/
|
|
799
|
-
interface Subscription {
|
|
800
|
-
/** ID of the subscription. */
|
|
801
321
|
_id?: string;
|
|
802
|
-
/** ID of the Wix account that purchased the subscription. */
|
|
803
|
-
userId?: string;
|
|
804
322
|
/**
|
|
805
|
-
*
|
|
806
|
-
*
|
|
323
|
+
* Coupon code.
|
|
324
|
+
* @readonly
|
|
807
325
|
*/
|
|
808
|
-
|
|
326
|
+
code?: string;
|
|
809
327
|
/**
|
|
810
|
-
*
|
|
811
|
-
*
|
|
812
|
-
* `YYYY-MM-DDThh:mm:ss.sssZ` format.
|
|
328
|
+
* Coupon status.
|
|
329
|
+
* @readonly
|
|
813
330
|
*/
|
|
814
|
-
|
|
331
|
+
status?: Status$2;
|
|
815
332
|
/**
|
|
816
|
-
*
|
|
817
|
-
*
|
|
818
|
-
* `YYYY-MM-DDThh:mm:ss.sssZ` format.
|
|
333
|
+
* Coupon specification.
|
|
334
|
+
* @readonly
|
|
819
335
|
*/
|
|
820
|
-
|
|
336
|
+
couponSpecification?: Coupon$1;
|
|
337
|
+
}
|
|
338
|
+
declare enum Status$2 {
|
|
339
|
+
/** Unknown coupon status. */
|
|
340
|
+
UNKNOWN = "UNKNOWN",
|
|
341
|
+
/** Coupon is active and can be applied. */
|
|
342
|
+
ACTIVE = "ACTIVE",
|
|
343
|
+
/** Coupon was already applied and can not be used anymore. */
|
|
344
|
+
APPLIED = "APPLIED",
|
|
345
|
+
/** Coupon was deleted. */
|
|
346
|
+
DELETED = "DELETED"
|
|
347
|
+
}
|
|
348
|
+
interface Coupon$1 extends CouponDiscountTypeOptionsOneOf$1, CouponScopeOrMinSubtotalOneOf$1 {
|
|
349
|
+
/** Options for fixed amount discount type */
|
|
350
|
+
fixedAmountOptions?: FixedAmountDiscount$1;
|
|
351
|
+
/** Options for percentage discount type */
|
|
352
|
+
percentageOptions?: PercentageDiscount$1;
|
|
353
|
+
/** Limit the coupon to carts with a subtotal above this number. */
|
|
354
|
+
minimumSubtotal?: number;
|
|
355
|
+
/** Specifies the type of line items this coupon will apply to. */
|
|
356
|
+
scope?: CouponScope$1;
|
|
357
|
+
/** Coupon name */
|
|
358
|
+
name?: string;
|
|
359
|
+
/** Coupon discount type */
|
|
360
|
+
discountType?: DiscountType$1;
|
|
361
|
+
/** Limit the coupon to only apply to one item in cart. */
|
|
362
|
+
limitedToOneItem?: boolean | null;
|
|
363
|
+
/** If true, coupon also applies to subscriptions. */
|
|
364
|
+
appliesToSubscriptions?: boolean | null;
|
|
365
|
+
/** Specifies the amount of discounted cycles for subscription item. See Stores Coupons documentation for more info. */
|
|
366
|
+
discountedCycleCount?: number | null;
|
|
367
|
+
}
|
|
368
|
+
/** @oneof */
|
|
369
|
+
interface CouponDiscountTypeOptionsOneOf$1 {
|
|
370
|
+
/** Options for fixed amount discount type */
|
|
371
|
+
fixedAmountOptions?: FixedAmountDiscount$1;
|
|
372
|
+
/** Options for percentage discount type */
|
|
373
|
+
percentageOptions?: PercentageDiscount$1;
|
|
374
|
+
}
|
|
375
|
+
/** @oneof */
|
|
376
|
+
interface CouponScopeOrMinSubtotalOneOf$1 {
|
|
377
|
+
/** Limit the coupon to carts with a subtotal above this number. */
|
|
378
|
+
minimumSubtotal?: number;
|
|
379
|
+
/** Specifies the type of line items this coupon will apply to. */
|
|
380
|
+
scope?: CouponScope$1;
|
|
381
|
+
}
|
|
382
|
+
declare enum DiscountType$1 {
|
|
383
|
+
UNKNOWN = "UNKNOWN",
|
|
384
|
+
/** Discount as a fixed amount */
|
|
385
|
+
FIXED_AMOUNT = "FIXED_AMOUNT",
|
|
386
|
+
/** Discount as a percentage */
|
|
387
|
+
PERCENTAGE = "PERCENTAGE",
|
|
388
|
+
/** Free shipping */
|
|
389
|
+
FREE_SHIPPING = "FREE_SHIPPING"
|
|
390
|
+
}
|
|
391
|
+
interface FixedAmountDiscount$1 {
|
|
392
|
+
/** Fixed amount to discount */
|
|
393
|
+
amount?: number;
|
|
394
|
+
}
|
|
395
|
+
interface PercentageDiscount$1 {
|
|
396
|
+
percentage?: number;
|
|
397
|
+
}
|
|
398
|
+
interface CouponScope$1 {
|
|
399
|
+
namespace?: string;
|
|
400
|
+
group?: Group$1;
|
|
401
|
+
}
|
|
402
|
+
interface Group$1 {
|
|
403
|
+
name?: string;
|
|
404
|
+
entityId?: string | null;
|
|
405
|
+
}
|
|
406
|
+
interface LoyaltyPoints$1 {
|
|
821
407
|
/**
|
|
822
|
-
*
|
|
823
|
-
*
|
|
824
|
-
* Subscriptions for account level products can't be assigned to a Wix site.
|
|
408
|
+
* Loyalty transaction ID.
|
|
409
|
+
* @readonly
|
|
825
410
|
*/
|
|
826
|
-
|
|
827
|
-
/** Information about the system that manages the subscription's billing. */
|
|
828
|
-
billingReference?: BillingReference;
|
|
829
|
-
/** Information about the billing cycle of the subscription. */
|
|
830
|
-
cycle?: Cycle;
|
|
411
|
+
transactionId?: string;
|
|
831
412
|
/**
|
|
832
|
-
*
|
|
833
|
-
*
|
|
834
|
-
* + `UNKNOWN`: Default status.
|
|
835
|
-
* + `AUTO_RENEW_ON`: Subscription is active and automatically renews at the end of the current billing cycle.
|
|
836
|
-
* + `AUTO_RENEW_OFF`: Subscription is active but expires at the end of the current billing cycle.
|
|
837
|
-
* + `MANUAL_RECURRING`: Subscription is active and renews at the end of the current billing cycle, in case the customer takes an action related to the payment.
|
|
838
|
-
* + `CANCELLED`: Subscription isn't active because it has been canceled.
|
|
839
|
-
* + `TRANSFERRED`: Subscription isn't active because it has been transferred to a different account. A different active subscription was created for the target account.
|
|
413
|
+
* Loyalty points amount given.
|
|
414
|
+
* @readonly
|
|
840
415
|
*/
|
|
841
|
-
|
|
416
|
+
amount?: number;
|
|
417
|
+
}
|
|
418
|
+
interface DomainEvent$3 extends DomainEventBodyOneOf$3 {
|
|
419
|
+
createdEvent?: EntityCreatedEvent$3;
|
|
420
|
+
updatedEvent?: EntityUpdatedEvent$3;
|
|
421
|
+
deletedEvent?: EntityDeletedEvent$3;
|
|
422
|
+
actionEvent?: ActionEvent$3;
|
|
842
423
|
/**
|
|
843
|
-
*
|
|
844
|
-
*
|
|
845
|
-
* [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)
|
|
846
|
-
* `YYYY-MM-DDThh:mm:ss.sssZ` format.
|
|
424
|
+
* Unique event ID.
|
|
425
|
+
* Allows clients to ignore duplicate webhooks.
|
|
847
426
|
*/
|
|
848
|
-
|
|
427
|
+
_id?: string;
|
|
849
428
|
/**
|
|
850
|
-
*
|
|
851
|
-
*
|
|
429
|
+
* Assumes actions are also always typed to an entity_type
|
|
430
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
852
431
|
*/
|
|
853
|
-
|
|
854
|
-
/** Version number, which increments by 1 each time the subscription is updated. */
|
|
855
|
-
version?: number;
|
|
432
|
+
entityFqdn?: string;
|
|
856
433
|
/**
|
|
857
|
-
*
|
|
858
|
-
*
|
|
434
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
435
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
436
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
859
437
|
*/
|
|
860
|
-
|
|
438
|
+
slug?: string;
|
|
439
|
+
/** ID of the entity associated with the event. */
|
|
440
|
+
entityId?: string;
|
|
441
|
+
/** Event timestamp. */
|
|
442
|
+
eventTime?: Date;
|
|
861
443
|
/**
|
|
862
|
-
*
|
|
863
|
-
*
|
|
864
|
-
* `YYYY-MM-DDThh:mm:ss.sssZ` format.
|
|
865
|
-
* Differs from `createdAt` in case the subscription was originally created for a different Wix account and has been transferred.
|
|
444
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
445
|
+
* (for example, GDPR).
|
|
866
446
|
*/
|
|
867
|
-
|
|
868
|
-
/**
|
|
869
|
-
|
|
447
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
448
|
+
/** If present, indicates the action that triggered the event. */
|
|
449
|
+
originatedFrom?: string | null;
|
|
870
450
|
/**
|
|
871
|
-
*
|
|
872
|
-
*
|
|
873
|
-
*
|
|
451
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
452
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
453
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
454
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
455
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
456
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
874
457
|
*/
|
|
875
|
-
|
|
876
|
-
}
|
|
877
|
-
interface BillingReference {
|
|
878
|
-
/**
|
|
879
|
-
* Name of the billing system that manages the subscription.
|
|
880
|
-
*
|
|
881
|
-
* + `"UNKNOWN"`: Default value.
|
|
882
|
-
* + `"SBS"`: [Wix Billing](https://github.com/wix-p/premium-billing/tree/master/sbs).
|
|
883
|
-
* + `"LICENSER"`:
|
|
884
|
-
* + `"BASS"`: [Billing and Subscriptions System](https://dev.wix.com/docs/rest/internal-only/premium/subscriptions-by-billing-by-wix/introduction).
|
|
885
|
-
* + `"RESELLER"`: [External Reseller](https://dev.wix.com/api/rest/account-level-apis/resellers/introduction).
|
|
886
|
-
*/
|
|
887
|
-
providerName?: ProviderName;
|
|
888
|
-
/** Current provider reference ID. */
|
|
889
|
-
providerReferenceId?: string | null;
|
|
890
|
-
/** Previous provider reference IDs. Used for when a subscription is extended, specifically for domains. */
|
|
891
|
-
previousProviderReferenceIds?: string[];
|
|
892
|
-
}
|
|
893
|
-
declare enum ProviderName {
|
|
894
|
-
UNKNOWN = "UNKNOWN",
|
|
895
|
-
SBS = "SBS",
|
|
896
|
-
LICENSER = "LICENSER",
|
|
897
|
-
BASS = "BASS",
|
|
898
|
-
RESELLER = "RESELLER",
|
|
899
|
-
RECURRING_INVOICES = "RECURRING_INVOICES"
|
|
900
|
-
}
|
|
901
|
-
interface Cycle extends CycleCycleSelectorOneOf {
|
|
902
|
-
/** repetitive interval */
|
|
903
|
-
interval?: Interval;
|
|
904
|
-
/** one time */
|
|
905
|
-
oneTime?: OneTime;
|
|
458
|
+
entityEventSequence?: string | null;
|
|
906
459
|
}
|
|
907
460
|
/** @oneof */
|
|
908
|
-
interface
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
}
|
|
914
|
-
interface Interval {
|
|
915
|
-
/** interval unit of measure */
|
|
916
|
-
unit?: IntervalUnit;
|
|
917
|
-
/** number of interval */
|
|
918
|
-
count?: number;
|
|
919
|
-
}
|
|
920
|
-
declare enum IntervalUnit {
|
|
921
|
-
/** unknown interval unit */
|
|
922
|
-
UNKNOWN = "UNKNOWN",
|
|
923
|
-
/** day */
|
|
924
|
-
DAY = "DAY",
|
|
925
|
-
/** week */
|
|
926
|
-
WEEK = "WEEK",
|
|
927
|
-
/** month */
|
|
928
|
-
MONTH = "MONTH",
|
|
929
|
-
/** year */
|
|
930
|
-
YEAR = "YEAR"
|
|
931
|
-
}
|
|
932
|
-
interface OneTime {
|
|
933
|
-
}
|
|
934
|
-
declare enum SubscriptionStatus {
|
|
935
|
-
UNKNOWN = "UNKNOWN",
|
|
936
|
-
AUTO_RENEW_ON = "AUTO_RENEW_ON",
|
|
937
|
-
AUTO_RENEW_OFF = "AUTO_RENEW_OFF",
|
|
938
|
-
MANUAL_RECURRING = "MANUAL_RECURRING",
|
|
939
|
-
CANCELLED = "CANCELLED",
|
|
940
|
-
TRANSFERRED = "TRANSFERRED"
|
|
941
|
-
}
|
|
942
|
-
/** Triggered when a subscription is reactivated. */
|
|
943
|
-
interface ReactivationData {
|
|
944
|
-
reactivationReason?: ReactivationReasonEnum;
|
|
945
|
-
/**
|
|
946
|
-
* In the event of reactivation after chargeback dispute, the subscription may be extended according to the
|
|
947
|
-
* number of days it was inactive during the time of resolving the dispute
|
|
948
|
-
*/
|
|
949
|
-
newEndOfPeriod?: Date;
|
|
950
|
-
/** The original end date, before the inactive period. */
|
|
951
|
-
oldEndOfPeriod?: Date;
|
|
952
|
-
/** The difference in days between the new new_end_of_period and old_end_of_period */
|
|
953
|
-
differenceInDays?: number | null;
|
|
954
|
-
}
|
|
955
|
-
/** Reason for subscription reactivation */
|
|
956
|
-
declare enum ReactivationReasonEnum {
|
|
957
|
-
UNKNOWN = "UNKNOWN",
|
|
958
|
-
/**
|
|
959
|
-
* Subscription was reactivated due to billing status change from CANCELED to ACTIVE, for example if it was incorrectly
|
|
960
|
-
* canceled because of suspicion of fraud
|
|
961
|
-
*/
|
|
962
|
-
BILLING_STATUS_CHANGE = "BILLING_STATUS_CHANGE",
|
|
963
|
-
/** Subscription was reactivated after a chargeback dispute */
|
|
964
|
-
REACTIVATED_AFTER_CHARGEBACK = "REACTIVATED_AFTER_CHARGEBACK"
|
|
965
|
-
}
|
|
966
|
-
/**
|
|
967
|
-
* Triggered when a subscription is assigned to a Wix site, including the initial
|
|
968
|
-
* assignment of a floating subscription or a re-assignement from a different site.
|
|
969
|
-
*/
|
|
970
|
-
interface SubscriptionAssigned {
|
|
971
|
-
/** Assigned subscription. */
|
|
972
|
-
subscription?: Subscription;
|
|
973
|
-
/** ID of the metasite that the subscription has been assigned to before the update. */
|
|
974
|
-
previousMetaSiteId?: string | null;
|
|
975
|
-
}
|
|
976
|
-
/** Triggered when a subscription is canceled. */
|
|
977
|
-
interface SubscriptionCancelled {
|
|
978
|
-
/** Canceled subscription. */
|
|
979
|
-
subscription?: Subscription;
|
|
980
|
-
/** Details about the cancellation including who canceled the subscription and why. */
|
|
981
|
-
cancellationDetails?: CancellationDetails;
|
|
982
|
-
/**
|
|
983
|
-
* Whether the subscription is canceled immediately or expires at the end of the current billing cycle.
|
|
984
|
-
*
|
|
985
|
-
* Default: `false`
|
|
986
|
-
*/
|
|
987
|
-
immediateCancel?: boolean;
|
|
988
|
-
/** Whether the subscription was canceled during the free trial period. */
|
|
989
|
-
canceledInFreeTrial?: boolean;
|
|
461
|
+
interface DomainEventBodyOneOf$3 {
|
|
462
|
+
createdEvent?: EntityCreatedEvent$3;
|
|
463
|
+
updatedEvent?: EntityUpdatedEvent$3;
|
|
464
|
+
deletedEvent?: EntityDeletedEvent$3;
|
|
465
|
+
actionEvent?: ActionEvent$3;
|
|
990
466
|
}
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
/**
|
|
994
|
-
* Cancellation code.
|
|
995
|
-
*
|
|
996
|
-
* Values supported for cancellations on behalf of the billing system: `-1`, `-2`, `-3`, `-4`, `-5`, `-6`, `-7`, `-8`.
|
|
997
|
-
* For cancellations on behalf of the site owner or the service provider `cancellationCode`
|
|
998
|
-
* is taken from the request of
|
|
999
|
-
* [Cancel Immediately Offline](https://bo.wix.com/wix-docs/rest/premium/premium-subscriptions-manager/cancel-immediately-offline).
|
|
1000
|
-
*
|
|
1001
|
-
* + `-1`: The subscription has been cancelled by the billing system but none of the listed cancellation reasons applies.
|
|
1002
|
-
* + `-2`: There were payment problems.
|
|
1003
|
-
* + `-3`: There was a chargeback.
|
|
1004
|
-
* + `-4`: Customer support has canceled the subscription and issued a refund.
|
|
1005
|
-
* + `-5`: The site owner has changed their existing subscription.
|
|
1006
|
-
* + `-6`: The subscription has been transferred to a different Wix account.
|
|
1007
|
-
* + `-7`: The subscription has been canceled because the site owner hasn't manually authenticated the recurring payment during the subscription's grace period. For example, site owners must manually confirm recurring payments within 40 days when paying with boleto.
|
|
1008
|
-
* + `-8`: The Wix account that the subscription belonged to has been deleted.
|
|
1009
|
-
*/
|
|
1010
|
-
cancellationCode?: number | null;
|
|
1011
|
-
/**
|
|
1012
|
-
* Cancellation reason. For cancellations on behalf of the site owner or the service provider `cancellationReason`
|
|
1013
|
-
* is taken from the request of
|
|
1014
|
-
* [Cancel Immediately Offline](https://bo.wix.com/wix-docs/rest/premium/premium-subscriptions-manager/cancel-immediately-offline).
|
|
1015
|
-
* For cancellations on behalf of the billing system `cancellationReason` is `null` or an empty string.
|
|
1016
|
-
*/
|
|
1017
|
-
cancellationReason?: string | null;
|
|
1018
|
-
/**
|
|
1019
|
-
* Initiator of the cancellation. For `"USER_REQUESTED"` and `"APP_MANAGED"`,
|
|
1020
|
-
* `cancellationCode` and `cancellationReason` are taken from the request of
|
|
1021
|
-
* [Cancel Immediately](https://bo.wix.com/wix-docs/rest/premium/premium-subscriptions-manager/cancel-immediately)
|
|
1022
|
-
* or [Cancel Immediately Offline](https://bo.wix.com/wix-docs/rest/premium/premium-subscriptions-manager/cancel-immediately-offline).
|
|
1023
|
-
* For `"PASSIVE"`, cancellations `cancellationCode` is automatically calculated and `cancellationReason`
|
|
1024
|
-
* is `null` or an empty string.
|
|
1025
|
-
*
|
|
1026
|
-
* + `"UNKNOWN`: Default value.
|
|
1027
|
-
* + `"USER_REQUESTED"`: The Wix account owner has canceled the subscription.
|
|
1028
|
-
* + `"APP_MANAGED"`: The service provider has canceled the subscription.
|
|
1029
|
-
* + `"PASSIVE"`: The billing system has canceled the subscription. For example, in case of payment failure or fraud.
|
|
1030
|
-
*/
|
|
1031
|
-
initiator?: Initiator;
|
|
467
|
+
interface EntityCreatedEvent$3 {
|
|
468
|
+
entity?: string;
|
|
1032
469
|
}
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
USER_REQUESTED = "USER_REQUESTED",
|
|
1036
|
-
APP_MANAGED = "APP_MANAGED",
|
|
1037
|
-
PASSIVE = "PASSIVE"
|
|
470
|
+
interface UndeleteInfo$3 {
|
|
471
|
+
deletedDate?: Date;
|
|
1038
472
|
}
|
|
1039
|
-
|
|
1040
|
-
interface SubscriptionAutoRenewTurnedOn {
|
|
1041
|
-
/** Subscription for which auto renew is turned on. */
|
|
1042
|
-
subscription?: Subscription;
|
|
473
|
+
interface EntityUpdatedEvent$3 {
|
|
1043
474
|
/**
|
|
1044
|
-
*
|
|
1045
|
-
*
|
|
1046
|
-
*
|
|
1047
|
-
* + `"USER"`: The site owner who purchased the subscription has turned auto renew on.
|
|
1048
|
-
* + `"APP"`: The service provider has turned auto renew on.
|
|
475
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
476
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
477
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
1049
478
|
*/
|
|
1050
|
-
|
|
479
|
+
currentEntity?: string;
|
|
1051
480
|
}
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
subscription?: Subscription;
|
|
1056
|
-
/** Details about the cancellation including who canceled the subscription and why. */
|
|
1057
|
-
cancellationDetails?: CancellationDetails;
|
|
1058
|
-
/**
|
|
1059
|
-
* Whether the subscription is immediately canceled or expires at the end of the current billing cycle.
|
|
1060
|
-
*
|
|
1061
|
-
* Default: `false`
|
|
1062
|
-
*/
|
|
1063
|
-
immediateCancel?: boolean;
|
|
481
|
+
interface EntityDeletedEvent$3 {
|
|
482
|
+
/** Entity that was deleted */
|
|
483
|
+
deletedEntity?: string | null;
|
|
1064
484
|
}
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
* floating.
|
|
1068
|
-
*/
|
|
1069
|
-
interface SubscriptionUnassigned {
|
|
1070
|
-
/** Unassigned subscription. */
|
|
1071
|
-
subscription?: Subscription;
|
|
1072
|
-
/** ID of the metasite that the subscription has been assigned to before the event. */
|
|
1073
|
-
previousMetaSiteId?: string;
|
|
1074
|
-
/**
|
|
1075
|
-
* Reason why the subscription is unassigned.
|
|
1076
|
-
*
|
|
1077
|
-
* + `"UNKNOWN"`: Default value.
|
|
1078
|
-
* + `"USER_REQUESTED"`: The Wix account owner has unassigned the subscription.
|
|
1079
|
-
* + `"REPLACED_BY_ANOTHER_SUBSCRIPTION"`: A different subscription that replaces this subscription is assigned to the site.
|
|
1080
|
-
*/
|
|
1081
|
-
unassignReason?: UnassignReason;
|
|
485
|
+
interface ActionEvent$3 {
|
|
486
|
+
body?: string;
|
|
1082
487
|
}
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
* A transfer includes cancelling the original subscription and creating a new
|
|
1091
|
-
* subscription for the target account. The event returns both the original
|
|
1092
|
-
* and the new subscription.
|
|
1093
|
-
*/
|
|
1094
|
-
interface SubscriptionTransferred {
|
|
1095
|
-
/** Original subscription that was canceled for the transfer. */
|
|
1096
|
-
originSubscription?: Subscription;
|
|
1097
|
-
/** Newly created subscription for the target account. */
|
|
1098
|
-
targetSubscription?: Subscription;
|
|
1099
|
-
}
|
|
1100
|
-
/** Triggered when a recurring charge succeeds for a subscription. */
|
|
1101
|
-
interface RecurringChargeSucceeded {
|
|
1102
|
-
/** Subscription for which the recurring charge has succeeded. */
|
|
1103
|
-
subscription?: Subscription;
|
|
1104
|
-
/** Indication that there was a successful charge at the end of the free trial period */
|
|
1105
|
-
freeTrialPeriodEnd?: boolean;
|
|
1106
|
-
}
|
|
1107
|
-
/**
|
|
1108
|
-
* Triggered when a subscription was updated including when its product has been
|
|
1109
|
-
* up- or downgraded or the billing cycle is changed.
|
|
1110
|
-
*/
|
|
1111
|
-
interface ContractSwitched {
|
|
1112
|
-
/** Updated subscription. */
|
|
1113
|
-
subscription?: Subscription;
|
|
1114
|
-
/** Billing cycle before the update. */
|
|
1115
|
-
previousCycle?: Cycle;
|
|
1116
|
-
/** ID of the product belonging to the subscription before the update. */
|
|
1117
|
-
previousProductId?: string;
|
|
1118
|
-
/** ID of the product type that the subscription's original product belonged to before the update. */
|
|
1119
|
-
previousProductTypeId?: string;
|
|
1120
|
-
/**
|
|
1121
|
-
* Update type. __Note__: Doesn't include information about a product adjustment.
|
|
1122
|
-
* For that purpose, see `productAdjustment`.
|
|
1123
|
-
*
|
|
1124
|
-
* + `"NOT_APPLICABLE"`: Default value.
|
|
1125
|
-
* + `"ADDITIONAL_QUANTITY"`: An increased usage quota is added to the subscription. For example, a second mailbox is added to a subscription that previously included a single mailbox.
|
|
1126
|
-
* + `"CREDIT_UNUSED_PERIOD"`: The subscription is upgraded and the new price is less than the regular price. The new price applies to every billing cycle, not just the first cycle.
|
|
1127
|
-
* + `"REFUND_PRICE_DIFF"`: Not implemented.
|
|
1128
|
-
* + `"ADJUST_PERIOD_END"`: Not implemented.
|
|
1129
|
-
* + `"DOWNGRADE_GRACE_PERIOD"`: For downgrades during the grace period. In this situation, the site owner hasn’t paid yet and must immediately pay for the downgraded subscription.
|
|
1130
|
-
* + `"FULL_AMOUNT_PERIOD"`: For upgrades in which the site owner retains unused benefits. For example, site owners upgrading a Facebook Ads subscription retain their unused FB Ads credit. The unused credit is added to the new credit.
|
|
1131
|
-
* + `"END_OF_PERIOD"`: The subscription's billing current cycle is extended because of a downgrade.
|
|
1132
|
-
* + `"PENDING_CHANGES"`: The subscription's billing is updated, but the change doesn't apply immediately. Instead, the update becomes effective at the end of current billing cycle.
|
|
1133
|
-
* + `"DOWNGRADE_RENEWAL"`: The subscription is downgraded because of a declined payment. This prevents subscriptions from churning.
|
|
1134
|
-
*/
|
|
1135
|
-
contractSwitchType?: ContractSwitchType;
|
|
488
|
+
interface Empty$2 {
|
|
489
|
+
}
|
|
490
|
+
interface SuccessfulReferralEvent$2 {
|
|
491
|
+
/** ReferredFriend that completed his referral details. */
|
|
492
|
+
referredFriendDetails?: ReferredFriendDetails$2;
|
|
493
|
+
}
|
|
494
|
+
interface ReferredFriendDetails$2 {
|
|
1136
495
|
/**
|
|
1137
|
-
* ID
|
|
1138
|
-
*
|
|
496
|
+
* ReferredFriend ID.
|
|
497
|
+
* @readonly
|
|
1139
498
|
*/
|
|
1140
|
-
|
|
499
|
+
referredFriendId?: string;
|
|
1141
500
|
/**
|
|
1142
|
-
*
|
|
1143
|
-
*
|
|
1144
|
-
* + `"PRICE_INCREASE"`: The subscription's price has been increased.
|
|
1145
|
-
* + `"EXTERNAL_PROVIDER_TRIGGER"`: Any reason other than a price increase.
|
|
501
|
+
* ReferredFriend Contact ID.
|
|
502
|
+
* @readonly
|
|
1146
503
|
*/
|
|
1147
|
-
|
|
1148
|
-
/** Information about the price update. Available only for updates with a price increase. */
|
|
1149
|
-
productPriceIncreaseData?: ProductPriceIncreaseData;
|
|
504
|
+
contactId?: string;
|
|
1150
505
|
/**
|
|
1151
|
-
*
|
|
1152
|
-
*
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
/**
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
EXTERNAL_PROVIDER_TRIGGER = "EXTERNAL_PROVIDER_TRIGGER",
|
|
1174
|
-
PRICE_INCREASE = "PRICE_INCREASE"
|
|
1175
|
-
}
|
|
1176
|
-
/** Triggered when a subscription's price is increased. */
|
|
1177
|
-
interface ProductPriceIncreaseData {
|
|
1178
|
-
/** Price of the subscription before the update. */
|
|
1179
|
-
previousPrice?: string | null;
|
|
1180
|
-
/** A value that is used in order to select the correct email template to send the user regarding the price increase. */
|
|
1181
|
-
emailTemplateSelector?: string | null;
|
|
1182
|
-
/** Used to differentiate between migration segments. Does not have to be unique per segment. */
|
|
1183
|
-
segmentName?: string | null;
|
|
1184
|
-
/** Used to determine how the price increase was triggered. */
|
|
1185
|
-
priceIncreaseTrigger?: PriceIncreaseTrigger;
|
|
1186
|
-
}
|
|
1187
|
-
/** Reason for Price Increase Trigger */
|
|
1188
|
-
declare enum PriceIncreaseTrigger {
|
|
1189
|
-
NEAR_RENEWAL = "NEAR_RENEWAL",
|
|
1190
|
-
RECURRING_SUCCESS = "RECURRING_SUCCESS",
|
|
1191
|
-
MANUAL = "MANUAL"
|
|
1192
|
-
}
|
|
1193
|
-
/** Triggered when a subscription's product is adusted. */
|
|
1194
|
-
declare enum ProductAdjustment {
|
|
1195
|
-
/** flag to show that the ContractSwitchedEvent is not applicable / needed */
|
|
1196
|
-
NOT_APPLICABLE = "NOT_APPLICABLE",
|
|
1197
|
-
/** flag to show that the ContractSwitchedEvent is a Downgrade */
|
|
1198
|
-
DOWNGRADE = "DOWNGRADE"
|
|
1199
|
-
}
|
|
1200
|
-
/**
|
|
1201
|
-
* Triggered when a subscription gets close to the end of its billing cycle.
|
|
1202
|
-
* The exact number of days is defined in the billing system.
|
|
1203
|
-
*/
|
|
1204
|
-
interface SubscriptionNearEndOfPeriod {
|
|
1205
|
-
/** Subscription that got close to the end of its billing cycle. */
|
|
1206
|
-
subscription?: Subscription;
|
|
1207
|
-
/** Whether the subscription is within the free trial period. */
|
|
1208
|
-
inFreeTrial?: boolean;
|
|
1209
|
-
}
|
|
1210
|
-
/**
|
|
1211
|
-
* Triggered when a subscription is updated and the change doesn't happen
|
|
1212
|
-
* immediately but at the end of the current billing cycle.
|
|
1213
|
-
*/
|
|
1214
|
-
interface SubscriptionPendingChange {
|
|
1215
|
-
/** Subscription for which a pending update is triggered. */
|
|
1216
|
-
subscription?: Subscription;
|
|
506
|
+
* Customer who referred this ReferredFriend.
|
|
507
|
+
* @readonly
|
|
508
|
+
*/
|
|
509
|
+
referringCustomerId?: string;
|
|
510
|
+
}
|
|
511
|
+
interface ReferredFriendActionEvent {
|
|
512
|
+
/** ReferredFriend details. */
|
|
513
|
+
referredFriendDetails?: ReferredFriendDetails$2;
|
|
514
|
+
/** Trigger details. */
|
|
515
|
+
trigger?: Trigger;
|
|
516
|
+
/** Amount. */
|
|
517
|
+
amount?: string | null;
|
|
518
|
+
/** Currency. */
|
|
519
|
+
currency?: string | null;
|
|
520
|
+
/** Order ID. */
|
|
521
|
+
orderId?: string | null;
|
|
522
|
+
}
|
|
523
|
+
interface Trigger {
|
|
524
|
+
/** App ID. */
|
|
525
|
+
appId?: string;
|
|
526
|
+
/** Activity type. */
|
|
527
|
+
activityType?: string;
|
|
1217
528
|
}
|
|
1218
529
|
interface MessageEnvelope$3 {
|
|
1219
530
|
/** App instance ID. */
|
|
@@ -1255,239 +566,77 @@ declare enum WebhookIdentityType$3 {
|
|
|
1255
566
|
WIX_USER = "WIX_USER",
|
|
1256
567
|
APP = "APP"
|
|
1257
568
|
}
|
|
1258
|
-
interface
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
couponOptions?: {
|
|
1263
|
-
fixedAmountOptions?: {
|
|
1264
|
-
amount: number;
|
|
1265
|
-
};
|
|
1266
|
-
percentageOptions?: {
|
|
1267
|
-
percentage: number;
|
|
1268
|
-
};
|
|
1269
|
-
minimumSubtotal: number;
|
|
1270
|
-
scope?: {
|
|
1271
|
-
namespace: string;
|
|
1272
|
-
group?: {
|
|
1273
|
-
name: string;
|
|
1274
|
-
};
|
|
1275
|
-
};
|
|
1276
|
-
name: string;
|
|
1277
|
-
discountType: DiscountType$1;
|
|
1278
|
-
};
|
|
1279
|
-
loyaltyPointsOptions?: {
|
|
1280
|
-
amount: number;
|
|
1281
|
-
};
|
|
1282
|
-
type: Type;
|
|
569
|
+
interface GetReferralEventResponseNonNullableFields {
|
|
570
|
+
referralEvent?: {
|
|
571
|
+
referredFriendSignupEvent?: {
|
|
572
|
+
referredFriendId: string;
|
|
1283
573
|
};
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
namespace: string;
|
|
1295
|
-
group?: {
|
|
1296
|
-
name: string;
|
|
1297
|
-
};
|
|
1298
|
-
};
|
|
1299
|
-
name: string;
|
|
1300
|
-
discountType: DiscountType$1;
|
|
1301
|
-
};
|
|
1302
|
-
loyaltyPointsOptions?: {
|
|
1303
|
-
amount: number;
|
|
574
|
+
successfulReferralEvent?: {
|
|
575
|
+
referredFriendId: string;
|
|
576
|
+
referringCustomerId: string;
|
|
577
|
+
};
|
|
578
|
+
actionEvent?: {
|
|
579
|
+
referredFriendId: string;
|
|
580
|
+
referringCustomerId: string;
|
|
581
|
+
trigger?: {
|
|
582
|
+
appId: string;
|
|
583
|
+
activityType: string;
|
|
1304
584
|
};
|
|
1305
|
-
type: Type;
|
|
1306
585
|
};
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
586
|
+
rewardEvent?: {
|
|
587
|
+
rewardedReferringCustomerId: string;
|
|
588
|
+
rewardedReferredFriendId: string;
|
|
589
|
+
referralRewardId: string;
|
|
590
|
+
rewardType: Reward$1;
|
|
1312
591
|
};
|
|
1313
592
|
};
|
|
1314
593
|
}
|
|
1315
|
-
interface
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
couponOptions?: {
|
|
1320
|
-
fixedAmountOptions?: {
|
|
1321
|
-
amount: number;
|
|
1322
|
-
};
|
|
1323
|
-
percentageOptions?: {
|
|
1324
|
-
percentage: number;
|
|
1325
|
-
};
|
|
1326
|
-
minimumSubtotal: number;
|
|
1327
|
-
scope?: {
|
|
1328
|
-
namespace: string;
|
|
1329
|
-
group?: {
|
|
1330
|
-
name: string;
|
|
1331
|
-
};
|
|
1332
|
-
};
|
|
1333
|
-
name: string;
|
|
1334
|
-
discountType: DiscountType$1;
|
|
1335
|
-
};
|
|
1336
|
-
loyaltyPointsOptions?: {
|
|
1337
|
-
amount: number;
|
|
1338
|
-
};
|
|
1339
|
-
type: Type;
|
|
594
|
+
interface QueryReferralEventResponseNonNullableFields {
|
|
595
|
+
referralEvents: {
|
|
596
|
+
referredFriendSignupEvent?: {
|
|
597
|
+
referredFriendId: string;
|
|
1340
598
|
};
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
namespace: string;
|
|
1352
|
-
group?: {
|
|
1353
|
-
name: string;
|
|
1354
|
-
};
|
|
1355
|
-
};
|
|
1356
|
-
name: string;
|
|
1357
|
-
discountType: DiscountType$1;
|
|
1358
|
-
};
|
|
1359
|
-
loyaltyPointsOptions?: {
|
|
1360
|
-
amount: number;
|
|
599
|
+
successfulReferralEvent?: {
|
|
600
|
+
referredFriendId: string;
|
|
601
|
+
referringCustomerId: string;
|
|
602
|
+
};
|
|
603
|
+
actionEvent?: {
|
|
604
|
+
referredFriendId: string;
|
|
605
|
+
referringCustomerId: string;
|
|
606
|
+
trigger?: {
|
|
607
|
+
appId: string;
|
|
608
|
+
activityType: string;
|
|
1361
609
|
};
|
|
1362
|
-
type: Type;
|
|
1363
610
|
};
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
611
|
+
rewardEvent?: {
|
|
612
|
+
rewardedReferringCustomerId: string;
|
|
613
|
+
rewardedReferredFriendId: string;
|
|
614
|
+
referralRewardId: string;
|
|
615
|
+
rewardType: Reward$1;
|
|
1369
616
|
};
|
|
1370
617
|
}[];
|
|
1371
618
|
}
|
|
1372
|
-
interface
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
couponOptions?: {
|
|
1377
|
-
fixedAmountOptions?: {
|
|
1378
|
-
amount: number;
|
|
1379
|
-
};
|
|
1380
|
-
percentageOptions?: {
|
|
1381
|
-
percentage: number;
|
|
1382
|
-
};
|
|
1383
|
-
minimumSubtotal: number;
|
|
1384
|
-
scope?: {
|
|
1385
|
-
namespace: string;
|
|
1386
|
-
group?: {
|
|
1387
|
-
name: string;
|
|
1388
|
-
};
|
|
1389
|
-
};
|
|
1390
|
-
name: string;
|
|
1391
|
-
discountType: DiscountType$1;
|
|
1392
|
-
};
|
|
1393
|
-
loyaltyPointsOptions?: {
|
|
1394
|
-
amount: number;
|
|
1395
|
-
};
|
|
1396
|
-
type: Type;
|
|
1397
|
-
};
|
|
1398
|
-
referringCustomerReward?: {
|
|
1399
|
-
couponOptions?: {
|
|
1400
|
-
fixedAmountOptions?: {
|
|
1401
|
-
amount: number;
|
|
1402
|
-
};
|
|
1403
|
-
percentageOptions?: {
|
|
1404
|
-
percentage: number;
|
|
1405
|
-
};
|
|
1406
|
-
minimumSubtotal: number;
|
|
1407
|
-
scope?: {
|
|
1408
|
-
namespace: string;
|
|
1409
|
-
group?: {
|
|
1410
|
-
name: string;
|
|
1411
|
-
};
|
|
1412
|
-
};
|
|
1413
|
-
name: string;
|
|
1414
|
-
discountType: DiscountType$1;
|
|
1415
|
-
};
|
|
1416
|
-
loyaltyPointsOptions?: {
|
|
1417
|
-
amount: number;
|
|
1418
|
-
};
|
|
1419
|
-
type: Type;
|
|
1420
|
-
};
|
|
1421
|
-
successfulReferralActions: Action[];
|
|
1422
|
-
isPremium: boolean;
|
|
1423
|
-
emails?: {
|
|
1424
|
-
encourageToReferFriends: App[];
|
|
1425
|
-
notifyCustomersAboutReward: boolean;
|
|
1426
|
-
};
|
|
1427
|
-
};
|
|
619
|
+
interface GetReferralStatisticsResponseNonNullableFields {
|
|
620
|
+
totalSignUpsCompleted: number;
|
|
621
|
+
totalActionsCompleted: number;
|
|
622
|
+
totalAmountGenerated: string;
|
|
1428
623
|
}
|
|
1429
|
-
interface
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
percentageOptions?: {
|
|
1438
|
-
percentage: number;
|
|
1439
|
-
};
|
|
1440
|
-
minimumSubtotal: number;
|
|
1441
|
-
scope?: {
|
|
1442
|
-
namespace: string;
|
|
1443
|
-
group?: {
|
|
1444
|
-
name: string;
|
|
1445
|
-
};
|
|
1446
|
-
};
|
|
1447
|
-
name: string;
|
|
1448
|
-
discountType: DiscountType$1;
|
|
1449
|
-
};
|
|
1450
|
-
loyaltyPointsOptions?: {
|
|
1451
|
-
amount: number;
|
|
1452
|
-
};
|
|
1453
|
-
type: Type;
|
|
1454
|
-
};
|
|
1455
|
-
referringCustomerReward?: {
|
|
1456
|
-
couponOptions?: {
|
|
1457
|
-
fixedAmountOptions?: {
|
|
1458
|
-
amount: number;
|
|
1459
|
-
};
|
|
1460
|
-
percentageOptions?: {
|
|
1461
|
-
percentage: number;
|
|
1462
|
-
};
|
|
1463
|
-
minimumSubtotal: number;
|
|
1464
|
-
scope?: {
|
|
1465
|
-
namespace: string;
|
|
1466
|
-
group?: {
|
|
1467
|
-
name: string;
|
|
1468
|
-
};
|
|
1469
|
-
};
|
|
1470
|
-
name: string;
|
|
1471
|
-
discountType: DiscountType$1;
|
|
1472
|
-
};
|
|
1473
|
-
loyaltyPointsOptions?: {
|
|
1474
|
-
amount: number;
|
|
1475
|
-
};
|
|
1476
|
-
type: Type;
|
|
1477
|
-
};
|
|
1478
|
-
successfulReferralActions: Action[];
|
|
1479
|
-
isPremium: boolean;
|
|
1480
|
-
emails?: {
|
|
1481
|
-
encourageToReferFriends: App[];
|
|
1482
|
-
notifyCustomersAboutReward: boolean;
|
|
1483
|
-
};
|
|
1484
|
-
};
|
|
624
|
+
interface QueryReferringCustomerTotalsResponseNonNullableFields {
|
|
625
|
+
referringCustomerTotals: {
|
|
626
|
+
referringCustomerId: string;
|
|
627
|
+
contactId: string;
|
|
628
|
+
totalSuccessfulReferrals: number;
|
|
629
|
+
totalAmountGenerated: string;
|
|
630
|
+
totalFriendsWithActions: number;
|
|
631
|
+
}[];
|
|
1485
632
|
}
|
|
1486
|
-
interface
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
633
|
+
interface QueryReferredFriendActionsResponseNonNullableFields {
|
|
634
|
+
referredFriendActions: {
|
|
635
|
+
coupon?: {
|
|
636
|
+
_id: string;
|
|
637
|
+
code: string;
|
|
638
|
+
status: Status$2;
|
|
639
|
+
couponSpecification?: {
|
|
1491
640
|
fixedAmountOptions?: {
|
|
1492
641
|
amount: number;
|
|
1493
642
|
};
|
|
@@ -1504,58 +653,23 @@ interface PauseReferralProgramResponseNonNullableFields {
|
|
|
1504
653
|
name: string;
|
|
1505
654
|
discountType: DiscountType$1;
|
|
1506
655
|
};
|
|
1507
|
-
loyaltyPointsOptions?: {
|
|
1508
|
-
amount: number;
|
|
1509
|
-
};
|
|
1510
|
-
type: Type;
|
|
1511
656
|
};
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
amount: number;
|
|
1516
|
-
};
|
|
1517
|
-
percentageOptions?: {
|
|
1518
|
-
percentage: number;
|
|
1519
|
-
};
|
|
1520
|
-
minimumSubtotal: number;
|
|
1521
|
-
scope?: {
|
|
1522
|
-
namespace: string;
|
|
1523
|
-
group?: {
|
|
1524
|
-
name: string;
|
|
1525
|
-
};
|
|
1526
|
-
};
|
|
1527
|
-
name: string;
|
|
1528
|
-
discountType: DiscountType$1;
|
|
1529
|
-
};
|
|
1530
|
-
loyaltyPointsOptions?: {
|
|
1531
|
-
amount: number;
|
|
1532
|
-
};
|
|
1533
|
-
type: Type;
|
|
657
|
+
loyaltyPoints?: {
|
|
658
|
+
transactionId: string;
|
|
659
|
+
amount: number;
|
|
1534
660
|
};
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
661
|
+
referredFriendId: string;
|
|
662
|
+
contactId: string;
|
|
663
|
+
trigger?: {
|
|
664
|
+
appId: string;
|
|
665
|
+
activityType: string;
|
|
1540
666
|
};
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
suggestions: {
|
|
1545
|
-
postContent: string;
|
|
1546
|
-
hashtags: string[];
|
|
1547
|
-
}[];
|
|
1548
|
-
}
|
|
1549
|
-
interface GenerateAISocialMediaPostsSuggestionsResponseNonNullableFields {
|
|
1550
|
-
suggestions: {
|
|
1551
|
-
postContent: string;
|
|
1552
|
-
hashtags: string[];
|
|
667
|
+
rewardType: Reward$1;
|
|
668
|
+
totalActions: number;
|
|
669
|
+
totalAmountSpent: string;
|
|
1553
670
|
}[];
|
|
1554
671
|
}
|
|
1555
|
-
interface
|
|
1556
|
-
referralProgram: boolean;
|
|
1557
|
-
}
|
|
1558
|
-
interface BaseEventMetadata$3 {
|
|
672
|
+
interface BaseEventMetadata$2 {
|
|
1559
673
|
/** App instance ID. */
|
|
1560
674
|
instanceId?: string | null;
|
|
1561
675
|
/** Event type. */
|
|
@@ -1563,7 +677,7 @@ interface BaseEventMetadata$3 {
|
|
|
1563
677
|
/** The identification type and identity data. */
|
|
1564
678
|
identity?: IdentificationData$3;
|
|
1565
679
|
}
|
|
1566
|
-
interface EventMetadata$
|
|
680
|
+
interface EventMetadata$2 extends BaseEventMetadata$2 {
|
|
1567
681
|
/**
|
|
1568
682
|
* Unique event ID.
|
|
1569
683
|
* Allows clients to ignore duplicate webhooks.
|
|
@@ -1601,538 +715,276 @@ interface EventMetadata$3 extends BaseEventMetadata$3 {
|
|
|
1601
715
|
*/
|
|
1602
716
|
entityEventSequence?: string | null;
|
|
1603
717
|
}
|
|
1604
|
-
interface
|
|
1605
|
-
entity:
|
|
1606
|
-
metadata: EventMetadata$
|
|
718
|
+
interface ReferralEventCreatedEnvelope {
|
|
719
|
+
entity: ReferralEvent;
|
|
720
|
+
metadata: EventMetadata$2;
|
|
1607
721
|
}
|
|
1608
|
-
interface QueryCursorResult$
|
|
722
|
+
interface QueryCursorResult$2 {
|
|
1609
723
|
cursors: Cursors$3;
|
|
1610
724
|
hasNext: () => boolean;
|
|
1611
725
|
hasPrev: () => boolean;
|
|
1612
726
|
length: number;
|
|
1613
727
|
pageSize: number;
|
|
1614
728
|
}
|
|
1615
|
-
interface
|
|
1616
|
-
items:
|
|
1617
|
-
query:
|
|
1618
|
-
next: () => Promise<
|
|
1619
|
-
prev: () => Promise<
|
|
729
|
+
interface ReferralEventsQueryResult extends QueryCursorResult$2 {
|
|
730
|
+
items: ReferralEvent[];
|
|
731
|
+
query: ReferralEventsQueryBuilder;
|
|
732
|
+
next: () => Promise<ReferralEventsQueryResult>;
|
|
733
|
+
prev: () => Promise<ReferralEventsQueryResult>;
|
|
1620
734
|
}
|
|
1621
|
-
interface
|
|
1622
|
-
/** @param
|
|
735
|
+
interface ReferralEventsQueryBuilder {
|
|
736
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
737
|
+
* @param value - Value to compare against.
|
|
1623
738
|
* @documentationMaturity preview
|
|
1624
739
|
*/
|
|
1625
|
-
|
|
1626
|
-
/** @param
|
|
740
|
+
eq: (propertyName: '_createdDate' | '_updatedDate', value: any) => ReferralEventsQueryBuilder;
|
|
741
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
742
|
+
* @param value - Value to compare against.
|
|
1627
743
|
* @documentationMaturity preview
|
|
1628
744
|
*/
|
|
1629
|
-
|
|
1630
|
-
/** @
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
interface GetAiSocialMediaPostsSuggestionsOptions {
|
|
1634
|
-
/** The topic to generate suggestions for. */
|
|
1635
|
-
topic?: string;
|
|
1636
|
-
}
|
|
1637
|
-
interface GenerateAiSocialMediaPostsSuggestionsOptions {
|
|
1638
|
-
/** The topic to generate suggestions for. */
|
|
1639
|
-
topic?: string;
|
|
1640
|
-
}
|
|
1641
|
-
|
|
1642
|
-
interface HttpClient$3 {
|
|
1643
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$3<TResponse, TData>): Promise<HttpResponse$3<TResponse>>;
|
|
1644
|
-
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
1645
|
-
}
|
|
1646
|
-
type RequestOptionsFactory$3<TResponse = any, TData = any> = (context: any) => RequestOptions$3<TResponse, TData>;
|
|
1647
|
-
type HttpResponse$3<T = any> = {
|
|
1648
|
-
data: T;
|
|
1649
|
-
status: number;
|
|
1650
|
-
statusText: string;
|
|
1651
|
-
headers: any;
|
|
1652
|
-
request?: any;
|
|
1653
|
-
};
|
|
1654
|
-
type RequestOptions$3<_TResponse = any, Data = any> = {
|
|
1655
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
1656
|
-
url: string;
|
|
1657
|
-
data?: Data;
|
|
1658
|
-
params?: URLSearchParams;
|
|
1659
|
-
} & APIMetadata$3;
|
|
1660
|
-
type APIMetadata$3 = {
|
|
1661
|
-
methodFqn?: string;
|
|
1662
|
-
entityFqdn?: string;
|
|
1663
|
-
packageName?: string;
|
|
1664
|
-
};
|
|
1665
|
-
type EventDefinition$3<Payload = unknown, Type extends string = string> = {
|
|
1666
|
-
__type: 'event-definition';
|
|
1667
|
-
type: Type;
|
|
1668
|
-
isDomainEvent?: boolean;
|
|
1669
|
-
transformations?: (envelope: unknown) => Payload;
|
|
1670
|
-
__payload: Payload;
|
|
1671
|
-
};
|
|
1672
|
-
declare function EventDefinition$3<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$3<Payload, Type>;
|
|
1673
|
-
|
|
1674
|
-
declare global {
|
|
1675
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
1676
|
-
interface SymbolConstructor {
|
|
1677
|
-
readonly observable: symbol;
|
|
1678
|
-
}
|
|
1679
|
-
}
|
|
1680
|
-
|
|
1681
|
-
declare const __metadata$3: {
|
|
1682
|
-
PACKAGE_NAME: string;
|
|
1683
|
-
};
|
|
1684
|
-
declare function getReferralProgram(httpClient: HttpClient$3): () => Promise<GetReferralProgramResponse & GetReferralProgramResponseNonNullableFields>;
|
|
1685
|
-
declare function queryReferralPrograms(httpClient: HttpClient$3): () => ReferralProgramsQueryBuilder;
|
|
1686
|
-
declare function updateReferralProgram(httpClient: HttpClient$3): (referralProgram: ReferralProgram) => Promise<UpdateReferralProgramResponse & UpdateReferralProgramResponseNonNullableFields>;
|
|
1687
|
-
declare function activateReferralProgram(httpClient: HttpClient$3): () => Promise<ActivateReferralProgramResponse & ActivateReferralProgramResponseNonNullableFields>;
|
|
1688
|
-
declare function pauseReferralProgram(httpClient: HttpClient$3): () => Promise<PauseReferralProgramResponse & PauseReferralProgramResponseNonNullableFields>;
|
|
1689
|
-
declare function getAiSocialMediaPostsSuggestions(httpClient: HttpClient$3): (options?: GetAiSocialMediaPostsSuggestionsOptions) => Promise<GetAISocialMediaPostsSuggestionsResponse & GetAISocialMediaPostsSuggestionsResponseNonNullableFields>;
|
|
1690
|
-
declare function generateAiSocialMediaPostsSuggestions(httpClient: HttpClient$3): (options?: GenerateAiSocialMediaPostsSuggestionsOptions) => Promise<GenerateAISocialMediaPostsSuggestionsResponse & GenerateAISocialMediaPostsSuggestionsResponseNonNullableFields>;
|
|
1691
|
-
declare function getReferralProgramPremiumFeatures(httpClient: HttpClient$3): () => Promise<GetReferralProgramPremiumFeaturesResponse & GetReferralProgramPremiumFeaturesResponseNonNullableFields>;
|
|
1692
|
-
declare const onProgramUpdated: EventDefinition$3<ProgramUpdatedEnvelope, "wix.loyalty.referral.v1.program_updated">;
|
|
1693
|
-
|
|
1694
|
-
type index_d$3_AISocialMediaPostSuggestion = AISocialMediaPostSuggestion;
|
|
1695
|
-
type index_d$3_Action = Action;
|
|
1696
|
-
declare const index_d$3_Action: typeof Action;
|
|
1697
|
-
type index_d$3_ActivateReferralProgramRequest = ActivateReferralProgramRequest;
|
|
1698
|
-
type index_d$3_ActivateReferralProgramResponse = ActivateReferralProgramResponse;
|
|
1699
|
-
type index_d$3_ActivateReferralProgramResponseNonNullableFields = ActivateReferralProgramResponseNonNullableFields;
|
|
1700
|
-
type index_d$3_App = App;
|
|
1701
|
-
declare const index_d$3_App: typeof App;
|
|
1702
|
-
type index_d$3_Asset = Asset;
|
|
1703
|
-
type index_d$3_BillingReference = BillingReference;
|
|
1704
|
-
type index_d$3_BulkGetReferralProgramRequest = BulkGetReferralProgramRequest;
|
|
1705
|
-
type index_d$3_BulkGetReferralProgramResponse = BulkGetReferralProgramResponse;
|
|
1706
|
-
type index_d$3_CancellationDetails = CancellationDetails;
|
|
1707
|
-
type index_d$3_ContractSwitchReason = ContractSwitchReason;
|
|
1708
|
-
declare const index_d$3_ContractSwitchReason: typeof ContractSwitchReason;
|
|
1709
|
-
type index_d$3_ContractSwitchType = ContractSwitchType;
|
|
1710
|
-
declare const index_d$3_ContractSwitchType: typeof ContractSwitchType;
|
|
1711
|
-
type index_d$3_ContractSwitched = ContractSwitched;
|
|
1712
|
-
type index_d$3_Cycle = Cycle;
|
|
1713
|
-
type index_d$3_CycleCycleSelectorOneOf = CycleCycleSelectorOneOf;
|
|
1714
|
-
type index_d$3_DeleteContext = DeleteContext;
|
|
1715
|
-
type index_d$3_DeleteStatus = DeleteStatus;
|
|
1716
|
-
declare const index_d$3_DeleteStatus: typeof DeleteStatus;
|
|
1717
|
-
type index_d$3_Emails = Emails;
|
|
1718
|
-
type index_d$3_GenerateAISocialMediaPostsSuggestionsRequest = GenerateAISocialMediaPostsSuggestionsRequest;
|
|
1719
|
-
type index_d$3_GenerateAISocialMediaPostsSuggestionsResponse = GenerateAISocialMediaPostsSuggestionsResponse;
|
|
1720
|
-
type index_d$3_GenerateAISocialMediaPostsSuggestionsResponseNonNullableFields = GenerateAISocialMediaPostsSuggestionsResponseNonNullableFields;
|
|
1721
|
-
type index_d$3_GenerateAiSocialMediaPostsSuggestionsOptions = GenerateAiSocialMediaPostsSuggestionsOptions;
|
|
1722
|
-
type index_d$3_GetAISocialMediaPostsSuggestionsRequest = GetAISocialMediaPostsSuggestionsRequest;
|
|
1723
|
-
type index_d$3_GetAISocialMediaPostsSuggestionsResponse = GetAISocialMediaPostsSuggestionsResponse;
|
|
1724
|
-
type index_d$3_GetAISocialMediaPostsSuggestionsResponseNonNullableFields = GetAISocialMediaPostsSuggestionsResponseNonNullableFields;
|
|
1725
|
-
type index_d$3_GetAiSocialMediaPostsSuggestionsOptions = GetAiSocialMediaPostsSuggestionsOptions;
|
|
1726
|
-
type index_d$3_GetReferralProgramPremiumFeaturesRequest = GetReferralProgramPremiumFeaturesRequest;
|
|
1727
|
-
type index_d$3_GetReferralProgramPremiumFeaturesResponse = GetReferralProgramPremiumFeaturesResponse;
|
|
1728
|
-
type index_d$3_GetReferralProgramPremiumFeaturesResponseNonNullableFields = GetReferralProgramPremiumFeaturesResponseNonNullableFields;
|
|
1729
|
-
type index_d$3_GetReferralProgramRequest = GetReferralProgramRequest;
|
|
1730
|
-
type index_d$3_GetReferralProgramResponse = GetReferralProgramResponse;
|
|
1731
|
-
type index_d$3_GetReferralProgramResponseNonNullableFields = GetReferralProgramResponseNonNullableFields;
|
|
1732
|
-
type index_d$3_HtmlSitePublished = HtmlSitePublished;
|
|
1733
|
-
type index_d$3_Initiator = Initiator;
|
|
1734
|
-
declare const index_d$3_Initiator: typeof Initiator;
|
|
1735
|
-
type index_d$3_Interval = Interval;
|
|
1736
|
-
type index_d$3_IntervalUnit = IntervalUnit;
|
|
1737
|
-
declare const index_d$3_IntervalUnit: typeof IntervalUnit;
|
|
1738
|
-
type index_d$3_MetaSiteSpecialEvent = MetaSiteSpecialEvent;
|
|
1739
|
-
type index_d$3_MetaSiteSpecialEventPayloadOneOf = MetaSiteSpecialEventPayloadOneOf;
|
|
1740
|
-
type index_d$3_Namespace = Namespace;
|
|
1741
|
-
declare const index_d$3_Namespace: typeof Namespace;
|
|
1742
|
-
type index_d$3_NamespaceChanged = NamespaceChanged;
|
|
1743
|
-
type index_d$3_OneTime = OneTime;
|
|
1744
|
-
type index_d$3_Page = Page;
|
|
1745
|
-
type index_d$3_PauseReferralProgramRequest = PauseReferralProgramRequest;
|
|
1746
|
-
type index_d$3_PauseReferralProgramResponse = PauseReferralProgramResponse;
|
|
1747
|
-
type index_d$3_PauseReferralProgramResponseNonNullableFields = PauseReferralProgramResponseNonNullableFields;
|
|
1748
|
-
type index_d$3_PriceIncreaseTrigger = PriceIncreaseTrigger;
|
|
1749
|
-
declare const index_d$3_PriceIncreaseTrigger: typeof PriceIncreaseTrigger;
|
|
1750
|
-
type index_d$3_ProductAdjustment = ProductAdjustment;
|
|
1751
|
-
declare const index_d$3_ProductAdjustment: typeof ProductAdjustment;
|
|
1752
|
-
type index_d$3_ProductPriceIncreaseData = ProductPriceIncreaseData;
|
|
1753
|
-
type index_d$3_ProgramInSite = ProgramInSite;
|
|
1754
|
-
type index_d$3_ProgramStatus = ProgramStatus;
|
|
1755
|
-
declare const index_d$3_ProgramStatus: typeof ProgramStatus;
|
|
1756
|
-
type index_d$3_ProgramUpdatedEnvelope = ProgramUpdatedEnvelope;
|
|
1757
|
-
type index_d$3_ProviderName = ProviderName;
|
|
1758
|
-
declare const index_d$3_ProviderName: typeof ProviderName;
|
|
1759
|
-
type index_d$3_QueryReferralProgramsRequest = QueryReferralProgramsRequest;
|
|
1760
|
-
type index_d$3_QueryReferralProgramsResponse = QueryReferralProgramsResponse;
|
|
1761
|
-
type index_d$3_QueryReferralProgramsResponseNonNullableFields = QueryReferralProgramsResponseNonNullableFields;
|
|
1762
|
-
type index_d$3_ReactivationData = ReactivationData;
|
|
1763
|
-
type index_d$3_ReactivationReasonEnum = ReactivationReasonEnum;
|
|
1764
|
-
declare const index_d$3_ReactivationReasonEnum: typeof ReactivationReasonEnum;
|
|
1765
|
-
type index_d$3_RecurringChargeSucceeded = RecurringChargeSucceeded;
|
|
1766
|
-
type index_d$3_ReferralProgram = ReferralProgram;
|
|
1767
|
-
type index_d$3_ReferralProgramsQueryBuilder = ReferralProgramsQueryBuilder;
|
|
1768
|
-
type index_d$3_ReferralProgramsQueryResult = ReferralProgramsQueryResult;
|
|
1769
|
-
type index_d$3_RewardOptionsOneOf = RewardOptionsOneOf;
|
|
1770
|
-
type index_d$3_ServiceProvisioned = ServiceProvisioned;
|
|
1771
|
-
type index_d$3_ServiceRemoved = ServiceRemoved;
|
|
1772
|
-
type index_d$3_SiteCreated = SiteCreated;
|
|
1773
|
-
type index_d$3_SiteCreatedContext = SiteCreatedContext;
|
|
1774
|
-
declare const index_d$3_SiteCreatedContext: typeof SiteCreatedContext;
|
|
1775
|
-
type index_d$3_SiteDeleted = SiteDeleted;
|
|
1776
|
-
type index_d$3_SiteHardDeleted = SiteHardDeleted;
|
|
1777
|
-
type index_d$3_SiteMarkedAsTemplate = SiteMarkedAsTemplate;
|
|
1778
|
-
type index_d$3_SiteMarkedAsWixSite = SiteMarkedAsWixSite;
|
|
1779
|
-
type index_d$3_SitePublished = SitePublished;
|
|
1780
|
-
type index_d$3_SiteRenamed = SiteRenamed;
|
|
1781
|
-
type index_d$3_SiteTransferred = SiteTransferred;
|
|
1782
|
-
type index_d$3_SiteUndeleted = SiteUndeleted;
|
|
1783
|
-
type index_d$3_SiteUnpublished = SiteUnpublished;
|
|
1784
|
-
type index_d$3_State = State;
|
|
1785
|
-
declare const index_d$3_State: typeof State;
|
|
1786
|
-
type index_d$3_StudioAssigned = StudioAssigned;
|
|
1787
|
-
type index_d$3_StudioUnassigned = StudioUnassigned;
|
|
1788
|
-
type index_d$3_Subscription = Subscription;
|
|
1789
|
-
type index_d$3_SubscriptionAssigned = SubscriptionAssigned;
|
|
1790
|
-
type index_d$3_SubscriptionAutoRenewTurnedOff = SubscriptionAutoRenewTurnedOff;
|
|
1791
|
-
type index_d$3_SubscriptionAutoRenewTurnedOn = SubscriptionAutoRenewTurnedOn;
|
|
1792
|
-
type index_d$3_SubscriptionCancelled = SubscriptionCancelled;
|
|
1793
|
-
type index_d$3_SubscriptionCreated = SubscriptionCreated;
|
|
1794
|
-
type index_d$3_SubscriptionEvent = SubscriptionEvent;
|
|
1795
|
-
type index_d$3_SubscriptionEventEventOneOf = SubscriptionEventEventOneOf;
|
|
1796
|
-
type index_d$3_SubscriptionNearEndOfPeriod = SubscriptionNearEndOfPeriod;
|
|
1797
|
-
type index_d$3_SubscriptionPendingChange = SubscriptionPendingChange;
|
|
1798
|
-
type index_d$3_SubscriptionStatus = SubscriptionStatus;
|
|
1799
|
-
declare const index_d$3_SubscriptionStatus: typeof SubscriptionStatus;
|
|
1800
|
-
type index_d$3_SubscriptionTransferred = SubscriptionTransferred;
|
|
1801
|
-
type index_d$3_SubscriptionUnassigned = SubscriptionUnassigned;
|
|
1802
|
-
type index_d$3_Type = Type;
|
|
1803
|
-
declare const index_d$3_Type: typeof Type;
|
|
1804
|
-
type index_d$3_UnassignReason = UnassignReason;
|
|
1805
|
-
declare const index_d$3_UnassignReason: typeof UnassignReason;
|
|
1806
|
-
type index_d$3_UpdateReferralProgramRequest = UpdateReferralProgramRequest;
|
|
1807
|
-
type index_d$3_UpdateReferralProgramResponse = UpdateReferralProgramResponse;
|
|
1808
|
-
type index_d$3_UpdateReferralProgramResponseNonNullableFields = UpdateReferralProgramResponseNonNullableFields;
|
|
1809
|
-
declare const index_d$3_activateReferralProgram: typeof activateReferralProgram;
|
|
1810
|
-
declare const index_d$3_generateAiSocialMediaPostsSuggestions: typeof generateAiSocialMediaPostsSuggestions;
|
|
1811
|
-
declare const index_d$3_getAiSocialMediaPostsSuggestions: typeof getAiSocialMediaPostsSuggestions;
|
|
1812
|
-
declare const index_d$3_getReferralProgram: typeof getReferralProgram;
|
|
1813
|
-
declare const index_d$3_getReferralProgramPremiumFeatures: typeof getReferralProgramPremiumFeatures;
|
|
1814
|
-
declare const index_d$3_onProgramUpdated: typeof onProgramUpdated;
|
|
1815
|
-
declare const index_d$3_pauseReferralProgram: typeof pauseReferralProgram;
|
|
1816
|
-
declare const index_d$3_queryReferralPrograms: typeof queryReferralPrograms;
|
|
1817
|
-
declare const index_d$3_updateReferralProgram: typeof updateReferralProgram;
|
|
1818
|
-
declare namespace index_d$3 {
|
|
1819
|
-
export { type index_d$3_AISocialMediaPostSuggestion as AISocialMediaPostSuggestion, index_d$3_Action as Action, type ActionEvent$3 as ActionEvent, type index_d$3_ActivateReferralProgramRequest as ActivateReferralProgramRequest, type index_d$3_ActivateReferralProgramResponse as ActivateReferralProgramResponse, type index_d$3_ActivateReferralProgramResponseNonNullableFields as ActivateReferralProgramResponseNonNullableFields, index_d$3_App as App, type index_d$3_Asset as Asset, type BaseEventMetadata$3 as BaseEventMetadata, type index_d$3_BillingReference as BillingReference, type index_d$3_BulkGetReferralProgramRequest as BulkGetReferralProgramRequest, type index_d$3_BulkGetReferralProgramResponse as BulkGetReferralProgramResponse, type index_d$3_CancellationDetails as CancellationDetails, index_d$3_ContractSwitchReason as ContractSwitchReason, index_d$3_ContractSwitchType as ContractSwitchType, type index_d$3_ContractSwitched as ContractSwitched, type Coupon$1 as Coupon, type CouponDiscountTypeOptionsOneOf$1 as CouponDiscountTypeOptionsOneOf, type CouponScope$1 as CouponScope, type CouponScopeOrMinSubtotalOneOf$1 as CouponScopeOrMinSubtotalOneOf, type CursorPaging$3 as CursorPaging, type CursorPagingMetadata$3 as CursorPagingMetadata, type CursorQuery$3 as CursorQuery, type CursorQueryPagingMethodOneOf$3 as CursorQueryPagingMethodOneOf, type Cursors$3 as Cursors, type index_d$3_Cycle as Cycle, type index_d$3_CycleCycleSelectorOneOf as CycleCycleSelectorOneOf, type index_d$3_DeleteContext as DeleteContext, index_d$3_DeleteStatus as DeleteStatus, DiscountType$1 as DiscountType, type DomainEvent$3 as DomainEvent, type DomainEventBodyOneOf$3 as DomainEventBodyOneOf, type index_d$3_Emails as Emails, type Empty$2 as Empty, type EntityCreatedEvent$3 as EntityCreatedEvent, type EntityDeletedEvent$3 as EntityDeletedEvent, type EntityUpdatedEvent$3 as EntityUpdatedEvent, type EventMetadata$3 as EventMetadata, type FixedAmountDiscount$1 as FixedAmountDiscount, type index_d$3_GenerateAISocialMediaPostsSuggestionsRequest as GenerateAISocialMediaPostsSuggestionsRequest, type index_d$3_GenerateAISocialMediaPostsSuggestionsResponse as GenerateAISocialMediaPostsSuggestionsResponse, type index_d$3_GenerateAISocialMediaPostsSuggestionsResponseNonNullableFields as GenerateAISocialMediaPostsSuggestionsResponseNonNullableFields, type index_d$3_GenerateAiSocialMediaPostsSuggestionsOptions as GenerateAiSocialMediaPostsSuggestionsOptions, type index_d$3_GetAISocialMediaPostsSuggestionsRequest as GetAISocialMediaPostsSuggestionsRequest, type index_d$3_GetAISocialMediaPostsSuggestionsResponse as GetAISocialMediaPostsSuggestionsResponse, type index_d$3_GetAISocialMediaPostsSuggestionsResponseNonNullableFields as GetAISocialMediaPostsSuggestionsResponseNonNullableFields, type index_d$3_GetAiSocialMediaPostsSuggestionsOptions as GetAiSocialMediaPostsSuggestionsOptions, type index_d$3_GetReferralProgramPremiumFeaturesRequest as GetReferralProgramPremiumFeaturesRequest, type index_d$3_GetReferralProgramPremiumFeaturesResponse as GetReferralProgramPremiumFeaturesResponse, type index_d$3_GetReferralProgramPremiumFeaturesResponseNonNullableFields as GetReferralProgramPremiumFeaturesResponseNonNullableFields, type index_d$3_GetReferralProgramRequest as GetReferralProgramRequest, type index_d$3_GetReferralProgramResponse as GetReferralProgramResponse, type index_d$3_GetReferralProgramResponseNonNullableFields as GetReferralProgramResponseNonNullableFields, type Group$1 as Group, type index_d$3_HtmlSitePublished as HtmlSitePublished, type IdentificationData$3 as IdentificationData, type IdentificationDataIdOneOf$3 as IdentificationDataIdOneOf, index_d$3_Initiator as Initiator, type index_d$3_Interval as Interval, index_d$3_IntervalUnit as IntervalUnit, type LoyaltyPoints$1 as LoyaltyPoints, type MessageEnvelope$3 as MessageEnvelope, type index_d$3_MetaSiteSpecialEvent as MetaSiteSpecialEvent, type index_d$3_MetaSiteSpecialEventPayloadOneOf as MetaSiteSpecialEventPayloadOneOf, index_d$3_Namespace as Namespace, type index_d$3_NamespaceChanged as NamespaceChanged, type index_d$3_OneTime as OneTime, type index_d$3_Page as Page, type index_d$3_PauseReferralProgramRequest as PauseReferralProgramRequest, type index_d$3_PauseReferralProgramResponse as PauseReferralProgramResponse, type index_d$3_PauseReferralProgramResponseNonNullableFields as PauseReferralProgramResponseNonNullableFields, type PercentageDiscount$1 as PercentageDiscount, index_d$3_PriceIncreaseTrigger as PriceIncreaseTrigger, index_d$3_ProductAdjustment as ProductAdjustment, type index_d$3_ProductPriceIncreaseData as ProductPriceIncreaseData, type index_d$3_ProgramInSite as ProgramInSite, index_d$3_ProgramStatus as ProgramStatus, type index_d$3_ProgramUpdatedEnvelope as ProgramUpdatedEnvelope, index_d$3_ProviderName as ProviderName, type index_d$3_QueryReferralProgramsRequest as QueryReferralProgramsRequest, type index_d$3_QueryReferralProgramsResponse as QueryReferralProgramsResponse, type index_d$3_QueryReferralProgramsResponseNonNullableFields as QueryReferralProgramsResponseNonNullableFields, type index_d$3_ReactivationData as ReactivationData, index_d$3_ReactivationReasonEnum as ReactivationReasonEnum, type index_d$3_RecurringChargeSucceeded as RecurringChargeSucceeded, type index_d$3_ReferralProgram as ReferralProgram, type index_d$3_ReferralProgramsQueryBuilder as ReferralProgramsQueryBuilder, type index_d$3_ReferralProgramsQueryResult as ReferralProgramsQueryResult, type Reward$1 as Reward, type index_d$3_RewardOptionsOneOf as RewardOptionsOneOf, type index_d$3_ServiceProvisioned as ServiceProvisioned, type index_d$3_ServiceRemoved as ServiceRemoved, type index_d$3_SiteCreated as SiteCreated, index_d$3_SiteCreatedContext as SiteCreatedContext, type index_d$3_SiteDeleted as SiteDeleted, type index_d$3_SiteHardDeleted as SiteHardDeleted, type index_d$3_SiteMarkedAsTemplate as SiteMarkedAsTemplate, type index_d$3_SiteMarkedAsWixSite as SiteMarkedAsWixSite, type index_d$3_SitePublished as SitePublished, type index_d$3_SiteRenamed as SiteRenamed, type index_d$3_SiteTransferred as SiteTransferred, type index_d$3_SiteUndeleted as SiteUndeleted, type index_d$3_SiteUnpublished as SiteUnpublished, SortOrder$3 as SortOrder, type Sorting$3 as Sorting, index_d$3_State as State, type index_d$3_StudioAssigned as StudioAssigned, type index_d$3_StudioUnassigned as StudioUnassigned, type index_d$3_Subscription as Subscription, type index_d$3_SubscriptionAssigned as SubscriptionAssigned, type index_d$3_SubscriptionAutoRenewTurnedOff as SubscriptionAutoRenewTurnedOff, type index_d$3_SubscriptionAutoRenewTurnedOn as SubscriptionAutoRenewTurnedOn, type index_d$3_SubscriptionCancelled as SubscriptionCancelled, type index_d$3_SubscriptionCreated as SubscriptionCreated, type index_d$3_SubscriptionEvent as SubscriptionEvent, type index_d$3_SubscriptionEventEventOneOf as SubscriptionEventEventOneOf, type index_d$3_SubscriptionNearEndOfPeriod as SubscriptionNearEndOfPeriod, type index_d$3_SubscriptionPendingChange as SubscriptionPendingChange, index_d$3_SubscriptionStatus as SubscriptionStatus, type index_d$3_SubscriptionTransferred as SubscriptionTransferred, type index_d$3_SubscriptionUnassigned as SubscriptionUnassigned, index_d$3_Type as Type, index_d$3_UnassignReason as UnassignReason, type UndeleteInfo$3 as UndeleteInfo, type index_d$3_UpdateReferralProgramRequest as UpdateReferralProgramRequest, type index_d$3_UpdateReferralProgramResponse as UpdateReferralProgramResponse, type index_d$3_UpdateReferralProgramResponseNonNullableFields as UpdateReferralProgramResponseNonNullableFields, WebhookIdentityType$3 as WebhookIdentityType, __metadata$3 as __metadata, index_d$3_activateReferralProgram as activateReferralProgram, index_d$3_generateAiSocialMediaPostsSuggestions as generateAiSocialMediaPostsSuggestions, index_d$3_getAiSocialMediaPostsSuggestions as getAiSocialMediaPostsSuggestions, index_d$3_getReferralProgram as getReferralProgram, index_d$3_getReferralProgramPremiumFeatures as getReferralProgramPremiumFeatures, index_d$3_onProgramUpdated as onProgramUpdated, index_d$3_pauseReferralProgram as pauseReferralProgram, index_d$3_queryReferralPrograms as queryReferralPrograms, index_d$3_updateReferralProgram as updateReferralProgram };
|
|
1820
|
-
}
|
|
1821
|
-
|
|
1822
|
-
/** ReferralEvent. */
|
|
1823
|
-
interface ReferralEvent extends ReferralEventEventTypeOneOf {
|
|
1824
|
-
/** ReferredFriendSignupEvent is an event that is triggered when a referred friend signs up. */
|
|
1825
|
-
referredFriendSignupEvent?: ReferredFriendSignupEvent;
|
|
1826
|
-
/** SuccessfulReferralEvent is an event that is triggered when a referral is successful. */
|
|
1827
|
-
successfulReferralEvent?: V1SuccessfulReferralEvent;
|
|
1828
|
-
/** ActionEvent is an event that is triggered when an action is performed. */
|
|
1829
|
-
actionEvent?: V1ActionEvent;
|
|
1830
|
-
/** RewardEvent is an event that is triggered when a reward is given. */
|
|
1831
|
-
rewardEvent?: RewardEvent;
|
|
1832
|
-
/**
|
|
1833
|
-
* ReferralEvent ID.
|
|
1834
|
-
* @readonly
|
|
1835
|
-
*/
|
|
1836
|
-
_id?: string | null;
|
|
1837
|
-
/** 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. */
|
|
1838
|
-
revision?: string | null;
|
|
1839
|
-
/**
|
|
1840
|
-
* Represents the time this ReferralEvent was created.
|
|
1841
|
-
* @readonly
|
|
1842
|
-
*/
|
|
1843
|
-
_createdDate?: Date;
|
|
1844
|
-
/**
|
|
1845
|
-
* Represents the time this ReferralEvent was last updated.
|
|
1846
|
-
* @readonly
|
|
1847
|
-
*/
|
|
1848
|
-
_updatedDate?: Date;
|
|
1849
|
-
}
|
|
1850
|
-
/** @oneof */
|
|
1851
|
-
interface ReferralEventEventTypeOneOf {
|
|
1852
|
-
/** ReferredFriendSignupEvent is an event that is triggered when a referred friend signs up. */
|
|
1853
|
-
referredFriendSignupEvent?: ReferredFriendSignupEvent;
|
|
1854
|
-
/** SuccessfulReferralEvent is an event that is triggered when a referral is successful. */
|
|
1855
|
-
successfulReferralEvent?: V1SuccessfulReferralEvent;
|
|
1856
|
-
/** ActionEvent is an event that is triggered when an action is performed. */
|
|
1857
|
-
actionEvent?: V1ActionEvent;
|
|
1858
|
-
/** RewardEvent is an event that is triggered when a reward is given. */
|
|
1859
|
-
rewardEvent?: RewardEvent;
|
|
1860
|
-
}
|
|
1861
|
-
interface ReferredFriendSignupEvent {
|
|
1862
|
-
/** The referred friend ID. */
|
|
1863
|
-
referredFriendId?: string;
|
|
1864
|
-
}
|
|
1865
|
-
interface V1SuccessfulReferralEvent {
|
|
1866
|
-
/** The referred friend ID. */
|
|
1867
|
-
referredFriendId?: string;
|
|
1868
|
-
/** The referring customer ID. */
|
|
1869
|
-
referringCustomerId?: string;
|
|
1870
|
-
}
|
|
1871
|
-
interface V1ActionEvent {
|
|
1872
|
-
/** The referred friend ID. */
|
|
1873
|
-
referredFriendId?: string;
|
|
1874
|
-
/** The referring customer ID. */
|
|
1875
|
-
referringCustomerId?: string;
|
|
1876
|
-
/** The trigger of the action. */
|
|
1877
|
-
trigger?: V1Trigger;
|
|
1878
|
-
/** Amount. */
|
|
1879
|
-
amount?: string | null;
|
|
1880
|
-
/** Currency. */
|
|
1881
|
-
currency?: string | null;
|
|
1882
|
-
/** Order ID. */
|
|
1883
|
-
orderId?: string | null;
|
|
1884
|
-
}
|
|
1885
|
-
interface V1Trigger {
|
|
1886
|
-
/** The app id of the app that triggered the event. */
|
|
1887
|
-
appId?: string;
|
|
1888
|
-
/** The activity type that triggered the event. */
|
|
1889
|
-
activityType?: string;
|
|
1890
|
-
}
|
|
1891
|
-
interface RewardEvent extends RewardEventReceiverOneOf {
|
|
1892
|
-
/**
|
|
1893
|
-
* The referring customer ID.
|
|
1894
|
-
* @readonly
|
|
1895
|
-
*/
|
|
1896
|
-
rewardedReferringCustomerId?: string;
|
|
1897
|
-
/**
|
|
1898
|
-
* The referred friend ID.
|
|
1899
|
-
* @readonly
|
|
1900
|
-
*/
|
|
1901
|
-
rewardedReferredFriendId?: string;
|
|
1902
|
-
/** The referral reward ID. */
|
|
1903
|
-
referralRewardId?: string;
|
|
1904
|
-
/** The reward type. */
|
|
1905
|
-
rewardType?: Reward;
|
|
1906
|
-
}
|
|
1907
|
-
/** @oneof */
|
|
1908
|
-
interface RewardEventReceiverOneOf {
|
|
1909
|
-
/**
|
|
1910
|
-
* The referring customer ID.
|
|
1911
|
-
* @readonly
|
|
1912
|
-
*/
|
|
1913
|
-
rewardedReferringCustomerId?: string;
|
|
1914
|
-
/**
|
|
1915
|
-
* The referred friend ID.
|
|
1916
|
-
* @readonly
|
|
1917
|
-
*/
|
|
1918
|
-
rewardedReferredFriendId?: string;
|
|
1919
|
-
}
|
|
1920
|
-
declare enum Reward {
|
|
1921
|
-
/** Unknown reward type. */
|
|
1922
|
-
UNKNOWN = "UNKNOWN",
|
|
1923
|
-
/** Reward is a coupon. */
|
|
1924
|
-
COUPON = "COUPON",
|
|
1925
|
-
/** Reward is loyalty points. */
|
|
1926
|
-
LOYALTY_POINTS = "LOYALTY_POINTS",
|
|
1927
|
-
/** No reward. */
|
|
1928
|
-
NOTHING = "NOTHING"
|
|
1929
|
-
}
|
|
1930
|
-
interface CreateReferralEventRequest {
|
|
1931
|
-
/** ReferralEvent to be created */
|
|
1932
|
-
referralEvent?: ReferralEvent;
|
|
1933
|
-
}
|
|
1934
|
-
interface CreateReferralEventResponse {
|
|
1935
|
-
/** The created ReferralEvent */
|
|
1936
|
-
referralEvent?: ReferralEvent;
|
|
1937
|
-
}
|
|
1938
|
-
interface GetReferralEventRequest {
|
|
1939
|
-
/** Id of the ReferralEvent to retrieve */
|
|
1940
|
-
referralEventId: string;
|
|
1941
|
-
}
|
|
1942
|
-
interface GetReferralEventResponse {
|
|
1943
|
-
/** The retrieved ReferralEvent */
|
|
1944
|
-
referralEvent?: ReferralEvent;
|
|
1945
|
-
}
|
|
1946
|
-
interface QueryReferralEventRequest {
|
|
1947
|
-
/** Query to filter ReferralEvents. */
|
|
1948
|
-
query: CursorQuery$2;
|
|
1949
|
-
}
|
|
1950
|
-
interface CursorQuery$2 extends CursorQueryPagingMethodOneOf$2 {
|
|
1951
|
-
/** 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`. */
|
|
1952
|
-
cursorPaging?: CursorPaging$2;
|
|
1953
|
-
/**
|
|
1954
|
-
* Filter object in the following format:
|
|
1955
|
-
* `"filter" : {
|
|
1956
|
-
* "fieldName1": "value1",
|
|
1957
|
-
* "fieldName2":{"$operator":"value2"}
|
|
1958
|
-
* }`
|
|
1959
|
-
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
1960
|
-
*/
|
|
1961
|
-
filter?: Record<string, any> | null;
|
|
1962
|
-
/**
|
|
1963
|
-
* Sort object in the following format:
|
|
1964
|
-
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
1965
|
-
*/
|
|
1966
|
-
sort?: Sorting$2[];
|
|
1967
|
-
}
|
|
1968
|
-
/** @oneof */
|
|
1969
|
-
interface CursorQueryPagingMethodOneOf$2 {
|
|
1970
|
-
/** 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`. */
|
|
1971
|
-
cursorPaging?: CursorPaging$2;
|
|
1972
|
-
}
|
|
1973
|
-
interface Sorting$2 {
|
|
1974
|
-
/** Name of the field to sort by. */
|
|
1975
|
-
fieldName?: string;
|
|
1976
|
-
/** Sort order. */
|
|
1977
|
-
order?: SortOrder$2;
|
|
1978
|
-
}
|
|
1979
|
-
declare enum SortOrder$2 {
|
|
1980
|
-
ASC = "ASC",
|
|
1981
|
-
DESC = "DESC"
|
|
1982
|
-
}
|
|
1983
|
-
interface CursorPaging$2 {
|
|
1984
|
-
/** Maximum number of items to return in the results. */
|
|
1985
|
-
limit?: number | null;
|
|
1986
|
-
/**
|
|
1987
|
-
* Pointer to the next or previous page in the list of results.
|
|
1988
|
-
*
|
|
1989
|
-
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
1990
|
-
* Not relevant for the first request.
|
|
1991
|
-
*/
|
|
1992
|
-
cursor?: string | null;
|
|
1993
|
-
}
|
|
1994
|
-
interface QueryReferralEventResponse {
|
|
1995
|
-
/** List of ReferralEvents that match the query. */
|
|
1996
|
-
referralEvents?: ReferralEvent[];
|
|
1997
|
-
/** Paging metadata. */
|
|
1998
|
-
metadata?: CursorPagingMetadata$2;
|
|
1999
|
-
}
|
|
2000
|
-
interface CursorPagingMetadata$2 {
|
|
2001
|
-
/** Number of items returned in the response. */
|
|
2002
|
-
count?: number | null;
|
|
2003
|
-
/** Cursor strings that point to the next page, previous page, or both. */
|
|
2004
|
-
cursors?: Cursors$2;
|
|
2005
|
-
/**
|
|
2006
|
-
* Whether there are more pages to retrieve following the current page.
|
|
2007
|
-
*
|
|
2008
|
-
* + `true`: Another page of results can be retrieved.
|
|
2009
|
-
* + `false`: This is the last page.
|
|
745
|
+
ne: (propertyName: '_createdDate' | '_updatedDate', value: any) => ReferralEventsQueryBuilder;
|
|
746
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
747
|
+
* @param value - Value to compare against.
|
|
748
|
+
* @documentationMaturity preview
|
|
2010
749
|
*/
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
next?: string | null;
|
|
2016
|
-
/** Cursor pointing to the previous page in the list of results. */
|
|
2017
|
-
prev?: string | null;
|
|
2018
|
-
}
|
|
2019
|
-
interface GetReferralStatisticsRequest {
|
|
2020
|
-
}
|
|
2021
|
-
interface GetReferralStatisticsResponse {
|
|
2022
|
-
/** Total sign ups completed by referred friends */
|
|
2023
|
-
totalSignUpsCompleted?: number;
|
|
2024
|
-
/** Total actions completed by referred friends */
|
|
2025
|
-
totalActionsCompleted?: number;
|
|
2026
|
-
/** Total amount of purchases made by referred friends */
|
|
2027
|
-
totalAmountGenerated?: string;
|
|
2028
|
-
}
|
|
2029
|
-
interface QueryReferringCustomerTotalsRequest {
|
|
2030
|
-
/** Query to filter ReferringCustomerTotals. */
|
|
2031
|
-
query?: CursorQuery$2;
|
|
2032
|
-
/** List of contact ids to filter ReferringCustomerTotals. */
|
|
2033
|
-
contactIds?: string[];
|
|
2034
|
-
}
|
|
2035
|
-
interface QueryReferringCustomerTotalsResponse {
|
|
2036
|
-
/** List of ReferringCustomerTotals that match the query. */
|
|
2037
|
-
referringCustomerTotals?: ReferringCustomerTotal[];
|
|
2038
|
-
/** Paging metadata. */
|
|
2039
|
-
metadata?: CursorPagingMetadata$2;
|
|
2040
|
-
}
|
|
2041
|
-
interface ReferringCustomerTotal {
|
|
2042
|
-
/**
|
|
2043
|
-
* Referring customer id.
|
|
2044
|
-
* @readonly
|
|
750
|
+
ge: (propertyName: '_createdDate' | '_updatedDate', value: any) => ReferralEventsQueryBuilder;
|
|
751
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
752
|
+
* @param value - Value to compare against.
|
|
753
|
+
* @documentationMaturity preview
|
|
2045
754
|
*/
|
|
2046
|
-
|
|
2047
|
-
/**
|
|
2048
|
-
*
|
|
2049
|
-
* @
|
|
755
|
+
gt: (propertyName: '_createdDate' | '_updatedDate', value: any) => ReferralEventsQueryBuilder;
|
|
756
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
757
|
+
* @param value - Value to compare against.
|
|
758
|
+
* @documentationMaturity preview
|
|
2050
759
|
*/
|
|
2051
|
-
|
|
2052
|
-
/**
|
|
2053
|
-
*
|
|
2054
|
-
* @
|
|
760
|
+
le: (propertyName: '_createdDate' | '_updatedDate', value: any) => ReferralEventsQueryBuilder;
|
|
761
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
762
|
+
* @param value - Value to compare against.
|
|
763
|
+
* @documentationMaturity preview
|
|
2055
764
|
*/
|
|
2056
|
-
|
|
2057
|
-
/**
|
|
2058
|
-
*
|
|
2059
|
-
* @
|
|
765
|
+
lt: (propertyName: '_createdDate' | '_updatedDate', value: any) => ReferralEventsQueryBuilder;
|
|
766
|
+
/** @param propertyName - Property whose value is compared with `values`.
|
|
767
|
+
* @param values - List of values to compare against.
|
|
768
|
+
* @documentationMaturity preview
|
|
2060
769
|
*/
|
|
2061
|
-
|
|
2062
|
-
/**
|
|
2063
|
-
|
|
2064
|
-
|
|
770
|
+
hasSome: (propertyName: '_createdDate' | '_updatedDate', value: any[]) => ReferralEventsQueryBuilder;
|
|
771
|
+
/** @documentationMaturity preview */
|
|
772
|
+
in: (propertyName: '_createdDate' | '_updatedDate', value: any) => ReferralEventsQueryBuilder;
|
|
773
|
+
/** @documentationMaturity preview */
|
|
774
|
+
exists: (propertyName: '_createdDate' | '_updatedDate', value: boolean) => ReferralEventsQueryBuilder;
|
|
775
|
+
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
776
|
+
* @documentationMaturity preview
|
|
2065
777
|
*/
|
|
2066
|
-
|
|
2067
|
-
/**
|
|
2068
|
-
*
|
|
2069
|
-
* @readonly
|
|
778
|
+
ascending: (...propertyNames: Array<'_createdDate' | '_updatedDate'>) => ReferralEventsQueryBuilder;
|
|
779
|
+
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
780
|
+
* @documentationMaturity preview
|
|
2070
781
|
*/
|
|
2071
|
-
|
|
2072
|
-
/**
|
|
2073
|
-
*
|
|
2074
|
-
* @readonly
|
|
782
|
+
descending: (...propertyNames: Array<'_createdDate' | '_updatedDate'>) => ReferralEventsQueryBuilder;
|
|
783
|
+
/** @param limit - Number of items to return, which is also the `pageSize` of the results object.
|
|
784
|
+
* @documentationMaturity preview
|
|
2075
785
|
*/
|
|
2076
|
-
|
|
786
|
+
limit: (limit: number) => ReferralEventsQueryBuilder;
|
|
787
|
+
/** @param cursor - A pointer to specific record
|
|
788
|
+
* @documentationMaturity preview
|
|
789
|
+
*/
|
|
790
|
+
skipTo: (cursor: string) => ReferralEventsQueryBuilder;
|
|
791
|
+
/** @documentationMaturity preview */
|
|
792
|
+
find: () => Promise<ReferralEventsQueryResult>;
|
|
2077
793
|
}
|
|
2078
|
-
interface
|
|
794
|
+
interface QueryReferringCustomerTotalsOptions {
|
|
795
|
+
/** Query to filter ReferringCustomerTotals. */
|
|
796
|
+
query?: CursorQuery$3;
|
|
797
|
+
/** List of contact ids to filter ReferringCustomerTotals. */
|
|
798
|
+
contactIds?: string[];
|
|
799
|
+
}
|
|
800
|
+
interface QueryReferredFriendActionsOptions {
|
|
2079
801
|
/** Query to filter ReferredFriendActions. */
|
|
2080
|
-
query?: CursorQuery$
|
|
802
|
+
query?: CursorQuery$3;
|
|
2081
803
|
/** List of contact ids to filter ReferredFriendActions. */
|
|
2082
804
|
contactIds?: string[];
|
|
2083
805
|
}
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
metadata?: CursorPagingMetadata$2;
|
|
806
|
+
|
|
807
|
+
interface HttpClient$3 {
|
|
808
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory$3<TResponse, TData>): Promise<HttpResponse$3<TResponse>>;
|
|
809
|
+
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
2089
810
|
}
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
811
|
+
type RequestOptionsFactory$3<TResponse = any, TData = any> = (context: any) => RequestOptions$3<TResponse, TData>;
|
|
812
|
+
type HttpResponse$3<T = any> = {
|
|
813
|
+
data: T;
|
|
814
|
+
status: number;
|
|
815
|
+
statusText: string;
|
|
816
|
+
headers: any;
|
|
817
|
+
request?: any;
|
|
818
|
+
};
|
|
819
|
+
type RequestOptions$3<_TResponse = any, Data = any> = {
|
|
820
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
821
|
+
url: string;
|
|
822
|
+
data?: Data;
|
|
823
|
+
params?: URLSearchParams;
|
|
824
|
+
} & APIMetadata$3;
|
|
825
|
+
type APIMetadata$3 = {
|
|
826
|
+
methodFqn?: string;
|
|
827
|
+
entityFqdn?: string;
|
|
828
|
+
packageName?: string;
|
|
829
|
+
};
|
|
830
|
+
type EventDefinition$2<Payload = unknown, Type extends string = string> = {
|
|
831
|
+
__type: 'event-definition';
|
|
832
|
+
type: Type;
|
|
833
|
+
isDomainEvent?: boolean;
|
|
834
|
+
transformations?: (envelope: unknown) => Payload;
|
|
835
|
+
__payload: Payload;
|
|
836
|
+
};
|
|
837
|
+
declare function EventDefinition$2<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$2<Payload, Type>;
|
|
838
|
+
|
|
839
|
+
declare global {
|
|
840
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
841
|
+
interface SymbolConstructor {
|
|
842
|
+
readonly observable: symbol;
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
declare const __metadata$3: {
|
|
847
|
+
PACKAGE_NAME: string;
|
|
848
|
+
};
|
|
849
|
+
declare function getReferralEvent(httpClient: HttpClient$3): (referralEventId: string) => Promise<ReferralEvent & {
|
|
850
|
+
referredFriendSignupEvent?: {
|
|
851
|
+
referredFriendId: string;
|
|
852
|
+
} | undefined;
|
|
853
|
+
successfulReferralEvent?: {
|
|
854
|
+
referredFriendId: string;
|
|
855
|
+
referringCustomerId: string;
|
|
856
|
+
} | undefined;
|
|
857
|
+
actionEvent?: {
|
|
858
|
+
referredFriendId: string;
|
|
859
|
+
referringCustomerId: string;
|
|
860
|
+
trigger?: {
|
|
861
|
+
appId: string;
|
|
862
|
+
activityType: string;
|
|
863
|
+
} | undefined;
|
|
864
|
+
} | undefined;
|
|
865
|
+
rewardEvent?: {
|
|
866
|
+
rewardedReferringCustomerId: string;
|
|
867
|
+
rewardedReferredFriendId: string;
|
|
868
|
+
referralRewardId: string;
|
|
869
|
+
rewardType: Reward$1;
|
|
870
|
+
} | undefined;
|
|
871
|
+
}>;
|
|
872
|
+
declare function queryReferralEvent(httpClient: HttpClient$3): () => ReferralEventsQueryBuilder;
|
|
873
|
+
declare function getReferralStatistics(httpClient: HttpClient$3): () => Promise<GetReferralStatisticsResponse & GetReferralStatisticsResponseNonNullableFields>;
|
|
874
|
+
declare function queryReferringCustomerTotals(httpClient: HttpClient$3): (options?: QueryReferringCustomerTotalsOptions) => Promise<QueryReferringCustomerTotalsResponse & QueryReferringCustomerTotalsResponseNonNullableFields>;
|
|
875
|
+
declare function queryReferredFriendActions(httpClient: HttpClient$3): (options?: QueryReferredFriendActionsOptions) => Promise<QueryReferredFriendActionsResponse & QueryReferredFriendActionsResponseNonNullableFields>;
|
|
876
|
+
declare const onReferralEventCreated: EventDefinition$2<ReferralEventCreatedEnvelope, "wix.loyalty.referral.v1.referral_event_created">;
|
|
877
|
+
|
|
878
|
+
type index_d$3_CreateReferralEventRequest = CreateReferralEventRequest;
|
|
879
|
+
type index_d$3_CreateReferralEventResponse = CreateReferralEventResponse;
|
|
880
|
+
type index_d$3_GetReferralEventRequest = GetReferralEventRequest;
|
|
881
|
+
type index_d$3_GetReferralEventResponse = GetReferralEventResponse;
|
|
882
|
+
type index_d$3_GetReferralEventResponseNonNullableFields = GetReferralEventResponseNonNullableFields;
|
|
883
|
+
type index_d$3_GetReferralStatisticsRequest = GetReferralStatisticsRequest;
|
|
884
|
+
type index_d$3_GetReferralStatisticsResponse = GetReferralStatisticsResponse;
|
|
885
|
+
type index_d$3_GetReferralStatisticsResponseNonNullableFields = GetReferralStatisticsResponseNonNullableFields;
|
|
886
|
+
type index_d$3_QueryReferralEventRequest = QueryReferralEventRequest;
|
|
887
|
+
type index_d$3_QueryReferralEventResponse = QueryReferralEventResponse;
|
|
888
|
+
type index_d$3_QueryReferralEventResponseNonNullableFields = QueryReferralEventResponseNonNullableFields;
|
|
889
|
+
type index_d$3_QueryReferredFriendActionsOptions = QueryReferredFriendActionsOptions;
|
|
890
|
+
type index_d$3_QueryReferredFriendActionsRequest = QueryReferredFriendActionsRequest;
|
|
891
|
+
type index_d$3_QueryReferredFriendActionsResponse = QueryReferredFriendActionsResponse;
|
|
892
|
+
type index_d$3_QueryReferredFriendActionsResponseNonNullableFields = QueryReferredFriendActionsResponseNonNullableFields;
|
|
893
|
+
type index_d$3_QueryReferringCustomerTotalsOptions = QueryReferringCustomerTotalsOptions;
|
|
894
|
+
type index_d$3_QueryReferringCustomerTotalsRequest = QueryReferringCustomerTotalsRequest;
|
|
895
|
+
type index_d$3_QueryReferringCustomerTotalsResponse = QueryReferringCustomerTotalsResponse;
|
|
896
|
+
type index_d$3_QueryReferringCustomerTotalsResponseNonNullableFields = QueryReferringCustomerTotalsResponseNonNullableFields;
|
|
897
|
+
type index_d$3_ReferralEvent = ReferralEvent;
|
|
898
|
+
type index_d$3_ReferralEventCreatedEnvelope = ReferralEventCreatedEnvelope;
|
|
899
|
+
type index_d$3_ReferralEventEventTypeOneOf = ReferralEventEventTypeOneOf;
|
|
900
|
+
type index_d$3_ReferralEventsQueryBuilder = ReferralEventsQueryBuilder;
|
|
901
|
+
type index_d$3_ReferralEventsQueryResult = ReferralEventsQueryResult;
|
|
902
|
+
type index_d$3_ReferredFriendAction = ReferredFriendAction;
|
|
903
|
+
type index_d$3_ReferredFriendActionEvent = ReferredFriendActionEvent;
|
|
904
|
+
type index_d$3_ReferredFriendActionRewardTypeOptionsOneOf = ReferredFriendActionRewardTypeOptionsOneOf;
|
|
905
|
+
type index_d$3_ReferredFriendSignupEvent = ReferredFriendSignupEvent;
|
|
906
|
+
type index_d$3_ReferringCustomerTotal = ReferringCustomerTotal;
|
|
907
|
+
type index_d$3_RewardEvent = RewardEvent;
|
|
908
|
+
type index_d$3_RewardEventReceiverOneOf = RewardEventReceiverOneOf;
|
|
909
|
+
type index_d$3_Trigger = Trigger;
|
|
910
|
+
type index_d$3_V1ActionEvent = V1ActionEvent;
|
|
911
|
+
type index_d$3_V1SuccessfulReferralEvent = V1SuccessfulReferralEvent;
|
|
912
|
+
type index_d$3_V1Trigger = V1Trigger;
|
|
913
|
+
declare const index_d$3_getReferralEvent: typeof getReferralEvent;
|
|
914
|
+
declare const index_d$3_getReferralStatistics: typeof getReferralStatistics;
|
|
915
|
+
declare const index_d$3_onReferralEventCreated: typeof onReferralEventCreated;
|
|
916
|
+
declare const index_d$3_queryReferralEvent: typeof queryReferralEvent;
|
|
917
|
+
declare const index_d$3_queryReferredFriendActions: typeof queryReferredFriendActions;
|
|
918
|
+
declare const index_d$3_queryReferringCustomerTotals: typeof queryReferringCustomerTotals;
|
|
919
|
+
declare namespace index_d$3 {
|
|
920
|
+
export { type ActionEvent$3 as ActionEvent, type BaseEventMetadata$2 as BaseEventMetadata, type Coupon$1 as Coupon, type CouponDiscountTypeOptionsOneOf$1 as CouponDiscountTypeOptionsOneOf, type CouponScope$1 as CouponScope, type CouponScopeOrMinSubtotalOneOf$1 as CouponScopeOrMinSubtotalOneOf, type index_d$3_CreateReferralEventRequest as CreateReferralEventRequest, type index_d$3_CreateReferralEventResponse as CreateReferralEventResponse, type CursorPaging$3 as CursorPaging, type CursorPagingMetadata$3 as CursorPagingMetadata, type CursorQuery$3 as CursorQuery, type CursorQueryPagingMethodOneOf$3 as CursorQueryPagingMethodOneOf, type Cursors$3 as Cursors, DiscountType$1 as DiscountType, type DomainEvent$3 as DomainEvent, type DomainEventBodyOneOf$3 as DomainEventBodyOneOf, type Empty$2 as Empty, type EntityCreatedEvent$3 as EntityCreatedEvent, type EntityDeletedEvent$3 as EntityDeletedEvent, type EntityUpdatedEvent$3 as EntityUpdatedEvent, type EventMetadata$2 as EventMetadata, type FixedAmountDiscount$1 as FixedAmountDiscount, type index_d$3_GetReferralEventRequest as GetReferralEventRequest, type index_d$3_GetReferralEventResponse as GetReferralEventResponse, type index_d$3_GetReferralEventResponseNonNullableFields as GetReferralEventResponseNonNullableFields, type index_d$3_GetReferralStatisticsRequest as GetReferralStatisticsRequest, type index_d$3_GetReferralStatisticsResponse as GetReferralStatisticsResponse, type index_d$3_GetReferralStatisticsResponseNonNullableFields as GetReferralStatisticsResponseNonNullableFields, type Group$1 as Group, type IdentificationData$3 as IdentificationData, type IdentificationDataIdOneOf$3 as IdentificationDataIdOneOf, type LoyaltyPoints$1 as LoyaltyPoints, type MessageEnvelope$3 as MessageEnvelope, type PercentageDiscount$1 as PercentageDiscount, type index_d$3_QueryReferralEventRequest as QueryReferralEventRequest, type index_d$3_QueryReferralEventResponse as QueryReferralEventResponse, type index_d$3_QueryReferralEventResponseNonNullableFields as QueryReferralEventResponseNonNullableFields, type index_d$3_QueryReferredFriendActionsOptions as QueryReferredFriendActionsOptions, type index_d$3_QueryReferredFriendActionsRequest as QueryReferredFriendActionsRequest, type index_d$3_QueryReferredFriendActionsResponse as QueryReferredFriendActionsResponse, type index_d$3_QueryReferredFriendActionsResponseNonNullableFields as QueryReferredFriendActionsResponseNonNullableFields, type index_d$3_QueryReferringCustomerTotalsOptions as QueryReferringCustomerTotalsOptions, type index_d$3_QueryReferringCustomerTotalsRequest as QueryReferringCustomerTotalsRequest, type index_d$3_QueryReferringCustomerTotalsResponse as QueryReferringCustomerTotalsResponse, type index_d$3_QueryReferringCustomerTotalsResponseNonNullableFields as QueryReferringCustomerTotalsResponseNonNullableFields, type index_d$3_ReferralEvent as ReferralEvent, type index_d$3_ReferralEventCreatedEnvelope as ReferralEventCreatedEnvelope, type index_d$3_ReferralEventEventTypeOneOf as ReferralEventEventTypeOneOf, type index_d$3_ReferralEventsQueryBuilder as ReferralEventsQueryBuilder, type index_d$3_ReferralEventsQueryResult as ReferralEventsQueryResult, type index_d$3_ReferredFriendAction as ReferredFriendAction, type index_d$3_ReferredFriendActionEvent as ReferredFriendActionEvent, type index_d$3_ReferredFriendActionRewardTypeOptionsOneOf as ReferredFriendActionRewardTypeOptionsOneOf, type ReferredFriendDetails$2 as ReferredFriendDetails, type index_d$3_ReferredFriendSignupEvent as ReferredFriendSignupEvent, type index_d$3_ReferringCustomerTotal as ReferringCustomerTotal, Reward$1 as Reward, type index_d$3_RewardEvent as RewardEvent, type index_d$3_RewardEventReceiverOneOf as RewardEventReceiverOneOf, SortOrder$3 as SortOrder, type Sorting$3 as Sorting, Status$2 as Status, type SuccessfulReferralEvent$2 as SuccessfulReferralEvent, type index_d$3_Trigger as Trigger, type UndeleteInfo$3 as UndeleteInfo, type index_d$3_V1ActionEvent as V1ActionEvent, type V1Coupon$1 as V1Coupon, type index_d$3_V1SuccessfulReferralEvent as V1SuccessfulReferralEvent, type index_d$3_V1Trigger as V1Trigger, WebhookIdentityType$3 as WebhookIdentityType, __metadata$3 as __metadata, index_d$3_getReferralEvent as getReferralEvent, index_d$3_getReferralStatistics as getReferralStatistics, index_d$3_onReferralEventCreated as onReferralEventCreated, index_d$3_queryReferralEvent as queryReferralEvent, index_d$3_queryReferredFriendActions as queryReferredFriendActions, index_d$3_queryReferringCustomerTotals as queryReferringCustomerTotals };
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
/** ReferralReward is the main entity of ReferralRewards that can be used for lorem ipsum dolor */
|
|
924
|
+
interface ReferralReward extends ReferralRewardReceiverOneOf, ReferralRewardRewardTypeOptionsOneOf {
|
|
2095
925
|
/**
|
|
2096
|
-
*
|
|
926
|
+
* Referring customer ID.
|
|
2097
927
|
* @readonly
|
|
2098
928
|
*/
|
|
2099
|
-
|
|
929
|
+
rewardedReferringCustomerId?: string;
|
|
2100
930
|
/**
|
|
2101
|
-
*
|
|
931
|
+
* Referred friend ID.
|
|
2102
932
|
* @readonly
|
|
2103
933
|
*/
|
|
2104
|
-
|
|
934
|
+
rewardedReferredFriendId?: string;
|
|
935
|
+
/** Coupon reward type options. */
|
|
936
|
+
coupon?: V1Coupon;
|
|
937
|
+
/** Loyalty points reward type options. */
|
|
938
|
+
loyaltyPoints?: V1LoyaltyPoints;
|
|
2105
939
|
/**
|
|
2106
|
-
*
|
|
940
|
+
* ReferralReward ID.
|
|
2107
941
|
* @readonly
|
|
2108
942
|
*/
|
|
2109
|
-
|
|
943
|
+
_id?: string | null;
|
|
944
|
+
/** 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. */
|
|
945
|
+
revision?: string | null;
|
|
2110
946
|
/**
|
|
2111
|
-
*
|
|
947
|
+
* Represents the time this ReferralReward was created.
|
|
2112
948
|
* @readonly
|
|
2113
949
|
*/
|
|
2114
|
-
|
|
2115
|
-
/** Issued reward type. */
|
|
2116
|
-
rewardType?: Reward;
|
|
2117
|
-
/** Total number of actions. */
|
|
2118
|
-
totalActions?: number;
|
|
950
|
+
_createdDate?: Date;
|
|
2119
951
|
/**
|
|
2120
|
-
*
|
|
952
|
+
* Represents the time this ReferralReward was last updated.
|
|
2121
953
|
* @readonly
|
|
2122
954
|
*/
|
|
2123
|
-
|
|
955
|
+
_updatedDate?: Date;
|
|
956
|
+
/** Reward type. */
|
|
957
|
+
rewardType?: RewardTypeType;
|
|
958
|
+
}
|
|
959
|
+
/** @oneof */
|
|
960
|
+
interface ReferralRewardReceiverOneOf {
|
|
2124
961
|
/**
|
|
2125
|
-
*
|
|
962
|
+
* Referring customer ID.
|
|
2126
963
|
* @readonly
|
|
2127
964
|
*/
|
|
2128
|
-
|
|
965
|
+
rewardedReferringCustomerId?: string;
|
|
966
|
+
/**
|
|
967
|
+
* Referred friend ID.
|
|
968
|
+
* @readonly
|
|
969
|
+
*/
|
|
970
|
+
rewardedReferredFriendId?: string;
|
|
2129
971
|
}
|
|
2130
972
|
/** @oneof */
|
|
2131
|
-
interface
|
|
973
|
+
interface ReferralRewardRewardTypeOptionsOneOf {
|
|
2132
974
|
/** Coupon reward type options. */
|
|
2133
975
|
coupon?: V1Coupon;
|
|
2134
976
|
/** Loyalty points reward type options. */
|
|
2135
|
-
loyaltyPoints?:
|
|
977
|
+
loyaltyPoints?: V1LoyaltyPoints;
|
|
978
|
+
}
|
|
979
|
+
declare enum RewardTypeType {
|
|
980
|
+
/** Unknown reward type. */
|
|
981
|
+
UNKNOWN = "UNKNOWN",
|
|
982
|
+
/** Coupon reward type. */
|
|
983
|
+
COUPON = "COUPON",
|
|
984
|
+
/** Loyalty points reward type. */
|
|
985
|
+
LOYALTY_POINTS = "LOYALTY_POINTS",
|
|
986
|
+
/** No reward. */
|
|
987
|
+
NOTHING = "NOTHING"
|
|
2136
988
|
}
|
|
2137
989
|
interface V1Coupon {
|
|
2138
990
|
/**
|
|
@@ -2167,17 +1019,17 @@ declare enum Status$1 {
|
|
|
2167
1019
|
DELETED = "DELETED"
|
|
2168
1020
|
}
|
|
2169
1021
|
interface Coupon extends CouponDiscountTypeOptionsOneOf, CouponScopeOrMinSubtotalOneOf {
|
|
2170
|
-
/** Options for fixed amount discount type
|
|
1022
|
+
/** Options for fixed amount discount type */
|
|
2171
1023
|
fixedAmountOptions?: FixedAmountDiscount;
|
|
2172
|
-
/** Options for percentage discount type
|
|
1024
|
+
/** Options for percentage discount type */
|
|
2173
1025
|
percentageOptions?: PercentageDiscount;
|
|
2174
1026
|
/** Limit the coupon to carts with a subtotal above this number. */
|
|
2175
1027
|
minimumSubtotal?: number;
|
|
2176
1028
|
/** Specifies the type of line items this coupon will apply to. */
|
|
2177
1029
|
scope?: CouponScope;
|
|
2178
|
-
/** Coupon name
|
|
1030
|
+
/** Coupon name */
|
|
2179
1031
|
name?: string;
|
|
2180
|
-
/** Coupon discount type
|
|
1032
|
+
/** Coupon discount type */
|
|
2181
1033
|
discountType?: DiscountType;
|
|
2182
1034
|
/** Limit the coupon to only apply to one item in cart. */
|
|
2183
1035
|
limitedToOneItem?: boolean | null;
|
|
@@ -2188,9 +1040,9 @@ interface Coupon extends CouponDiscountTypeOptionsOneOf, CouponScopeOrMinSubtota
|
|
|
2188
1040
|
}
|
|
2189
1041
|
/** @oneof */
|
|
2190
1042
|
interface CouponDiscountTypeOptionsOneOf {
|
|
2191
|
-
/** Options for fixed amount discount type
|
|
1043
|
+
/** Options for fixed amount discount type */
|
|
2192
1044
|
fixedAmountOptions?: FixedAmountDiscount;
|
|
2193
|
-
/** Options for percentage discount type
|
|
1045
|
+
/** Options for percentage discount type */
|
|
2194
1046
|
percentageOptions?: PercentageDiscount;
|
|
2195
1047
|
}
|
|
2196
1048
|
/** @oneof */
|
|
@@ -2201,36 +1053,30 @@ interface CouponScopeOrMinSubtotalOneOf {
|
|
|
2201
1053
|
scope?: CouponScope;
|
|
2202
1054
|
}
|
|
2203
1055
|
declare enum DiscountType {
|
|
2204
|
-
/** Unknown discount type. */
|
|
2205
1056
|
UNKNOWN = "UNKNOWN",
|
|
2206
|
-
/** Discount as a fixed amount
|
|
1057
|
+
/** Discount as a fixed amount */
|
|
2207
1058
|
FIXED_AMOUNT = "FIXED_AMOUNT",
|
|
2208
|
-
/** Discount as a percentage
|
|
1059
|
+
/** Discount as a percentage */
|
|
2209
1060
|
PERCENTAGE = "PERCENTAGE",
|
|
2210
|
-
/** Free shipping
|
|
1061
|
+
/** Free shipping */
|
|
2211
1062
|
FREE_SHIPPING = "FREE_SHIPPING"
|
|
2212
1063
|
}
|
|
2213
1064
|
interface FixedAmountDiscount {
|
|
2214
|
-
/** Fixed amount to discount
|
|
1065
|
+
/** Fixed amount to discount */
|
|
2215
1066
|
amount?: number;
|
|
2216
1067
|
}
|
|
2217
1068
|
interface PercentageDiscount {
|
|
2218
|
-
/** Percentage to discount. */
|
|
2219
1069
|
percentage?: number;
|
|
2220
1070
|
}
|
|
2221
1071
|
interface CouponScope {
|
|
2222
|
-
/** Namespace of the coupon scope. */
|
|
2223
1072
|
namespace?: string;
|
|
2224
|
-
/** Group of the coupon scope. */
|
|
2225
1073
|
group?: Group;
|
|
2226
1074
|
}
|
|
2227
1075
|
interface Group {
|
|
2228
|
-
/** Name of the group. */
|
|
2229
1076
|
name?: string;
|
|
2230
|
-
/** Entity ID of the group. */
|
|
2231
1077
|
entityId?: string | null;
|
|
2232
1078
|
}
|
|
2233
|
-
interface
|
|
1079
|
+
interface V1LoyaltyPoints {
|
|
2234
1080
|
/**
|
|
2235
1081
|
* Loyalty transaction ID.
|
|
2236
1082
|
* @readonly
|
|
@@ -2242,6 +1088,135 @@ interface LoyaltyPoints {
|
|
|
2242
1088
|
*/
|
|
2243
1089
|
amount?: number;
|
|
2244
1090
|
}
|
|
1091
|
+
interface GetReferralRewardRequest {
|
|
1092
|
+
/** Id of the ReferralReward to retrieve. */
|
|
1093
|
+
_id: string;
|
|
1094
|
+
}
|
|
1095
|
+
interface GetReferralRewardResponse {
|
|
1096
|
+
/** The retrieved ReferralReward. */
|
|
1097
|
+
referralReward?: ReferralReward;
|
|
1098
|
+
}
|
|
1099
|
+
interface QueryReferralRewardsRequest {
|
|
1100
|
+
/** Query to filter ReferralRewards. */
|
|
1101
|
+
query: CursorQuery$2;
|
|
1102
|
+
/** Filter by contact id or set to "me" for current identity's rewards. */
|
|
1103
|
+
contactId?: string | null;
|
|
1104
|
+
}
|
|
1105
|
+
interface CursorQuery$2 extends CursorQueryPagingMethodOneOf$2 {
|
|
1106
|
+
/** 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`. */
|
|
1107
|
+
cursorPaging?: CursorPaging$2;
|
|
1108
|
+
/**
|
|
1109
|
+
* Filter object in the following format:
|
|
1110
|
+
* `"filter" : {
|
|
1111
|
+
* "fieldName1": "value1",
|
|
1112
|
+
* "fieldName2":{"$operator":"value2"}
|
|
1113
|
+
* }`
|
|
1114
|
+
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
1115
|
+
*/
|
|
1116
|
+
filter?: Record<string, any> | null;
|
|
1117
|
+
/**
|
|
1118
|
+
* Sort object in the following format:
|
|
1119
|
+
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
1120
|
+
*/
|
|
1121
|
+
sort?: Sorting$2[];
|
|
1122
|
+
}
|
|
1123
|
+
/** @oneof */
|
|
1124
|
+
interface CursorQueryPagingMethodOneOf$2 {
|
|
1125
|
+
/** 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`. */
|
|
1126
|
+
cursorPaging?: CursorPaging$2;
|
|
1127
|
+
}
|
|
1128
|
+
interface Sorting$2 {
|
|
1129
|
+
/** Name of the field to sort by. */
|
|
1130
|
+
fieldName?: string;
|
|
1131
|
+
/** Sort order. */
|
|
1132
|
+
order?: SortOrder$2;
|
|
1133
|
+
}
|
|
1134
|
+
declare enum SortOrder$2 {
|
|
1135
|
+
ASC = "ASC",
|
|
1136
|
+
DESC = "DESC"
|
|
1137
|
+
}
|
|
1138
|
+
interface CursorPaging$2 {
|
|
1139
|
+
/** Maximum number of items to return in the results. */
|
|
1140
|
+
limit?: number | null;
|
|
1141
|
+
/**
|
|
1142
|
+
* Pointer to the next or previous page in the list of results.
|
|
1143
|
+
*
|
|
1144
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
1145
|
+
* Not relevant for the first request.
|
|
1146
|
+
*/
|
|
1147
|
+
cursor?: string | null;
|
|
1148
|
+
}
|
|
1149
|
+
interface QueryReferralRewardsResponse {
|
|
1150
|
+
/** The retrieved ReferralRewards. */
|
|
1151
|
+
referralRewards?: ReferralReward[];
|
|
1152
|
+
/** Metadata for paging. */
|
|
1153
|
+
metadata?: CursorPagingMetadata$2;
|
|
1154
|
+
}
|
|
1155
|
+
interface CursorPagingMetadata$2 {
|
|
1156
|
+
/** Number of items returned in the response. */
|
|
1157
|
+
count?: number | null;
|
|
1158
|
+
/** Cursor strings that point to the next page, previous page, or both. */
|
|
1159
|
+
cursors?: Cursors$2;
|
|
1160
|
+
/**
|
|
1161
|
+
* Whether there are more pages to retrieve following the current page.
|
|
1162
|
+
*
|
|
1163
|
+
* + `true`: Another page of results can be retrieved.
|
|
1164
|
+
* + `false`: This is the last page.
|
|
1165
|
+
*/
|
|
1166
|
+
hasNext?: boolean | null;
|
|
1167
|
+
}
|
|
1168
|
+
interface Cursors$2 {
|
|
1169
|
+
/** Cursor string pointing to the next page in the list of results. */
|
|
1170
|
+
next?: string | null;
|
|
1171
|
+
/** Cursor pointing to the previous page in the list of results. */
|
|
1172
|
+
prev?: string | null;
|
|
1173
|
+
}
|
|
1174
|
+
interface ValidateReferralRewardRequest {
|
|
1175
|
+
/** Reward to validate. */
|
|
1176
|
+
reward?: Reward;
|
|
1177
|
+
}
|
|
1178
|
+
interface Reward extends RewardOptionsOneOf {
|
|
1179
|
+
/** Options for coupon reward type */
|
|
1180
|
+
couponOptions?: Coupon;
|
|
1181
|
+
/** Options for Loyalty points reward type */
|
|
1182
|
+
loyaltyPointsOptions?: LoyaltyPoints;
|
|
1183
|
+
/** Type of the reward */
|
|
1184
|
+
type?: Type;
|
|
1185
|
+
}
|
|
1186
|
+
/** @oneof */
|
|
1187
|
+
interface RewardOptionsOneOf {
|
|
1188
|
+
/** Options for coupon reward type */
|
|
1189
|
+
couponOptions?: Coupon;
|
|
1190
|
+
/** Options for Loyalty points reward type */
|
|
1191
|
+
loyaltyPointsOptions?: LoyaltyPoints;
|
|
1192
|
+
}
|
|
1193
|
+
declare enum Type {
|
|
1194
|
+
UNKNOWN = "UNKNOWN",
|
|
1195
|
+
/** Coupon reward type */
|
|
1196
|
+
COUPON = "COUPON",
|
|
1197
|
+
/** Loyalty points reward type */
|
|
1198
|
+
LOYALTY_POINTS = "LOYALTY_POINTS",
|
|
1199
|
+
/** No reward type */
|
|
1200
|
+
NOTHING = "NOTHING"
|
|
1201
|
+
}
|
|
1202
|
+
interface LoyaltyPoints {
|
|
1203
|
+
/** Amount of points to give */
|
|
1204
|
+
amount?: number;
|
|
1205
|
+
}
|
|
1206
|
+
interface ValidateReferralRewardResponse {
|
|
1207
|
+
}
|
|
1208
|
+
interface BulkGetReferralRewardsRequest {
|
|
1209
|
+
}
|
|
1210
|
+
interface BulkGetReferralRewardsResponse {
|
|
1211
|
+
/** Found rewards per site. */
|
|
1212
|
+
rewardsInSite?: RewardsInSite[];
|
|
1213
|
+
}
|
|
1214
|
+
interface RewardsInSite {
|
|
1215
|
+
/** Metasite ID. */
|
|
1216
|
+
metaSiteId?: string;
|
|
1217
|
+
/** Rewards. */
|
|
1218
|
+
rewards?: ReferralReward[];
|
|
1219
|
+
}
|
|
2245
1220
|
interface DomainEvent$2 extends DomainEventBodyOneOf$2 {
|
|
2246
1221
|
createdEvent?: EntityCreatedEvent$2;
|
|
2247
1222
|
updatedEvent?: EntityUpdatedEvent$2;
|
|
@@ -2330,28 +1305,10 @@ interface ReferredFriendDetails$1 {
|
|
|
2330
1305
|
*/
|
|
2331
1306
|
contactId?: string;
|
|
2332
1307
|
/**
|
|
2333
|
-
* Customer who referred this ReferredFriend.
|
|
2334
|
-
* @readonly
|
|
2335
|
-
*/
|
|
2336
|
-
referringCustomerId?: string;
|
|
2337
|
-
}
|
|
2338
|
-
interface ReferredFriendActionEvent {
|
|
2339
|
-
/** ReferredFriend details. */
|
|
2340
|
-
referredFriendDetails?: ReferredFriendDetails$1;
|
|
2341
|
-
/** Trigger details. */
|
|
2342
|
-
trigger?: Trigger;
|
|
2343
|
-
/** Amount. */
|
|
2344
|
-
amount?: string | null;
|
|
2345
|
-
/** Currency. */
|
|
2346
|
-
currency?: string | null;
|
|
2347
|
-
/** Order ID. */
|
|
2348
|
-
orderId?: string | null;
|
|
2349
|
-
}
|
|
2350
|
-
interface Trigger {
|
|
2351
|
-
/** App ID. */
|
|
2352
|
-
appId?: string;
|
|
2353
|
-
/** Activity type. */
|
|
2354
|
-
activityType?: string;
|
|
1308
|
+
* Customer who referred this ReferredFriend.
|
|
1309
|
+
* @readonly
|
|
1310
|
+
*/
|
|
1311
|
+
referringCustomerId?: string;
|
|
2355
1312
|
}
|
|
2356
1313
|
interface MessageEnvelope$2 {
|
|
2357
1314
|
/** App instance ID. */
|
|
@@ -2393,72 +1350,43 @@ declare enum WebhookIdentityType$2 {
|
|
|
2393
1350
|
WIX_USER = "WIX_USER",
|
|
2394
1351
|
APP = "APP"
|
|
2395
1352
|
}
|
|
2396
|
-
interface
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
1353
|
+
interface GetReferralRewardResponseNonNullableFields {
|
|
1354
|
+
referralReward?: {
|
|
1355
|
+
rewardedReferringCustomerId: string;
|
|
1356
|
+
rewardedReferredFriendId: string;
|
|
1357
|
+
coupon?: {
|
|
1358
|
+
_id: string;
|
|
1359
|
+
code: string;
|
|
1360
|
+
status: Status$1;
|
|
1361
|
+
couponSpecification?: {
|
|
1362
|
+
fixedAmountOptions?: {
|
|
1363
|
+
amount: number;
|
|
1364
|
+
};
|
|
1365
|
+
percentageOptions?: {
|
|
1366
|
+
percentage: number;
|
|
1367
|
+
};
|
|
1368
|
+
minimumSubtotal: number;
|
|
1369
|
+
scope?: {
|
|
1370
|
+
namespace: string;
|
|
1371
|
+
group?: {
|
|
1372
|
+
name: string;
|
|
1373
|
+
};
|
|
1374
|
+
};
|
|
1375
|
+
name: string;
|
|
1376
|
+
discountType: DiscountType;
|
|
2411
1377
|
};
|
|
2412
1378
|
};
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
referralRewardId: string;
|
|
2417
|
-
rewardType: Reward;
|
|
1379
|
+
loyaltyPoints?: {
|
|
1380
|
+
transactionId: string;
|
|
1381
|
+
amount: number;
|
|
2418
1382
|
};
|
|
1383
|
+
rewardType: RewardTypeType;
|
|
2419
1384
|
};
|
|
2420
1385
|
}
|
|
2421
|
-
interface
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
};
|
|
2426
|
-
successfulReferralEvent?: {
|
|
2427
|
-
referredFriendId: string;
|
|
2428
|
-
referringCustomerId: string;
|
|
2429
|
-
};
|
|
2430
|
-
actionEvent?: {
|
|
2431
|
-
referredFriendId: string;
|
|
2432
|
-
referringCustomerId: string;
|
|
2433
|
-
trigger?: {
|
|
2434
|
-
appId: string;
|
|
2435
|
-
activityType: string;
|
|
2436
|
-
};
|
|
2437
|
-
};
|
|
2438
|
-
rewardEvent?: {
|
|
2439
|
-
rewardedReferringCustomerId: string;
|
|
2440
|
-
rewardedReferredFriendId: string;
|
|
2441
|
-
referralRewardId: string;
|
|
2442
|
-
rewardType: Reward;
|
|
2443
|
-
};
|
|
2444
|
-
}[];
|
|
2445
|
-
}
|
|
2446
|
-
interface GetReferralStatisticsResponseNonNullableFields {
|
|
2447
|
-
totalSignUpsCompleted: number;
|
|
2448
|
-
totalActionsCompleted: number;
|
|
2449
|
-
totalAmountGenerated: string;
|
|
2450
|
-
}
|
|
2451
|
-
interface QueryReferringCustomerTotalsResponseNonNullableFields {
|
|
2452
|
-
referringCustomerTotals: {
|
|
2453
|
-
referringCustomerId: string;
|
|
2454
|
-
contactId: string;
|
|
2455
|
-
totalSuccessfulReferrals: number;
|
|
2456
|
-
totalAmountGenerated: string;
|
|
2457
|
-
totalFriendsWithActions: number;
|
|
2458
|
-
}[];
|
|
2459
|
-
}
|
|
2460
|
-
interface QueryReferredFriendActionsResponseNonNullableFields {
|
|
2461
|
-
referredFriendActions: {
|
|
1386
|
+
interface QueryReferralRewardsResponseNonNullableFields {
|
|
1387
|
+
referralRewards: {
|
|
1388
|
+
rewardedReferringCustomerId: string;
|
|
1389
|
+
rewardedReferredFriendId: string;
|
|
2462
1390
|
coupon?: {
|
|
2463
1391
|
_id: string;
|
|
2464
1392
|
code: string;
|
|
@@ -2485,150 +1413,12 @@ interface QueryReferredFriendActionsResponseNonNullableFields {
|
|
|
2485
1413
|
transactionId: string;
|
|
2486
1414
|
amount: number;
|
|
2487
1415
|
};
|
|
2488
|
-
|
|
2489
|
-
contactId: string;
|
|
2490
|
-
trigger?: {
|
|
2491
|
-
appId: string;
|
|
2492
|
-
activityType: string;
|
|
2493
|
-
};
|
|
2494
|
-
rewardType: Reward;
|
|
2495
|
-
totalActions: number;
|
|
2496
|
-
totalAmountSpent: string;
|
|
1416
|
+
rewardType: RewardTypeType;
|
|
2497
1417
|
}[];
|
|
2498
1418
|
}
|
|
2499
|
-
interface
|
|
2500
|
-
/**
|
|
2501
|
-
|
|
2502
|
-
/** Event type. */
|
|
2503
|
-
eventType?: string;
|
|
2504
|
-
/** The identification type and identity data. */
|
|
2505
|
-
identity?: IdentificationData$2;
|
|
2506
|
-
}
|
|
2507
|
-
interface EventMetadata$2 extends BaseEventMetadata$2 {
|
|
2508
|
-
/**
|
|
2509
|
-
* Unique event ID.
|
|
2510
|
-
* Allows clients to ignore duplicate webhooks.
|
|
2511
|
-
*/
|
|
2512
|
-
_id?: string;
|
|
2513
|
-
/**
|
|
2514
|
-
* Assumes actions are also always typed to an entity_type
|
|
2515
|
-
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
2516
|
-
*/
|
|
2517
|
-
entityFqdn?: string;
|
|
2518
|
-
/**
|
|
2519
|
-
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
2520
|
-
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
2521
|
-
* Example: created/updated/deleted/started/completed/email_opened
|
|
2522
|
-
*/
|
|
2523
|
-
slug?: string;
|
|
2524
|
-
/** ID of the entity associated with the event. */
|
|
2525
|
-
entityId?: string;
|
|
2526
|
-
/** Event timestamp. */
|
|
2527
|
-
eventTime?: Date;
|
|
2528
|
-
/**
|
|
2529
|
-
* Whether the event was triggered as a result of a privacy regulation application
|
|
2530
|
-
* (for example, GDPR).
|
|
2531
|
-
*/
|
|
2532
|
-
triggeredByAnonymizeRequest?: boolean | null;
|
|
2533
|
-
/** If present, indicates the action that triggered the event. */
|
|
2534
|
-
originatedFrom?: string | null;
|
|
2535
|
-
/**
|
|
2536
|
-
* A sequence number defining the order of updates to the underlying entity.
|
|
2537
|
-
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
2538
|
-
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
2539
|
-
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
2540
|
-
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
2541
|
-
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
2542
|
-
*/
|
|
2543
|
-
entityEventSequence?: string | null;
|
|
2544
|
-
}
|
|
2545
|
-
interface ReferralEventCreatedEnvelope {
|
|
2546
|
-
entity: ReferralEvent;
|
|
2547
|
-
metadata: EventMetadata$2;
|
|
2548
|
-
}
|
|
2549
|
-
interface QueryCursorResult$2 {
|
|
2550
|
-
cursors: Cursors$2;
|
|
2551
|
-
hasNext: () => boolean;
|
|
2552
|
-
hasPrev: () => boolean;
|
|
2553
|
-
length: number;
|
|
2554
|
-
pageSize: number;
|
|
2555
|
-
}
|
|
2556
|
-
interface ReferralEventsQueryResult extends QueryCursorResult$2 {
|
|
2557
|
-
items: ReferralEvent[];
|
|
2558
|
-
query: ReferralEventsQueryBuilder;
|
|
2559
|
-
next: () => Promise<ReferralEventsQueryResult>;
|
|
2560
|
-
prev: () => Promise<ReferralEventsQueryResult>;
|
|
2561
|
-
}
|
|
2562
|
-
interface ReferralEventsQueryBuilder {
|
|
2563
|
-
/** @param propertyName - Property whose value is compared with `value`.
|
|
2564
|
-
* @param value - Value to compare against.
|
|
2565
|
-
* @documentationMaturity preview
|
|
2566
|
-
*/
|
|
2567
|
-
eq: (propertyName: '_createdDate' | '_updatedDate', value: any) => ReferralEventsQueryBuilder;
|
|
2568
|
-
/** @param propertyName - Property whose value is compared with `value`.
|
|
2569
|
-
* @param value - Value to compare against.
|
|
2570
|
-
* @documentationMaturity preview
|
|
2571
|
-
*/
|
|
2572
|
-
ne: (propertyName: '_createdDate' | '_updatedDate', value: any) => ReferralEventsQueryBuilder;
|
|
2573
|
-
/** @param propertyName - Property whose value is compared with `value`.
|
|
2574
|
-
* @param value - Value to compare against.
|
|
2575
|
-
* @documentationMaturity preview
|
|
2576
|
-
*/
|
|
2577
|
-
ge: (propertyName: '_createdDate' | '_updatedDate', value: any) => ReferralEventsQueryBuilder;
|
|
2578
|
-
/** @param propertyName - Property whose value is compared with `value`.
|
|
2579
|
-
* @param value - Value to compare against.
|
|
2580
|
-
* @documentationMaturity preview
|
|
2581
|
-
*/
|
|
2582
|
-
gt: (propertyName: '_createdDate' | '_updatedDate', value: any) => ReferralEventsQueryBuilder;
|
|
2583
|
-
/** @param propertyName - Property whose value is compared with `value`.
|
|
2584
|
-
* @param value - Value to compare against.
|
|
2585
|
-
* @documentationMaturity preview
|
|
2586
|
-
*/
|
|
2587
|
-
le: (propertyName: '_createdDate' | '_updatedDate', value: any) => ReferralEventsQueryBuilder;
|
|
2588
|
-
/** @param propertyName - Property whose value is compared with `value`.
|
|
2589
|
-
* @param value - Value to compare against.
|
|
2590
|
-
* @documentationMaturity preview
|
|
2591
|
-
*/
|
|
2592
|
-
lt: (propertyName: '_createdDate' | '_updatedDate', value: any) => ReferralEventsQueryBuilder;
|
|
2593
|
-
/** @param propertyName - Property whose value is compared with `values`.
|
|
2594
|
-
* @param values - List of values to compare against.
|
|
2595
|
-
* @documentationMaturity preview
|
|
2596
|
-
*/
|
|
2597
|
-
hasSome: (propertyName: '_createdDate' | '_updatedDate', value: any[]) => ReferralEventsQueryBuilder;
|
|
2598
|
-
/** @documentationMaturity preview */
|
|
2599
|
-
in: (propertyName: '_createdDate' | '_updatedDate', value: any) => ReferralEventsQueryBuilder;
|
|
2600
|
-
/** @documentationMaturity preview */
|
|
2601
|
-
exists: (propertyName: '_createdDate' | '_updatedDate', value: boolean) => ReferralEventsQueryBuilder;
|
|
2602
|
-
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
2603
|
-
* @documentationMaturity preview
|
|
2604
|
-
*/
|
|
2605
|
-
ascending: (...propertyNames: Array<'_createdDate' | '_updatedDate'>) => ReferralEventsQueryBuilder;
|
|
2606
|
-
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
2607
|
-
* @documentationMaturity preview
|
|
2608
|
-
*/
|
|
2609
|
-
descending: (...propertyNames: Array<'_createdDate' | '_updatedDate'>) => ReferralEventsQueryBuilder;
|
|
2610
|
-
/** @param limit - Number of items to return, which is also the `pageSize` of the results object.
|
|
2611
|
-
* @documentationMaturity preview
|
|
2612
|
-
*/
|
|
2613
|
-
limit: (limit: number) => ReferralEventsQueryBuilder;
|
|
2614
|
-
/** @param cursor - A pointer to specific record
|
|
2615
|
-
* @documentationMaturity preview
|
|
2616
|
-
*/
|
|
2617
|
-
skipTo: (cursor: string) => ReferralEventsQueryBuilder;
|
|
2618
|
-
/** @documentationMaturity preview */
|
|
2619
|
-
find: () => Promise<ReferralEventsQueryResult>;
|
|
2620
|
-
}
|
|
2621
|
-
interface QueryReferringCustomerTotalsOptions {
|
|
2622
|
-
/** Query to filter ReferringCustomerTotals. */
|
|
2623
|
-
query?: CursorQuery$2;
|
|
2624
|
-
/** List of contact ids to filter ReferringCustomerTotals. */
|
|
2625
|
-
contactIds?: string[];
|
|
2626
|
-
}
|
|
2627
|
-
interface QueryReferredFriendActionsOptions {
|
|
2628
|
-
/** Query to filter ReferredFriendActions. */
|
|
2629
|
-
query?: CursorQuery$2;
|
|
2630
|
-
/** List of contact ids to filter ReferredFriendActions. */
|
|
2631
|
-
contactIds?: string[];
|
|
1419
|
+
interface QueryReferralRewardsOptions {
|
|
1420
|
+
/** Filter by contact id or set to "me" for current identity's rewards. */
|
|
1421
|
+
contactId?: string | null;
|
|
2632
1422
|
}
|
|
2633
1423
|
|
|
2634
1424
|
interface HttpClient$2 {
|
|
@@ -2654,14 +1444,6 @@ type APIMetadata$2 = {
|
|
|
2654
1444
|
entityFqdn?: string;
|
|
2655
1445
|
packageName?: string;
|
|
2656
1446
|
};
|
|
2657
|
-
type EventDefinition$2<Payload = unknown, Type extends string = string> = {
|
|
2658
|
-
__type: 'event-definition';
|
|
2659
|
-
type: Type;
|
|
2660
|
-
isDomainEvent?: boolean;
|
|
2661
|
-
transformations?: (envelope: unknown) => Payload;
|
|
2662
|
-
__payload: Payload;
|
|
2663
|
-
};
|
|
2664
|
-
declare function EventDefinition$2<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$2<Payload, Type>;
|
|
2665
1447
|
|
|
2666
1448
|
declare global {
|
|
2667
1449
|
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
@@ -2673,91 +1455,76 @@ declare global {
|
|
|
2673
1455
|
declare const __metadata$2: {
|
|
2674
1456
|
PACKAGE_NAME: string;
|
|
2675
1457
|
};
|
|
2676
|
-
declare function
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
1458
|
+
declare function getReferralReward(httpClient: HttpClient$2): (_id: string) => Promise<ReferralReward & {
|
|
1459
|
+
rewardedReferringCustomerId: string;
|
|
1460
|
+
rewardedReferredFriendId: string;
|
|
1461
|
+
coupon?: {
|
|
1462
|
+
_id: string;
|
|
1463
|
+
code: string;
|
|
1464
|
+
status: Status$1;
|
|
1465
|
+
couponSpecification?: {
|
|
1466
|
+
fixedAmountOptions?: {
|
|
1467
|
+
amount: number;
|
|
1468
|
+
} | undefined;
|
|
1469
|
+
percentageOptions?: {
|
|
1470
|
+
percentage: number;
|
|
1471
|
+
} | undefined;
|
|
1472
|
+
minimumSubtotal: number;
|
|
1473
|
+
scope?: {
|
|
1474
|
+
namespace: string;
|
|
1475
|
+
group?: {
|
|
1476
|
+
name: string;
|
|
1477
|
+
} | undefined;
|
|
1478
|
+
} | undefined;
|
|
1479
|
+
name: string;
|
|
1480
|
+
discountType: DiscountType;
|
|
2690
1481
|
} | undefined;
|
|
2691
1482
|
} | undefined;
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
referralRewardId: string;
|
|
2696
|
-
rewardType: Reward;
|
|
1483
|
+
loyaltyPoints?: {
|
|
1484
|
+
transactionId: string;
|
|
1485
|
+
amount: number;
|
|
2697
1486
|
} | undefined;
|
|
1487
|
+
rewardType: RewardTypeType;
|
|
2698
1488
|
}>;
|
|
2699
|
-
declare function
|
|
2700
|
-
declare function getReferralStatistics(httpClient: HttpClient$2): () => Promise<GetReferralStatisticsResponse & GetReferralStatisticsResponseNonNullableFields>;
|
|
2701
|
-
declare function queryReferringCustomerTotals(httpClient: HttpClient$2): (options?: QueryReferringCustomerTotalsOptions) => Promise<QueryReferringCustomerTotalsResponse & QueryReferringCustomerTotalsResponseNonNullableFields>;
|
|
2702
|
-
declare function queryReferredFriendActions(httpClient: HttpClient$2): (options?: QueryReferredFriendActionsOptions) => Promise<QueryReferredFriendActionsResponse & QueryReferredFriendActionsResponseNonNullableFields>;
|
|
2703
|
-
declare const onReferralEventCreated: EventDefinition$2<ReferralEventCreatedEnvelope, "wix.loyalty.referral.v1.referral_event_created">;
|
|
1489
|
+
declare function queryReferralRewards(httpClient: HttpClient$2): (query: CursorQuery$2, options?: QueryReferralRewardsOptions) => Promise<QueryReferralRewardsResponse & QueryReferralRewardsResponseNonNullableFields>;
|
|
2704
1490
|
|
|
1491
|
+
type index_d$2_BulkGetReferralRewardsRequest = BulkGetReferralRewardsRequest;
|
|
1492
|
+
type index_d$2_BulkGetReferralRewardsResponse = BulkGetReferralRewardsResponse;
|
|
2705
1493
|
type index_d$2_Coupon = Coupon;
|
|
2706
1494
|
type index_d$2_CouponDiscountTypeOptionsOneOf = CouponDiscountTypeOptionsOneOf;
|
|
2707
1495
|
type index_d$2_CouponScope = CouponScope;
|
|
2708
1496
|
type index_d$2_CouponScopeOrMinSubtotalOneOf = CouponScopeOrMinSubtotalOneOf;
|
|
2709
|
-
type index_d$2_CreateReferralEventRequest = CreateReferralEventRequest;
|
|
2710
|
-
type index_d$2_CreateReferralEventResponse = CreateReferralEventResponse;
|
|
2711
1497
|
type index_d$2_DiscountType = DiscountType;
|
|
2712
1498
|
declare const index_d$2_DiscountType: typeof DiscountType;
|
|
2713
1499
|
type index_d$2_FixedAmountDiscount = FixedAmountDiscount;
|
|
2714
|
-
type index_d$
|
|
2715
|
-
type index_d$
|
|
2716
|
-
type index_d$
|
|
2717
|
-
type index_d$2_GetReferralStatisticsRequest = GetReferralStatisticsRequest;
|
|
2718
|
-
type index_d$2_GetReferralStatisticsResponse = GetReferralStatisticsResponse;
|
|
2719
|
-
type index_d$2_GetReferralStatisticsResponseNonNullableFields = GetReferralStatisticsResponseNonNullableFields;
|
|
1500
|
+
type index_d$2_GetReferralRewardRequest = GetReferralRewardRequest;
|
|
1501
|
+
type index_d$2_GetReferralRewardResponse = GetReferralRewardResponse;
|
|
1502
|
+
type index_d$2_GetReferralRewardResponseNonNullableFields = GetReferralRewardResponseNonNullableFields;
|
|
2720
1503
|
type index_d$2_Group = Group;
|
|
2721
1504
|
type index_d$2_LoyaltyPoints = LoyaltyPoints;
|
|
2722
1505
|
type index_d$2_PercentageDiscount = PercentageDiscount;
|
|
2723
|
-
type index_d$
|
|
2724
|
-
type index_d$
|
|
2725
|
-
type index_d$
|
|
2726
|
-
type index_d$
|
|
2727
|
-
type index_d$
|
|
2728
|
-
type index_d$
|
|
2729
|
-
type index_d$
|
|
2730
|
-
type index_d$2_QueryReferringCustomerTotalsOptions = QueryReferringCustomerTotalsOptions;
|
|
2731
|
-
type index_d$2_QueryReferringCustomerTotalsRequest = QueryReferringCustomerTotalsRequest;
|
|
2732
|
-
type index_d$2_QueryReferringCustomerTotalsResponse = QueryReferringCustomerTotalsResponse;
|
|
2733
|
-
type index_d$2_QueryReferringCustomerTotalsResponseNonNullableFields = QueryReferringCustomerTotalsResponseNonNullableFields;
|
|
2734
|
-
type index_d$2_ReferralEvent = ReferralEvent;
|
|
2735
|
-
type index_d$2_ReferralEventCreatedEnvelope = ReferralEventCreatedEnvelope;
|
|
2736
|
-
type index_d$2_ReferralEventEventTypeOneOf = ReferralEventEventTypeOneOf;
|
|
2737
|
-
type index_d$2_ReferralEventsQueryBuilder = ReferralEventsQueryBuilder;
|
|
2738
|
-
type index_d$2_ReferralEventsQueryResult = ReferralEventsQueryResult;
|
|
2739
|
-
type index_d$2_ReferredFriendAction = ReferredFriendAction;
|
|
2740
|
-
type index_d$2_ReferredFriendActionEvent = ReferredFriendActionEvent;
|
|
2741
|
-
type index_d$2_ReferredFriendActionRewardTypeOptionsOneOf = ReferredFriendActionRewardTypeOptionsOneOf;
|
|
2742
|
-
type index_d$2_ReferredFriendSignupEvent = ReferredFriendSignupEvent;
|
|
2743
|
-
type index_d$2_ReferringCustomerTotal = ReferringCustomerTotal;
|
|
1506
|
+
type index_d$2_QueryReferralRewardsOptions = QueryReferralRewardsOptions;
|
|
1507
|
+
type index_d$2_QueryReferralRewardsRequest = QueryReferralRewardsRequest;
|
|
1508
|
+
type index_d$2_QueryReferralRewardsResponse = QueryReferralRewardsResponse;
|
|
1509
|
+
type index_d$2_QueryReferralRewardsResponseNonNullableFields = QueryReferralRewardsResponseNonNullableFields;
|
|
1510
|
+
type index_d$2_ReferralReward = ReferralReward;
|
|
1511
|
+
type index_d$2_ReferralRewardReceiverOneOf = ReferralRewardReceiverOneOf;
|
|
1512
|
+
type index_d$2_ReferralRewardRewardTypeOptionsOneOf = ReferralRewardRewardTypeOptionsOneOf;
|
|
2744
1513
|
type index_d$2_Reward = Reward;
|
|
2745
|
-
|
|
2746
|
-
type index_d$
|
|
2747
|
-
|
|
2748
|
-
type index_d$
|
|
2749
|
-
type index_d$
|
|
1514
|
+
type index_d$2_RewardOptionsOneOf = RewardOptionsOneOf;
|
|
1515
|
+
type index_d$2_RewardTypeType = RewardTypeType;
|
|
1516
|
+
declare const index_d$2_RewardTypeType: typeof RewardTypeType;
|
|
1517
|
+
type index_d$2_RewardsInSite = RewardsInSite;
|
|
1518
|
+
type index_d$2_Type = Type;
|
|
1519
|
+
declare const index_d$2_Type: typeof Type;
|
|
2750
1520
|
type index_d$2_V1Coupon = V1Coupon;
|
|
2751
|
-
type index_d$
|
|
2752
|
-
type index_d$
|
|
2753
|
-
|
|
2754
|
-
declare const index_d$
|
|
2755
|
-
declare const index_d$
|
|
2756
|
-
declare const index_d$2_queryReferralEvent: typeof queryReferralEvent;
|
|
2757
|
-
declare const index_d$2_queryReferredFriendActions: typeof queryReferredFriendActions;
|
|
2758
|
-
declare const index_d$2_queryReferringCustomerTotals: typeof queryReferringCustomerTotals;
|
|
1521
|
+
type index_d$2_V1LoyaltyPoints = V1LoyaltyPoints;
|
|
1522
|
+
type index_d$2_ValidateReferralRewardRequest = ValidateReferralRewardRequest;
|
|
1523
|
+
type index_d$2_ValidateReferralRewardResponse = ValidateReferralRewardResponse;
|
|
1524
|
+
declare const index_d$2_getReferralReward: typeof getReferralReward;
|
|
1525
|
+
declare const index_d$2_queryReferralRewards: typeof queryReferralRewards;
|
|
2759
1526
|
declare namespace index_d$2 {
|
|
2760
|
-
export { type ActionEvent$2 as ActionEvent, type
|
|
1527
|
+
export { type ActionEvent$2 as ActionEvent, type index_d$2_BulkGetReferralRewardsRequest as BulkGetReferralRewardsRequest, type index_d$2_BulkGetReferralRewardsResponse as BulkGetReferralRewardsResponse, type index_d$2_Coupon as Coupon, type index_d$2_CouponDiscountTypeOptionsOneOf as CouponDiscountTypeOptionsOneOf, type index_d$2_CouponScope as CouponScope, type index_d$2_CouponScopeOrMinSubtotalOneOf as CouponScopeOrMinSubtotalOneOf, type CursorPaging$2 as CursorPaging, type CursorPagingMetadata$2 as CursorPagingMetadata, type CursorQuery$2 as CursorQuery, type CursorQueryPagingMethodOneOf$2 as CursorQueryPagingMethodOneOf, type Cursors$2 as Cursors, index_d$2_DiscountType as DiscountType, type DomainEvent$2 as DomainEvent, type DomainEventBodyOneOf$2 as DomainEventBodyOneOf, type Empty$1 as Empty, type EntityCreatedEvent$2 as EntityCreatedEvent, type EntityDeletedEvent$2 as EntityDeletedEvent, type EntityUpdatedEvent$2 as EntityUpdatedEvent, type index_d$2_FixedAmountDiscount as FixedAmountDiscount, type index_d$2_GetReferralRewardRequest as GetReferralRewardRequest, type index_d$2_GetReferralRewardResponse as GetReferralRewardResponse, type index_d$2_GetReferralRewardResponseNonNullableFields as GetReferralRewardResponseNonNullableFields, type index_d$2_Group as Group, type IdentificationData$2 as IdentificationData, type IdentificationDataIdOneOf$2 as IdentificationDataIdOneOf, type index_d$2_LoyaltyPoints as LoyaltyPoints, type MessageEnvelope$2 as MessageEnvelope, type index_d$2_PercentageDiscount as PercentageDiscount, type index_d$2_QueryReferralRewardsOptions as QueryReferralRewardsOptions, type index_d$2_QueryReferralRewardsRequest as QueryReferralRewardsRequest, type index_d$2_QueryReferralRewardsResponse as QueryReferralRewardsResponse, type index_d$2_QueryReferralRewardsResponseNonNullableFields as QueryReferralRewardsResponseNonNullableFields, type index_d$2_ReferralReward as ReferralReward, type index_d$2_ReferralRewardReceiverOneOf as ReferralRewardReceiverOneOf, type index_d$2_ReferralRewardRewardTypeOptionsOneOf as ReferralRewardRewardTypeOptionsOneOf, type ReferredFriendDetails$1 as ReferredFriendDetails, type index_d$2_Reward as Reward, type index_d$2_RewardOptionsOneOf as RewardOptionsOneOf, index_d$2_RewardTypeType as RewardTypeType, type index_d$2_RewardsInSite as RewardsInSite, SortOrder$2 as SortOrder, type Sorting$2 as Sorting, Status$1 as Status, type SuccessfulReferralEvent$1 as SuccessfulReferralEvent, index_d$2_Type as Type, type UndeleteInfo$2 as UndeleteInfo, type index_d$2_V1Coupon as V1Coupon, type index_d$2_V1LoyaltyPoints as V1LoyaltyPoints, type index_d$2_ValidateReferralRewardRequest as ValidateReferralRewardRequest, type index_d$2_ValidateReferralRewardResponse as ValidateReferralRewardResponse, WebhookIdentityType$2 as WebhookIdentityType, __metadata$2 as __metadata, index_d$2_getReferralReward as getReferralReward, index_d$2_queryReferralRewards as queryReferralRewards };
|
|
2761
1528
|
}
|
|
2762
1529
|
|
|
2763
1530
|
/** ReferredFriend is the main entity of ReferredFriends that can be used for lorem ipsum dolor */
|
|
@@ -3881,4 +2648,4 @@ declare namespace index_d {
|
|
|
3881
2648
|
export { type index_d_ActionEvent as ActionEvent, type index_d_BaseEventMetadata as BaseEventMetadata, type index_d_CursorPaging as CursorPaging, type index_d_CursorPagingMetadata as CursorPagingMetadata, type index_d_CursorQuery as CursorQuery, type index_d_CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOf, type index_d_Cursors as Cursors, type index_d_DeleteReferringCustomerOptions as DeleteReferringCustomerOptions, type index_d_DeleteReferringCustomerRequest as DeleteReferringCustomerRequest, type index_d_DeleteReferringCustomerResponse as DeleteReferringCustomerResponse, type index_d_DomainEvent as DomainEvent, type index_d_DomainEventBodyOneOf as DomainEventBodyOneOf, type index_d_EntityCreatedEvent as EntityCreatedEvent, type index_d_EntityDeletedEvent as EntityDeletedEvent, type index_d_EntityUpdatedEvent as EntityUpdatedEvent, type index_d_EventMetadata as EventMetadata, type index_d_GenerateReferringCustomerForContactRequest as GenerateReferringCustomerForContactRequest, type index_d_GenerateReferringCustomerForContactResponse as GenerateReferringCustomerForContactResponse, type index_d_GenerateReferringCustomerForContactResponseNonNullableFields as GenerateReferringCustomerForContactResponseNonNullableFields, type index_d_GetReferringCustomerByReferralCodeRequest as GetReferringCustomerByReferralCodeRequest, type index_d_GetReferringCustomerByReferralCodeResponse as GetReferringCustomerByReferralCodeResponse, type index_d_GetReferringCustomerByReferralCodeResponseNonNullableFields as GetReferringCustomerByReferralCodeResponseNonNullableFields, type index_d_GetReferringCustomerRequest as GetReferringCustomerRequest, type index_d_GetReferringCustomerResponse as GetReferringCustomerResponse, type index_d_GetReferringCustomerResponseNonNullableFields as GetReferringCustomerResponseNonNullableFields, type index_d_IdentificationData as IdentificationData, type index_d_IdentificationDataIdOneOf as IdentificationDataIdOneOf, type index_d_MessageEnvelope as MessageEnvelope, type index_d_QueryReferringCustomersRequest as QueryReferringCustomersRequest, type index_d_QueryReferringCustomersResponse as QueryReferringCustomersResponse, type index_d_QueryReferringCustomersResponseNonNullableFields as QueryReferringCustomersResponseNonNullableFields, type index_d_ReferringCustomer as ReferringCustomer, type index_d_ReferringCustomerCreatedEnvelope as ReferringCustomerCreatedEnvelope, type index_d_ReferringCustomerDeletedEnvelope as ReferringCustomerDeletedEnvelope, type index_d_ReferringCustomersQueryBuilder as ReferringCustomersQueryBuilder, type index_d_ReferringCustomersQueryResult as ReferringCustomersQueryResult, index_d_SortOrder as SortOrder, type index_d_Sorting as Sorting, type index_d_UndeleteInfo as UndeleteInfo, index_d_WebhookIdentityType as WebhookIdentityType, index_d___metadata as __metadata, index_d_deleteReferringCustomer as deleteReferringCustomer, index_d_generateReferringCustomerForContact as generateReferringCustomerForContact, index_d_getReferringCustomer as getReferringCustomer, index_d_getReferringCustomerByReferralCode as getReferringCustomerByReferralCode, index_d_onReferringCustomerCreated as onReferringCustomerCreated, index_d_onReferringCustomerDeleted as onReferringCustomerDeleted, index_d_queryReferringCustomers as queryReferringCustomers };
|
|
3882
2649
|
}
|
|
3883
2650
|
|
|
3884
|
-
export { index_d as customers, index_d$1 as friends, index_d$
|
|
2651
|
+
export { index_d as customers, index_d$1 as friends, index_d$2 as rewards, index_d$3 as tracker };
|