@wix/online-programs 1.0.0

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 (31) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +14 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/src/challenges-v1-participant.http.d.ts +3 -0
  5. package/build/cjs/src/challenges-v1-participant.http.js +174 -0
  6. package/build/cjs/src/challenges-v1-participant.http.js.map +1 -0
  7. package/build/cjs/src/challenges-v1-participant.public.d.ts +5 -0
  8. package/build/cjs/src/challenges-v1-participant.public.js +24 -0
  9. package/build/cjs/src/challenges-v1-participant.public.js.map +1 -0
  10. package/build/cjs/src/challenges-v1-participant.types.d.ts +750 -0
  11. package/build/cjs/src/challenges-v1-participant.types.js +99 -0
  12. package/build/cjs/src/challenges-v1-participant.types.js.map +1 -0
  13. package/build/cjs/src/challenges-v1-participant.universal.d.ts +714 -0
  14. package/build/cjs/src/challenges-v1-participant.universal.js +201 -0
  15. package/build/cjs/src/challenges-v1-participant.universal.js.map +1 -0
  16. package/build/es/index.d.ts +1 -0
  17. package/build/es/index.js +2 -0
  18. package/build/es/index.js.map +1 -0
  19. package/build/es/src/challenges-v1-participant.http.d.ts +3 -0
  20. package/build/es/src/challenges-v1-participant.http.js +170 -0
  21. package/build/es/src/challenges-v1-participant.http.js.map +1 -0
  22. package/build/es/src/challenges-v1-participant.public.d.ts +5 -0
  23. package/build/es/src/challenges-v1-participant.public.js +8 -0
  24. package/build/es/src/challenges-v1-participant.public.js.map +1 -0
  25. package/build/es/src/challenges-v1-participant.types.d.ts +750 -0
  26. package/build/es/src/challenges-v1-participant.types.js +96 -0
  27. package/build/es/src/challenges-v1-participant.types.js.map +1 -0
  28. package/build/es/src/challenges-v1-participant.universal.d.ts +714 -0
  29. package/build/es/src/challenges-v1-participant.universal.js +178 -0
  30. package/build/es/src/challenges-v1-participant.universal.js.map +1 -0
  31. package/package.json +37 -0
@@ -0,0 +1,714 @@
1
+ export declare const __debug: {
2
+ verboseLogging: {
3
+ on: () => boolean;
4
+ off: () => boolean;
5
+ };
6
+ };
7
+ export interface Participant {
8
+ _id?: string;
9
+ member?: Member;
10
+ challenge?: EntitySummary;
11
+ timeFrame?: TimeInterval;
12
+ stepsSummary?: StepsSummary;
13
+ orderIds?: string[];
14
+ transitions?: StateTransition[];
15
+ timezone?: string;
16
+ dateFrame?: DateInterval;
17
+ socialGroupId?: string | null;
18
+ performance?: number;
19
+ joinPath?: JoinPath;
20
+ }
21
+ export interface StepEvent {
22
+ stepId?: string;
23
+ transition?: ParticipantStepStateTransition;
24
+ }
25
+ export interface ParticipantStepStateTransition {
26
+ state?: ParticipantStepState;
27
+ occurredAt?: Date;
28
+ }
29
+ export declare enum ParticipantStepState {
30
+ PENDING = "PENDING",
31
+ RUNNING = "RUNNING",
32
+ COMPLETED = "COMPLETED",
33
+ SKIPPED = "SKIPPED",
34
+ CONFIRMED = "CONFIRMED",
35
+ REJECTED = "REJECTED",
36
+ OVERDUE = "OVERDUE",
37
+ FAILED = "FAILED"
38
+ }
39
+ export declare enum State {
40
+ JOIN_REQUESTED = "JOIN_REQUESTED",
41
+ INVITED = "INVITED",
42
+ JOIN_REJECTED = "JOIN_REJECTED",
43
+ PAYMENT_REQUESTED = "PAYMENT_REQUESTED",
44
+ PAYMENT_STARTED = "PAYMENT_STARTED",
45
+ JOINED = "JOINED",
46
+ LEFT = "LEFT",
47
+ REMOVED = "REMOVED",
48
+ RUNNING = "RUNNING",
49
+ COMPLETED = "COMPLETED",
50
+ FAILED = "FAILED",
51
+ PAYMENT_STARTED_OFFLINE = "PAYMENT_STARTED_OFFLINE",
52
+ SUSPENDED = "SUSPENDED"
53
+ }
54
+ export interface Free {
55
+ }
56
+ export interface Added {
57
+ }
58
+ export interface SinglePayment {
59
+ orderId?: string;
60
+ }
61
+ export interface PaidPlan {
62
+ planIds?: string[];
63
+ }
64
+ export interface Member {
65
+ _id?: string;
66
+ fullName?: string;
67
+ imageUrl?: string | null;
68
+ contactId?: string | null;
69
+ userId?: string | null;
70
+ }
71
+ export interface EntitySummary {
72
+ _id?: string;
73
+ title?: string | null;
74
+ media?: MediaItem;
75
+ }
76
+ /** Deprecated - Copy this message into your service, do not reference it */
77
+ export interface MediaItem extends MediaItemMediaOneOf {
78
+ /** WixMedia image */
79
+ image?: string;
80
+ /** WixMedia video */
81
+ video?: string;
82
+ /** WixMedia document */
83
+ document?: string;
84
+ }
85
+ /** @oneof */
86
+ export interface MediaItemMediaOneOf {
87
+ /** WixMedia image */
88
+ image?: string;
89
+ /** WixMedia video */
90
+ video?: string;
91
+ /** WixMedia document */
92
+ document?: string;
93
+ }
94
+ export interface TimeInterval {
95
+ start?: Date;
96
+ finish?: Date;
97
+ }
98
+ export interface StepsSummary {
99
+ stepsNumber?: number;
100
+ completedStepsNumber?: number;
101
+ failedStepsNumber?: number;
102
+ postedFeedbacksNumber?: number;
103
+ lastEvent?: StepEvent;
104
+ }
105
+ export interface StateTransition {
106
+ state?: State;
107
+ occurredAt?: Date;
108
+ offlineTrxId?: string | null;
109
+ }
110
+ export interface DateInterval {
111
+ start?: string;
112
+ finish?: string | null;
113
+ }
114
+ export interface JoinPath extends JoinPathPathOneOf {
115
+ free?: Free;
116
+ added?: Added;
117
+ singlePayment?: SinglePayment;
118
+ paidPlan?: PaidPlan;
119
+ }
120
+ /** @oneof */
121
+ export interface JoinPathPathOneOf {
122
+ free?: Free;
123
+ added?: Added;
124
+ singlePayment?: SinglePayment;
125
+ paidPlan?: PaidPlan;
126
+ }
127
+ export interface QueryParticipantsRequest {
128
+ paging?: Paging;
129
+ challengeId?: string;
130
+ sorting?: QueryParticipantsRequestSorting;
131
+ filter?: ParticipantsFilter;
132
+ }
133
+ export interface ParticipantJoinDate {
134
+ start?: string | null;
135
+ end?: string | null;
136
+ }
137
+ export declare enum ParticipationState {
138
+ NotStarted = "NotStarted",
139
+ InProgress = "InProgress",
140
+ Finished = "Finished",
141
+ Suspended = "Suspended"
142
+ }
143
+ export interface ParticipantPerformance {
144
+ start?: number | null;
145
+ end?: number | null;
146
+ }
147
+ export declare enum QueryParticipantsRequestJoinPath {
148
+ UNKNOWN_JOIN_PATH = "UNKNOWN_JOIN_PATH",
149
+ FREE = "FREE",
150
+ ADDED = "ADDED",
151
+ SINGLE_PAYMENT = "SINGLE_PAYMENT",
152
+ PAID_PLAN = "PAID_PLAN"
153
+ }
154
+ export declare enum QueryParticipantsRequestSortingCriterion {
155
+ DEFAULT = "DEFAULT",
156
+ JOIN_DATE = "JOIN_DATE",
157
+ NAME = "NAME",
158
+ LAST_EVENT = "LAST_EVENT",
159
+ PERFORMANCE = "PERFORMANCE"
160
+ }
161
+ export declare enum QueryParticipantsRequestSortingOrder {
162
+ ORDER_DEFAULT = "ORDER_DEFAULT",
163
+ ORDER_ASC = "ORDER_ASC",
164
+ ORDER_DESC = "ORDER_DESC"
165
+ }
166
+ export interface Paging {
167
+ /** Number of items to load. */
168
+ limit?: number | null;
169
+ /** Number of items to skip in the current sort order. */
170
+ offset?: number | null;
171
+ }
172
+ export interface QueryParticipantsRequestSorting {
173
+ criterion?: QueryParticipantsRequestSortingCriterion;
174
+ order?: QueryParticipantsRequestSortingOrder;
175
+ }
176
+ export interface ParticipantsFilter {
177
+ memberIds?: string[] | null;
178
+ memberName?: string | null;
179
+ states?: State[];
180
+ joinedAt?: ParticipantJoinDate;
181
+ participationStates?: ParticipationState[];
182
+ performance?: ParticipantPerformance[];
183
+ joinPath?: QueryParticipantsRequestJoinPath;
184
+ }
185
+ export interface QueryParticipantsResponse {
186
+ totalCount?: number;
187
+ participants?: Participant[];
188
+ }
189
+ export interface ListParticipantsRequest {
190
+ paging?: Paging;
191
+ challengeId?: string;
192
+ memberId?: string | null;
193
+ states?: State[];
194
+ memberIds?: string[] | null;
195
+ sortingCriterion?: SortingCriterion;
196
+ memberName?: string | null;
197
+ sorting?: Sorting;
198
+ }
199
+ export declare enum SortingCriterion {
200
+ DEFAULT = "DEFAULT",
201
+ JOIN_DATE = "JOIN_DATE",
202
+ NAME = "NAME",
203
+ LAST_EVENT = "LAST_EVENT",
204
+ PERFORMANCE = "PERFORMANCE"
205
+ }
206
+ export declare enum SortingOrder {
207
+ ORDER_DEFAULT = "ORDER_DEFAULT",
208
+ ORDER_ASC = "ORDER_ASC",
209
+ ORDER_DESC = "ORDER_DESC"
210
+ }
211
+ export interface Sorting {
212
+ criterion?: SortingCriterion;
213
+ order?: SortingOrder;
214
+ }
215
+ export interface ListParticipantsResponse {
216
+ totalCount?: number;
217
+ participants?: Participant[];
218
+ }
219
+ export interface JoinParticipantRequest {
220
+ challengeId?: string;
221
+ memberId?: string;
222
+ timeZone?: string;
223
+ actionId?: string;
224
+ startDate?: string | null;
225
+ }
226
+ export interface JoinParticipantResponse {
227
+ participantId?: string;
228
+ actionId?: string;
229
+ participant?: Participant;
230
+ }
231
+ export interface ParticipantJoined {
232
+ participant?: Participant;
233
+ }
234
+ /** Add participant */
235
+ export interface AddParticipantRequest {
236
+ challengeId: string;
237
+ memberId?: string;
238
+ actionId?: string;
239
+ }
240
+ export interface AddParticipantResponse {
241
+ participant?: Participant;
242
+ actionId?: string;
243
+ }
244
+ export interface CreateJoinRequestRequest {
245
+ challengeId?: string;
246
+ memberId?: string;
247
+ timeZone?: string;
248
+ actionId?: string;
249
+ startDate?: string | null;
250
+ }
251
+ export interface CreateJoinRequestResponse {
252
+ participantId?: string;
253
+ approvalRequestId?: string;
254
+ actionId?: string;
255
+ participant?: Participant;
256
+ }
257
+ export interface InviteParticipantsRequest {
258
+ challengeId?: string;
259
+ memberIds?: string[];
260
+ actionId?: string;
261
+ }
262
+ export interface InviteParticipantsResponse {
263
+ invitations?: InvitationDetails[];
264
+ actionId?: string;
265
+ }
266
+ export interface InvitationDetails {
267
+ participantId?: string;
268
+ approvalRequestId?: string;
269
+ }
270
+ export interface GetParticipantRequest {
271
+ challengeId?: string;
272
+ participantId?: string;
273
+ }
274
+ export interface GetParticipantResponse {
275
+ participant?: Participant;
276
+ }
277
+ export interface UpdateParticipantRequest extends UpdateParticipantRequestUpdateOneOf {
278
+ challengeId?: string;
279
+ participantId?: string;
280
+ actionId?: string;
281
+ startDate?: string;
282
+ }
283
+ /** @oneof */
284
+ export interface UpdateParticipantRequestUpdateOneOf {
285
+ startDate?: string;
286
+ }
287
+ export interface UpdateParticipantResponse {
288
+ participant?: Participant;
289
+ actionId?: string;
290
+ }
291
+ export interface DeleteParticipantRequest {
292
+ challengeId?: string;
293
+ participantId?: string;
294
+ actionId?: string;
295
+ }
296
+ export interface DeleteParticipantResponse {
297
+ actionId?: string;
298
+ }
299
+ export interface ReviveParticipantRequest {
300
+ challengeId?: string;
301
+ participantId?: string;
302
+ actionId?: string;
303
+ }
304
+ export interface ReviveParticipantResponse {
305
+ participant?: Participant;
306
+ actionId?: string;
307
+ }
308
+ export interface ResetParticipantProgressRequest {
309
+ challengeId?: string;
310
+ participantId?: string;
311
+ timeZone?: string;
312
+ startDate?: string | null;
313
+ actionId?: string;
314
+ }
315
+ export interface ResetParticipantProgressResponse {
316
+ participant?: Participant;
317
+ actionId?: string;
318
+ }
319
+ export interface CreatePaymentOrderRequest {
320
+ challengeId?: string;
321
+ participantId?: string;
322
+ actionId?: string;
323
+ timeZone?: string | null;
324
+ startDate?: string | null;
325
+ paymentType?: PaymentType;
326
+ }
327
+ export declare enum PaymentType {
328
+ SINGLE_PAYMENT = "SINGLE_PAYMENT",
329
+ PAID_PLANS = "PAID_PLANS"
330
+ }
331
+ export interface CreatePaymentOrderResponse {
332
+ orderId?: string;
333
+ actionId?: string;
334
+ participant?: Participant;
335
+ }
336
+ export interface ListParticipantStepsRequest {
337
+ challengeId?: string;
338
+ participantId?: string;
339
+ parentId?: string;
340
+ timeInterval?: TimeInterval;
341
+ dateInterval?: DateInterval;
342
+ }
343
+ export interface ListParticipantStepsResponse {
344
+ steps?: ParticipantStep[];
345
+ }
346
+ export interface ParticipantStep {
347
+ _id?: string;
348
+ source?: ChallengeStep;
349
+ timeFrame?: TimeInterval;
350
+ feedback?: Feedback;
351
+ transitions?: ParticipantStepStateTransition[];
352
+ dateFrame?: DateInterval;
353
+ quizSubmission?: QuizSubmission;
354
+ }
355
+ export interface FeedbackItem extends FeedbackItemValueOneOf {
356
+ feedbackItemSettingsId?: string;
357
+ number?: number | null;
358
+ text?: string | null;
359
+ media?: MediaItems;
360
+ choice?: FeedbackItemChoice;
361
+ quantity?: Quantity;
362
+ multiSelect?: Choices;
363
+ }
364
+ /** @oneof */
365
+ export interface FeedbackItemValueOneOf {
366
+ number?: number | null;
367
+ text?: string | null;
368
+ media?: MediaItems;
369
+ choice?: FeedbackItemChoice;
370
+ quantity?: Quantity;
371
+ multiSelect?: Choices;
372
+ }
373
+ export interface MediaItems {
374
+ mediaItems?: MediaItem[];
375
+ }
376
+ export interface FeedbackItemChoice {
377
+ choiceId?: string;
378
+ }
379
+ export interface Quantity {
380
+ unitName?: string;
381
+ amount?: number;
382
+ }
383
+ export interface Choices {
384
+ choiceIds?: string[];
385
+ }
386
+ export interface ChallengeStep {
387
+ _id?: string;
388
+ settings?: ChallengeStepSettings;
389
+ recurrenceSourceId?: string | null;
390
+ createdAt?: Date;
391
+ updatedAt?: Date;
392
+ /** @readonly */
393
+ sectionId?: string | null;
394
+ }
395
+ export interface GeneralSettings extends GeneralSettingsStepTypeOneOf {
396
+ /** steps description: title, details, image and etc. */
397
+ description?: ObjectDescription;
398
+ duration?: TimeDuration;
399
+ recurrenceSettings?: RecurrenceSettings;
400
+ individual?: IndividualSettings;
401
+ group?: GroupSettings;
402
+ quiz?: QuizSettings;
403
+ }
404
+ /** @oneof */
405
+ export interface GeneralSettingsStepTypeOneOf {
406
+ individual?: IndividualSettings;
407
+ group?: GroupSettings;
408
+ quiz?: QuizSettings;
409
+ }
410
+ export interface ObjectDescription {
411
+ title?: string | null;
412
+ details?: string | null;
413
+ media?: MediaItem;
414
+ }
415
+ export interface IndividualSettings {
416
+ /** should be renamed, it's a flag whether the questionnaire section is enabled. */
417
+ confirmationRequired?: boolean;
418
+ /** feedback list settings. */
419
+ feedbackSettings?: FeedbackItemSettings[];
420
+ /** whether the quiz section in enabled. */
421
+ showQuiz?: boolean;
422
+ /** quiz list settings. */
423
+ quizSettings?: FeedbackItemSettings[];
424
+ }
425
+ export interface FeedbackItemSettings {
426
+ _id?: string;
427
+ type?: FeedbackItemType;
428
+ question?: string;
429
+ isRequired?: boolean;
430
+ correctAnswerMessage?: string | null;
431
+ wrongAnswerMessage?: string | null;
432
+ }
433
+ export interface NumericFeedbackItem {
434
+ maxValue?: number;
435
+ }
436
+ export interface TextFeedbackItem {
437
+ }
438
+ export interface MediaFeedbackItem {
439
+ }
440
+ export interface MultipleChoiceFeedbackItem {
441
+ choices?: Choice[];
442
+ }
443
+ export declare enum ChoiceRightness {
444
+ NEUTRAL = "NEUTRAL",
445
+ RIGHT = "RIGHT",
446
+ WRONG = "WRONG"
447
+ }
448
+ export interface Choice {
449
+ _id?: string;
450
+ description?: ObjectDescription;
451
+ rightness?: ChoiceRightness;
452
+ }
453
+ export interface QuantityFeedbackItem {
454
+ unitName?: string | null;
455
+ amount?: number;
456
+ }
457
+ export interface FeedbackItemType extends FeedbackItemTypeTypeOneOf {
458
+ numeric?: NumericFeedbackItem;
459
+ text?: TextFeedbackItem;
460
+ media?: MediaFeedbackItem;
461
+ multipleChoice?: MultipleChoiceFeedbackItem;
462
+ quantity?: QuantityFeedbackItem;
463
+ multiSelect?: MultipleChoiceFeedbackItem;
464
+ }
465
+ /** @oneof */
466
+ export interface FeedbackItemTypeTypeOneOf {
467
+ numeric?: NumericFeedbackItem;
468
+ text?: TextFeedbackItem;
469
+ media?: MediaFeedbackItem;
470
+ multipleChoice?: MultipleChoiceFeedbackItem;
471
+ quantity?: QuantityFeedbackItem;
472
+ multiSelect?: MultipleChoiceFeedbackItem;
473
+ }
474
+ export interface GroupSettings {
475
+ completionCriteria?: CompletionCriteria;
476
+ }
477
+ export interface CompletionCriteria {
478
+ completedSteps?: QuantityCriterion;
479
+ completedMilestones?: QuantityCriterion;
480
+ scoredPoints?: MinThreshold;
481
+ }
482
+ export interface QuantityCriterion extends QuantityCriterionCriterionOneOf {
483
+ all?: All;
484
+ minThreshold?: MinThreshold;
485
+ }
486
+ /** @oneof */
487
+ export interface QuantityCriterionCriterionOneOf {
488
+ all?: All;
489
+ minThreshold?: MinThreshold;
490
+ }
491
+ export interface All {
492
+ }
493
+ export interface MinThreshold {
494
+ value?: number;
495
+ }
496
+ export interface QuizSettings {
497
+ quizId?: string;
498
+ }
499
+ export interface TimeDuration {
500
+ unit?: DurationUnit;
501
+ value?: number;
502
+ }
503
+ export declare enum DurationUnit {
504
+ WEEKS = "WEEKS",
505
+ DAYS = "DAYS",
506
+ HOURS = "HOURS",
507
+ MINUTES = "MINUTES"
508
+ }
509
+ export interface RecurrenceSettings {
510
+ schedules?: RecurrenceSchedule[];
511
+ recurrencesCount?: number | null;
512
+ }
513
+ export interface RecurrenceSchedule {
514
+ startDelay?: TimeDuration;
515
+ interval?: TimeDuration;
516
+ }
517
+ export interface EmbeddingSettings {
518
+ /** step start delay. */
519
+ startConditions?: StartCondition[];
520
+ isMilestone?: boolean;
521
+ points?: number | null;
522
+ }
523
+ export interface StartCondition {
524
+ /** whether the step should start on join. */
525
+ dependency?: StepDependency;
526
+ /** step delay regarding the challenge start. */
527
+ delay?: TimeDuration;
528
+ }
529
+ export interface StepDependency extends StepDependencyDependencyTypeOneOf {
530
+ container?: Container;
531
+ step?: Step;
532
+ }
533
+ /** @oneof */
534
+ export interface StepDependencyDependencyTypeOneOf {
535
+ container?: Container;
536
+ step?: Step;
537
+ }
538
+ export interface Container {
539
+ }
540
+ export interface Step {
541
+ stepId?: string;
542
+ }
543
+ export interface ChallengeStepSettings {
544
+ general?: GeneralSettings;
545
+ embedding?: EmbeddingSettings;
546
+ }
547
+ export interface Feedback {
548
+ items?: FeedbackItem[];
549
+ createdAt?: Date;
550
+ updatedAt?: Date;
551
+ quiz?: FeedbackItem[];
552
+ }
553
+ export interface QuizSubmission {
554
+ quizSubmissionId?: string;
555
+ score?: number | null;
556
+ }
557
+ export interface GetParticipantStepRequest {
558
+ challengeId?: string;
559
+ participantId?: string;
560
+ stepId?: string;
561
+ timeInterval?: TimeInterval;
562
+ }
563
+ export interface GetParticipantStepResponse {
564
+ step?: ParticipantStep;
565
+ subSteps?: ParticipantStep[];
566
+ }
567
+ export interface ResolveParticipantStepRequest {
568
+ challengeId?: string;
569
+ participantId?: string;
570
+ stepId?: string;
571
+ status?: ResolutionStatus;
572
+ feedback?: Feedback;
573
+ actionId?: string;
574
+ quizSubmissionId?: string | null;
575
+ }
576
+ export declare enum ResolutionStatus {
577
+ COMPLETED = "COMPLETED",
578
+ SKIPPED = "SKIPPED",
579
+ UNDO = "UNDO",
580
+ QUIZ_SUBMIT = "QUIZ_SUBMIT"
581
+ }
582
+ export interface ResolveParticipantStepResponse {
583
+ step?: ParticipantStep;
584
+ actionId?: string;
585
+ }
586
+ export interface StepResolved {
587
+ challengeId?: string;
588
+ participantId?: string;
589
+ memberId?: string;
590
+ stepTitle?: string;
591
+ participantStepId?: string;
592
+ challengeStepId?: string;
593
+ /** TODO why it is repeated? */
594
+ feedback?: Feedback[];
595
+ }
596
+ export interface UpdateStepFeedbackRequest {
597
+ challengeId?: string;
598
+ participantId?: string;
599
+ stepId?: string;
600
+ feedback?: Feedback;
601
+ actionId?: string;
602
+ }
603
+ export interface UpdateStepFeedbackResponse {
604
+ step?: ParticipantStep;
605
+ actionId?: string;
606
+ }
607
+ export interface GetMediaUploadInfoRequest {
608
+ challengeId?: string;
609
+ participantId?: string;
610
+ fileName?: string;
611
+ }
612
+ export interface GetMediaUploadInfoResponse {
613
+ uploadUrl?: string;
614
+ uploadToken?: string;
615
+ }
616
+ export interface ListParticipantSectionsRequest {
617
+ challengeId?: string;
618
+ participantId?: string;
619
+ }
620
+ export interface ListParticipantSectionsResponse {
621
+ sections?: ParticipantSection[];
622
+ }
623
+ export interface ParticipantSection {
624
+ _id?: string;
625
+ source?: ChallengeSection;
626
+ steps?: ParticipantStep[];
627
+ transitions?: ParticipantSectionStateTransition[];
628
+ progress?: Progress;
629
+ }
630
+ export interface WaitingDate {
631
+ startDate?: string;
632
+ }
633
+ export interface WaitingDependency {
634
+ sectionId?: string;
635
+ }
636
+ export interface Running {
637
+ dateInterval?: DateInterval;
638
+ }
639
+ export interface Completed {
640
+ }
641
+ export interface Overdue {
642
+ }
643
+ export interface ChallengeSection {
644
+ /** challenge section id. */
645
+ _id?: string;
646
+ /** challenge section settings. */
647
+ settings?: Settings;
648
+ createdAt?: Date;
649
+ updatedAt?: Date;
650
+ /** list of challenge steps laying inside the section. */
651
+ steps?: ChallengeStep[];
652
+ }
653
+ export interface Settings {
654
+ /** section description(title, details, image...) */
655
+ description?: ObjectDescription;
656
+ /** condition for the section start. */
657
+ startCondition?: StartCondition;
658
+ }
659
+ export interface ParticipantSectionStateTransition extends ParticipantSectionStateTransitionStateOneOf {
660
+ occurredAt?: Date;
661
+ waitingDate?: WaitingDate;
662
+ waitingDependency?: WaitingDependency;
663
+ running?: Running;
664
+ completed?: Completed;
665
+ overdue?: Overdue;
666
+ }
667
+ /** @oneof */
668
+ export interface ParticipantSectionStateTransitionStateOneOf {
669
+ waitingDate?: WaitingDate;
670
+ waitingDependency?: WaitingDependency;
671
+ running?: Running;
672
+ completed?: Completed;
673
+ overdue?: Overdue;
674
+ }
675
+ export interface Progress {
676
+ nTotalSteps?: string;
677
+ nCompletedSteps?: string;
678
+ }
679
+ export interface GetParticipantSectionRequest {
680
+ challengeId?: string;
681
+ participantId?: string;
682
+ sectionId?: string;
683
+ }
684
+ export interface GetParticipantSectionResponse {
685
+ section?: ParticipantSection;
686
+ }
687
+ export interface MyProgramRequest {
688
+ programId?: string;
689
+ }
690
+ export interface MyProgramResponse {
691
+ participant?: Participant;
692
+ }
693
+ export interface MyProgramStepRequest {
694
+ programId?: string;
695
+ programStepId?: string;
696
+ }
697
+ export interface MyProgramStepResponse {
698
+ participantStep?: ParticipantStep;
699
+ }
700
+ export interface MyProgramSectionRequest {
701
+ programId?: string;
702
+ programSectionId?: string;
703
+ }
704
+ export interface MyProgramSectionResponse {
705
+ participantSection?: ParticipantSection;
706
+ }
707
+ /** @public
708
+ * @requiredField challengeId
709
+ */
710
+ export declare function addParticipant(challengeId: string, options?: AddParticipantOptions): Promise<AddParticipantResponse>;
711
+ export interface AddParticipantOptions {
712
+ memberId?: string;
713
+ actionId?: string;
714
+ }