@wix/referral 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/context.d.ts +2 -0
- package/build/cjs/context.js +3 -1
- package/build/cjs/context.js.map +1 -1
- package/build/cjs/index.d.ts +2 -0
- package/build/cjs/index.js +3 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/meta.d.ts +2 -0
- package/build/cjs/meta.js +3 -1
- package/build/cjs/meta.js.map +1 -1
- package/build/es/context.d.ts +2 -0
- package/build/es/context.js +2 -0
- package/build/es/context.js.map +1 -1
- package/build/es/index.d.ts +2 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -1
- package/build/es/meta.d.ts +2 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -1
- package/package.json +5 -3
- package/type-bundles/context.bundle.d.ts +1465 -454
- package/type-bundles/index.bundle.d.ts +2907 -489
- package/type-bundles/meta.bundle.d.ts +2457 -537
|
@@ -1,134 +1,203 @@
|
|
|
1
|
-
/**
|
|
2
|
-
interface
|
|
3
|
-
/**
|
|
4
|
-
|
|
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;
|
|
1
|
+
/** ReferralProgram is the main entity of ReferralPrograms that can be used to manage the program. */
|
|
2
|
+
interface ReferralProgram {
|
|
3
|
+
/** Referral program name. */
|
|
4
|
+
name?: string | null;
|
|
11
5
|
/**
|
|
12
|
-
*
|
|
6
|
+
* Referral program status.
|
|
13
7
|
* @readonly
|
|
14
8
|
*/
|
|
15
|
-
|
|
9
|
+
status?: ProgramStatus;
|
|
16
10
|
/** Represents the current state of an item. Each time the item is modified, its `revision` changes. for an update operation to succeed, you MUST pass the latest revision. */
|
|
17
11
|
revision?: string | null;
|
|
18
12
|
/**
|
|
19
|
-
*
|
|
13
|
+
* Program's creation date and time.
|
|
20
14
|
* @readonly
|
|
21
15
|
*/
|
|
22
16
|
_createdDate?: Date;
|
|
23
17
|
/**
|
|
24
|
-
*
|
|
18
|
+
* Program's last update date and time
|
|
25
19
|
* @readonly
|
|
26
20
|
*/
|
|
27
21
|
_updatedDate?: Date;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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 {
|
|
71
|
-
/**
|
|
72
|
-
* The referring customer ID.
|
|
73
|
-
* @readonly
|
|
74
|
-
*/
|
|
75
|
-
rewardedReferringCustomerId?: string;
|
|
22
|
+
/** Referred friend reward configuration. */
|
|
23
|
+
referredFriendReward?: Reward$2;
|
|
24
|
+
/** Referring customer reward configuration. */
|
|
25
|
+
referringCustomerReward?: Reward$2;
|
|
26
|
+
/** List of actions that complete referral. */
|
|
27
|
+
successfulReferralActions?: Action[];
|
|
76
28
|
/**
|
|
77
|
-
*
|
|
29
|
+
* Set to true if user has required plan to activate program.
|
|
78
30
|
* @readonly
|
|
31
|
+
* @deprecated Set to true if user has required plan to activate program.
|
|
32
|
+
* @replacedBy GetReferralProgramPremiumFeatures
|
|
33
|
+
* @removalDate 2024-09-01
|
|
79
34
|
*/
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
35
|
+
isPremium?: boolean;
|
|
36
|
+
/** Emails configuration. */
|
|
37
|
+
emails?: Emails;
|
|
38
|
+
}
|
|
39
|
+
declare enum ProgramStatus {
|
|
40
|
+
/** unknown status. */
|
|
41
|
+
UNKNOWN = "UNKNOWN",
|
|
42
|
+
/** initial program status (program was created but was not enabled yet). */
|
|
43
|
+
DRAFT = "DRAFT",
|
|
44
|
+
/** program is active. */
|
|
45
|
+
ACTIVE = "ACTIVE",
|
|
46
|
+
/** program was manually disabled by the user (this action can be reverted, meaning user can set it to be active again). */
|
|
47
|
+
PAUSED = "PAUSED"
|
|
48
|
+
}
|
|
49
|
+
interface Reward$2 extends RewardOptionsOneOf$1 {
|
|
50
|
+
/** Options for coupon reward type. */
|
|
51
|
+
couponOptions?: Coupon$2;
|
|
52
|
+
/** Options for Loyalty points reward type. */
|
|
53
|
+
loyaltyPointsOptions?: LoyaltyPoints$2;
|
|
54
|
+
/** Type of the reward. */
|
|
55
|
+
type?: Type$1;
|
|
85
56
|
}
|
|
86
57
|
/** @oneof */
|
|
87
|
-
interface
|
|
88
|
-
/**
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
rewardedReferringCustomerId?: string;
|
|
93
|
-
/**
|
|
94
|
-
* The referred friend ID.
|
|
95
|
-
* @readonly
|
|
96
|
-
*/
|
|
97
|
-
rewardedReferredFriendId?: string;
|
|
58
|
+
interface RewardOptionsOneOf$1 {
|
|
59
|
+
/** Options for coupon reward type. */
|
|
60
|
+
couponOptions?: Coupon$2;
|
|
61
|
+
/** Options for Loyalty points reward type. */
|
|
62
|
+
loyaltyPointsOptions?: LoyaltyPoints$2;
|
|
98
63
|
}
|
|
99
|
-
declare enum
|
|
64
|
+
declare enum Type$1 {
|
|
100
65
|
/** Unknown reward type. */
|
|
101
66
|
UNKNOWN = "UNKNOWN",
|
|
102
|
-
/**
|
|
67
|
+
/** Coupon reward type. */
|
|
103
68
|
COUPON = "COUPON",
|
|
104
|
-
/**
|
|
69
|
+
/** Loyalty points reward type. */
|
|
105
70
|
LOYALTY_POINTS = "LOYALTY_POINTS",
|
|
106
|
-
/** No reward. */
|
|
71
|
+
/** No reward type. */
|
|
107
72
|
NOTHING = "NOTHING"
|
|
108
73
|
}
|
|
109
|
-
interface
|
|
110
|
-
/**
|
|
111
|
-
|
|
74
|
+
interface Coupon$2 extends CouponDiscountTypeOptionsOneOf$2, CouponScopeOrMinSubtotalOneOf$2 {
|
|
75
|
+
/** Options for fixed amount discount type. */
|
|
76
|
+
fixedAmountOptions?: FixedAmountDiscount$2;
|
|
77
|
+
/** Options for percentage discount type. */
|
|
78
|
+
percentageOptions?: PercentageDiscount$2;
|
|
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$2;
|
|
83
|
+
/** Coupon name. */
|
|
84
|
+
name?: string;
|
|
85
|
+
/** Coupon discount type. */
|
|
86
|
+
discountType?: DiscountType$2;
|
|
87
|
+
/** Limit the coupon to only apply to one item in cart. */
|
|
88
|
+
limitedToOneItem?: boolean | null;
|
|
89
|
+
/** If true, coupon also applies to subscriptions. */
|
|
90
|
+
appliesToSubscriptions?: boolean | null;
|
|
91
|
+
/** Specifies the amount of discounted cycles for subscription item. See Stores Coupons documentation for more info. */
|
|
92
|
+
discountedCycleCount?: number | null;
|
|
112
93
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
94
|
+
/** @oneof */
|
|
95
|
+
interface CouponDiscountTypeOptionsOneOf$2 {
|
|
96
|
+
/** Options for fixed amount discount type. */
|
|
97
|
+
fixedAmountOptions?: FixedAmountDiscount$2;
|
|
98
|
+
/** Options for percentage discount type. */
|
|
99
|
+
percentageOptions?: PercentageDiscount$2;
|
|
116
100
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
101
|
+
/** @oneof */
|
|
102
|
+
interface CouponScopeOrMinSubtotalOneOf$2 {
|
|
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$2;
|
|
120
107
|
}
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
|
|
108
|
+
declare enum DiscountType$2 {
|
|
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"
|
|
124
117
|
}
|
|
125
|
-
interface
|
|
126
|
-
/**
|
|
127
|
-
|
|
118
|
+
interface FixedAmountDiscount$2 {
|
|
119
|
+
/** Fixed amount to discount. */
|
|
120
|
+
amount?: number;
|
|
128
121
|
}
|
|
129
|
-
interface
|
|
122
|
+
interface PercentageDiscount$2 {
|
|
123
|
+
/** Percentage to discount. */
|
|
124
|
+
percentage?: number;
|
|
125
|
+
}
|
|
126
|
+
interface CouponScope$2 {
|
|
127
|
+
/** Namespace of the coupon scope. */
|
|
128
|
+
namespace?: string;
|
|
129
|
+
/** Group of the coupon scope. */
|
|
130
|
+
group?: Group$2;
|
|
131
|
+
}
|
|
132
|
+
interface Group$2 {
|
|
133
|
+
/** Name of the group. */
|
|
134
|
+
name?: string;
|
|
135
|
+
/** Entity ID of the group. */
|
|
136
|
+
entityId?: string | null;
|
|
137
|
+
}
|
|
138
|
+
interface LoyaltyPoints$2 {
|
|
139
|
+
/** Amount of points to give. */
|
|
140
|
+
amount?: number;
|
|
141
|
+
}
|
|
142
|
+
declare enum Action {
|
|
143
|
+
/** Unknown action. */
|
|
144
|
+
UNKNOWN = "UNKNOWN",
|
|
145
|
+
/** Store order placed. */
|
|
146
|
+
STORE_ORDER_PLACED = "STORE_ORDER_PLACED",
|
|
147
|
+
/** Pricing plan ordered. */
|
|
148
|
+
PLAN_ORDERED = "PLAN_ORDERED",
|
|
149
|
+
/** Wix events ticket ordered. */
|
|
150
|
+
TICKET_ORDERED = "TICKET_ORDERED",
|
|
151
|
+
/** Bookings session booked. */
|
|
152
|
+
SESSION_BOOKED = "SESSION_BOOKED",
|
|
153
|
+
/** Restaurant order placed. */
|
|
154
|
+
RESTAURANT_ORDER_PLACED = "RESTAURANT_ORDER_PLACED"
|
|
155
|
+
}
|
|
156
|
+
interface Emails {
|
|
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;
|
|
193
|
+
}
|
|
194
|
+
interface QueryReferralProgramsRequest {
|
|
195
|
+
/** Query to filter ReferralPrograms. */
|
|
196
|
+
query: CursorQuery$4;
|
|
197
|
+
}
|
|
198
|
+
interface CursorQuery$4 extends CursorQueryPagingMethodOneOf$4 {
|
|
130
199
|
/** 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`. */
|
|
131
|
-
cursorPaging?: CursorPaging$
|
|
200
|
+
cursorPaging?: CursorPaging$4;
|
|
132
201
|
/**
|
|
133
202
|
* Filter object in the following format:
|
|
134
203
|
* `"filter" : {
|
|
@@ -142,24 +211,24 @@ interface CursorQuery$2 extends CursorQueryPagingMethodOneOf$2 {
|
|
|
142
211
|
* Sort object in the following format:
|
|
143
212
|
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
144
213
|
*/
|
|
145
|
-
sort?: Sorting$
|
|
214
|
+
sort?: Sorting$4[];
|
|
146
215
|
}
|
|
147
216
|
/** @oneof */
|
|
148
|
-
interface CursorQueryPagingMethodOneOf$
|
|
217
|
+
interface CursorQueryPagingMethodOneOf$4 {
|
|
149
218
|
/** 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`. */
|
|
150
|
-
cursorPaging?: CursorPaging$
|
|
219
|
+
cursorPaging?: CursorPaging$4;
|
|
151
220
|
}
|
|
152
|
-
interface Sorting$
|
|
221
|
+
interface Sorting$4 {
|
|
153
222
|
/** Name of the field to sort by. */
|
|
154
223
|
fieldName?: string;
|
|
155
224
|
/** Sort order. */
|
|
156
|
-
order?: SortOrder$
|
|
225
|
+
order?: SortOrder$4;
|
|
157
226
|
}
|
|
158
|
-
declare enum SortOrder$
|
|
227
|
+
declare enum SortOrder$4 {
|
|
159
228
|
ASC = "ASC",
|
|
160
229
|
DESC = "DESC"
|
|
161
230
|
}
|
|
162
|
-
interface CursorPaging$
|
|
231
|
+
interface CursorPaging$4 {
|
|
163
232
|
/** Maximum number of items to return in the results. */
|
|
164
233
|
limit?: number | null;
|
|
165
234
|
/**
|
|
@@ -170,17 +239,17 @@ interface CursorPaging$2 {
|
|
|
170
239
|
*/
|
|
171
240
|
cursor?: string | null;
|
|
172
241
|
}
|
|
173
|
-
interface
|
|
174
|
-
/**
|
|
175
|
-
|
|
242
|
+
interface QueryReferralProgramsResponse {
|
|
243
|
+
/** ReferralPrograms that match the query. */
|
|
244
|
+
referralPrograms?: ReferralProgram[];
|
|
176
245
|
/** Paging metadata. */
|
|
177
|
-
|
|
246
|
+
pagingMetadata?: CursorPagingMetadata$4;
|
|
178
247
|
}
|
|
179
|
-
interface CursorPagingMetadata$
|
|
248
|
+
interface CursorPagingMetadata$4 {
|
|
180
249
|
/** Number of items returned in the response. */
|
|
181
250
|
count?: number | null;
|
|
182
251
|
/** Cursor strings that point to the next page, previous page, or both. */
|
|
183
|
-
cursors?: Cursors$
|
|
252
|
+
cursors?: Cursors$4;
|
|
184
253
|
/**
|
|
185
254
|
* Whether there are more pages to retrieve following the current page.
|
|
186
255
|
*
|
|
@@ -189,129 +258,2557 @@ interface CursorPagingMetadata$2 {
|
|
|
189
258
|
*/
|
|
190
259
|
hasNext?: boolean | null;
|
|
191
260
|
}
|
|
192
|
-
interface Cursors$
|
|
261
|
+
interface Cursors$4 {
|
|
193
262
|
/** Cursor string pointing to the next page in the list of results. */
|
|
194
263
|
next?: string | null;
|
|
195
264
|
/** Cursor pointing to the previous page in the list of results. */
|
|
196
265
|
prev?: string | null;
|
|
197
266
|
}
|
|
198
|
-
interface
|
|
267
|
+
interface UpdateReferralProgramRequest {
|
|
268
|
+
/** ReferralProgram to be updated, may be partial. */
|
|
269
|
+
referralProgram: ReferralProgram;
|
|
199
270
|
}
|
|
200
|
-
interface
|
|
201
|
-
/**
|
|
202
|
-
|
|
203
|
-
/** Total actions completed by referred friends */
|
|
204
|
-
totalActionsCompleted?: number;
|
|
205
|
-
/** Total amount of purchases made by referred friends */
|
|
206
|
-
totalAmountGenerated?: string;
|
|
271
|
+
interface UpdateReferralProgramResponse {
|
|
272
|
+
/** The updated ReferralProgram. */
|
|
273
|
+
referralProgram?: ReferralProgram;
|
|
207
274
|
}
|
|
208
|
-
interface
|
|
209
|
-
/** Query to filter ReferringCustomerTotals. */
|
|
210
|
-
query?: CursorQuery$2;
|
|
211
|
-
/** List of contact ids to filter ReferringCustomerTotals. */
|
|
212
|
-
contactIds?: string[];
|
|
275
|
+
interface ActivateReferralProgramRequest {
|
|
213
276
|
}
|
|
214
|
-
interface
|
|
215
|
-
/**
|
|
216
|
-
|
|
217
|
-
/** Paging metadata. */
|
|
218
|
-
metadata?: CursorPagingMetadata$2;
|
|
277
|
+
interface ActivateReferralProgramResponse {
|
|
278
|
+
/** The activated ReferralProgram. */
|
|
279
|
+
referralProgram?: ReferralProgram;
|
|
219
280
|
}
|
|
220
|
-
interface
|
|
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[];
|
|
302
|
+
}
|
|
303
|
+
interface GenerateAISocialMediaPostsSuggestionsRequest {
|
|
304
|
+
/** The topic to generate suggestions for. */
|
|
305
|
+
topic?: string;
|
|
306
|
+
}
|
|
307
|
+
interface GenerateAISocialMediaPostsSuggestionsResponse {
|
|
308
|
+
/** The generated suggestions. */
|
|
309
|
+
suggestions?: AISocialMediaPostSuggestion[];
|
|
310
|
+
/** The refer friends page URL. */
|
|
311
|
+
referFriendsPageUrl?: string | null;
|
|
312
|
+
}
|
|
313
|
+
interface GetReferralProgramPremiumFeaturesRequest {
|
|
314
|
+
}
|
|
315
|
+
interface GetReferralProgramPremiumFeaturesResponse {
|
|
221
316
|
/**
|
|
222
|
-
*
|
|
317
|
+
* Set to true if user has referral program feature.
|
|
223
318
|
* @readonly
|
|
224
319
|
*/
|
|
225
|
-
|
|
320
|
+
referralProgram?: boolean;
|
|
321
|
+
}
|
|
322
|
+
interface DomainEvent$4 extends DomainEventBodyOneOf$4 {
|
|
323
|
+
createdEvent?: EntityCreatedEvent$4;
|
|
324
|
+
updatedEvent?: EntityUpdatedEvent$4;
|
|
325
|
+
deletedEvent?: EntityDeletedEvent$4;
|
|
326
|
+
actionEvent?: ActionEvent$4;
|
|
226
327
|
/**
|
|
227
|
-
*
|
|
228
|
-
*
|
|
328
|
+
* Unique event ID.
|
|
329
|
+
* Allows clients to ignore duplicate webhooks.
|
|
229
330
|
*/
|
|
230
|
-
|
|
331
|
+
_id?: string;
|
|
231
332
|
/**
|
|
232
|
-
*
|
|
233
|
-
*
|
|
333
|
+
* Assumes actions are also always typed to an entity_type
|
|
334
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
234
335
|
*/
|
|
235
|
-
|
|
336
|
+
entityFqdn?: string;
|
|
236
337
|
/**
|
|
237
|
-
*
|
|
238
|
-
*
|
|
338
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
339
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
340
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
341
|
+
*/
|
|
342
|
+
slug?: string;
|
|
343
|
+
/** ID of the entity associated with the event. */
|
|
344
|
+
entityId?: string;
|
|
345
|
+
/** Event timestamp. */
|
|
346
|
+
eventTime?: Date;
|
|
347
|
+
/**
|
|
348
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
349
|
+
* (for example, GDPR).
|
|
350
|
+
*/
|
|
351
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
352
|
+
/** If present, indicates the action that triggered the event. */
|
|
353
|
+
originatedFrom?: string | null;
|
|
354
|
+
/**
|
|
355
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
356
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
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.
|
|
361
|
+
*/
|
|
362
|
+
entityEventSequence?: string | null;
|
|
363
|
+
}
|
|
364
|
+
/** @oneof */
|
|
365
|
+
interface DomainEventBodyOneOf$4 {
|
|
366
|
+
createdEvent?: EntityCreatedEvent$4;
|
|
367
|
+
updatedEvent?: EntityUpdatedEvent$4;
|
|
368
|
+
deletedEvent?: EntityDeletedEvent$4;
|
|
369
|
+
actionEvent?: ActionEvent$4;
|
|
370
|
+
}
|
|
371
|
+
interface EntityCreatedEvent$4 {
|
|
372
|
+
entity?: string;
|
|
373
|
+
}
|
|
374
|
+
interface UndeleteInfo$4 {
|
|
375
|
+
deletedDate?: Date;
|
|
376
|
+
}
|
|
377
|
+
interface EntityUpdatedEvent$4 {
|
|
378
|
+
/**
|
|
379
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
380
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
381
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
382
|
+
*/
|
|
383
|
+
currentEntity?: string;
|
|
384
|
+
}
|
|
385
|
+
interface EntityDeletedEvent$4 {
|
|
386
|
+
/** Entity that was deleted */
|
|
387
|
+
deletedEntity?: string | null;
|
|
388
|
+
}
|
|
389
|
+
interface ActionEvent$4 {
|
|
390
|
+
body?: string;
|
|
391
|
+
}
|
|
392
|
+
interface Empty$3 {
|
|
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[];
|
|
433
|
+
}
|
|
434
|
+
/** @oneof */
|
|
435
|
+
interface MetaSiteSpecialEventPayloadOneOf {
|
|
436
|
+
/** Emitted on a meta site creation. */
|
|
437
|
+
siteCreated?: SiteCreated;
|
|
438
|
+
/** Emitted on a meta site transfer completion. */
|
|
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;
|
|
684
|
+
}
|
|
685
|
+
interface SubscriptionEvent extends SubscriptionEventEventOneOf {
|
|
686
|
+
/** Triggered when a subscription is created. */
|
|
687
|
+
created?: SubscriptionCreated;
|
|
688
|
+
/**
|
|
689
|
+
* Triggered when a subscription is assigned to a Wix site, including the initial
|
|
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;
|
|
699
|
+
/**
|
|
700
|
+
* Triggered when a subscription is unassigned from a Wix site and becomes
|
|
701
|
+
* floating.
|
|
702
|
+
*/
|
|
703
|
+
unassigned?: SubscriptionUnassigned;
|
|
704
|
+
/**
|
|
705
|
+
* Triggered when a subscription is transferred from one Wix account to another.
|
|
706
|
+
* A transfer includes cancelling the original subscription and creating a new
|
|
707
|
+
* subscription for the target account. The event returns both the original
|
|
708
|
+
* and the new subscription.
|
|
709
|
+
*/
|
|
710
|
+
transferred?: SubscriptionTransferred;
|
|
711
|
+
/** Triggered when a recurring charge succeeds for a subscription. */
|
|
712
|
+
recurringChargeSucceeded?: RecurringChargeSucceeded;
|
|
713
|
+
/**
|
|
714
|
+
* Triggered when a subscription was updated including when its product has been
|
|
715
|
+
* up- or downgraded or the billing cycle is changed.
|
|
716
|
+
*/
|
|
717
|
+
contractSwitched?: ContractSwitched;
|
|
718
|
+
/**
|
|
719
|
+
* Triggered when a subscription gets close to the end of its billing cycle.
|
|
720
|
+
* The exact number of days is defined in the billing system.
|
|
721
|
+
*/
|
|
722
|
+
nearEndOfPeriod?: SubscriptionNearEndOfPeriod;
|
|
723
|
+
/**
|
|
724
|
+
* Triggered when a subscription is updated and the change doesn't happen
|
|
725
|
+
* immediately but at the end of the current billing cycle.
|
|
726
|
+
*/
|
|
727
|
+
pendingChange?: SubscriptionPendingChange;
|
|
728
|
+
/** ID of the subscription's event. */
|
|
729
|
+
eventId?: string | null;
|
|
730
|
+
/**
|
|
731
|
+
* Date and time of the event in
|
|
732
|
+
* [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)
|
|
733
|
+
* `YYYY-MM-DDThh:mm:ss.sssZ` format.
|
|
734
|
+
*/
|
|
735
|
+
eventDate?: Date;
|
|
736
|
+
}
|
|
737
|
+
/** @oneof */
|
|
738
|
+
interface SubscriptionEventEventOneOf {
|
|
739
|
+
/** Triggered when a subscription is created. */
|
|
740
|
+
created?: SubscriptionCreated;
|
|
741
|
+
/**
|
|
742
|
+
* Triggered when a subscription is assigned to a Wix site, including the initial
|
|
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;
|
|
781
|
+
}
|
|
782
|
+
/** Triggered when a subscription is created. */
|
|
783
|
+
interface SubscriptionCreated {
|
|
784
|
+
/** Created subscription. */
|
|
785
|
+
subscription?: Subscription;
|
|
786
|
+
/** Metadata for the `created` event. */
|
|
787
|
+
metadata?: Record<string, string>;
|
|
788
|
+
/**
|
|
789
|
+
* Subscription reactivation data.
|
|
790
|
+
* A subscription can be reactivated for example if it was incorrectly canceled because of fraud and then reactivated
|
|
791
|
+
* by the billing system
|
|
792
|
+
*/
|
|
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
|
+
_id?: string;
|
|
802
|
+
/** ID of the Wix account that purchased the subscription. */
|
|
803
|
+
userId?: string;
|
|
804
|
+
/**
|
|
805
|
+
* ID of the [product](https://bo.wix.com/wix-docs/rest/premium/premium-product-catalog-v2/products/product-object)
|
|
806
|
+
* for which the subscription was purchased.
|
|
807
|
+
*/
|
|
808
|
+
productId?: string;
|
|
809
|
+
/**
|
|
810
|
+
* Date and time the subscription was created in
|
|
811
|
+
* [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)
|
|
812
|
+
* `YYYY-MM-DDThh:mm:ss.sssZ` format.
|
|
813
|
+
*/
|
|
814
|
+
createdAt?: Date;
|
|
815
|
+
/**
|
|
816
|
+
* Date and time the subscription was last updated in
|
|
817
|
+
* [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)
|
|
818
|
+
* `YYYY-MM-DDThh:mm:ss.sssZ` format.
|
|
819
|
+
*/
|
|
820
|
+
updatedAt?: Date;
|
|
821
|
+
/**
|
|
822
|
+
* ID of the metasite that the subscription is assigned to.
|
|
823
|
+
* Available only when the subscription is assigned to a Wix site.
|
|
824
|
+
* Subscriptions for account level products can't be assigned to a Wix site.
|
|
825
|
+
*/
|
|
826
|
+
metaSiteId?: string | null;
|
|
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;
|
|
831
|
+
/**
|
|
832
|
+
* Subscription status.
|
|
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.
|
|
840
|
+
*/
|
|
841
|
+
status?: SubscriptionStatus;
|
|
842
|
+
/**
|
|
843
|
+
* Date and time the subscription was last transferred from one Wix account to
|
|
844
|
+
* another in
|
|
845
|
+
* [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)
|
|
846
|
+
* `YYYY-MM-DDThh:mm:ss.sssZ` format.
|
|
847
|
+
*/
|
|
848
|
+
transferredAt?: Date;
|
|
849
|
+
/**
|
|
850
|
+
* ID of the [product type](https://bo.wix.com/wix-docs/rest/premium/premium-product-catalog-v2/product-types/product-type-object)
|
|
851
|
+
* that the product, for which the subscription was purchased, belongs to.
|
|
852
|
+
*/
|
|
853
|
+
productTypeId?: string;
|
|
854
|
+
/** Version number, which increments by 1 each time the subscription is updated. */
|
|
855
|
+
version?: number;
|
|
856
|
+
/**
|
|
857
|
+
* Whether the subscription is active. Includes the statuses
|
|
858
|
+
* `"AUTO_RENEW_ON"`, `"AUTO_RENEW_OFF"`, and `"MANUAL_RECURRING"`.
|
|
859
|
+
*/
|
|
860
|
+
active?: boolean;
|
|
861
|
+
/**
|
|
862
|
+
* Date and time the subscription was originally created in
|
|
863
|
+
* [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)
|
|
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.
|
|
866
|
+
*/
|
|
867
|
+
originalCreationDate?: Date;
|
|
868
|
+
/** Custom metadata about the subscription. */
|
|
869
|
+
metadata?: Record<string, string>;
|
|
870
|
+
/**
|
|
871
|
+
* 2-letter country code in
|
|
872
|
+
* [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)
|
|
873
|
+
* format.
|
|
874
|
+
*/
|
|
875
|
+
countryCode?: string | null;
|
|
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;
|
|
906
|
+
}
|
|
907
|
+
/** @oneof */
|
|
908
|
+
interface CycleCycleSelectorOneOf {
|
|
909
|
+
/** repetitive interval */
|
|
910
|
+
interval?: Interval;
|
|
911
|
+
/** one time */
|
|
912
|
+
oneTime?: OneTime;
|
|
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;
|
|
990
|
+
}
|
|
991
|
+
/** Information about the cancellation flow including who canceled the subscription and why it was canceled. */
|
|
992
|
+
interface CancellationDetails {
|
|
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;
|
|
1032
|
+
}
|
|
1033
|
+
declare enum Initiator {
|
|
1034
|
+
UNKNOWN = "UNKNOWN",
|
|
1035
|
+
USER_REQUESTED = "USER_REQUESTED",
|
|
1036
|
+
APP_MANAGED = "APP_MANAGED",
|
|
1037
|
+
PASSIVE = "PASSIVE"
|
|
1038
|
+
}
|
|
1039
|
+
/** Triggered when the subscription's auto renew is turned on. */
|
|
1040
|
+
interface SubscriptionAutoRenewTurnedOn {
|
|
1041
|
+
/** Subscription for which auto renew is turned on. */
|
|
1042
|
+
subscription?: Subscription;
|
|
1043
|
+
/**
|
|
1044
|
+
* Supported values: `USER`, `APP`.
|
|
1045
|
+
*
|
|
1046
|
+
* Information about who turned auto renew on.
|
|
1047
|
+
* + `"USER"`: The site owner who purchased the subscription has turned auto renew on.
|
|
1048
|
+
* + `"APP"`: The service provider has turned auto renew on.
|
|
1049
|
+
*/
|
|
1050
|
+
initiator?: string | null;
|
|
1051
|
+
}
|
|
1052
|
+
/** Triggered when the subscription's auto renew is turned off. */
|
|
1053
|
+
interface SubscriptionAutoRenewTurnedOff {
|
|
1054
|
+
/** Subscription for which auto renew is turned off. */
|
|
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;
|
|
1064
|
+
}
|
|
1065
|
+
/**
|
|
1066
|
+
* Triggered when a subscription is unassigned from a Wix site and becomes
|
|
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;
|
|
1082
|
+
}
|
|
1083
|
+
declare enum UnassignReason {
|
|
1084
|
+
UNKNOWN = "UNKNOWN",
|
|
1085
|
+
USER_REQUESTED = "USER_REQUESTED",
|
|
1086
|
+
REPLACED_BY_ANOTHER_SUBSCRIPTION = "REPLACED_BY_ANOTHER_SUBSCRIPTION"
|
|
1087
|
+
}
|
|
1088
|
+
/**
|
|
1089
|
+
* Triggered when a subscription is transferred from one Wix account to another.
|
|
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;
|
|
1136
|
+
/**
|
|
1137
|
+
* ID of the metasite the subscription has been assigned to previously.
|
|
1138
|
+
* Available only in case the subscription is assigned to a different site.
|
|
1139
|
+
*/
|
|
1140
|
+
previousMetaSiteId?: string | null;
|
|
1141
|
+
/**
|
|
1142
|
+
* Update reason.
|
|
1143
|
+
*
|
|
1144
|
+
* + `"PRICE_INCREASE"`: The subscription's price has been increased.
|
|
1145
|
+
* + `"EXTERNAL_PROVIDER_TRIGGER"`: Any reason other than a price increase.
|
|
1146
|
+
*/
|
|
1147
|
+
contractSwitchReason?: ContractSwitchReason;
|
|
1148
|
+
/** Information about the price update. Available only for updates with a price increase. */
|
|
1149
|
+
productPriceIncreaseData?: ProductPriceIncreaseData;
|
|
1150
|
+
/**
|
|
1151
|
+
* Information about a product adjustment. For example, a downgrade.
|
|
1152
|
+
* __Note__: This isn't the same as `contractSwitchType`.
|
|
1153
|
+
*
|
|
1154
|
+
* + `NOT_APPLICABLE`: There is no information about whether the product has been up- or downgraded.
|
|
1155
|
+
* + `DOWNGRADE`: The product has been downgraded.
|
|
1156
|
+
*/
|
|
1157
|
+
productAdjustment?: ProductAdjustment;
|
|
1158
|
+
}
|
|
1159
|
+
/** Copied from SBS */
|
|
1160
|
+
declare enum ContractSwitchType {
|
|
1161
|
+
NOT_APPLICABLE = "NOT_APPLICABLE",
|
|
1162
|
+
ADDITIONAL_QUANTITY = "ADDITIONAL_QUANTITY",
|
|
1163
|
+
CREDIT_UNUSED_PERIOD = "CREDIT_UNUSED_PERIOD",
|
|
1164
|
+
REFUND_PRICE_DIFF = "REFUND_PRICE_DIFF",
|
|
1165
|
+
ADJUST_PERIOD_END = "ADJUST_PERIOD_END",
|
|
1166
|
+
DOWNGRADE_GRACE_PERIOD = "DOWNGRADE_GRACE_PERIOD",
|
|
1167
|
+
FULL_AMOUNT_PERIOD = "FULL_AMOUNT_PERIOD",
|
|
1168
|
+
END_OF_PERIOD = "END_OF_PERIOD",
|
|
1169
|
+
PENDING_CHANGES = "PENDING_CHANGES",
|
|
1170
|
+
DOWNGRADE_RENEWAL = "DOWNGRADE_RENEWAL"
|
|
1171
|
+
}
|
|
1172
|
+
declare enum ContractSwitchReason {
|
|
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;
|
|
1217
|
+
}
|
|
1218
|
+
interface MessageEnvelope$4 {
|
|
1219
|
+
/** App instance ID. */
|
|
1220
|
+
instanceId?: string | null;
|
|
1221
|
+
/** Event type. */
|
|
1222
|
+
eventType?: string;
|
|
1223
|
+
/** The identification type and identity data. */
|
|
1224
|
+
identity?: IdentificationData$4;
|
|
1225
|
+
/** Stringify payload. */
|
|
1226
|
+
data?: string;
|
|
1227
|
+
}
|
|
1228
|
+
interface IdentificationData$4 extends IdentificationDataIdOneOf$4 {
|
|
1229
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
1230
|
+
anonymousVisitorId?: string;
|
|
1231
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
1232
|
+
memberId?: string;
|
|
1233
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
1234
|
+
wixUserId?: string;
|
|
1235
|
+
/** ID of an app. */
|
|
1236
|
+
appId?: string;
|
|
1237
|
+
/** @readonly */
|
|
1238
|
+
identityType?: WebhookIdentityType$4;
|
|
1239
|
+
}
|
|
1240
|
+
/** @oneof */
|
|
1241
|
+
interface IdentificationDataIdOneOf$4 {
|
|
1242
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
1243
|
+
anonymousVisitorId?: string;
|
|
1244
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
1245
|
+
memberId?: string;
|
|
1246
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
1247
|
+
wixUserId?: string;
|
|
1248
|
+
/** ID of an app. */
|
|
1249
|
+
appId?: string;
|
|
1250
|
+
}
|
|
1251
|
+
declare enum WebhookIdentityType$4 {
|
|
1252
|
+
UNKNOWN = "UNKNOWN",
|
|
1253
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
1254
|
+
MEMBER = "MEMBER",
|
|
1255
|
+
WIX_USER = "WIX_USER",
|
|
1256
|
+
APP = "APP"
|
|
1257
|
+
}
|
|
1258
|
+
interface GetReferralProgramResponseNonNullableFields {
|
|
1259
|
+
referralProgram?: {
|
|
1260
|
+
status: ProgramStatus;
|
|
1261
|
+
referredFriendReward?: {
|
|
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$2;
|
|
1278
|
+
};
|
|
1279
|
+
loyaltyPointsOptions?: {
|
|
1280
|
+
amount: number;
|
|
1281
|
+
};
|
|
1282
|
+
type: Type$1;
|
|
1283
|
+
};
|
|
1284
|
+
referringCustomerReward?: {
|
|
1285
|
+
couponOptions?: {
|
|
1286
|
+
fixedAmountOptions?: {
|
|
1287
|
+
amount: number;
|
|
1288
|
+
};
|
|
1289
|
+
percentageOptions?: {
|
|
1290
|
+
percentage: number;
|
|
1291
|
+
};
|
|
1292
|
+
minimumSubtotal: number;
|
|
1293
|
+
scope?: {
|
|
1294
|
+
namespace: string;
|
|
1295
|
+
group?: {
|
|
1296
|
+
name: string;
|
|
1297
|
+
};
|
|
1298
|
+
};
|
|
1299
|
+
name: string;
|
|
1300
|
+
discountType: DiscountType$2;
|
|
1301
|
+
};
|
|
1302
|
+
loyaltyPointsOptions?: {
|
|
1303
|
+
amount: number;
|
|
1304
|
+
};
|
|
1305
|
+
type: Type$1;
|
|
1306
|
+
};
|
|
1307
|
+
successfulReferralActions: Action[];
|
|
1308
|
+
isPremium: boolean;
|
|
1309
|
+
emails?: {
|
|
1310
|
+
encourageToReferFriends: App[];
|
|
1311
|
+
notifyCustomersAboutReward: boolean;
|
|
1312
|
+
};
|
|
1313
|
+
};
|
|
1314
|
+
}
|
|
1315
|
+
interface QueryReferralProgramsResponseNonNullableFields {
|
|
1316
|
+
referralPrograms: {
|
|
1317
|
+
status: ProgramStatus;
|
|
1318
|
+
referredFriendReward?: {
|
|
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$2;
|
|
1335
|
+
};
|
|
1336
|
+
loyaltyPointsOptions?: {
|
|
1337
|
+
amount: number;
|
|
1338
|
+
};
|
|
1339
|
+
type: Type$1;
|
|
1340
|
+
};
|
|
1341
|
+
referringCustomerReward?: {
|
|
1342
|
+
couponOptions?: {
|
|
1343
|
+
fixedAmountOptions?: {
|
|
1344
|
+
amount: number;
|
|
1345
|
+
};
|
|
1346
|
+
percentageOptions?: {
|
|
1347
|
+
percentage: number;
|
|
1348
|
+
};
|
|
1349
|
+
minimumSubtotal: number;
|
|
1350
|
+
scope?: {
|
|
1351
|
+
namespace: string;
|
|
1352
|
+
group?: {
|
|
1353
|
+
name: string;
|
|
1354
|
+
};
|
|
1355
|
+
};
|
|
1356
|
+
name: string;
|
|
1357
|
+
discountType: DiscountType$2;
|
|
1358
|
+
};
|
|
1359
|
+
loyaltyPointsOptions?: {
|
|
1360
|
+
amount: number;
|
|
1361
|
+
};
|
|
1362
|
+
type: Type$1;
|
|
1363
|
+
};
|
|
1364
|
+
successfulReferralActions: Action[];
|
|
1365
|
+
isPremium: boolean;
|
|
1366
|
+
emails?: {
|
|
1367
|
+
encourageToReferFriends: App[];
|
|
1368
|
+
notifyCustomersAboutReward: boolean;
|
|
1369
|
+
};
|
|
1370
|
+
}[];
|
|
1371
|
+
}
|
|
1372
|
+
interface UpdateReferralProgramResponseNonNullableFields {
|
|
1373
|
+
referralProgram?: {
|
|
1374
|
+
status: ProgramStatus;
|
|
1375
|
+
referredFriendReward?: {
|
|
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$2;
|
|
1392
|
+
};
|
|
1393
|
+
loyaltyPointsOptions?: {
|
|
1394
|
+
amount: number;
|
|
1395
|
+
};
|
|
1396
|
+
type: Type$1;
|
|
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$2;
|
|
1415
|
+
};
|
|
1416
|
+
loyaltyPointsOptions?: {
|
|
1417
|
+
amount: number;
|
|
1418
|
+
};
|
|
1419
|
+
type: Type$1;
|
|
1420
|
+
};
|
|
1421
|
+
successfulReferralActions: Action[];
|
|
1422
|
+
isPremium: boolean;
|
|
1423
|
+
emails?: {
|
|
1424
|
+
encourageToReferFriends: App[];
|
|
1425
|
+
notifyCustomersAboutReward: boolean;
|
|
1426
|
+
};
|
|
1427
|
+
};
|
|
1428
|
+
}
|
|
1429
|
+
interface ActivateReferralProgramResponseNonNullableFields {
|
|
1430
|
+
referralProgram?: {
|
|
1431
|
+
status: ProgramStatus;
|
|
1432
|
+
referredFriendReward?: {
|
|
1433
|
+
couponOptions?: {
|
|
1434
|
+
fixedAmountOptions?: {
|
|
1435
|
+
amount: number;
|
|
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$2;
|
|
1449
|
+
};
|
|
1450
|
+
loyaltyPointsOptions?: {
|
|
1451
|
+
amount: number;
|
|
1452
|
+
};
|
|
1453
|
+
type: Type$1;
|
|
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$2;
|
|
1472
|
+
};
|
|
1473
|
+
loyaltyPointsOptions?: {
|
|
1474
|
+
amount: number;
|
|
1475
|
+
};
|
|
1476
|
+
type: Type$1;
|
|
1477
|
+
};
|
|
1478
|
+
successfulReferralActions: Action[];
|
|
1479
|
+
isPremium: boolean;
|
|
1480
|
+
emails?: {
|
|
1481
|
+
encourageToReferFriends: App[];
|
|
1482
|
+
notifyCustomersAboutReward: boolean;
|
|
1483
|
+
};
|
|
1484
|
+
};
|
|
1485
|
+
}
|
|
1486
|
+
interface PauseReferralProgramResponseNonNullableFields {
|
|
1487
|
+
referralProgram?: {
|
|
1488
|
+
status: ProgramStatus;
|
|
1489
|
+
referredFriendReward?: {
|
|
1490
|
+
couponOptions?: {
|
|
1491
|
+
fixedAmountOptions?: {
|
|
1492
|
+
amount: number;
|
|
1493
|
+
};
|
|
1494
|
+
percentageOptions?: {
|
|
1495
|
+
percentage: number;
|
|
1496
|
+
};
|
|
1497
|
+
minimumSubtotal: number;
|
|
1498
|
+
scope?: {
|
|
1499
|
+
namespace: string;
|
|
1500
|
+
group?: {
|
|
1501
|
+
name: string;
|
|
1502
|
+
};
|
|
1503
|
+
};
|
|
1504
|
+
name: string;
|
|
1505
|
+
discountType: DiscountType$2;
|
|
1506
|
+
};
|
|
1507
|
+
loyaltyPointsOptions?: {
|
|
1508
|
+
amount: number;
|
|
1509
|
+
};
|
|
1510
|
+
type: Type$1;
|
|
1511
|
+
};
|
|
1512
|
+
referringCustomerReward?: {
|
|
1513
|
+
couponOptions?: {
|
|
1514
|
+
fixedAmountOptions?: {
|
|
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$2;
|
|
1529
|
+
};
|
|
1530
|
+
loyaltyPointsOptions?: {
|
|
1531
|
+
amount: number;
|
|
1532
|
+
};
|
|
1533
|
+
type: Type$1;
|
|
1534
|
+
};
|
|
1535
|
+
successfulReferralActions: Action[];
|
|
1536
|
+
isPremium: boolean;
|
|
1537
|
+
emails?: {
|
|
1538
|
+
encourageToReferFriends: App[];
|
|
1539
|
+
notifyCustomersAboutReward: boolean;
|
|
1540
|
+
};
|
|
1541
|
+
};
|
|
1542
|
+
}
|
|
1543
|
+
interface GetAISocialMediaPostsSuggestionsResponseNonNullableFields {
|
|
1544
|
+
suggestions: {
|
|
1545
|
+
postContent: string;
|
|
1546
|
+
hashtags: string[];
|
|
1547
|
+
}[];
|
|
1548
|
+
}
|
|
1549
|
+
interface GenerateAISocialMediaPostsSuggestionsResponseNonNullableFields {
|
|
1550
|
+
suggestions: {
|
|
1551
|
+
postContent: string;
|
|
1552
|
+
hashtags: string[];
|
|
1553
|
+
}[];
|
|
1554
|
+
}
|
|
1555
|
+
interface GetReferralProgramPremiumFeaturesResponseNonNullableFields {
|
|
1556
|
+
referralProgram: boolean;
|
|
1557
|
+
}
|
|
1558
|
+
interface BaseEventMetadata$3 {
|
|
1559
|
+
/** App instance ID. */
|
|
1560
|
+
instanceId?: string | null;
|
|
1561
|
+
/** Event type. */
|
|
1562
|
+
eventType?: string;
|
|
1563
|
+
/** The identification type and identity data. */
|
|
1564
|
+
identity?: IdentificationData$4;
|
|
1565
|
+
}
|
|
1566
|
+
interface EventMetadata$3 extends BaseEventMetadata$3 {
|
|
1567
|
+
/**
|
|
1568
|
+
* Unique event ID.
|
|
1569
|
+
* Allows clients to ignore duplicate webhooks.
|
|
1570
|
+
*/
|
|
1571
|
+
_id?: string;
|
|
1572
|
+
/**
|
|
1573
|
+
* Assumes actions are also always typed to an entity_type
|
|
1574
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
1575
|
+
*/
|
|
1576
|
+
entityFqdn?: string;
|
|
1577
|
+
/**
|
|
1578
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
1579
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
1580
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
1581
|
+
*/
|
|
1582
|
+
slug?: string;
|
|
1583
|
+
/** ID of the entity associated with the event. */
|
|
1584
|
+
entityId?: string;
|
|
1585
|
+
/** Event timestamp. */
|
|
1586
|
+
eventTime?: Date;
|
|
1587
|
+
/**
|
|
1588
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
1589
|
+
* (for example, GDPR).
|
|
1590
|
+
*/
|
|
1591
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
1592
|
+
/** If present, indicates the action that triggered the event. */
|
|
1593
|
+
originatedFrom?: string | null;
|
|
1594
|
+
/**
|
|
1595
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
1596
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
1597
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
1598
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
1599
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
1600
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
1601
|
+
*/
|
|
1602
|
+
entityEventSequence?: string | null;
|
|
1603
|
+
}
|
|
1604
|
+
interface ProgramUpdatedEnvelope {
|
|
1605
|
+
entity: ReferralProgram;
|
|
1606
|
+
metadata: EventMetadata$3;
|
|
1607
|
+
}
|
|
1608
|
+
interface QueryCursorResult$3 {
|
|
1609
|
+
cursors: Cursors$4;
|
|
1610
|
+
hasNext: () => boolean;
|
|
1611
|
+
hasPrev: () => boolean;
|
|
1612
|
+
length: number;
|
|
1613
|
+
pageSize: number;
|
|
1614
|
+
}
|
|
1615
|
+
interface ReferralProgramsQueryResult extends QueryCursorResult$3 {
|
|
1616
|
+
items: ReferralProgram[];
|
|
1617
|
+
query: ReferralProgramsQueryBuilder;
|
|
1618
|
+
next: () => Promise<ReferralProgramsQueryResult>;
|
|
1619
|
+
prev: () => Promise<ReferralProgramsQueryResult>;
|
|
1620
|
+
}
|
|
1621
|
+
interface ReferralProgramsQueryBuilder {
|
|
1622
|
+
/** @param limit - Number of items to return, which is also the `pageSize` of the results object.
|
|
1623
|
+
* @documentationMaturity preview
|
|
1624
|
+
*/
|
|
1625
|
+
limit: (limit: number) => ReferralProgramsQueryBuilder;
|
|
1626
|
+
/** @param cursor - A pointer to specific record
|
|
1627
|
+
* @documentationMaturity preview
|
|
1628
|
+
*/
|
|
1629
|
+
skipTo: (cursor: string) => ReferralProgramsQueryBuilder;
|
|
1630
|
+
/** @documentationMaturity preview */
|
|
1631
|
+
find: () => Promise<ReferralProgramsQueryResult>;
|
|
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$4 {
|
|
1643
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory$4<TResponse, TData>): Promise<HttpResponse$4<TResponse>>;
|
|
1644
|
+
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
1645
|
+
}
|
|
1646
|
+
type RequestOptionsFactory$4<TResponse = any, TData = any> = (context: any) => RequestOptions$4<TResponse, TData>;
|
|
1647
|
+
type HttpResponse$4<T = any> = {
|
|
1648
|
+
data: T;
|
|
1649
|
+
status: number;
|
|
1650
|
+
statusText: string;
|
|
1651
|
+
headers: any;
|
|
1652
|
+
request?: any;
|
|
1653
|
+
};
|
|
1654
|
+
type RequestOptions$4<_TResponse = any, Data = any> = {
|
|
1655
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
1656
|
+
url: string;
|
|
1657
|
+
data?: Data;
|
|
1658
|
+
params?: URLSearchParams;
|
|
1659
|
+
} & APIMetadata$4;
|
|
1660
|
+
type APIMetadata$4 = {
|
|
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$4: {
|
|
1682
|
+
PACKAGE_NAME: string;
|
|
1683
|
+
};
|
|
1684
|
+
declare function getReferralProgram(httpClient: HttpClient$4): () => Promise<GetReferralProgramResponse & GetReferralProgramResponseNonNullableFields>;
|
|
1685
|
+
declare function queryReferralPrograms(httpClient: HttpClient$4): () => ReferralProgramsQueryBuilder;
|
|
1686
|
+
declare function updateReferralProgram(httpClient: HttpClient$4): (referralProgram: ReferralProgram) => Promise<UpdateReferralProgramResponse & UpdateReferralProgramResponseNonNullableFields>;
|
|
1687
|
+
declare function activateReferralProgram(httpClient: HttpClient$4): () => Promise<ActivateReferralProgramResponse & ActivateReferralProgramResponseNonNullableFields>;
|
|
1688
|
+
declare function pauseReferralProgram(httpClient: HttpClient$4): () => Promise<PauseReferralProgramResponse & PauseReferralProgramResponseNonNullableFields>;
|
|
1689
|
+
declare function getAiSocialMediaPostsSuggestions(httpClient: HttpClient$4): (options?: GetAiSocialMediaPostsSuggestionsOptions) => Promise<GetAISocialMediaPostsSuggestionsResponse & GetAISocialMediaPostsSuggestionsResponseNonNullableFields>;
|
|
1690
|
+
declare function generateAiSocialMediaPostsSuggestions(httpClient: HttpClient$4): (options?: GenerateAiSocialMediaPostsSuggestionsOptions) => Promise<GenerateAISocialMediaPostsSuggestionsResponse & GenerateAISocialMediaPostsSuggestionsResponseNonNullableFields>;
|
|
1691
|
+
declare function getReferralProgramPremiumFeatures(httpClient: HttpClient$4): () => Promise<GetReferralProgramPremiumFeaturesResponse & GetReferralProgramPremiumFeaturesResponseNonNullableFields>;
|
|
1692
|
+
declare const onProgramUpdated: EventDefinition$3<ProgramUpdatedEnvelope, "wix.loyalty.referral.v1.program_updated">;
|
|
1693
|
+
|
|
1694
|
+
type index_d$4_AISocialMediaPostSuggestion = AISocialMediaPostSuggestion;
|
|
1695
|
+
type index_d$4_Action = Action;
|
|
1696
|
+
declare const index_d$4_Action: typeof Action;
|
|
1697
|
+
type index_d$4_ActivateReferralProgramRequest = ActivateReferralProgramRequest;
|
|
1698
|
+
type index_d$4_ActivateReferralProgramResponse = ActivateReferralProgramResponse;
|
|
1699
|
+
type index_d$4_ActivateReferralProgramResponseNonNullableFields = ActivateReferralProgramResponseNonNullableFields;
|
|
1700
|
+
type index_d$4_App = App;
|
|
1701
|
+
declare const index_d$4_App: typeof App;
|
|
1702
|
+
type index_d$4_Asset = Asset;
|
|
1703
|
+
type index_d$4_BillingReference = BillingReference;
|
|
1704
|
+
type index_d$4_BulkGetReferralProgramRequest = BulkGetReferralProgramRequest;
|
|
1705
|
+
type index_d$4_BulkGetReferralProgramResponse = BulkGetReferralProgramResponse;
|
|
1706
|
+
type index_d$4_CancellationDetails = CancellationDetails;
|
|
1707
|
+
type index_d$4_ContractSwitchReason = ContractSwitchReason;
|
|
1708
|
+
declare const index_d$4_ContractSwitchReason: typeof ContractSwitchReason;
|
|
1709
|
+
type index_d$4_ContractSwitchType = ContractSwitchType;
|
|
1710
|
+
declare const index_d$4_ContractSwitchType: typeof ContractSwitchType;
|
|
1711
|
+
type index_d$4_ContractSwitched = ContractSwitched;
|
|
1712
|
+
type index_d$4_Cycle = Cycle;
|
|
1713
|
+
type index_d$4_CycleCycleSelectorOneOf = CycleCycleSelectorOneOf;
|
|
1714
|
+
type index_d$4_DeleteContext = DeleteContext;
|
|
1715
|
+
type index_d$4_DeleteStatus = DeleteStatus;
|
|
1716
|
+
declare const index_d$4_DeleteStatus: typeof DeleteStatus;
|
|
1717
|
+
type index_d$4_Emails = Emails;
|
|
1718
|
+
type index_d$4_GenerateAISocialMediaPostsSuggestionsRequest = GenerateAISocialMediaPostsSuggestionsRequest;
|
|
1719
|
+
type index_d$4_GenerateAISocialMediaPostsSuggestionsResponse = GenerateAISocialMediaPostsSuggestionsResponse;
|
|
1720
|
+
type index_d$4_GenerateAISocialMediaPostsSuggestionsResponseNonNullableFields = GenerateAISocialMediaPostsSuggestionsResponseNonNullableFields;
|
|
1721
|
+
type index_d$4_GenerateAiSocialMediaPostsSuggestionsOptions = GenerateAiSocialMediaPostsSuggestionsOptions;
|
|
1722
|
+
type index_d$4_GetAISocialMediaPostsSuggestionsRequest = GetAISocialMediaPostsSuggestionsRequest;
|
|
1723
|
+
type index_d$4_GetAISocialMediaPostsSuggestionsResponse = GetAISocialMediaPostsSuggestionsResponse;
|
|
1724
|
+
type index_d$4_GetAISocialMediaPostsSuggestionsResponseNonNullableFields = GetAISocialMediaPostsSuggestionsResponseNonNullableFields;
|
|
1725
|
+
type index_d$4_GetAiSocialMediaPostsSuggestionsOptions = GetAiSocialMediaPostsSuggestionsOptions;
|
|
1726
|
+
type index_d$4_GetReferralProgramPremiumFeaturesRequest = GetReferralProgramPremiumFeaturesRequest;
|
|
1727
|
+
type index_d$4_GetReferralProgramPremiumFeaturesResponse = GetReferralProgramPremiumFeaturesResponse;
|
|
1728
|
+
type index_d$4_GetReferralProgramPremiumFeaturesResponseNonNullableFields = GetReferralProgramPremiumFeaturesResponseNonNullableFields;
|
|
1729
|
+
type index_d$4_GetReferralProgramRequest = GetReferralProgramRequest;
|
|
1730
|
+
type index_d$4_GetReferralProgramResponse = GetReferralProgramResponse;
|
|
1731
|
+
type index_d$4_GetReferralProgramResponseNonNullableFields = GetReferralProgramResponseNonNullableFields;
|
|
1732
|
+
type index_d$4_HtmlSitePublished = HtmlSitePublished;
|
|
1733
|
+
type index_d$4_Initiator = Initiator;
|
|
1734
|
+
declare const index_d$4_Initiator: typeof Initiator;
|
|
1735
|
+
type index_d$4_Interval = Interval;
|
|
1736
|
+
type index_d$4_IntervalUnit = IntervalUnit;
|
|
1737
|
+
declare const index_d$4_IntervalUnit: typeof IntervalUnit;
|
|
1738
|
+
type index_d$4_MetaSiteSpecialEvent = MetaSiteSpecialEvent;
|
|
1739
|
+
type index_d$4_MetaSiteSpecialEventPayloadOneOf = MetaSiteSpecialEventPayloadOneOf;
|
|
1740
|
+
type index_d$4_Namespace = Namespace;
|
|
1741
|
+
declare const index_d$4_Namespace: typeof Namespace;
|
|
1742
|
+
type index_d$4_NamespaceChanged = NamespaceChanged;
|
|
1743
|
+
type index_d$4_OneTime = OneTime;
|
|
1744
|
+
type index_d$4_Page = Page;
|
|
1745
|
+
type index_d$4_PauseReferralProgramRequest = PauseReferralProgramRequest;
|
|
1746
|
+
type index_d$4_PauseReferralProgramResponse = PauseReferralProgramResponse;
|
|
1747
|
+
type index_d$4_PauseReferralProgramResponseNonNullableFields = PauseReferralProgramResponseNonNullableFields;
|
|
1748
|
+
type index_d$4_PriceIncreaseTrigger = PriceIncreaseTrigger;
|
|
1749
|
+
declare const index_d$4_PriceIncreaseTrigger: typeof PriceIncreaseTrigger;
|
|
1750
|
+
type index_d$4_ProductAdjustment = ProductAdjustment;
|
|
1751
|
+
declare const index_d$4_ProductAdjustment: typeof ProductAdjustment;
|
|
1752
|
+
type index_d$4_ProductPriceIncreaseData = ProductPriceIncreaseData;
|
|
1753
|
+
type index_d$4_ProgramInSite = ProgramInSite;
|
|
1754
|
+
type index_d$4_ProgramStatus = ProgramStatus;
|
|
1755
|
+
declare const index_d$4_ProgramStatus: typeof ProgramStatus;
|
|
1756
|
+
type index_d$4_ProgramUpdatedEnvelope = ProgramUpdatedEnvelope;
|
|
1757
|
+
type index_d$4_ProviderName = ProviderName;
|
|
1758
|
+
declare const index_d$4_ProviderName: typeof ProviderName;
|
|
1759
|
+
type index_d$4_QueryReferralProgramsRequest = QueryReferralProgramsRequest;
|
|
1760
|
+
type index_d$4_QueryReferralProgramsResponse = QueryReferralProgramsResponse;
|
|
1761
|
+
type index_d$4_QueryReferralProgramsResponseNonNullableFields = QueryReferralProgramsResponseNonNullableFields;
|
|
1762
|
+
type index_d$4_ReactivationData = ReactivationData;
|
|
1763
|
+
type index_d$4_ReactivationReasonEnum = ReactivationReasonEnum;
|
|
1764
|
+
declare const index_d$4_ReactivationReasonEnum: typeof ReactivationReasonEnum;
|
|
1765
|
+
type index_d$4_RecurringChargeSucceeded = RecurringChargeSucceeded;
|
|
1766
|
+
type index_d$4_ReferralProgram = ReferralProgram;
|
|
1767
|
+
type index_d$4_ReferralProgramsQueryBuilder = ReferralProgramsQueryBuilder;
|
|
1768
|
+
type index_d$4_ReferralProgramsQueryResult = ReferralProgramsQueryResult;
|
|
1769
|
+
type index_d$4_ServiceProvisioned = ServiceProvisioned;
|
|
1770
|
+
type index_d$4_ServiceRemoved = ServiceRemoved;
|
|
1771
|
+
type index_d$4_SiteCreated = SiteCreated;
|
|
1772
|
+
type index_d$4_SiteCreatedContext = SiteCreatedContext;
|
|
1773
|
+
declare const index_d$4_SiteCreatedContext: typeof SiteCreatedContext;
|
|
1774
|
+
type index_d$4_SiteDeleted = SiteDeleted;
|
|
1775
|
+
type index_d$4_SiteHardDeleted = SiteHardDeleted;
|
|
1776
|
+
type index_d$4_SiteMarkedAsTemplate = SiteMarkedAsTemplate;
|
|
1777
|
+
type index_d$4_SiteMarkedAsWixSite = SiteMarkedAsWixSite;
|
|
1778
|
+
type index_d$4_SitePublished = SitePublished;
|
|
1779
|
+
type index_d$4_SiteRenamed = SiteRenamed;
|
|
1780
|
+
type index_d$4_SiteTransferred = SiteTransferred;
|
|
1781
|
+
type index_d$4_SiteUndeleted = SiteUndeleted;
|
|
1782
|
+
type index_d$4_SiteUnpublished = SiteUnpublished;
|
|
1783
|
+
type index_d$4_State = State;
|
|
1784
|
+
declare const index_d$4_State: typeof State;
|
|
1785
|
+
type index_d$4_StudioAssigned = StudioAssigned;
|
|
1786
|
+
type index_d$4_StudioUnassigned = StudioUnassigned;
|
|
1787
|
+
type index_d$4_Subscription = Subscription;
|
|
1788
|
+
type index_d$4_SubscriptionAssigned = SubscriptionAssigned;
|
|
1789
|
+
type index_d$4_SubscriptionAutoRenewTurnedOff = SubscriptionAutoRenewTurnedOff;
|
|
1790
|
+
type index_d$4_SubscriptionAutoRenewTurnedOn = SubscriptionAutoRenewTurnedOn;
|
|
1791
|
+
type index_d$4_SubscriptionCancelled = SubscriptionCancelled;
|
|
1792
|
+
type index_d$4_SubscriptionCreated = SubscriptionCreated;
|
|
1793
|
+
type index_d$4_SubscriptionEvent = SubscriptionEvent;
|
|
1794
|
+
type index_d$4_SubscriptionEventEventOneOf = SubscriptionEventEventOneOf;
|
|
1795
|
+
type index_d$4_SubscriptionNearEndOfPeriod = SubscriptionNearEndOfPeriod;
|
|
1796
|
+
type index_d$4_SubscriptionPendingChange = SubscriptionPendingChange;
|
|
1797
|
+
type index_d$4_SubscriptionStatus = SubscriptionStatus;
|
|
1798
|
+
declare const index_d$4_SubscriptionStatus: typeof SubscriptionStatus;
|
|
1799
|
+
type index_d$4_SubscriptionTransferred = SubscriptionTransferred;
|
|
1800
|
+
type index_d$4_SubscriptionUnassigned = SubscriptionUnassigned;
|
|
1801
|
+
type index_d$4_UnassignReason = UnassignReason;
|
|
1802
|
+
declare const index_d$4_UnassignReason: typeof UnassignReason;
|
|
1803
|
+
type index_d$4_UpdateReferralProgramRequest = UpdateReferralProgramRequest;
|
|
1804
|
+
type index_d$4_UpdateReferralProgramResponse = UpdateReferralProgramResponse;
|
|
1805
|
+
type index_d$4_UpdateReferralProgramResponseNonNullableFields = UpdateReferralProgramResponseNonNullableFields;
|
|
1806
|
+
declare const index_d$4_activateReferralProgram: typeof activateReferralProgram;
|
|
1807
|
+
declare const index_d$4_generateAiSocialMediaPostsSuggestions: typeof generateAiSocialMediaPostsSuggestions;
|
|
1808
|
+
declare const index_d$4_getAiSocialMediaPostsSuggestions: typeof getAiSocialMediaPostsSuggestions;
|
|
1809
|
+
declare const index_d$4_getReferralProgram: typeof getReferralProgram;
|
|
1810
|
+
declare const index_d$4_getReferralProgramPremiumFeatures: typeof getReferralProgramPremiumFeatures;
|
|
1811
|
+
declare const index_d$4_onProgramUpdated: typeof onProgramUpdated;
|
|
1812
|
+
declare const index_d$4_pauseReferralProgram: typeof pauseReferralProgram;
|
|
1813
|
+
declare const index_d$4_queryReferralPrograms: typeof queryReferralPrograms;
|
|
1814
|
+
declare const index_d$4_updateReferralProgram: typeof updateReferralProgram;
|
|
1815
|
+
declare namespace index_d$4 {
|
|
1816
|
+
export { type index_d$4_AISocialMediaPostSuggestion as AISocialMediaPostSuggestion, index_d$4_Action as Action, type ActionEvent$4 as ActionEvent, type index_d$4_ActivateReferralProgramRequest as ActivateReferralProgramRequest, type index_d$4_ActivateReferralProgramResponse as ActivateReferralProgramResponse, type index_d$4_ActivateReferralProgramResponseNonNullableFields as ActivateReferralProgramResponseNonNullableFields, index_d$4_App as App, type index_d$4_Asset as Asset, type BaseEventMetadata$3 as BaseEventMetadata, type index_d$4_BillingReference as BillingReference, type index_d$4_BulkGetReferralProgramRequest as BulkGetReferralProgramRequest, type index_d$4_BulkGetReferralProgramResponse as BulkGetReferralProgramResponse, type index_d$4_CancellationDetails as CancellationDetails, index_d$4_ContractSwitchReason as ContractSwitchReason, index_d$4_ContractSwitchType as ContractSwitchType, type index_d$4_ContractSwitched as ContractSwitched, type Coupon$2 as Coupon, type CouponDiscountTypeOptionsOneOf$2 as CouponDiscountTypeOptionsOneOf, type CouponScope$2 as CouponScope, type CouponScopeOrMinSubtotalOneOf$2 as CouponScopeOrMinSubtotalOneOf, type CursorPaging$4 as CursorPaging, type CursorPagingMetadata$4 as CursorPagingMetadata, type CursorQuery$4 as CursorQuery, type CursorQueryPagingMethodOneOf$4 as CursorQueryPagingMethodOneOf, type Cursors$4 as Cursors, type index_d$4_Cycle as Cycle, type index_d$4_CycleCycleSelectorOneOf as CycleCycleSelectorOneOf, type index_d$4_DeleteContext as DeleteContext, index_d$4_DeleteStatus as DeleteStatus, DiscountType$2 as DiscountType, type DomainEvent$4 as DomainEvent, type DomainEventBodyOneOf$4 as DomainEventBodyOneOf, type index_d$4_Emails as Emails, type Empty$3 as Empty, type EntityCreatedEvent$4 as EntityCreatedEvent, type EntityDeletedEvent$4 as EntityDeletedEvent, type EntityUpdatedEvent$4 as EntityUpdatedEvent, type EventMetadata$3 as EventMetadata, type FixedAmountDiscount$2 as FixedAmountDiscount, type index_d$4_GenerateAISocialMediaPostsSuggestionsRequest as GenerateAISocialMediaPostsSuggestionsRequest, type index_d$4_GenerateAISocialMediaPostsSuggestionsResponse as GenerateAISocialMediaPostsSuggestionsResponse, type index_d$4_GenerateAISocialMediaPostsSuggestionsResponseNonNullableFields as GenerateAISocialMediaPostsSuggestionsResponseNonNullableFields, type index_d$4_GenerateAiSocialMediaPostsSuggestionsOptions as GenerateAiSocialMediaPostsSuggestionsOptions, type index_d$4_GetAISocialMediaPostsSuggestionsRequest as GetAISocialMediaPostsSuggestionsRequest, type index_d$4_GetAISocialMediaPostsSuggestionsResponse as GetAISocialMediaPostsSuggestionsResponse, type index_d$4_GetAISocialMediaPostsSuggestionsResponseNonNullableFields as GetAISocialMediaPostsSuggestionsResponseNonNullableFields, type index_d$4_GetAiSocialMediaPostsSuggestionsOptions as GetAiSocialMediaPostsSuggestionsOptions, type index_d$4_GetReferralProgramPremiumFeaturesRequest as GetReferralProgramPremiumFeaturesRequest, type index_d$4_GetReferralProgramPremiumFeaturesResponse as GetReferralProgramPremiumFeaturesResponse, type index_d$4_GetReferralProgramPremiumFeaturesResponseNonNullableFields as GetReferralProgramPremiumFeaturesResponseNonNullableFields, type index_d$4_GetReferralProgramRequest as GetReferralProgramRequest, type index_d$4_GetReferralProgramResponse as GetReferralProgramResponse, type index_d$4_GetReferralProgramResponseNonNullableFields as GetReferralProgramResponseNonNullableFields, type Group$2 as Group, type index_d$4_HtmlSitePublished as HtmlSitePublished, type IdentificationData$4 as IdentificationData, type IdentificationDataIdOneOf$4 as IdentificationDataIdOneOf, index_d$4_Initiator as Initiator, type index_d$4_Interval as Interval, index_d$4_IntervalUnit as IntervalUnit, type LoyaltyPoints$2 as LoyaltyPoints, type MessageEnvelope$4 as MessageEnvelope, type index_d$4_MetaSiteSpecialEvent as MetaSiteSpecialEvent, type index_d$4_MetaSiteSpecialEventPayloadOneOf as MetaSiteSpecialEventPayloadOneOf, index_d$4_Namespace as Namespace, type index_d$4_NamespaceChanged as NamespaceChanged, type index_d$4_OneTime as OneTime, type index_d$4_Page as Page, type index_d$4_PauseReferralProgramRequest as PauseReferralProgramRequest, type index_d$4_PauseReferralProgramResponse as PauseReferralProgramResponse, type index_d$4_PauseReferralProgramResponseNonNullableFields as PauseReferralProgramResponseNonNullableFields, type PercentageDiscount$2 as PercentageDiscount, index_d$4_PriceIncreaseTrigger as PriceIncreaseTrigger, index_d$4_ProductAdjustment as ProductAdjustment, type index_d$4_ProductPriceIncreaseData as ProductPriceIncreaseData, type index_d$4_ProgramInSite as ProgramInSite, index_d$4_ProgramStatus as ProgramStatus, type index_d$4_ProgramUpdatedEnvelope as ProgramUpdatedEnvelope, index_d$4_ProviderName as ProviderName, type index_d$4_QueryReferralProgramsRequest as QueryReferralProgramsRequest, type index_d$4_QueryReferralProgramsResponse as QueryReferralProgramsResponse, type index_d$4_QueryReferralProgramsResponseNonNullableFields as QueryReferralProgramsResponseNonNullableFields, type index_d$4_ReactivationData as ReactivationData, index_d$4_ReactivationReasonEnum as ReactivationReasonEnum, type index_d$4_RecurringChargeSucceeded as RecurringChargeSucceeded, type index_d$4_ReferralProgram as ReferralProgram, type index_d$4_ReferralProgramsQueryBuilder as ReferralProgramsQueryBuilder, type index_d$4_ReferralProgramsQueryResult as ReferralProgramsQueryResult, type Reward$2 as Reward, type RewardOptionsOneOf$1 as RewardOptionsOneOf, type index_d$4_ServiceProvisioned as ServiceProvisioned, type index_d$4_ServiceRemoved as ServiceRemoved, type index_d$4_SiteCreated as SiteCreated, index_d$4_SiteCreatedContext as SiteCreatedContext, type index_d$4_SiteDeleted as SiteDeleted, type index_d$4_SiteHardDeleted as SiteHardDeleted, type index_d$4_SiteMarkedAsTemplate as SiteMarkedAsTemplate, type index_d$4_SiteMarkedAsWixSite as SiteMarkedAsWixSite, type index_d$4_SitePublished as SitePublished, type index_d$4_SiteRenamed as SiteRenamed, type index_d$4_SiteTransferred as SiteTransferred, type index_d$4_SiteUndeleted as SiteUndeleted, type index_d$4_SiteUnpublished as SiteUnpublished, SortOrder$4 as SortOrder, type Sorting$4 as Sorting, index_d$4_State as State, type index_d$4_StudioAssigned as StudioAssigned, type index_d$4_StudioUnassigned as StudioUnassigned, type index_d$4_Subscription as Subscription, type index_d$4_SubscriptionAssigned as SubscriptionAssigned, type index_d$4_SubscriptionAutoRenewTurnedOff as SubscriptionAutoRenewTurnedOff, type index_d$4_SubscriptionAutoRenewTurnedOn as SubscriptionAutoRenewTurnedOn, type index_d$4_SubscriptionCancelled as SubscriptionCancelled, type index_d$4_SubscriptionCreated as SubscriptionCreated, type index_d$4_SubscriptionEvent as SubscriptionEvent, type index_d$4_SubscriptionEventEventOneOf as SubscriptionEventEventOneOf, type index_d$4_SubscriptionNearEndOfPeriod as SubscriptionNearEndOfPeriod, type index_d$4_SubscriptionPendingChange as SubscriptionPendingChange, index_d$4_SubscriptionStatus as SubscriptionStatus, type index_d$4_SubscriptionTransferred as SubscriptionTransferred, type index_d$4_SubscriptionUnassigned as SubscriptionUnassigned, Type$1 as Type, index_d$4_UnassignReason as UnassignReason, type UndeleteInfo$4 as UndeleteInfo, type index_d$4_UpdateReferralProgramRequest as UpdateReferralProgramRequest, type index_d$4_UpdateReferralProgramResponse as UpdateReferralProgramResponse, type index_d$4_UpdateReferralProgramResponseNonNullableFields as UpdateReferralProgramResponseNonNullableFields, WebhookIdentityType$4 as WebhookIdentityType, __metadata$4 as __metadata, index_d$4_activateReferralProgram as activateReferralProgram, index_d$4_generateAiSocialMediaPostsSuggestions as generateAiSocialMediaPostsSuggestions, index_d$4_getAiSocialMediaPostsSuggestions as getAiSocialMediaPostsSuggestions, index_d$4_getReferralProgram as getReferralProgram, index_d$4_getReferralProgramPremiumFeatures as getReferralProgramPremiumFeatures, index_d$4_onProgramUpdated as onProgramUpdated, index_d$4_pauseReferralProgram as pauseReferralProgram, index_d$4_queryReferralPrograms as queryReferralPrograms, index_d$4_updateReferralProgram as updateReferralProgram };
|
|
1817
|
+
}
|
|
1818
|
+
|
|
1819
|
+
/** ReferralEvent. */
|
|
1820
|
+
interface ReferralEvent extends ReferralEventEventTypeOneOf {
|
|
1821
|
+
/** ReferredFriendSignupEvent is an event that is triggered when a referred friend signs up. */
|
|
1822
|
+
referredFriendSignupEvent?: ReferredFriendSignupEvent;
|
|
1823
|
+
/** SuccessfulReferralEvent is an event that is triggered when a referral is successful. */
|
|
1824
|
+
successfulReferralEvent?: V1SuccessfulReferralEvent;
|
|
1825
|
+
/** ActionEvent is an event that is triggered when an action is performed. */
|
|
1826
|
+
actionEvent?: V1ActionEvent;
|
|
1827
|
+
/** RewardEvent is an event that is triggered when a reward is given. */
|
|
1828
|
+
rewardEvent?: RewardEvent;
|
|
1829
|
+
/**
|
|
1830
|
+
* ReferralEvent ID.
|
|
1831
|
+
* @readonly
|
|
1832
|
+
*/
|
|
1833
|
+
_id?: string | null;
|
|
1834
|
+
/** 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. */
|
|
1835
|
+
revision?: string | null;
|
|
1836
|
+
/**
|
|
1837
|
+
* Represents the time this ReferralEvent was created.
|
|
1838
|
+
* @readonly
|
|
1839
|
+
*/
|
|
1840
|
+
_createdDate?: Date;
|
|
1841
|
+
/**
|
|
1842
|
+
* Represents the time this ReferralEvent was last updated.
|
|
1843
|
+
* @readonly
|
|
1844
|
+
*/
|
|
1845
|
+
_updatedDate?: Date;
|
|
1846
|
+
}
|
|
1847
|
+
/** @oneof */
|
|
1848
|
+
interface ReferralEventEventTypeOneOf {
|
|
1849
|
+
/** ReferredFriendSignupEvent is an event that is triggered when a referred friend signs up. */
|
|
1850
|
+
referredFriendSignupEvent?: ReferredFriendSignupEvent;
|
|
1851
|
+
/** SuccessfulReferralEvent is an event that is triggered when a referral is successful. */
|
|
1852
|
+
successfulReferralEvent?: V1SuccessfulReferralEvent;
|
|
1853
|
+
/** ActionEvent is an event that is triggered when an action is performed. */
|
|
1854
|
+
actionEvent?: V1ActionEvent;
|
|
1855
|
+
/** RewardEvent is an event that is triggered when a reward is given. */
|
|
1856
|
+
rewardEvent?: RewardEvent;
|
|
1857
|
+
}
|
|
1858
|
+
interface ReferredFriendSignupEvent {
|
|
1859
|
+
/** The referred friend ID. */
|
|
1860
|
+
referredFriendId?: string;
|
|
1861
|
+
}
|
|
1862
|
+
interface V1SuccessfulReferralEvent {
|
|
1863
|
+
/** The referred friend ID. */
|
|
1864
|
+
referredFriendId?: string;
|
|
1865
|
+
/** The referring customer ID. */
|
|
1866
|
+
referringCustomerId?: string;
|
|
1867
|
+
}
|
|
1868
|
+
interface V1ActionEvent {
|
|
1869
|
+
/** The referred friend ID. */
|
|
1870
|
+
referredFriendId?: string;
|
|
1871
|
+
/** The referring customer ID. */
|
|
1872
|
+
referringCustomerId?: string;
|
|
1873
|
+
/** The trigger of the action. */
|
|
1874
|
+
trigger?: V1Trigger;
|
|
1875
|
+
/** Amount. */
|
|
1876
|
+
amount?: string | null;
|
|
1877
|
+
/** Currency. */
|
|
1878
|
+
currency?: string | null;
|
|
1879
|
+
/** Order ID. */
|
|
1880
|
+
orderId?: string | null;
|
|
1881
|
+
}
|
|
1882
|
+
interface V1Trigger {
|
|
1883
|
+
/** The app id of the app that triggered the event. */
|
|
1884
|
+
appId?: string;
|
|
1885
|
+
/** The activity type that triggered the event. */
|
|
1886
|
+
activityType?: string;
|
|
1887
|
+
}
|
|
1888
|
+
interface RewardEvent extends RewardEventReceiverOneOf {
|
|
1889
|
+
/**
|
|
1890
|
+
* The referring customer ID.
|
|
1891
|
+
* @readonly
|
|
1892
|
+
*/
|
|
1893
|
+
rewardedReferringCustomerId?: string;
|
|
1894
|
+
/**
|
|
1895
|
+
* The referred friend ID.
|
|
1896
|
+
* @readonly
|
|
1897
|
+
*/
|
|
1898
|
+
rewardedReferredFriendId?: string;
|
|
1899
|
+
/** The referral reward ID. */
|
|
1900
|
+
referralRewardId?: string;
|
|
1901
|
+
/** The reward type. */
|
|
1902
|
+
rewardType?: Reward$1;
|
|
1903
|
+
}
|
|
1904
|
+
/** @oneof */
|
|
1905
|
+
interface RewardEventReceiverOneOf {
|
|
1906
|
+
/**
|
|
1907
|
+
* The referring customer ID.
|
|
1908
|
+
* @readonly
|
|
1909
|
+
*/
|
|
1910
|
+
rewardedReferringCustomerId?: string;
|
|
1911
|
+
/**
|
|
1912
|
+
* The referred friend ID.
|
|
1913
|
+
* @readonly
|
|
1914
|
+
*/
|
|
1915
|
+
rewardedReferredFriendId?: string;
|
|
1916
|
+
}
|
|
1917
|
+
declare enum Reward$1 {
|
|
1918
|
+
/** Unknown reward type. */
|
|
1919
|
+
UNKNOWN = "UNKNOWN",
|
|
1920
|
+
/** Reward is a coupon. */
|
|
1921
|
+
COUPON = "COUPON",
|
|
1922
|
+
/** Reward is loyalty points. */
|
|
1923
|
+
LOYALTY_POINTS = "LOYALTY_POINTS",
|
|
1924
|
+
/** No reward. */
|
|
1925
|
+
NOTHING = "NOTHING"
|
|
1926
|
+
}
|
|
1927
|
+
interface CreateReferralEventRequest {
|
|
1928
|
+
/** ReferralEvent to be created */
|
|
1929
|
+
referralEvent?: ReferralEvent;
|
|
1930
|
+
}
|
|
1931
|
+
interface CreateReferralEventResponse {
|
|
1932
|
+
/** The created ReferralEvent */
|
|
1933
|
+
referralEvent?: ReferralEvent;
|
|
1934
|
+
}
|
|
1935
|
+
interface GetReferralEventRequest {
|
|
1936
|
+
/** Id of the ReferralEvent to retrieve */
|
|
1937
|
+
referralEventId: string;
|
|
1938
|
+
}
|
|
1939
|
+
interface GetReferralEventResponse {
|
|
1940
|
+
/** The retrieved ReferralEvent */
|
|
1941
|
+
referralEvent?: ReferralEvent;
|
|
1942
|
+
}
|
|
1943
|
+
interface QueryReferralEventRequest {
|
|
1944
|
+
/** Query to filter ReferralEvents. */
|
|
1945
|
+
query: CursorQuery$3;
|
|
1946
|
+
}
|
|
1947
|
+
interface CursorQuery$3 extends CursorQueryPagingMethodOneOf$3 {
|
|
1948
|
+
/** 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`. */
|
|
1949
|
+
cursorPaging?: CursorPaging$3;
|
|
1950
|
+
/**
|
|
1951
|
+
* Filter object in the following format:
|
|
1952
|
+
* `"filter" : {
|
|
1953
|
+
* "fieldName1": "value1",
|
|
1954
|
+
* "fieldName2":{"$operator":"value2"}
|
|
1955
|
+
* }`
|
|
1956
|
+
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
1957
|
+
*/
|
|
1958
|
+
filter?: Record<string, any> | null;
|
|
1959
|
+
/**
|
|
1960
|
+
* Sort object in the following format:
|
|
1961
|
+
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
1962
|
+
*/
|
|
1963
|
+
sort?: Sorting$3[];
|
|
1964
|
+
}
|
|
1965
|
+
/** @oneof */
|
|
1966
|
+
interface CursorQueryPagingMethodOneOf$3 {
|
|
1967
|
+
/** 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`. */
|
|
1968
|
+
cursorPaging?: CursorPaging$3;
|
|
1969
|
+
}
|
|
1970
|
+
interface Sorting$3 {
|
|
1971
|
+
/** Name of the field to sort by. */
|
|
1972
|
+
fieldName?: string;
|
|
1973
|
+
/** Sort order. */
|
|
1974
|
+
order?: SortOrder$3;
|
|
1975
|
+
}
|
|
1976
|
+
declare enum SortOrder$3 {
|
|
1977
|
+
ASC = "ASC",
|
|
1978
|
+
DESC = "DESC"
|
|
1979
|
+
}
|
|
1980
|
+
interface CursorPaging$3 {
|
|
1981
|
+
/** Maximum number of items to return in the results. */
|
|
1982
|
+
limit?: number | null;
|
|
1983
|
+
/**
|
|
1984
|
+
* Pointer to the next or previous page in the list of results.
|
|
1985
|
+
*
|
|
1986
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
1987
|
+
* Not relevant for the first request.
|
|
1988
|
+
*/
|
|
1989
|
+
cursor?: string | null;
|
|
1990
|
+
}
|
|
1991
|
+
interface QueryReferralEventResponse {
|
|
1992
|
+
/** List of ReferralEvents that match the query. */
|
|
1993
|
+
referralEvents?: ReferralEvent[];
|
|
1994
|
+
/** Paging metadata. */
|
|
1995
|
+
metadata?: CursorPagingMetadata$3;
|
|
1996
|
+
}
|
|
1997
|
+
interface CursorPagingMetadata$3 {
|
|
1998
|
+
/** Number of items returned in the response. */
|
|
1999
|
+
count?: number | null;
|
|
2000
|
+
/** Cursor strings that point to the next page, previous page, or both. */
|
|
2001
|
+
cursors?: Cursors$3;
|
|
2002
|
+
/**
|
|
2003
|
+
* Whether there are more pages to retrieve following the current page.
|
|
2004
|
+
*
|
|
2005
|
+
* + `true`: Another page of results can be retrieved.
|
|
2006
|
+
* + `false`: This is the last page.
|
|
2007
|
+
*/
|
|
2008
|
+
hasNext?: boolean | null;
|
|
2009
|
+
}
|
|
2010
|
+
interface Cursors$3 {
|
|
2011
|
+
/** Cursor string pointing to the next page in the list of results. */
|
|
2012
|
+
next?: string | null;
|
|
2013
|
+
/** Cursor pointing to the previous page in the list of results. */
|
|
2014
|
+
prev?: string | null;
|
|
2015
|
+
}
|
|
2016
|
+
interface GetReferralStatisticsRequest {
|
|
2017
|
+
}
|
|
2018
|
+
interface GetReferralStatisticsResponse {
|
|
2019
|
+
/** Total sign ups completed by referred friends */
|
|
2020
|
+
totalSignUpsCompleted?: number;
|
|
2021
|
+
/** Total actions completed by referred friends */
|
|
2022
|
+
totalActionsCompleted?: number;
|
|
2023
|
+
/** Total amount of purchases made by referred friends */
|
|
2024
|
+
totalAmountGenerated?: string;
|
|
2025
|
+
}
|
|
2026
|
+
interface QueryReferringCustomerTotalsRequest {
|
|
2027
|
+
/** Query to filter ReferringCustomerTotals. */
|
|
2028
|
+
query?: CursorQuery$3;
|
|
2029
|
+
/** List of contact ids to filter ReferringCustomerTotals. */
|
|
2030
|
+
contactIds?: string[];
|
|
2031
|
+
}
|
|
2032
|
+
interface QueryReferringCustomerTotalsResponse {
|
|
2033
|
+
/** List of ReferringCustomerTotals that match the query. */
|
|
2034
|
+
referringCustomerTotals?: ReferringCustomerTotal[];
|
|
2035
|
+
/** Paging metadata. */
|
|
2036
|
+
metadata?: CursorPagingMetadata$3;
|
|
2037
|
+
}
|
|
2038
|
+
interface ReferringCustomerTotal {
|
|
2039
|
+
/**
|
|
2040
|
+
* Referring customer id.
|
|
2041
|
+
* @readonly
|
|
2042
|
+
*/
|
|
2043
|
+
referringCustomerId?: string;
|
|
2044
|
+
/**
|
|
2045
|
+
* Contact id.
|
|
2046
|
+
* @readonly
|
|
2047
|
+
*/
|
|
2048
|
+
contactId?: string;
|
|
2049
|
+
/**
|
|
2050
|
+
* Last successful referral date.
|
|
2051
|
+
* @readonly
|
|
2052
|
+
*/
|
|
2053
|
+
lastSuccessfulReferral?: Date;
|
|
2054
|
+
/**
|
|
2055
|
+
* Total successful referrals made by this customer.
|
|
2056
|
+
* @readonly
|
|
2057
|
+
*/
|
|
2058
|
+
totalSuccessfulReferrals?: number;
|
|
2059
|
+
/**
|
|
2060
|
+
* Total amount generated by friends referred by this customer.
|
|
2061
|
+
* @readonly
|
|
2062
|
+
*/
|
|
2063
|
+
totalAmountGenerated?: string;
|
|
2064
|
+
/**
|
|
2065
|
+
* Last friend action date.
|
|
2066
|
+
* @readonly
|
|
2067
|
+
*/
|
|
2068
|
+
lastFriendAction?: Date;
|
|
2069
|
+
/**
|
|
2070
|
+
* Total friends that have actions done.
|
|
2071
|
+
* @readonly
|
|
2072
|
+
*/
|
|
2073
|
+
totalFriendsWithActions?: number;
|
|
2074
|
+
}
|
|
2075
|
+
interface QueryReferredFriendActionsRequest {
|
|
2076
|
+
/** Query to filter ReferredFriendActions. */
|
|
2077
|
+
query?: CursorQuery$3;
|
|
2078
|
+
/** List of contact ids to filter ReferredFriendActions. */
|
|
2079
|
+
contactIds?: string[];
|
|
2080
|
+
}
|
|
2081
|
+
interface QueryReferredFriendActionsResponse {
|
|
2082
|
+
/** List of ReferredFriendActions that match the query. */
|
|
2083
|
+
referredFriendActions?: ReferredFriendAction[];
|
|
2084
|
+
/** Paging metadata. */
|
|
2085
|
+
metadata?: CursorPagingMetadata$3;
|
|
2086
|
+
}
|
|
2087
|
+
interface ReferredFriendAction extends ReferredFriendActionRewardTypeOptionsOneOf {
|
|
2088
|
+
/** Coupon reward type options. */
|
|
2089
|
+
coupon?: V1Coupon$1;
|
|
2090
|
+
/** Loyalty points reward type options. */
|
|
2091
|
+
loyaltyPoints?: LoyaltyPoints$1;
|
|
2092
|
+
/**
|
|
2093
|
+
* Referred friend id.
|
|
2094
|
+
* @readonly
|
|
2095
|
+
*/
|
|
2096
|
+
referredFriendId?: string;
|
|
2097
|
+
/**
|
|
2098
|
+
* Contact id.
|
|
2099
|
+
* @readonly
|
|
2100
|
+
*/
|
|
2101
|
+
contactId?: string;
|
|
2102
|
+
/**
|
|
2103
|
+
* First action trigger.
|
|
2104
|
+
* @readonly
|
|
2105
|
+
*/
|
|
2106
|
+
trigger?: V1Trigger;
|
|
2107
|
+
/**
|
|
2108
|
+
* First action date.
|
|
2109
|
+
* @readonly
|
|
2110
|
+
*/
|
|
2111
|
+
actionDate?: Date;
|
|
2112
|
+
/** Issued reward type. */
|
|
2113
|
+
rewardType?: Reward$1;
|
|
2114
|
+
/** Total number of actions. */
|
|
2115
|
+
totalActions?: number;
|
|
2116
|
+
/**
|
|
2117
|
+
* Total amount spent by this referred friend.
|
|
2118
|
+
* @readonly
|
|
2119
|
+
*/
|
|
2120
|
+
totalAmountSpent?: string;
|
|
2121
|
+
/**
|
|
2122
|
+
* friend signup date.
|
|
2123
|
+
* @readonly
|
|
2124
|
+
*/
|
|
2125
|
+
signupDate?: Date;
|
|
2126
|
+
}
|
|
2127
|
+
/** @oneof */
|
|
2128
|
+
interface ReferredFriendActionRewardTypeOptionsOneOf {
|
|
2129
|
+
/** Coupon reward type options. */
|
|
2130
|
+
coupon?: V1Coupon$1;
|
|
2131
|
+
/** Loyalty points reward type options. */
|
|
2132
|
+
loyaltyPoints?: LoyaltyPoints$1;
|
|
2133
|
+
}
|
|
2134
|
+
interface V1Coupon$1 {
|
|
2135
|
+
/**
|
|
2136
|
+
* Coupon ID.
|
|
2137
|
+
* @readonly
|
|
2138
|
+
*/
|
|
2139
|
+
_id?: string;
|
|
2140
|
+
/**
|
|
2141
|
+
* Coupon code.
|
|
2142
|
+
* @readonly
|
|
2143
|
+
*/
|
|
2144
|
+
code?: string;
|
|
2145
|
+
/**
|
|
2146
|
+
* Coupon status.
|
|
2147
|
+
* @readonly
|
|
2148
|
+
*/
|
|
2149
|
+
status?: Status$2;
|
|
2150
|
+
/**
|
|
2151
|
+
* Coupon specification.
|
|
2152
|
+
* @readonly
|
|
2153
|
+
*/
|
|
2154
|
+
couponSpecification?: Coupon$1;
|
|
2155
|
+
}
|
|
2156
|
+
declare enum Status$2 {
|
|
2157
|
+
/** Unknown coupon status. */
|
|
2158
|
+
UNKNOWN = "UNKNOWN",
|
|
2159
|
+
/** Coupon is active and can be applied. */
|
|
2160
|
+
ACTIVE = "ACTIVE",
|
|
2161
|
+
/** Coupon was already applied and can not be used anymore. */
|
|
2162
|
+
APPLIED = "APPLIED",
|
|
2163
|
+
/** Coupon was deleted. */
|
|
2164
|
+
DELETED = "DELETED"
|
|
2165
|
+
}
|
|
2166
|
+
interface Coupon$1 extends CouponDiscountTypeOptionsOneOf$1, CouponScopeOrMinSubtotalOneOf$1 {
|
|
2167
|
+
/** Options for fixed amount discount type. */
|
|
2168
|
+
fixedAmountOptions?: FixedAmountDiscount$1;
|
|
2169
|
+
/** Options for percentage discount type. */
|
|
2170
|
+
percentageOptions?: PercentageDiscount$1;
|
|
2171
|
+
/** Limit the coupon to carts with a subtotal above this number. */
|
|
2172
|
+
minimumSubtotal?: number;
|
|
2173
|
+
/** Specifies the type of line items this coupon will apply to. */
|
|
2174
|
+
scope?: CouponScope$1;
|
|
2175
|
+
/** Coupon name. */
|
|
2176
|
+
name?: string;
|
|
2177
|
+
/** Coupon discount type. */
|
|
2178
|
+
discountType?: DiscountType$1;
|
|
2179
|
+
/** Limit the coupon to only apply to one item in cart. */
|
|
2180
|
+
limitedToOneItem?: boolean | null;
|
|
2181
|
+
/** If true, coupon also applies to subscriptions. */
|
|
2182
|
+
appliesToSubscriptions?: boolean | null;
|
|
2183
|
+
/** Specifies the amount of discounted cycles for subscription item. See Stores Coupons documentation for more info. */
|
|
2184
|
+
discountedCycleCount?: number | null;
|
|
2185
|
+
}
|
|
2186
|
+
/** @oneof */
|
|
2187
|
+
interface CouponDiscountTypeOptionsOneOf$1 {
|
|
2188
|
+
/** Options for fixed amount discount type. */
|
|
2189
|
+
fixedAmountOptions?: FixedAmountDiscount$1;
|
|
2190
|
+
/** Options for percentage discount type. */
|
|
2191
|
+
percentageOptions?: PercentageDiscount$1;
|
|
2192
|
+
}
|
|
2193
|
+
/** @oneof */
|
|
2194
|
+
interface CouponScopeOrMinSubtotalOneOf$1 {
|
|
2195
|
+
/** Limit the coupon to carts with a subtotal above this number. */
|
|
2196
|
+
minimumSubtotal?: number;
|
|
2197
|
+
/** Specifies the type of line items this coupon will apply to. */
|
|
2198
|
+
scope?: CouponScope$1;
|
|
2199
|
+
}
|
|
2200
|
+
declare enum DiscountType$1 {
|
|
2201
|
+
/** Unknown discount type. */
|
|
2202
|
+
UNKNOWN = "UNKNOWN",
|
|
2203
|
+
/** Discount as a fixed amount. */
|
|
2204
|
+
FIXED_AMOUNT = "FIXED_AMOUNT",
|
|
2205
|
+
/** Discount as a percentage. */
|
|
2206
|
+
PERCENTAGE = "PERCENTAGE",
|
|
2207
|
+
/** Free shipping. */
|
|
2208
|
+
FREE_SHIPPING = "FREE_SHIPPING"
|
|
2209
|
+
}
|
|
2210
|
+
interface FixedAmountDiscount$1 {
|
|
2211
|
+
/** Fixed amount to discount. */
|
|
2212
|
+
amount?: number;
|
|
2213
|
+
}
|
|
2214
|
+
interface PercentageDiscount$1 {
|
|
2215
|
+
/** Percentage to discount. */
|
|
2216
|
+
percentage?: number;
|
|
2217
|
+
}
|
|
2218
|
+
interface CouponScope$1 {
|
|
2219
|
+
/** Namespace of the coupon scope. */
|
|
2220
|
+
namespace?: string;
|
|
2221
|
+
/** Group of the coupon scope. */
|
|
2222
|
+
group?: Group$1;
|
|
2223
|
+
}
|
|
2224
|
+
interface Group$1 {
|
|
2225
|
+
/** Name of the group. */
|
|
2226
|
+
name?: string;
|
|
2227
|
+
/** Entity ID of the group. */
|
|
2228
|
+
entityId?: string | null;
|
|
2229
|
+
}
|
|
2230
|
+
interface LoyaltyPoints$1 {
|
|
2231
|
+
/**
|
|
2232
|
+
* Loyalty transaction ID.
|
|
2233
|
+
* @readonly
|
|
2234
|
+
*/
|
|
2235
|
+
transactionId?: string;
|
|
2236
|
+
/**
|
|
2237
|
+
* Loyalty points amount given.
|
|
2238
|
+
* @readonly
|
|
2239
|
+
*/
|
|
2240
|
+
amount?: number;
|
|
2241
|
+
}
|
|
2242
|
+
interface DomainEvent$3 extends DomainEventBodyOneOf$3 {
|
|
2243
|
+
createdEvent?: EntityCreatedEvent$3;
|
|
2244
|
+
updatedEvent?: EntityUpdatedEvent$3;
|
|
2245
|
+
deletedEvent?: EntityDeletedEvent$3;
|
|
2246
|
+
actionEvent?: ActionEvent$3;
|
|
2247
|
+
/**
|
|
2248
|
+
* Unique event ID.
|
|
2249
|
+
* Allows clients to ignore duplicate webhooks.
|
|
2250
|
+
*/
|
|
2251
|
+
_id?: string;
|
|
2252
|
+
/**
|
|
2253
|
+
* Assumes actions are also always typed to an entity_type
|
|
2254
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
2255
|
+
*/
|
|
2256
|
+
entityFqdn?: string;
|
|
2257
|
+
/**
|
|
2258
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
2259
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
2260
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
2261
|
+
*/
|
|
2262
|
+
slug?: string;
|
|
2263
|
+
/** ID of the entity associated with the event. */
|
|
2264
|
+
entityId?: string;
|
|
2265
|
+
/** Event timestamp. */
|
|
2266
|
+
eventTime?: Date;
|
|
2267
|
+
/**
|
|
2268
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
2269
|
+
* (for example, GDPR).
|
|
2270
|
+
*/
|
|
2271
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
2272
|
+
/** If present, indicates the action that triggered the event. */
|
|
2273
|
+
originatedFrom?: string | null;
|
|
2274
|
+
/**
|
|
2275
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
2276
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
2277
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
2278
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
2279
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
2280
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
2281
|
+
*/
|
|
2282
|
+
entityEventSequence?: string | null;
|
|
2283
|
+
}
|
|
2284
|
+
/** @oneof */
|
|
2285
|
+
interface DomainEventBodyOneOf$3 {
|
|
2286
|
+
createdEvent?: EntityCreatedEvent$3;
|
|
2287
|
+
updatedEvent?: EntityUpdatedEvent$3;
|
|
2288
|
+
deletedEvent?: EntityDeletedEvent$3;
|
|
2289
|
+
actionEvent?: ActionEvent$3;
|
|
2290
|
+
}
|
|
2291
|
+
interface EntityCreatedEvent$3 {
|
|
2292
|
+
entity?: string;
|
|
2293
|
+
}
|
|
2294
|
+
interface UndeleteInfo$3 {
|
|
2295
|
+
deletedDate?: Date;
|
|
2296
|
+
}
|
|
2297
|
+
interface EntityUpdatedEvent$3 {
|
|
2298
|
+
/**
|
|
2299
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
2300
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
2301
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
2302
|
+
*/
|
|
2303
|
+
currentEntity?: string;
|
|
2304
|
+
}
|
|
2305
|
+
interface EntityDeletedEvent$3 {
|
|
2306
|
+
/** Entity that was deleted */
|
|
2307
|
+
deletedEntity?: string | null;
|
|
2308
|
+
}
|
|
2309
|
+
interface ActionEvent$3 {
|
|
2310
|
+
body?: string;
|
|
2311
|
+
}
|
|
2312
|
+
interface Empty$2 {
|
|
2313
|
+
}
|
|
2314
|
+
interface SuccessfulReferralEvent$2 {
|
|
2315
|
+
/** ReferredFriend that completed his referral details. */
|
|
2316
|
+
referredFriendDetails?: ReferredFriendDetails$2;
|
|
2317
|
+
}
|
|
2318
|
+
interface ReferredFriendDetails$2 {
|
|
2319
|
+
/**
|
|
2320
|
+
* ReferredFriend ID.
|
|
2321
|
+
* @readonly
|
|
2322
|
+
*/
|
|
2323
|
+
referredFriendId?: string;
|
|
2324
|
+
/**
|
|
2325
|
+
* ReferredFriend Contact ID.
|
|
2326
|
+
* @readonly
|
|
2327
|
+
*/
|
|
2328
|
+
contactId?: string;
|
|
2329
|
+
/**
|
|
2330
|
+
* Customer who referred this ReferredFriend.
|
|
2331
|
+
* @readonly
|
|
2332
|
+
*/
|
|
2333
|
+
referringCustomerId?: string;
|
|
2334
|
+
}
|
|
2335
|
+
interface ReferredFriendActionEvent {
|
|
2336
|
+
/** ReferredFriend details. */
|
|
2337
|
+
referredFriendDetails?: ReferredFriendDetails$2;
|
|
2338
|
+
/** Trigger details. */
|
|
2339
|
+
trigger?: Trigger;
|
|
2340
|
+
/** Amount. */
|
|
2341
|
+
amount?: string | null;
|
|
2342
|
+
/** Currency. */
|
|
2343
|
+
currency?: string | null;
|
|
2344
|
+
/** Order ID. */
|
|
2345
|
+
orderId?: string | null;
|
|
2346
|
+
}
|
|
2347
|
+
interface Trigger {
|
|
2348
|
+
/** App ID. */
|
|
2349
|
+
appId?: string;
|
|
2350
|
+
/** Activity type. */
|
|
2351
|
+
activityType?: string;
|
|
2352
|
+
}
|
|
2353
|
+
interface MessageEnvelope$3 {
|
|
2354
|
+
/** App instance ID. */
|
|
2355
|
+
instanceId?: string | null;
|
|
2356
|
+
/** Event type. */
|
|
2357
|
+
eventType?: string;
|
|
2358
|
+
/** The identification type and identity data. */
|
|
2359
|
+
identity?: IdentificationData$3;
|
|
2360
|
+
/** Stringify payload. */
|
|
2361
|
+
data?: string;
|
|
2362
|
+
}
|
|
2363
|
+
interface IdentificationData$3 extends IdentificationDataIdOneOf$3 {
|
|
2364
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
2365
|
+
anonymousVisitorId?: string;
|
|
2366
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
2367
|
+
memberId?: string;
|
|
2368
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
2369
|
+
wixUserId?: string;
|
|
2370
|
+
/** ID of an app. */
|
|
2371
|
+
appId?: string;
|
|
2372
|
+
/** @readonly */
|
|
2373
|
+
identityType?: WebhookIdentityType$3;
|
|
2374
|
+
}
|
|
2375
|
+
/** @oneof */
|
|
2376
|
+
interface IdentificationDataIdOneOf$3 {
|
|
2377
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
2378
|
+
anonymousVisitorId?: string;
|
|
2379
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
2380
|
+
memberId?: string;
|
|
2381
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
2382
|
+
wixUserId?: string;
|
|
2383
|
+
/** ID of an app. */
|
|
2384
|
+
appId?: string;
|
|
2385
|
+
}
|
|
2386
|
+
declare enum WebhookIdentityType$3 {
|
|
2387
|
+
UNKNOWN = "UNKNOWN",
|
|
2388
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
2389
|
+
MEMBER = "MEMBER",
|
|
2390
|
+
WIX_USER = "WIX_USER",
|
|
2391
|
+
APP = "APP"
|
|
2392
|
+
}
|
|
2393
|
+
interface GetReferralEventResponseNonNullableFields {
|
|
2394
|
+
referralEvent?: {
|
|
2395
|
+
referredFriendSignupEvent?: {
|
|
2396
|
+
referredFriendId: string;
|
|
2397
|
+
};
|
|
2398
|
+
successfulReferralEvent?: {
|
|
2399
|
+
referredFriendId: string;
|
|
2400
|
+
referringCustomerId: string;
|
|
2401
|
+
};
|
|
2402
|
+
actionEvent?: {
|
|
2403
|
+
referredFriendId: string;
|
|
2404
|
+
referringCustomerId: string;
|
|
2405
|
+
trigger?: {
|
|
2406
|
+
appId: string;
|
|
2407
|
+
activityType: string;
|
|
2408
|
+
};
|
|
2409
|
+
};
|
|
2410
|
+
rewardEvent?: {
|
|
2411
|
+
rewardedReferringCustomerId: string;
|
|
2412
|
+
rewardedReferredFriendId: string;
|
|
2413
|
+
referralRewardId: string;
|
|
2414
|
+
rewardType: Reward$1;
|
|
2415
|
+
};
|
|
2416
|
+
};
|
|
2417
|
+
}
|
|
2418
|
+
interface QueryReferralEventResponseNonNullableFields {
|
|
2419
|
+
referralEvents: {
|
|
2420
|
+
referredFriendSignupEvent?: {
|
|
2421
|
+
referredFriendId: string;
|
|
2422
|
+
};
|
|
2423
|
+
successfulReferralEvent?: {
|
|
2424
|
+
referredFriendId: string;
|
|
2425
|
+
referringCustomerId: string;
|
|
2426
|
+
};
|
|
2427
|
+
actionEvent?: {
|
|
2428
|
+
referredFriendId: string;
|
|
2429
|
+
referringCustomerId: string;
|
|
2430
|
+
trigger?: {
|
|
2431
|
+
appId: string;
|
|
2432
|
+
activityType: string;
|
|
2433
|
+
};
|
|
2434
|
+
};
|
|
2435
|
+
rewardEvent?: {
|
|
2436
|
+
rewardedReferringCustomerId: string;
|
|
2437
|
+
rewardedReferredFriendId: string;
|
|
2438
|
+
referralRewardId: string;
|
|
2439
|
+
rewardType: Reward$1;
|
|
2440
|
+
};
|
|
2441
|
+
}[];
|
|
2442
|
+
}
|
|
2443
|
+
interface GetReferralStatisticsResponseNonNullableFields {
|
|
2444
|
+
totalSignUpsCompleted: number;
|
|
2445
|
+
totalActionsCompleted: number;
|
|
2446
|
+
totalAmountGenerated: string;
|
|
2447
|
+
}
|
|
2448
|
+
interface QueryReferringCustomerTotalsResponseNonNullableFields {
|
|
2449
|
+
referringCustomerTotals: {
|
|
2450
|
+
referringCustomerId: string;
|
|
2451
|
+
contactId: string;
|
|
2452
|
+
totalSuccessfulReferrals: number;
|
|
2453
|
+
totalAmountGenerated: string;
|
|
2454
|
+
totalFriendsWithActions: number;
|
|
2455
|
+
}[];
|
|
2456
|
+
}
|
|
2457
|
+
interface QueryReferredFriendActionsResponseNonNullableFields {
|
|
2458
|
+
referredFriendActions: {
|
|
2459
|
+
coupon?: {
|
|
2460
|
+
_id: string;
|
|
2461
|
+
code: string;
|
|
2462
|
+
status: Status$2;
|
|
2463
|
+
couponSpecification?: {
|
|
2464
|
+
fixedAmountOptions?: {
|
|
2465
|
+
amount: number;
|
|
2466
|
+
};
|
|
2467
|
+
percentageOptions?: {
|
|
2468
|
+
percentage: number;
|
|
2469
|
+
};
|
|
2470
|
+
minimumSubtotal: number;
|
|
2471
|
+
scope?: {
|
|
2472
|
+
namespace: string;
|
|
2473
|
+
group?: {
|
|
2474
|
+
name: string;
|
|
2475
|
+
};
|
|
2476
|
+
};
|
|
2477
|
+
name: string;
|
|
2478
|
+
discountType: DiscountType$1;
|
|
2479
|
+
};
|
|
2480
|
+
};
|
|
2481
|
+
loyaltyPoints?: {
|
|
2482
|
+
transactionId: string;
|
|
2483
|
+
amount: number;
|
|
2484
|
+
};
|
|
2485
|
+
referredFriendId: string;
|
|
2486
|
+
contactId: string;
|
|
2487
|
+
trigger?: {
|
|
2488
|
+
appId: string;
|
|
2489
|
+
activityType: string;
|
|
2490
|
+
};
|
|
2491
|
+
rewardType: Reward$1;
|
|
2492
|
+
totalActions: number;
|
|
2493
|
+
totalAmountSpent: string;
|
|
2494
|
+
}[];
|
|
2495
|
+
}
|
|
2496
|
+
interface BaseEventMetadata$2 {
|
|
2497
|
+
/** App instance ID. */
|
|
2498
|
+
instanceId?: string | null;
|
|
2499
|
+
/** Event type. */
|
|
2500
|
+
eventType?: string;
|
|
2501
|
+
/** The identification type and identity data. */
|
|
2502
|
+
identity?: IdentificationData$3;
|
|
2503
|
+
}
|
|
2504
|
+
interface EventMetadata$2 extends BaseEventMetadata$2 {
|
|
2505
|
+
/**
|
|
2506
|
+
* Unique event ID.
|
|
2507
|
+
* Allows clients to ignore duplicate webhooks.
|
|
2508
|
+
*/
|
|
2509
|
+
_id?: string;
|
|
2510
|
+
/**
|
|
2511
|
+
* Assumes actions are also always typed to an entity_type
|
|
2512
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
2513
|
+
*/
|
|
2514
|
+
entityFqdn?: string;
|
|
2515
|
+
/**
|
|
2516
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
2517
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
2518
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
2519
|
+
*/
|
|
2520
|
+
slug?: string;
|
|
2521
|
+
/** ID of the entity associated with the event. */
|
|
2522
|
+
entityId?: string;
|
|
2523
|
+
/** Event timestamp. */
|
|
2524
|
+
eventTime?: Date;
|
|
2525
|
+
/**
|
|
2526
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
2527
|
+
* (for example, GDPR).
|
|
2528
|
+
*/
|
|
2529
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
2530
|
+
/** If present, indicates the action that triggered the event. */
|
|
2531
|
+
originatedFrom?: string | null;
|
|
2532
|
+
/**
|
|
2533
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
2534
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
2535
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
2536
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
2537
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
2538
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
2539
|
+
*/
|
|
2540
|
+
entityEventSequence?: string | null;
|
|
2541
|
+
}
|
|
2542
|
+
interface ReferralEventCreatedEnvelope {
|
|
2543
|
+
entity: ReferralEvent;
|
|
2544
|
+
metadata: EventMetadata$2;
|
|
2545
|
+
}
|
|
2546
|
+
interface QueryCursorResult$2 {
|
|
2547
|
+
cursors: Cursors$3;
|
|
2548
|
+
hasNext: () => boolean;
|
|
2549
|
+
hasPrev: () => boolean;
|
|
2550
|
+
length: number;
|
|
2551
|
+
pageSize: number;
|
|
2552
|
+
}
|
|
2553
|
+
interface ReferralEventsQueryResult extends QueryCursorResult$2 {
|
|
2554
|
+
items: ReferralEvent[];
|
|
2555
|
+
query: ReferralEventsQueryBuilder;
|
|
2556
|
+
next: () => Promise<ReferralEventsQueryResult>;
|
|
2557
|
+
prev: () => Promise<ReferralEventsQueryResult>;
|
|
2558
|
+
}
|
|
2559
|
+
interface ReferralEventsQueryBuilder {
|
|
2560
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
2561
|
+
* @param value - Value to compare against.
|
|
2562
|
+
* @documentationMaturity preview
|
|
2563
|
+
*/
|
|
2564
|
+
eq: (propertyName: '_createdDate' | '_updatedDate', value: any) => ReferralEventsQueryBuilder;
|
|
2565
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
2566
|
+
* @param value - Value to compare against.
|
|
2567
|
+
* @documentationMaturity preview
|
|
2568
|
+
*/
|
|
2569
|
+
ne: (propertyName: '_createdDate' | '_updatedDate', value: any) => ReferralEventsQueryBuilder;
|
|
2570
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
2571
|
+
* @param value - Value to compare against.
|
|
2572
|
+
* @documentationMaturity preview
|
|
2573
|
+
*/
|
|
2574
|
+
ge: (propertyName: '_createdDate' | '_updatedDate', value: any) => ReferralEventsQueryBuilder;
|
|
2575
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
2576
|
+
* @param value - Value to compare against.
|
|
2577
|
+
* @documentationMaturity preview
|
|
2578
|
+
*/
|
|
2579
|
+
gt: (propertyName: '_createdDate' | '_updatedDate', value: any) => ReferralEventsQueryBuilder;
|
|
2580
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
2581
|
+
* @param value - Value to compare against.
|
|
2582
|
+
* @documentationMaturity preview
|
|
2583
|
+
*/
|
|
2584
|
+
le: (propertyName: '_createdDate' | '_updatedDate', value: any) => ReferralEventsQueryBuilder;
|
|
2585
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
2586
|
+
* @param value - Value to compare against.
|
|
2587
|
+
* @documentationMaturity preview
|
|
2588
|
+
*/
|
|
2589
|
+
lt: (propertyName: '_createdDate' | '_updatedDate', value: any) => ReferralEventsQueryBuilder;
|
|
2590
|
+
/** @param propertyName - Property whose value is compared with `values`.
|
|
2591
|
+
* @param values - List of values to compare against.
|
|
2592
|
+
* @documentationMaturity preview
|
|
2593
|
+
*/
|
|
2594
|
+
hasSome: (propertyName: '_createdDate' | '_updatedDate', value: any[]) => ReferralEventsQueryBuilder;
|
|
2595
|
+
/** @documentationMaturity preview */
|
|
2596
|
+
in: (propertyName: '_createdDate' | '_updatedDate', value: any) => ReferralEventsQueryBuilder;
|
|
2597
|
+
/** @documentationMaturity preview */
|
|
2598
|
+
exists: (propertyName: '_createdDate' | '_updatedDate', value: boolean) => ReferralEventsQueryBuilder;
|
|
2599
|
+
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
2600
|
+
* @documentationMaturity preview
|
|
239
2601
|
*/
|
|
240
|
-
|
|
241
|
-
/**
|
|
242
|
-
*
|
|
243
|
-
* @readonly
|
|
2602
|
+
ascending: (...propertyNames: Array<'_createdDate' | '_updatedDate'>) => ReferralEventsQueryBuilder;
|
|
2603
|
+
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
2604
|
+
* @documentationMaturity preview
|
|
244
2605
|
*/
|
|
245
|
-
|
|
246
|
-
/**
|
|
247
|
-
*
|
|
248
|
-
* @readonly
|
|
2606
|
+
descending: (...propertyNames: Array<'_createdDate' | '_updatedDate'>) => ReferralEventsQueryBuilder;
|
|
2607
|
+
/** @param limit - Number of items to return, which is also the `pageSize` of the results object.
|
|
2608
|
+
* @documentationMaturity preview
|
|
249
2609
|
*/
|
|
250
|
-
|
|
251
|
-
/**
|
|
252
|
-
*
|
|
253
|
-
* @readonly
|
|
2610
|
+
limit: (limit: number) => ReferralEventsQueryBuilder;
|
|
2611
|
+
/** @param cursor - A pointer to specific record
|
|
2612
|
+
* @documentationMaturity preview
|
|
254
2613
|
*/
|
|
255
|
-
|
|
2614
|
+
skipTo: (cursor: string) => ReferralEventsQueryBuilder;
|
|
2615
|
+
/** @documentationMaturity preview */
|
|
2616
|
+
find: () => Promise<ReferralEventsQueryResult>;
|
|
256
2617
|
}
|
|
257
|
-
interface
|
|
2618
|
+
interface QueryReferringCustomerTotalsOptions {
|
|
2619
|
+
/** Query to filter ReferringCustomerTotals. */
|
|
2620
|
+
query?: CursorQuery$3;
|
|
2621
|
+
/** List of contact ids to filter ReferringCustomerTotals. */
|
|
2622
|
+
contactIds?: string[];
|
|
2623
|
+
}
|
|
2624
|
+
interface QueryReferredFriendActionsOptions {
|
|
258
2625
|
/** Query to filter ReferredFriendActions. */
|
|
259
|
-
query?: CursorQuery$
|
|
2626
|
+
query?: CursorQuery$3;
|
|
260
2627
|
/** List of contact ids to filter ReferredFriendActions. */
|
|
261
2628
|
contactIds?: string[];
|
|
262
2629
|
}
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
metadata?: CursorPagingMetadata$2;
|
|
2630
|
+
|
|
2631
|
+
interface HttpClient$3 {
|
|
2632
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory$3<TResponse, TData>): Promise<HttpResponse$3<TResponse>>;
|
|
2633
|
+
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
268
2634
|
}
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
2635
|
+
type RequestOptionsFactory$3<TResponse = any, TData = any> = (context: any) => RequestOptions$3<TResponse, TData>;
|
|
2636
|
+
type HttpResponse$3<T = any> = {
|
|
2637
|
+
data: T;
|
|
2638
|
+
status: number;
|
|
2639
|
+
statusText: string;
|
|
2640
|
+
headers: any;
|
|
2641
|
+
request?: any;
|
|
2642
|
+
};
|
|
2643
|
+
type RequestOptions$3<_TResponse = any, Data = any> = {
|
|
2644
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
2645
|
+
url: string;
|
|
2646
|
+
data?: Data;
|
|
2647
|
+
params?: URLSearchParams;
|
|
2648
|
+
} & APIMetadata$3;
|
|
2649
|
+
type APIMetadata$3 = {
|
|
2650
|
+
methodFqn?: string;
|
|
2651
|
+
entityFqdn?: string;
|
|
2652
|
+
packageName?: string;
|
|
2653
|
+
};
|
|
2654
|
+
type EventDefinition$2<Payload = unknown, Type extends string = string> = {
|
|
2655
|
+
__type: 'event-definition';
|
|
2656
|
+
type: Type;
|
|
2657
|
+
isDomainEvent?: boolean;
|
|
2658
|
+
transformations?: (envelope: unknown) => Payload;
|
|
2659
|
+
__payload: Payload;
|
|
2660
|
+
};
|
|
2661
|
+
declare function EventDefinition$2<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$2<Payload, Type>;
|
|
2662
|
+
|
|
2663
|
+
declare global {
|
|
2664
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
2665
|
+
interface SymbolConstructor {
|
|
2666
|
+
readonly observable: symbol;
|
|
2667
|
+
}
|
|
2668
|
+
}
|
|
2669
|
+
|
|
2670
|
+
declare const __metadata$3: {
|
|
2671
|
+
PACKAGE_NAME: string;
|
|
2672
|
+
};
|
|
2673
|
+
declare function getReferralEvent(httpClient: HttpClient$3): (referralEventId: string) => Promise<ReferralEvent & {
|
|
2674
|
+
referredFriendSignupEvent?: {
|
|
2675
|
+
referredFriendId: string;
|
|
2676
|
+
} | undefined;
|
|
2677
|
+
successfulReferralEvent?: {
|
|
2678
|
+
referredFriendId: string;
|
|
2679
|
+
referringCustomerId: string;
|
|
2680
|
+
} | undefined;
|
|
2681
|
+
actionEvent?: {
|
|
2682
|
+
referredFriendId: string;
|
|
2683
|
+
referringCustomerId: string;
|
|
2684
|
+
trigger?: {
|
|
2685
|
+
appId: string;
|
|
2686
|
+
activityType: string;
|
|
2687
|
+
} | undefined;
|
|
2688
|
+
} | undefined;
|
|
2689
|
+
rewardEvent?: {
|
|
2690
|
+
rewardedReferringCustomerId: string;
|
|
2691
|
+
rewardedReferredFriendId: string;
|
|
2692
|
+
referralRewardId: string;
|
|
2693
|
+
rewardType: Reward$1;
|
|
2694
|
+
} | undefined;
|
|
2695
|
+
}>;
|
|
2696
|
+
declare function queryReferralEvent(httpClient: HttpClient$3): () => ReferralEventsQueryBuilder;
|
|
2697
|
+
declare function getReferralStatistics(httpClient: HttpClient$3): () => Promise<GetReferralStatisticsResponse & GetReferralStatisticsResponseNonNullableFields>;
|
|
2698
|
+
declare function queryReferringCustomerTotals(httpClient: HttpClient$3): (options?: QueryReferringCustomerTotalsOptions) => Promise<QueryReferringCustomerTotalsResponse & QueryReferringCustomerTotalsResponseNonNullableFields>;
|
|
2699
|
+
declare function queryReferredFriendActions(httpClient: HttpClient$3): (options?: QueryReferredFriendActionsOptions) => Promise<QueryReferredFriendActionsResponse & QueryReferredFriendActionsResponseNonNullableFields>;
|
|
2700
|
+
declare const onReferralEventCreated: EventDefinition$2<ReferralEventCreatedEnvelope, "wix.loyalty.referral.v1.referral_event_created">;
|
|
2701
|
+
|
|
2702
|
+
type index_d$3_CreateReferralEventRequest = CreateReferralEventRequest;
|
|
2703
|
+
type index_d$3_CreateReferralEventResponse = CreateReferralEventResponse;
|
|
2704
|
+
type index_d$3_GetReferralEventRequest = GetReferralEventRequest;
|
|
2705
|
+
type index_d$3_GetReferralEventResponse = GetReferralEventResponse;
|
|
2706
|
+
type index_d$3_GetReferralEventResponseNonNullableFields = GetReferralEventResponseNonNullableFields;
|
|
2707
|
+
type index_d$3_GetReferralStatisticsRequest = GetReferralStatisticsRequest;
|
|
2708
|
+
type index_d$3_GetReferralStatisticsResponse = GetReferralStatisticsResponse;
|
|
2709
|
+
type index_d$3_GetReferralStatisticsResponseNonNullableFields = GetReferralStatisticsResponseNonNullableFields;
|
|
2710
|
+
type index_d$3_QueryReferralEventRequest = QueryReferralEventRequest;
|
|
2711
|
+
type index_d$3_QueryReferralEventResponse = QueryReferralEventResponse;
|
|
2712
|
+
type index_d$3_QueryReferralEventResponseNonNullableFields = QueryReferralEventResponseNonNullableFields;
|
|
2713
|
+
type index_d$3_QueryReferredFriendActionsOptions = QueryReferredFriendActionsOptions;
|
|
2714
|
+
type index_d$3_QueryReferredFriendActionsRequest = QueryReferredFriendActionsRequest;
|
|
2715
|
+
type index_d$3_QueryReferredFriendActionsResponse = QueryReferredFriendActionsResponse;
|
|
2716
|
+
type index_d$3_QueryReferredFriendActionsResponseNonNullableFields = QueryReferredFriendActionsResponseNonNullableFields;
|
|
2717
|
+
type index_d$3_QueryReferringCustomerTotalsOptions = QueryReferringCustomerTotalsOptions;
|
|
2718
|
+
type index_d$3_QueryReferringCustomerTotalsRequest = QueryReferringCustomerTotalsRequest;
|
|
2719
|
+
type index_d$3_QueryReferringCustomerTotalsResponse = QueryReferringCustomerTotalsResponse;
|
|
2720
|
+
type index_d$3_QueryReferringCustomerTotalsResponseNonNullableFields = QueryReferringCustomerTotalsResponseNonNullableFields;
|
|
2721
|
+
type index_d$3_ReferralEvent = ReferralEvent;
|
|
2722
|
+
type index_d$3_ReferralEventCreatedEnvelope = ReferralEventCreatedEnvelope;
|
|
2723
|
+
type index_d$3_ReferralEventEventTypeOneOf = ReferralEventEventTypeOneOf;
|
|
2724
|
+
type index_d$3_ReferralEventsQueryBuilder = ReferralEventsQueryBuilder;
|
|
2725
|
+
type index_d$3_ReferralEventsQueryResult = ReferralEventsQueryResult;
|
|
2726
|
+
type index_d$3_ReferredFriendAction = ReferredFriendAction;
|
|
2727
|
+
type index_d$3_ReferredFriendActionEvent = ReferredFriendActionEvent;
|
|
2728
|
+
type index_d$3_ReferredFriendActionRewardTypeOptionsOneOf = ReferredFriendActionRewardTypeOptionsOneOf;
|
|
2729
|
+
type index_d$3_ReferredFriendSignupEvent = ReferredFriendSignupEvent;
|
|
2730
|
+
type index_d$3_ReferringCustomerTotal = ReferringCustomerTotal;
|
|
2731
|
+
type index_d$3_RewardEvent = RewardEvent;
|
|
2732
|
+
type index_d$3_RewardEventReceiverOneOf = RewardEventReceiverOneOf;
|
|
2733
|
+
type index_d$3_Trigger = Trigger;
|
|
2734
|
+
type index_d$3_V1ActionEvent = V1ActionEvent;
|
|
2735
|
+
type index_d$3_V1SuccessfulReferralEvent = V1SuccessfulReferralEvent;
|
|
2736
|
+
type index_d$3_V1Trigger = V1Trigger;
|
|
2737
|
+
declare const index_d$3_getReferralEvent: typeof getReferralEvent;
|
|
2738
|
+
declare const index_d$3_getReferralStatistics: typeof getReferralStatistics;
|
|
2739
|
+
declare const index_d$3_onReferralEventCreated: typeof onReferralEventCreated;
|
|
2740
|
+
declare const index_d$3_queryReferralEvent: typeof queryReferralEvent;
|
|
2741
|
+
declare const index_d$3_queryReferredFriendActions: typeof queryReferredFriendActions;
|
|
2742
|
+
declare const index_d$3_queryReferringCustomerTotals: typeof queryReferringCustomerTotals;
|
|
2743
|
+
declare namespace index_d$3 {
|
|
2744
|
+
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 };
|
|
2745
|
+
}
|
|
2746
|
+
|
|
2747
|
+
/** ReferralReward is the main entity of ReferralRewards that can be used for lorem ipsum dolor */
|
|
2748
|
+
interface ReferralReward extends ReferralRewardReceiverOneOf, ReferralRewardRewardTypeOptionsOneOf {
|
|
274
2749
|
/**
|
|
275
|
-
*
|
|
2750
|
+
* Referring customer ID.
|
|
276
2751
|
* @readonly
|
|
277
2752
|
*/
|
|
278
|
-
|
|
2753
|
+
rewardedReferringCustomerId?: string;
|
|
279
2754
|
/**
|
|
280
|
-
*
|
|
2755
|
+
* Referred friend ID.
|
|
281
2756
|
* @readonly
|
|
282
2757
|
*/
|
|
283
|
-
|
|
2758
|
+
rewardedReferredFriendId?: string;
|
|
2759
|
+
/** Coupon reward type options. */
|
|
2760
|
+
coupon?: V1Coupon;
|
|
2761
|
+
/** Loyalty points reward type options. */
|
|
2762
|
+
loyaltyPoints?: V1LoyaltyPoints;
|
|
284
2763
|
/**
|
|
285
|
-
*
|
|
2764
|
+
* ReferralReward ID.
|
|
286
2765
|
* @readonly
|
|
287
2766
|
*/
|
|
288
|
-
|
|
2767
|
+
_id?: string | null;
|
|
2768
|
+
/** 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. */
|
|
2769
|
+
revision?: string | null;
|
|
289
2770
|
/**
|
|
290
|
-
*
|
|
2771
|
+
* Represents the time this ReferralReward was created.
|
|
291
2772
|
* @readonly
|
|
292
2773
|
*/
|
|
293
|
-
|
|
294
|
-
/** Issued reward type. */
|
|
295
|
-
rewardType?: Reward;
|
|
296
|
-
/** Total number of actions. */
|
|
297
|
-
totalActions?: number;
|
|
2774
|
+
_createdDate?: Date;
|
|
298
2775
|
/**
|
|
299
|
-
*
|
|
2776
|
+
* Represents the time this ReferralReward was last updated.
|
|
300
2777
|
* @readonly
|
|
301
2778
|
*/
|
|
302
|
-
|
|
2779
|
+
_updatedDate?: Date;
|
|
2780
|
+
/** Reward type. */
|
|
2781
|
+
rewardType?: RewardTypeType;
|
|
2782
|
+
}
|
|
2783
|
+
/** @oneof */
|
|
2784
|
+
interface ReferralRewardReceiverOneOf {
|
|
303
2785
|
/**
|
|
304
|
-
*
|
|
2786
|
+
* Referring customer ID.
|
|
305
2787
|
* @readonly
|
|
306
2788
|
*/
|
|
307
|
-
|
|
2789
|
+
rewardedReferringCustomerId?: string;
|
|
2790
|
+
/**
|
|
2791
|
+
* Referred friend ID.
|
|
2792
|
+
* @readonly
|
|
2793
|
+
*/
|
|
2794
|
+
rewardedReferredFriendId?: string;
|
|
308
2795
|
}
|
|
309
2796
|
/** @oneof */
|
|
310
|
-
interface
|
|
2797
|
+
interface ReferralRewardRewardTypeOptionsOneOf {
|
|
311
2798
|
/** Coupon reward type options. */
|
|
312
2799
|
coupon?: V1Coupon;
|
|
313
2800
|
/** Loyalty points reward type options. */
|
|
314
|
-
loyaltyPoints?:
|
|
2801
|
+
loyaltyPoints?: V1LoyaltyPoints;
|
|
2802
|
+
}
|
|
2803
|
+
declare enum RewardTypeType {
|
|
2804
|
+
/** Unknown reward type. */
|
|
2805
|
+
UNKNOWN = "UNKNOWN",
|
|
2806
|
+
/** Coupon reward type. */
|
|
2807
|
+
COUPON = "COUPON",
|
|
2808
|
+
/** Loyalty points reward type. */
|
|
2809
|
+
LOYALTY_POINTS = "LOYALTY_POINTS",
|
|
2810
|
+
/** No reward. */
|
|
2811
|
+
NOTHING = "NOTHING"
|
|
315
2812
|
}
|
|
316
2813
|
interface V1Coupon {
|
|
317
2814
|
/**
|
|
@@ -403,7 +2900,7 @@ interface Group {
|
|
|
403
2900
|
name?: string;
|
|
404
2901
|
entityId?: string | null;
|
|
405
2902
|
}
|
|
406
|
-
interface
|
|
2903
|
+
interface V1LoyaltyPoints {
|
|
407
2904
|
/**
|
|
408
2905
|
* Loyalty transaction ID.
|
|
409
2906
|
* @readonly
|
|
@@ -415,6 +2912,135 @@ interface LoyaltyPoints {
|
|
|
415
2912
|
*/
|
|
416
2913
|
amount?: number;
|
|
417
2914
|
}
|
|
2915
|
+
interface GetReferralRewardRequest {
|
|
2916
|
+
/** Id of the ReferralReward to retrieve. */
|
|
2917
|
+
_id: string;
|
|
2918
|
+
}
|
|
2919
|
+
interface GetReferralRewardResponse {
|
|
2920
|
+
/** The retrieved ReferralReward. */
|
|
2921
|
+
referralReward?: ReferralReward;
|
|
2922
|
+
}
|
|
2923
|
+
interface QueryReferralRewardsRequest {
|
|
2924
|
+
/** Query to filter ReferralRewards. */
|
|
2925
|
+
query: CursorQuery$2;
|
|
2926
|
+
/** Filter by contact id or set to "me" for current identity's rewards. */
|
|
2927
|
+
contactId?: string | null;
|
|
2928
|
+
}
|
|
2929
|
+
interface CursorQuery$2 extends CursorQueryPagingMethodOneOf$2 {
|
|
2930
|
+
/** 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`. */
|
|
2931
|
+
cursorPaging?: CursorPaging$2;
|
|
2932
|
+
/**
|
|
2933
|
+
* Filter object in the following format:
|
|
2934
|
+
* `"filter" : {
|
|
2935
|
+
* "fieldName1": "value1",
|
|
2936
|
+
* "fieldName2":{"$operator":"value2"}
|
|
2937
|
+
* }`
|
|
2938
|
+
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
2939
|
+
*/
|
|
2940
|
+
filter?: Record<string, any> | null;
|
|
2941
|
+
/**
|
|
2942
|
+
* Sort object in the following format:
|
|
2943
|
+
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
2944
|
+
*/
|
|
2945
|
+
sort?: Sorting$2[];
|
|
2946
|
+
}
|
|
2947
|
+
/** @oneof */
|
|
2948
|
+
interface CursorQueryPagingMethodOneOf$2 {
|
|
2949
|
+
/** 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`. */
|
|
2950
|
+
cursorPaging?: CursorPaging$2;
|
|
2951
|
+
}
|
|
2952
|
+
interface Sorting$2 {
|
|
2953
|
+
/** Name of the field to sort by. */
|
|
2954
|
+
fieldName?: string;
|
|
2955
|
+
/** Sort order. */
|
|
2956
|
+
order?: SortOrder$2;
|
|
2957
|
+
}
|
|
2958
|
+
declare enum SortOrder$2 {
|
|
2959
|
+
ASC = "ASC",
|
|
2960
|
+
DESC = "DESC"
|
|
2961
|
+
}
|
|
2962
|
+
interface CursorPaging$2 {
|
|
2963
|
+
/** Maximum number of items to return in the results. */
|
|
2964
|
+
limit?: number | null;
|
|
2965
|
+
/**
|
|
2966
|
+
* Pointer to the next or previous page in the list of results.
|
|
2967
|
+
*
|
|
2968
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
2969
|
+
* Not relevant for the first request.
|
|
2970
|
+
*/
|
|
2971
|
+
cursor?: string | null;
|
|
2972
|
+
}
|
|
2973
|
+
interface QueryReferralRewardsResponse {
|
|
2974
|
+
/** The retrieved ReferralRewards. */
|
|
2975
|
+
referralRewards?: ReferralReward[];
|
|
2976
|
+
/** Metadata for paging. */
|
|
2977
|
+
metadata?: CursorPagingMetadata$2;
|
|
2978
|
+
}
|
|
2979
|
+
interface CursorPagingMetadata$2 {
|
|
2980
|
+
/** Number of items returned in the response. */
|
|
2981
|
+
count?: number | null;
|
|
2982
|
+
/** Cursor strings that point to the next page, previous page, or both. */
|
|
2983
|
+
cursors?: Cursors$2;
|
|
2984
|
+
/**
|
|
2985
|
+
* Whether there are more pages to retrieve following the current page.
|
|
2986
|
+
*
|
|
2987
|
+
* + `true`: Another page of results can be retrieved.
|
|
2988
|
+
* + `false`: This is the last page.
|
|
2989
|
+
*/
|
|
2990
|
+
hasNext?: boolean | null;
|
|
2991
|
+
}
|
|
2992
|
+
interface Cursors$2 {
|
|
2993
|
+
/** Cursor string pointing to the next page in the list of results. */
|
|
2994
|
+
next?: string | null;
|
|
2995
|
+
/** Cursor pointing to the previous page in the list of results. */
|
|
2996
|
+
prev?: string | null;
|
|
2997
|
+
}
|
|
2998
|
+
interface ValidateReferralRewardRequest {
|
|
2999
|
+
/** Reward to validate. */
|
|
3000
|
+
reward?: Reward;
|
|
3001
|
+
}
|
|
3002
|
+
interface Reward extends RewardOptionsOneOf {
|
|
3003
|
+
/** Options for coupon reward type */
|
|
3004
|
+
couponOptions?: Coupon;
|
|
3005
|
+
/** Options for Loyalty points reward type */
|
|
3006
|
+
loyaltyPointsOptions?: LoyaltyPoints;
|
|
3007
|
+
/** Type of the reward */
|
|
3008
|
+
type?: Type;
|
|
3009
|
+
}
|
|
3010
|
+
/** @oneof */
|
|
3011
|
+
interface RewardOptionsOneOf {
|
|
3012
|
+
/** Options for coupon reward type */
|
|
3013
|
+
couponOptions?: Coupon;
|
|
3014
|
+
/** Options for Loyalty points reward type */
|
|
3015
|
+
loyaltyPointsOptions?: LoyaltyPoints;
|
|
3016
|
+
}
|
|
3017
|
+
declare enum Type {
|
|
3018
|
+
UNKNOWN = "UNKNOWN",
|
|
3019
|
+
/** Coupon reward type */
|
|
3020
|
+
COUPON = "COUPON",
|
|
3021
|
+
/** Loyalty points reward type */
|
|
3022
|
+
LOYALTY_POINTS = "LOYALTY_POINTS",
|
|
3023
|
+
/** No reward type */
|
|
3024
|
+
NOTHING = "NOTHING"
|
|
3025
|
+
}
|
|
3026
|
+
interface LoyaltyPoints {
|
|
3027
|
+
/** Amount of points to give */
|
|
3028
|
+
amount?: number;
|
|
3029
|
+
}
|
|
3030
|
+
interface ValidateReferralRewardResponse {
|
|
3031
|
+
}
|
|
3032
|
+
interface BulkGetReferralRewardsRequest {
|
|
3033
|
+
}
|
|
3034
|
+
interface BulkGetReferralRewardsResponse {
|
|
3035
|
+
/** Found rewards per site. */
|
|
3036
|
+
rewardsInSite?: RewardsInSite[];
|
|
3037
|
+
}
|
|
3038
|
+
interface RewardsInSite {
|
|
3039
|
+
/** Metasite ID. */
|
|
3040
|
+
metaSiteId?: string;
|
|
3041
|
+
/** Rewards. */
|
|
3042
|
+
rewards?: ReferralReward[];
|
|
3043
|
+
}
|
|
418
3044
|
interface DomainEvent$2 extends DomainEventBodyOneOf$2 {
|
|
419
3045
|
createdEvent?: EntityCreatedEvent$2;
|
|
420
3046
|
updatedEvent?: EntityUpdatedEvent$2;
|
|
@@ -502,29 +3128,11 @@ interface ReferredFriendDetails$1 {
|
|
|
502
3128
|
* @readonly
|
|
503
3129
|
*/
|
|
504
3130
|
contactId?: string;
|
|
505
|
-
/**
|
|
506
|
-
* Customer who referred this ReferredFriend.
|
|
507
|
-
* @readonly
|
|
508
|
-
*/
|
|
509
|
-
referringCustomerId?: string;
|
|
510
|
-
}
|
|
511
|
-
interface ReferredFriendActionEvent {
|
|
512
|
-
/** ReferredFriend details. */
|
|
513
|
-
referredFriendDetails?: ReferredFriendDetails$1;
|
|
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;
|
|
3131
|
+
/**
|
|
3132
|
+
* Customer who referred this ReferredFriend.
|
|
3133
|
+
* @readonly
|
|
3134
|
+
*/
|
|
3135
|
+
referringCustomerId?: string;
|
|
528
3136
|
}
|
|
529
3137
|
interface MessageEnvelope$2 {
|
|
530
3138
|
/** App instance ID. */
|
|
@@ -566,72 +3174,43 @@ declare enum WebhookIdentityType$2 {
|
|
|
566
3174
|
WIX_USER = "WIX_USER",
|
|
567
3175
|
APP = "APP"
|
|
568
3176
|
}
|
|
569
|
-
interface
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
3177
|
+
interface GetReferralRewardResponseNonNullableFields {
|
|
3178
|
+
referralReward?: {
|
|
3179
|
+
rewardedReferringCustomerId: string;
|
|
3180
|
+
rewardedReferredFriendId: string;
|
|
3181
|
+
coupon?: {
|
|
3182
|
+
_id: string;
|
|
3183
|
+
code: string;
|
|
3184
|
+
status: Status$1;
|
|
3185
|
+
couponSpecification?: {
|
|
3186
|
+
fixedAmountOptions?: {
|
|
3187
|
+
amount: number;
|
|
3188
|
+
};
|
|
3189
|
+
percentageOptions?: {
|
|
3190
|
+
percentage: number;
|
|
3191
|
+
};
|
|
3192
|
+
minimumSubtotal: number;
|
|
3193
|
+
scope?: {
|
|
3194
|
+
namespace: string;
|
|
3195
|
+
group?: {
|
|
3196
|
+
name: string;
|
|
3197
|
+
};
|
|
3198
|
+
};
|
|
3199
|
+
name: string;
|
|
3200
|
+
discountType: DiscountType;
|
|
584
3201
|
};
|
|
585
3202
|
};
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
referralRewardId: string;
|
|
590
|
-
rewardType: Reward;
|
|
3203
|
+
loyaltyPoints?: {
|
|
3204
|
+
transactionId: string;
|
|
3205
|
+
amount: number;
|
|
591
3206
|
};
|
|
3207
|
+
rewardType: RewardTypeType;
|
|
592
3208
|
};
|
|
593
3209
|
}
|
|
594
|
-
interface
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
};
|
|
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;
|
|
609
|
-
};
|
|
610
|
-
};
|
|
611
|
-
rewardEvent?: {
|
|
612
|
-
rewardedReferringCustomerId: string;
|
|
613
|
-
rewardedReferredFriendId: string;
|
|
614
|
-
referralRewardId: string;
|
|
615
|
-
rewardType: Reward;
|
|
616
|
-
};
|
|
617
|
-
}[];
|
|
618
|
-
}
|
|
619
|
-
interface GetReferralStatisticsResponseNonNullableFields {
|
|
620
|
-
totalSignUpsCompleted: number;
|
|
621
|
-
totalActionsCompleted: number;
|
|
622
|
-
totalAmountGenerated: string;
|
|
623
|
-
}
|
|
624
|
-
interface QueryReferringCustomerTotalsResponseNonNullableFields {
|
|
625
|
-
referringCustomerTotals: {
|
|
626
|
-
referringCustomerId: string;
|
|
627
|
-
contactId: string;
|
|
628
|
-
totalSuccessfulReferrals: number;
|
|
629
|
-
totalAmountGenerated: string;
|
|
630
|
-
totalFriendsWithActions: number;
|
|
631
|
-
}[];
|
|
632
|
-
}
|
|
633
|
-
interface QueryReferredFriendActionsResponseNonNullableFields {
|
|
634
|
-
referredFriendActions: {
|
|
3210
|
+
interface QueryReferralRewardsResponseNonNullableFields {
|
|
3211
|
+
referralRewards: {
|
|
3212
|
+
rewardedReferringCustomerId: string;
|
|
3213
|
+
rewardedReferredFriendId: string;
|
|
635
3214
|
coupon?: {
|
|
636
3215
|
_id: string;
|
|
637
3216
|
code: string;
|
|
@@ -658,150 +3237,12 @@ interface QueryReferredFriendActionsResponseNonNullableFields {
|
|
|
658
3237
|
transactionId: string;
|
|
659
3238
|
amount: number;
|
|
660
3239
|
};
|
|
661
|
-
|
|
662
|
-
contactId: string;
|
|
663
|
-
trigger?: {
|
|
664
|
-
appId: string;
|
|
665
|
-
activityType: string;
|
|
666
|
-
};
|
|
667
|
-
rewardType: Reward;
|
|
668
|
-
totalActions: number;
|
|
669
|
-
totalAmountSpent: string;
|
|
3240
|
+
rewardType: RewardTypeType;
|
|
670
3241
|
}[];
|
|
671
3242
|
}
|
|
672
|
-
interface
|
|
673
|
-
/**
|
|
674
|
-
|
|
675
|
-
/** Event type. */
|
|
676
|
-
eventType?: string;
|
|
677
|
-
/** The identification type and identity data. */
|
|
678
|
-
identity?: IdentificationData$2;
|
|
679
|
-
}
|
|
680
|
-
interface EventMetadata$2 extends BaseEventMetadata$2 {
|
|
681
|
-
/**
|
|
682
|
-
* Unique event ID.
|
|
683
|
-
* Allows clients to ignore duplicate webhooks.
|
|
684
|
-
*/
|
|
685
|
-
_id?: string;
|
|
686
|
-
/**
|
|
687
|
-
* Assumes actions are also always typed to an entity_type
|
|
688
|
-
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
689
|
-
*/
|
|
690
|
-
entityFqdn?: string;
|
|
691
|
-
/**
|
|
692
|
-
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
693
|
-
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
694
|
-
* Example: created/updated/deleted/started/completed/email_opened
|
|
695
|
-
*/
|
|
696
|
-
slug?: string;
|
|
697
|
-
/** ID of the entity associated with the event. */
|
|
698
|
-
entityId?: string;
|
|
699
|
-
/** Event timestamp. */
|
|
700
|
-
eventTime?: Date;
|
|
701
|
-
/**
|
|
702
|
-
* Whether the event was triggered as a result of a privacy regulation application
|
|
703
|
-
* (for example, GDPR).
|
|
704
|
-
*/
|
|
705
|
-
triggeredByAnonymizeRequest?: boolean | null;
|
|
706
|
-
/** If present, indicates the action that triggered the event. */
|
|
707
|
-
originatedFrom?: string | null;
|
|
708
|
-
/**
|
|
709
|
-
* A sequence number defining the order of updates to the underlying entity.
|
|
710
|
-
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
711
|
-
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
712
|
-
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
713
|
-
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
714
|
-
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
715
|
-
*/
|
|
716
|
-
entityEventSequence?: string | null;
|
|
717
|
-
}
|
|
718
|
-
interface ReferralEventCreatedEnvelope {
|
|
719
|
-
entity: ReferralEvent;
|
|
720
|
-
metadata: EventMetadata$2;
|
|
721
|
-
}
|
|
722
|
-
interface QueryCursorResult$2 {
|
|
723
|
-
cursors: Cursors$2;
|
|
724
|
-
hasNext: () => boolean;
|
|
725
|
-
hasPrev: () => boolean;
|
|
726
|
-
length: number;
|
|
727
|
-
pageSize: number;
|
|
728
|
-
}
|
|
729
|
-
interface ReferralEventsQueryResult extends QueryCursorResult$2 {
|
|
730
|
-
items: ReferralEvent[];
|
|
731
|
-
query: ReferralEventsQueryBuilder;
|
|
732
|
-
next: () => Promise<ReferralEventsQueryResult>;
|
|
733
|
-
prev: () => Promise<ReferralEventsQueryResult>;
|
|
734
|
-
}
|
|
735
|
-
interface ReferralEventsQueryBuilder {
|
|
736
|
-
/** @param propertyName - Property whose value is compared with `value`.
|
|
737
|
-
* @param value - Value to compare against.
|
|
738
|
-
* @documentationMaturity preview
|
|
739
|
-
*/
|
|
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.
|
|
743
|
-
* @documentationMaturity preview
|
|
744
|
-
*/
|
|
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
|
|
749
|
-
*/
|
|
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
|
|
754
|
-
*/
|
|
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
|
|
759
|
-
*/
|
|
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
|
|
764
|
-
*/
|
|
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
|
|
769
|
-
*/
|
|
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
|
|
777
|
-
*/
|
|
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
|
|
781
|
-
*/
|
|
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
|
|
785
|
-
*/
|
|
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>;
|
|
793
|
-
}
|
|
794
|
-
interface QueryReferringCustomerTotalsOptions {
|
|
795
|
-
/** Query to filter ReferringCustomerTotals. */
|
|
796
|
-
query?: CursorQuery$2;
|
|
797
|
-
/** List of contact ids to filter ReferringCustomerTotals. */
|
|
798
|
-
contactIds?: string[];
|
|
799
|
-
}
|
|
800
|
-
interface QueryReferredFriendActionsOptions {
|
|
801
|
-
/** Query to filter ReferredFriendActions. */
|
|
802
|
-
query?: CursorQuery$2;
|
|
803
|
-
/** List of contact ids to filter ReferredFriendActions. */
|
|
804
|
-
contactIds?: string[];
|
|
3243
|
+
interface QueryReferralRewardsOptions {
|
|
3244
|
+
/** Filter by contact id or set to "me" for current identity's rewards. */
|
|
3245
|
+
contactId?: string | null;
|
|
805
3246
|
}
|
|
806
3247
|
|
|
807
3248
|
interface HttpClient$2 {
|
|
@@ -827,14 +3268,6 @@ type APIMetadata$2 = {
|
|
|
827
3268
|
entityFqdn?: string;
|
|
828
3269
|
packageName?: string;
|
|
829
3270
|
};
|
|
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
3271
|
|
|
839
3272
|
declare global {
|
|
840
3273
|
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
@@ -846,91 +3279,76 @@ declare global {
|
|
|
846
3279
|
declare const __metadata$2: {
|
|
847
3280
|
PACKAGE_NAME: string;
|
|
848
3281
|
};
|
|
849
|
-
declare function
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
3282
|
+
declare function getReferralReward(httpClient: HttpClient$2): (_id: string) => Promise<ReferralReward & {
|
|
3283
|
+
rewardedReferringCustomerId: string;
|
|
3284
|
+
rewardedReferredFriendId: string;
|
|
3285
|
+
coupon?: {
|
|
3286
|
+
_id: string;
|
|
3287
|
+
code: string;
|
|
3288
|
+
status: Status$1;
|
|
3289
|
+
couponSpecification?: {
|
|
3290
|
+
fixedAmountOptions?: {
|
|
3291
|
+
amount: number;
|
|
3292
|
+
} | undefined;
|
|
3293
|
+
percentageOptions?: {
|
|
3294
|
+
percentage: number;
|
|
3295
|
+
} | undefined;
|
|
3296
|
+
minimumSubtotal: number;
|
|
3297
|
+
scope?: {
|
|
3298
|
+
namespace: string;
|
|
3299
|
+
group?: {
|
|
3300
|
+
name: string;
|
|
3301
|
+
} | undefined;
|
|
3302
|
+
} | undefined;
|
|
3303
|
+
name: string;
|
|
3304
|
+
discountType: DiscountType;
|
|
863
3305
|
} | undefined;
|
|
864
3306
|
} | undefined;
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
referralRewardId: string;
|
|
869
|
-
rewardType: Reward;
|
|
3307
|
+
loyaltyPoints?: {
|
|
3308
|
+
transactionId: string;
|
|
3309
|
+
amount: number;
|
|
870
3310
|
} | undefined;
|
|
3311
|
+
rewardType: RewardTypeType;
|
|
871
3312
|
}>;
|
|
872
|
-
declare function
|
|
873
|
-
declare function getReferralStatistics(httpClient: HttpClient$2): () => Promise<GetReferralStatisticsResponse & GetReferralStatisticsResponseNonNullableFields>;
|
|
874
|
-
declare function queryReferringCustomerTotals(httpClient: HttpClient$2): (options?: QueryReferringCustomerTotalsOptions) => Promise<QueryReferringCustomerTotalsResponse & QueryReferringCustomerTotalsResponseNonNullableFields>;
|
|
875
|
-
declare function queryReferredFriendActions(httpClient: HttpClient$2): (options?: QueryReferredFriendActionsOptions) => Promise<QueryReferredFriendActionsResponse & QueryReferredFriendActionsResponseNonNullableFields>;
|
|
876
|
-
declare const onReferralEventCreated: EventDefinition$2<ReferralEventCreatedEnvelope, "wix.loyalty.referral.v1.referral_event_created">;
|
|
3313
|
+
declare function queryReferralRewards(httpClient: HttpClient$2): (query: CursorQuery$2, options?: QueryReferralRewardsOptions) => Promise<QueryReferralRewardsResponse & QueryReferralRewardsResponseNonNullableFields>;
|
|
877
3314
|
|
|
3315
|
+
type index_d$2_BulkGetReferralRewardsRequest = BulkGetReferralRewardsRequest;
|
|
3316
|
+
type index_d$2_BulkGetReferralRewardsResponse = BulkGetReferralRewardsResponse;
|
|
878
3317
|
type index_d$2_Coupon = Coupon;
|
|
879
3318
|
type index_d$2_CouponDiscountTypeOptionsOneOf = CouponDiscountTypeOptionsOneOf;
|
|
880
3319
|
type index_d$2_CouponScope = CouponScope;
|
|
881
3320
|
type index_d$2_CouponScopeOrMinSubtotalOneOf = CouponScopeOrMinSubtotalOneOf;
|
|
882
|
-
type index_d$2_CreateReferralEventRequest = CreateReferralEventRequest;
|
|
883
|
-
type index_d$2_CreateReferralEventResponse = CreateReferralEventResponse;
|
|
884
3321
|
type index_d$2_DiscountType = DiscountType;
|
|
885
3322
|
declare const index_d$2_DiscountType: typeof DiscountType;
|
|
886
3323
|
type index_d$2_FixedAmountDiscount = FixedAmountDiscount;
|
|
887
|
-
type index_d$
|
|
888
|
-
type index_d$
|
|
889
|
-
type index_d$
|
|
890
|
-
type index_d$2_GetReferralStatisticsRequest = GetReferralStatisticsRequest;
|
|
891
|
-
type index_d$2_GetReferralStatisticsResponse = GetReferralStatisticsResponse;
|
|
892
|
-
type index_d$2_GetReferralStatisticsResponseNonNullableFields = GetReferralStatisticsResponseNonNullableFields;
|
|
3324
|
+
type index_d$2_GetReferralRewardRequest = GetReferralRewardRequest;
|
|
3325
|
+
type index_d$2_GetReferralRewardResponse = GetReferralRewardResponse;
|
|
3326
|
+
type index_d$2_GetReferralRewardResponseNonNullableFields = GetReferralRewardResponseNonNullableFields;
|
|
893
3327
|
type index_d$2_Group = Group;
|
|
894
3328
|
type index_d$2_LoyaltyPoints = LoyaltyPoints;
|
|
895
3329
|
type index_d$2_PercentageDiscount = PercentageDiscount;
|
|
896
|
-
type index_d$
|
|
897
|
-
type index_d$
|
|
898
|
-
type index_d$
|
|
899
|
-
type index_d$
|
|
900
|
-
type index_d$
|
|
901
|
-
type index_d$
|
|
902
|
-
type index_d$
|
|
903
|
-
type index_d$2_QueryReferringCustomerTotalsOptions = QueryReferringCustomerTotalsOptions;
|
|
904
|
-
type index_d$2_QueryReferringCustomerTotalsRequest = QueryReferringCustomerTotalsRequest;
|
|
905
|
-
type index_d$2_QueryReferringCustomerTotalsResponse = QueryReferringCustomerTotalsResponse;
|
|
906
|
-
type index_d$2_QueryReferringCustomerTotalsResponseNonNullableFields = QueryReferringCustomerTotalsResponseNonNullableFields;
|
|
907
|
-
type index_d$2_ReferralEvent = ReferralEvent;
|
|
908
|
-
type index_d$2_ReferralEventCreatedEnvelope = ReferralEventCreatedEnvelope;
|
|
909
|
-
type index_d$2_ReferralEventEventTypeOneOf = ReferralEventEventTypeOneOf;
|
|
910
|
-
type index_d$2_ReferralEventsQueryBuilder = ReferralEventsQueryBuilder;
|
|
911
|
-
type index_d$2_ReferralEventsQueryResult = ReferralEventsQueryResult;
|
|
912
|
-
type index_d$2_ReferredFriendAction = ReferredFriendAction;
|
|
913
|
-
type index_d$2_ReferredFriendActionEvent = ReferredFriendActionEvent;
|
|
914
|
-
type index_d$2_ReferredFriendActionRewardTypeOptionsOneOf = ReferredFriendActionRewardTypeOptionsOneOf;
|
|
915
|
-
type index_d$2_ReferredFriendSignupEvent = ReferredFriendSignupEvent;
|
|
916
|
-
type index_d$2_ReferringCustomerTotal = ReferringCustomerTotal;
|
|
3330
|
+
type index_d$2_QueryReferralRewardsOptions = QueryReferralRewardsOptions;
|
|
3331
|
+
type index_d$2_QueryReferralRewardsRequest = QueryReferralRewardsRequest;
|
|
3332
|
+
type index_d$2_QueryReferralRewardsResponse = QueryReferralRewardsResponse;
|
|
3333
|
+
type index_d$2_QueryReferralRewardsResponseNonNullableFields = QueryReferralRewardsResponseNonNullableFields;
|
|
3334
|
+
type index_d$2_ReferralReward = ReferralReward;
|
|
3335
|
+
type index_d$2_ReferralRewardReceiverOneOf = ReferralRewardReceiverOneOf;
|
|
3336
|
+
type index_d$2_ReferralRewardRewardTypeOptionsOneOf = ReferralRewardRewardTypeOptionsOneOf;
|
|
917
3337
|
type index_d$2_Reward = Reward;
|
|
918
|
-
|
|
919
|
-
type index_d$
|
|
920
|
-
|
|
921
|
-
type index_d$
|
|
922
|
-
type index_d$
|
|
3338
|
+
type index_d$2_RewardOptionsOneOf = RewardOptionsOneOf;
|
|
3339
|
+
type index_d$2_RewardTypeType = RewardTypeType;
|
|
3340
|
+
declare const index_d$2_RewardTypeType: typeof RewardTypeType;
|
|
3341
|
+
type index_d$2_RewardsInSite = RewardsInSite;
|
|
3342
|
+
type index_d$2_Type = Type;
|
|
3343
|
+
declare const index_d$2_Type: typeof Type;
|
|
923
3344
|
type index_d$2_V1Coupon = V1Coupon;
|
|
924
|
-
type index_d$
|
|
925
|
-
type index_d$
|
|
926
|
-
|
|
927
|
-
declare const index_d$
|
|
928
|
-
declare const index_d$
|
|
929
|
-
declare const index_d$2_queryReferralEvent: typeof queryReferralEvent;
|
|
930
|
-
declare const index_d$2_queryReferredFriendActions: typeof queryReferredFriendActions;
|
|
931
|
-
declare const index_d$2_queryReferringCustomerTotals: typeof queryReferringCustomerTotals;
|
|
3345
|
+
type index_d$2_V1LoyaltyPoints = V1LoyaltyPoints;
|
|
3346
|
+
type index_d$2_ValidateReferralRewardRequest = ValidateReferralRewardRequest;
|
|
3347
|
+
type index_d$2_ValidateReferralRewardResponse = ValidateReferralRewardResponse;
|
|
3348
|
+
declare const index_d$2_getReferralReward: typeof getReferralReward;
|
|
3349
|
+
declare const index_d$2_queryReferralRewards: typeof queryReferralRewards;
|
|
932
3350
|
declare namespace index_d$2 {
|
|
933
|
-
export { type ActionEvent$2 as ActionEvent, type
|
|
3351
|
+
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 };
|
|
934
3352
|
}
|
|
935
3353
|
|
|
936
3354
|
/** ReferredFriend is the main entity of ReferredFriends that can be used for lorem ipsum dolor */
|
|
@@ -2054,4 +4472,4 @@ declare namespace index_d {
|
|
|
2054
4472
|
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 };
|
|
2055
4473
|
}
|
|
2056
4474
|
|
|
2057
|
-
export { index_d as customers, index_d$1 as friends, index_d$2 as tracker };
|
|
4475
|
+
export { index_d as customers, index_d$1 as friends, index_d$4 as programs, index_d$2 as rewards, index_d$3 as tracker };
|