@wix/auto_sdk_online-programs_participants 1.0.10 → 1.0.12

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 (37) hide show
  1. package/build/cjs/index.d.ts +3 -93
  2. package/build/cjs/index.js +159 -1168
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +95 -652
  5. package/build/cjs/index.typings.js +11 -916
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +96 -487
  8. package/build/cjs/meta.js +11 -790
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +3 -93
  11. package/build/es/index.mjs +144 -1139
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +95 -652
  14. package/build/es/index.typings.mjs +2 -892
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +96 -487
  17. package/build/es/meta.mjs +2 -767
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +3 -104
  20. package/build/internal/cjs/index.js +159 -1168
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +95 -662
  23. package/build/internal/cjs/index.typings.js +11 -916
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +96 -487
  26. package/build/internal/cjs/meta.js +11 -790
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +3 -104
  29. package/build/internal/es/index.mjs +144 -1139
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +95 -662
  32. package/build/internal/es/index.typings.mjs +2 -892
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +96 -487
  35. package/build/internal/es/meta.mjs +2 -767
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +3 -3
@@ -185,41 +185,29 @@ interface ParticipantAdded {
185
185
  */
186
186
  memberId?: string;
187
187
  }
188
- interface CreateParticipantRequest {
189
- /** Participant to create */
190
- participant: Participant;
191
- }
192
- interface CreateParticipantResponse {
193
- /** Created participant */
194
- participant?: Participant;
195
- }
196
- interface BulkCreateParticipantRequest {
188
+ interface BulkInviteToProgramRequest {
197
189
  /**
198
- * List of participants you want to create
199
- * @minSize 1
200
- * @maxSize 100
190
+ * Program to which bulk invite participants.
191
+ * @format GUID
201
192
  */
202
- participants: Participant[];
203
- /** Whether to return entities in response or not. */
204
- returnEntity?: boolean;
205
- }
206
- interface BulkCreateParticipantResponse {
193
+ programId: string;
207
194
  /**
208
- * Results of bulk action.
195
+ * Return added participants in the response or not.
196
+ * @format GUID
209
197
  * @minSize 1
210
198
  * @maxSize 100
211
199
  */
212
- results?: BulkParticipantResult[];
213
- /** Metadata about whole bulk action. */
214
- bulkActionMetadata?: CommonBulkActionMetadata;
200
+ memberIds?: string[];
201
+ /** Return invited participants in the response or not. */
202
+ returnEntity?: boolean;
215
203
  }
216
- interface BulkParticipantResult {
217
- /** Metadata of item. */
218
- itemMetadata?: CommonItemMetadata;
219
- /** Item itself (empty if return_entity in request is false). */
220
- item?: Participant;
204
+ interface BulkInviteToProgramResponse {
205
+ /** Participants created by bulk action */
206
+ results?: BulkInviteToProgramResult[];
207
+ /** Bulk action metadata. */
208
+ bulkActionMetadata?: BulkActionMetadata;
221
209
  }
222
- interface CommonItemMetadata {
210
+ interface ItemMetadata {
223
211
  /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
224
212
  _id?: string | null;
225
213
  /** Index of the item within the request array. Allows for correlation between request and response items. */
@@ -237,7 +225,13 @@ interface ApplicationError {
237
225
  /** Data related to the error. */
238
226
  data?: Record<string, any> | null;
239
227
  }
240
- interface CommonBulkActionMetadata {
228
+ interface BulkInviteToProgramResult {
229
+ /** Invited participant metadata. */
230
+ itemMetadata?: ItemMetadata;
231
+ /** Invited participant */
232
+ item?: Participant;
233
+ }
234
+ interface BulkActionMetadata {
241
235
  /** Number of items that were successfully processed. */
242
236
  totalSuccesses?: number;
243
237
  /** Number of items that couldn't be processed. */
@@ -245,180 +239,121 @@ interface CommonBulkActionMetadata {
245
239
  /** Number of failures without details because detailed failure threshold was exceeded. */
246
240
  undetailedFailures?: number;
247
241
  }
248
- interface BulkAddAllToProgramRequest {
249
- /**
250
- * Program to which bulk add participants.
251
- * @format GUID
252
- */
253
- programId: string;
242
+ interface ParticipantInvited {
254
243
  /**
255
- * Exclude site members.
244
+ * Program to which bulk invite participants.
256
245
  * @format GUID
257
- * @maxSize 100
258
246
  */
259
- excludeMemberIds?: string[];
260
- }
261
- interface BulkAddAllToProgramResponse {
247
+ programId?: string;
262
248
  /**
263
- * Async infra job id which will process the request.
249
+ * Invited member to program
264
250
  * @format GUID
265
251
  */
266
- jobId?: string;
252
+ memberId?: string;
267
253
  }
268
- interface DeleteParticipantRequest {
254
+ interface BulkInviteAllToProgramRequest {
269
255
  /**
270
- * Participants to delete
256
+ * Program to which bulk add participants.
271
257
  * @format GUID
272
258
  */
273
- participantId: string;
274
- }
275
- interface DeleteParticipantResponse {
276
- }
277
- interface IssueCertificateRequest {
259
+ programId: string;
278
260
  /**
279
- * Participant to get certificate
261
+ * Exclude site members.
280
262
  * @format GUID
263
+ * @maxSize 100
281
264
  */
282
- participantId: string;
265
+ excludeMemberIds?: string[];
283
266
  }
284
- interface IssueCertificateResponse {
285
- /** Updated participant */
286
- participant?: Participant;
267
+ interface BulkInviteAllToProgramResponse {
268
+ /** Bulk action metadata. */
269
+ bulkActionMetadata?: BulkActionMetadata;
287
270
  }
288
- interface GetCompletionStatsRequest {
271
+ interface BulkAddToProgramRequest {
289
272
  /**
290
- * program id to get stats for
273
+ * Program to which bulk add participants.
291
274
  * @format GUID
292
275
  */
293
276
  programId: string;
294
- }
295
- interface GetCompletionStatsResponse {
296
- /** Number of participants that completed the program */
297
- completedAll?: number;
298
- /** Percentage of participants that completed the program */
299
- completionRate?: number;
300
- }
301
- interface GetPremiumStatsRequest {
302
- }
303
- interface GetPremiumStatsResponse {
304
- /** True if site has Online Programs premium feature */
305
- hasPremium?: boolean;
306
- /** Count of active participants on the site */
307
- activeParticipantsCount?: number;
308
- /** Limit of active participants on a site without premium */
309
- activeParticipantsLimit?: number;
310
- }
311
- interface GetParticipantRequest {
312
277
  /**
313
- * Participant id to fetch
278
+ * Site members.
314
279
  * @format GUID
280
+ * @minSize 1
281
+ * @maxSize 1000
315
282
  */
316
- participantId: string;
283
+ memberIds?: string[];
284
+ /** Return added participants in the response or not. */
285
+ returnEntity?: boolean;
317
286
  }
318
- interface GetParticipantResponse {
319
- /** existing participant */
320
- participant?: Participant;
287
+ interface BulkAddToProgramResponse {
288
+ /** Participants created by bulk action */
289
+ results?: BulkAddToProgramResult[];
290
+ /** Bulk action metadata. */
291
+ bulkActionMetadata?: BulkActionMetadata;
321
292
  }
322
- interface QueryParticipantsRequest {
323
- /** Platformized query */
324
- query?: CursorQuery;
293
+ interface BulkAddToProgramResult {
294
+ /** Added participant metadata. */
295
+ itemMetadata?: ItemMetadata;
296
+ /** Added participant */
297
+ item?: Participant;
325
298
  }
326
- interface CursorQuery extends CursorQueryPagingMethodOneOf {
327
- /**
328
- * Cursor paging options.
329
- *
330
- * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
331
- */
332
- cursorPaging?: CursorPaging;
333
- /**
334
- * Filter object.
335
- *
336
- * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).
337
- */
338
- filter?: Record<string, any> | null;
299
+ interface BulkApproveParticipantRequest {
339
300
  /**
340
- * Sort object.
341
- *
342
- * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).
343
- * @maxSize 5
301
+ * Participants to add
302
+ * @format GUID
303
+ * @maxSize 100
344
304
  */
345
- sort?: Sorting[];
346
- }
347
- /** @oneof */
348
- interface CursorQueryPagingMethodOneOf {
305
+ participantIds: string[];
349
306
  /**
350
- * Cursor paging options.
351
- *
352
- * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
307
+ * program to approve participant
308
+ * @format GUID
353
309
  */
354
- cursorPaging?: CursorPaging;
310
+ programId?: string;
311
+ /** Return approved participants in the response or not */
312
+ returnEntity?: boolean;
355
313
  }
356
- interface Sorting {
357
- /**
358
- * Name of the field to sort by.
359
- * @maxLength 512
360
- */
361
- fieldName?: string;
362
- /** Sort order. */
363
- order?: SortOrderWithLiterals;
314
+ interface BulkApproveParticipantResponse {
315
+ /** Participants approved by bulk action */
316
+ results?: BulkApproveParticipantResult[];
317
+ /** Bulk action metadata */
318
+ bulkActionMetadata?: BulkActionMetadata;
364
319
  }
365
- declare enum SortOrder {
366
- ASC = "ASC",
367
- DESC = "DESC"
320
+ interface BulkApproveParticipantResult {
321
+ /** Approved participant metadata */
322
+ itemMetadata?: ItemMetadata;
323
+ /** Approved or existing participant */
324
+ item?: Participant;
368
325
  }
369
- /** @enumType */
370
- type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
371
- interface CursorPaging {
326
+ interface ParticipantApproved {
372
327
  /**
373
- * Maximum number of items to return in the results.
374
- * @max 100
328
+ * Program ID which participant approved
329
+ * @format GUID
375
330
  */
376
- limit?: number | null;
331
+ programId?: string;
377
332
  /**
378
- * Pointer to the next or previous page in the list of results.
379
- *
380
- * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
381
- * Not relevant for the first request.
382
- * @maxLength 16000
333
+ * Member ID of participant approved
334
+ * @format GUID
383
335
  */
384
- cursor?: string | null;
385
- }
386
- interface QueryParticipantsResponse {
387
- /** found participants */
388
- participants?: Participant[];
389
- /** paging metadata */
390
- pagingMetadata?: CursorPagingMetadata;
336
+ memberId?: string;
391
337
  }
392
- interface CursorPagingMetadata {
393
- /** Number of items returned in current page. */
394
- count?: number | null;
395
- /** Cursor strings that point to the next page, previous page, or both. */
396
- cursors?: Cursors;
338
+ interface BulkApproveAllParticipantRequest {
397
339
  /**
398
- * Whether there are more pages to retrieve following the current page.
399
- *
400
- * + `true`: Another page of results can be retrieved.
401
- * + `false`: This is the last page.
340
+ * Program to approve all participants.
341
+ * @format GUID
402
342
  */
403
- hasNext?: boolean | null;
404
- }
405
- interface Cursors {
343
+ programId?: string;
406
344
  /**
407
- * Cursor string pointing to the next page in the list of results.
408
- * @maxLength 16000
345
+ * Exclude site members.
346
+ * @format GUID
347
+ * @maxSize 100
409
348
  */
410
- next?: string | null;
349
+ excludeParticipantIds?: string[];
350
+ }
351
+ interface BulkApproveAllParticipantResponse {
411
352
  /**
412
- * Cursor pointing to the previous page in the list of results.
413
- * @maxLength 16000
353
+ * Job id with async process
354
+ * @format GUID
414
355
  */
415
- prev?: string | null;
416
- }
417
- interface GetAccessStatusRequest {
418
- }
419
- interface GetAccessStatusResponse {
420
- /** True if participants cannot access online programs due to some limitations */
421
- isBlocked?: boolean;
356
+ jobId?: string;
422
357
  }
423
358
  interface DomainEvent extends DomainEventBodyOneOf {
424
359
  createdEvent?: EntityCreatedEvent;
@@ -482,115 +417,6 @@ interface EntityDeletedEvent {
482
417
  interface ActionEvent {
483
418
  body?: string;
484
419
  }
485
- interface Empty {
486
- }
487
- interface BenefitNotification {
488
- /**
489
- * Plan unique ID
490
- * @format GUID
491
- */
492
- planId?: string;
493
- /**
494
- * App def ID
495
- * @format GUID
496
- */
497
- appDefId?: string;
498
- /** Current benefit details */
499
- benefit?: Benefit;
500
- /** Previous benefit */
501
- prevBenefit?: Benefit;
502
- /** Notification event */
503
- event?: EventWithLiterals;
504
- }
505
- interface Benefit {
506
- /**
507
- * Benefit unique ID
508
- * @format GUID
509
- * @readonly
510
- */
511
- _id?: string | null;
512
- /** Benefit Type */
513
- benefitType?: BenefitTypeWithLiterals;
514
- /**
515
- * Resource IDs that serves by this benefit
516
- * @format GUID
517
- */
518
- resourceIds?: string[];
519
- /** Amount of credits that provided by this benefit */
520
- creditAmount?: number | null;
521
- /**
522
- * additional details related to benefit; limited to 20 entries, 20 symbols for key and 20 symbols for value
523
- * @maxSize 20
524
- */
525
- customFields?: Record<string, string>;
526
- /** return value only in case it required in the ListRequest, true means that benefit's type could be updated */
527
- editable?: boolean | null;
528
- /** Benefit behavior */
529
- behavior?: Behavior;
530
- /**
531
- * Id of the app associated with this benefit
532
- * @format GUID
533
- * @readonly
534
- */
535
- appDefId?: string | null;
536
- }
537
- interface EntryPass {
538
- }
539
- interface Discount extends DiscountDiscountOneOf {
540
- /**
541
- * Fixed-rate percent off discount
542
- * @decimalValue options { gt:0, lte:100, maxScale:2 }
543
- */
544
- percentOffRate?: string;
545
- /**
546
- * Absolute amount discount
547
- * @decimalValue options { gt:0, maxScale:2 }
548
- */
549
- moneyOffAmount?: string;
550
- }
551
- /** @oneof */
552
- interface DiscountDiscountOneOf {
553
- /**
554
- * Fixed-rate percent off discount
555
- * @decimalValue options { gt:0, lte:100, maxScale:2 }
556
- */
557
- percentOffRate?: string;
558
- /**
559
- * Absolute amount discount
560
- * @decimalValue options { gt:0, maxScale:2 }
561
- */
562
- moneyOffAmount?: string;
563
- }
564
- declare enum BenefitType {
565
- /** Should never be used */
566
- UNDEFINED = "UNDEFINED",
567
- /** Limited benefit type */
568
- LIMITED = "LIMITED",
569
- /** Unlimited benefit type */
570
- UNLIMITED = "UNLIMITED"
571
- }
572
- /** @enumType */
573
- type BenefitTypeWithLiterals = BenefitType | 'UNDEFINED' | 'LIMITED' | 'UNLIMITED';
574
- interface Behavior extends BehaviorBehaviorOneOf {
575
- /** Entry pass for resources, e.g. a ticket for Bookings service or a ticket for Events. */
576
- defaultBehavior?: EntryPass;
577
- /** Discount applied to paid resources */
578
- discount?: Discount;
579
- }
580
- /** @oneof */
581
- interface BehaviorBehaviorOneOf {
582
- /** Entry pass for resources, e.g. a ticket for Bookings service or a ticket for Events. */
583
- defaultBehavior?: EntryPass;
584
- /** Discount applied to paid resources */
585
- discount?: Discount;
586
- }
587
- declare enum Event {
588
- Updated = "Updated",
589
- Deleted = "Deleted",
590
- Created = "Created"
591
- }
592
- /** @enumType */
593
- type EventWithLiterals = Event | 'Updated' | 'Deleted' | 'Created';
594
420
  interface MessageEnvelope {
595
421
  /**
596
422
  * App instance ID.
@@ -663,202 +489,6 @@ declare enum WebhookIdentityType {
663
489
  }
664
490
  /** @enumType */
665
491
  type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
666
- interface BulkInviteToProgramRequest {
667
- /**
668
- * Program to which bulk invite participants.
669
- * @format GUID
670
- */
671
- programId: string;
672
- /**
673
- * Return added participants in the response or not.
674
- * @format GUID
675
- * @minSize 1
676
- * @maxSize 100
677
- */
678
- memberIds?: string[];
679
- /** Return invited participants in the response or not. */
680
- returnEntity?: boolean;
681
- }
682
- interface BulkInviteToProgramResponse {
683
- /** Participants created by bulk action */
684
- results?: BulkInviteToProgramResult[];
685
- /** Bulk action metadata. */
686
- bulkActionMetadata?: BulkActionMetadata;
687
- }
688
- interface ItemMetadata {
689
- /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
690
- _id?: string | null;
691
- /** Index of the item within the request array. Allows for correlation between request and response items. */
692
- originalIndex?: number;
693
- /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
694
- success?: boolean;
695
- /** Details about the error in case of failure. */
696
- error?: ApplicationError;
697
- }
698
- interface BulkInviteToProgramResult {
699
- /** Invited participant metadata. */
700
- itemMetadata?: ItemMetadata;
701
- /** Invited participant */
702
- item?: Participant;
703
- }
704
- interface BulkActionMetadata {
705
- /** Number of items that were successfully processed. */
706
- totalSuccesses?: number;
707
- /** Number of items that couldn't be processed. */
708
- totalFailures?: number;
709
- /** Number of failures without details because detailed failure threshold was exceeded. */
710
- undetailedFailures?: number;
711
- }
712
- interface ParticipantInvited {
713
- /**
714
- * Program to which bulk invite participants.
715
- * @format GUID
716
- */
717
- programId?: string;
718
- /**
719
- * Invited member to program
720
- * @format GUID
721
- */
722
- memberId?: string;
723
- }
724
- interface BulkInviteAllToProgramRequest {
725
- /**
726
- * Program to which bulk add participants.
727
- * @format GUID
728
- */
729
- programId: string;
730
- /**
731
- * Exclude site members.
732
- * @format GUID
733
- * @maxSize 100
734
- */
735
- excludeMemberIds?: string[];
736
- }
737
- interface BulkInviteAllToProgramResponse {
738
- /** Bulk action metadata. */
739
- bulkActionMetadata?: BulkActionMetadata;
740
- }
741
- interface BulkAddToProgramRequest {
742
- /**
743
- * Program to which bulk add participants.
744
- * @format GUID
745
- */
746
- programId: string;
747
- /**
748
- * Site members.
749
- * @format GUID
750
- * @minSize 1
751
- * @maxSize 1000
752
- */
753
- memberIds?: string[];
754
- /** Return added participants in the response or not. */
755
- returnEntity?: boolean;
756
- }
757
- interface BulkAddToProgramResponse {
758
- /** Participants created by bulk action */
759
- results?: BulkAddToProgramResult[];
760
- /** Bulk action metadata. */
761
- bulkActionMetadata?: BulkActionMetadata;
762
- }
763
- interface BulkAddToProgramResult {
764
- /** Added participant metadata. */
765
- itemMetadata?: ItemMetadata;
766
- /** Added participant */
767
- item?: Participant;
768
- }
769
- interface BulkApproveParticipantRequest {
770
- /**
771
- * Participants to add
772
- * @format GUID
773
- * @maxSize 100
774
- */
775
- participantIds: string[];
776
- /**
777
- * program to approve participant
778
- * @format GUID
779
- */
780
- programId?: string;
781
- /** Return approved participants in the response or not */
782
- returnEntity?: boolean;
783
- }
784
- interface BulkApproveParticipantResponse {
785
- /** Participants approved by bulk action */
786
- results?: BulkApproveParticipantResult[];
787
- /** Bulk action metadata */
788
- bulkActionMetadata?: BulkActionMetadata;
789
- }
790
- interface BulkApproveParticipantResult {
791
- /** Approved participant metadata */
792
- itemMetadata?: ItemMetadata;
793
- /** Approved or existing participant */
794
- item?: Participant;
795
- }
796
- interface ParticipantApproved {
797
- /**
798
- * Program ID which participant approved
799
- * @format GUID
800
- */
801
- programId?: string;
802
- /**
803
- * Member ID of participant approved
804
- * @format GUID
805
- */
806
- memberId?: string;
807
- }
808
- interface BulkApproveAllParticipantRequest {
809
- /**
810
- * Program to approve all participants.
811
- * @format GUID
812
- */
813
- programId?: string;
814
- /**
815
- * Exclude site members.
816
- * @format GUID
817
- * @maxSize 100
818
- */
819
- excludeParticipantIds?: string[];
820
- }
821
- interface BulkApproveAllParticipantResponse {
822
- /**
823
- * Job id with async process
824
- * @format GUID
825
- */
826
- jobId?: string;
827
- }
828
- interface ExportParticipantsStatsRequest {
829
- /**
830
- * program id to export data from
831
- * @format GUID
832
- */
833
- programId: string;
834
- }
835
- interface ExportParticipantsStatsResponse {
836
- }
837
- interface ParticipantExportsFinished {
838
- /**
839
- * program id from which stats were exported
840
- * @format GUID
841
- */
842
- programId?: string;
843
- /**
844
- * user id of program owner
845
- * @format GUID
846
- */
847
- userId?: string;
848
- /**
849
- * url to download report
850
- * @format WEB_URL
851
- */
852
- downloadUrl?: string;
853
- /** days url will be downloadable */
854
- downloadUrlTtlDays?: number;
855
- }
856
- /** @docsIgnore */
857
- type CreateParticipantApplicationErrors = {
858
- code?: 'INVALID_PAYMENT_INFO';
859
- description?: string;
860
- data?: Record<string, any>;
861
- };
862
492
  interface BaseEventMetadata {
863
493
  /**
864
494
  * App instance ID.
@@ -944,193 +574,6 @@ interface ParticipantInvitedEnvelope {
944
574
  * @documentationMaturity preview
945
575
  */
946
576
  declare function onParticipantInvited(handler: (event: ParticipantInvitedEnvelope) => void | Promise<void>): void;
947
- /** @param participant - Participant to create
948
- * @public
949
- * @documentationMaturity preview
950
- * @requiredField participant
951
- * @permissionId ONLINE_PROGRAMS.PARTICIPANT_CREATE
952
- * @returns Created participant
953
- * @fqn wix.onlineprograms.participants.v3.ParticipantsService.CreateParticipant
954
- */
955
- declare function createParticipant(participant: Participant): Promise<NonNullablePaths<Participant, `memberId` | `programId` | `progress.totalStepsCompleted` | `progress.totalStepsAvailable` | `progress.completionPercentage` | `state` | `joinedInfo.singlePaymentDetails.paymentOrderId` | `joinedInfo.paidPlanDetails.paidPlanId` | `joinedInfo.freeCouponDetails.freeCouponId` | `joinedInfo.timeZone` | `joinedInfo.startDate` | `joinedInfo.joinPath` | `member.contactId`, 4> & {
956
- __applicationErrorsType?: CreateParticipantApplicationErrors;
957
- }>;
958
- /**
959
- * Creates participants in bulk.
960
- * @param participants - List of participants you want to create
961
- * @public
962
- * @documentationMaturity preview
963
- * @requiredField participants
964
- * @permissionId ONLINE_PROGRAMS.PARTICIPANT_CREATE
965
- * @fqn wix.onlineprograms.participants.v3.ParticipantsService.BulkCreateParticipant
966
- */
967
- declare function bulkCreateParticipant(participants: Participant[], options?: BulkCreateParticipantOptions): Promise<NonNullablePaths<BulkCreateParticipantResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item.memberId` | `results.${number}.item.programId` | `results.${number}.item.progress.totalStepsCompleted` | `results.${number}.item.progress.totalStepsAvailable` | `results.${number}.item.progress.completionPercentage` | `results.${number}.item.state` | `results.${number}.item.joinedInfo.timeZone` | `results.${number}.item.joinedInfo.startDate` | `results.${number}.item.joinedInfo.joinPath` | `results.${number}.item.member.contactId` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6>>;
968
- interface BulkCreateParticipantOptions {
969
- /** Whether to return entities in response or not. */
970
- returnEntity?: boolean;
971
- }
972
- /**
973
- * Bulk adds all site members to program, but not more then 1000.
974
- * Participant will be either created in state Joined, or updated to that state
975
- * from pending one.
976
- * @param programId - Program to which bulk add participants.
977
- * @public
978
- * @documentationMaturity preview
979
- * @requiredField programId
980
- * @permissionId ONLINE_PROGRAMS.PARTICIPANT_ADD
981
- * @applicableIdentity APP
982
- * @fqn wix.onlineprograms.participants.v3.ParticipantsService.BulkAddAllToProgram
983
- */
984
- declare function bulkAddAllToProgram(programId: string, options?: BulkAddAllToProgramOptions): Promise<NonNullablePaths<BulkAddAllToProgramResponse, `jobId`, 2>>;
985
- interface BulkAddAllToProgramOptions {
986
- /**
987
- * Exclude site members.
988
- * @format GUID
989
- * @maxSize 100
990
- */
991
- excludeMemberIds?: string[];
992
- }
993
- /**
994
- * Delete participant from program. Removes participant from member
995
- * group. Leaves him in Social Group.
996
- * @param participantId - Participants to delete
997
- * @public
998
- * @documentationMaturity preview
999
- * @requiredField participantId
1000
- * @permissionId ONLINE_PROGRAMS.PARTICIPANT_DELETE
1001
- * @fqn wix.onlineprograms.participants.v3.ParticipantsService.DeleteParticipant
1002
- */
1003
- declare function deleteParticipant(participantId: string): Promise<void>;
1004
- /**
1005
- * Issue certificate by site admin
1006
- * @param participantId - Participant to get certificate
1007
- * @public
1008
- * @documentationMaturity preview
1009
- * @requiredField participantId
1010
- * @permissionId ONLINE_PROGRAMS.PARTICIPANT_ISSUE_CERTIFICATE
1011
- * @applicableIdentity APP
1012
- * @fqn wix.onlineprograms.participants.v3.ParticipantsService.IssueCertificate
1013
- */
1014
- declare function issueCertificate(participantId: string): Promise<NonNullablePaths<IssueCertificateResponse, `participant.memberId` | `participant.programId` | `participant.progress.totalStepsCompleted` | `participant.progress.totalStepsAvailable` | `participant.progress.completionPercentage` | `participant.state` | `participant.joinedInfo.singlePaymentDetails.paymentOrderId` | `participant.joinedInfo.paidPlanDetails.paidPlanId` | `participant.joinedInfo.freeCouponDetails.freeCouponId` | `participant.joinedInfo.timeZone` | `participant.joinedInfo.startDate` | `participant.joinedInfo.joinPath` | `participant.member.contactId`, 5>>;
1015
- /**
1016
- * Get program's completion stats
1017
- * @param programId - program id to get stats for
1018
- * @public
1019
- * @documentationMaturity preview
1020
- * @requiredField programId
1021
- * @permissionId ONLINE_PROGRAMS.STATS_READ
1022
- * @applicableIdentity APP
1023
- * @fqn wix.onlineprograms.participants.v3.ParticipantsService.GetCompletionStats
1024
- */
1025
- declare function getCompletionStats(programId: string): Promise<NonNullablePaths<GetCompletionStatsResponse, `completedAll` | `completionRate`, 2>>;
1026
- /**
1027
- * Get premium stats
1028
- * @public
1029
- * @documentationMaturity preview
1030
- * @permissionId ONLINE_PROGRAMS.STATS_READ
1031
- * @applicableIdentity APP
1032
- * @fqn wix.onlineprograms.participants.v3.ParticipantsService.GetPremiumStats
1033
- */
1034
- declare function getPremiumStats(): Promise<NonNullablePaths<GetPremiumStatsResponse, `hasPremium` | `activeParticipantsCount` | `activeParticipantsLimit`, 2>>;
1035
- /**
1036
- * Returns participant.
1037
- * @param participantId - Participant id to fetch
1038
- * @public
1039
- * @documentationMaturity preview
1040
- * @requiredField participantId
1041
- * @permissionId ONLINE_PROGRAMS.PARTICIPANT_READ
1042
- * @applicableIdentity APP
1043
- * @applicableIdentity MEMBER
1044
- * @returns existing participant
1045
- * @fqn wix.onlineprograms.participants.v3.ParticipantsService.GetParticipant
1046
- */
1047
- declare function getParticipant(participantId: string): Promise<NonNullablePaths<Participant, `memberId` | `programId` | `progress.totalStepsCompleted` | `progress.totalStepsAvailable` | `progress.completionPercentage` | `state` | `joinedInfo.singlePaymentDetails.paymentOrderId` | `joinedInfo.paidPlanDetails.paidPlanId` | `joinedInfo.freeCouponDetails.freeCouponId` | `joinedInfo.timeZone` | `joinedInfo.startDate` | `joinedInfo.joinPath` | `member.contactId`, 4>>;
1048
- /**
1049
- * Query existing participants
1050
- * @public
1051
- * @documentationMaturity preview
1052
- * @permissionId ONLINE_PROGRAMS.PARTICIPANT_READ
1053
- * @applicableIdentity APP
1054
- * @applicableIdentity MEMBER
1055
- * @fqn wix.onlineprograms.participants.v3.ParticipantsService.QueryParticipants
1056
- */
1057
- declare function queryParticipants(): ParticipantsQueryBuilder;
1058
- interface QueryCursorResult {
1059
- cursors: Cursors;
1060
- hasNext: () => boolean;
1061
- hasPrev: () => boolean;
1062
- length: number;
1063
- pageSize: number;
1064
- }
1065
- interface ParticipantsQueryResult extends QueryCursorResult {
1066
- items: Participant[];
1067
- query: ParticipantsQueryBuilder;
1068
- next: () => Promise<ParticipantsQueryResult>;
1069
- prev: () => Promise<ParticipantsQueryResult>;
1070
- }
1071
- interface ParticipantsQueryBuilder {
1072
- /** @param propertyName - Property whose value is compared with `value`.
1073
- * @param value - Value to compare against.
1074
- * @documentationMaturity preview
1075
- */
1076
- eq: (propertyName: '_id' | 'memberId' | 'programId' | 'state', value: any) => ParticipantsQueryBuilder;
1077
- /** @param propertyName - Property whose value is compared with `value`.
1078
- * @param value - Value to compare against.
1079
- * @documentationMaturity preview
1080
- */
1081
- ge: (propertyName: 'joinedInfo.startDate', value: any) => ParticipantsQueryBuilder;
1082
- /** @param propertyName - Property whose value is compared with `value`.
1083
- * @param value - Value to compare against.
1084
- * @documentationMaturity preview
1085
- */
1086
- gt: (propertyName: 'joinedInfo.startDate', value: any) => ParticipantsQueryBuilder;
1087
- /** @param propertyName - Property whose value is compared with `value`.
1088
- * @param value - Value to compare against.
1089
- * @documentationMaturity preview
1090
- */
1091
- le: (propertyName: 'joinedInfo.startDate', value: any) => ParticipantsQueryBuilder;
1092
- /** @param propertyName - Property whose value is compared with `value`.
1093
- * @param value - Value to compare against.
1094
- * @documentationMaturity preview
1095
- */
1096
- lt: (propertyName: 'joinedInfo.startDate', value: any) => ParticipantsQueryBuilder;
1097
- /** @documentationMaturity preview */
1098
- in: (propertyName: '_id' | 'memberId' | 'state', value: any) => ParticipantsQueryBuilder;
1099
- /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
1100
- * @documentationMaturity preview
1101
- */
1102
- ascending: (...propertyNames: Array<'_id' | '_createdDate' | 'state' | 'joinedInfo.startDate'>) => ParticipantsQueryBuilder;
1103
- /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
1104
- * @documentationMaturity preview
1105
- */
1106
- descending: (...propertyNames: Array<'_id' | '_createdDate' | 'state' | 'joinedInfo.startDate'>) => ParticipantsQueryBuilder;
1107
- /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
1108
- * @documentationMaturity preview
1109
- */
1110
- limit: (limit: number) => ParticipantsQueryBuilder;
1111
- /** @param cursor - A pointer to specific record
1112
- * @documentationMaturity preview
1113
- */
1114
- skipTo: (cursor: string) => ParticipantsQueryBuilder;
1115
- /** @documentationMaturity preview */
1116
- find: () => Promise<ParticipantsQueryResult>;
1117
- }
1118
- /**
1119
- * @hidden
1120
- * @fqn wix.onlineprograms.participants.v3.ParticipantsService.QueryParticipants
1121
- * @requiredField query
1122
- */
1123
- declare function typedQueryParticipants(query: CursorQuery): Promise<NonNullablePaths<QueryParticipantsResponse, `participants` | `participants.${number}.memberId` | `participants.${number}.programId` | `participants.${number}.progress.totalStepsCompleted` | `participants.${number}.progress.totalStepsAvailable` | `participants.${number}.progress.completionPercentage` | `participants.${number}.state` | `participants.${number}.joinedInfo.singlePaymentDetails.paymentOrderId` | `participants.${number}.joinedInfo.paidPlanDetails.paidPlanId` | `participants.${number}.joinedInfo.freeCouponDetails.freeCouponId` | `participants.${number}.joinedInfo.timeZone` | `participants.${number}.joinedInfo.startDate` | `participants.${number}.joinedInfo.joinPath` | `participants.${number}.member.contactId`, 6>>;
1124
- /**
1125
- * Get access status
1126
- * @public
1127
- * @documentationMaturity preview
1128
- * @permissionId ONLINE_PROGRAMS.PARTICIPANT_READ
1129
- * @applicableIdentity APP
1130
- * @applicableIdentity MEMBER
1131
- * @fqn wix.onlineprograms.participants.v3.ParticipantsService.GetAccessStatus
1132
- */
1133
- declare function getAccessStatus(): Promise<NonNullablePaths<GetAccessStatusResponse, `isBlocked`, 2>>;
1134
577
  /**
1135
578
  * Bulk invites participants to program.
1136
579
  * For each member participant in Invited state is created.
@@ -1242,4 +685,4 @@ interface BulkApproveAllParticipantOptions {
1242
685
  excludeParticipantIds?: string[];
1243
686
  }
1244
687
 
1245
- export { type ActionEvent, type ApplicationError, type BaseEventMetadata, type Behavior, type BehaviorBehaviorOneOf, type Benefit, type BenefitNotification, BenefitType, type BenefitTypeWithLiterals, type BulkActionMetadata, type BulkAddAllToProgramOptions, type BulkAddAllToProgramRequest, type BulkAddAllToProgramResponse, type BulkAddToProgramOptions, type BulkAddToProgramRequest, type BulkAddToProgramResponse, type BulkAddToProgramResult, type BulkApproveAllParticipantOptions, type BulkApproveAllParticipantRequest, type BulkApproveAllParticipantResponse, type BulkApproveParticipantOptions, type BulkApproveParticipantRequest, type BulkApproveParticipantResponse, type BulkApproveParticipantResult, type BulkCreateParticipantOptions, type BulkCreateParticipantRequest, type BulkCreateParticipantResponse, type BulkInviteAllToProgramOptions, type BulkInviteAllToProgramRequest, type BulkInviteAllToProgramResponse, type BulkInviteToProgramOptions, type BulkInviteToProgramRequest, type BulkInviteToProgramResponse, type BulkInviteToProgramResult, type BulkParticipantResult, type Certificate, type CommonBulkActionMetadata, type CommonItemMetadata, type CreateParticipantApplicationErrors, type CreateParticipantRequest, type CreateParticipantResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DeleteParticipantRequest, type DeleteParticipantResponse, type Discount, type DiscountDiscountOneOf, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EntryPass, Event, type EventMetadata, type EventWithLiterals, type ExportParticipantsStatsRequest, type ExportParticipantsStatsResponse, type ExtendedFields, type FreeCouponDetails, type GetAccessStatusRequest, type GetAccessStatusResponse, type GetCompletionStatsRequest, type GetCompletionStatsResponse, type GetParticipantRequest, type GetParticipantResponse, type GetPremiumStatsRequest, type GetPremiumStatsResponse, type IdentificationData, type IdentificationDataIdOneOf, type IssueCertificateRequest, type IssueCertificateResponse, type ItemMetadata, JoinPath, type JoinPathWithLiterals, type JoinedInfo, type JoinedInfoJoinPathDetailsOneOf, type Member, type MessageEnvelope, type PaidPlanDetails, type Participant, type ParticipantAdded, type ParticipantAddedEnvelope, type ParticipantApproved, type ParticipantApprovedEnvelope, type ParticipantExportsFinished, type ParticipantInvited, type ParticipantInvitedEnvelope, type ParticipantsQueryBuilder, type ParticipantsQueryResult, type Progress, type QueryParticipantsRequest, type QueryParticipantsResponse, type RestoreInfo, type SinglePaymentDetails, SortOrder, type SortOrderWithLiterals, type Sorting, State, type StateWithLiterals, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, bulkAddAllToProgram, bulkAddToProgram, bulkApproveAllParticipant, bulkApproveParticipant, bulkCreateParticipant, bulkInviteAllToProgram, bulkInviteToProgram, createParticipant, deleteParticipant, getAccessStatus, getCompletionStats, getParticipant, getPremiumStats, issueCertificate, onParticipantAdded, onParticipantApproved, onParticipantInvited, queryParticipants, typedQueryParticipants };
688
+ export { type ActionEvent, type ApplicationError, type BaseEventMetadata, type BulkActionMetadata, type BulkAddToProgramOptions, type BulkAddToProgramRequest, type BulkAddToProgramResponse, type BulkAddToProgramResult, type BulkApproveAllParticipantOptions, type BulkApproveAllParticipantRequest, type BulkApproveAllParticipantResponse, type BulkApproveParticipantOptions, type BulkApproveParticipantRequest, type BulkApproveParticipantResponse, type BulkApproveParticipantResult, type BulkInviteAllToProgramOptions, type BulkInviteAllToProgramRequest, type BulkInviteAllToProgramResponse, type BulkInviteToProgramOptions, type BulkInviteToProgramRequest, type BulkInviteToProgramResponse, type BulkInviteToProgramResult, type Certificate, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExtendedFields, type FreeCouponDetails, type IdentificationData, type IdentificationDataIdOneOf, type ItemMetadata, JoinPath, type JoinPathWithLiterals, type JoinedInfo, type JoinedInfoJoinPathDetailsOneOf, type Member, type MessageEnvelope, type PaidPlanDetails, type Participant, type ParticipantAdded, type ParticipantAddedEnvelope, type ParticipantApproved, type ParticipantApprovedEnvelope, type ParticipantInvited, type ParticipantInvitedEnvelope, type Progress, type RestoreInfo, type SinglePaymentDetails, State, type StateWithLiterals, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, bulkAddToProgram, bulkApproveAllParticipant, bulkApproveParticipant, bulkInviteAllToProgram, bulkInviteToProgram, onParticipantAdded, onParticipantApproved, onParticipantInvited };