@wix/auto_sdk_online-programs_participants 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +70 -99
- package/build/cjs/index.js +447 -705
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +291 -911
- package/build/cjs/index.typings.js +358 -514
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +213 -752
- package/build/cjs/meta.js +277 -418
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +70 -99
- package/build/es/index.mjs +440 -682
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +291 -911
- package/build/es/index.typings.mjs +379 -523
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +213 -752
- package/build/es/meta.mjs +261 -390
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +70 -99
- package/build/internal/cjs/index.js +447 -705
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +291 -911
- package/build/internal/cjs/index.typings.js +358 -514
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +213 -752
- package/build/internal/cjs/meta.js +277 -418
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +70 -99
- package/build/internal/es/index.mjs +440 -682
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +291 -911
- package/build/internal/es/index.typings.mjs +379 -523
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +213 -752
- package/build/internal/es/meta.mjs +261 -390
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
import { NonNullablePaths } from '@wix/sdk-types';
|
|
2
2
|
|
|
3
|
-
interface Participant
|
|
4
|
-
paymentPendingOptions?: PaymentPendingOptions;
|
|
5
|
-
joinedOptions?: JoinedOptions;
|
|
6
|
-
completedOptions?: CompletedOptions;
|
|
7
|
-
failedOptions?: FailedOptions;
|
|
8
|
-
suspendedOptions?: SuspendedOptions;
|
|
9
|
-
/** options for auto removed participant */
|
|
10
|
-
autoRemovedOptions?: AutoRemovedOptions;
|
|
3
|
+
interface Participant {
|
|
11
4
|
/**
|
|
12
5
|
* Participant ID.
|
|
13
6
|
* @format GUID
|
|
@@ -41,18 +34,16 @@ interface Participant extends ParticipantStateOptionsOneOf {
|
|
|
41
34
|
state?: StateWithLiterals;
|
|
42
35
|
/** Certificate issued to participant */
|
|
43
36
|
certificate?: Certificate;
|
|
37
|
+
/** @readonly */
|
|
38
|
+
paymentInfo?: PaymentInfo;
|
|
39
|
+
/** @readonly */
|
|
40
|
+
joinedInfo?: JoinedInfo;
|
|
41
|
+
/** @readonly */
|
|
42
|
+
member?: Member;
|
|
43
|
+
/** @readonly */
|
|
44
|
+
lastActivityDate?: Date | null;
|
|
44
45
|
extendedFields?: ExtendedFields;
|
|
45
46
|
}
|
|
46
|
-
/** @oneof */
|
|
47
|
-
interface ParticipantStateOptionsOneOf {
|
|
48
|
-
paymentPendingOptions?: PaymentPendingOptions;
|
|
49
|
-
joinedOptions?: JoinedOptions;
|
|
50
|
-
completedOptions?: CompletedOptions;
|
|
51
|
-
failedOptions?: FailedOptions;
|
|
52
|
-
suspendedOptions?: SuspendedOptions;
|
|
53
|
-
/** options for auto removed participant */
|
|
54
|
-
autoRemovedOptions?: AutoRemovedOptions;
|
|
55
|
-
}
|
|
56
47
|
declare enum JoinPath {
|
|
57
48
|
UNKNOWN_JOIN_PATH = "UNKNOWN_JOIN_PATH",
|
|
58
49
|
/** Member joined to the program for free */
|
|
@@ -68,16 +59,6 @@ declare enum JoinPath {
|
|
|
68
59
|
}
|
|
69
60
|
/** @enumType */
|
|
70
61
|
type JoinPathWithLiterals = JoinPath | 'UNKNOWN_JOIN_PATH' | 'FREE' | 'ADDED' | 'SINGLE_PAYMENT' | 'PAID_PLAN' | 'FREE_COUPON';
|
|
71
|
-
interface SinglePaymentOptions {
|
|
72
|
-
orderId?: string;
|
|
73
|
-
}
|
|
74
|
-
interface PaidPlanOptions {
|
|
75
|
-
/** @maxSize 10 */
|
|
76
|
-
planIds?: string[];
|
|
77
|
-
}
|
|
78
|
-
interface FreeCouponOptions {
|
|
79
|
-
couponId?: string;
|
|
80
|
-
}
|
|
81
62
|
interface Progress {
|
|
82
63
|
/** Number of program steps completed by member */
|
|
83
64
|
totalStepsCompleted?: number;
|
|
@@ -92,11 +73,6 @@ interface Progress {
|
|
|
92
73
|
declare enum State {
|
|
93
74
|
/** Unknown state */
|
|
94
75
|
UNKNOWN_STATE = "UNKNOWN_STATE",
|
|
95
|
-
/** Member invited to participate in program */
|
|
96
|
-
INVITED = "INVITED",
|
|
97
|
-
/** Member asked owner to participate in program */
|
|
98
|
-
APPROVAL_PENDING = "APPROVAL_PENDING",
|
|
99
|
-
PAYMENT_PENDING = "PAYMENT_PENDING",
|
|
100
76
|
/** Member joined the program and became participant */
|
|
101
77
|
JOINED = "JOINED",
|
|
102
78
|
/** Participant completed the program, and could join again */
|
|
@@ -106,10 +82,14 @@ declare enum State {
|
|
|
106
82
|
/** Participant with ended pricing plan (PP), will be joined as renew PP */
|
|
107
83
|
SUSPENDED = "SUSPENDED",
|
|
108
84
|
/** Participant removed automatically after some program condition */
|
|
109
|
-
AUTO_REMOVED = "AUTO_REMOVED"
|
|
85
|
+
AUTO_REMOVED = "AUTO_REMOVED",
|
|
86
|
+
/** Participant removed by site owner */
|
|
87
|
+
REMOVED = "REMOVED",
|
|
88
|
+
/** Participant left the program by himself */
|
|
89
|
+
LEFT = "LEFT"
|
|
110
90
|
}
|
|
111
91
|
/** @enumType */
|
|
112
|
-
type StateWithLiterals = State | 'UNKNOWN_STATE' | '
|
|
92
|
+
type StateWithLiterals = State | 'UNKNOWN_STATE' | 'JOINED' | 'COMPLETED' | 'FAILED' | 'SUSPENDED' | 'AUTO_REMOVED' | 'REMOVED' | 'LEFT';
|
|
113
93
|
interface Certificate {
|
|
114
94
|
/**
|
|
115
95
|
* when certificate was issued, UTC
|
|
@@ -117,6 +97,51 @@ interface Certificate {
|
|
|
117
97
|
*/
|
|
118
98
|
issuedDate?: Date | null;
|
|
119
99
|
}
|
|
100
|
+
interface PaymentInfo {
|
|
101
|
+
/** @format GUID */
|
|
102
|
+
paymentOrderId?: string | null;
|
|
103
|
+
/** @format GUID */
|
|
104
|
+
offlineTrxId?: string | null;
|
|
105
|
+
/** @format GUID */
|
|
106
|
+
paidPlanId?: string | null;
|
|
107
|
+
/** @format GUID */
|
|
108
|
+
freeCouponId?: string | null;
|
|
109
|
+
}
|
|
110
|
+
interface JoinedInfo {
|
|
111
|
+
/** @maxLength 50 */
|
|
112
|
+
timeZone?: string;
|
|
113
|
+
/** @format LOCAL_DATE */
|
|
114
|
+
startDate?: string;
|
|
115
|
+
joinPath?: JoinPathWithLiterals;
|
|
116
|
+
/** @format LOCAL_DATE */
|
|
117
|
+
finishDate?: string | null;
|
|
118
|
+
/** @readonly */
|
|
119
|
+
joinedAt?: Date | null;
|
|
120
|
+
}
|
|
121
|
+
interface Member {
|
|
122
|
+
/**
|
|
123
|
+
* @readonly
|
|
124
|
+
* @maxLength 100
|
|
125
|
+
*/
|
|
126
|
+
firstName?: string | null;
|
|
127
|
+
/**
|
|
128
|
+
* @readonly
|
|
129
|
+
* @maxLength 100
|
|
130
|
+
*/
|
|
131
|
+
lastName?: string | null;
|
|
132
|
+
/**
|
|
133
|
+
* @readonly
|
|
134
|
+
* @format EMAIL
|
|
135
|
+
*/
|
|
136
|
+
email?: string | null;
|
|
137
|
+
/** @format GUID */
|
|
138
|
+
contactId?: string;
|
|
139
|
+
/**
|
|
140
|
+
* @readonly
|
|
141
|
+
* @format WEB_URL
|
|
142
|
+
*/
|
|
143
|
+
profileImageUrl?: string | null;
|
|
144
|
+
}
|
|
120
145
|
interface ExtendedFields {
|
|
121
146
|
/**
|
|
122
147
|
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
@@ -128,158 +153,184 @@ interface ExtendedFields {
|
|
|
128
153
|
*/
|
|
129
154
|
namespaces?: Record<string, Record<string, any>>;
|
|
130
155
|
}
|
|
131
|
-
interface
|
|
132
|
-
/**
|
|
133
|
-
* Payment order
|
|
134
|
-
* @format GUID
|
|
135
|
-
*/
|
|
136
|
-
paymentOrderId?: string | null;
|
|
156
|
+
interface ParticipantAdded {
|
|
137
157
|
/**
|
|
138
|
-
*
|
|
158
|
+
* Program ID which participant was added
|
|
139
159
|
* @format GUID
|
|
140
160
|
*/
|
|
141
|
-
|
|
161
|
+
programId?: string;
|
|
142
162
|
/**
|
|
143
|
-
*
|
|
163
|
+
* Member ID of participant on site
|
|
144
164
|
* @format GUID
|
|
145
|
-
* @maxSize 10
|
|
146
165
|
*/
|
|
147
|
-
|
|
166
|
+
memberId?: string;
|
|
148
167
|
}
|
|
149
|
-
interface
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
freeCouponOptions?: FreeCouponOptions;
|
|
153
|
-
timeZone?: string;
|
|
154
|
-
/** @format LOCAL_DATE */
|
|
155
|
-
startDate?: string;
|
|
156
|
-
joinPath?: JoinPathWithLiterals;
|
|
168
|
+
interface CreateParticipantRequest {
|
|
169
|
+
/** Participant to create */
|
|
170
|
+
participant: Participant;
|
|
157
171
|
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
paidPlanOptions?: PaidPlanOptions;
|
|
162
|
-
freeCouponOptions?: FreeCouponOptions;
|
|
172
|
+
interface CreateParticipantResponse {
|
|
173
|
+
/** Created participant */
|
|
174
|
+
participant?: Participant;
|
|
163
175
|
}
|
|
164
|
-
interface
|
|
176
|
+
interface BulkCreateParticipantRequest {
|
|
165
177
|
/**
|
|
166
|
-
*
|
|
167
|
-
* @
|
|
178
|
+
* List of participants you want to create
|
|
179
|
+
* @minSize 1
|
|
180
|
+
* @maxSize 100
|
|
168
181
|
*/
|
|
169
|
-
|
|
182
|
+
participants: Participant[];
|
|
183
|
+
/** Whether to return entities in response or not. */
|
|
184
|
+
returnEntity?: boolean;
|
|
170
185
|
}
|
|
171
|
-
interface
|
|
186
|
+
interface BulkCreateParticipantResponse {
|
|
172
187
|
/**
|
|
173
|
-
*
|
|
174
|
-
* @
|
|
188
|
+
* Results of bulk action.
|
|
189
|
+
* @minSize 1
|
|
190
|
+
* @maxSize 100
|
|
175
191
|
*/
|
|
176
|
-
|
|
192
|
+
results?: BulkParticipantResult[];
|
|
193
|
+
/** Metadata about whole bulk action. */
|
|
194
|
+
bulkActionMetadata?: CommonBulkActionMetadata;
|
|
195
|
+
}
|
|
196
|
+
interface BulkParticipantResult {
|
|
197
|
+
/** Metadata of item. */
|
|
198
|
+
itemMetadata?: CommonItemMetadata;
|
|
199
|
+
/** Item itself (empty if return_entity in request is false). */
|
|
200
|
+
item?: Participant;
|
|
201
|
+
}
|
|
202
|
+
interface CommonItemMetadata {
|
|
203
|
+
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
|
|
204
|
+
_id?: string | null;
|
|
205
|
+
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
206
|
+
originalIndex?: number;
|
|
207
|
+
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
208
|
+
success?: boolean;
|
|
209
|
+
/** Details about the error in case of failure. */
|
|
210
|
+
error?: ApplicationError;
|
|
211
|
+
}
|
|
212
|
+
interface ApplicationError {
|
|
213
|
+
/** Error code. */
|
|
214
|
+
code?: string;
|
|
215
|
+
/** Description of the error. */
|
|
216
|
+
description?: string;
|
|
217
|
+
/** Data related to the error. */
|
|
218
|
+
data?: Record<string, any> | null;
|
|
219
|
+
}
|
|
220
|
+
interface CommonBulkActionMetadata {
|
|
221
|
+
/** Number of items that were successfully processed. */
|
|
222
|
+
totalSuccesses?: number;
|
|
223
|
+
/** Number of items that couldn't be processed. */
|
|
224
|
+
totalFailures?: number;
|
|
225
|
+
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
226
|
+
undetailedFailures?: number;
|
|
177
227
|
}
|
|
178
|
-
interface
|
|
228
|
+
interface BulkAddAllToProgramRequest {
|
|
179
229
|
/**
|
|
180
|
-
*
|
|
181
|
-
* @format
|
|
230
|
+
* Program to which bulk add participants.
|
|
231
|
+
* @format GUID
|
|
182
232
|
*/
|
|
183
|
-
|
|
184
|
-
}
|
|
185
|
-
interface AutoRemovedOptions {
|
|
233
|
+
programId: string;
|
|
186
234
|
/**
|
|
187
|
-
*
|
|
188
|
-
* @format
|
|
235
|
+
* Exclude site members.
|
|
236
|
+
* @format GUID
|
|
237
|
+
* @maxSize 100
|
|
189
238
|
*/
|
|
190
|
-
|
|
239
|
+
excludeMemberIds?: string[];
|
|
191
240
|
}
|
|
192
|
-
interface
|
|
241
|
+
interface BulkAddAllToProgramResponse {
|
|
193
242
|
/**
|
|
194
|
-
*
|
|
243
|
+
* Async infra job id which will process the request.
|
|
195
244
|
* @format GUID
|
|
196
245
|
*/
|
|
197
|
-
|
|
198
|
-
}
|
|
199
|
-
interface JoinProgramResponse {
|
|
200
|
-
/** Created participant with corresponding state */
|
|
201
|
-
participant?: Participant;
|
|
202
|
-
}
|
|
203
|
-
interface ParticipantJoined {
|
|
204
|
-
/** Joined participant */
|
|
205
|
-
participant?: Participant;
|
|
246
|
+
jobId?: string;
|
|
206
247
|
}
|
|
207
|
-
interface
|
|
248
|
+
interface DeleteParticipantRequest {
|
|
208
249
|
/**
|
|
209
|
-
*
|
|
250
|
+
* Participants to delete
|
|
210
251
|
* @format GUID
|
|
211
252
|
*/
|
|
212
253
|
participantId: string;
|
|
213
254
|
}
|
|
214
|
-
interface
|
|
215
|
-
/** existing participant */
|
|
216
|
-
participant?: Participant;
|
|
255
|
+
interface DeleteParticipantResponse {
|
|
217
256
|
}
|
|
218
|
-
interface
|
|
257
|
+
interface IssueCertificateRequest {
|
|
219
258
|
/**
|
|
220
|
-
* Participant
|
|
259
|
+
* Participant to get certificate
|
|
221
260
|
* @format GUID
|
|
222
261
|
*/
|
|
223
262
|
participantId: string;
|
|
224
263
|
}
|
|
225
|
-
interface
|
|
264
|
+
interface IssueCertificateResponse {
|
|
265
|
+
/** Updated participant */
|
|
266
|
+
participant?: Participant;
|
|
226
267
|
}
|
|
227
|
-
interface
|
|
228
|
-
/**
|
|
229
|
-
* Participant id who left
|
|
230
|
-
* @format GUID
|
|
231
|
-
*/
|
|
232
|
-
participantId?: string;
|
|
268
|
+
interface GetCompletionStatsRequest {
|
|
233
269
|
/**
|
|
234
|
-
*
|
|
270
|
+
* program id to get stats for
|
|
235
271
|
* @format GUID
|
|
236
272
|
*/
|
|
237
|
-
programId
|
|
273
|
+
programId: string;
|
|
274
|
+
}
|
|
275
|
+
interface GetCompletionStatsResponse {
|
|
276
|
+
/** Number of participants that completed the program */
|
|
277
|
+
completedAll?: number;
|
|
278
|
+
/** Percentage of participants that completed the program */
|
|
279
|
+
completionRate?: number;
|
|
280
|
+
}
|
|
281
|
+
interface GetPremiumStatsRequest {
|
|
282
|
+
}
|
|
283
|
+
interface GetPremiumStatsResponse {
|
|
284
|
+
/** True if site has Online Programs premium feature */
|
|
285
|
+
hasPremium?: boolean;
|
|
286
|
+
/** Count of active participants on the site */
|
|
287
|
+
activeParticipantsCount?: number;
|
|
288
|
+
/** Limit of active participants on a site without premium */
|
|
289
|
+
activeParticipantsLimit?: number;
|
|
290
|
+
}
|
|
291
|
+
interface GetParticipantRequest {
|
|
238
292
|
/**
|
|
239
|
-
* Participant
|
|
293
|
+
* Participant id to fetch
|
|
240
294
|
* @format GUID
|
|
241
295
|
*/
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
/** Default for backward compatibility */
|
|
248
|
-
UNKNOWN_REMOVAL_REASON = "UNKNOWN_REMOVAL_REASON",
|
|
249
|
-
/** User-initiated leave */
|
|
250
|
-
LEGITIMATE_LEAVE = "LEGITIMATE_LEAVE",
|
|
251
|
-
/** Cleanup during rejoin flow */
|
|
252
|
-
CLEANUP_FOR_REJOIN = "CLEANUP_FOR_REJOIN",
|
|
253
|
-
/** Cleanup during manual addition */
|
|
254
|
-
CLEANUP_FOR_MANUAL_ADD = "CLEANUP_FOR_MANUAL_ADD"
|
|
296
|
+
participantId: string;
|
|
297
|
+
}
|
|
298
|
+
interface GetParticipantResponse {
|
|
299
|
+
/** existing participant */
|
|
300
|
+
participant?: Participant;
|
|
255
301
|
}
|
|
256
|
-
/** @enumType */
|
|
257
|
-
type RemovalReasonWithLiterals = RemovalReason | 'UNKNOWN_REMOVAL_REASON' | 'LEGITIMATE_LEAVE' | 'CLEANUP_FOR_REJOIN' | 'CLEANUP_FOR_MANUAL_ADD';
|
|
258
302
|
interface QueryParticipantsRequest {
|
|
259
303
|
/** Platformized query */
|
|
260
304
|
query?: CursorQuery;
|
|
261
305
|
}
|
|
262
306
|
interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
263
|
-
/**
|
|
307
|
+
/**
|
|
308
|
+
* Cursor paging options.
|
|
309
|
+
*
|
|
310
|
+
* Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
|
|
311
|
+
*/
|
|
264
312
|
cursorPaging?: CursorPaging;
|
|
265
313
|
/**
|
|
266
|
-
* Filter object
|
|
267
|
-
*
|
|
268
|
-
*
|
|
269
|
-
* "fieldName2":{"$operator":"value2"}
|
|
270
|
-
* }`
|
|
271
|
-
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
314
|
+
* Filter object.
|
|
315
|
+
*
|
|
316
|
+
* Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).
|
|
272
317
|
*/
|
|
273
318
|
filter?: Record<string, any> | null;
|
|
274
319
|
/**
|
|
275
|
-
* Sort object
|
|
276
|
-
*
|
|
320
|
+
* Sort object.
|
|
321
|
+
*
|
|
322
|
+
* Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).
|
|
323
|
+
* @maxSize 5
|
|
277
324
|
*/
|
|
278
325
|
sort?: Sorting[];
|
|
279
326
|
}
|
|
280
327
|
/** @oneof */
|
|
281
328
|
interface CursorQueryPagingMethodOneOf {
|
|
282
|
-
/**
|
|
329
|
+
/**
|
|
330
|
+
* Cursor paging options.
|
|
331
|
+
*
|
|
332
|
+
* Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
|
|
333
|
+
*/
|
|
283
334
|
cursorPaging?: CursorPaging;
|
|
284
335
|
}
|
|
285
336
|
interface Sorting {
|
|
@@ -299,16 +350,16 @@ declare enum SortOrder {
|
|
|
299
350
|
type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
300
351
|
interface CursorPaging {
|
|
301
352
|
/**
|
|
302
|
-
*
|
|
353
|
+
* Maximum number of items to return in the results.
|
|
303
354
|
* @max 100
|
|
304
355
|
*/
|
|
305
356
|
limit?: number | null;
|
|
306
357
|
/**
|
|
307
358
|
* Pointer to the next or previous page in the list of results.
|
|
308
359
|
*
|
|
309
|
-
*
|
|
310
|
-
* from the `pagingMetadata` object in the previous call's response.
|
|
360
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
311
361
|
* Not relevant for the first request.
|
|
362
|
+
* @maxLength 16000
|
|
312
363
|
*/
|
|
313
364
|
cursor?: string | null;
|
|
314
365
|
}
|
|
@@ -319,525 +370,35 @@ interface QueryParticipantsResponse {
|
|
|
319
370
|
pagingMetadata?: CursorPagingMetadata;
|
|
320
371
|
}
|
|
321
372
|
interface CursorPagingMetadata {
|
|
322
|
-
/** Number of items returned in
|
|
373
|
+
/** Number of items returned in current page. */
|
|
323
374
|
count?: number | null;
|
|
324
|
-
/**
|
|
375
|
+
/** Cursor strings that point to the next page, previous page, or both. */
|
|
325
376
|
cursors?: Cursors;
|
|
326
377
|
/**
|
|
327
|
-
*
|
|
328
|
-
*
|
|
329
|
-
*
|
|
378
|
+
* Whether there are more pages to retrieve following the current page.
|
|
379
|
+
*
|
|
380
|
+
* + `true`: Another page of results can be retrieved.
|
|
381
|
+
* + `false`: This is the last page.
|
|
330
382
|
*/
|
|
331
383
|
hasNext?: boolean | null;
|
|
332
384
|
}
|
|
333
385
|
interface Cursors {
|
|
334
|
-
/** Cursor pointing to next page in the list of results. */
|
|
335
|
-
next?: string | null;
|
|
336
|
-
/** Cursor pointing to previous page in the list of results. */
|
|
337
|
-
prev?: string | null;
|
|
338
|
-
}
|
|
339
|
-
interface GetAccessStatusRequest {
|
|
340
|
-
}
|
|
341
|
-
interface GetAccessStatusResponse {
|
|
342
|
-
/** True if participants cannot access online programs due to some limitations */
|
|
343
|
-
isBlocked?: boolean;
|
|
344
|
-
}
|
|
345
|
-
interface ApplyCouponRequest {
|
|
346
|
-
/** @format GUID */
|
|
347
|
-
participantId: string;
|
|
348
|
-
/** @format GUID */
|
|
349
|
-
orderId: string;
|
|
350
|
-
couponCode: string;
|
|
351
|
-
}
|
|
352
|
-
interface ApplyCouponResponse {
|
|
353
|
-
/** @format GUID */
|
|
354
|
-
couponId?: string;
|
|
355
|
-
subTotal?: number;
|
|
356
|
-
discount?: number;
|
|
357
|
-
total?: number;
|
|
358
|
-
}
|
|
359
|
-
interface RevertCouponRequest {
|
|
360
|
-
/** @format GUID */
|
|
361
|
-
participantId: string;
|
|
362
|
-
/** @format GUID */
|
|
363
|
-
orderId: string;
|
|
364
|
-
/** @format GUID */
|
|
365
|
-
couponId: string;
|
|
366
|
-
}
|
|
367
|
-
interface RevertCouponResponse {
|
|
368
|
-
total?: number;
|
|
369
|
-
}
|
|
370
|
-
/** This webhook is triggered whenever a payment transaction is updated (including refunds) via specific [Wix Apps](https://dev.wix.com/api/rest/wix-payments/about-wix-payments). */
|
|
371
|
-
interface PaymentEvent extends PaymentEventEventOneOf {
|
|
372
|
-
/** `TRANSACTION_STATUS_CHANGED` event details. */
|
|
373
|
-
transactionStatusChangedEvent?: TransactionStatusChangedEvent;
|
|
374
|
-
/** `REFUND_STATUS_CHANGED` event details. */
|
|
375
|
-
refundStatusChangedEvent?: RefundStatusChangedEvent;
|
|
376
|
-
/**
|
|
377
|
-
* `RECURRING_PAYMENT_STATUS_CHANGED` event details.
|
|
378
|
-
* @deprecated `RECURRING_PAYMENT_STATUS_CHANGED` event details.
|
|
379
|
-
* @targetRemovalDate 2026-06-30
|
|
380
|
-
*/
|
|
381
|
-
recurringPaymentStatusChangedEvent?: RecurringPaymentStatusChangedEvent;
|
|
382
|
-
/** `TRANSACTION_UPDATED` event details. */
|
|
383
|
-
transactionUpdatedEvent?: TransactionUpdatedEvent;
|
|
384
|
-
/** `TRANSACTION_CREATED` event details. */
|
|
385
|
-
transactionCreatedEvent?: TransactionCreatedEvent;
|
|
386
|
-
/**
|
|
387
|
-
* Unique event ID.
|
|
388
|
-
* @format GUID
|
|
389
|
-
*/
|
|
390
|
-
_id?: string;
|
|
391
|
-
/** Event timestamp */
|
|
392
|
-
eventTime?: Date | null;
|
|
393
|
-
/**
|
|
394
|
-
* ID of the [Wix app](https://dev.wix.com/docs/rest/articles/getting-started/wix-business-solutions) that triggered this event.
|
|
395
|
-
* @maxLength 100
|
|
396
|
-
*/
|
|
397
|
-
wixAppId?: string;
|
|
398
|
-
/**
|
|
399
|
-
* Unique ID assigned to each Wix app in each site.
|
|
400
|
-
* @format GUID
|
|
401
|
-
*/
|
|
402
|
-
wixAppInstanceId?: string;
|
|
403
|
-
/** Event type. */
|
|
404
|
-
eventType?: EventTypeWithLiterals;
|
|
405
|
-
/**
|
|
406
|
-
* ID of Wix app that mediated between Wix Payments and the Wix app that triggered the event (if relevant).
|
|
407
|
-
* @maxLength 100
|
|
408
|
-
*/
|
|
409
|
-
managingWixAppId?: string | null;
|
|
410
|
-
}
|
|
411
|
-
/** @oneof */
|
|
412
|
-
interface PaymentEventEventOneOf {
|
|
413
|
-
/** `TRANSACTION_STATUS_CHANGED` event details. */
|
|
414
|
-
transactionStatusChangedEvent?: TransactionStatusChangedEvent;
|
|
415
|
-
/** `REFUND_STATUS_CHANGED` event details. */
|
|
416
|
-
refundStatusChangedEvent?: RefundStatusChangedEvent;
|
|
417
|
-
/**
|
|
418
|
-
* `RECURRING_PAYMENT_STATUS_CHANGED` event details.
|
|
419
|
-
* @deprecated `RECURRING_PAYMENT_STATUS_CHANGED` event details.
|
|
420
|
-
* @targetRemovalDate 2026-06-30
|
|
421
|
-
*/
|
|
422
|
-
recurringPaymentStatusChangedEvent?: RecurringPaymentStatusChangedEvent;
|
|
423
|
-
/** `TRANSACTION_UPDATED` event details. */
|
|
424
|
-
transactionUpdatedEvent?: TransactionUpdatedEvent;
|
|
425
|
-
/** `TRANSACTION_CREATED` event details. */
|
|
426
|
-
transactionCreatedEvent?: TransactionCreatedEvent;
|
|
427
|
-
}
|
|
428
|
-
declare enum EventType {
|
|
429
|
-
UNDEFINED = "UNDEFINED",
|
|
430
|
-
/** Fired when a transaction's status changes. */
|
|
431
|
-
TRANSACTION_STATUS_CHANGED = "TRANSACTION_STATUS_CHANGED",
|
|
432
|
-
/** Fired when a refund's status changes. */
|
|
433
|
-
REFUND_STATUS_CHANGED = "REFUND_STATUS_CHANGED",
|
|
434
|
-
/** Fired when a legacy subscription's status changes. */
|
|
435
|
-
RECURRING_PAYMENT_STATUS_CHANGED = "RECURRING_PAYMENT_STATUS_CHANGED",
|
|
436
|
-
/** Fired when a transaction is updated. */
|
|
437
|
-
TRANSACTION_UPDATED = "TRANSACTION_UPDATED",
|
|
438
|
-
/** Fired when a transaction is created. */
|
|
439
|
-
TRANSACTION_CREATED = "TRANSACTION_CREATED"
|
|
440
|
-
}
|
|
441
|
-
/** @enumType */
|
|
442
|
-
type EventTypeWithLiterals = EventType | 'UNDEFINED' | 'TRANSACTION_STATUS_CHANGED' | 'REFUND_STATUS_CHANGED' | 'RECURRING_PAYMENT_STATUS_CHANGED' | 'TRANSACTION_UPDATED' | 'TRANSACTION_CREATED';
|
|
443
|
-
interface TransactionStatusChangedEvent {
|
|
444
|
-
/** Order details (limited to 30 items). */
|
|
445
|
-
order?: Order;
|
|
446
|
-
/** New transaction details. */
|
|
447
|
-
transaction?: Transaction;
|
|
448
|
-
/** Previous transaction status. */
|
|
449
|
-
previousStatus?: TransactionStatusWithLiterals;
|
|
450
|
-
}
|
|
451
|
-
interface Order {
|
|
452
|
-
_id?: string;
|
|
453
|
-
/** Wix app order ID */
|
|
454
|
-
wixAppOrderId?: string;
|
|
455
|
-
/** Wix app buyer ID */
|
|
456
|
-
wixAppBuyerId?: string | null;
|
|
457
|
-
/** Items included in the order */
|
|
458
|
-
items?: OrderItem[];
|
|
459
|
-
/**
|
|
460
|
-
* total number of items in order
|
|
461
|
-
* items_total_count > `items`.size if `items` doesn't contain all items
|
|
462
|
-
*/
|
|
463
|
-
itemsTotalCount?: number;
|
|
464
|
-
/** Additional charges to the order - e.g., tax, shipping or discount (optional) */
|
|
465
|
-
additionalCharges?: OrderAdditionalCharges;
|
|
466
|
-
/** Customer's shipping address (optional) */
|
|
467
|
-
shippingAddress?: Address;
|
|
468
|
-
/** Customer's shipping address details (optional) */
|
|
469
|
-
shippingAddressContacts?: FullAddressContactDetails;
|
|
470
|
-
/** Order creation date */
|
|
471
|
-
createdAt?: Date | null;
|
|
472
|
-
/** External data which is stored with the order */
|
|
473
|
-
externalData?: Record<string, string>;
|
|
474
|
-
/**
|
|
475
|
-
* Vertical invoice ID
|
|
476
|
-
* @maxLength 200
|
|
477
|
-
*/
|
|
478
|
-
verticalInvoiceId?: string | null;
|
|
479
|
-
/** the part of total amount taken by platform from the amount sent to merchant */
|
|
480
|
-
platformFee?: number | null;
|
|
481
|
-
}
|
|
482
|
-
/** Item included in order */
|
|
483
|
-
interface OrderItem {
|
|
484
|
-
/** Order item ID (required) */
|
|
485
|
-
_id?: string;
|
|
486
|
-
/** Order item name (required) */
|
|
487
|
-
name?: string;
|
|
488
|
-
/** Quantity (required) */
|
|
489
|
-
quantity?: number;
|
|
490
|
-
/** Total price charged for this item in the order - quantity * price (required) */
|
|
491
|
-
price?: number;
|
|
492
|
-
/** Order item description */
|
|
493
|
-
description?: string;
|
|
494
|
-
/** Weight of one item */
|
|
495
|
-
weightInKg?: number;
|
|
496
|
-
/** Whether the item is a physical a digital product */
|
|
497
|
-
category?: OrderItemCategoryWithLiterals;
|
|
498
|
-
}
|
|
499
|
-
/** Order item type */
|
|
500
|
-
declare enum OrderItemCategory {
|
|
501
|
-
UNDEFINED = "UNDEFINED",
|
|
502
|
-
/** Physical product */
|
|
503
|
-
PHYSICAL = "PHYSICAL",
|
|
504
|
-
/** Digital product */
|
|
505
|
-
DIGITAL = "DIGITAL"
|
|
506
|
-
}
|
|
507
|
-
/** @enumType */
|
|
508
|
-
type OrderItemCategoryWithLiterals = OrderItemCategory | 'UNDEFINED' | 'PHYSICAL' | 'DIGITAL';
|
|
509
|
-
/** Describing any additional charges in the order. They are not required, but can't be added later. */
|
|
510
|
-
interface OrderAdditionalCharges {
|
|
511
|
-
/** Absolute taxes charged to the order */
|
|
512
|
-
tax?: number;
|
|
513
|
-
/** Shipping cost charged to the order */
|
|
514
|
-
shipping?: number;
|
|
515
|
-
/** Discount amount applied to the order */
|
|
516
|
-
discount?: number;
|
|
517
|
-
/** Application fee */
|
|
518
|
-
applicationFee?: number;
|
|
519
|
-
}
|
|
520
|
-
/** Physical address */
|
|
521
|
-
interface Address extends AddressStreetOneOf {
|
|
522
|
-
/** Street name and number. */
|
|
523
|
-
streetAddress?: StreetAddress;
|
|
524
|
-
/** Main address line, usually street and number as free text. */
|
|
525
|
-
addressLine1?: string | null;
|
|
526
|
-
/**
|
|
527
|
-
* Country code.
|
|
528
|
-
* @format COUNTRY
|
|
529
|
-
*/
|
|
530
|
-
country?: string | null;
|
|
531
|
-
/** Subdivision shorthand. Usually, a short code (2 or 3 letters) that represents a state, region, prefecture, or province. e.g. NY */
|
|
532
|
-
subdivision?: string | null;
|
|
533
|
-
/** City name. */
|
|
534
|
-
city?: string | null;
|
|
535
|
-
/** Zip/postal code. */
|
|
536
|
-
postalCode?: string | null;
|
|
537
|
-
/** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */
|
|
538
|
-
addressLine2?: string | null;
|
|
539
|
-
}
|
|
540
|
-
/** @oneof */
|
|
541
|
-
interface AddressStreetOneOf {
|
|
542
|
-
/** Street name and number. */
|
|
543
|
-
streetAddress?: StreetAddress;
|
|
544
|
-
/** Main address line, usually street and number as free text. */
|
|
545
|
-
addressLine?: string | null;
|
|
546
|
-
}
|
|
547
|
-
interface StreetAddress {
|
|
548
|
-
/** Street number. */
|
|
549
|
-
number?: string;
|
|
550
|
-
/** Street name. */
|
|
551
|
-
name?: string;
|
|
552
|
-
}
|
|
553
|
-
interface AddressLocation {
|
|
554
|
-
/** Address latitude. */
|
|
555
|
-
latitude?: number | null;
|
|
556
|
-
/** Address longitude. */
|
|
557
|
-
longitude?: number | null;
|
|
558
|
-
}
|
|
559
|
-
interface Subdivision {
|
|
560
|
-
/** Short subdivision code. */
|
|
561
|
-
code?: string;
|
|
562
|
-
/** Subdivision full name. */
|
|
563
|
-
name?: string;
|
|
564
|
-
}
|
|
565
|
-
declare enum SubdivisionType {
|
|
566
|
-
UNKNOWN_SUBDIVISION_TYPE = "UNKNOWN_SUBDIVISION_TYPE",
|
|
567
|
-
/** State */
|
|
568
|
-
ADMINISTRATIVE_AREA_LEVEL_1 = "ADMINISTRATIVE_AREA_LEVEL_1",
|
|
569
|
-
/** County */
|
|
570
|
-
ADMINISTRATIVE_AREA_LEVEL_2 = "ADMINISTRATIVE_AREA_LEVEL_2",
|
|
571
|
-
/** City/town */
|
|
572
|
-
ADMINISTRATIVE_AREA_LEVEL_3 = "ADMINISTRATIVE_AREA_LEVEL_3",
|
|
573
|
-
/** Neighborhood/quarter */
|
|
574
|
-
ADMINISTRATIVE_AREA_LEVEL_4 = "ADMINISTRATIVE_AREA_LEVEL_4",
|
|
575
|
-
/** Street/block */
|
|
576
|
-
ADMINISTRATIVE_AREA_LEVEL_5 = "ADMINISTRATIVE_AREA_LEVEL_5",
|
|
577
|
-
/** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */
|
|
578
|
-
COUNTRY = "COUNTRY"
|
|
579
|
-
}
|
|
580
|
-
/** @enumType */
|
|
581
|
-
type SubdivisionTypeWithLiterals = SubdivisionType | 'UNKNOWN_SUBDIVISION_TYPE' | 'ADMINISTRATIVE_AREA_LEVEL_1' | 'ADMINISTRATIVE_AREA_LEVEL_2' | 'ADMINISTRATIVE_AREA_LEVEL_3' | 'ADMINISTRATIVE_AREA_LEVEL_4' | 'ADMINISTRATIVE_AREA_LEVEL_5' | 'COUNTRY';
|
|
582
|
-
/** Subdivision Concordance values */
|
|
583
|
-
interface StandardDetails {
|
|
584
|
-
/**
|
|
585
|
-
* subdivision iso-3166-2 code according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). e.g. US-NY, GB-SCT, NO-30
|
|
586
|
-
* @maxLength 20
|
|
587
|
-
*/
|
|
588
|
-
iso31662?: string | null;
|
|
589
|
-
}
|
|
590
|
-
/** Full contact details for an address */
|
|
591
|
-
interface FullAddressContactDetails {
|
|
592
|
-
/** Contact's first name. */
|
|
593
|
-
firstName?: string | null;
|
|
594
|
-
/** Contact's last name. */
|
|
595
|
-
lastName?: string | null;
|
|
596
|
-
/**
|
|
597
|
-
* Contact's phone number.
|
|
598
|
-
* @format PHONE
|
|
599
|
-
*/
|
|
600
|
-
phone?: string | null;
|
|
601
|
-
/** Contact's company name. */
|
|
602
|
-
company?: string | null;
|
|
603
|
-
/**
|
|
604
|
-
* Email associated with the address.
|
|
605
|
-
* @format EMAIL
|
|
606
|
-
*/
|
|
607
|
-
email?: string | null;
|
|
608
|
-
/** Tax info. Currently usable only in Brazil. */
|
|
609
|
-
vatId?: VatId;
|
|
610
|
-
}
|
|
611
|
-
interface VatId {
|
|
612
|
-
/** Customer's tax ID. */
|
|
613
|
-
_id?: string;
|
|
614
386
|
/**
|
|
615
|
-
*
|
|
616
|
-
*
|
|
617
|
-
* Supported values:
|
|
618
|
-
* + `CPF`: for individual tax payers
|
|
619
|
-
* + `CNPJ`: for corporations
|
|
620
|
-
*/
|
|
621
|
-
type?: VatTypeWithLiterals;
|
|
622
|
-
}
|
|
623
|
-
/** tax info types */
|
|
624
|
-
declare enum VatType {
|
|
625
|
-
UNSPECIFIED = "UNSPECIFIED",
|
|
626
|
-
/** CPF - for individual tax payers. */
|
|
627
|
-
CPF = "CPF",
|
|
628
|
-
/** CNPJ - for corporations */
|
|
629
|
-
CNPJ = "CNPJ"
|
|
630
|
-
}
|
|
631
|
-
/** @enumType */
|
|
632
|
-
type VatTypeWithLiterals = VatType | 'UNSPECIFIED' | 'CPF' | 'CNPJ';
|
|
633
|
-
interface Transaction extends TransactionPaymentMethodDataOneOf {
|
|
634
|
-
creditCardPaymentMethodData?: CreditCardPaymentMethodData;
|
|
635
|
-
/** Transaction ID */
|
|
636
|
-
_id?: string;
|
|
637
|
-
/** Provider transaction ID */
|
|
638
|
-
providerTransactionId?: string | null;
|
|
639
|
-
/** Amount and currency of transaction */
|
|
640
|
-
amount?: CurrencyAmount;
|
|
641
|
-
/** Refunded amount and currency of transaction */
|
|
642
|
-
refundedAmount?: CurrencyAmount;
|
|
643
|
-
/** Updated transaction status */
|
|
644
|
-
status?: TransactionStatusWithLiterals;
|
|
645
|
-
/** Reason provided for status change */
|
|
646
|
-
reasonCode?: string | null;
|
|
647
|
-
/** Payment method */
|
|
648
|
-
paymentMethod?: string;
|
|
649
|
-
/** Payment service provider */
|
|
650
|
-
paymentProvider?: string;
|
|
651
|
-
/** Customer's billing address (optional) */
|
|
652
|
-
billingAddress?: Address;
|
|
653
|
-
/** Customer's billing address - contact details (optional) */
|
|
654
|
-
billingAddressContacts?: FullAddressContactDetails;
|
|
655
|
-
/** Details of subscription, which (if) the transaction is a part of */
|
|
656
|
-
recurringPaymentDetails?: RecurringPaymentDetails;
|
|
657
|
-
/** The details of a payment method account. */
|
|
658
|
-
paymentMethodAccountInfo?: AccountInfo;
|
|
659
|
-
/** Transaction creation date */
|
|
660
|
-
createdAt?: Date | null;
|
|
661
|
-
/** Total number of installments */
|
|
662
|
-
installments?: number;
|
|
663
|
-
/** Scheduled action for this transaction */
|
|
664
|
-
scheduledAction?: ScheduledAction;
|
|
665
|
-
/**
|
|
666
|
-
* order id associated with the transaction on the vertical side
|
|
667
|
-
* @minLength 1
|
|
668
|
-
* @maxLength 100
|
|
387
|
+
* Cursor string pointing to the next page in the list of results.
|
|
388
|
+
* @maxLength 16000
|
|
669
389
|
*/
|
|
670
|
-
|
|
671
|
-
}
|
|
672
|
-
/** @oneof */
|
|
673
|
-
interface TransactionPaymentMethodDataOneOf {
|
|
674
|
-
creditCardPaymentMethodData?: CreditCardPaymentMethodData;
|
|
675
|
-
}
|
|
676
|
-
interface CurrencyAmount {
|
|
677
|
-
/** Amount */
|
|
678
|
-
amount?: number;
|
|
679
|
-
currency?: string;
|
|
680
|
-
}
|
|
681
|
-
declare enum TransactionStatus {
|
|
682
|
-
UNDEFINED = "UNDEFINED",
|
|
683
|
-
APPROVED = "APPROVED",
|
|
684
|
-
PENDING = "PENDING",
|
|
685
|
-
PENDING_MERCHANT = "PENDING_MERCHANT",
|
|
686
|
-
CANCELED = "CANCELED",
|
|
687
|
-
DECLINED = "DECLINED",
|
|
688
|
-
REFUNDED = "REFUNDED",
|
|
689
|
-
PARTIALLY_REFUNDED = "PARTIALLY_REFUNDED",
|
|
690
|
-
AUTHORIZED = "AUTHORIZED",
|
|
691
|
-
VOIDED = "VOIDED"
|
|
692
|
-
}
|
|
693
|
-
/** @enumType */
|
|
694
|
-
type TransactionStatusWithLiterals = TransactionStatus | 'UNDEFINED' | 'APPROVED' | 'PENDING' | 'PENDING_MERCHANT' | 'CANCELED' | 'DECLINED' | 'REFUNDED' | 'PARTIALLY_REFUNDED' | 'AUTHORIZED' | 'VOIDED';
|
|
695
|
-
interface RecurringPaymentDetails {
|
|
696
|
-
/** Current cycle number (Recurring payments only) */
|
|
697
|
-
cycleNumber?: number;
|
|
698
|
-
}
|
|
699
|
-
interface CreditCardPaymentMethodData {
|
|
700
|
-
/** Card issuing network */
|
|
701
|
-
network?: string;
|
|
702
|
-
/** Card number with only bin and last4 positions showed (non-PCI data) */
|
|
703
|
-
maskedCreditCard?: string;
|
|
704
|
-
/** Card holder's full name specified on the card. */
|
|
705
|
-
holderName?: string;
|
|
706
|
-
/** Card expiration month. */
|
|
707
|
-
expiryMonth?: string;
|
|
708
|
-
/**
|
|
709
|
-
* Card expiration year.
|
|
710
|
-
* @minLength 4
|
|
711
|
-
* @maxLength 4
|
|
712
|
-
*/
|
|
713
|
-
expiryYear?: string | null;
|
|
714
|
-
/**
|
|
715
|
-
* Card last 4 digits.
|
|
716
|
-
* @minLength 4
|
|
717
|
-
* @maxLength 4
|
|
718
|
-
*/
|
|
719
|
-
lastFourDigits?: string | null;
|
|
720
|
-
/**
|
|
721
|
-
* Card BIN (Bank Identification Number). It's the first 4-8 digits of a card number.
|
|
722
|
-
* @minLength 4
|
|
723
|
-
* @maxLength 8
|
|
724
|
-
*/
|
|
725
|
-
bin?: string | null;
|
|
726
|
-
}
|
|
727
|
-
interface AccountInfo {
|
|
390
|
+
next?: string | null;
|
|
728
391
|
/**
|
|
729
|
-
*
|
|
730
|
-
* @
|
|
392
|
+
* Cursor pointing to the previous page in the list of results.
|
|
393
|
+
* @maxLength 16000
|
|
731
394
|
*/
|
|
732
|
-
|
|
733
|
-
}
|
|
734
|
-
interface ScheduledAction {
|
|
735
|
-
/** type of the action */
|
|
736
|
-
type?: ScheduledActionTypeWithLiterals;
|
|
737
|
-
/** the date and time of the action */
|
|
738
|
-
executionDate?: Date | null;
|
|
739
|
-
}
|
|
740
|
-
declare enum ScheduledActionType {
|
|
741
|
-
VOID = "VOID",
|
|
742
|
-
CAPTURE = "CAPTURE"
|
|
743
|
-
}
|
|
744
|
-
/** @enumType */
|
|
745
|
-
type ScheduledActionTypeWithLiterals = ScheduledActionType | 'VOID' | 'CAPTURE';
|
|
746
|
-
interface RefundStatusChangedEvent {
|
|
747
|
-
/** Order details (limited to 30 items). */
|
|
748
|
-
order?: Order;
|
|
749
|
-
/** Updated transaction details. */
|
|
750
|
-
transaction?: Transaction;
|
|
751
|
-
/** Updated refund details. */
|
|
752
|
-
refund?: Refund;
|
|
753
|
-
/** Previous refund status. */
|
|
754
|
-
previousStatus?: RefundStatusWithLiterals;
|
|
755
|
-
}
|
|
756
|
-
interface Refund {
|
|
757
|
-
_id?: string;
|
|
758
|
-
/** Amount and currency of refund */
|
|
759
|
-
amount?: CurrencyAmount;
|
|
760
|
-
/** Updated refund status */
|
|
761
|
-
status?: RefundStatusWithLiterals;
|
|
762
|
-
/** Reason provided for status change */
|
|
763
|
-
reasonCode?: string | null;
|
|
764
|
-
/** Refund creation date */
|
|
765
|
-
createdAt?: Date | null;
|
|
766
|
-
}
|
|
767
|
-
declare enum RefundStatus {
|
|
768
|
-
UNDEFINED = "UNDEFINED",
|
|
769
|
-
APPROVED = "APPROVED",
|
|
770
|
-
PENDING = "PENDING",
|
|
771
|
-
DECLINED = "DECLINED"
|
|
772
|
-
}
|
|
773
|
-
/** @enumType */
|
|
774
|
-
type RefundStatusWithLiterals = RefundStatus | 'UNDEFINED' | 'APPROVED' | 'PENDING' | 'DECLINED';
|
|
775
|
-
interface RecurringPaymentStatusChangedEvent {
|
|
776
|
-
/** Order details(limited to 30 items). */
|
|
777
|
-
order?: Order;
|
|
778
|
-
/** Recurring payment status. */
|
|
779
|
-
status?: StatusWithLiterals;
|
|
780
|
-
/** Previous recurring payment status. */
|
|
781
|
-
previousStatus?: StatusWithLiterals;
|
|
782
|
-
/** Details of RecurringPayment cancellation (empty if `status` is not CANCELLED). */
|
|
783
|
-
cancellationDetails?: RecurringPaymentCancellationDetails;
|
|
784
|
-
}
|
|
785
|
-
declare enum Status {
|
|
786
|
-
UNDEFINED = "UNDEFINED",
|
|
787
|
-
PENDING = "PENDING",
|
|
788
|
-
ACTIVE = "ACTIVE",
|
|
789
|
-
CANCELLED = "CANCELLED",
|
|
790
|
-
FINISHED = "FINISHED",
|
|
791
|
-
SUSPENDED = "SUSPENDED"
|
|
792
|
-
}
|
|
793
|
-
/** @enumType */
|
|
794
|
-
type StatusWithLiterals = Status | 'UNDEFINED' | 'PENDING' | 'ACTIVE' | 'CANCELLED' | 'FINISHED' | 'SUSPENDED';
|
|
795
|
-
interface RecurringPaymentCancellationDetails {
|
|
796
|
-
/** Initiator of cancellation */
|
|
797
|
-
initiator?: InitiatorWithLiterals;
|
|
798
|
-
/** Successfully paid recurring cycles count before the cancellation */
|
|
799
|
-
paidRegularCycleCount?: number;
|
|
800
|
-
}
|
|
801
|
-
declare enum Initiator {
|
|
802
|
-
UNDEFINED = "UNDEFINED",
|
|
803
|
-
BUYER = "BUYER",
|
|
804
|
-
MERCHANT = "MERCHANT",
|
|
805
|
-
PAYMENT = "PAYMENT",
|
|
806
|
-
SETUP = "SETUP"
|
|
807
|
-
}
|
|
808
|
-
/** @enumType */
|
|
809
|
-
type InitiatorWithLiterals = Initiator | 'UNDEFINED' | 'BUYER' | 'MERCHANT' | 'PAYMENT' | 'SETUP';
|
|
810
|
-
interface TransactionUpdatedEvent {
|
|
811
|
-
/** Order details (limited to 30 items). */
|
|
812
|
-
order?: Order;
|
|
813
|
-
/** Updated transaction details. */
|
|
814
|
-
transaction?: Transaction;
|
|
815
|
-
/** Is event triggered by request to clean user data */
|
|
816
|
-
triggeredByAnonymizeRequest?: boolean | null;
|
|
817
|
-
}
|
|
818
|
-
interface TransactionCreatedEvent {
|
|
819
|
-
/** Order details (limited to 30 items). */
|
|
820
|
-
order?: Order;
|
|
821
|
-
/** Updated transaction details. */
|
|
822
|
-
transaction?: Transaction;
|
|
823
|
-
}
|
|
824
|
-
interface Empty {
|
|
825
|
-
}
|
|
826
|
-
interface OfflinePaymentSent {
|
|
827
|
-
/** Participant who started offline payment */
|
|
828
|
-
participant?: Participant;
|
|
829
|
-
}
|
|
830
|
-
interface PaymentFailed {
|
|
831
|
-
/** Participant whose payment was failed */
|
|
832
|
-
participant?: Participant;
|
|
395
|
+
prev?: string | null;
|
|
833
396
|
}
|
|
834
|
-
interface
|
|
835
|
-
/** Participant whose payment was confirmed */
|
|
836
|
-
participant?: Participant;
|
|
397
|
+
interface GetAccessStatusRequest {
|
|
837
398
|
}
|
|
838
|
-
interface
|
|
839
|
-
/**
|
|
840
|
-
|
|
399
|
+
interface GetAccessStatusResponse {
|
|
400
|
+
/** True if participants cannot access online programs due to some limitations */
|
|
401
|
+
isBlocked?: boolean;
|
|
841
402
|
}
|
|
842
403
|
interface DomainEvent extends DomainEventBodyOneOf {
|
|
843
404
|
createdEvent?: EntityCreatedEvent;
|
|
@@ -901,6 +462,8 @@ interface EntityDeletedEvent {
|
|
|
901
462
|
interface ActionEvent {
|
|
902
463
|
body?: string;
|
|
903
464
|
}
|
|
465
|
+
interface Empty {
|
|
466
|
+
}
|
|
904
467
|
interface BenefitNotification {
|
|
905
468
|
/**
|
|
906
469
|
* Plan unique ID
|
|
@@ -1112,14 +675,6 @@ interface ItemMetadata {
|
|
|
1112
675
|
/** Details about the error in case of failure. */
|
|
1113
676
|
error?: ApplicationError;
|
|
1114
677
|
}
|
|
1115
|
-
interface ApplicationError {
|
|
1116
|
-
/** Error code. */
|
|
1117
|
-
code?: string;
|
|
1118
|
-
/** Description of the error. */
|
|
1119
|
-
description?: string;
|
|
1120
|
-
/** Data related to the error. */
|
|
1121
|
-
data?: Record<string, any> | null;
|
|
1122
|
-
}
|
|
1123
678
|
interface BulkInviteToProgramResult {
|
|
1124
679
|
/** Invited participant metadata. */
|
|
1125
680
|
itemMetadata?: ItemMetadata;
|
|
@@ -1191,35 +746,6 @@ interface BulkAddToProgramResult {
|
|
|
1191
746
|
/** Added participant */
|
|
1192
747
|
item?: Participant;
|
|
1193
748
|
}
|
|
1194
|
-
interface ParticipantAdded {
|
|
1195
|
-
/**
|
|
1196
|
-
* Program ID which participant was added
|
|
1197
|
-
* @format GUID
|
|
1198
|
-
*/
|
|
1199
|
-
programId?: string;
|
|
1200
|
-
/**
|
|
1201
|
-
* Member ID of participant on site
|
|
1202
|
-
* @format GUID
|
|
1203
|
-
*/
|
|
1204
|
-
memberId?: string;
|
|
1205
|
-
}
|
|
1206
|
-
interface BulkAddAllToProgramRequest {
|
|
1207
|
-
/**
|
|
1208
|
-
* Program to which bulk add participants.
|
|
1209
|
-
* @format GUID
|
|
1210
|
-
*/
|
|
1211
|
-
programId: string;
|
|
1212
|
-
/**
|
|
1213
|
-
* Exclude site members.
|
|
1214
|
-
* @format GUID
|
|
1215
|
-
* @maxSize 100
|
|
1216
|
-
*/
|
|
1217
|
-
excludeMemberIds?: string[];
|
|
1218
|
-
}
|
|
1219
|
-
interface BulkAddAllToProgramResponse {
|
|
1220
|
-
/** Bulk action metadata. */
|
|
1221
|
-
bulkActionMetadata?: BulkActionMetadata;
|
|
1222
|
-
}
|
|
1223
749
|
interface BulkApproveParticipantRequest {
|
|
1224
750
|
/**
|
|
1225
751
|
* Participants to add
|
|
@@ -1279,61 +805,6 @@ interface BulkApproveAllParticipantResponse {
|
|
|
1279
805
|
*/
|
|
1280
806
|
jobId?: string;
|
|
1281
807
|
}
|
|
1282
|
-
interface DeleteParticipantRequest {
|
|
1283
|
-
/**
|
|
1284
|
-
* Participants to delete
|
|
1285
|
-
* @format GUID
|
|
1286
|
-
*/
|
|
1287
|
-
participantId: string;
|
|
1288
|
-
}
|
|
1289
|
-
interface DeleteParticipantResponse {
|
|
1290
|
-
}
|
|
1291
|
-
interface ParticipantRejected {
|
|
1292
|
-
/**
|
|
1293
|
-
* Program ID which participant rejected
|
|
1294
|
-
* @format GUID
|
|
1295
|
-
*/
|
|
1296
|
-
programId?: string;
|
|
1297
|
-
/**
|
|
1298
|
-
* Member ID of participant rejected
|
|
1299
|
-
* @format GUID
|
|
1300
|
-
*/
|
|
1301
|
-
memberId?: string;
|
|
1302
|
-
}
|
|
1303
|
-
interface IssueCertificateRequest {
|
|
1304
|
-
/**
|
|
1305
|
-
* Participant to get certificate
|
|
1306
|
-
* @format GUID
|
|
1307
|
-
*/
|
|
1308
|
-
participantId: string;
|
|
1309
|
-
}
|
|
1310
|
-
interface IssueCertificateResponse {
|
|
1311
|
-
/** Updated participant */
|
|
1312
|
-
participant?: Participant;
|
|
1313
|
-
}
|
|
1314
|
-
interface GetCompletionStatsRequest {
|
|
1315
|
-
/**
|
|
1316
|
-
* program id to get stats for
|
|
1317
|
-
* @format GUID
|
|
1318
|
-
*/
|
|
1319
|
-
programId: string;
|
|
1320
|
-
}
|
|
1321
|
-
interface GetCompletionStatsResponse {
|
|
1322
|
-
/** Number of participants that completed the program */
|
|
1323
|
-
completedAll?: number;
|
|
1324
|
-
/** Percentage of participants that completed the program */
|
|
1325
|
-
completionRate?: number;
|
|
1326
|
-
}
|
|
1327
|
-
interface GetPremiumStatsRequest {
|
|
1328
|
-
}
|
|
1329
|
-
interface GetPremiumStatsResponse {
|
|
1330
|
-
/** True if site has Online Programs premium feature */
|
|
1331
|
-
hasPremium?: boolean;
|
|
1332
|
-
/** Count of active participants on the site */
|
|
1333
|
-
activeParticipantsCount?: number;
|
|
1334
|
-
/** Limit of active participants on a site without premium */
|
|
1335
|
-
activeParticipantsLimit?: number;
|
|
1336
|
-
}
|
|
1337
808
|
interface ExportParticipantsStatsRequest {
|
|
1338
809
|
/**
|
|
1339
810
|
* program id to export data from
|
|
@@ -1406,45 +877,6 @@ interface EventMetadata extends BaseEventMetadata {
|
|
|
1406
877
|
*/
|
|
1407
878
|
entityEventSequence?: string | null;
|
|
1408
879
|
}
|
|
1409
|
-
interface ParticipantJoinedEnvelope {
|
|
1410
|
-
data: ParticipantJoined;
|
|
1411
|
-
metadata: EventMetadata;
|
|
1412
|
-
}
|
|
1413
|
-
/** @permissionScope Manage Challenges
|
|
1414
|
-
* @permissionScopeId SCOPE.CHALLENGES.MANAGE
|
|
1415
|
-
* @permissionId ONLINE_PROGRAMS.PARTICIPANT_READ
|
|
1416
|
-
* @webhook
|
|
1417
|
-
* @eventType wix.online_programs.v3.participant_participant_joined
|
|
1418
|
-
* @serviceIdentifier wix.onlineprograms.participants.v3.ParticipantsService
|
|
1419
|
-
* @slug participant_joined
|
|
1420
|
-
* @documentationMaturity preview
|
|
1421
|
-
*/
|
|
1422
|
-
declare function onParticipantJoined(handler: (event: ParticipantJoinedEnvelope) => void | Promise<void>): void;
|
|
1423
|
-
interface ParticipantLeftEnvelope {
|
|
1424
|
-
data: ParticipantLeft;
|
|
1425
|
-
metadata: EventMetadata;
|
|
1426
|
-
}
|
|
1427
|
-
/** @permissionScope Manage Challenges
|
|
1428
|
-
* @permissionScopeId SCOPE.CHALLENGES.MANAGE
|
|
1429
|
-
* @permissionId ONLINE_PROGRAMS.PARTICIPANT_READ
|
|
1430
|
-
* @webhook
|
|
1431
|
-
* @eventType wix.online_programs.v3.participant_participant_left
|
|
1432
|
-
* @serviceIdentifier wix.onlineprograms.participants.v3.ParticipantsService
|
|
1433
|
-
* @slug participant_left
|
|
1434
|
-
* @documentationMaturity preview
|
|
1435
|
-
*/
|
|
1436
|
-
declare function onParticipantLeft(handler: (event: ParticipantLeftEnvelope) => void | Promise<void>): void;
|
|
1437
|
-
interface ParticipantDeletedEnvelope {
|
|
1438
|
-
entity: Participant;
|
|
1439
|
-
metadata: EventMetadata;
|
|
1440
|
-
}
|
|
1441
|
-
/** @webhook
|
|
1442
|
-
* @eventType wix.online_programs.v3.participant_deleted
|
|
1443
|
-
* @serviceIdentifier wix.onlineprograms.participants.v3.ManageParticipantsService
|
|
1444
|
-
* @slug deleted
|
|
1445
|
-
* @documentationMaturity preview
|
|
1446
|
-
*/
|
|
1447
|
-
declare function onParticipantDeleted(handler: (event: ParticipantDeletedEnvelope) => void | Promise<void>): void;
|
|
1448
880
|
interface ParticipantAddedEnvelope {
|
|
1449
881
|
data: ParticipantAdded;
|
|
1450
882
|
metadata: EventMetadata;
|
|
@@ -1453,9 +885,8 @@ interface ParticipantAddedEnvelope {
|
|
|
1453
885
|
* @permissionScopeId SCOPE.CHALLENGES.MANAGE
|
|
1454
886
|
* @permissionId ONLINE_PROGRAMS.PARTICIPANT_READ
|
|
1455
887
|
* @webhook
|
|
1456
|
-
* @eventType wix.online_programs.v3.
|
|
1457
|
-
* @
|
|
1458
|
-
* @slug participant_added
|
|
888
|
+
* @eventType wix.online_programs.v3.participant_added
|
|
889
|
+
* @slug added
|
|
1459
890
|
* @documentationMaturity preview
|
|
1460
891
|
*/
|
|
1461
892
|
declare function onParticipantAdded(handler: (event: ParticipantAddedEnvelope) => void | Promise<void>): void;
|
|
@@ -1487,58 +918,105 @@ interface ParticipantInvitedEnvelope {
|
|
|
1487
918
|
* @documentationMaturity preview
|
|
1488
919
|
*/
|
|
1489
920
|
declare function onParticipantInvited(handler: (event: ParticipantInvitedEnvelope) => void | Promise<void>): void;
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
* @
|
|
1496
|
-
* @
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
*
|
|
921
|
+
/** @param participant - Participant to create
|
|
922
|
+
* @public
|
|
923
|
+
* @documentationMaturity preview
|
|
924
|
+
* @requiredField participant
|
|
925
|
+
* @permissionId ONLINE_PROGRAMS.PARTICIPANT_CREATE
|
|
926
|
+
* @returns Created participant
|
|
927
|
+
* @fqn wix.onlineprograms.participants.v3.ParticipantsService.CreateParticipant
|
|
928
|
+
*/
|
|
929
|
+
declare function createParticipant(participant: Participant): Promise<NonNullablePaths<Participant, `memberId` | `programId` | `progress.totalStepsCompleted` | `progress.totalStepsAvailable` | `progress.completionPercentage` | `state` | `joinedInfo.timeZone` | `joinedInfo.startDate` | `joinedInfo.joinPath` | `member.contactId`, 3>>;
|
|
930
|
+
/**
|
|
931
|
+
* Creates participants in bulk.
|
|
932
|
+
* @param participants - List of participants you want to create
|
|
933
|
+
* @public
|
|
1501
934
|
* @documentationMaturity preview
|
|
935
|
+
* @requiredField participants
|
|
936
|
+
* @permissionId ONLINE_PROGRAMS.PARTICIPANT_CREATE
|
|
937
|
+
* @fqn wix.onlineprograms.participants.v3.ParticipantsService.BulkCreateParticipant
|
|
1502
938
|
*/
|
|
1503
|
-
declare function
|
|
939
|
+
declare function bulkCreateParticipant(participants: Participant[], options?: BulkCreateParticipantOptions): Promise<NonNullablePaths<BulkCreateParticipantResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item.memberId` | `results.${number}.item.programId` | `results.${number}.item.progress.totalStepsCompleted` | `results.${number}.item.progress.totalStepsAvailable` | `results.${number}.item.progress.completionPercentage` | `results.${number}.item.state` | `results.${number}.item.joinedInfo.timeZone` | `results.${number}.item.joinedInfo.startDate` | `results.${number}.item.joinedInfo.joinPath` | `results.${number}.item.member.contactId` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6>>;
|
|
940
|
+
interface BulkCreateParticipantOptions {
|
|
941
|
+
/** Whether to return entities in response or not. */
|
|
942
|
+
returnEntity?: boolean;
|
|
943
|
+
}
|
|
1504
944
|
/**
|
|
1505
|
-
*
|
|
1506
|
-
*
|
|
1507
|
-
*
|
|
945
|
+
* Bulk adds all site members to program, but not more then 1000.
|
|
946
|
+
* Participant will be either created in state Joined, or updated to that state
|
|
947
|
+
* from pending one.
|
|
948
|
+
* @param programId - Program to which bulk add participants.
|
|
1508
949
|
* @public
|
|
1509
950
|
* @documentationMaturity preview
|
|
1510
951
|
* @requiredField programId
|
|
1511
|
-
* @permissionId ONLINE_PROGRAMS.
|
|
952
|
+
* @permissionId ONLINE_PROGRAMS.PARTICIPANT_ADD
|
|
1512
953
|
* @applicableIdentity APP
|
|
1513
|
-
* @
|
|
1514
|
-
|
|
954
|
+
* @fqn wix.onlineprograms.participants.v3.ParticipantsService.BulkAddAllToProgram
|
|
955
|
+
*/
|
|
956
|
+
declare function bulkAddAllToProgram(programId: string, options?: BulkAddAllToProgramOptions): Promise<NonNullablePaths<BulkAddAllToProgramResponse, `jobId`, 2>>;
|
|
957
|
+
interface BulkAddAllToProgramOptions {
|
|
958
|
+
/**
|
|
959
|
+
* Exclude site members.
|
|
960
|
+
* @format GUID
|
|
961
|
+
* @maxSize 100
|
|
962
|
+
*/
|
|
963
|
+
excludeMemberIds?: string[];
|
|
964
|
+
}
|
|
965
|
+
/**
|
|
966
|
+
* Delete participant from program. Removes participant from member
|
|
967
|
+
* group. Leaves him in Social Group.
|
|
968
|
+
* @param participantId - Participants to delete
|
|
969
|
+
* @public
|
|
970
|
+
* @documentationMaturity preview
|
|
971
|
+
* @requiredField participantId
|
|
972
|
+
* @permissionId ONLINE_PROGRAMS.PARTICIPANT_DELETE
|
|
973
|
+
* @fqn wix.onlineprograms.participants.v3.ParticipantsService.DeleteParticipant
|
|
1515
974
|
*/
|
|
1516
|
-
declare function
|
|
975
|
+
declare function deleteParticipant(participantId: string): Promise<void>;
|
|
1517
976
|
/**
|
|
1518
|
-
*
|
|
1519
|
-
* @param participantId - Participant
|
|
977
|
+
* Issue certificate by site admin
|
|
978
|
+
* @param participantId - Participant to get certificate
|
|
1520
979
|
* @public
|
|
1521
980
|
* @documentationMaturity preview
|
|
1522
981
|
* @requiredField participantId
|
|
1523
|
-
* @permissionId ONLINE_PROGRAMS.
|
|
982
|
+
* @permissionId ONLINE_PROGRAMS.PARTICIPANT_ISSUE_CERTIFICATE
|
|
1524
983
|
* @applicableIdentity APP
|
|
1525
|
-
* @
|
|
1526
|
-
|
|
1527
|
-
|
|
984
|
+
* @fqn wix.onlineprograms.participants.v3.ParticipantsService.IssueCertificate
|
|
985
|
+
*/
|
|
986
|
+
declare function issueCertificate(participantId: string): Promise<NonNullablePaths<IssueCertificateResponse, `participant.memberId` | `participant.programId` | `participant.progress.totalStepsCompleted` | `participant.progress.totalStepsAvailable` | `participant.progress.completionPercentage` | `participant.state` | `participant.joinedInfo.timeZone` | `participant.joinedInfo.startDate` | `participant.joinedInfo.joinPath` | `participant.member.contactId`, 4>>;
|
|
987
|
+
/**
|
|
988
|
+
* Get program's completion stats
|
|
989
|
+
* @param programId - program id to get stats for
|
|
990
|
+
* @public
|
|
991
|
+
* @documentationMaturity preview
|
|
992
|
+
* @requiredField programId
|
|
993
|
+
* @permissionId ONLINE_PROGRAMS.STATS_READ
|
|
994
|
+
* @applicableIdentity APP
|
|
995
|
+
* @fqn wix.onlineprograms.participants.v3.ParticipantsService.GetCompletionStats
|
|
996
|
+
*/
|
|
997
|
+
declare function getCompletionStats(programId: string): Promise<NonNullablePaths<GetCompletionStatsResponse, `completedAll` | `completionRate`, 2>>;
|
|
998
|
+
/**
|
|
999
|
+
* Get premium stats
|
|
1000
|
+
* @public
|
|
1001
|
+
* @documentationMaturity preview
|
|
1002
|
+
* @permissionId ONLINE_PROGRAMS.STATS_READ
|
|
1003
|
+
* @applicableIdentity APP
|
|
1004
|
+
* @fqn wix.onlineprograms.participants.v3.ParticipantsService.GetPremiumStats
|
|
1528
1005
|
*/
|
|
1529
|
-
declare function
|
|
1006
|
+
declare function getPremiumStats(): Promise<NonNullablePaths<GetPremiumStatsResponse, `hasPremium` | `activeParticipantsCount` | `activeParticipantsLimit`, 2>>;
|
|
1530
1007
|
/**
|
|
1531
|
-
*
|
|
1532
|
-
* @param participantId - Participant id to
|
|
1008
|
+
* Returns participant.
|
|
1009
|
+
* @param participantId - Participant id to fetch
|
|
1533
1010
|
* @public
|
|
1534
1011
|
* @documentationMaturity preview
|
|
1535
1012
|
* @requiredField participantId
|
|
1536
|
-
* @permissionId ONLINE_PROGRAMS.
|
|
1013
|
+
* @permissionId ONLINE_PROGRAMS.PARTICIPANT_READ
|
|
1537
1014
|
* @applicableIdentity APP
|
|
1538
1015
|
* @applicableIdentity MEMBER
|
|
1539
|
-
* @
|
|
1016
|
+
* @returns existing participant
|
|
1017
|
+
* @fqn wix.onlineprograms.participants.v3.ParticipantsService.GetParticipant
|
|
1540
1018
|
*/
|
|
1541
|
-
declare function
|
|
1019
|
+
declare function getParticipant(participantId: string): Promise<NonNullablePaths<Participant, `memberId` | `programId` | `progress.totalStepsCompleted` | `progress.totalStepsAvailable` | `progress.completionPercentage` | `state` | `joinedInfo.timeZone` | `joinedInfo.startDate` | `joinedInfo.joinPath` | `member.contactId`, 3>>;
|
|
1542
1020
|
/**
|
|
1543
1021
|
* Query existing participants
|
|
1544
1022
|
* @public
|
|
@@ -1572,32 +1050,32 @@ interface ParticipantsQueryBuilder {
|
|
|
1572
1050
|
* @param value - Value to compare against.
|
|
1573
1051
|
* @documentationMaturity preview
|
|
1574
1052
|
*/
|
|
1575
|
-
ge: (propertyName: '
|
|
1053
|
+
ge: (propertyName: 'joinedInfo.startDate', value: any) => ParticipantsQueryBuilder;
|
|
1576
1054
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
1577
1055
|
* @param value - Value to compare against.
|
|
1578
1056
|
* @documentationMaturity preview
|
|
1579
1057
|
*/
|
|
1580
|
-
gt: (propertyName: '
|
|
1058
|
+
gt: (propertyName: 'joinedInfo.startDate', value: any) => ParticipantsQueryBuilder;
|
|
1581
1059
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
1582
1060
|
* @param value - Value to compare against.
|
|
1583
1061
|
* @documentationMaturity preview
|
|
1584
1062
|
*/
|
|
1585
|
-
le: (propertyName: '
|
|
1063
|
+
le: (propertyName: 'joinedInfo.startDate', value: any) => ParticipantsQueryBuilder;
|
|
1586
1064
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
1587
1065
|
* @param value - Value to compare against.
|
|
1588
1066
|
* @documentationMaturity preview
|
|
1589
1067
|
*/
|
|
1590
|
-
lt: (propertyName: '
|
|
1068
|
+
lt: (propertyName: 'joinedInfo.startDate', value: any) => ParticipantsQueryBuilder;
|
|
1591
1069
|
/** @documentationMaturity preview */
|
|
1592
1070
|
in: (propertyName: '_id' | 'memberId' | 'state', value: any) => ParticipantsQueryBuilder;
|
|
1593
1071
|
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
1594
1072
|
* @documentationMaturity preview
|
|
1595
1073
|
*/
|
|
1596
|
-
ascending: (...propertyNames: Array<'
|
|
1074
|
+
ascending: (...propertyNames: Array<'_id' | '_createdDate' | 'state' | 'joinedInfo.startDate'>) => ParticipantsQueryBuilder;
|
|
1597
1075
|
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
1598
1076
|
* @documentationMaturity preview
|
|
1599
1077
|
*/
|
|
1600
|
-
descending: (...propertyNames: Array<'
|
|
1078
|
+
descending: (...propertyNames: Array<'_id' | '_createdDate' | 'state' | 'joinedInfo.startDate'>) => ParticipantsQueryBuilder;
|
|
1601
1079
|
/** @param limit - Number of items to return, which is also the `pageSize` of the results object.
|
|
1602
1080
|
* @documentationMaturity preview
|
|
1603
1081
|
*/
|
|
@@ -1619,41 +1097,6 @@ interface ParticipantsQueryBuilder {
|
|
|
1619
1097
|
* @fqn wix.onlineprograms.participants.v3.ParticipantsService.GetAccessStatus
|
|
1620
1098
|
*/
|
|
1621
1099
|
declare function getAccessStatus(): Promise<NonNullablePaths<GetAccessStatusResponse, `isBlocked`, 2>>;
|
|
1622
|
-
/**
|
|
1623
|
-
* Apply coupon to order
|
|
1624
|
-
* @public
|
|
1625
|
-
* @documentationMaturity preview
|
|
1626
|
-
* @requiredField identifiers
|
|
1627
|
-
* @requiredField identifiers.couponCode
|
|
1628
|
-
* @requiredField identifiers.participantId
|
|
1629
|
-
* @requiredField orderId
|
|
1630
|
-
* @permissionId ONLINE_PROGRAMS.COUPON_APPLY
|
|
1631
|
-
* @fqn wix.onlineprograms.participants.v3.ParticipantsService.ApplyCoupon
|
|
1632
|
-
*/
|
|
1633
|
-
declare function applyCoupon(identifiers: NonNullablePaths<ApplyCouponIdentifiers, `couponCode` | `participantId`, 2>, orderId: string): Promise<NonNullablePaths<ApplyCouponResponse, `couponId` | `subTotal` | `discount` | `total`, 2>>;
|
|
1634
|
-
interface ApplyCouponIdentifiers {
|
|
1635
|
-
/** @format GUID */
|
|
1636
|
-
participantId: string;
|
|
1637
|
-
couponCode: string;
|
|
1638
|
-
}
|
|
1639
|
-
/**
|
|
1640
|
-
* Remove coupon from order
|
|
1641
|
-
* @public
|
|
1642
|
-
* @documentationMaturity preview
|
|
1643
|
-
* @requiredField identifiers
|
|
1644
|
-
* @requiredField identifiers.couponId
|
|
1645
|
-
* @requiredField identifiers.participantId
|
|
1646
|
-
* @requiredField orderId
|
|
1647
|
-
* @permissionId ONLINE_PROGRAMS.COUPON_REVERT
|
|
1648
|
-
* @fqn wix.onlineprograms.participants.v3.ParticipantsService.RevertCoupon
|
|
1649
|
-
*/
|
|
1650
|
-
declare function revertCoupon(identifiers: NonNullablePaths<RevertCouponIdentifiers, `couponId` | `participantId`, 2>, orderId: string): Promise<NonNullablePaths<RevertCouponResponse, `total`, 2>>;
|
|
1651
|
-
interface RevertCouponIdentifiers {
|
|
1652
|
-
/** @format GUID */
|
|
1653
|
-
participantId: string;
|
|
1654
|
-
/** @format GUID */
|
|
1655
|
-
couponId: string;
|
|
1656
|
-
}
|
|
1657
1100
|
/**
|
|
1658
1101
|
* Bulk invites participants to program.
|
|
1659
1102
|
* For each member participant in Invited state is created.
|
|
@@ -1665,7 +1108,7 @@ interface RevertCouponIdentifiers {
|
|
|
1665
1108
|
* @applicableIdentity APP
|
|
1666
1109
|
* @fqn wix.onlineprograms.participants.v3.ManageParticipantsService.BulkInviteToProgram
|
|
1667
1110
|
*/
|
|
1668
|
-
declare function bulkInviteToProgram(programId: string, options?: BulkInviteToProgramOptions): Promise<NonNullablePaths<BulkInviteToProgramResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item.
|
|
1111
|
+
declare function bulkInviteToProgram(programId: string, options?: BulkInviteToProgramOptions): Promise<NonNullablePaths<BulkInviteToProgramResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item.memberId` | `results.${number}.item.programId` | `results.${number}.item.progress.totalStepsCompleted` | `results.${number}.item.progress.totalStepsAvailable` | `results.${number}.item.progress.completionPercentage` | `results.${number}.item.state` | `results.${number}.item.joinedInfo.timeZone` | `results.${number}.item.joinedInfo.startDate` | `results.${number}.item.joinedInfo.joinPath` | `results.${number}.item.member.contactId` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6>>;
|
|
1669
1112
|
interface BulkInviteToProgramOptions {
|
|
1670
1113
|
/**
|
|
1671
1114
|
* Return added participants in the response or not.
|
|
@@ -1709,7 +1152,7 @@ interface BulkInviteAllToProgramOptions {
|
|
|
1709
1152
|
* @applicableIdentity APP
|
|
1710
1153
|
* @fqn wix.onlineprograms.participants.v3.ManageParticipantsService.BulkAddToProgram
|
|
1711
1154
|
*/
|
|
1712
|
-
declare function bulkAddToProgram(programId: string, options?: BulkAddToProgramOptions): Promise<NonNullablePaths<BulkAddToProgramResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item.
|
|
1155
|
+
declare function bulkAddToProgram(programId: string, options?: BulkAddToProgramOptions): Promise<NonNullablePaths<BulkAddToProgramResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item.memberId` | `results.${number}.item.programId` | `results.${number}.item.progress.totalStepsCompleted` | `results.${number}.item.progress.totalStepsAvailable` | `results.${number}.item.progress.completionPercentage` | `results.${number}.item.state` | `results.${number}.item.joinedInfo.timeZone` | `results.${number}.item.joinedInfo.startDate` | `results.${number}.item.joinedInfo.joinPath` | `results.${number}.item.member.contactId` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6>>;
|
|
1713
1156
|
interface BulkAddToProgramOptions {
|
|
1714
1157
|
/**
|
|
1715
1158
|
* Site members.
|
|
@@ -1721,27 +1164,6 @@ interface BulkAddToProgramOptions {
|
|
|
1721
1164
|
/** Return added participants in the response or not. */
|
|
1722
1165
|
returnEntity?: boolean;
|
|
1723
1166
|
}
|
|
1724
|
-
/**
|
|
1725
|
-
* Bulk adds all site members to program, but not more then 1000.
|
|
1726
|
-
* Participant will be either created in state Joined, or updated to that state
|
|
1727
|
-
* from pending one.
|
|
1728
|
-
* @param programId - Program to which bulk add participants.
|
|
1729
|
-
* @public
|
|
1730
|
-
* @documentationMaturity preview
|
|
1731
|
-
* @requiredField programId
|
|
1732
|
-
* @permissionId ONLINE_PROGRAMS.PARTICIPANT_ADD
|
|
1733
|
-
* @applicableIdentity APP
|
|
1734
|
-
* @fqn wix.onlineprograms.participants.v3.ManageParticipantsService.BulkAddAllToProgram
|
|
1735
|
-
*/
|
|
1736
|
-
declare function bulkAddAllToProgram(programId: string, options?: BulkAddAllToProgramOptions): Promise<NonNullablePaths<BulkAddAllToProgramResponse, `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 3>>;
|
|
1737
|
-
interface BulkAddAllToProgramOptions {
|
|
1738
|
-
/**
|
|
1739
|
-
* Exclude site members.
|
|
1740
|
-
* @format GUID
|
|
1741
|
-
* @maxSize 100
|
|
1742
|
-
*/
|
|
1743
|
-
excludeMemberIds?: string[];
|
|
1744
|
-
}
|
|
1745
1167
|
/**
|
|
1746
1168
|
* Bulk approves participants, who asked to join private program (aka in
|
|
1747
1169
|
* state `APPROVAL_PENDING`). If participant was in other state, no effect and
|
|
@@ -1753,7 +1175,7 @@ interface BulkAddAllToProgramOptions {
|
|
|
1753
1175
|
* @permissionId ONLINE_PROGRAMS.PARTICIPANT_APPROVE
|
|
1754
1176
|
* @fqn wix.onlineprograms.participants.v3.ManageParticipantsService.BulkApproveParticipant
|
|
1755
1177
|
*/
|
|
1756
|
-
declare function bulkApproveParticipant(participantIds: string[], options?: BulkApproveParticipantOptions): Promise<NonNullablePaths<BulkApproveParticipantResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item.
|
|
1178
|
+
declare function bulkApproveParticipant(participantIds: string[], options?: BulkApproveParticipantOptions): Promise<NonNullablePaths<BulkApproveParticipantResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item.memberId` | `results.${number}.item.programId` | `results.${number}.item.progress.totalStepsCompleted` | `results.${number}.item.progress.totalStepsAvailable` | `results.${number}.item.progress.completionPercentage` | `results.${number}.item.state` | `results.${number}.item.joinedInfo.timeZone` | `results.${number}.item.joinedInfo.startDate` | `results.${number}.item.joinedInfo.joinPath` | `results.${number}.item.member.contactId` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6>>;
|
|
1757
1179
|
interface BulkApproveParticipantOptions {
|
|
1758
1180
|
/**
|
|
1759
1181
|
* program to approve participant
|
|
@@ -1785,47 +1207,5 @@ interface BulkApproveAllParticipantOptions {
|
|
|
1785
1207
|
*/
|
|
1786
1208
|
excludeParticipantIds?: string[];
|
|
1787
1209
|
}
|
|
1788
|
-
/**
|
|
1789
|
-
* Delete participant from program by owner will. Removes participant from member
|
|
1790
|
-
* group. Leaves him in Social Group.
|
|
1791
|
-
* @param participantId - Participants to delete
|
|
1792
|
-
* @public
|
|
1793
|
-
* @documentationMaturity preview
|
|
1794
|
-
* @requiredField participantId
|
|
1795
|
-
* @permissionId ONLINE_PROGRAMS.PARTICIPANT_DELETE
|
|
1796
|
-
* @fqn wix.onlineprograms.participants.v3.ManageParticipantsService.DeleteParticipant
|
|
1797
|
-
*/
|
|
1798
|
-
declare function deleteParticipant(participantId: string): Promise<void>;
|
|
1799
|
-
/**
|
|
1800
|
-
* Issue certificate by site admin
|
|
1801
|
-
* @param participantId - Participant to get certificate
|
|
1802
|
-
* @public
|
|
1803
|
-
* @documentationMaturity preview
|
|
1804
|
-
* @requiredField participantId
|
|
1805
|
-
* @permissionId ONLINE_PROGRAMS.PARTICIPANT_ISSUE_CERTIFICATE
|
|
1806
|
-
* @applicableIdentity APP
|
|
1807
|
-
* @fqn wix.onlineprograms.participants.v3.ManageParticipantsService.IssueCertificate
|
|
1808
|
-
*/
|
|
1809
|
-
declare function issueCertificate(participantId: string): Promise<NonNullablePaths<IssueCertificateResponse, `participant.paymentPendingOptions.paidPlanIds` | `participant.joinedOptions.singlePaymentOptions.orderId` | `participant.joinedOptions.paidPlanOptions.planIds` | `participant.joinedOptions.freeCouponOptions.couponId` | `participant.joinedOptions.timeZone` | `participant.joinedOptions.startDate` | `participant.joinedOptions.joinPath` | `participant.completedOptions.startDate` | `participant.failedOptions.startDate` | `participant.suspendedOptions.startDate` | `participant.autoRemovedOptions.startDate` | `participant.memberId` | `participant.programId` | `participant.progress.totalStepsCompleted` | `participant.progress.totalStepsAvailable` | `participant.progress.completionPercentage` | `participant.state`, 5>>;
|
|
1810
|
-
/**
|
|
1811
|
-
* Get program's completion stats
|
|
1812
|
-
* @param programId - program id to get stats for
|
|
1813
|
-
* @public
|
|
1814
|
-
* @documentationMaturity preview
|
|
1815
|
-
* @requiredField programId
|
|
1816
|
-
* @permissionId ONLINE_PROGRAMS.STATS_READ
|
|
1817
|
-
* @applicableIdentity APP
|
|
1818
|
-
* @fqn wix.onlineprograms.participants.v3.ManageParticipantsService.GetCompletionStats
|
|
1819
|
-
*/
|
|
1820
|
-
declare function getCompletionStats(programId: string): Promise<NonNullablePaths<GetCompletionStatsResponse, `completedAll` | `completionRate`, 2>>;
|
|
1821
|
-
/**
|
|
1822
|
-
* Get premium stats
|
|
1823
|
-
* @public
|
|
1824
|
-
* @documentationMaturity preview
|
|
1825
|
-
* @permissionId ONLINE_PROGRAMS.STATS_READ
|
|
1826
|
-
* @applicableIdentity APP
|
|
1827
|
-
* @fqn wix.onlineprograms.participants.v3.ManageParticipantsService.GetPremiumStats
|
|
1828
|
-
*/
|
|
1829
|
-
declare function getPremiumStats(): Promise<NonNullablePaths<GetPremiumStatsResponse, `hasPremium` | `activeParticipantsCount` | `activeParticipantsLimit`, 2>>;
|
|
1830
1210
|
|
|
1831
|
-
export { type
|
|
1211
|
+
export { type ActionEvent, type ApplicationError, type BaseEventMetadata, type Behavior, type BehaviorBehaviorOneOf, type Benefit, type BenefitNotification, BenefitType, type BenefitTypeWithLiterals, type BulkActionMetadata, type BulkAddAllToProgramOptions, type BulkAddAllToProgramRequest, type BulkAddAllToProgramResponse, type BulkAddToProgramOptions, type BulkAddToProgramRequest, type BulkAddToProgramResponse, type BulkAddToProgramResult, type BulkApproveAllParticipantOptions, type BulkApproveAllParticipantRequest, type BulkApproveAllParticipantResponse, type BulkApproveParticipantOptions, type BulkApproveParticipantRequest, type BulkApproveParticipantResponse, type BulkApproveParticipantResult, type BulkCreateParticipantOptions, type BulkCreateParticipantRequest, type BulkCreateParticipantResponse, type BulkInviteAllToProgramOptions, type BulkInviteAllToProgramRequest, type BulkInviteAllToProgramResponse, type BulkInviteToProgramOptions, type BulkInviteToProgramRequest, type BulkInviteToProgramResponse, type BulkInviteToProgramResult, type BulkParticipantResult, type Certificate, type CommonBulkActionMetadata, type CommonItemMetadata, type CreateParticipantRequest, type CreateParticipantResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DeleteParticipantRequest, type DeleteParticipantResponse, type Discount, type DiscountDiscountOneOf, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EntryPass, Event, type EventMetadata, type EventWithLiterals, type ExportParticipantsStatsRequest, type ExportParticipantsStatsResponse, type ExtendedFields, type GetAccessStatusRequest, type GetAccessStatusResponse, type GetCompletionStatsRequest, type GetCompletionStatsResponse, type GetParticipantRequest, type GetParticipantResponse, type GetPremiumStatsRequest, type GetPremiumStatsResponse, type IdentificationData, type IdentificationDataIdOneOf, type IssueCertificateRequest, type IssueCertificateResponse, type ItemMetadata, JoinPath, type JoinPathWithLiterals, type JoinedInfo, type Member, type MessageEnvelope, type Participant, type ParticipantAdded, type ParticipantAddedEnvelope, type ParticipantApproved, type ParticipantApprovedEnvelope, type ParticipantExportsFinished, type ParticipantInvited, type ParticipantInvitedEnvelope, type ParticipantsQueryBuilder, type ParticipantsQueryResult, type PaymentInfo, type Progress, type QueryParticipantsRequest, type QueryParticipantsResponse, type RestoreInfo, SortOrder, type SortOrderWithLiterals, type Sorting, State, type StateWithLiterals, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, bulkAddAllToProgram, bulkAddToProgram, bulkApproveAllParticipant, bulkApproveParticipant, bulkCreateParticipant, bulkInviteAllToProgram, bulkInviteToProgram, createParticipant, deleteParticipant, getAccessStatus, getCompletionStats, getParticipant, getPremiumStats, issueCertificate, onParticipantAdded, onParticipantApproved, onParticipantInvited, queryParticipants };
|