@wix/auto_sdk_online-programs_participants 1.0.13 → 1.0.15

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 +137 -49
  2. package/build/cjs/index.js +1188 -205
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +12 -690
  5. package/build/cjs/index.typings.js +1074 -129
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +1301 -165
  8. package/build/cjs/meta.js +924 -110
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/cjs/online-programs-participants-v3-participant-participants.universal-B-mpcshi.d.ts +2268 -0
  11. package/build/es/index.d.mts +137 -49
  12. package/build/es/index.mjs +1150 -186
  13. package/build/es/index.mjs.map +1 -1
  14. package/build/es/index.typings.d.mts +12 -690
  15. package/build/es/index.typings.mjs +1036 -114
  16. package/build/es/index.typings.mjs.map +1 -1
  17. package/build/es/meta.d.mts +1301 -165
  18. package/build/es/meta.mjs +888 -95
  19. package/build/es/meta.mjs.map +1 -1
  20. package/build/es/online-programs-participants-v3-participant-participants.universal-B-mpcshi.d.mts +2268 -0
  21. package/build/internal/cjs/index.d.ts +152 -49
  22. package/build/internal/cjs/index.typings.d.ts +12 -690
  23. package/build/internal/cjs/meta.d.ts +1472 -265
  24. package/build/internal/cjs/online-programs-participants-v3-participant-participants.universal-Cicta6rs.d.ts +2311 -0
  25. package/build/internal/es/index.d.mts +152 -49
  26. package/build/internal/es/index.typings.d.mts +12 -690
  27. package/build/internal/es/meta.d.mts +1472 -265
  28. package/build/internal/es/online-programs-participants-v3-participant-participants.universal-Cicta6rs.d.mts +2311 -0
  29. package/package.json +5 -5
  30. package/build/internal/cjs/index.js +0 -495
  31. package/build/internal/cjs/index.js.map +0 -1
  32. package/build/internal/cjs/index.typings.js +0 -390
  33. package/build/internal/cjs/index.typings.js.map +0 -1
  34. package/build/internal/cjs/meta.js +0 -327
  35. package/build/internal/cjs/meta.js.map +0 -1
  36. package/build/internal/es/index.mjs +0 -461
  37. package/build/internal/es/index.mjs.map +0 -1
  38. package/build/internal/es/index.typings.mjs +0 -359
  39. package/build/internal/es/index.typings.mjs.map +0 -1
  40. package/build/internal/es/meta.mjs +0 -293
  41. package/build/internal/es/meta.mjs.map +0 -1
@@ -0,0 +1,2311 @@
1
+ import * as _wix_sdk_types from '@wix/sdk-types';
2
+ import { QuerySpec, SearchSpec, Query, Search, NonNullablePaths } from '@wix/sdk-types';
3
+
4
+ /**
5
+ * Participant entity represents a site member who takes part in a specific Online Program.
6
+ * Participants have access to the program's content and progress through the program by completing its steps.
7
+ * A participant can join through a join application flow or be manually added by the program owner.
8
+ * A participant's status depends on their progress and the program's settings (e.g., start and end dates). Participation may also be temporarily suspended.
9
+ */
10
+ interface Participant {
11
+ /**
12
+ * Participant ID.
13
+ * @format GUID
14
+ * @readonly
15
+ */
16
+ _id?: string | null;
17
+ /**
18
+ * Participant revision (for optimistic concurrency control).
19
+ * @readonly
20
+ */
21
+ revision?: string | null;
22
+ /**
23
+ * Participant creation date.
24
+ * @readonly
25
+ */
26
+ _createdDate?: Date | null;
27
+ /**
28
+ * Date the participant was last updated.
29
+ * @readonly
30
+ */
31
+ _updatedDate?: Date | null;
32
+ /**
33
+ * Member ID of the participant on the site.
34
+ * @format GUID
35
+ * @readonly
36
+ */
37
+ memberId?: string;
38
+ /**
39
+ * ID of the program the participant is enrolled in.
40
+ * @format GUID
41
+ * @readonly
42
+ */
43
+ programId?: string;
44
+ /**
45
+ * Program completion progress. This field is conditional and must be explicitly requested via `fields` parameter.
46
+ * @readonly
47
+ */
48
+ progress?: Progress;
49
+ /**
50
+ * Certificate info for participant
51
+ * @readonly
52
+ */
53
+ certificateInfo?: CertificateInfo;
54
+ /**
55
+ * Site member info snapshot for the participant
56
+ * @readonly
57
+ */
58
+ member?: Member;
59
+ /**
60
+ * Last activity date of the participant in the program (can either be status change or step resolution).
61
+ * @readonly
62
+ */
63
+ lastActivityDate?: Date | null;
64
+ /**
65
+ * Participant's enrollment status in the program.
66
+ * @readonly
67
+ */
68
+ enrollmentStatus?: EnrollmentStatusWithLiterals;
69
+ /**
70
+ * Participant's progress status in the program.
71
+ * @readonly
72
+ */
73
+ progressStatus?: ProgressStatusWithLiterals;
74
+ /** Additional information about the participant's enrollment and completion timeframe in the program. */
75
+ enrollmentInfo?: EnrollmentInfo;
76
+ /** Extended fields for participant (can be used for storing custom data). */
77
+ extendedFields?: ExtendedFields;
78
+ /** Tags for categorizing and organizing participants. */
79
+ tags?: Tags;
80
+ }
81
+ declare enum PricingType {
82
+ /** Member joined a program that is configured as free to join, with no payment required. */
83
+ FREE = "FREE",
84
+ /** Member was added to the program by site owner. */
85
+ ADDED_MANUALLY = "ADDED_MANUALLY",
86
+ /** Member paid once to join the program. */
87
+ SINGLE_PAYMENT = "SINGLE_PAYMENT",
88
+ /** Member joined using a Pricing Plan. */
89
+ PAID_PLAN = "PAID_PLAN",
90
+ /** Member joined a paid program using a coupon that provided 100% discount. */
91
+ FREE_COUPON = "FREE_COUPON"
92
+ }
93
+ /** @enumType */
94
+ type PricingTypeWithLiterals = PricingType | 'FREE' | 'ADDED_MANUALLY' | 'SINGLE_PAYMENT' | 'PAID_PLAN' | 'FREE_COUPON';
95
+ interface SinglePaymentDetails {
96
+ /**
97
+ * ID of the cashier order which was used to pay for joining the program.
98
+ * @format GUID
99
+ * @immutable
100
+ */
101
+ paymentOrderId?: string;
102
+ /**
103
+ * ID of the offline transaction if the participant used an offline payment method (e.g., cash, check). Null if online payment was used.
104
+ * @format GUID
105
+ * @immutable
106
+ */
107
+ offlineTransactionId?: string | null;
108
+ }
109
+ interface PaidPlanDetails {
110
+ /**
111
+ * ID of the Paid Plan for which member has paid to join the program.
112
+ * @format GUID
113
+ * @immutable
114
+ */
115
+ paidPlanId?: string;
116
+ }
117
+ interface FreeCouponDetails {
118
+ /**
119
+ * ID of the coupon which was applied and gave 100% discount to join the program for free.
120
+ * @format GUID
121
+ * @immutable
122
+ */
123
+ freeCouponId?: string;
124
+ }
125
+ interface Progress {
126
+ /** Number of program steps completed by member. */
127
+ totalStepsCompleted?: number;
128
+ /** Total number of program steps available to resolve. */
129
+ totalStepsAvailable?: number;
130
+ /**
131
+ * Participant's completion percentage. For completed participants, this is 100.0. Otherwise, it is calculated as
132
+ * (total_steps_completed / total_steps_available) * 100, capped at 100, and rounded to 1 decimal place.
133
+ * @max 100
134
+ */
135
+ completionPercentage?: number;
136
+ }
137
+ interface CertificateInfo {
138
+ /**
139
+ * Date when the certificate was issued (UTC).
140
+ * @readonly
141
+ */
142
+ issueDate?: Date | null;
143
+ }
144
+ interface Member {
145
+ /**
146
+ * First name of the site member. Null if the member has not provided this information in their profile.
147
+ * @readonly
148
+ * @maxLength 1000
149
+ */
150
+ firstName?: string | null;
151
+ /**
152
+ * Last name of the site member. Null if the member has not provided this information in their profile.
153
+ * @readonly
154
+ * @maxLength 1000
155
+ */
156
+ lastName?: string | null;
157
+ /**
158
+ * Email of the site member. Null if the member has not provided this information in their profile.
159
+ * @readonly
160
+ * @format EMAIL
161
+ */
162
+ email?: string | null;
163
+ /**
164
+ * Contact ID for accessing additional member information via the Contacts API. Use this to retrieve extended contact details like phone numbers, addresses, and custom fields. Null if the member has not provided this information in their profile.
165
+ * @format GUID
166
+ * @readonly
167
+ */
168
+ contactId?: string | null;
169
+ /**
170
+ * Member nickname. Null if the member has not provided this information in their profile.
171
+ * @readonly
172
+ * @maxLength 1000
173
+ */
174
+ nickname?: string | null;
175
+ /**
176
+ * Profile image URL of the site member.
177
+ * @readonly
178
+ * @format WEB_URL
179
+ */
180
+ profileImageUrl?: string | null;
181
+ }
182
+ declare enum EnrollmentStatus {
183
+ /** Participant is actively enrolled in the program. */
184
+ JOINED = "JOINED",
185
+ /** Enrollment temporarily suspended due to payment issues. */
186
+ SUSPENDED = "SUSPENDED",
187
+ /** Automatically removed via a Wix Automations workflow. */
188
+ AUTO_REMOVED = "AUTO_REMOVED",
189
+ /** Removed from the program by the site owner. */
190
+ REMOVED = "REMOVED",
191
+ /** Participant voluntarily left the program. */
192
+ LEFT = "LEFT"
193
+ }
194
+ /** @enumType */
195
+ type EnrollmentStatusWithLiterals = EnrollmentStatus | 'JOINED' | 'SUSPENDED' | 'AUTO_REMOVED' | 'REMOVED' | 'LEFT';
196
+ declare enum ProgressStatus {
197
+ /** Enrolled but no steps completed yet. */
198
+ NOT_STARTED = "NOT_STARTED",
199
+ /** At least one step completed but program not yet finished. */
200
+ IN_PROGRESS = "IN_PROGRESS",
201
+ /** Participant successfully completed the program. */
202
+ COMPLETED = "COMPLETED",
203
+ /** Participant failed to complete the program within the deadline. */
204
+ FAILED = "FAILED",
205
+ /** Progress tracking is not applicable — participant left, was removed, or was auto-removed. */
206
+ NOT_APPLICABLE = "NOT_APPLICABLE"
207
+ }
208
+ /** @enumType */
209
+ type ProgressStatusWithLiterals = ProgressStatus | 'NOT_STARTED' | 'IN_PROGRESS' | 'COMPLETED' | 'FAILED' | 'NOT_APPLICABLE';
210
+ interface EnrollmentInfo extends EnrollmentInfoPricingTypeDetailsOneOf {
211
+ /** Details about a Single Payment enrollment. */
212
+ singlePaymentDetails?: SinglePaymentDetails;
213
+ /** Details about a Paid Plan enrollment. */
214
+ paidPlanDetails?: PaidPlanDetails;
215
+ /** Details about a Free Coupon enrollment. */
216
+ freeCouponDetails?: FreeCouponDetails;
217
+ /**
218
+ * Time zone of the site when the participant was enrolled in the program, in IANA timezone format (e.g., "America/New_York").
219
+ * @maxLength 50
220
+ * @readonly
221
+ */
222
+ timeZone?: string;
223
+ /**
224
+ * Date when the participant starts the program. Equals the participant's `created_date` if the program has no configured start date; otherwise, equals the program's start date if the participant enrolled before it began.
225
+ * @format LOCAL_DATE
226
+ * @readonly
227
+ */
228
+ startDate?: string;
229
+ /** Pricing type used for the participant's enrollment in the program. */
230
+ pricingType?: PricingTypeWithLiterals;
231
+ /**
232
+ * Date by which the participant must complete the program. Null if the program has no deadline. Set if the program has a fixed end date or a duration-based deadline calculated from the participant's start date.
233
+ * @format LOCAL_DATE
234
+ * @readonly
235
+ */
236
+ deadline?: string | null;
237
+ }
238
+ /** @oneof */
239
+ interface EnrollmentInfoPricingTypeDetailsOneOf {
240
+ /** Details about a Single Payment enrollment. */
241
+ singlePaymentDetails?: SinglePaymentDetails;
242
+ /** Details about a Paid Plan enrollment. */
243
+ paidPlanDetails?: PaidPlanDetails;
244
+ /** Details about a Free Coupon enrollment. */
245
+ freeCouponDetails?: FreeCouponDetails;
246
+ }
247
+ interface ExtendedFields {
248
+ /**
249
+ * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
250
+ * The value of each key is structured according to the schema defined when the extended fields were configured.
251
+ *
252
+ * You can only access fields for which you have the appropriate permissions.
253
+ *
254
+ * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
255
+ */
256
+ namespaces?: Record<string, Record<string, any>>;
257
+ }
258
+ /**
259
+ * Common object for tags.
260
+ * Should be use as in this example:
261
+ * message Foo {
262
+ * option (.wix.api.decomposite_of) = "wix.commons.v2.tags.Foo";
263
+ * string id = 1;
264
+ * ...
265
+ * Tags tags = 5
266
+ * }
267
+ *
268
+ * example of taggable entity
269
+ * {
270
+ * id: "123"
271
+ * tags: {
272
+ * public_tags: {
273
+ * tag_ids:["11","22"]
274
+ * },
275
+ * private_tags: {
276
+ * tag_ids: ["33", "44"]
277
+ * }
278
+ * }
279
+ * }
280
+ */
281
+ interface Tags {
282
+ /** Tags that require an additional permission in order to access them, typically restricted from site members and visitors. */
283
+ privateTags?: TagList;
284
+ /** Tags that are exposed to anyone with access to the entity, including site members and visitors. */
285
+ publicTags?: TagList;
286
+ }
287
+ interface TagList {
288
+ /**
289
+ * List of tag IDs.
290
+ * @maxSize 100
291
+ * @maxLength 5
292
+ */
293
+ tagIds?: string[];
294
+ }
295
+ /**
296
+ * Message for reindexing search data to a given search schema. Support both upsert and delete flows as well as
297
+ * performs context manipulation with adding tenant, provided in message to callscope.
298
+ */
299
+ interface ReindexMessage extends ReindexMessageActionOneOf {
300
+ upsert?: Upsert;
301
+ delete?: Delete;
302
+ entityFqdn?: string;
303
+ tenantId?: string;
304
+ eventTime?: Date | null;
305
+ entityEventSequence?: string | null;
306
+ schema?: Schema;
307
+ }
308
+ /** @oneof */
309
+ interface ReindexMessageActionOneOf {
310
+ upsert?: Upsert;
311
+ delete?: Delete;
312
+ }
313
+ interface Upsert {
314
+ entityId?: string;
315
+ entityAsJson?: string;
316
+ }
317
+ interface Delete {
318
+ entityId?: string;
319
+ }
320
+ interface Schema {
321
+ label?: string;
322
+ clusterName?: string;
323
+ }
324
+ interface ParticipantAdded {
325
+ /**
326
+ * ID of the program to which the participant was added.
327
+ * @format GUID
328
+ */
329
+ programId?: string;
330
+ /**
331
+ * Member ID of the participant on the site.
332
+ * @format GUID
333
+ */
334
+ memberId?: string;
335
+ }
336
+ /**
337
+ * Domain event emitted when a participant's tags are modified.
338
+ * Pre-publication rename from TagsModified; no consumers of the legacy FQN are known.
339
+ */
340
+ interface ParticipantTagsModified {
341
+ /** The Participant with updated tags */
342
+ participant?: Participant;
343
+ /** Tags that were assigned */
344
+ assignedTags?: Tags;
345
+ /** Tags that were unassigned */
346
+ unassignedTags?: Tags;
347
+ }
348
+ interface ParticipantCompletedProgram {
349
+ /**
350
+ * ID of the participant who completed the program.
351
+ * @format GUID
352
+ */
353
+ participantId?: string;
354
+ /**
355
+ * ID of the program which was completed.
356
+ * @format GUID
357
+ */
358
+ programId?: string;
359
+ /**
360
+ * Member ID of the participant who completed the program.
361
+ * @format GUID
362
+ */
363
+ memberId?: string;
364
+ }
365
+ interface ParticipantMissedProgramDeadline {
366
+ /**
367
+ * ID of the participant who missed the deadline.
368
+ * @format GUID
369
+ */
370
+ participantId?: string;
371
+ /**
372
+ * ID of the program for which the deadline was missed.
373
+ * @format GUID
374
+ */
375
+ programId?: string;
376
+ /**
377
+ * Member ID of the participant who missed the deadline.
378
+ * @format GUID
379
+ */
380
+ memberId?: string;
381
+ }
382
+ interface ParticipantProgramDurationEnded {
383
+ /**
384
+ * ID of the participant whose program duration ended.
385
+ * @format GUID
386
+ */
387
+ participantId?: string;
388
+ /**
389
+ * ID of the program whose duration ended for the participant.
390
+ * @format GUID
391
+ */
392
+ programId?: string;
393
+ /**
394
+ * Member ID of the participant whose program duration ended.
395
+ * @format GUID
396
+ */
397
+ memberId?: string;
398
+ }
399
+ /** Domain event emitted when a participant is removed from a program by an administrator. */
400
+ interface ParticipantRemoved {
401
+ /**
402
+ * ID of the participant who was removed.
403
+ * @format GUID
404
+ */
405
+ participantId?: string;
406
+ /**
407
+ * ID of the program from which the participant was removed.
408
+ * @format GUID
409
+ */
410
+ programId?: string;
411
+ /**
412
+ * Member ID of the participant who was removed.
413
+ * @format GUID
414
+ */
415
+ memberId?: string;
416
+ }
417
+ /** Domain event emitted when a participant voluntarily leaves a program. */
418
+ interface ParticipantLeft {
419
+ /**
420
+ * ID of the participant who left the program.
421
+ * @format GUID
422
+ */
423
+ participantId?: string;
424
+ /**
425
+ * ID of the program the participant left.
426
+ * @format GUID
427
+ */
428
+ programId?: string;
429
+ /**
430
+ * Member ID of the participant who left.
431
+ * @format GUID
432
+ */
433
+ memberId?: string;
434
+ }
435
+ interface ParticipantExportsFinished {
436
+ /**
437
+ * program id from which stats were exported
438
+ * @format GUID
439
+ */
440
+ programId?: string;
441
+ /**
442
+ * url to download report
443
+ * @format WEB_URL
444
+ */
445
+ downloadUrl?: string;
446
+ /** days url will be downloadable */
447
+ downloadUrlTtlDays?: number;
448
+ }
449
+ interface CreateParticipantRequest {
450
+ /** Participant to create */
451
+ participant: Participant;
452
+ /**
453
+ * Array of conditional fields to include in the response.
454
+ * Use `RequestedFields.PROGRESS` to include the progress field, which requires calculating completion statistics across all program steps. Only request this field when you need current progress data, as it impacts performance.
455
+ * @maxSize 1
456
+ */
457
+ fields?: RequestedFieldsWithLiterals[];
458
+ }
459
+ /**
460
+ * Enum for specifying which conditional fields to include in responses.
461
+ * Use these values in the `fields` parameter to request expensive or conditional fields.
462
+ */
463
+ declare enum RequestedFields {
464
+ /** Request the progress field to be calculated and included in the response. */
465
+ PROGRESS = "PROGRESS"
466
+ }
467
+ /** @enumType */
468
+ type RequestedFieldsWithLiterals = RequestedFields | 'PROGRESS';
469
+ interface CreateParticipantResponse {
470
+ /** Created participant */
471
+ participant?: Participant;
472
+ }
473
+ interface UpdateParticipantRequest {
474
+ /** Participant to update. Must include the participant ID. */
475
+ participant: Participant;
476
+ /**
477
+ * Array of conditional fields to include in the response.
478
+ * Use RequestedFields.PROGRESS to include the progress field which is conditionally returned.
479
+ * @maxSize 1
480
+ */
481
+ fields?: RequestedFieldsWithLiterals[];
482
+ /**
483
+ * Optional explicit field mask. If omitted, the API infers it from writable fields in `participant`.
484
+ * @internal
485
+ */
486
+ fieldMask?: string[];
487
+ }
488
+ interface UpdateParticipantResponse {
489
+ /** Updated participant */
490
+ participant?: Participant;
491
+ }
492
+ interface BulkCreateParticipantsRequest {
493
+ /**
494
+ * List of participants to create.
495
+ * @minSize 1
496
+ * @maxSize 100
497
+ */
498
+ participants: Participant[];
499
+ /** Whether to return entities in response or not. */
500
+ returnEntity?: boolean;
501
+ /**
502
+ * Array of conditional fields to include in the response.
503
+ * Use RequestedFields.PROGRESS to include the progress field which is conditionally returned.
504
+ * @maxSize 1
505
+ */
506
+ fields?: RequestedFieldsWithLiterals[];
507
+ }
508
+ interface BulkCreateParticipantsResponse {
509
+ /**
510
+ * Results of the bulk create operation.
511
+ * @minSize 1
512
+ * @maxSize 100
513
+ */
514
+ results?: BulkParticipantResult[];
515
+ /** Metadata about the bulk action. */
516
+ bulkActionMetadata?: BulkActionMetadata;
517
+ }
518
+ interface BulkParticipantResult {
519
+ /** Metadata for the item. */
520
+ itemMetadata?: ItemMetadata;
521
+ /** The participant entity. Empty if `return_entity` is `false`. */
522
+ item?: Participant;
523
+ }
524
+ interface ItemMetadata {
525
+ /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
526
+ _id?: string | null;
527
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
528
+ originalIndex?: number;
529
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
530
+ success?: boolean;
531
+ /** Details about the error in case of failure. */
532
+ error?: ApplicationError;
533
+ }
534
+ interface ApplicationError {
535
+ /** Error code. */
536
+ code?: string;
537
+ /** Description of the error. */
538
+ description?: string;
539
+ /** Data related to the error. */
540
+ data?: Record<string, any> | null;
541
+ }
542
+ interface BulkActionMetadata {
543
+ /** Number of items that were successfully processed. */
544
+ totalSuccesses?: number;
545
+ /** Number of items that couldn't be processed. */
546
+ totalFailures?: number;
547
+ /** Number of failures without details because detailed failure threshold was exceeded. */
548
+ undetailedFailures?: number;
549
+ }
550
+ interface BulkUpsertParticipantsMigrationRequest {
551
+ /**
552
+ * List of participants to create or update.
553
+ * @minSize 1
554
+ * @maxSize 100
555
+ */
556
+ participants?: ParticipantMigration[];
557
+ }
558
+ interface ParticipantMigration {
559
+ /** Participant to create or update. */
560
+ participant?: Participant;
561
+ /**
562
+ * Resolved step IDs to restore on participant.
563
+ * @maxSize 5000
564
+ * @format GUID
565
+ */
566
+ resolvedStepIds?: string[];
567
+ }
568
+ interface BulkUpsertParticipantsMigrationResponse {
569
+ /**
570
+ * Results of the bulk migration operation.
571
+ * @minSize 1
572
+ * @maxSize 100
573
+ */
574
+ results?: BulkParticipantMigrationResult[];
575
+ /** Metadata about the bulk action. */
576
+ bulkActionMetadata?: BulkActionMetadata;
577
+ }
578
+ interface BulkParticipantMigrationResult {
579
+ /** Metadata for the item. */
580
+ itemMetadata?: ItemMetadata;
581
+ /** Action type of bulk action (INSERT OR UPDATE) for that endpoint. */
582
+ action?: BulkActionTypeWithLiterals;
583
+ }
584
+ declare enum BulkActionType {
585
+ /** default action type, should never be used */
586
+ UNKNOWN_ACTION_TYPE = "UNKNOWN_ACTION_TYPE",
587
+ /** Action type for inserting new items. */
588
+ INSERT = "INSERT",
589
+ /** Action type for updating existing items. */
590
+ UPDATE = "UPDATE"
591
+ }
592
+ /** @enumType */
593
+ type BulkActionTypeWithLiterals = BulkActionType | 'UNKNOWN_ACTION_TYPE' | 'INSERT' | 'UPDATE';
594
+ interface DeleteAllParticipantsMigrationRequest {
595
+ }
596
+ interface DeleteAllParticipantsMigrationResponse {
597
+ }
598
+ interface ReindexParticipantsSearchRequest {
599
+ /**
600
+ * @minSize 1
601
+ * @maxSize 1000
602
+ * @format GUID
603
+ */
604
+ participantIds?: string[];
605
+ }
606
+ interface ReindexParticipantsSearchResponse {
607
+ }
608
+ interface SynchronizeTimeCapsuleTasksRequest {
609
+ /**
610
+ * Metasite whose participant finish tasks should be synchronized.
611
+ * @format GUID
612
+ */
613
+ metaSiteId?: string;
614
+ }
615
+ interface SynchronizeTimeCapsuleTasksResponse {
616
+ /**
617
+ * ID of the asynchronous job that will process the request. Pass this ID to Get Async Job to track the operation status.
618
+ * @format GUID
619
+ */
620
+ jobId?: string;
621
+ }
622
+ interface BulkCreateParticipantsForAllMembersRequest {
623
+ /**
624
+ * ID of the program for which to create participants for all site members in bulk.
625
+ * @format GUID
626
+ */
627
+ programId: string;
628
+ /**
629
+ * Site member IDs to exclude from bulk participant creation. Maximum 100 member IDs can be excluded.
630
+ * @format GUID
631
+ * @maxSize 100
632
+ */
633
+ excludeMemberIds?: string[];
634
+ }
635
+ interface BulkCreateParticipantsForAllMembersResponse {
636
+ /**
637
+ * ID of the asynchronous job that will process the request. Pass this ID to Get Async Job to track the operation status.
638
+ * @format GUID
639
+ */
640
+ jobId?: string;
641
+ }
642
+ interface DeleteParticipantRequest {
643
+ /**
644
+ * ID of the participant to delete.
645
+ * @format GUID
646
+ */
647
+ participantId: string;
648
+ }
649
+ interface DeleteParticipantResponse {
650
+ }
651
+ interface IssueCertificateRequest {
652
+ /**
653
+ * ID of the participant to issue the certificate to.
654
+ * @format GUID
655
+ */
656
+ participantId: string;
657
+ /**
658
+ * Array of conditional fields to include in the response.
659
+ * Use RequestedFields.PROGRESS to include the progress field which is conditionally returned.
660
+ * @maxSize 1
661
+ */
662
+ fields?: RequestedFieldsWithLiterals[];
663
+ }
664
+ interface IssueCertificateResponse {
665
+ /** Updated participant */
666
+ participant?: Participant;
667
+ }
668
+ interface GetCompletionStatsRequest {
669
+ /**
670
+ * ID of the program to retrieve completion statistics for.
671
+ * @format GUID
672
+ */
673
+ programId?: string;
674
+ }
675
+ interface GetCompletionStatsResponse {
676
+ /** Number of participants that completed the program */
677
+ completedParticipantsCount?: number;
678
+ /** Percentage of participants that completed the program */
679
+ completionRate?: number;
680
+ }
681
+ interface GetPremiumStatsRequest {
682
+ }
683
+ interface GetPremiumStatsResponse {
684
+ /** True if site has Online Programs premium feature */
685
+ premiumEnabled?: boolean;
686
+ /** Count of active participants on the site */
687
+ activeParticipantsCount?: number;
688
+ /** Limit of active participants on a site without premium */
689
+ activeParticipantsLimit?: number;
690
+ }
691
+ interface GetParticipantRequest {
692
+ /**
693
+ * ID of the participant to fetch.
694
+ * @format GUID
695
+ */
696
+ participantId: string;
697
+ /**
698
+ * Array of conditional fields to include in the response.
699
+ * Use RequestedFields.PROGRESS to include the progress field which is conditionally returned.
700
+ * @maxSize 1
701
+ */
702
+ fields?: RequestedFieldsWithLiterals[];
703
+ }
704
+ interface GetParticipantResponse {
705
+ /** The retrieved participant. */
706
+ participant?: Participant;
707
+ }
708
+ interface QueryParticipantsRequest {
709
+ /** Platformized query */
710
+ query?: QueryV2;
711
+ /**
712
+ * Array of conditional fields to include in the response.
713
+ * Use RequestedFields.PROGRESS to include the progress field which is conditionally returned.
714
+ * @maxSize 1
715
+ */
716
+ fields?: RequestedFieldsWithLiterals[];
717
+ }
718
+ interface QueryV2 extends QueryV2PagingMethodOneOf {
719
+ /** Paging options to limit and offset the number of items. */
720
+ paging?: Paging;
721
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
722
+ cursorPaging?: CursorPaging;
723
+ /**
724
+ * Filter object.
725
+ *
726
+ * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).
727
+ */
728
+ filter?: Record<string, any> | null;
729
+ /**
730
+ * Sort object.
731
+ *
732
+ * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).
733
+ * @maxSize 100
734
+ */
735
+ sort?: Sorting[];
736
+ /**
737
+ * Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned.
738
+ * @maxSize 100
739
+ * @maxLength 1000
740
+ */
741
+ fields?: string[];
742
+ /**
743
+ * Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned.
744
+ * @maxSize 100
745
+ * @maxLength 1000
746
+ */
747
+ fieldsets?: string[];
748
+ }
749
+ /** @oneof */
750
+ interface QueryV2PagingMethodOneOf {
751
+ /** Paging options to limit and offset the number of items. */
752
+ paging?: Paging;
753
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
754
+ cursorPaging?: CursorPaging;
755
+ }
756
+ interface Sorting {
757
+ /**
758
+ * Name of the field to sort by.
759
+ * @maxLength 512
760
+ */
761
+ fieldName?: string;
762
+ /** Sort order. */
763
+ order?: SortOrderWithLiterals;
764
+ }
765
+ declare enum SortOrder {
766
+ ASC = "ASC",
767
+ DESC = "DESC"
768
+ }
769
+ /** @enumType */
770
+ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
771
+ interface Paging {
772
+ /** Number of items to load. */
773
+ limit?: number | null;
774
+ /** Number of items to skip in the current sort order. */
775
+ offset?: number | null;
776
+ }
777
+ interface CursorPaging {
778
+ /**
779
+ * Maximum number of items to return in the results.
780
+ * @max 100
781
+ */
782
+ limit?: number | null;
783
+ /**
784
+ * Pointer to the next or previous page in the list of results.
785
+ *
786
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
787
+ * Not relevant for the first request.
788
+ * @maxLength 16000
789
+ */
790
+ cursor?: string | null;
791
+ }
792
+ interface QueryParticipantsResponse {
793
+ /** List of participants matching the query. */
794
+ participants?: Participant[];
795
+ /** Paging metadata. */
796
+ pagingMetadata?: PagingMetadataV2;
797
+ }
798
+ interface PagingMetadataV2 {
799
+ /** Number of items returned in the response. */
800
+ count?: number | null;
801
+ /** Offset that was requested. */
802
+ offset?: number | null;
803
+ /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
804
+ total?: number | null;
805
+ /** Flag that indicates the server failed to calculate the `total` field. */
806
+ tooManyToCount?: boolean | null;
807
+ /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
808
+ cursors?: Cursors;
809
+ /**
810
+ * Indicates if there are more results after the current page.
811
+ * If `true`, another page of results can be retrieved.
812
+ * If `false`, this is the last page.
813
+ * @internal
814
+ */
815
+ hasNext?: boolean | null;
816
+ }
817
+ interface Cursors {
818
+ /**
819
+ * Cursor string pointing to the next page in the list of results.
820
+ * @maxLength 16000
821
+ */
822
+ next?: string | null;
823
+ /**
824
+ * Cursor pointing to the previous page in the list of results.
825
+ * @maxLength 16000
826
+ */
827
+ prev?: string | null;
828
+ }
829
+ interface GetAccessStatusRequest {
830
+ }
831
+ interface GetAccessStatusResponse {
832
+ /** True if participants cannot access online programs due to some limitations */
833
+ accessBlocked?: boolean;
834
+ }
835
+ interface BulkUpdateParticipantTagsRequest {
836
+ /**
837
+ * Participant IDs to update tags for (1-100 items)
838
+ * @minSize 1
839
+ * @maxSize 100
840
+ * @format GUID
841
+ */
842
+ participantIds: string[];
843
+ /** Tags to assign to the Participants */
844
+ assignTags?: Tags;
845
+ /** Tags to unassign from the Participants */
846
+ unassignTags?: Tags;
847
+ }
848
+ interface BulkUpdateParticipantTagsResponse {
849
+ /**
850
+ * Results for each Participant
851
+ * @minSize 1
852
+ * @maxSize 100
853
+ */
854
+ results?: BulkUpdateParticipantTagsResult[];
855
+ /** Metadata about the bulk operation */
856
+ bulkActionMetadata?: BulkActionMetadata;
857
+ }
858
+ interface BulkUpdateParticipantTagsResult {
859
+ /** Metadata for this specific item */
860
+ itemMetadata?: ItemMetadata;
861
+ }
862
+ interface BulkUpdateParticipantTagsByFilterRequest {
863
+ /** WQL filter to select Participants */
864
+ filter: Record<string, any> | null;
865
+ /** Tags to assign to matching Participants */
866
+ assignTags?: Tags;
867
+ /** Tags to unassign from matching Participants */
868
+ unassignTags?: Tags;
869
+ }
870
+ interface BulkUpdateParticipantTagsByFilterResponse {
871
+ /**
872
+ * Job ID for tracking the async operation. Pass this ID to Get Async Job to track the operation status.
873
+ * @format GUID
874
+ */
875
+ jobId?: string;
876
+ }
877
+ interface SearchParticipantsRequest {
878
+ /** Query to search participants. */
879
+ search?: CursorSearch;
880
+ /**
881
+ * Array of conditional fields to include in the response.
882
+ * Use RequestedFields.PROGRESS to include the progress field which is conditionally returned.
883
+ * @maxSize 1
884
+ */
885
+ fields?: RequestedFieldsWithLiterals[];
886
+ }
887
+ interface CursorSearch extends CursorSearchPagingMethodOneOf {
888
+ /**
889
+ * Cursor paging options.
890
+ *
891
+ * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
892
+ */
893
+ cursorPaging?: CursorPaging;
894
+ /**
895
+ * Filter object.
896
+ *
897
+ * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).
898
+ */
899
+ filter?: Record<string, any> | null;
900
+ /**
901
+ * List of sort objects.
902
+ *
903
+ * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).
904
+ * @maxSize 10
905
+ */
906
+ sort?: Sorting[];
907
+ /**
908
+ * Logical groupings of data into facets, with summaries for each facet. For example, use aggregations to allow site visitors to narrow down their search results by selecting specific categories.
909
+ * @maxSize 10
910
+ */
911
+ aggregations?: Aggregation[];
912
+ /** Free text to match in searchable fields. */
913
+ search?: SearchDetails;
914
+ /**
915
+ * Time zone to adjust date-time-based filters and aggregations, in ISO 8601 (including offsets) or IANA time zone database (including time zone IDs) format.
916
+ * Applies to all relevant filters and aggregations, unless overridden by providing timestamps including time zone. For example, "2023-12-20T10:52:34.795Z".
917
+ * @maxLength 50
918
+ */
919
+ timeZone?: string | null;
920
+ }
921
+ /** @oneof */
922
+ interface CursorSearchPagingMethodOneOf {
923
+ /**
924
+ * Cursor paging options.
925
+ *
926
+ * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
927
+ */
928
+ cursorPaging?: CursorPaging;
929
+ }
930
+ interface Aggregation extends AggregationKindOneOf {
931
+ /** A value aggregation calculates metrics such as count for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number (count) of products for each price listed in the store. */
932
+ value?: ValueAggregation;
933
+ /** A range aggregation calculates the count of the values from the specified field in the dataset that fall within the range of each bucket you define. For example, use a range aggregation to compare the number of reservations made for parties of 4 or less to the number of reservations made for parties with 5 or more. */
934
+ range?: RangeAggregation;
935
+ /** A scalar aggregation calculates a single numerical value from a dataset, summarizing the dataset into one key metric: `COUNT_DISTINCT`, `SUM`, `AVG`, `MIN`, or `MAX`. */
936
+ scalar?: ScalarAggregation;
937
+ /** A date histogram calculates the count of time values from the specified field in the dataset that fall within each time interval you define (hour, day, week, etc.) For example, use a date histogram to find how many reservations have been made at a restaurant each week. */
938
+ dateHistogram?: DateHistogramAggregation;
939
+ /** A nested aggregation is applied within the results of another aggregation. Rather than aggregating directly on the primary dataset, first group data using one aggregation and then apply another aggregation within each group. It allows for more complex analyses where you can summarize data at different levels of detail or hierarchy. For example, to get the number of products that are in stock and out of stock for each price listed, first perform a value aggregation on `discountedPriceNumeric`, and a second value aggregation on `inStock`. */
940
+ nested?: NestedAggregation;
941
+ /**
942
+ * Aggregation name, returned in `aggregations.results.name`.
943
+ * @maxLength 100
944
+ */
945
+ name?: string | null;
946
+ /** Type of aggregation to perform. Must align with the corresponding aggregation field. */
947
+ type?: AggregationTypeWithLiterals;
948
+ /**
949
+ * Field to aggregate by. Use dot notation to specify a JSON path. For example, `order.address.streetName`.
950
+ * @maxLength 200
951
+ */
952
+ fieldPath?: string;
953
+ /**
954
+ * Deprecated. Use `nested` instead.
955
+ * @deprecated Deprecated. Use `nested` instead.
956
+ * @replacedBy kind.nested
957
+ * @targetRemovalDate 2024-03-30
958
+ */
959
+ groupBy?: GroupByAggregation;
960
+ }
961
+ /** @oneof */
962
+ interface AggregationKindOneOf {
963
+ /** A value aggregation calculates metrics such as count for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number (count) of products for each price listed in the store. */
964
+ value?: ValueAggregation;
965
+ /** A range aggregation calculates the count of the values from the specified field in the dataset that fall within the range of each bucket you define. For example, use a range aggregation to compare the number of reservations made for parties of 4 or less to the number of reservations made for parties with 5 or more. */
966
+ range?: RangeAggregation;
967
+ /** A scalar aggregation calculates a single numerical value from a dataset, summarizing the dataset into one key metric: `COUNT_DISTINCT`, `SUM`, `AVG`, `MIN`, or `MAX`. */
968
+ scalar?: ScalarAggregation;
969
+ /** A date histogram calculates the count of time values from the specified field in the dataset that fall within each time interval you define (hour, day, week, etc.) For example, use a date histogram to find how many reservations have been made at a restaurant each week. */
970
+ dateHistogram?: DateHistogramAggregation;
971
+ /** A nested aggregation is applied within the results of another aggregation. Rather than aggregating directly on the primary dataset, first group data using one aggregation and then apply another aggregation within each group. It allows for more complex analyses where you can summarize data at different levels of detail or hierarchy. For example, to get the number of products that are in stock and out of stock for each price listed, first perform a value aggregation on `discountedPriceNumeric`, and a second value aggregation on `inStock`. */
972
+ nested?: NestedAggregation;
973
+ }
974
+ interface RangeBucket {
975
+ /** Inclusive lower bound of the range. Required if `to` is not provided. */
976
+ from?: number | null;
977
+ /** Exclusive upper bound of the range. Required if `from` is not provided. */
978
+ to?: number | null;
979
+ }
980
+ declare enum SortType {
981
+ /** Number of matches in the results. */
982
+ COUNT = "COUNT",
983
+ /** Alphabetically by the field value. */
984
+ VALUE = "VALUE"
985
+ }
986
+ /** @enumType */
987
+ type SortTypeWithLiterals = SortType | 'COUNT' | 'VALUE';
988
+ declare enum SortDirection {
989
+ /** Descending order. */
990
+ DESC = "DESC",
991
+ /** Ascending order. */
992
+ ASC = "ASC"
993
+ }
994
+ /** @enumType */
995
+ type SortDirectionWithLiterals = SortDirection | 'DESC' | 'ASC';
996
+ declare enum MissingValues {
997
+ /** Exclude missing values from the aggregation results. */
998
+ EXCLUDE = "EXCLUDE",
999
+ /** Include missing values in the aggregation results. */
1000
+ INCLUDE = "INCLUDE"
1001
+ }
1002
+ /** @enumType */
1003
+ type MissingValuesWithLiterals = MissingValues | 'EXCLUDE' | 'INCLUDE';
1004
+ interface IncludeMissingValuesOptions {
1005
+ /**
1006
+ * Specify a custom name for the bucket containing the missing values. Defaults are `"N/A"` for strings, `0` for integers, and `false` for booleans.
1007
+ * @maxLength 20
1008
+ */
1009
+ addToBucket?: string;
1010
+ }
1011
+ declare enum ScalarType {
1012
+ /** Total number of distinct values. */
1013
+ COUNT_DISTINCT = "COUNT_DISTINCT",
1014
+ /** Minimum value. */
1015
+ MIN = "MIN",
1016
+ /** Maximum value. */
1017
+ MAX = "MAX",
1018
+ /**
1019
+ * Sum of values.
1020
+ * @internal
1021
+ */
1022
+ SUM = "SUM",
1023
+ /**
1024
+ * Average of values.
1025
+ * @internal
1026
+ */
1027
+ AVG = "AVG"
1028
+ }
1029
+ /** @enumType */
1030
+ type ScalarTypeWithLiterals = ScalarType | 'COUNT_DISTINCT' | 'MIN' | 'MAX';
1031
+ interface ValueAggregation extends ValueAggregationOptionsOneOf {
1032
+ /** Options for including missing values in results. */
1033
+ includeOptions?: IncludeMissingValuesOptions;
1034
+ /** Sort type. */
1035
+ sortType?: SortTypeWithLiterals;
1036
+ /** Sort direction. */
1037
+ sortDirection?: SortDirectionWithLiterals;
1038
+ /**
1039
+ * Number of aggregation results to return.
1040
+ * Min: `1`
1041
+ * Max: `250`
1042
+ * Default: `10`
1043
+ */
1044
+ limit?: number | null;
1045
+ /**
1046
+ * Whether to include or exclude missing values in the aggregation results.
1047
+ * Default: `EXCLUDE`.
1048
+ */
1049
+ missingValues?: MissingValuesWithLiterals;
1050
+ }
1051
+ /** @oneof */
1052
+ interface ValueAggregationOptionsOneOf {
1053
+ /** Options for including missing values in results. */
1054
+ includeOptions?: IncludeMissingValuesOptions;
1055
+ }
1056
+ declare enum NestedAggregationType {
1057
+ /** Calculates the distribution of a specific field's values within a dataset, providing insights into the overall distribution and key statistics of those values. */
1058
+ VALUE = "VALUE",
1059
+ /** Calculates the count of the values from the specified field in the dataset that fall within the range of each bucket you define. */
1060
+ RANGE = "RANGE",
1061
+ /** Calculates a single numerical value from a dataset, summarizing the dataset into one key metric: `COUNT_DISTINCT`, `SUM`, `AVG`, `MIN`, or `MAX`. */
1062
+ SCALAR = "SCALAR",
1063
+ /** Calculates the count of time values from the specified field in the dataset that fall within each time interval you define (hour, day, week, etc.). */
1064
+ DATE_HISTOGRAM = "DATE_HISTOGRAM"
1065
+ }
1066
+ /** @enumType */
1067
+ type NestedAggregationTypeWithLiterals = NestedAggregationType | 'VALUE' | 'RANGE' | 'SCALAR' | 'DATE_HISTOGRAM';
1068
+ interface RangeAggregation {
1069
+ /**
1070
+ * List of range buckets. During aggregation each entity is placed in the first bucket its value falls into, based on the provided range bounds.
1071
+ * @maxSize 50
1072
+ */
1073
+ buckets?: RangeBucket[];
1074
+ }
1075
+ interface ScalarAggregation {
1076
+ /** Operator type for the scalar aggregation. */
1077
+ type?: ScalarTypeWithLiterals;
1078
+ }
1079
+ interface DateHistogramAggregation {
1080
+ /** Interval for date histogram aggregation. */
1081
+ interval?: IntervalWithLiterals;
1082
+ }
1083
+ declare enum Interval {
1084
+ YEAR = "YEAR",
1085
+ MONTH = "MONTH",
1086
+ WEEK = "WEEK",
1087
+ DAY = "DAY",
1088
+ HOUR = "HOUR",
1089
+ MINUTE = "MINUTE",
1090
+ SECOND = "SECOND"
1091
+ }
1092
+ /** @enumType */
1093
+ type IntervalWithLiterals = Interval | 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR' | 'MINUTE' | 'SECOND';
1094
+ interface NestedAggregationItem extends NestedAggregationItemKindOneOf {
1095
+ /** A value aggregation calculates the distribution of a specific field's values within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number (count) of orders for each order status. */
1096
+ value?: ValueAggregation;
1097
+ /** A range aggregation calculates the count of the values from the specified field in the dataset that fall within the range of each bucket you define. For example, use a range aggregation to compare the number of reservations made for parties of 4 or less to the number of reservations made for parties with 5 or more. If ranges overlap, a record that fits more than one range will only be counted in the first range that matches the criteria. */
1098
+ range?: RangeAggregation;
1099
+ /** A scalar aggregation calculates a single numerical value from a dataset, summarizing the dataset into one key metric: `COUNT_DISTINCT`, `SUM`, `AVG`, `MIN`, or `MAX`. */
1100
+ scalar?: ScalarAggregation;
1101
+ /** A date histogram calculates the count of time values from the specified field in the dataset that fall within each time interval you define (hour, day, week, etc.). For example, use a date histogram to determine how many reservations have been made at a restaurant each week. If ranges overlap, a record that fits more than one range will only be counted in the first range that matches the criteria. */
1102
+ dateHistogram?: DateHistogramAggregation;
1103
+ /**
1104
+ * Unique, caller-defined aggregation name, returned in `aggregations.results`.
1105
+ * @maxLength 100
1106
+ */
1107
+ name?: string | null;
1108
+ /** Type of aggregation to perform. The matching aggregation field must be passed. */
1109
+ type?: NestedAggregationTypeWithLiterals;
1110
+ /**
1111
+ * Field to aggregate by. Use dot notation to specify a JSON path. For example, `order.address.streetName`.
1112
+ * @maxLength 200
1113
+ */
1114
+ fieldPath?: string;
1115
+ }
1116
+ /** @oneof */
1117
+ interface NestedAggregationItemKindOneOf {
1118
+ /** A value aggregation calculates the distribution of a specific field's values within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number (count) of orders for each order status. */
1119
+ value?: ValueAggregation;
1120
+ /** A range aggregation calculates the count of the values from the specified field in the dataset that fall within the range of each bucket you define. For example, use a range aggregation to compare the number of reservations made for parties of 4 or less to the number of reservations made for parties with 5 or more. If ranges overlap, a record that fits more than one range will only be counted in the first range that matches the criteria. */
1121
+ range?: RangeAggregation;
1122
+ /** A scalar aggregation calculates a single numerical value from a dataset, summarizing the dataset into one key metric: `COUNT_DISTINCT`, `SUM`, `AVG`, `MIN`, or `MAX`. */
1123
+ scalar?: ScalarAggregation;
1124
+ /** A date histogram calculates the count of time values from the specified field in the dataset that fall within each time interval you define (hour, day, week, etc.). For example, use a date histogram to determine how many reservations have been made at a restaurant each week. If ranges overlap, a record that fits more than one range will only be counted in the first range that matches the criteria. */
1125
+ dateHistogram?: DateHistogramAggregation;
1126
+ }
1127
+ declare enum AggregationType {
1128
+ /** Calculates the distribution of a specific field's values within a dataset, providing insights into the overall distribution and key statistics of those values. */
1129
+ VALUE = "VALUE",
1130
+ /** Calculates the count of the values from the specified field in the dataset that fall within the range of each bucket you define. */
1131
+ RANGE = "RANGE",
1132
+ /** Calculates a single numerical value from a dataset, summarizing the dataset into one key metric: `COUNT_DISTINCT`, `SUM`, `AVG`, `MIN`, or `MAX`. */
1133
+ SCALAR = "SCALAR",
1134
+ /** Calculates the count of time values from the specified field in the dataset that fall within each time interval you define (hour, day, week, etc.). */
1135
+ DATE_HISTOGRAM = "DATE_HISTOGRAM",
1136
+ /** Flattened list of aggregations, where each aggregation is nested within previous one. */
1137
+ NESTED = "NESTED"
1138
+ }
1139
+ /** @enumType */
1140
+ type AggregationTypeWithLiterals = AggregationType | 'VALUE' | 'RANGE' | 'SCALAR' | 'DATE_HISTOGRAM' | 'NESTED';
1141
+ /** Nested aggregation expressed through a list of aggregation where each next aggregation is nested within previous one. */
1142
+ interface NestedAggregation {
1143
+ /**
1144
+ * Flattened list of aggregations, where each aggregation is nested within previous one.
1145
+ * @minSize 2
1146
+ * @maxSize 3
1147
+ */
1148
+ nestedAggregations?: NestedAggregationItem[];
1149
+ }
1150
+ interface GroupByAggregation extends GroupByAggregationKindOneOf {
1151
+ /** Value aggregation configuration. */
1152
+ value?: ValueAggregation;
1153
+ /**
1154
+ * Unique, caller-defined aggregation name, returned in `aggregations.results`.
1155
+ * @maxLength 100
1156
+ */
1157
+ name?: string | null;
1158
+ /**
1159
+ * Field to aggregate by.
1160
+ * @maxLength 200
1161
+ */
1162
+ fieldPath?: string;
1163
+ }
1164
+ /** @oneof */
1165
+ interface GroupByAggregationKindOneOf {
1166
+ /** Value aggregation configuration. */
1167
+ value?: ValueAggregation;
1168
+ }
1169
+ interface SearchDetails {
1170
+ /** Search mode. Defines the search logic for combining multiple terms in the `expression`. */
1171
+ mode?: ModeWithLiterals;
1172
+ /**
1173
+ * Search term or expression.
1174
+ * @maxLength 100
1175
+ */
1176
+ expression?: string | null;
1177
+ /**
1178
+ * Fields to search in. If the array is empty, all searchable fields are searched. Use dot notation to specify a JSON path. For example, `order.address.streetName`.
1179
+ * @maxLength 200
1180
+ * @maxSize 20
1181
+ */
1182
+ fields?: string[];
1183
+ /** Whether to enable the search function to use an algorithm to automatically find results that are close to the search expression, such as typos and declensions. */
1184
+ fuzzy?: boolean;
1185
+ }
1186
+ declare enum Mode {
1187
+ /** At least one of the search terms must be present. */
1188
+ OR = "OR",
1189
+ /** All search terms must be present. */
1190
+ AND = "AND"
1191
+ }
1192
+ /** @enumType */
1193
+ type ModeWithLiterals = Mode | 'OR' | 'AND';
1194
+ interface SearchParticipantsResponse {
1195
+ /** Participants matching the search criteria. */
1196
+ participants?: Participant[];
1197
+ /** Paging metadata. */
1198
+ pagingMetadata?: CursorPagingMetadata;
1199
+ /** Aggregation data in case aggregations were requested. */
1200
+ aggregationData?: AggregationData;
1201
+ }
1202
+ interface CursorPagingMetadata {
1203
+ /** Number of items returned in current page. */
1204
+ count?: number | null;
1205
+ /** Cursor strings that point to the next page, previous page, or both. */
1206
+ cursors?: Cursors;
1207
+ /**
1208
+ * Whether there are more pages to retrieve following the current page.
1209
+ *
1210
+ * + `true`: Another page of results can be retrieved.
1211
+ * + `false`: This is the last page.
1212
+ */
1213
+ hasNext?: boolean | null;
1214
+ /**
1215
+ * Total number of items matching the filter.
1216
+ * Available only on the first page of *Search* results, not included in *Query* or *List* results.
1217
+ * If the Search results span multiple pages, the value of `total` will exceed the number of items returned on the first page.
1218
+ * @internal
1219
+ */
1220
+ total?: number | null;
1221
+ }
1222
+ interface AggregationData {
1223
+ /**
1224
+ * key = aggregation name (as derived from search request).
1225
+ * @maxSize 10000
1226
+ */
1227
+ results?: AggregationResults[];
1228
+ }
1229
+ interface ValueAggregationResult {
1230
+ /**
1231
+ * Value of the field.
1232
+ * @maxLength 100
1233
+ */
1234
+ value?: string;
1235
+ /** Count of entities with this value. */
1236
+ count?: number;
1237
+ }
1238
+ interface RangeAggregationResult {
1239
+ /** Inclusive lower bound of the range. */
1240
+ from?: number | null;
1241
+ /** Exclusive upper bound of the range. */
1242
+ to?: number | null;
1243
+ /** Count of entities in this range. */
1244
+ count?: number;
1245
+ }
1246
+ interface NestedAggregationResults extends NestedAggregationResultsResultOneOf {
1247
+ /** Value aggregation results. */
1248
+ values?: ValueResults;
1249
+ /** Range aggregation results. */
1250
+ ranges?: RangeResults;
1251
+ /** Scalar aggregation results. */
1252
+ scalar?: AggregationResultsScalarResult;
1253
+ /**
1254
+ * User-defined name of aggregation, matches the one provided in request.
1255
+ * @maxLength 100
1256
+ */
1257
+ name?: string;
1258
+ /** Type of aggregation that matches result. */
1259
+ type?: AggregationTypeWithLiterals;
1260
+ /**
1261
+ * Field to aggregate by, matches the one provided in request.
1262
+ * @maxLength 200
1263
+ */
1264
+ fieldPath?: string;
1265
+ }
1266
+ /** @oneof */
1267
+ interface NestedAggregationResultsResultOneOf {
1268
+ /** Value aggregation results. */
1269
+ values?: ValueResults;
1270
+ /** Range aggregation results. */
1271
+ ranges?: RangeResults;
1272
+ /** Scalar aggregation results. */
1273
+ scalar?: AggregationResultsScalarResult;
1274
+ }
1275
+ interface ValueResults {
1276
+ /**
1277
+ * List of value aggregations.
1278
+ * @maxSize 250
1279
+ */
1280
+ results?: ValueAggregationResult[];
1281
+ }
1282
+ interface RangeResults {
1283
+ /**
1284
+ * List of ranges returned in same order as requested.
1285
+ * @maxSize 50
1286
+ */
1287
+ results?: RangeAggregationResult[];
1288
+ }
1289
+ interface AggregationResultsScalarResult {
1290
+ /** Type of scalar aggregation. */
1291
+ type?: ScalarTypeWithLiterals;
1292
+ /** Value of the scalar aggregation. */
1293
+ value?: number;
1294
+ }
1295
+ interface NestedValueAggregationResult {
1296
+ /**
1297
+ * Value of the field.
1298
+ * @maxLength 1000
1299
+ */
1300
+ value?: string;
1301
+ /** Nested aggregations. */
1302
+ nestedResults?: NestedAggregationResults;
1303
+ }
1304
+ interface ValueResult {
1305
+ /**
1306
+ * Value of the field.
1307
+ * @maxLength 1000
1308
+ */
1309
+ value?: string;
1310
+ /** Count of entities with this value. */
1311
+ count?: number | null;
1312
+ }
1313
+ interface RangeResult {
1314
+ /** Inclusive lower bound of the range. */
1315
+ from?: number | null;
1316
+ /** Exclusive upper bound of the range. */
1317
+ to?: number | null;
1318
+ /** Count of entities in this range. */
1319
+ count?: number | null;
1320
+ }
1321
+ interface ScalarResult {
1322
+ /** Value of the scalar aggregation. */
1323
+ value?: number;
1324
+ }
1325
+ interface NestedResultValue extends NestedResultValueResultOneOf {
1326
+ /** Value aggregation result. */
1327
+ value?: ValueResult;
1328
+ /** Range aggregation result. */
1329
+ range?: RangeResult;
1330
+ /** Scalar aggregation result. */
1331
+ scalar?: ScalarResult;
1332
+ /** Date histogram aggregation result. */
1333
+ dateHistogram?: ValueResult;
1334
+ }
1335
+ /** @oneof */
1336
+ interface NestedResultValueResultOneOf {
1337
+ /** Value aggregation result. */
1338
+ value?: ValueResult;
1339
+ /** Range aggregation result. */
1340
+ range?: RangeResult;
1341
+ /** Scalar aggregation result. */
1342
+ scalar?: ScalarResult;
1343
+ /** Date histogram aggregation result. */
1344
+ dateHistogram?: ValueResult;
1345
+ }
1346
+ interface Results {
1347
+ /** List of nested aggregations. */
1348
+ results?: Record<string, NestedResultValue>;
1349
+ }
1350
+ interface DateHistogramResult {
1351
+ /**
1352
+ * Date in ISO 8601 format.
1353
+ * @maxLength 100
1354
+ */
1355
+ value?: string;
1356
+ /** Count of documents in the bucket. */
1357
+ count?: number;
1358
+ }
1359
+ interface GroupByValueResults {
1360
+ /**
1361
+ * List of value aggregations.
1362
+ * @maxSize 1000
1363
+ */
1364
+ results?: NestedValueAggregationResult[];
1365
+ }
1366
+ interface DateHistogramResults {
1367
+ /**
1368
+ * List of date histogram aggregations.
1369
+ * @maxSize 200
1370
+ */
1371
+ results?: DateHistogramResult[];
1372
+ }
1373
+ /**
1374
+ * Results of `NESTED` aggregation type in a flattened form.
1375
+ * Aggregations in resulting array are keyed by requested aggregation `name`.
1376
+ */
1377
+ interface NestedResults {
1378
+ /**
1379
+ * List of nested aggregations.
1380
+ * @maxSize 1000
1381
+ */
1382
+ results?: Results[];
1383
+ }
1384
+ interface AggregationResults extends AggregationResultsResultOneOf {
1385
+ /** Value aggregation results. */
1386
+ values?: ValueResults;
1387
+ /** Range aggregation results. */
1388
+ ranges?: RangeResults;
1389
+ /** Scalar aggregation results. */
1390
+ scalar?: AggregationResultsScalarResult;
1391
+ /** Group by value aggregation results. */
1392
+ groupedByValue?: GroupByValueResults;
1393
+ /** Date histogram aggregation results. */
1394
+ dateHistogram?: DateHistogramResults;
1395
+ /** Nested aggregation results. */
1396
+ nested?: NestedResults;
1397
+ /**
1398
+ * User-defined name of aggregation as derived from search request.
1399
+ * @maxLength 100
1400
+ */
1401
+ name?: string;
1402
+ /** Type of aggregation that must match provided kind as derived from search request. */
1403
+ type?: AggregationTypeWithLiterals;
1404
+ /**
1405
+ * Field to aggregate by as derived from search request.
1406
+ * @maxLength 200
1407
+ */
1408
+ fieldPath?: string;
1409
+ }
1410
+ /** @oneof */
1411
+ interface AggregationResultsResultOneOf {
1412
+ /** Value aggregation results. */
1413
+ values?: ValueResults;
1414
+ /** Range aggregation results. */
1415
+ ranges?: RangeResults;
1416
+ /** Scalar aggregation results. */
1417
+ scalar?: AggregationResultsScalarResult;
1418
+ /** Group by value aggregation results. */
1419
+ groupedByValue?: GroupByValueResults;
1420
+ /** Date histogram aggregation results. */
1421
+ dateHistogram?: DateHistogramResults;
1422
+ /** Nested aggregation results. */
1423
+ nested?: NestedResults;
1424
+ }
1425
+ interface DomainEvent extends DomainEventBodyOneOf {
1426
+ createdEvent?: EntityCreatedEvent;
1427
+ updatedEvent?: EntityUpdatedEvent;
1428
+ deletedEvent?: EntityDeletedEvent;
1429
+ actionEvent?: ActionEvent;
1430
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
1431
+ _id?: string;
1432
+ /**
1433
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
1434
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
1435
+ */
1436
+ entityFqdn?: string;
1437
+ /**
1438
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
1439
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
1440
+ */
1441
+ slug?: string;
1442
+ /** ID of the entity associated with the event. */
1443
+ entityId?: string;
1444
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
1445
+ eventTime?: Date | null;
1446
+ /**
1447
+ * Whether the event was triggered as a result of a privacy regulation application
1448
+ * (for example, GDPR).
1449
+ */
1450
+ triggeredByAnonymizeRequest?: boolean | null;
1451
+ /** If present, indicates the action that triggered the event. */
1452
+ originatedFrom?: string | null;
1453
+ /**
1454
+ * 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.
1455
+ * 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.
1456
+ */
1457
+ entityEventSequence?: string | null;
1458
+ }
1459
+ /** @oneof */
1460
+ interface DomainEventBodyOneOf {
1461
+ createdEvent?: EntityCreatedEvent;
1462
+ updatedEvent?: EntityUpdatedEvent;
1463
+ deletedEvent?: EntityDeletedEvent;
1464
+ actionEvent?: ActionEvent;
1465
+ }
1466
+ interface EntityCreatedEvent {
1467
+ entity?: string;
1468
+ }
1469
+ interface RestoreInfo {
1470
+ deletedDate?: Date | null;
1471
+ }
1472
+ interface EntityUpdatedEvent {
1473
+ /**
1474
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
1475
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
1476
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
1477
+ */
1478
+ currentEntity?: string;
1479
+ }
1480
+ interface EntityDeletedEvent {
1481
+ /** Entity that was deleted. */
1482
+ deletedEntity?: string | null;
1483
+ }
1484
+ interface ActionEvent {
1485
+ body?: string;
1486
+ }
1487
+ interface Empty {
1488
+ }
1489
+ interface MessageEnvelope {
1490
+ /**
1491
+ * App instance ID.
1492
+ * @format GUID
1493
+ */
1494
+ instanceId?: string | null;
1495
+ /**
1496
+ * Event type.
1497
+ * @maxLength 150
1498
+ */
1499
+ eventType?: string;
1500
+ /** The identification type and identity data. */
1501
+ identity?: IdentificationData;
1502
+ /** Stringify payload. */
1503
+ data?: string;
1504
+ /** Details related to the account */
1505
+ accountInfo?: AccountInfo;
1506
+ }
1507
+ interface IdentificationData extends IdentificationDataIdOneOf {
1508
+ /**
1509
+ * ID of a site visitor that has not logged in to the site.
1510
+ * @format GUID
1511
+ */
1512
+ anonymousVisitorId?: string;
1513
+ /**
1514
+ * ID of a site visitor that has logged in to the site.
1515
+ * @format GUID
1516
+ */
1517
+ memberId?: string;
1518
+ /**
1519
+ * ID of a Wix user (site owner, contributor, etc.).
1520
+ * @format GUID
1521
+ */
1522
+ wixUserId?: string;
1523
+ /**
1524
+ * ID of an app.
1525
+ * @format GUID
1526
+ */
1527
+ appId?: string;
1528
+ /** @readonly */
1529
+ identityType?: WebhookIdentityTypeWithLiterals;
1530
+ }
1531
+ /** @oneof */
1532
+ interface IdentificationDataIdOneOf {
1533
+ /**
1534
+ * ID of a site visitor that has not logged in to the site.
1535
+ * @format GUID
1536
+ */
1537
+ anonymousVisitorId?: string;
1538
+ /**
1539
+ * ID of a site visitor that has logged in to the site.
1540
+ * @format GUID
1541
+ */
1542
+ memberId?: string;
1543
+ /**
1544
+ * ID of a Wix user (site owner, contributor, etc.).
1545
+ * @format GUID
1546
+ */
1547
+ wixUserId?: string;
1548
+ /**
1549
+ * ID of an app.
1550
+ * @format GUID
1551
+ */
1552
+ appId?: string;
1553
+ }
1554
+ declare enum WebhookIdentityType {
1555
+ UNKNOWN = "UNKNOWN",
1556
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
1557
+ MEMBER = "MEMBER",
1558
+ WIX_USER = "WIX_USER",
1559
+ APP = "APP"
1560
+ }
1561
+ /** @enumType */
1562
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
1563
+ interface AccountInfo {
1564
+ /**
1565
+ * ID of the Wix account associated with the event.
1566
+ * @format GUID
1567
+ */
1568
+ accountId?: string | null;
1569
+ /**
1570
+ * ID of the parent Wix account. Only included when accountId belongs to a child account.
1571
+ * @format GUID
1572
+ */
1573
+ parentAccountId?: string | null;
1574
+ /**
1575
+ * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
1576
+ * @format GUID
1577
+ */
1578
+ siteId?: string | null;
1579
+ }
1580
+ interface ExportParticipantsStatsRequest {
1581
+ /**
1582
+ * program id to export data from
1583
+ * @format GUID
1584
+ */
1585
+ programId: string;
1586
+ }
1587
+ interface ExportParticipantsStatsResponse {
1588
+ }
1589
+ /** @docsIgnore */
1590
+ type CreateParticipantApplicationErrors = {
1591
+ code?: 'PREMIUM_PLAN_REQUIRED';
1592
+ description?: string;
1593
+ data?: Record<string, any>;
1594
+ } | {
1595
+ code?: 'PARTICIPANTS_LIMIT_EXCEEDED';
1596
+ description?: string;
1597
+ data?: Record<string, any>;
1598
+ };
1599
+ /** @docsIgnore */
1600
+ type BulkCreateParticipantsApplicationErrors = {
1601
+ code?: 'MULTIPLE_PROGRAM_IDS_IN_BULK_CREATE';
1602
+ description?: string;
1603
+ data?: Record<string, any>;
1604
+ } | {
1605
+ code?: 'PREMIUM_PLAN_REQUIRED';
1606
+ description?: string;
1607
+ data?: Record<string, any>;
1608
+ } | {
1609
+ code?: 'PARTICIPANTS_LIMIT_EXCEEDED';
1610
+ description?: string;
1611
+ data?: Record<string, any>;
1612
+ };
1613
+ /** @docsIgnore */
1614
+ type IssueCertificateApplicationErrors = {
1615
+ code?: 'PARTICIPANT_NOT_ACTIVE';
1616
+ description?: string;
1617
+ data?: Record<string, any>;
1618
+ } | {
1619
+ code?: 'NO_CERTIFICATE_REWARD';
1620
+ description?: string;
1621
+ data?: Record<string, any>;
1622
+ } | {
1623
+ code?: 'PARTICIPANT_NOT_COMPLETED_PROGRAM';
1624
+ description?: string;
1625
+ data?: Record<string, any>;
1626
+ };
1627
+ /** @docsIgnore */
1628
+ type BulkUpdateParticipantTagsApplicationErrors = {
1629
+ code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS';
1630
+ description?: string;
1631
+ data?: Record<string, any>;
1632
+ };
1633
+ /** @docsIgnore */
1634
+ type BulkUpdateParticipantTagsByFilterApplicationErrors = {
1635
+ code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS';
1636
+ description?: string;
1637
+ data?: Record<string, any>;
1638
+ };
1639
+ /**
1640
+ * Creates a participant.
1641
+ *
1642
+ * Returns an error if the member is already a participant in the specified program.
1643
+ * Use UpdateParticipant to modify existing participants.
1644
+ * @param participant - Participant to create
1645
+ * @public
1646
+ * @documentationMaturity preview
1647
+ * @requiredField participant
1648
+ * @requiredField participant.enrollmentInfo
1649
+ * @requiredField participant.enrollmentInfo.pricingType
1650
+ * @requiredField participant.memberId
1651
+ * @requiredField participant.programId
1652
+ * @permissionId online_programs:participants:v3:participant:create_participant
1653
+ * @applicableIdentity APP
1654
+ * @returns Created participant
1655
+ * @fqn wix.onlineprograms.participants.v3.ParticipantsService.CreateParticipant
1656
+ */
1657
+ declare function createParticipant(participant: NonNullablePaths<Participant, `enrollmentInfo` | `enrollmentInfo.pricingType` | `memberId` | `programId`, 3>, options?: CreateParticipantOptions): Promise<NonNullablePaths<Participant, `memberId` | `programId` | `progress.totalStepsCompleted` | `progress.totalStepsAvailable` | `progress.completionPercentage` | `enrollmentStatus` | `progressStatus` | `enrollmentInfo.singlePaymentDetails.paymentOrderId` | `enrollmentInfo.paidPlanDetails.paidPlanId` | `enrollmentInfo.freeCouponDetails.freeCouponId` | `enrollmentInfo.timeZone` | `enrollmentInfo.startDate` | `enrollmentInfo.pricingType` | `tags.privateTags.tagIds`, 4> & {
1658
+ __applicationErrorsType?: CreateParticipantApplicationErrors;
1659
+ }>;
1660
+ interface CreateParticipantOptions {
1661
+ /**
1662
+ * Array of conditional fields to include in the response.
1663
+ * Use `RequestedFields.PROGRESS` to include the progress field, which requires calculating completion statistics across all program steps. Only request this field when you need current progress data, as it impacts performance.
1664
+ * @maxSize 1
1665
+ */
1666
+ fields?: RequestedFieldsWithLiterals[];
1667
+ }
1668
+ /**
1669
+ * Updates a participant's enrollment status, progress status, or enrollment pricing details.
1670
+ * @param _id - Participant ID.
1671
+ * @public
1672
+ * @documentationMaturity preview
1673
+ * @requiredField _id
1674
+ * @requiredField participant
1675
+ * @requiredField participant.revision
1676
+ * @permissionId online_programs:participants:v3:participant:update_participant
1677
+ * @applicableIdentity APP
1678
+ * @returns Updated participant
1679
+ * @fqn wix.onlineprograms.participants.v3.ParticipantsService.UpdateParticipant
1680
+ */
1681
+ declare function updateParticipant(_id: string, participant: NonNullablePaths<UpdateParticipant, `revision`, 2>, options?: UpdateParticipantOptions): Promise<NonNullablePaths<Participant, `memberId` | `programId` | `progress.totalStepsCompleted` | `progress.totalStepsAvailable` | `progress.completionPercentage` | `enrollmentStatus` | `progressStatus` | `enrollmentInfo.singlePaymentDetails.paymentOrderId` | `enrollmentInfo.paidPlanDetails.paidPlanId` | `enrollmentInfo.freeCouponDetails.freeCouponId` | `enrollmentInfo.timeZone` | `enrollmentInfo.startDate` | `enrollmentInfo.pricingType` | `tags.privateTags.tagIds`, 4>>;
1682
+ interface UpdateParticipant {
1683
+ /**
1684
+ * Participant ID.
1685
+ * @format GUID
1686
+ * @readonly
1687
+ */
1688
+ _id?: string | null;
1689
+ /**
1690
+ * Participant revision (for optimistic concurrency control).
1691
+ * @readonly
1692
+ */
1693
+ revision?: string | null;
1694
+ /**
1695
+ * Participant creation date.
1696
+ * @readonly
1697
+ */
1698
+ _createdDate?: Date | null;
1699
+ /**
1700
+ * Date the participant was last updated.
1701
+ * @readonly
1702
+ */
1703
+ _updatedDate?: Date | null;
1704
+ /**
1705
+ * Member ID of the participant on the site.
1706
+ * @format GUID
1707
+ * @readonly
1708
+ */
1709
+ memberId?: string;
1710
+ /**
1711
+ * ID of the program the participant is enrolled in.
1712
+ * @format GUID
1713
+ * @readonly
1714
+ */
1715
+ programId?: string;
1716
+ /**
1717
+ * Program completion progress. This field is conditional and must be explicitly requested via `fields` parameter.
1718
+ * @readonly
1719
+ */
1720
+ progress?: Progress;
1721
+ /**
1722
+ * Certificate info for participant
1723
+ * @readonly
1724
+ */
1725
+ certificateInfo?: CertificateInfo;
1726
+ /**
1727
+ * Site member info snapshot for the participant
1728
+ * @readonly
1729
+ */
1730
+ member?: Member;
1731
+ /**
1732
+ * Last activity date of the participant in the program (can either be status change or step resolution).
1733
+ * @readonly
1734
+ */
1735
+ lastActivityDate?: Date | null;
1736
+ /**
1737
+ * Participant's enrollment status in the program.
1738
+ * @readonly
1739
+ */
1740
+ enrollmentStatus?: EnrollmentStatusWithLiterals;
1741
+ /**
1742
+ * Participant's progress status in the program.
1743
+ * @readonly
1744
+ */
1745
+ progressStatus?: ProgressStatusWithLiterals;
1746
+ /** Additional information about the participant's enrollment and completion timeframe in the program. */
1747
+ enrollmentInfo?: EnrollmentInfo;
1748
+ /** Extended fields for participant (can be used for storing custom data). */
1749
+ extendedFields?: ExtendedFields;
1750
+ /** Tags for categorizing and organizing participants. */
1751
+ tags?: Tags;
1752
+ }
1753
+ interface UpdateParticipantOptions {
1754
+ /**
1755
+ * Array of conditional fields to include in the response.
1756
+ * Use RequestedFields.PROGRESS to include the progress field which is conditionally returned.
1757
+ * @maxSize 1
1758
+ */
1759
+ fields?: RequestedFieldsWithLiterals[];
1760
+ }
1761
+ /**
1762
+ * Creates participants in bulk.
1763
+ *
1764
+ * All participants in a single bulk create request must belong to the same program.
1765
+ * Returns an error if the member is already a participant in the specified program.
1766
+ *
1767
+ * When `pricing_type` is `SINGLE_PAYMENT`, provide `single_payment_details`.
1768
+ * When `pricing_type` is `PAID_PLAN`, provide `paid_plan_details`.
1769
+ * When `pricing_type` is `FREE_COUPON`, provide `free_coupon_details`.
1770
+ * Other pricing types (`FREE`, `ADDED_MANUALLY`) do not require details.
1771
+ * @param participants - List of participants to create.
1772
+ * @public
1773
+ * @documentationMaturity preview
1774
+ * @requiredField participants
1775
+ * @requiredField participants.enrollmentInfo
1776
+ * @requiredField participants.enrollmentInfo.pricingType
1777
+ * @requiredField participants.memberId
1778
+ * @requiredField participants.programId
1779
+ * @permissionId online_programs:participants:v3:participant:bulk_create_participants
1780
+ * @applicableIdentity APP
1781
+ * @fqn wix.onlineprograms.participants.v3.ParticipantsService.BulkCreateParticipants
1782
+ */
1783
+ declare function bulkCreateParticipants(participants: NonNullablePaths<Participant, `enrollmentInfo` | `enrollmentInfo.pricingType` | `memberId` | `programId`, 3>[], options?: BulkCreateParticipantsOptions): Promise<NonNullablePaths<BulkCreateParticipantsResponse, `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.enrollmentStatus` | `results.${number}.item.progressStatus` | `results.${number}.item.enrollmentInfo.timeZone` | `results.${number}.item.enrollmentInfo.startDate` | `results.${number}.item.enrollmentInfo.pricingType` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6> & {
1784
+ __applicationErrorsType?: BulkCreateParticipantsApplicationErrors;
1785
+ }>;
1786
+ interface BulkCreateParticipantsOptions {
1787
+ /** Whether to return entities in response or not. */
1788
+ returnEntity?: boolean;
1789
+ /**
1790
+ * Array of conditional fields to include in the response.
1791
+ * Use RequestedFields.PROGRESS to include the progress field which is conditionally returned.
1792
+ * @maxSize 1
1793
+ */
1794
+ fields?: RequestedFieldsWithLiterals[];
1795
+ }
1796
+ /**
1797
+ * Creates participants in bulk for all site members in a program, with an optional exclusion filter.
1798
+ *
1799
+ * Participants are created in the `JOINED` state with the join path set to `ADDED`.
1800
+ * Members who are already participants in the program will be skipped.
1801
+ * Only members who are not yet participants will be added.
1802
+ * @param programId - ID of the program for which to create participants for all site members in bulk.
1803
+ * @public
1804
+ * @documentationMaturity preview
1805
+ * @requiredField programId
1806
+ * @permissionId online_programs:participants:v3:participant:bulk_create_participants_for_all_members
1807
+ * @applicableIdentity APP
1808
+ * @fqn wix.onlineprograms.participants.v3.ParticipantsService.BulkCreateParticipantsForAllMembers
1809
+ */
1810
+ declare function bulkCreateParticipantsForAllMembers(programId: string, options?: BulkCreateParticipantsForAllMembersOptions): Promise<NonNullablePaths<BulkCreateParticipantsForAllMembersResponse, `jobId`, 2>>;
1811
+ interface BulkCreateParticipantsForAllMembersOptions {
1812
+ /**
1813
+ * Site member IDs to exclude from bulk participant creation. Maximum 100 member IDs can be excluded.
1814
+ * @format GUID
1815
+ * @maxSize 100
1816
+ */
1817
+ excludeMemberIds?: string[];
1818
+ }
1819
+ /**
1820
+ * Removes a participant from the program.
1821
+ *
1822
+ * The member will lose access to program content but will remain in any associated social groups.
1823
+ * @param participantId - ID of the participant to delete.
1824
+ * @public
1825
+ * @documentationMaturity preview
1826
+ * @requiredField participantId
1827
+ * @permissionId online_programs:participants:v3:participant:delete_participant
1828
+ * @applicableIdentity APP
1829
+ * @fqn wix.onlineprograms.participants.v3.ParticipantsService.DeleteParticipant
1830
+ */
1831
+ declare function deleteParticipant(participantId: string): Promise<void>;
1832
+ /**
1833
+ * Issues a certificate to a participant who has completed the program.
1834
+ * @param participantId - ID of the participant to issue the certificate to.
1835
+ * @public
1836
+ * @documentationMaturity preview
1837
+ * @requiredField participantId
1838
+ * @permissionId online_programs:participants:v3:participant:issue_certificate
1839
+ * @applicableIdentity APP
1840
+ * @fqn wix.onlineprograms.participants.v3.ParticipantsService.IssueCertificate
1841
+ */
1842
+ declare function issueCertificate(participantId: string, options?: IssueCertificateOptions): Promise<NonNullablePaths<IssueCertificateResponse, `participant.memberId` | `participant.programId` | `participant.progress.totalStepsCompleted` | `participant.progress.totalStepsAvailable` | `participant.progress.completionPercentage` | `participant.enrollmentStatus` | `participant.progressStatus` | `participant.enrollmentInfo.singlePaymentDetails.paymentOrderId` | `participant.enrollmentInfo.paidPlanDetails.paidPlanId` | `participant.enrollmentInfo.freeCouponDetails.freeCouponId` | `participant.enrollmentInfo.timeZone` | `participant.enrollmentInfo.startDate` | `participant.enrollmentInfo.pricingType` | `participant.tags.privateTags.tagIds`, 5> & {
1843
+ __applicationErrorsType?: IssueCertificateApplicationErrors;
1844
+ }>;
1845
+ interface IssueCertificateOptions {
1846
+ /**
1847
+ * Array of conditional fields to include in the response.
1848
+ * Use RequestedFields.PROGRESS to include the progress field which is conditionally returned.
1849
+ * @maxSize 1
1850
+ */
1851
+ fields?: RequestedFieldsWithLiterals[];
1852
+ }
1853
+ /**
1854
+ * Retrieves premium plan statistics for the site.
1855
+ * @public
1856
+ * @documentationMaturity preview
1857
+ * @permissionId online_programs:participants:v3:participant:get_premium_stats
1858
+ * @applicableIdentity APP
1859
+ * @fqn wix.onlineprograms.participants.v3.ParticipantsService.GetPremiumStats
1860
+ */
1861
+ declare function getPremiumStats(): Promise<NonNullablePaths<GetPremiumStatsResponse, `premiumEnabled` | `activeParticipantsCount` | `activeParticipantsLimit`, 2>>;
1862
+ /**
1863
+ * Returns a participant by ID.
1864
+ * @param participantId - ID of the participant to fetch.
1865
+ * @public
1866
+ * @documentationMaturity preview
1867
+ * @requiredField participantId
1868
+ * @permissionId online_programs:participants:v3:participant:get_participant
1869
+ * @applicableIdentity APP
1870
+ * @returns The retrieved participant.
1871
+ * @fqn wix.onlineprograms.participants.v3.ParticipantsService.GetParticipant
1872
+ */
1873
+ declare function getParticipant(participantId: string, options?: GetParticipantOptions): Promise<NonNullablePaths<Participant, `memberId` | `programId` | `progress.totalStepsCompleted` | `progress.totalStepsAvailable` | `progress.completionPercentage` | `enrollmentStatus` | `progressStatus` | `enrollmentInfo.singlePaymentDetails.paymentOrderId` | `enrollmentInfo.paidPlanDetails.paidPlanId` | `enrollmentInfo.freeCouponDetails.freeCouponId` | `enrollmentInfo.timeZone` | `enrollmentInfo.startDate` | `enrollmentInfo.pricingType` | `tags.privateTags.tagIds`, 4>>;
1874
+ interface GetParticipantOptions {
1875
+ /**
1876
+ * Array of conditional fields to include in the response.
1877
+ * Use RequestedFields.PROGRESS to include the progress field which is conditionally returned.
1878
+ * @maxSize 1
1879
+ */
1880
+ fields?: RequestedFieldsWithLiterals[];
1881
+ }
1882
+ /**
1883
+ * Queries existing participants.
1884
+ * @public
1885
+ * @documentationMaturity preview
1886
+ * @permissionId online_programs:participants:v3:participant:query_participants
1887
+ * @applicableIdentity APP
1888
+ * @fqn wix.onlineprograms.participants.v3.ParticipantsService.QueryParticipants
1889
+ */
1890
+ declare function queryParticipants(options?: QueryParticipantsOptions): ParticipantsQueryBuilder;
1891
+ interface QueryParticipantsOptions {
1892
+ /**
1893
+ * Array of conditional fields to include in the response.
1894
+ * Use RequestedFields.PROGRESS to include the progress field which is conditionally returned.
1895
+ * @maxSize 1
1896
+ */
1897
+ fields?: RequestedFieldsWithLiterals[] | undefined;
1898
+ }
1899
+ interface QueryCursorResult {
1900
+ cursors: Cursors;
1901
+ hasNext: () => boolean;
1902
+ hasPrev: () => boolean;
1903
+ length: number;
1904
+ pageSize: number;
1905
+ }
1906
+ interface ParticipantsQueryResult extends QueryCursorResult {
1907
+ items: Participant[];
1908
+ query: ParticipantsQueryBuilder;
1909
+ next: () => Promise<ParticipantsQueryResult>;
1910
+ prev: () => Promise<ParticipantsQueryResult>;
1911
+ }
1912
+ interface ParticipantsQueryBuilder {
1913
+ /** @param propertyName - Property whose value is compared with `value`.
1914
+ * @param value - Value to compare against.
1915
+ * @documentationMaturity preview
1916
+ */
1917
+ eq: (propertyName: '_id' | '_createdDate' | 'memberId' | 'programId' | 'progress.totalStepsCompleted' | 'lastActivityDate' | 'enrollmentStatus' | 'progressStatus', value: any) => ParticipantsQueryBuilder;
1918
+ /** @param propertyName - Property whose value is compared with `value`.
1919
+ * @param value - Value to compare against.
1920
+ * @documentationMaturity preview
1921
+ */
1922
+ ne: (propertyName: '_createdDate' | 'progress.totalStepsCompleted' | 'lastActivityDate', value: any) => ParticipantsQueryBuilder;
1923
+ /** @param propertyName - Property whose value is compared with `value`.
1924
+ * @param value - Value to compare against.
1925
+ * @documentationMaturity preview
1926
+ */
1927
+ ge: (propertyName: '_createdDate' | 'progress.totalStepsCompleted' | 'lastActivityDate' | 'enrollmentInfo.startDate', value: any) => ParticipantsQueryBuilder;
1928
+ /** @param propertyName - Property whose value is compared with `value`.
1929
+ * @param value - Value to compare against.
1930
+ * @documentationMaturity preview
1931
+ */
1932
+ gt: (propertyName: '_createdDate' | 'progress.totalStepsCompleted' | 'lastActivityDate' | 'enrollmentInfo.startDate', value: any) => ParticipantsQueryBuilder;
1933
+ /** @param propertyName - Property whose value is compared with `value`.
1934
+ * @param value - Value to compare against.
1935
+ * @documentationMaturity preview
1936
+ */
1937
+ le: (propertyName: '_createdDate' | 'progress.totalStepsCompleted' | 'lastActivityDate' | 'enrollmentInfo.startDate', value: any) => ParticipantsQueryBuilder;
1938
+ /** @param propertyName - Property whose value is compared with `value`.
1939
+ * @param value - Value to compare against.
1940
+ * @documentationMaturity preview
1941
+ */
1942
+ lt: (propertyName: '_createdDate' | 'progress.totalStepsCompleted' | 'lastActivityDate' | 'enrollmentInfo.startDate', value: any) => ParticipantsQueryBuilder;
1943
+ /** @documentationMaturity preview */
1944
+ in: (propertyName: '_id' | '_createdDate' | 'memberId' | 'progress.totalStepsCompleted' | 'lastActivityDate' | 'enrollmentStatus' | 'progressStatus', value: any) => ParticipantsQueryBuilder;
1945
+ /** @documentationMaturity preview */
1946
+ exists: (propertyName: '_createdDate' | 'progress.totalStepsCompleted' | 'lastActivityDate', value: boolean) => ParticipantsQueryBuilder;
1947
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
1948
+ * @documentationMaturity preview
1949
+ */
1950
+ ascending: (...propertyNames: Array<'_id' | '_createdDate' | 'progress.totalStepsCompleted' | 'lastActivityDate' | 'enrollmentStatus' | 'progressStatus' | 'enrollmentInfo.startDate'>) => ParticipantsQueryBuilder;
1951
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
1952
+ * @documentationMaturity preview
1953
+ */
1954
+ descending: (...propertyNames: Array<'_id' | '_createdDate' | 'progress.totalStepsCompleted' | 'lastActivityDate' | 'enrollmentStatus' | 'progressStatus' | 'enrollmentInfo.startDate'>) => ParticipantsQueryBuilder;
1955
+ /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
1956
+ * @documentationMaturity preview
1957
+ */
1958
+ limit: (limit: number) => ParticipantsQueryBuilder;
1959
+ /** @param cursor - A pointer to specific record
1960
+ * @documentationMaturity preview
1961
+ */
1962
+ skipTo: (cursor: string) => ParticipantsQueryBuilder;
1963
+ /** @documentationMaturity preview */
1964
+ find: () => Promise<ParticipantsQueryResult>;
1965
+ }
1966
+ /**
1967
+ * @hidden
1968
+ * @fqn wix.onlineprograms.participants.v3.ParticipantsService.QueryParticipants
1969
+ * @requiredField query
1970
+ */
1971
+ declare function typedQueryParticipants(query: ParticipantQuery, options?: QueryParticipantsOptions): Promise<NonNullablePaths<QueryParticipantsResponse, `participants` | `participants.${number}.memberId` | `participants.${number}.programId` | `participants.${number}.progress.totalStepsCompleted` | `participants.${number}.progress.totalStepsAvailable` | `participants.${number}.progress.completionPercentage` | `participants.${number}.enrollmentStatus` | `participants.${number}.progressStatus` | `participants.${number}.enrollmentInfo.singlePaymentDetails.paymentOrderId` | `participants.${number}.enrollmentInfo.paidPlanDetails.paidPlanId` | `participants.${number}.enrollmentInfo.freeCouponDetails.freeCouponId` | `participants.${number}.enrollmentInfo.timeZone` | `participants.${number}.enrollmentInfo.startDate` | `participants.${number}.enrollmentInfo.pricingType`, 6>>;
1972
+ interface ParticipantQuerySpec extends QuerySpec {
1973
+ paging: 'cursor';
1974
+ wql: [
1975
+ {
1976
+ fields: ['_id'];
1977
+ operators: ['$eq', '$in'];
1978
+ sort: 'BOTH';
1979
+ },
1980
+ {
1981
+ fields: ['enrollmentStatus', 'progressStatus'];
1982
+ operators: ['$eq', '$in'];
1983
+ sort: 'BOTH';
1984
+ },
1985
+ {
1986
+ fields: ['memberId'];
1987
+ operators: ['$eq', '$in'];
1988
+ sort: 'NONE';
1989
+ },
1990
+ {
1991
+ fields: ['programId'];
1992
+ operators: ['$eq'];
1993
+ sort: 'NONE';
1994
+ },
1995
+ {
1996
+ fields: [
1997
+ '_createdDate',
1998
+ 'lastActivityDate',
1999
+ 'progress.totalStepsCompleted'
2000
+ ];
2001
+ operators: '*';
2002
+ sort: 'BOTH';
2003
+ },
2004
+ {
2005
+ fields: ['enrollmentInfo.startDate'];
2006
+ operators: ['$gt', '$gte', '$lt', '$lte'];
2007
+ sort: 'BOTH';
2008
+ }
2009
+ ];
2010
+ }
2011
+ type CommonQueryWithEntityContext = Query<Participant, ParticipantQuerySpec>;
2012
+ type ParticipantQuery = {
2013
+ /**
2014
+ Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`.
2015
+ */
2016
+ cursorPaging?: {
2017
+ /**
2018
+ Maximum number of items to return in the results.
2019
+ @max: 100
2020
+ */
2021
+ limit?: NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit'] | null;
2022
+ /**
2023
+ Pointer to the next or previous page in the list of results.
2024
+
2025
+ Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
2026
+ Not relevant for the first request.
2027
+ @maxLength: 16000
2028
+ */
2029
+ cursor?: NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor'] | null;
2030
+ };
2031
+ /**
2032
+ Filter object.
2033
+
2034
+ Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).
2035
+ */
2036
+ filter?: CommonQueryWithEntityContext['filter'] | null;
2037
+ /**
2038
+ Sort object.
2039
+
2040
+ Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).
2041
+ @maxSize: 100
2042
+ */
2043
+ sort?: {
2044
+ /**
2045
+ Name of the field to sort by.
2046
+ @maxLength: 512
2047
+ */
2048
+ fieldName?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['fieldName'];
2049
+ /**
2050
+ Sort order.
2051
+ */
2052
+ order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];
2053
+ }[];
2054
+ };
2055
+ declare const utils: {
2056
+ query: _wix_sdk_types.QueryHelpers<Participant, ParticipantQuerySpec, ParticipantQuery>;
2057
+ search: _wix_sdk_types.SearchHelpers<Participant, ParticipantSearchSpec, ParticipantSearch>;
2058
+ };
2059
+ /**
2060
+ * Retrieves the access status for the current site, indicating whether participants can access
2061
+ * online programs or if access is blocked due to plan limitations or other restrictions.
2062
+ * @public
2063
+ * @documentationMaturity preview
2064
+ * @permissionId online_programs:participants:v3:participant:get_access_status
2065
+ * @applicableIdentity APP
2066
+ * @fqn wix.onlineprograms.participants.v3.ParticipantsService.GetAccessStatus
2067
+ */
2068
+ declare function getAccessStatus(): Promise<NonNullablePaths<GetAccessStatusResponse, `accessBlocked`, 2>>;
2069
+ /**
2070
+ * Updates tags for multiple Participants by IDs.
2071
+ *
2072
+ * Allows assigning and/or unassigning tags in a single operation.
2073
+ * At least one of assign_tags or unassign_tags must be provided.
2074
+ * @param participantIds - Participant IDs to update tags for (1-100 items)
2075
+ * @public
2076
+ * @documentationMaturity preview
2077
+ * @requiredField participantIds
2078
+ * @permissionId online_programs:participants:v3:participant:bulk_update_participant_tags
2079
+ * @applicableIdentity APP
2080
+ * @fqn wix.onlineprograms.participants.v3.ParticipantsService.BulkUpdateParticipantTags
2081
+ */
2082
+ declare function bulkUpdateParticipantTags(participantIds: string[], options?: BulkUpdateParticipantTagsOptions): Promise<NonNullablePaths<BulkUpdateParticipantTagsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6> & {
2083
+ __applicationErrorsType?: BulkUpdateParticipantTagsApplicationErrors;
2084
+ }>;
2085
+ interface BulkUpdateParticipantTagsOptions {
2086
+ /** Tags to assign to the Participants */
2087
+ assignTags?: Tags;
2088
+ /** Tags to unassign from the Participants */
2089
+ unassignTags?: Tags;
2090
+ }
2091
+ /**
2092
+ * Updates tags for Participants matching a filter.
2093
+ *
2094
+ * Allows assigning and/or unassigning tags for all Participants matching the filter.
2095
+ * Returns a job ID for tracking the async operation.
2096
+ * @param filter - WQL filter to select Participants
2097
+ * @public
2098
+ * @documentationMaturity preview
2099
+ * @requiredField filter
2100
+ * @permissionId online_programs:participants:v3:participant:bulk_update_participant_tags_by_filter
2101
+ * @applicableIdentity APP
2102
+ * @fqn wix.onlineprograms.participants.v3.ParticipantsService.BulkUpdateParticipantTagsByFilter
2103
+ */
2104
+ declare function bulkUpdateParticipantTagsByFilter(filter: Record<string, any>, options?: BulkUpdateParticipantTagsByFilterOptions): Promise<NonNullablePaths<BulkUpdateParticipantTagsByFilterResponse, `jobId`, 2> & {
2105
+ __applicationErrorsType?: BulkUpdateParticipantTagsByFilterApplicationErrors;
2106
+ }>;
2107
+ interface BulkUpdateParticipantTagsByFilterOptions {
2108
+ /** Tags to assign to matching Participants */
2109
+ assignTags?: Tags;
2110
+ /** Tags to unassign from matching Participants */
2111
+ unassignTags?: Tags;
2112
+ }
2113
+ interface SearchParticipantsOptions {
2114
+ /**
2115
+ * Array of conditional fields to include in the response.
2116
+ * Use RequestedFields.PROGRESS to include the progress field which is conditionally returned.
2117
+ * @maxSize 1
2118
+ */
2119
+ fields?: RequestedFieldsWithLiterals[];
2120
+ }
2121
+ interface ParticipantSearchSpec extends SearchSpec {
2122
+ searchable: [
2123
+ 'member.email',
2124
+ 'member.firstName',
2125
+ 'member.lastName',
2126
+ 'member.nickname'
2127
+ ];
2128
+ aggregatable: [
2129
+ '_createdDate',
2130
+ '_id',
2131
+ '_updatedDate',
2132
+ 'enrollmentInfo.startDate',
2133
+ 'enrollmentStatus',
2134
+ 'lastActivityDate',
2135
+ 'member.contactId',
2136
+ 'memberId',
2137
+ 'programId',
2138
+ 'progress.completionPercentage',
2139
+ 'progress.totalStepsCompleted',
2140
+ 'progressStatus'
2141
+ ];
2142
+ paging: 'cursor';
2143
+ wql: [
2144
+ {
2145
+ operators: '*';
2146
+ fields: [
2147
+ '_id',
2148
+ 'enrollmentInfo.startDate',
2149
+ 'member.contactId',
2150
+ 'member.email',
2151
+ 'member.firstName',
2152
+ 'member.lastName',
2153
+ 'member.nickname',
2154
+ 'memberId',
2155
+ 'programId',
2156
+ 'progress.completionPercentage',
2157
+ 'progress.totalStepsCompleted'
2158
+ ];
2159
+ sort: 'BOTH';
2160
+ },
2161
+ {
2162
+ operators: ['$eq', '$in', '$nin'];
2163
+ fields: ['enrollmentStatus', 'progressStatus'];
2164
+ sort: 'BOTH';
2165
+ },
2166
+ {
2167
+ operators: '*';
2168
+ fields: ['_createdDate', '_updatedDate', 'lastActivityDate'];
2169
+ sort: 'BOTH';
2170
+ }
2171
+ ];
2172
+ }
2173
+ type CommonSearchWithEntityContext = Search<Participant, ParticipantSearchSpec>;
2174
+ type ParticipantSearch = {
2175
+ /**
2176
+ Cursor paging options.
2177
+
2178
+ Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
2179
+ */
2180
+ cursorPaging?: {
2181
+ /**
2182
+ Maximum number of items to return in the results.
2183
+ @max: 100
2184
+ */
2185
+ limit?: NonNullable<CommonSearchWithEntityContext['cursorPaging']>['limit'] | null;
2186
+ /**
2187
+ Pointer to the next or previous page in the list of results.
2188
+
2189
+ Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
2190
+ Not relevant for the first request.
2191
+ @maxLength: 16000
2192
+ */
2193
+ cursor?: NonNullable<CommonSearchWithEntityContext['cursorPaging']>['cursor'] | null;
2194
+ };
2195
+ /**
2196
+ Filter object.
2197
+
2198
+ Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).
2199
+ */
2200
+ filter?: CommonSearchWithEntityContext['filter'] | null;
2201
+ /**
2202
+ List of sort objects.
2203
+
2204
+ Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).
2205
+ @maxSize: 10
2206
+ */
2207
+ sort?: {
2208
+ /**
2209
+ Name of the field to sort by.
2210
+ @maxLength: 512
2211
+ */
2212
+ fieldName?: NonNullable<CommonSearchWithEntityContext['sort']>[number]['fieldName'];
2213
+ /**
2214
+ Sort order.
2215
+ */
2216
+ order?: NonNullable<CommonSearchWithEntityContext['sort']>[number]['order'];
2217
+ }[];
2218
+ /**
2219
+ Logical groupings of data into facets, with summaries for each facet. For example, use aggregations to allow site visitors to narrow down their search results by selecting specific categories.
2220
+ @maxSize: 10
2221
+ */
2222
+ aggregations?: {
2223
+ /**
2224
+ A value aggregation calculates metrics such as count for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number (count) of products for each price listed in the store.
2225
+ */
2226
+ value?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['value'];
2227
+ /**
2228
+ A range aggregation calculates the count of the values from the specified field in the dataset that fall within the range of each bucket you define. For example, use a range aggregation to compare the number of reservations made for parties of 4 or less to the number of reservations made for parties with 5 or more.
2229
+ */
2230
+ range?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['range'];
2231
+ /**
2232
+ A scalar aggregation calculates a single numerical value from a dataset, summarizing the dataset into one key metric: `COUNT_DISTINCT`, `SUM`, `AVG`, `MIN`, or `MAX`.
2233
+ */
2234
+ scalar?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['scalar'];
2235
+ /**
2236
+ A date histogram calculates the count of time values from the specified field in the dataset that fall within each time interval you define (hour, day, week, etc.) For example, use a date histogram to find how many reservations have been made at a restaurant each week.
2237
+ */
2238
+ dateHistogram?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['dateHistogram'];
2239
+ /**
2240
+ A nested aggregation is applied within the results of another aggregation. Rather than aggregating directly on the primary dataset, first group data using one aggregation and then apply another aggregation within each group. It allows for more complex analyses where you can summarize data at different levels of detail or hierarchy. For example, to get the number of products that are in stock and out of stock for each price listed, first perform a value aggregation on `discountedPriceNumeric`, and a second value aggregation on `inStock`.
2241
+ */
2242
+ nested?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['nested'];
2243
+ /**
2244
+ Aggregation name, returned in `aggregations.results.name`.
2245
+ @maxLength: 100
2246
+ */
2247
+ name?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['name'] | null;
2248
+ /**
2249
+ Type of aggregation to perform. Must align with the corresponding aggregation field.
2250
+ */
2251
+ type?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['type'];
2252
+ /**
2253
+ Field to aggregate by. Use dot notation to specify a JSON path. For example, `order.address.streetName`.
2254
+ @maxLength: 200
2255
+ */
2256
+ fieldPath?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['fieldPath'];
2257
+ /**
2258
+ Deprecated. Use `nested` instead.
2259
+ @deprecated: Deprecated. Use `nested` instead.,
2260
+ @replacedBy: kind.nested,
2261
+ @targetRemovalDate: 2024-03-30
2262
+ */
2263
+ groupBy?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['groupBy'];
2264
+ }[];
2265
+ /**
2266
+ Free text to match in searchable fields.
2267
+ */
2268
+ search?: {
2269
+ /**
2270
+ Search mode. Defines the search logic for combining multiple terms in the `expression`.
2271
+ */
2272
+ mode?: NonNullable<CommonSearchWithEntityContext['search']>['mode'];
2273
+ /**
2274
+ Search term or expression.
2275
+ @maxLength: 100
2276
+ */
2277
+ expression?: NonNullable<CommonSearchWithEntityContext['search']>['expression'] | null;
2278
+ /**
2279
+ Fields to search in. If the array is empty, all searchable fields are searched. Use dot notation to specify a JSON path. For example, `order.address.streetName`.
2280
+ @maxLength: 200,
2281
+ @maxSize: 20
2282
+ */
2283
+ fields?: NonNullable<CommonSearchWithEntityContext['search']>['fields'];
2284
+ /**
2285
+ Whether to enable the search function to use an algorithm to automatically find results that are close to the search expression, such as typos and declensions.
2286
+ */
2287
+ fuzzy?: NonNullable<CommonSearchWithEntityContext['search']>['fuzzy'];
2288
+ };
2289
+ /**
2290
+ Time zone to adjust date-time-based filters and aggregations, in ISO 8601 (including offsets) or IANA time zone database (including time zone IDs) format.
2291
+ Applies to all relevant filters and aggregations, unless overridden by providing timestamps including time zone. For example, "2023-12-20T10:52:34.795Z".
2292
+ @maxLength: 50
2293
+ */
2294
+ timeZone?: CommonSearchWithEntityContext['timeZone'] | null;
2295
+ };
2296
+ /**
2297
+ * Exports participant data and step completion statistics for a program as a CSV file.
2298
+ * The export includes participant details, progress, status, and completion dates for each step.
2299
+ *
2300
+ * This method initiates an asynchronous export. Subscribe to the `ParticipantExportsFinished`
2301
+ * event to receive the download URL when the export completes.
2302
+ * @param programId - program id to export data from
2303
+ * @internal
2304
+ * @documentationMaturity preview
2305
+ * @requiredField programId
2306
+ * @permissionId online_programs:participants:v3:participant:export_participants_stats
2307
+ * @fqn wix.onlineprograms.participants.v3.ParticipantExportsService.ExportParticipantsStats
2308
+ */
2309
+ declare function exportParticipantsStats(programId: string): Promise<void>;
2310
+
2311
+ export { type Tags as $, SortDirection as A, type BulkCreateParticipantsOptions as B, type CreateParticipantOptions as C, ScalarType as D, EnrollmentStatus as E, Interval as F, type GetPremiumStatsResponse as G, AggregationType as H, type IssueCertificateOptions as I, Mode as J, type SinglePaymentDetails as K, type PaidPlanDetails as L, MissingValues as M, NestedAggregationType as N, type FreeCouponDetails as O, type Participant as P, type QueryParticipantsOptions as Q, RequestedFields as R, type SearchParticipantsOptions as S, type Progress as T, type UpdateParticipant as U, type CertificateInfo as V, WebhookIdentityType as W, type Member as X, type EnrollmentInfo as Y, type EnrollmentInfoPricingTypeDetailsOneOf as Z, type ExtendedFields as _, type CreateParticipantApplicationErrors as a, type ValueAggregationOptionsOneOf as a$, type TagList as a0, type ReindexMessage as a1, type ReindexMessageActionOneOf as a2, type Upsert as a3, type Delete as a4, type Schema as a5, type ParticipantAdded as a6, type ParticipantTagsModified as a7, type ParticipantCompletedProgram as a8, type ParticipantMissedProgramDeadline as a9, type IssueCertificateRequest as aA, type GetCompletionStatsRequest as aB, type GetCompletionStatsResponse as aC, type GetPremiumStatsRequest as aD, type GetParticipantRequest as aE, type GetParticipantResponse as aF, type QueryParticipantsRequest as aG, type QueryV2 as aH, type QueryV2PagingMethodOneOf as aI, type Sorting as aJ, type Paging as aK, type CursorPaging as aL, type QueryParticipantsResponse as aM, type PagingMetadataV2 as aN, type Cursors as aO, type GetAccessStatusRequest as aP, type BulkUpdateParticipantTagsRequest as aQ, type BulkUpdateParticipantTagsResult as aR, type BulkUpdateParticipantTagsByFilterRequest as aS, type SearchParticipantsRequest as aT, type CursorSearch as aU, type CursorSearchPagingMethodOneOf as aV, type Aggregation as aW, type AggregationKindOneOf as aX, type RangeBucket as aY, type IncludeMissingValuesOptions as aZ, type ValueAggregation as a_, type ParticipantProgramDurationEnded as aa, type ParticipantRemoved as ab, type ParticipantLeft as ac, type ParticipantExportsFinished as ad, type CreateParticipantRequest as ae, type CreateParticipantResponse as af, type UpdateParticipantRequest as ag, type UpdateParticipantResponse as ah, type BulkCreateParticipantsRequest as ai, type BulkParticipantResult as aj, type ItemMetadata as ak, type ApplicationError as al, type BulkActionMetadata as am, type BulkUpsertParticipantsMigrationRequest as an, type ParticipantMigration as ao, type BulkUpsertParticipantsMigrationResponse as ap, type BulkParticipantMigrationResult as aq, type DeleteAllParticipantsMigrationRequest as ar, type DeleteAllParticipantsMigrationResponse as as, type ReindexParticipantsSearchRequest as at, type ReindexParticipantsSearchResponse as au, type SynchronizeTimeCapsuleTasksRequest as av, type SynchronizeTimeCapsuleTasksResponse as aw, type BulkCreateParticipantsForAllMembersRequest as ax, type DeleteParticipantRequest as ay, type DeleteParticipantResponse as az, type UpdateParticipantOptions as b, type WebhookIdentityTypeWithLiterals as b$, type RangeAggregation as b0, type ScalarAggregation as b1, type DateHistogramAggregation as b2, type NestedAggregationItem as b3, type NestedAggregationItemKindOneOf as b4, type NestedAggregation as b5, type GroupByAggregation as b6, type GroupByAggregationKindOneOf as b7, type SearchDetails as b8, type CursorPagingMetadata as b9, type EntityDeletedEvent as bA, type ActionEvent as bB, type Empty as bC, type MessageEnvelope as bD, type IdentificationData as bE, type IdentificationDataIdOneOf as bF, type AccountInfo as bG, type ExportParticipantsStatsRequest as bH, type ExportParticipantsStatsResponse as bI, type ParticipantsQueryResult as bJ, type ParticipantQuerySpec as bK, type ParticipantSearchSpec as bL, utils as bM, type PricingTypeWithLiterals as bN, type EnrollmentStatusWithLiterals as bO, type ProgressStatusWithLiterals as bP, type RequestedFieldsWithLiterals as bQ, type BulkActionTypeWithLiterals as bR, type SortOrderWithLiterals as bS, type SortTypeWithLiterals as bT, type SortDirectionWithLiterals as bU, type MissingValuesWithLiterals as bV, type ScalarTypeWithLiterals as bW, type NestedAggregationTypeWithLiterals as bX, type IntervalWithLiterals as bY, type AggregationTypeWithLiterals as bZ, type ModeWithLiterals as b_, type AggregationData as ba, type ValueAggregationResult as bb, type RangeAggregationResult as bc, type NestedAggregationResults as bd, type NestedAggregationResultsResultOneOf as be, type ValueResults as bf, type RangeResults as bg, type AggregationResultsScalarResult as bh, type NestedValueAggregationResult as bi, type ValueResult as bj, type RangeResult as bk, type ScalarResult as bl, type NestedResultValue as bm, type NestedResultValueResultOneOf as bn, type Results as bo, type DateHistogramResult as bp, type GroupByValueResults as bq, type DateHistogramResults as br, type NestedResults as bs, type AggregationResults as bt, type AggregationResultsResultOneOf as bu, type DomainEvent as bv, type DomainEventBodyOneOf as bw, type EntityCreatedEvent as bx, type RestoreInfo as by, type EntityUpdatedEvent as bz, type BulkCreateParticipantsResponse as c, type CommonQueryWithEntityContext as c0, type CommonSearchWithEntityContext as c1, createParticipant as c2, updateParticipant as c3, bulkCreateParticipants as c4, bulkCreateParticipantsForAllMembers as c5, deleteParticipant as c6, issueCertificate as c7, getPremiumStats as c8, getParticipant as c9, queryParticipants as ca, getAccessStatus as cb, bulkUpdateParticipantTags as cc, bulkUpdateParticipantTagsByFilter as cd, exportParticipantsStats as ce, type BulkCreateParticipantsApplicationErrors as d, type BulkCreateParticipantsForAllMembersOptions as e, type BulkCreateParticipantsForAllMembersResponse as f, type IssueCertificateResponse as g, type IssueCertificateApplicationErrors as h, type GetParticipantOptions as i, type GetAccessStatusResponse as j, type BulkUpdateParticipantTagsOptions as k, type BulkUpdateParticipantTagsResponse as l, type BulkUpdateParticipantTagsApplicationErrors as m, type BulkUpdateParticipantTagsByFilterOptions as n, type BulkUpdateParticipantTagsByFilterResponse as o, type BulkUpdateParticipantTagsByFilterApplicationErrors as p, type ParticipantSearch as q, type SearchParticipantsResponse as r, type ParticipantQuery as s, typedQueryParticipants as t, type ParticipantsQueryBuilder as u, PricingType as v, ProgressStatus as w, BulkActionType as x, SortOrder as y, SortType as z };