@anantagnanam/lms 0.0.0-stage → 0.1.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 (52) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +77 -2
  3. package/astro/client.ts +433 -0
  4. package/astro/components/CertificateCard.astro +83 -0
  5. package/astro/components/CourseCard.astro +61 -0
  6. package/astro/components/CourseCatalog.astro +96 -0
  7. package/astro/components/CourseOverview.astro +286 -0
  8. package/astro/components/LearnerDashboard.astro +121 -0
  9. package/astro/components/LearningShell.astro +28 -0
  10. package/astro/components/LessonPlayer.astro +323 -0
  11. package/astro/components/MediaPlayer.astro +60 -0
  12. package/astro/components/index.ts +7 -0
  13. package/astro/layouts/AcademyLayout.astro +84 -0
  14. package/astro/pages/certificate.astro +57 -0
  15. package/astro/pages/cohort.astro +102 -0
  16. package/astro/pages/course.astro +80 -0
  17. package/astro/pages/dashboard.astro +34 -0
  18. package/astro/pages/index.astro +40 -0
  19. package/astro/pages/lesson.astro +100 -0
  20. package/astro/pages/teach.astro +15 -0
  21. package/astro/styles.css +1288 -0
  22. package/dist/admin.d.ts +32 -0
  23. package/dist/admin.js +2762 -0
  24. package/dist/admin.js.map +1 -0
  25. package/dist/astro.d.ts +11 -0
  26. package/dist/astro.js +49 -0
  27. package/dist/astro.js.map +1 -0
  28. package/dist/commerce.d.ts +72 -0
  29. package/dist/commerce.js +0 -0
  30. package/dist/config-BX3beTpM.js +15 -0
  31. package/dist/config-BX3beTpM.js.map +1 -0
  32. package/dist/constants-C0kT94tc.js +139 -0
  33. package/dist/constants-C0kT94tc.js.map +1 -0
  34. package/dist/csv-DKq_4OWU.js +55 -0
  35. package/dist/csv-DKq_4OWU.js.map +1 -0
  36. package/dist/errors-ChzJS9al.js +16 -0
  37. package/dist/errors-ChzJS9al.js.map +1 -0
  38. package/dist/index.d.ts +13 -0
  39. package/dist/index.js +19 -0
  40. package/dist/index.js.map +1 -0
  41. package/dist/runtime.d.ts +681 -0
  42. package/dist/runtime.js +2060 -0
  43. package/dist/runtime.js.map +1 -0
  44. package/dist/schemas.d.ts +584 -0
  45. package/dist/schemas.js +315 -0
  46. package/dist/schemas.js.map +1 -0
  47. package/dist/server.d.ts +30 -0
  48. package/dist/server.js +54 -0
  49. package/dist/server.js.map +1 -0
  50. package/dist/types.d.ts +284 -0
  51. package/dist/types.js +0 -0
  52. package/package.json +83 -4
@@ -0,0 +1,681 @@
1
+ import { AccessGrant, Acquisition, Actor, AuditRecord, Certificate, CertificateIndex, Cohort, CohortMembership, Course, CourseCard, CourseData, CourseDetail, CurriculumModule, Discussion, Enrollment, Lesson, LessonProgress, LmsOptions, LmsSettings, Notification, Page, ProgressSummary, PublicEnrollment, PublicLesson, PublicQuizAttempt, Review } from "./types.js";
2
+ import * as emdash from "emdash";
3
+ import { PluginContext, StorageCollection } from "emdash";
4
+ import { z } from "zod";
5
+
6
+ //#region src/store.d.ts
7
+ interface LmsCollections {
8
+ courses: StorageCollection<Course>;
9
+ enrollments: StorageCollection<Enrollment>;
10
+ certificates: StorageCollection<CertificateIndex>;
11
+ discussions: StorageCollection<Discussion>;
12
+ reviews: StorageCollection<Review>;
13
+ cohorts: StorageCollection<Cohort>;
14
+ cohort_enrollments: StorageCollection<CohortMembership>;
15
+ notifications: StorageCollection<Notification>;
16
+ audit: StorageCollection<AuditRecord>;
17
+ }
18
+ //#endregion
19
+ //#region src/curriculum.d.ts
20
+ declare function findLesson(course: Course, lessonId: string): Lesson;
21
+ //#endregion
22
+ //#region src/service.d.ts
23
+ declare class LmsService {
24
+ readonly ctx: PluginContext;
25
+ readonly now: () => Date;
26
+ readonly stores: LmsCollections;
27
+ constructor(ctx: PluginContext, now?: () => Date);
28
+ time(): string;
29
+ settings(): Promise<LmsSettings>;
30
+ saveSettings(actor: Actor | undefined, input: unknown): Promise<LmsSettings>;
31
+ audit(actor: Actor, action: string, resourceId: string, details?: Record<string, unknown>): Promise<void>;
32
+ course(id: string): Promise<Course>;
33
+ accessEnrollment(enrollment: Enrollment | null): Promise<Enrollment | null>;
34
+ enrollmentView(enrollment: Enrollment): Promise<PublicEnrollment>;
35
+ lessonAccess(course: Course, lessonId: string, enrollment: Enrollment | null): Promise<{
36
+ id: string;
37
+ title: string;
38
+ summary: string;
39
+ kind: "text" | "video" | "audio" | "quiz" | "assignment" | "live";
40
+ body: string;
41
+ portableText: Record<string, unknown>[];
42
+ contentSource: {
43
+ collection: string;
44
+ id: string;
45
+ field: string;
46
+ } | null;
47
+ mediaUrl: string | null;
48
+ liveStartsAt: string | null;
49
+ durationMinutes: number;
50
+ minStudySeconds: number;
51
+ preview: boolean;
52
+ required: boolean;
53
+ resources: {
54
+ id: string;
55
+ title: string;
56
+ url: string;
57
+ description: string;
58
+ }[];
59
+ quiz: {
60
+ questions: {
61
+ id: string;
62
+ type: "single" | "multiple" | "true_false" | "short";
63
+ prompt: string;
64
+ options: {
65
+ id: string;
66
+ text: string;
67
+ }[];
68
+ correctAnswers: string[];
69
+ points: number;
70
+ explanation: string;
71
+ }[];
72
+ passingPercent: number;
73
+ maxAttempts: number;
74
+ timeLimitMinutes: number;
75
+ randomizeQuestions: boolean;
76
+ randomizeOptions: boolean;
77
+ showFeedback: "never" | "after_pass" | "after_submit";
78
+ } | null;
79
+ assignment: {
80
+ instructions: string;
81
+ maxPoints: number;
82
+ passingPoints: number;
83
+ dueAt: string | null;
84
+ allowResubmission: boolean;
85
+ } | null;
86
+ }>;
87
+ instructor(course: Course, actor: Actor | undefined): Actor;
88
+ saveCourse(actor: Actor | undefined, input: unknown): Promise<{
89
+ course: Course;
90
+ revision: string;
91
+ }>;
92
+ assertPrerequisiteGraph(courseId: string, prerequisites: string[]): Promise<void>;
93
+ editableCourse(actor: Actor | undefined, id: string): Promise<{
94
+ course: Course;
95
+ revision: string;
96
+ }>;
97
+ adminCourses(actor: Actor | undefined, options?: {
98
+ cursor?: string;
99
+ limit?: number;
100
+ status?: string;
101
+ }): Promise<Page<Course>>;
102
+ catalog(input: unknown): Promise<Page<CourseCard>>;
103
+ publicCourse(slug: string): Promise<{
104
+ prerequisites: {
105
+ id: string;
106
+ title: string;
107
+ slug: string | null;
108
+ }[];
109
+ description: string;
110
+ outcomes: string[];
111
+ requirements: string[];
112
+ sequential: boolean;
113
+ prerequisiteCourseIds: string[];
114
+ enrollmentClosesAt: string | null;
115
+ accessDays: number;
116
+ certificateEnabled: boolean;
117
+ modules: CurriculumModule[];
118
+ id: string;
119
+ slug: string;
120
+ title: string;
121
+ summary: string;
122
+ category: string;
123
+ tags: string[];
124
+ level: CourseData["level"];
125
+ language: string;
126
+ featuredImage: CourseData["featuredImage"];
127
+ instructorName: string;
128
+ enrollmentMode: CourseData["enrollmentMode"];
129
+ lessonCount: number;
130
+ durationMinutes: number;
131
+ }>;
132
+ detail(course: Course): Promise<{
133
+ prerequisites: {
134
+ id: string;
135
+ title: string;
136
+ slug: string | null;
137
+ }[];
138
+ description: string;
139
+ outcomes: string[];
140
+ requirements: string[];
141
+ sequential: boolean;
142
+ prerequisiteCourseIds: string[];
143
+ enrollmentClosesAt: string | null;
144
+ accessDays: number;
145
+ certificateEnabled: boolean;
146
+ modules: CurriculumModule[];
147
+ id: string;
148
+ slug: string;
149
+ title: string;
150
+ summary: string;
151
+ category: string;
152
+ tags: string[];
153
+ level: CourseData["level"];
154
+ language: string;
155
+ featuredImage: CourseData["featuredImage"];
156
+ instructorName: string;
157
+ enrollmentMode: CourseData["enrollmentMode"];
158
+ lessonCount: number;
159
+ durationMinutes: number;
160
+ }>;
161
+ preview(courseId: string, lessonId: string): Promise<{
162
+ course: CourseDetail;
163
+ lesson: PublicLesson;
164
+ }>;
165
+ resolveContent(lesson: ReturnType<typeof findLesson>): Promise<ReturnType<typeof findLesson>>;
166
+ assertPrerequisites(course: Course, actorId: string): Promise<void>;
167
+ newEnrollment(course: Course, actor: Actor, status: Enrollment["status"]): Enrollment;
168
+ enroll(actor: Actor | undefined, courseId: string, options?: {
169
+ cohortId?: string;
170
+ }): Promise<PublicEnrollment>;
171
+ adminEnrollment(actor: Actor | undefined, input: unknown): Promise<PublicEnrollment>;
172
+ learnerCourse(actor: Actor | undefined, courseId: string): Promise<{
173
+ course: {
174
+ prerequisites: {
175
+ id: string;
176
+ title: string;
177
+ slug: string | null;
178
+ }[];
179
+ description: string;
180
+ outcomes: string[];
181
+ requirements: string[];
182
+ sequential: boolean;
183
+ prerequisiteCourseIds: string[];
184
+ enrollmentClosesAt: string | null;
185
+ accessDays: number;
186
+ certificateEnabled: boolean;
187
+ modules: CurriculumModule[];
188
+ id: string;
189
+ slug: string;
190
+ title: string;
191
+ summary: string;
192
+ category: string;
193
+ tags: string[];
194
+ level: CourseData["level"];
195
+ language: string;
196
+ featuredImage: CourseData["featuredImage"];
197
+ instructorName: string;
198
+ enrollmentMode: CourseData["enrollmentMode"];
199
+ lessonCount: number;
200
+ durationMinutes: number;
201
+ };
202
+ enrollment: PublicEnrollment | null;
203
+ progress: ProgressSummary;
204
+ }>;
205
+ learnerCourseBySlug(actor: Actor | undefined, slug: string): Promise<{
206
+ course: {
207
+ prerequisites: {
208
+ id: string;
209
+ title: string;
210
+ slug: string | null;
211
+ }[];
212
+ description: string;
213
+ outcomes: string[];
214
+ requirements: string[];
215
+ sequential: boolean;
216
+ prerequisiteCourseIds: string[];
217
+ enrollmentClosesAt: string | null;
218
+ accessDays: number;
219
+ certificateEnabled: boolean;
220
+ modules: CurriculumModule[];
221
+ id: string;
222
+ slug: string;
223
+ title: string;
224
+ summary: string;
225
+ category: string;
226
+ tags: string[];
227
+ level: CourseData["level"];
228
+ language: string;
229
+ featuredImage: CourseData["featuredImage"];
230
+ instructorName: string;
231
+ enrollmentMode: CourseData["enrollmentMode"];
232
+ lessonCount: number;
233
+ durationMinutes: number;
234
+ };
235
+ enrollment: PublicEnrollment | null;
236
+ progress: ProgressSummary;
237
+ }>;
238
+ dashboard(actor: Actor | undefined, options?: {
239
+ cursor?: string;
240
+ limit?: number;
241
+ }): Promise<{
242
+ items: {
243
+ course: CourseCard;
244
+ enrollment: PublicEnrollment;
245
+ progress: ProgressSummary;
246
+ }[];
247
+ cursor?: string;
248
+ hasMore: boolean;
249
+ }>;
250
+ learnerLesson(actor: Actor | undefined, courseId: string, lessonId: string): Promise<{
251
+ course: CourseDetail;
252
+ lesson: PublicLesson;
253
+ enrollment: PublicEnrollment;
254
+ progress: ProgressSummary;
255
+ }>;
256
+ startLesson(actor: Actor | undefined, courseId: string, lessonId: string): Promise<PublicEnrollment>;
257
+ completeLesson(actor: Actor | undefined, courseId: string, lessonId: string): Promise<{
258
+ enrollment: PublicEnrollment;
259
+ progress: ProgressSummary;
260
+ }>;
261
+ finish(course: Course, enrollment: Enrollment, settings: LmsSettings): void;
262
+ projectCompletion(enrollment: Enrollment): Promise<void>;
263
+ startQuiz(actor: Actor | undefined, courseId: string, lessonId: string): Promise<PublicQuizAttempt>;
264
+ submitQuiz(actor: Actor | undefined, input: unknown): Promise<{
265
+ attempt: PublicQuizAttempt;
266
+ enrollment: PublicEnrollment;
267
+ progress: ProgressSummary;
268
+ }>;
269
+ saveQuizDraft(actor: Actor | undefined, input: unknown): Promise<{
270
+ saved: boolean;
271
+ }>;
272
+ submitAssignment(actor: Actor | undefined, input: unknown): Promise<PublicEnrollment>;
273
+ gradeAssignment(actor: Actor | undefined, input: unknown): Promise<PublicEnrollment>;
274
+ saveNote(actor: Actor | undefined, input: unknown): Promise<{
275
+ note: string;
276
+ }>;
277
+ certificate(actor: Actor | undefined, courseId: string): Promise<Certificate>;
278
+ ownedCertificate(actor: Actor | undefined, id: string): Promise<Certificate>;
279
+ verifyCertificate(id: string): Promise<{
280
+ id: string;
281
+ courseTitle: string;
282
+ issuerName: string;
283
+ issuedAt: string;
284
+ valid: boolean;
285
+ shared: boolean;
286
+ learnerName: string | null;
287
+ }>;
288
+ shareCertificate(actor: Actor | undefined, courseId: string, shared: boolean): Promise<Certificate>;
289
+ revokeCertificate(actor: Actor | undefined, courseId: string, userId: string, reason: string): Promise<Certificate>;
290
+ cancelEnrollment(actor: Actor | undefined, courseId: string): Promise<PublicEnrollment>;
291
+ discussions(actor: Actor | undefined, courseId: string, lessonId: string, cursor?: string): Promise<{
292
+ pending: Discussion[];
293
+ items: Discussion[];
294
+ cursor?: string;
295
+ hasMore: boolean;
296
+ }>;
297
+ postDiscussion(actor: Actor | undefined, input: unknown): Promise<Discussion>;
298
+ publicReviews(courseId: string, cursor?: string): Promise<Page<Review>>;
299
+ postReview(actor: Actor | undefined, input: unknown): Promise<Review>;
300
+ moderate(actor: Actor | undefined, collection: "reviews" | "discussions", input: unknown): Promise<{
301
+ status: "published" | "hidden";
302
+ updatedAt: string;
303
+ id: string;
304
+ courseId: string;
305
+ userId: string;
306
+ authorName: string;
307
+ rating: number;
308
+ body: string;
309
+ createdAt: string;
310
+ } | {
311
+ status: "published" | "hidden";
312
+ updatedAt: string;
313
+ id: string;
314
+ courseId: string;
315
+ lessonId: string;
316
+ parentId: string | null;
317
+ authorId: string;
318
+ authorName: string;
319
+ body: string;
320
+ createdAt: string;
321
+ }>;
322
+ communityQueue(actor: Actor | undefined, collection: "reviews" | "discussions", options?: {
323
+ courseId?: string;
324
+ cursor?: string;
325
+ status?: string;
326
+ }): Promise<{
327
+ items: ({
328
+ revision: string;
329
+ id: string;
330
+ courseId: string;
331
+ userId: string;
332
+ authorName: string;
333
+ rating: number;
334
+ body: string;
335
+ status: "pending" | "published" | "hidden";
336
+ createdAt: string;
337
+ updatedAt: string;
338
+ } | {
339
+ revision: string;
340
+ id: string;
341
+ courseId: string;
342
+ lessonId: string;
343
+ parentId: string | null;
344
+ authorId: string;
345
+ authorName: string;
346
+ body: string;
347
+ status: "pending" | "published" | "hidden";
348
+ createdAt: string;
349
+ updatedAt: string;
350
+ })[];
351
+ cursor?: string;
352
+ hasMore: boolean;
353
+ } | {
354
+ items: ({
355
+ revision: string;
356
+ id: string;
357
+ courseId: string;
358
+ userId: string;
359
+ authorName: string;
360
+ rating: number;
361
+ body: string;
362
+ status: "pending" | "published" | "hidden";
363
+ createdAt: string;
364
+ updatedAt: string;
365
+ } | {
366
+ revision: string;
367
+ id: string;
368
+ courseId: string;
369
+ lessonId: string;
370
+ parentId: string | null;
371
+ authorId: string;
372
+ authorName: string;
373
+ body: string;
374
+ status: "pending" | "published" | "hidden";
375
+ createdAt: string;
376
+ updatedAt: string;
377
+ })[];
378
+ cursor?: string;
379
+ hasMore: boolean;
380
+ }>;
381
+ enrollments(actor: Actor | undefined, options?: {
382
+ courseId?: string;
383
+ status?: string;
384
+ cursor?: string;
385
+ limit?: number;
386
+ }): Promise<{
387
+ items: {
388
+ learnerEmail: string;
389
+ courseTitle: string;
390
+ lessonTitles: {
391
+ [k: string]: string;
392
+ };
393
+ progressSummary: ProgressSummary | null;
394
+ effectiveAccess: "pending" | "granted" | "scheduled" | "expired" | "suspended" | "revoked";
395
+ progress: Record<string, Omit<LessonProgress, "quizAttempts"> & {
396
+ quizAttempts: PublicQuizAttempt[];
397
+ }>;
398
+ id: string;
399
+ status: "pending" | "active" | "completed" | "rejected" | "suspended" | "cancelled";
400
+ courseId: string;
401
+ cohortId: string | null;
402
+ userId: string;
403
+ accessStartsAt: string | null;
404
+ accessExpiresAt: string | null;
405
+ accessStatus: "pending" | "granted" | "suspended" | "revoked";
406
+ accessSource: "free" | "manual" | "cohort" | "purchase";
407
+ enrolledAt: string;
408
+ completedAt: string | null;
409
+ lastActivityAt: string;
410
+ learnerName: string;
411
+ grants: Record<string, AccessGrant>;
412
+ cohortIds: string[];
413
+ acquisition: Acquisition;
414
+ approvedBy: string | null;
415
+ decisionAt: string | null;
416
+ decisionReason: string | null;
417
+ approvedAt: string | null;
418
+ certificate: Certificate | null;
419
+ completionLessonIds: string[];
420
+ schemaVersion: 1;
421
+ }[];
422
+ cursor?: string;
423
+ hasMore: boolean;
424
+ }>;
425
+ report(actor: Actor | undefined, courseId?: string): Promise<{
426
+ accessSources: any;
427
+ accessDecisions: any;
428
+ completionRate: number;
429
+ courseCount: number;
430
+ generatedAt: string;
431
+ total: number;
432
+ completedEver: number;
433
+ }>;
434
+ enrollmentCsv(actor: Actor | undefined, options?: {
435
+ courseId?: string;
436
+ status?: string;
437
+ }): Promise<string>;
438
+ cohortList(actor: Actor | undefined, cursor?: string): Promise<{
439
+ items: {
440
+ revision: string;
441
+ id: string;
442
+ createdBy: string;
443
+ createdAt: string;
444
+ updatedAt: string;
445
+ title: string;
446
+ courseIds: string[];
447
+ memberIds: string[];
448
+ startsAt: string | null;
449
+ endsAt: string | null;
450
+ }[];
451
+ cursor?: string;
452
+ hasMore: boolean;
453
+ }>;
454
+ publicCohort(id: string): Promise<{
455
+ id: string;
456
+ title: string;
457
+ startsAt: string | null;
458
+ endsAt: string | null;
459
+ courses: CourseCard[];
460
+ }>;
461
+ requestCohort(actor: Actor | undefined, cohortId: string): Promise<CohortMembership>;
462
+ cohortMemberships(actor: Actor | undefined, options?: {
463
+ cohortId?: string;
464
+ status?: string;
465
+ cursor?: string;
466
+ }): Promise<Page<CohortMembership>>;
467
+ decideCohort(actor: Actor | undefined, cohortId: string, userId: string, status: "active" | "rejected" | "suspended" | "cancelled", reason?: string): Promise<{
468
+ membership: CohortMembership;
469
+ results: {
470
+ courseId: string;
471
+ success: boolean;
472
+ error?: string;
473
+ }[];
474
+ }>;
475
+ saveCohort(actor: Actor | undefined, input: unknown): Promise<{
476
+ cohort: Cohort;
477
+ revision: string;
478
+ }>;
479
+ applyCohort(actor: Actor | undefined, id: string, expectedRevision: string, offset: number): Promise<{
480
+ results: {
481
+ userId: string;
482
+ courseId: string;
483
+ success: boolean;
484
+ error?: string;
485
+ }[];
486
+ nextOffset: number;
487
+ hasMore: boolean;
488
+ }>;
489
+ notify(enrollment: Enrollment, key: string, title: string, message: string): Promise<void>;
490
+ notifications(actor: Actor | undefined, cursor?: string): Promise<{
491
+ items: {
492
+ id: string;
493
+ userId: string;
494
+ title: string;
495
+ message: string;
496
+ courseId: string | null;
497
+ read: boolean;
498
+ createdAt: string;
499
+ }[];
500
+ cursor?: string;
501
+ hasMore: boolean;
502
+ }>;
503
+ readNotification(actor: Actor | undefined, id: string): Promise<{
504
+ read: boolean;
505
+ }>;
506
+ deliverNotifications(): Promise<{
507
+ sent: number;
508
+ failed: number;
509
+ }>;
510
+ assignments(actor: Actor | undefined, courseId: string, cursor?: string): Promise<{
511
+ items: {
512
+ userId: string;
513
+ learnerName: string;
514
+ courseId: string;
515
+ lessonId: string;
516
+ id: string;
517
+ body: string;
518
+ attachmentUrl: string | null;
519
+ submittedAt: string;
520
+ status: "submitted" | "graded";
521
+ maxPoints: number;
522
+ passingPoints: number;
523
+ points: number | null;
524
+ feedback: string;
525
+ gradedAt: string | null;
526
+ gradedBy: string | null;
527
+ }[];
528
+ cursor?: string;
529
+ hasMore: boolean;
530
+ }>;
531
+ exportCourse(actor: Actor | undefined, id: string): Promise<{
532
+ format: string;
533
+ version: number;
534
+ course: {
535
+ slug: string;
536
+ title: string;
537
+ summary: string;
538
+ description: string;
539
+ outcomes: string[];
540
+ requirements: string[];
541
+ category: string;
542
+ tags: string[];
543
+ language: string;
544
+ level: "beginner" | "intermediate" | "advanced" | "all";
545
+ featuredImage: {
546
+ id: string;
547
+ src: string;
548
+ alt: string;
549
+ } | null;
550
+ instructorName: string;
551
+ instructorIds: string[];
552
+ status: "draft" | "published" | "archived";
553
+ enrollmentMode: "open" | "approval" | "invite";
554
+ commerce: {
555
+ accessModel: "free" | "paid";
556
+ offerId: string | null;
557
+ priceMinor: number | null;
558
+ currency: string;
559
+ };
560
+ prerequisiteCourseIds: string[];
561
+ sequential: boolean;
562
+ enrollmentClosesAt: string | null;
563
+ accessDays: number;
564
+ certificateEnabled: boolean;
565
+ modules: {
566
+ id: string;
567
+ title: string;
568
+ description: string;
569
+ releaseDays: number;
570
+ unlockAt: string | null;
571
+ lessons: {
572
+ id: string;
573
+ title: string;
574
+ summary: string;
575
+ kind: "text" | "video" | "audio" | "quiz" | "assignment" | "live";
576
+ body: string;
577
+ portableText: Record<string, unknown>[];
578
+ contentSource: {
579
+ collection: string;
580
+ id: string;
581
+ field: string;
582
+ } | null;
583
+ mediaUrl: string | null;
584
+ liveStartsAt: string | null;
585
+ durationMinutes: number;
586
+ minStudySeconds: number;
587
+ preview: boolean;
588
+ required: boolean;
589
+ resources: {
590
+ id: string;
591
+ title: string;
592
+ url: string;
593
+ description: string;
594
+ }[];
595
+ quiz: {
596
+ questions: {
597
+ id: string;
598
+ type: "single" | "multiple" | "true_false" | "short";
599
+ prompt: string;
600
+ options: {
601
+ id: string;
602
+ text: string;
603
+ }[];
604
+ correctAnswers: string[];
605
+ points: number;
606
+ explanation: string;
607
+ }[];
608
+ passingPercent: number;
609
+ maxAttempts: number;
610
+ timeLimitMinutes: number;
611
+ randomizeQuestions: boolean;
612
+ randomizeOptions: boolean;
613
+ showFeedback: "never" | "after_pass" | "after_submit";
614
+ } | null;
615
+ assignment: {
616
+ instructions: string;
617
+ maxPoints: number;
618
+ passingPoints: number;
619
+ dueAt: string | null;
620
+ allowResubmission: boolean;
621
+ } | null;
622
+ }[];
623
+ }[];
624
+ };
625
+ }>;
626
+ importCourse(actor: Actor | undefined, input: unknown): Promise<{
627
+ course: Course;
628
+ revision: string;
629
+ }>;
630
+ deleteCourse(actor: Actor | undefined, id: string, expectedRevision: string): Promise<{
631
+ deleted: boolean;
632
+ }>;
633
+ retryNotification(actor: Actor | undefined, id: string): Promise<{
634
+ queued: boolean;
635
+ }>;
636
+ notificationQueue(actor: Actor | undefined, options?: {
637
+ status?: Notification["emailStatus"];
638
+ cursor?: string;
639
+ limit?: number;
640
+ }): Promise<Page<Notification>>;
641
+ auditList(actor: Actor | undefined, options?: {
642
+ cursor?: string;
643
+ limit?: number;
644
+ }): Promise<Page<AuditRecord>>;
645
+ reminders(): Promise<number>;
646
+ }
647
+ //#endregion
648
+ //#region src/runtime.d.ts
649
+ declare function createPlugin(_options?: LmsOptions): emdash.ResolvedPlugin<{
650
+ courses: {
651
+ indexes: string[];
652
+ uniqueIndexes: string[];
653
+ };
654
+ enrollments: {
655
+ indexes: (string | string[])[];
656
+ };
657
+ certificates: {
658
+ indexes: string[];
659
+ };
660
+ discussions: {
661
+ indexes: (string | string[])[];
662
+ };
663
+ reviews: {
664
+ indexes: string[];
665
+ };
666
+ cohorts: {
667
+ indexes: string[];
668
+ };
669
+ cohort_enrollments: {
670
+ indexes: string[];
671
+ };
672
+ notifications: {
673
+ indexes: string[];
674
+ };
675
+ audit: {
676
+ indexes: string[];
677
+ };
678
+ }>;
679
+ //#endregion
680
+ export { LmsService, createPlugin };
681
+ //# sourceMappingURL=runtime.d.ts.map