@wix/auto_sdk_online-programs_participants 1.0.10 → 1.0.11

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.
Files changed (41) hide show
  1. package/build/cjs/index.d.ts +50 -12
  2. package/build/cjs/index.js +332 -13
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +12 -1239
  5. package/build/cjs/index.typings.js +304 -11
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +736 -37
  8. package/build/cjs/meta.js +275 -13
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/cjs/online-programs-v3-participant-participants.universal-DRubTE1O.d.ts +2228 -0
  11. package/build/es/index.d.mts +50 -12
  12. package/build/es/index.mjs +319 -12
  13. package/build/es/index.mjs.map +1 -1
  14. package/build/es/index.typings.d.mts +12 -1239
  15. package/build/es/index.typings.mjs +292 -11
  16. package/build/es/index.typings.mjs.map +1 -1
  17. package/build/es/meta.d.mts +736 -37
  18. package/build/es/meta.mjs +262 -12
  19. package/build/es/meta.mjs.map +1 -1
  20. package/build/es/online-programs-v3-participant-participants.universal-DRubTE1O.d.mts +2228 -0
  21. package/build/internal/cjs/index.d.ts +50 -12
  22. package/build/internal/cjs/index.js +332 -13
  23. package/build/internal/cjs/index.js.map +1 -1
  24. package/build/internal/cjs/index.typings.d.ts +12 -1249
  25. package/build/internal/cjs/index.typings.js +304 -11
  26. package/build/internal/cjs/index.typings.js.map +1 -1
  27. package/build/internal/cjs/meta.d.ts +736 -37
  28. package/build/internal/cjs/meta.js +275 -13
  29. package/build/internal/cjs/meta.js.map +1 -1
  30. package/build/internal/cjs/online-programs-v3-participant-participants.universal-DUdmZP01.d.ts +2238 -0
  31. package/build/internal/es/index.d.mts +50 -12
  32. package/build/internal/es/index.mjs +319 -12
  33. package/build/internal/es/index.mjs.map +1 -1
  34. package/build/internal/es/index.typings.d.mts +12 -1249
  35. package/build/internal/es/index.typings.mjs +292 -11
  36. package/build/internal/es/index.typings.mjs.map +1 -1
  37. package/build/internal/es/meta.d.mts +736 -37
  38. package/build/internal/es/meta.mjs +262 -12
  39. package/build/internal/es/meta.mjs.map +1 -1
  40. package/build/internal/es/online-programs-v3-participant-participants.universal-DUdmZP01.d.mts +2238 -0
  41. package/package.json +3 -3
@@ -1,1245 +1,18 @@
1
- import { NonNullablePaths } from '@wix/sdk-types';
1
+ import { aA as CursorSearch, S as SearchParticipantsResponse } from './online-programs-v3-participant-participants.universal-DRubTE1O.js';
2
+ export { bg as ActionEvent, aC as Aggregation, aR as AggregationData, aD as AggregationKindOneOf, b8 as AggregationResults, b9 as AggregationResultsResultOneOf, aY as AggregationResultsScalarResult, Q as AggregationType, bV as AggregationTypeWithLiterals, ad as ApplicationError, bH as BaseEventMetadata, bn as Behavior, bo as BehaviorBehaviorOneOf, bj as Benefit, bi as BenefitNotification, T as BenefitType, bX as BenefitTypeWithLiterals, bv as BulkActionMetadata, b as BulkAddAllToProgramOptions, af as BulkAddAllToProgramRequest, c as BulkAddAllToProgramResponse, q as BulkAddToProgramOptions, by as BulkAddToProgramRequest, r as BulkAddToProgramResponse, bz as BulkAddToProgramResult, u as BulkApproveAllParticipantOptions, bD as BulkApproveAllParticipantRequest, v as BulkApproveAllParticipantResponse, s as BulkApproveParticipantOptions, bA as BulkApproveParticipantRequest, t as BulkApproveParticipantResponse, bB as BulkApproveParticipantResult, B as BulkCreateParticipantOptions, aa as BulkCreateParticipantRequest, a as BulkCreateParticipantResponse, o as BulkInviteAllToProgramOptions, bx as BulkInviteAllToProgramRequest, p as BulkInviteAllToProgramResponse, m as BulkInviteToProgramOptions, bs as BulkInviteToProgramRequest, n as BulkInviteToProgramResponse, bu as BulkInviteToProgramResult, ab as BulkParticipantResult, h as BulkUpdateParticipantTagsApplicationErrors, k as BulkUpdateParticipantTagsByFilterApplicationErrors, i as BulkUpdateParticipantTagsByFilterOptions, ay as BulkUpdateParticipantTagsByFilterRequest, j as BulkUpdateParticipantTagsByFilterResponse, f as BulkUpdateParticipantTagsOptions, aw as BulkUpdateParticipantTagsRequest, g as BulkUpdateParticipantTagsResponse, ax as BulkUpdateParticipantTagsResult, $ as Certificate, ae as CommonBulkActionMetadata, ac as CommonItemMetadata, b$ as CommonQueryWithEntityContext, c0 as CommonSearchWithEntityContext, C as CreateParticipantApplicationErrors, a8 as CreateParticipantRequest, a9 as CreateParticipantResponse, ar as CursorPaging, at as CursorPagingMetadata, ao as CursorQuery, ap as CursorQueryPagingMethodOneOf, aB as CursorSearchPagingMethodOneOf, au as Cursors, aK as DateHistogramAggregation, b4 as DateHistogramResult, b6 as DateHistogramResults, ag as DeleteParticipantRequest, ah as DeleteParticipantResponse, bl as Discount, bm as DiscountDiscountOneOf, ba as DomainEvent, bb as DomainEventBodyOneOf, bh as Empty, bc as EntityCreatedEvent, bf as EntityDeletedEvent, be as EntityUpdatedEvent, bk as EntryPass, U as Event, bI as EventMetadata, bY as EventWithLiterals, bE as ExportParticipantsStatsRequest, bF as ExportParticipantsStatsResponse, a3 as ExtendedFields, Z as FreeCouponDetails, av as GetAccessStatusRequest, e as GetAccessStatusResponse, aj as GetCompletionStatsRequest, G as GetCompletionStatsResponse, al as GetParticipantRequest, am as GetParticipantResponse, ak as GetPremiumStatsRequest, d as GetPremiumStatsResponse, aO as GroupByAggregation, aP as GroupByAggregationKindOneOf, b5 as GroupByValueResults, bq as IdentificationData, br as IdentificationDataIdOneOf, aF as IncludeMissingValuesOptions, O as Interval, bU as IntervalWithLiterals, ai as IssueCertificateRequest, I as IssueCertificateResponse, bt as ItemMetadata, J as JoinPath, bM as JoinPathWithLiterals, a0 as JoinedInfo, a1 as JoinedInfoJoinPathDetailsOneOf, a2 as Member, bp as MessageEnvelope, M as MissingValues, bR as MissingValuesWithLiterals, R as Mode, bW as ModeWithLiterals, aN as NestedAggregation, aL as NestedAggregationItem, aM as NestedAggregationItemKindOneOf, aU as NestedAggregationResults, aV as NestedAggregationResultsResultOneOf, N as NestedAggregationType, bT as NestedAggregationTypeWithLiterals, b1 as NestedResultValue, b2 as NestedResultValueResultOneOf, b7 as NestedResults, aZ as NestedValueAggregationResult, Y as PaidPlanDetails, P as Participant, a6 as ParticipantAdded, w as ParticipantAddedEnvelope, bC as ParticipantApproved, x as ParticipantApprovedEnvelope, bG as ParticipantExportsFinished, bw as ParticipantInvited, y as ParticipantInvitedEnvelope, A as ParticipantQuery, bK as ParticipantQuerySpec, bL as ParticipantSearchSpec, z as ParticipantsQueryBuilder, bJ as ParticipantsQueryResult, _ as Progress, an as QueryParticipantsRequest, as as QueryParticipantsResponse, aI as RangeAggregation, aT as RangeAggregationResult, aE as RangeBucket, a$ as RangeResult, aX as RangeResults, bd as RestoreInfo, b3 as Results, aJ as ScalarAggregation, b0 as ScalarResult, L as ScalarType, bS as ScalarTypeWithLiterals, aQ as SearchDetails, az as SearchParticipantsRequest, X as SinglePaymentDetails, K as SortDirection, bQ as SortDirectionWithLiterals, F as SortOrder, bO as SortOrderWithLiterals, H as SortType, bP as SortTypeWithLiterals, aq as Sorting, V as State, b_ as StateWithLiterals, E as Status, bN as StatusWithLiterals, a5 as TagList, a4 as Tags, a7 as TagsModified, aG as ValueAggregation, aH as ValueAggregationOptionsOneOf, aS as ValueAggregationResult, a_ as ValueResult, aW as ValueResults, W as WebhookIdentityType, bZ as WebhookIdentityTypeWithLiterals, c6 as bulkAddAllToProgram, ci as bulkAddToProgram, ck as bulkApproveAllParticipant, cj as bulkApproveParticipant, c5 as bulkCreateParticipant, ch as bulkInviteAllToProgram, cg as bulkInviteToProgram, ce as bulkUpdateParticipantTags, cf as bulkUpdateParticipantTagsByFilter, c4 as createParticipant, c7 as deleteParticipant, cd as getAccessStatus, c9 as getCompletionStats, cb as getParticipant, ca as getPremiumStats, c8 as issueCertificate, c1 as onParticipantAdded, c2 as onParticipantApproved, c3 as onParticipantInvited, cc as queryParticipants, D as typedQueryParticipants } from './online-programs-v3-participant-participants.universal-DRubTE1O.js';
3
+ import '@wix/sdk-types';
2
4
 
3
- interface Participant {
4
- /**
5
- * Participant ID.
6
- * @format GUID
7
- * @readonly
8
- */
9
- _id?: string | null;
10
- /** @readonly */
11
- revision?: string | null;
12
- /** @readonly */
13
- _createdDate?: Date | null;
14
- /** @readonly */
15
- _updatedDate?: Date | null;
16
- /**
17
- * Member ID of participant on site
18
- * @format GUID
19
- * @readonly
20
- */
21
- memberId?: string;
22
- /**
23
- * Program ID which participant participates in
24
- * @format GUID
25
- * @readonly
26
- */
27
- programId?: string;
28
- /**
29
- * Program completion progress
30
- * @readonly
31
- */
32
- progress?: Progress;
33
- /** state of participation in the program */
34
- state?: StateWithLiterals;
35
- /**
36
- * Certificate issued to participant
37
- * @readonly
38
- */
39
- certificate?: Certificate;
40
- joinedInfo?: JoinedInfo;
41
- /** @readonly */
42
- member?: Member;
43
- /** @readonly */
44
- lastActivityDate?: Date | null;
45
- extendedFields?: ExtendedFields;
46
- }
47
- declare enum JoinPath {
48
- UNKNOWN_JOIN_PATH = "UNKNOWN_JOIN_PATH",
49
- /** Member joined to the program for free */
50
- FREE = "FREE",
51
- /** Member was added to the program by site owner */
52
- ADDED = "ADDED",
53
- /** Member paid once to join the program */
54
- SINGLE_PAYMENT = "SINGLE_PAYMENT",
55
- /** Member has Paid Plan to join */
56
- PAID_PLAN = "PAID_PLAN",
57
- /** Member joined with the Free Coupon */
58
- FREE_COUPON = "FREE_COUPON"
59
- }
60
- /** @enumType */
61
- type JoinPathWithLiterals = JoinPath | 'UNKNOWN_JOIN_PATH' | 'FREE' | 'ADDED' | 'SINGLE_PAYMENT' | 'PAID_PLAN' | 'FREE_COUPON';
62
- interface SinglePaymentDetails {
63
- /** @format GUID */
64
- paymentOrderId?: string;
65
- /** @format GUID */
66
- offlineTransactionId?: string | null;
67
- }
68
- interface PaidPlanDetails {
69
- /** @format GUID */
70
- paidPlanId?: string;
71
- }
72
- interface FreeCouponDetails {
73
- /** @format GUID */
74
- freeCouponId?: string;
75
- }
76
- interface Progress {
77
- /** Number of program steps completed by member */
78
- totalStepsCompleted?: number;
79
- /** Total number of program steps available to resolve */
80
- totalStepsAvailable?: number;
81
- /**
82
- * Completion percentage
83
- * @max 100
84
- */
85
- completionPercentage?: number;
86
- }
87
- declare enum State {
88
- /** Unknown state */
89
- UNKNOWN_STATE = "UNKNOWN_STATE",
90
- /** Member joined the program and became participant */
91
- JOINED = "JOINED",
92
- /** Participant completed the program, and could join again */
93
- COMPLETED = "COMPLETED",
94
- /** Participant failed to complete the program, and could join again */
95
- FAILED = "FAILED",
96
- /** Participant with ended pricing plan (PP), will be joined as renew PP */
97
- SUSPENDED = "SUSPENDED",
98
- /** Participant removed automatically after some program condition */
99
- AUTO_REMOVED = "AUTO_REMOVED",
100
- /** Participant removed by site owner */
101
- REMOVED = "REMOVED",
102
- /** Participant left the program by himself */
103
- LEFT = "LEFT"
104
- }
105
- /** @enumType */
106
- type StateWithLiterals = State | 'UNKNOWN_STATE' | 'JOINED' | 'COMPLETED' | 'FAILED' | 'SUSPENDED' | 'AUTO_REMOVED' | 'REMOVED' | 'LEFT';
107
- interface Certificate {
108
- /**
109
- * when certificate was issued, UTC
110
- * @readonly
111
- */
112
- issuedDate?: Date | null;
113
- }
114
- interface JoinedInfo extends JoinedInfoJoinPathDetailsOneOf {
115
- singlePaymentDetails?: SinglePaymentDetails;
116
- paidPlanDetails?: PaidPlanDetails;
117
- freeCouponDetails?: FreeCouponDetails;
118
- /**
119
- * @maxLength 50
120
- * @readonly
121
- */
122
- timeZone?: string;
123
- /**
124
- * @format LOCAL_DATE
125
- * @readonly
126
- */
127
- startDate?: string;
128
- joinPath?: JoinPathWithLiterals;
129
- /**
130
- * @format LOCAL_DATE
131
- * @readonly
132
- */
133
- finishDate?: string | null;
134
- }
135
- /** @oneof */
136
- interface JoinedInfoJoinPathDetailsOneOf {
137
- singlePaymentDetails?: SinglePaymentDetails;
138
- paidPlanDetails?: PaidPlanDetails;
139
- freeCouponDetails?: FreeCouponDetails;
140
- }
141
- interface Member {
142
- /**
143
- * @readonly
144
- * @maxLength 100
145
- */
146
- firstName?: string | null;
147
- /**
148
- * @readonly
149
- * @maxLength 100
150
- */
151
- lastName?: string | null;
152
- /**
153
- * @readonly
154
- * @format EMAIL
155
- */
156
- email?: string | null;
157
- /** @format GUID */
158
- contactId?: string;
159
- /**
160
- * @readonly
161
- * @format WEB_URL
162
- */
163
- profileImageUrl?: string | null;
164
- }
165
- interface ExtendedFields {
166
- /**
167
- * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
168
- * The value of each key is structured according to the schema defined when the extended fields were configured.
169
- *
170
- * You can only access fields for which you have the appropriate permissions.
171
- *
172
- * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
173
- */
174
- namespaces?: Record<string, Record<string, any>>;
175
- }
176
- interface ParticipantAdded {
177
- /**
178
- * Program ID which participant was added
179
- * @format GUID
180
- */
181
- programId?: string;
182
- /**
183
- * Member ID of participant on site
184
- * @format GUID
185
- */
186
- memberId?: string;
187
- }
188
- interface CreateParticipantRequest {
189
- /** Participant to create */
190
- participant: Participant;
191
- }
192
- interface CreateParticipantResponse {
193
- /** Created participant */
194
- participant?: Participant;
195
- }
196
- interface BulkCreateParticipantRequest {
197
- /**
198
- * List of participants you want to create
199
- * @minSize 1
200
- * @maxSize 100
201
- */
202
- participants: Participant[];
203
- /** Whether to return entities in response or not. */
204
- returnEntity?: boolean;
205
- }
206
- interface BulkCreateParticipantResponse {
207
- /**
208
- * Results of bulk action.
209
- * @minSize 1
210
- * @maxSize 100
211
- */
212
- results?: BulkParticipantResult[];
213
- /** Metadata about whole bulk action. */
214
- bulkActionMetadata?: CommonBulkActionMetadata;
215
- }
216
- interface BulkParticipantResult {
217
- /** Metadata of item. */
218
- itemMetadata?: CommonItemMetadata;
219
- /** Item itself (empty if return_entity in request is false). */
220
- item?: Participant;
221
- }
222
- interface CommonItemMetadata {
223
- /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
224
- _id?: string | null;
225
- /** Index of the item within the request array. Allows for correlation between request and response items. */
226
- originalIndex?: number;
227
- /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
228
- success?: boolean;
229
- /** Details about the error in case of failure. */
230
- error?: ApplicationError;
231
- }
232
- interface ApplicationError {
233
- /** Error code. */
234
- code?: string;
235
- /** Description of the error. */
236
- description?: string;
237
- /** Data related to the error. */
238
- data?: Record<string, any> | null;
239
- }
240
- interface CommonBulkActionMetadata {
241
- /** Number of items that were successfully processed. */
242
- totalSuccesses?: number;
243
- /** Number of items that couldn't be processed. */
244
- totalFailures?: number;
245
- /** Number of failures without details because detailed failure threshold was exceeded. */
246
- undetailedFailures?: number;
247
- }
248
- interface BulkAddAllToProgramRequest {
249
- /**
250
- * Program to which bulk add participants.
251
- * @format GUID
252
- */
253
- programId: string;
254
- /**
255
- * Exclude site members.
256
- * @format GUID
257
- * @maxSize 100
258
- */
259
- excludeMemberIds?: string[];
260
- }
261
- interface BulkAddAllToProgramResponse {
262
- /**
263
- * Async infra job id which will process the request.
264
- * @format GUID
265
- */
266
- jobId?: string;
267
- }
268
- interface DeleteParticipantRequest {
269
- /**
270
- * Participants to delete
271
- * @format GUID
272
- */
273
- participantId: string;
274
- }
275
- interface DeleteParticipantResponse {
276
- }
277
- interface IssueCertificateRequest {
278
- /**
279
- * Participant to get certificate
280
- * @format GUID
281
- */
282
- participantId: string;
283
- }
284
- interface IssueCertificateResponse {
285
- /** Updated participant */
286
- participant?: Participant;
287
- }
288
- interface GetCompletionStatsRequest {
289
- /**
290
- * program id to get stats for
291
- * @format GUID
292
- */
293
- programId: string;
294
- }
295
- interface GetCompletionStatsResponse {
296
- /** Number of participants that completed the program */
297
- completedAll?: number;
298
- /** Percentage of participants that completed the program */
299
- completionRate?: number;
300
- }
301
- interface GetPremiumStatsRequest {
302
- }
303
- interface GetPremiumStatsResponse {
304
- /** True if site has Online Programs premium feature */
305
- hasPremium?: boolean;
306
- /** Count of active participants on the site */
307
- activeParticipantsCount?: number;
308
- /** Limit of active participants on a site without premium */
309
- activeParticipantsLimit?: number;
310
- }
311
- interface GetParticipantRequest {
312
- /**
313
- * Participant id to fetch
314
- * @format GUID
315
- */
316
- participantId: string;
317
- }
318
- interface GetParticipantResponse {
319
- /** existing participant */
320
- participant?: Participant;
321
- }
322
- interface QueryParticipantsRequest {
323
- /** Platformized query */
324
- query?: CursorQuery;
325
- }
326
- interface CursorQuery extends CursorQueryPagingMethodOneOf {
327
- /**
328
- * Cursor paging options.
329
- *
330
- * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
331
- */
332
- cursorPaging?: CursorPaging;
333
- /**
334
- * Filter object.
335
- *
336
- * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).
337
- */
338
- filter?: Record<string, any> | null;
339
- /**
340
- * Sort object.
341
- *
342
- * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).
343
- * @maxSize 5
344
- */
345
- sort?: Sorting[];
346
- }
347
- /** @oneof */
348
- interface CursorQueryPagingMethodOneOf {
349
- /**
350
- * Cursor paging options.
351
- *
352
- * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
353
- */
354
- cursorPaging?: CursorPaging;
355
- }
356
- interface Sorting {
357
- /**
358
- * Name of the field to sort by.
359
- * @maxLength 512
360
- */
361
- fieldName?: string;
362
- /** Sort order. */
363
- order?: SortOrderWithLiterals;
364
- }
365
- declare enum SortOrder {
366
- ASC = "ASC",
367
- DESC = "DESC"
368
- }
369
- /** @enumType */
370
- type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
371
- interface CursorPaging {
372
- /**
373
- * Maximum number of items to return in the results.
374
- * @max 100
375
- */
376
- limit?: number | null;
377
- /**
378
- * Pointer to the next or previous page in the list of results.
379
- *
380
- * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
381
- * Not relevant for the first request.
382
- * @maxLength 16000
383
- */
384
- cursor?: string | null;
385
- }
386
- interface QueryParticipantsResponse {
387
- /** found participants */
388
- participants?: Participant[];
389
- /** paging metadata */
390
- pagingMetadata?: CursorPagingMetadata;
391
- }
392
- interface CursorPagingMetadata {
393
- /** Number of items returned in current page. */
394
- count?: number | null;
395
- /** Cursor strings that point to the next page, previous page, or both. */
396
- cursors?: Cursors;
397
- /**
398
- * Whether there are more pages to retrieve following the current page.
399
- *
400
- * + `true`: Another page of results can be retrieved.
401
- * + `false`: This is the last page.
402
- */
403
- hasNext?: boolean | null;
404
- }
405
- interface Cursors {
406
- /**
407
- * Cursor string pointing to the next page in the list of results.
408
- * @maxLength 16000
409
- */
410
- next?: string | null;
411
- /**
412
- * Cursor pointing to the previous page in the list of results.
413
- * @maxLength 16000
414
- */
415
- prev?: string | null;
416
- }
417
- interface GetAccessStatusRequest {
418
- }
419
- interface GetAccessStatusResponse {
420
- /** True if participants cannot access online programs due to some limitations */
421
- isBlocked?: boolean;
422
- }
423
- interface DomainEvent extends DomainEventBodyOneOf {
424
- createdEvent?: EntityCreatedEvent;
425
- updatedEvent?: EntityUpdatedEvent;
426
- deletedEvent?: EntityDeletedEvent;
427
- actionEvent?: ActionEvent;
428
- /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
429
- _id?: string;
430
- /**
431
- * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
432
- * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
433
- */
434
- entityFqdn?: string;
435
- /**
436
- * Event action name, placed at the top level to make it easier for users to dispatch messages.
437
- * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
438
- */
439
- slug?: string;
440
- /** ID of the entity associated with the event. */
441
- entityId?: string;
442
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
443
- eventTime?: Date | null;
444
- /**
445
- * Whether the event was triggered as a result of a privacy regulation application
446
- * (for example, GDPR).
447
- */
448
- triggeredByAnonymizeRequest?: boolean | null;
449
- /** If present, indicates the action that triggered the event. */
450
- originatedFrom?: string | null;
451
- /**
452
- * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
453
- * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
454
- */
455
- entityEventSequence?: string | null;
456
- }
457
- /** @oneof */
458
- interface DomainEventBodyOneOf {
459
- createdEvent?: EntityCreatedEvent;
460
- updatedEvent?: EntityUpdatedEvent;
461
- deletedEvent?: EntityDeletedEvent;
462
- actionEvent?: ActionEvent;
463
- }
464
- interface EntityCreatedEvent {
465
- entity?: string;
466
- }
467
- interface RestoreInfo {
468
- deletedDate?: Date | null;
469
- }
470
- interface EntityUpdatedEvent {
471
- /**
472
- * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
473
- * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
474
- * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
475
- */
476
- currentEntity?: string;
477
- }
478
- interface EntityDeletedEvent {
479
- /** Entity that was deleted. */
480
- deletedEntity?: string | null;
481
- }
482
- interface ActionEvent {
483
- body?: string;
484
- }
485
- interface Empty {
486
- }
487
- interface BenefitNotification {
488
- /**
489
- * Plan unique ID
490
- * @format GUID
491
- */
492
- planId?: string;
493
- /**
494
- * App def ID
495
- * @format GUID
496
- */
497
- appDefId?: string;
498
- /** Current benefit details */
499
- benefit?: Benefit;
500
- /** Previous benefit */
501
- prevBenefit?: Benefit;
502
- /** Notification event */
503
- event?: EventWithLiterals;
504
- }
505
- interface Benefit {
506
- /**
507
- * Benefit unique ID
508
- * @format GUID
509
- * @readonly
510
- */
511
- _id?: string | null;
512
- /** Benefit Type */
513
- benefitType?: BenefitTypeWithLiterals;
514
- /**
515
- * Resource IDs that serves by this benefit
516
- * @format GUID
517
- */
518
- resourceIds?: string[];
519
- /** Amount of credits that provided by this benefit */
520
- creditAmount?: number | null;
521
- /**
522
- * additional details related to benefit; limited to 20 entries, 20 symbols for key and 20 symbols for value
523
- * @maxSize 20
524
- */
525
- customFields?: Record<string, string>;
526
- /** return value only in case it required in the ListRequest, true means that benefit's type could be updated */
527
- editable?: boolean | null;
528
- /** Benefit behavior */
529
- behavior?: Behavior;
530
- /**
531
- * Id of the app associated with this benefit
532
- * @format GUID
533
- * @readonly
534
- */
535
- appDefId?: string | null;
536
- }
537
- interface EntryPass {
538
- }
539
- interface Discount extends DiscountDiscountOneOf {
540
- /**
541
- * Fixed-rate percent off discount
542
- * @decimalValue options { gt:0, lte:100, maxScale:2 }
543
- */
544
- percentOffRate?: string;
545
- /**
546
- * Absolute amount discount
547
- * @decimalValue options { gt:0, maxScale:2 }
548
- */
549
- moneyOffAmount?: string;
550
- }
551
- /** @oneof */
552
- interface DiscountDiscountOneOf {
553
- /**
554
- * Fixed-rate percent off discount
555
- * @decimalValue options { gt:0, lte:100, maxScale:2 }
556
- */
557
- percentOffRate?: string;
558
- /**
559
- * Absolute amount discount
560
- * @decimalValue options { gt:0, maxScale:2 }
561
- */
562
- moneyOffAmount?: string;
563
- }
564
- declare enum BenefitType {
565
- /** Should never be used */
566
- UNDEFINED = "UNDEFINED",
567
- /** Limited benefit type */
568
- LIMITED = "LIMITED",
569
- /** Unlimited benefit type */
570
- UNLIMITED = "UNLIMITED"
571
- }
572
- /** @enumType */
573
- type BenefitTypeWithLiterals = BenefitType | 'UNDEFINED' | 'LIMITED' | 'UNLIMITED';
574
- interface Behavior extends BehaviorBehaviorOneOf {
575
- /** Entry pass for resources, e.g. a ticket for Bookings service or a ticket for Events. */
576
- defaultBehavior?: EntryPass;
577
- /** Discount applied to paid resources */
578
- discount?: Discount;
579
- }
580
- /** @oneof */
581
- interface BehaviorBehaviorOneOf {
582
- /** Entry pass for resources, e.g. a ticket for Bookings service or a ticket for Events. */
583
- defaultBehavior?: EntryPass;
584
- /** Discount applied to paid resources */
585
- discount?: Discount;
586
- }
587
- declare enum Event {
588
- Updated = "Updated",
589
- Deleted = "Deleted",
590
- Created = "Created"
591
- }
592
- /** @enumType */
593
- type EventWithLiterals = Event | 'Updated' | 'Deleted' | 'Created';
594
- interface MessageEnvelope {
595
- /**
596
- * App instance ID.
597
- * @format GUID
598
- */
599
- instanceId?: string | null;
600
- /**
601
- * Event type.
602
- * @maxLength 150
603
- */
604
- eventType?: string;
605
- /** The identification type and identity data. */
606
- identity?: IdentificationData;
607
- /** Stringify payload. */
608
- data?: string;
609
- }
610
- interface IdentificationData extends IdentificationDataIdOneOf {
611
- /**
612
- * ID of a site visitor that has not logged in to the site.
613
- * @format GUID
614
- */
615
- anonymousVisitorId?: string;
616
- /**
617
- * ID of a site visitor that has logged in to the site.
618
- * @format GUID
619
- */
620
- memberId?: string;
621
- /**
622
- * ID of a Wix user (site owner, contributor, etc.).
623
- * @format GUID
624
- */
625
- wixUserId?: string;
626
- /**
627
- * ID of an app.
628
- * @format GUID
629
- */
630
- appId?: string;
631
- /** @readonly */
632
- identityType?: WebhookIdentityTypeWithLiterals;
633
- }
634
- /** @oneof */
635
- interface IdentificationDataIdOneOf {
636
- /**
637
- * ID of a site visitor that has not logged in to the site.
638
- * @format GUID
639
- */
640
- anonymousVisitorId?: string;
641
- /**
642
- * ID of a site visitor that has logged in to the site.
643
- * @format GUID
644
- */
645
- memberId?: string;
646
- /**
647
- * ID of a Wix user (site owner, contributor, etc.).
648
- * @format GUID
649
- */
650
- wixUserId?: string;
651
- /**
652
- * ID of an app.
653
- * @format GUID
654
- */
655
- appId?: string;
656
- }
657
- declare enum WebhookIdentityType {
658
- UNKNOWN = "UNKNOWN",
659
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
660
- MEMBER = "MEMBER",
661
- WIX_USER = "WIX_USER",
662
- APP = "APP"
663
- }
664
- /** @enumType */
665
- type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
666
- interface BulkInviteToProgramRequest {
667
- /**
668
- * Program to which bulk invite participants.
669
- * @format GUID
670
- */
671
- programId: string;
672
- /**
673
- * Return added participants in the response or not.
674
- * @format GUID
675
- * @minSize 1
676
- * @maxSize 100
677
- */
678
- memberIds?: string[];
679
- /** Return invited participants in the response or not. */
680
- returnEntity?: boolean;
681
- }
682
- interface BulkInviteToProgramResponse {
683
- /** Participants created by bulk action */
684
- results?: BulkInviteToProgramResult[];
685
- /** Bulk action metadata. */
686
- bulkActionMetadata?: BulkActionMetadata;
687
- }
688
- interface ItemMetadata {
689
- /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
690
- _id?: string | null;
691
- /** Index of the item within the request array. Allows for correlation between request and response items. */
692
- originalIndex?: number;
693
- /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
694
- success?: boolean;
695
- /** Details about the error in case of failure. */
696
- error?: ApplicationError;
697
- }
698
- interface BulkInviteToProgramResult {
699
- /** Invited participant metadata. */
700
- itemMetadata?: ItemMetadata;
701
- /** Invited participant */
702
- item?: Participant;
703
- }
704
- interface BulkActionMetadata {
705
- /** Number of items that were successfully processed. */
706
- totalSuccesses?: number;
707
- /** Number of items that couldn't be processed. */
708
- totalFailures?: number;
709
- /** Number of failures without details because detailed failure threshold was exceeded. */
710
- undetailedFailures?: number;
711
- }
712
- interface ParticipantInvited {
713
- /**
714
- * Program to which bulk invite participants.
715
- * @format GUID
716
- */
717
- programId?: string;
718
- /**
719
- * Invited member to program
720
- * @format GUID
721
- */
722
- memberId?: string;
723
- }
724
- interface BulkInviteAllToProgramRequest {
725
- /**
726
- * Program to which bulk add participants.
727
- * @format GUID
728
- */
729
- programId: string;
730
- /**
731
- * Exclude site members.
732
- * @format GUID
733
- * @maxSize 100
734
- */
735
- excludeMemberIds?: string[];
736
- }
737
- interface BulkInviteAllToProgramResponse {
738
- /** Bulk action metadata. */
739
- bulkActionMetadata?: BulkActionMetadata;
740
- }
741
- interface BulkAddToProgramRequest {
742
- /**
743
- * Program to which bulk add participants.
744
- * @format GUID
745
- */
746
- programId: string;
747
- /**
748
- * Site members.
749
- * @format GUID
750
- * @minSize 1
751
- * @maxSize 1000
752
- */
753
- memberIds?: string[];
754
- /** Return added participants in the response or not. */
755
- returnEntity?: boolean;
756
- }
757
- interface BulkAddToProgramResponse {
758
- /** Participants created by bulk action */
759
- results?: BulkAddToProgramResult[];
760
- /** Bulk action metadata. */
761
- bulkActionMetadata?: BulkActionMetadata;
762
- }
763
- interface BulkAddToProgramResult {
764
- /** Added participant metadata. */
765
- itemMetadata?: ItemMetadata;
766
- /** Added participant */
767
- item?: Participant;
768
- }
769
- interface BulkApproveParticipantRequest {
770
- /**
771
- * Participants to add
772
- * @format GUID
773
- * @maxSize 100
774
- */
775
- participantIds: string[];
776
- /**
777
- * program to approve participant
778
- * @format GUID
779
- */
780
- programId?: string;
781
- /** Return approved participants in the response or not */
782
- returnEntity?: boolean;
783
- }
784
- interface BulkApproveParticipantResponse {
785
- /** Participants approved by bulk action */
786
- results?: BulkApproveParticipantResult[];
787
- /** Bulk action metadata */
788
- bulkActionMetadata?: BulkActionMetadata;
789
- }
790
- interface BulkApproveParticipantResult {
791
- /** Approved participant metadata */
792
- itemMetadata?: ItemMetadata;
793
- /** Approved or existing participant */
794
- item?: Participant;
795
- }
796
- interface ParticipantApproved {
797
- /**
798
- * Program ID which participant approved
799
- * @format GUID
800
- */
801
- programId?: string;
802
- /**
803
- * Member ID of participant approved
804
- * @format GUID
805
- */
806
- memberId?: string;
807
- }
808
- interface BulkApproveAllParticipantRequest {
809
- /**
810
- * Program to approve all participants.
811
- * @format GUID
812
- */
813
- programId?: string;
814
- /**
815
- * Exclude site members.
816
- * @format GUID
817
- * @maxSize 100
818
- */
819
- excludeParticipantIds?: string[];
820
- }
821
- interface BulkApproveAllParticipantResponse {
822
- /**
823
- * Job id with async process
824
- * @format GUID
825
- */
826
- jobId?: string;
827
- }
828
- interface ExportParticipantsStatsRequest {
829
- /**
830
- * program id to export data from
831
- * @format GUID
832
- */
833
- programId: string;
834
- }
835
- interface ExportParticipantsStatsResponse {
836
- }
837
- interface ParticipantExportsFinished {
838
- /**
839
- * program id from which stats were exported
840
- * @format GUID
841
- */
842
- programId?: string;
843
- /**
844
- * user id of program owner
845
- * @format GUID
846
- */
847
- userId?: string;
848
- /**
849
- * url to download report
850
- * @format WEB_URL
851
- */
852
- downloadUrl?: string;
853
- /** days url will be downloadable */
854
- downloadUrlTtlDays?: number;
855
- }
856
- /** @docsIgnore */
857
- type CreateParticipantApplicationErrors = {
858
- code?: 'INVALID_PAYMENT_INFO';
859
- description?: string;
860
- data?: Record<string, any>;
861
- };
862
- interface BaseEventMetadata {
863
- /**
864
- * App instance ID.
865
- * @format GUID
866
- */
867
- instanceId?: string | null;
868
- /**
869
- * Event type.
870
- * @maxLength 150
871
- */
872
- eventType?: string;
873
- /** The identification type and identity data. */
874
- identity?: IdentificationData;
875
- }
876
- interface EventMetadata extends BaseEventMetadata {
877
- /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
878
- _id?: string;
879
- /**
880
- * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
881
- * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
882
- */
883
- entityFqdn?: string;
884
- /**
885
- * Event action name, placed at the top level to make it easier for users to dispatch messages.
886
- * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
887
- */
888
- slug?: string;
889
- /** ID of the entity associated with the event. */
890
- entityId?: string;
891
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
892
- eventTime?: Date | null;
893
- /**
894
- * Whether the event was triggered as a result of a privacy regulation application
895
- * (for example, GDPR).
896
- */
897
- triggeredByAnonymizeRequest?: boolean | null;
898
- /** If present, indicates the action that triggered the event. */
899
- originatedFrom?: string | null;
900
- /**
901
- * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
902
- * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
903
- */
904
- entityEventSequence?: string | null;
905
- }
906
- interface ParticipantAddedEnvelope {
907
- data: ParticipantAdded;
908
- metadata: EventMetadata;
909
- }
910
- /** @permissionScope Manage Challenges
911
- * @permissionScopeId SCOPE.CHALLENGES.MANAGE
912
- * @permissionId ONLINE_PROGRAMS.PARTICIPANT_READ
913
- * @webhook
914
- * @eventType wix.online_programs.v3.participant_added
915
- * @slug added
916
- * @documentationMaturity preview
917
- */
918
- declare function onParticipantAdded(handler: (event: ParticipantAddedEnvelope) => void | Promise<void>): void;
919
- interface ParticipantApprovedEnvelope {
920
- data: ParticipantApproved;
921
- metadata: EventMetadata;
922
- }
923
- /** @permissionScope Manage Challenges
924
- * @permissionScopeId SCOPE.CHALLENGES.MANAGE
925
- * @permissionId ONLINE_PROGRAMS.PARTICIPANT_READ
926
- * @webhook
927
- * @eventType wix.online_programs.v3.participant_participant_approved
928
- * @serviceIdentifier wix.onlineprograms.participants.v3.ManageParticipantsService
929
- * @slug participant_approved
930
- * @documentationMaturity preview
931
- */
932
- declare function onParticipantApproved(handler: (event: ParticipantApprovedEnvelope) => void | Promise<void>): void;
933
- interface ParticipantInvitedEnvelope {
934
- data: ParticipantInvited;
935
- metadata: EventMetadata;
936
- }
937
- /** @permissionScope Manage Challenges
938
- * @permissionScopeId SCOPE.CHALLENGES.MANAGE
939
- * @permissionId ONLINE_PROGRAMS.PARTICIPANT_READ
940
- * @webhook
941
- * @eventType wix.online_programs.v3.participant_participant_invited
942
- * @serviceIdentifier wix.onlineprograms.participants.v3.ManageParticipantsService
943
- * @slug participant_invited
944
- * @documentationMaturity preview
945
- */
946
- declare function onParticipantInvited(handler: (event: ParticipantInvitedEnvelope) => void | Promise<void>): void;
947
- /** @param participant - Participant to create
948
- * @public
949
- * @documentationMaturity preview
950
- * @requiredField participant
951
- * @permissionId ONLINE_PROGRAMS.PARTICIPANT_CREATE
952
- * @returns Created participant
953
- * @fqn wix.onlineprograms.participants.v3.ParticipantsService.CreateParticipant
954
- */
955
- declare function createParticipant(participant: Participant): Promise<NonNullablePaths<Participant, `memberId` | `programId` | `progress.totalStepsCompleted` | `progress.totalStepsAvailable` | `progress.completionPercentage` | `state` | `joinedInfo.singlePaymentDetails.paymentOrderId` | `joinedInfo.paidPlanDetails.paidPlanId` | `joinedInfo.freeCouponDetails.freeCouponId` | `joinedInfo.timeZone` | `joinedInfo.startDate` | `joinedInfo.joinPath` | `member.contactId`, 4> & {
956
- __applicationErrorsType?: CreateParticipantApplicationErrors;
957
- }>;
958
- /**
959
- * Creates participants in bulk.
960
- * @param participants - List of participants you want to create
961
- * @public
962
- * @documentationMaturity preview
963
- * @requiredField participants
964
- * @permissionId ONLINE_PROGRAMS.PARTICIPANT_CREATE
965
- * @fqn wix.onlineprograms.participants.v3.ParticipantsService.BulkCreateParticipant
966
- */
967
- 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>>;
968
- interface BulkCreateParticipantOptions {
969
- /** Whether to return entities in response or not. */
970
- returnEntity?: boolean;
971
- }
972
- /**
973
- * Bulk adds all site members to program, but not more then 1000.
974
- * Participant will be either created in state Joined, or updated to that state
975
- * from pending one.
976
- * @param programId - Program to which bulk add participants.
977
- * @public
978
- * @documentationMaturity preview
979
- * @requiredField programId
980
- * @permissionId ONLINE_PROGRAMS.PARTICIPANT_ADD
981
- * @applicableIdentity APP
982
- * @fqn wix.onlineprograms.participants.v3.ParticipantsService.BulkAddAllToProgram
983
- */
984
- declare function bulkAddAllToProgram(programId: string, options?: BulkAddAllToProgramOptions): Promise<NonNullablePaths<BulkAddAllToProgramResponse, `jobId`, 2>>;
985
- interface BulkAddAllToProgramOptions {
986
- /**
987
- * Exclude site members.
988
- * @format GUID
989
- * @maxSize 100
990
- */
991
- excludeMemberIds?: string[];
992
- }
993
- /**
994
- * Delete participant from program. Removes participant from member
995
- * group. Leaves him in Social Group.
996
- * @param participantId - Participants to delete
997
- * @public
998
- * @documentationMaturity preview
999
- * @requiredField participantId
1000
- * @permissionId ONLINE_PROGRAMS.PARTICIPANT_DELETE
1001
- * @fqn wix.onlineprograms.participants.v3.ParticipantsService.DeleteParticipant
1002
- */
1003
- declare function deleteParticipant(participantId: string): Promise<void>;
1004
- /**
1005
- * Issue certificate by site admin
1006
- * @param participantId - Participant to get certificate
1007
- * @public
1008
- * @documentationMaturity preview
1009
- * @requiredField participantId
1010
- * @permissionId ONLINE_PROGRAMS.PARTICIPANT_ISSUE_CERTIFICATE
1011
- * @applicableIdentity APP
1012
- * @fqn wix.onlineprograms.participants.v3.ParticipantsService.IssueCertificate
1013
- */
1014
- 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.singlePaymentDetails.paymentOrderId` | `participant.joinedInfo.paidPlanDetails.paidPlanId` | `participant.joinedInfo.freeCouponDetails.freeCouponId` | `participant.joinedInfo.timeZone` | `participant.joinedInfo.startDate` | `participant.joinedInfo.joinPath` | `participant.member.contactId`, 5>>;
1015
- /**
1016
- * Get program's completion stats
1017
- * @param programId - program id to get stats for
1018
- * @public
1019
- * @documentationMaturity preview
1020
- * @requiredField programId
1021
- * @permissionId ONLINE_PROGRAMS.STATS_READ
1022
- * @applicableIdentity APP
1023
- * @fqn wix.onlineprograms.participants.v3.ParticipantsService.GetCompletionStats
1024
- */
1025
- declare function getCompletionStats(programId: string): Promise<NonNullablePaths<GetCompletionStatsResponse, `completedAll` | `completionRate`, 2>>;
1026
- /**
1027
- * Get premium stats
1028
- * @public
1029
- * @documentationMaturity preview
1030
- * @permissionId ONLINE_PROGRAMS.STATS_READ
1031
- * @applicableIdentity APP
1032
- * @fqn wix.onlineprograms.participants.v3.ParticipantsService.GetPremiumStats
1033
- */
1034
- declare function getPremiumStats(): Promise<NonNullablePaths<GetPremiumStatsResponse, `hasPremium` | `activeParticipantsCount` | `activeParticipantsLimit`, 2>>;
1035
- /**
1036
- * Returns participant.
1037
- * @param participantId - Participant id to fetch
1038
- * @public
1039
- * @documentationMaturity preview
1040
- * @requiredField participantId
1041
- * @permissionId ONLINE_PROGRAMS.PARTICIPANT_READ
1042
- * @applicableIdentity APP
1043
- * @applicableIdentity MEMBER
1044
- * @returns existing participant
1045
- * @fqn wix.onlineprograms.participants.v3.ParticipantsService.GetParticipant
1046
- */
1047
- declare function getParticipant(participantId: string): Promise<NonNullablePaths<Participant, `memberId` | `programId` | `progress.totalStepsCompleted` | `progress.totalStepsAvailable` | `progress.completionPercentage` | `state` | `joinedInfo.singlePaymentDetails.paymentOrderId` | `joinedInfo.paidPlanDetails.paidPlanId` | `joinedInfo.freeCouponDetails.freeCouponId` | `joinedInfo.timeZone` | `joinedInfo.startDate` | `joinedInfo.joinPath` | `member.contactId`, 4>>;
1048
- /**
1049
- * Query existing participants
1050
- * @public
1051
- * @documentationMaturity preview
1052
- * @permissionId ONLINE_PROGRAMS.PARTICIPANT_READ
1053
- * @applicableIdentity APP
1054
- * @applicableIdentity MEMBER
1055
- * @fqn wix.onlineprograms.participants.v3.ParticipantsService.QueryParticipants
1056
- */
1057
- declare function queryParticipants(): ParticipantsQueryBuilder;
1058
- interface QueryCursorResult {
1059
- cursors: Cursors;
1060
- hasNext: () => boolean;
1061
- hasPrev: () => boolean;
1062
- length: number;
1063
- pageSize: number;
1064
- }
1065
- interface ParticipantsQueryResult extends QueryCursorResult {
1066
- items: Participant[];
1067
- query: ParticipantsQueryBuilder;
1068
- next: () => Promise<ParticipantsQueryResult>;
1069
- prev: () => Promise<ParticipantsQueryResult>;
1070
- }
1071
- interface ParticipantsQueryBuilder {
1072
- /** @param propertyName - Property whose value is compared with `value`.
1073
- * @param value - Value to compare against.
1074
- * @documentationMaturity preview
1075
- */
1076
- eq: (propertyName: '_id' | 'memberId' | 'programId' | 'state', value: any) => ParticipantsQueryBuilder;
1077
- /** @param propertyName - Property whose value is compared with `value`.
1078
- * @param value - Value to compare against.
1079
- * @documentationMaturity preview
1080
- */
1081
- ge: (propertyName: 'joinedInfo.startDate', value: any) => ParticipantsQueryBuilder;
1082
- /** @param propertyName - Property whose value is compared with `value`.
1083
- * @param value - Value to compare against.
1084
- * @documentationMaturity preview
1085
- */
1086
- gt: (propertyName: 'joinedInfo.startDate', value: any) => ParticipantsQueryBuilder;
1087
- /** @param propertyName - Property whose value is compared with `value`.
1088
- * @param value - Value to compare against.
1089
- * @documentationMaturity preview
1090
- */
1091
- le: (propertyName: 'joinedInfo.startDate', value: any) => ParticipantsQueryBuilder;
1092
- /** @param propertyName - Property whose value is compared with `value`.
1093
- * @param value - Value to compare against.
1094
- * @documentationMaturity preview
1095
- */
1096
- lt: (propertyName: 'joinedInfo.startDate', value: any) => ParticipantsQueryBuilder;
1097
- /** @documentationMaturity preview */
1098
- in: (propertyName: '_id' | 'memberId' | 'state', value: any) => ParticipantsQueryBuilder;
1099
- /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
1100
- * @documentationMaturity preview
1101
- */
1102
- ascending: (...propertyNames: Array<'_id' | '_createdDate' | 'state' | 'joinedInfo.startDate'>) => ParticipantsQueryBuilder;
1103
- /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
1104
- * @documentationMaturity preview
1105
- */
1106
- descending: (...propertyNames: Array<'_id' | '_createdDate' | 'state' | 'joinedInfo.startDate'>) => ParticipantsQueryBuilder;
1107
- /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
1108
- * @documentationMaturity preview
1109
- */
1110
- limit: (limit: number) => ParticipantsQueryBuilder;
1111
- /** @param cursor - A pointer to specific record
1112
- * @documentationMaturity preview
1113
- */
1114
- skipTo: (cursor: string) => ParticipantsQueryBuilder;
1115
- /** @documentationMaturity preview */
1116
- find: () => Promise<ParticipantsQueryResult>;
1117
- }
1118
- /**
1119
- * @hidden
1120
- * @fqn wix.onlineprograms.participants.v3.ParticipantsService.QueryParticipants
1121
- * @requiredField query
1122
- */
1123
- declare function typedQueryParticipants(query: CursorQuery): Promise<NonNullablePaths<QueryParticipantsResponse, `participants` | `participants.${number}.memberId` | `participants.${number}.programId` | `participants.${number}.progress.totalStepsCompleted` | `participants.${number}.progress.totalStepsAvailable` | `participants.${number}.progress.completionPercentage` | `participants.${number}.state` | `participants.${number}.joinedInfo.singlePaymentDetails.paymentOrderId` | `participants.${number}.joinedInfo.paidPlanDetails.paidPlanId` | `participants.${number}.joinedInfo.freeCouponDetails.freeCouponId` | `participants.${number}.joinedInfo.timeZone` | `participants.${number}.joinedInfo.startDate` | `participants.${number}.joinedInfo.joinPath` | `participants.${number}.member.contactId`, 6>>;
1124
- /**
1125
- * Get access status
1126
- * @public
1127
- * @documentationMaturity preview
1128
- * @permissionId ONLINE_PROGRAMS.PARTICIPANT_READ
1129
- * @applicableIdentity APP
1130
- * @applicableIdentity MEMBER
1131
- * @fqn wix.onlineprograms.participants.v3.ParticipantsService.GetAccessStatus
1132
- */
1133
- declare function getAccessStatus(): Promise<NonNullablePaths<GetAccessStatusResponse, `isBlocked`, 2>>;
1134
- /**
1135
- * Bulk invites participants to program.
1136
- * For each member participant in Invited state is created.
1137
- * @param programId - Program to which bulk invite participants.
1138
- * @public
1139
- * @documentationMaturity preview
1140
- * @requiredField programId
1141
- * @permissionId ONLINE_PROGRAMS.PARTICIPANT_INVITE
1142
- * @applicableIdentity APP
1143
- * @fqn wix.onlineprograms.participants.v3.ManageParticipantsService.BulkInviteToProgram
1144
- */
1145
- 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>>;
1146
- interface BulkInviteToProgramOptions {
1147
- /**
1148
- * Return added participants in the response or not.
1149
- * @format GUID
1150
- * @minSize 1
1151
- * @maxSize 100
1152
- */
1153
- memberIds?: string[];
1154
- /** Return invited participants in the response or not. */
1155
- returnEntity?: boolean;
1156
- }
1157
- /**
1158
- * Bulk invites all participants to program, but not more then 1000.
1159
- * For each member participant in Invited state is created.
1160
- * @param programId - Program to which bulk add participants.
1161
- * @public
1162
- * @documentationMaturity preview
1163
- * @requiredField programId
1164
- * @permissionId ONLINE_PROGRAMS.PARTICIPANT_INVITE
1165
- * @applicableIdentity APP
1166
- * @fqn wix.onlineprograms.participants.v3.ManageParticipantsService.BulkInviteAllToProgram
1167
- */
1168
- declare function bulkInviteAllToProgram(programId: string, options?: BulkInviteAllToProgramOptions): Promise<NonNullablePaths<BulkInviteAllToProgramResponse, `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 3>>;
1169
- interface BulkInviteAllToProgramOptions {
1170
- /**
1171
- * Exclude site members.
1172
- * @format GUID
1173
- * @maxSize 100
1174
- */
1175
- excludeMemberIds?: string[];
1176
- }
1177
- /**
1178
- * Bulk adds participants to program.
1179
- * Participant will be either created in state Joined, or updated to that state
1180
- * from pending one.
1181
- * @param programId - Program to which bulk add participants.
1182
- * @public
1183
- * @documentationMaturity preview
1184
- * @requiredField programId
1185
- * @permissionId ONLINE_PROGRAMS.PARTICIPANT_ADD
1186
- * @applicableIdentity APP
1187
- * @fqn wix.onlineprograms.participants.v3.ManageParticipantsService.BulkAddToProgram
1188
- */
1189
- 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>>;
1190
- interface BulkAddToProgramOptions {
1191
- /**
1192
- * Site members.
1193
- * @format GUID
1194
- * @minSize 1
1195
- * @maxSize 1000
1196
- */
1197
- memberIds?: string[];
1198
- /** Return added participants in the response or not. */
1199
- returnEntity?: boolean;
1200
- }
1201
- /**
1202
- * Bulk approves participants, who asked to join private program (aka in
1203
- * state `APPROVAL_PENDING`). If participant was in other state, no effect and
1204
- * error returned.
1205
- * @param participantIds - Participants to add
1206
- * @public
1207
- * @documentationMaturity preview
1208
- * @requiredField participantIds
1209
- * @permissionId ONLINE_PROGRAMS.PARTICIPANT_APPROVE
1210
- * @fqn wix.onlineprograms.participants.v3.ManageParticipantsService.BulkApproveParticipant
1211
- */
1212
- 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>>;
1213
- interface BulkApproveParticipantOptions {
1214
- /**
1215
- * program to approve participant
1216
- * @format GUID
1217
- */
1218
- programId?: string;
1219
- /** Return approved participants in the response or not */
1220
- returnEntity?: boolean;
1221
- }
5
+ /** @hidden */
6
+ type ParticipantSearch = {};
1222
7
  /**
1223
- * Bulk approves all pending participants, who asked to join private program (aka
1224
- * in state `APPROVAL_PENDING`).
8
+ * Retrieves a list of programs according to search criteria
9
+ * @param search - Query to search programs
1225
10
  * @public
1226
11
  * @documentationMaturity preview
1227
- * @permissionId ONLINE_PROGRAMS.PARTICIPANT_APPROVE
1228
- * @fqn wix.onlineprograms.participants.v3.ManageParticipantsService.BulkApproveAllParticipant
12
+ * @requiredField search
13
+ * @permissionId online_programs:v3:participant:search_participants
14
+ * @fqn wix.onlineprograms.participants.v3.ParticipantsService.SearchParticipants
1229
15
  */
1230
- declare function bulkApproveAllParticipant(options?: BulkApproveAllParticipantOptions): Promise<NonNullablePaths<BulkApproveAllParticipantResponse, `jobId`, 2>>;
1231
- interface BulkApproveAllParticipantOptions {
1232
- /**
1233
- * Program to approve all participants.
1234
- * @format GUID
1235
- */
1236
- programId?: string;
1237
- /**
1238
- * Exclude site members.
1239
- * @format GUID
1240
- * @maxSize 100
1241
- */
1242
- excludeParticipantIds?: string[];
1243
- }
16
+ declare function searchParticipants(search: CursorSearch): Promise<SearchParticipantsResponse>;
1244
17
 
1245
- 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 CreateParticipantApplicationErrors, 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 FreeCouponDetails, 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 JoinedInfoJoinPathDetailsOneOf, type Member, type MessageEnvelope, type PaidPlanDetails, type Participant, type ParticipantAdded, type ParticipantAddedEnvelope, type ParticipantApproved, type ParticipantApprovedEnvelope, type ParticipantExportsFinished, type ParticipantInvited, type ParticipantInvitedEnvelope, type ParticipantsQueryBuilder, type ParticipantsQueryResult, type Progress, type QueryParticipantsRequest, type QueryParticipantsResponse, type RestoreInfo, type SinglePaymentDetails, 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, typedQueryParticipants };
18
+ export { CursorSearch, type ParticipantSearch, SearchParticipantsResponse, searchParticipants };