@studious-lms/server 1.14.0 → 1.16.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 (129) hide show
  1. package/dist/lib/inferDocumentFormat.d.ts +10 -0
  2. package/dist/lib/inferDocumentFormat.d.ts.map +1 -0
  3. package/dist/lib/inferDocumentFormat.js +48 -0
  4. package/dist/lib/inferDocumentFormat.js.map +1 -0
  5. package/dist/models/announcement.d.ts +45 -45
  6. package/dist/models/assignment.d.ts +75 -75
  7. package/dist/models/class.d.ts +13 -13
  8. package/dist/models/comment.d.ts +6 -6
  9. package/dist/models/conversation.d.ts +23 -23
  10. package/dist/models/event.d.ts +18 -18
  11. package/dist/models/file.d.ts +9 -9
  12. package/dist/models/labChat.d.ts +4 -4
  13. package/dist/models/message.d.ts +13 -13
  14. package/dist/models/newtonChat.d.ts +3 -3
  15. package/dist/models/notification.d.ts +4 -4
  16. package/dist/models/worksheet.d.ts +121 -121
  17. package/dist/pipelines/aiLabChat.d.ts +7 -1
  18. package/dist/pipelines/aiLabChat.d.ts.map +1 -1
  19. package/dist/pipelines/aiLabChat.js +145 -67
  20. package/dist/pipelines/aiLabChat.js.map +1 -1
  21. package/dist/pipelines/aiLabChatContract.d.ts +34 -195
  22. package/dist/pipelines/aiLabChatContract.d.ts.map +1 -1
  23. package/dist/pipelines/aiLabChatContract.js +9 -19
  24. package/dist/pipelines/aiLabChatContract.js.map +1 -1
  25. package/dist/pipelines/gradeWorksheet.d.ts +6 -6
  26. package/dist/pipelines/gradeWorksheet.d.ts.map +1 -1
  27. package/dist/pipelines/gradeWorksheet.js +75 -36
  28. package/dist/pipelines/gradeWorksheet.js.map +1 -1
  29. package/dist/pipelines/labChatPrompt.d.ts +8 -3
  30. package/dist/pipelines/labChatPrompt.d.ts.map +1 -1
  31. package/dist/pipelines/labChatPrompt.js +49 -14
  32. package/dist/pipelines/labChatPrompt.js.map +1 -1
  33. package/dist/pipelines/pdfToWorksheet.d.ts +1 -1
  34. package/dist/routers/_app.d.ts +524 -516
  35. package/dist/routers/_app.d.ts.map +1 -1
  36. package/dist/routers/announcement.d.ts +40 -40
  37. package/dist/routers/assignment.d.ts +121 -121
  38. package/dist/routers/class.d.ts +8 -8
  39. package/dist/routers/comment.d.ts +5 -5
  40. package/dist/routers/conversation.d.ts +6 -6
  41. package/dist/routers/discussion.d.ts +3 -3
  42. package/dist/routers/embedding.d.ts +6 -2
  43. package/dist/routers/embedding.d.ts.map +1 -1
  44. package/dist/routers/embedding.js +44 -36
  45. package/dist/routers/embedding.js.map +1 -1
  46. package/dist/routers/event.d.ts +18 -18
  47. package/dist/routers/file.d.ts +2 -2
  48. package/dist/routers/labChat.d.ts +3 -3
  49. package/dist/routers/notifications.d.ts +4 -4
  50. package/dist/routers/search.d.ts +2 -2
  51. package/dist/routers/worksheet.d.ts +44 -44
  52. package/dist/routes/aiStream.d.ts.map +1 -1
  53. package/dist/routes/aiStream.js +41 -11
  54. package/dist/routes/aiStream.js.map +1 -1
  55. package/dist/seedDatabase.d.ts +1 -1
  56. package/dist/services/aiChatStream.d.ts +18 -0
  57. package/dist/services/aiChatStream.d.ts.map +1 -1
  58. package/dist/services/aiChatStream.js +81 -11
  59. package/dist/services/aiChatStream.js.map +1 -1
  60. package/dist/services/aiModifierTools.d.ts +0 -16
  61. package/dist/services/aiModifierTools.d.ts.map +1 -1
  62. package/dist/services/aiModifierTools.js +112 -3
  63. package/dist/services/aiModifierTools.js.map +1 -1
  64. package/dist/services/aiProposalTools.d.ts.map +1 -1
  65. package/dist/services/aiProposalTools.js +25 -25
  66. package/dist/services/aiProposalTools.js.map +1 -1
  67. package/dist/services/announcement.d.ts +34 -34
  68. package/dist/services/assignment.d.ts +111 -111
  69. package/dist/services/assignment.d.ts.map +1 -1
  70. package/dist/services/assignment.js +4 -2
  71. package/dist/services/assignment.js.map +1 -1
  72. package/dist/services/class.d.ts +6 -6
  73. package/dist/services/class.d.ts.map +1 -1
  74. package/dist/services/class.js +7 -3
  75. package/dist/services/class.js.map +1 -1
  76. package/dist/services/comment.d.ts +5 -5
  77. package/dist/services/conversation.d.ts +6 -6
  78. package/dist/services/discussion.d.ts.map +1 -1
  79. package/dist/services/discussion.js +9 -2
  80. package/dist/services/discussion.js.map +1 -1
  81. package/dist/services/embedding.d.ts +19 -1
  82. package/dist/services/embedding.d.ts.map +1 -1
  83. package/dist/services/embedding.js +154 -8
  84. package/dist/services/embedding.js.map +1 -1
  85. package/dist/services/event.d.ts +18 -18
  86. package/dist/services/file.d.ts +4 -4
  87. package/dist/services/folder.d.ts.map +1 -1
  88. package/dist/services/folder.js +32 -2
  89. package/dist/services/folder.js.map +1 -1
  90. package/dist/services/labChat.d.ts +3 -3
  91. package/dist/services/notification.d.ts +4 -4
  92. package/dist/services/openaiDocumentGen.d.ts +25 -0
  93. package/dist/services/openaiDocumentGen.d.ts.map +1 -0
  94. package/dist/services/openaiDocumentGen.js +195 -0
  95. package/dist/services/openaiDocumentGen.js.map +1 -0
  96. package/dist/services/search.d.ts +1 -1
  97. package/dist/services/search.d.ts.map +1 -1
  98. package/dist/services/search.js +27 -2
  99. package/dist/services/search.js.map +1 -1
  100. package/dist/services/worksheet.d.ts +66 -49
  101. package/dist/services/worksheet.d.ts.map +1 -1
  102. package/dist/services/worksheet.js +48 -3
  103. package/dist/services/worksheet.js.map +1 -1
  104. package/dist/workers/processors/embedContent.d.ts.map +1 -1
  105. package/dist/workers/processors/embedContent.js +16 -25
  106. package/dist/workers/processors/embedContent.js.map +1 -1
  107. package/package.json +1 -1
  108. package/prisma/migrations/20260610140000_expand_embedding_source_types/migration.sql +4 -0
  109. package/prisma/schema.prisma +3 -0
  110. package/src/lib/inferDocumentFormat.ts +58 -0
  111. package/src/pipelines/aiLabChat.ts +185 -74
  112. package/src/pipelines/aiLabChatContract.ts +7 -17
  113. package/src/pipelines/gradeWorksheet.ts +95 -38
  114. package/src/pipelines/labChatPrompt.ts +61 -14
  115. package/src/routers/embedding.ts +44 -39
  116. package/src/routes/aiStream.ts +47 -9
  117. package/src/services/aiChatStream.ts +103 -8
  118. package/src/services/aiModifierTools.ts +154 -1
  119. package/src/services/aiProposalTools.ts +26 -25
  120. package/src/services/assignment.ts +3 -0
  121. package/src/services/class.ts +7 -1
  122. package/src/services/discussion.ts +13 -0
  123. package/src/services/embedding.ts +167 -6
  124. package/src/services/folder.ts +31 -0
  125. package/src/services/openaiDocumentGen.ts +237 -0
  126. package/src/services/search.ts +25 -1
  127. package/src/services/worksheet.ts +68 -1
  128. package/src/workers/processors/embedContent.ts +18 -22
  129. package/tests/unit/lib/inferDocumentFormat.test.ts +33 -0
@@ -46,11 +46,11 @@ export declare function findWorksheetById(id: string): import("@prisma/client/ru
46
46
  id: string;
47
47
  createdAt: Date;
48
48
  updatedAt: Date;
49
- order: number | null;
50
- worksheetId: string;
49
+ points: number;
51
50
  question: string;
51
+ worksheetId: string;
52
+ order: number | null;
52
53
  answer: string;
53
- points: number;
54
54
  }[];
55
55
  } & {
56
56
  status: import(".prisma/client").$Enums.JobStatus | null;
@@ -59,8 +59,8 @@ export declare function findWorksheetById(id: string): import("@prisma/client/ru
59
59
  updatedAt: Date;
60
60
  name: string;
61
61
  classId: string;
62
- sourceUrl: string | null;
63
62
  runJobId: string | null;
63
+ sourceUrl: string | null;
64
64
  }) | null>;
65
65
  /** @returns Worksheet by ID (minimal). */
66
66
  export declare function findWorksheetByIdMinimal(id: string): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<import(".prisma/client").Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
@@ -94,8 +94,8 @@ export declare function findWorksheetByIdMinimal(id: string): import("@prisma/cl
94
94
  updatedAt: Date;
95
95
  name: string;
96
96
  classId: string;
97
- sourceUrl: string | null;
98
97
  runJobId: string | null;
98
+ sourceUrl: string | null;
99
99
  } | null>;
100
100
  /** @returns Worksheet by ID for an authorized class member. */
101
101
  export declare function findWorksheetByIdForClassMember(id: string, userId: string): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<import(".prisma/client").Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
@@ -149,11 +149,11 @@ export declare function findWorksheetByIdForClassMember(id: string, userId: stri
149
149
  id: string;
150
150
  createdAt: Date;
151
151
  updatedAt: Date;
152
- order: number | null;
153
- worksheetId: string;
152
+ points: number;
154
153
  question: string;
154
+ worksheetId: string;
155
+ order: number | null;
155
156
  answer: string;
156
- points: number;
157
157
  }[];
158
158
  } & {
159
159
  status: import(".prisma/client").$Enums.JobStatus | null;
@@ -162,8 +162,8 @@ export declare function findWorksheetByIdForClassMember(id: string, userId: stri
162
162
  updatedAt: Date;
163
163
  name: string;
164
164
  classId: string;
165
- sourceUrl: string | null;
166
165
  runJobId: string | null;
166
+ sourceUrl: string | null;
167
167
  }) | null>;
168
168
  /** @returns Worksheet by ID for an authorized teacher. */
169
169
  export declare function findWorksheetByIdForTeacher(id: string, userId: string): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<import(".prisma/client").Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
@@ -217,11 +217,11 @@ export declare function findWorksheetByIdForTeacher(id: string, userId: string):
217
217
  id: string;
218
218
  createdAt: Date;
219
219
  updatedAt: Date;
220
- order: number | null;
221
- worksheetId: string;
220
+ points: number;
222
221
  question: string;
222
+ worksheetId: string;
223
+ order: number | null;
223
224
  answer: string;
224
- points: number;
225
225
  }[];
226
226
  } & {
227
227
  status: import(".prisma/client").$Enums.JobStatus | null;
@@ -230,8 +230,8 @@ export declare function findWorksheetByIdForTeacher(id: string, userId: string):
230
230
  updatedAt: Date;
231
231
  name: string;
232
232
  classId: string;
233
- sourceUrl: string | null;
234
233
  runJobId: string | null;
234
+ sourceUrl: string | null;
235
235
  }) | null>;
236
236
  /** @returns Worksheets for a class. */
237
237
  export declare function findWorksheetsByClassId(classId: string): import("@prisma/client/runtime/library.js").PrismaPromise<({
@@ -251,8 +251,8 @@ export declare function findWorksheetsByClassId(classId: string): import("@prism
251
251
  updatedAt: Date;
252
252
  name: string;
253
253
  classId: string;
254
- sourceUrl: string | null;
255
254
  runJobId: string | null;
255
+ sourceUrl: string | null;
256
256
  })[]>;
257
257
  /** @returns Worksheet question by ID for an authorized teacher. */
258
258
  export declare function findWorksheetQuestionByIdForTeacher(id: string, userId: string): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<import(".prisma/client").Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
@@ -286,11 +286,11 @@ export declare function findWorksheetQuestionByIdForTeacher(id: string, userId:
286
286
  id: string;
287
287
  createdAt: Date;
288
288
  updatedAt: Date;
289
- order: number | null;
290
- worksheetId: string;
289
+ points: number;
291
290
  question: string;
291
+ worksheetId: string;
292
+ order: number | null;
292
293
  answer: string;
293
- points: number;
294
294
  } | null>;
295
295
  /** @returns Worksheet question scoped to a worksheet. */
296
296
  export declare function findWorksheetQuestionByIdInWorksheet(id: string, worksheetId: string): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<import(".prisma/client").Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
@@ -324,11 +324,11 @@ export declare function findWorksheetQuestionByIdInWorksheet(id: string, workshe
324
324
  id: string;
325
325
  createdAt: Date;
326
326
  updatedAt: Date;
327
- order: number | null;
328
- worksheetId: string;
327
+ points: number;
329
328
  question: string;
329
+ worksheetId: string;
330
+ order: number | null;
330
331
  answer: string;
331
- points: number;
332
332
  } | null>;
333
333
  /** Create a worksheet. */
334
334
  export declare function createWorksheet(data: {
@@ -365,8 +365,8 @@ export declare function createWorksheet(data: {
365
365
  updatedAt: Date;
366
366
  name: string;
367
367
  classId: string;
368
- sourceUrl: string | null;
369
368
  runJobId: string | null;
369
+ sourceUrl: string | null;
370
370
  }>;
371
371
  /** Update worksheet name. */
372
372
  export declare function updateWorksheet(id: string, data: {
@@ -402,8 +402,8 @@ export declare function updateWorksheet(id: string, data: {
402
402
  updatedAt: Date;
403
403
  name: string;
404
404
  classId: string;
405
- sourceUrl: string | null;
406
405
  runJobId: string | null;
406
+ sourceUrl: string | null;
407
407
  }>;
408
408
  /** Delete a worksheet. */
409
409
  export declare function deleteWorksheet(id: string): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<import(".prisma/client").Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
@@ -437,8 +437,8 @@ export declare function deleteWorksheet(id: string): import("@prisma/client/runt
437
437
  updatedAt: Date;
438
438
  name: string;
439
439
  classId: string;
440
- sourceUrl: string | null;
441
440
  runJobId: string | null;
441
+ sourceUrl: string | null;
442
442
  }>;
443
443
  /**
444
444
  * Clone a worksheet and its questions into another class with a new name.
@@ -451,8 +451,8 @@ export declare function duplicateWorksheetWithClient(tx: AppTransactionClient, s
451
451
  updatedAt: Date;
452
452
  name: string;
453
453
  classId: string;
454
- sourceUrl: string | null;
455
454
  runJobId: string | null;
455
+ sourceUrl: string | null;
456
456
  } | null>;
457
457
  export declare function duplicateWorksheet(sourceWorksheetId: string, targetClassId: string, name: string): Promise<{
458
458
  status: import(".prisma/client").$Enums.JobStatus | null;
@@ -461,8 +461,8 @@ export declare function duplicateWorksheet(sourceWorksheetId: string, targetClas
461
461
  updatedAt: Date;
462
462
  name: string;
463
463
  classId: string;
464
- sourceUrl: string | null;
465
464
  runJobId: string | null;
465
+ sourceUrl: string | null;
466
466
  } | null>;
467
467
  /** @returns Questions for a worksheet. */
468
468
  export declare function findQuestionsByWorksheetId(worksheetId: string): import("@prisma/client/runtime/library.js").PrismaPromise<{
@@ -472,11 +472,11 @@ export declare function findQuestionsByWorksheetId(worksheetId: string): import(
472
472
  id: string;
473
473
  createdAt: Date;
474
474
  updatedAt: Date;
475
- order: number | null;
476
- worksheetId: string;
475
+ points: number;
477
476
  question: string;
477
+ worksheetId: string;
478
+ order: number | null;
478
479
  answer: string;
479
- points: number;
480
480
  }[]>;
481
481
  /** Create a worksheet question. */
482
482
  export declare function createWorksheetQuestion(data: {
@@ -519,11 +519,11 @@ export declare function createWorksheetQuestion(data: {
519
519
  id: string;
520
520
  createdAt: Date;
521
521
  updatedAt: Date;
522
- order: number | null;
523
- worksheetId: string;
522
+ points: number;
524
523
  question: string;
524
+ worksheetId: string;
525
+ order: number | null;
525
526
  answer: string;
526
- points: number;
527
527
  }>;
528
528
  /** Update question order. */
529
529
  export declare function updateWorksheetQuestionOrder(id: string, order: number): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<import(".prisma/client").Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
@@ -557,11 +557,11 @@ export declare function updateWorksheetQuestionOrder(id: string, order: number):
557
557
  id: string;
558
558
  createdAt: Date;
559
559
  updatedAt: Date;
560
- order: number | null;
561
- worksheetId: string;
560
+ points: number;
562
561
  question: string;
562
+ worksheetId: string;
563
+ order: number | null;
563
564
  answer: string;
564
- points: number;
565
565
  }>;
566
566
  /** Update a worksheet question. */
567
567
  export declare function updateWorksheetQuestion(id: string, data: {
@@ -602,11 +602,11 @@ export declare function updateWorksheetQuestion(id: string, data: {
602
602
  id: string;
603
603
  createdAt: Date;
604
604
  updatedAt: Date;
605
- order: number | null;
606
- worksheetId: string;
605
+ points: number;
607
606
  question: string;
607
+ worksheetId: string;
608
+ order: number | null;
608
609
  answer: string;
609
- points: number;
610
610
  }>;
611
611
  /** Delete a worksheet question. */
612
612
  export declare function deleteWorksheetQuestion(id: string): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<import(".prisma/client").Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
@@ -640,11 +640,11 @@ export declare function deleteWorksheetQuestion(id: string): import("@prisma/cli
640
640
  id: string;
641
641
  createdAt: Date;
642
642
  updatedAt: Date;
643
- order: number | null;
644
- worksheetId: string;
643
+ points: number;
645
644
  question: string;
645
+ worksheetId: string;
646
+ order: number | null;
646
647
  answer: string;
647
- points: number;
648
648
  }>;
649
649
  /** @returns Submission by ID. */
650
650
  export declare function findSubmissionById(id: string): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<import(".prisma/client").Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
@@ -675,8 +675,8 @@ export declare function findSubmissionById(id: string): import("@prisma/client/r
675
675
  id: string;
676
676
  createdAt: Date;
677
677
  assignmentId: string;
678
- modifiedAt: Date;
679
678
  studentId: string;
679
+ modifiedAt: Date;
680
680
  extendedResponse: string | null;
681
681
  gradeReceived: number | null;
682
682
  recommendationState: import(".prisma/client").$Enums.SubmissionRecommendationState;
@@ -754,14 +754,14 @@ export declare function findWorksheetResponseBySubmissionAndWorksheet(submission
754
754
  createdAt: Date;
755
755
  updatedAt: Date | null;
756
756
  feedback: string | null;
757
- studentId: string;
758
757
  runJobId: string | null;
759
- points: number;
760
758
  response: string;
761
759
  isCorrect: boolean;
762
760
  markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
763
- studentWorksheetResponseId: string | null;
761
+ points: number;
762
+ studentId: string;
764
763
  questionId: string;
764
+ studentWorksheetResponseId: string | null;
765
765
  })[];
766
766
  } & {
767
767
  id: string;
@@ -769,9 +769,9 @@ export declare function findWorksheetResponseBySubmissionAndWorksheet(submission
769
769
  updatedAt: Date;
770
770
  submissionId: string | null;
771
771
  studentId: string;
772
+ worksheetId: string;
772
773
  submittedAt: Date | null;
773
774
  submitted: boolean;
774
- worksheetId: string;
775
775
  }) | null>;
776
776
  /** Get or create worksheet response for student. */
777
777
  export declare function findOrCreateWorksheetResponse(submissionId: string, worksheetId: string, studentId: string): Promise<{
@@ -786,14 +786,14 @@ export declare function findOrCreateWorksheetResponse(submissionId: string, work
786
786
  createdAt: Date;
787
787
  updatedAt: Date | null;
788
788
  feedback: string | null;
789
- studentId: string;
790
789
  runJobId: string | null;
791
- points: number;
792
790
  response: string;
793
791
  isCorrect: boolean;
794
792
  markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
795
- studentWorksheetResponseId: string | null;
793
+ points: number;
794
+ studentId: string;
796
795
  questionId: string;
796
+ studentWorksheetResponseId: string | null;
797
797
  })[];
798
798
  } & {
799
799
  id: string;
@@ -801,9 +801,9 @@ export declare function findOrCreateWorksheetResponse(submissionId: string, work
801
801
  updatedAt: Date;
802
802
  submissionId: string | null;
803
803
  studentId: string;
804
+ worksheetId: string;
804
805
  submittedAt: Date | null;
805
806
  submitted: boolean;
806
- worksheetId: string;
807
807
  }>;
808
808
  /** Create a worksheet response. */
809
809
  export declare function createWorksheetResponse(data: {
@@ -846,14 +846,14 @@ export declare function createWorksheetResponse(data: {
846
846
  createdAt: Date;
847
847
  updatedAt: Date | null;
848
848
  feedback: string | null;
849
- studentId: string;
850
849
  runJobId: string | null;
851
- points: number;
852
850
  response: string;
853
851
  isCorrect: boolean;
854
852
  markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
855
- studentWorksheetResponseId: string | null;
853
+ points: number;
854
+ studentId: string;
856
855
  questionId: string;
856
+ studentWorksheetResponseId: string | null;
857
857
  })[];
858
858
  } & {
859
859
  id: string;
@@ -861,9 +861,9 @@ export declare function createWorksheetResponse(data: {
861
861
  updatedAt: Date;
862
862
  submissionId: string | null;
863
863
  studentId: string;
864
+ worksheetId: string;
864
865
  submittedAt: Date | null;
865
866
  submitted: boolean;
866
- worksheetId: string;
867
867
  }>;
868
868
  /** @returns Worksheet response by ID. */
869
869
  export declare function findWorksheetResponseById(id: string): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<import(".prisma/client").Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
@@ -897,14 +897,14 @@ export declare function findWorksheetResponseById(id: string): import("@prisma/c
897
897
  createdAt: Date;
898
898
  updatedAt: Date | null;
899
899
  feedback: string | null;
900
- studentId: string;
901
900
  runJobId: string | null;
902
- points: number;
903
901
  response: string;
904
902
  isCorrect: boolean;
905
903
  markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
906
- studentWorksheetResponseId: string | null;
904
+ points: number;
905
+ studentId: string;
907
906
  questionId: string;
907
+ studentWorksheetResponseId: string | null;
908
908
  }[];
909
909
  } & {
910
910
  id: string;
@@ -912,9 +912,9 @@ export declare function findWorksheetResponseById(id: string): import("@prisma/c
912
912
  updatedAt: Date;
913
913
  submissionId: string | null;
914
914
  studentId: string;
915
+ worksheetId: string;
915
916
  submittedAt: Date | null;
916
917
  submitted: boolean;
917
- worksheetId: string;
918
918
  }) | null>;
919
919
  /** @returns Worksheet response if requester is the owning student. */
920
920
  export declare function findWorksheetResponseByIdForStudent(id: string, userId: string): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<import(".prisma/client").Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
@@ -949,8 +949,8 @@ export declare function findWorksheetResponseByIdForStudent(id: string, userId:
949
949
  updatedAt: Date;
950
950
  name: string;
951
951
  classId: string;
952
- sourceUrl: string | null;
953
952
  runJobId: string | null;
953
+ sourceUrl: string | null;
954
954
  };
955
955
  responses: {
956
956
  status: import(".prisma/client").$Enums.JobStatus | null;
@@ -958,14 +958,14 @@ export declare function findWorksheetResponseByIdForStudent(id: string, userId:
958
958
  createdAt: Date;
959
959
  updatedAt: Date | null;
960
960
  feedback: string | null;
961
- studentId: string;
962
961
  runJobId: string | null;
963
- points: number;
964
962
  response: string;
965
963
  isCorrect: boolean;
966
964
  markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
967
- studentWorksheetResponseId: string | null;
965
+ points: number;
966
+ studentId: string;
968
967
  questionId: string;
968
+ studentWorksheetResponseId: string | null;
969
969
  }[];
970
970
  } & {
971
971
  id: string;
@@ -973,9 +973,9 @@ export declare function findWorksheetResponseByIdForStudent(id: string, userId:
973
973
  updatedAt: Date;
974
974
  submissionId: string | null;
975
975
  studentId: string;
976
+ worksheetId: string;
976
977
  submittedAt: Date | null;
977
978
  submitted: boolean;
978
- worksheetId: string;
979
979
  }) | null>;
980
980
  /** @returns Worksheet response if requester is a class teacher. */
981
981
  export declare function findWorksheetResponseByIdForTeacher(id: string, userId: string): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<import(".prisma/client").Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
@@ -1010,8 +1010,8 @@ export declare function findWorksheetResponseByIdForTeacher(id: string, userId:
1010
1010
  updatedAt: Date;
1011
1011
  name: string;
1012
1012
  classId: string;
1013
- sourceUrl: string | null;
1014
1013
  runJobId: string | null;
1014
+ sourceUrl: string | null;
1015
1015
  };
1016
1016
  responses: {
1017
1017
  status: import(".prisma/client").$Enums.JobStatus | null;
@@ -1019,14 +1019,14 @@ export declare function findWorksheetResponseByIdForTeacher(id: string, userId:
1019
1019
  createdAt: Date;
1020
1020
  updatedAt: Date | null;
1021
1021
  feedback: string | null;
1022
- studentId: string;
1023
1022
  runJobId: string | null;
1024
- points: number;
1025
1023
  response: string;
1026
1024
  isCorrect: boolean;
1027
1025
  markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
1028
- studentWorksheetResponseId: string | null;
1026
+ points: number;
1027
+ studentId: string;
1029
1028
  questionId: string;
1029
+ studentWorksheetResponseId: string | null;
1030
1030
  }[];
1031
1031
  } & {
1032
1032
  id: string;
@@ -1034,9 +1034,9 @@ export declare function findWorksheetResponseByIdForTeacher(id: string, userId:
1034
1034
  updatedAt: Date;
1035
1035
  submissionId: string | null;
1036
1036
  studentId: string;
1037
+ worksheetId: string;
1037
1038
  submittedAt: Date | null;
1038
1039
  submitted: boolean;
1039
- worksheetId: string;
1040
1040
  }) | null>;
1041
1041
  /** @returns Worksheet response with question responses. */
1042
1042
  export declare function findWorksheetResponseWithResponses(id: string, questionId?: string): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<import(".prisma/client").Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
@@ -1070,14 +1070,14 @@ export declare function findWorksheetResponseWithResponses(id: string, questionI
1070
1070
  createdAt: Date;
1071
1071
  updatedAt: Date | null;
1072
1072
  feedback: string | null;
1073
- studentId: string;
1074
1073
  runJobId: string | null;
1075
- points: number;
1076
1074
  response: string;
1077
1075
  isCorrect: boolean;
1078
1076
  markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
1079
- studentWorksheetResponseId: string | null;
1077
+ points: number;
1078
+ studentId: string;
1080
1079
  questionId: string;
1080
+ studentWorksheetResponseId: string | null;
1081
1081
  }[];
1082
1082
  } & {
1083
1083
  id: string;
@@ -1085,9 +1085,9 @@ export declare function findWorksheetResponseWithResponses(id: string, questionI
1085
1085
  updatedAt: Date;
1086
1086
  submissionId: string | null;
1087
1087
  studentId: string;
1088
+ worksheetId: string;
1088
1089
  submittedAt: Date | null;
1089
1090
  submitted: boolean;
1090
- worksheetId: string;
1091
1091
  }) | null>;
1092
1092
  /** @returns Worksheet response with scoped responses if requester is the owning student. */
1093
1093
  export declare function findWorksheetResponseWithResponsesForStudent(id: string, userId: string, questionId?: string): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<import(".prisma/client").Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
@@ -1122,8 +1122,8 @@ export declare function findWorksheetResponseWithResponsesForStudent(id: string,
1122
1122
  updatedAt: Date;
1123
1123
  name: string;
1124
1124
  classId: string;
1125
- sourceUrl: string | null;
1126
1125
  runJobId: string | null;
1126
+ sourceUrl: string | null;
1127
1127
  };
1128
1128
  responses: {
1129
1129
  status: import(".prisma/client").$Enums.JobStatus | null;
@@ -1131,14 +1131,14 @@ export declare function findWorksheetResponseWithResponsesForStudent(id: string,
1131
1131
  createdAt: Date;
1132
1132
  updatedAt: Date | null;
1133
1133
  feedback: string | null;
1134
- studentId: string;
1135
1134
  runJobId: string | null;
1136
- points: number;
1137
1135
  response: string;
1138
1136
  isCorrect: boolean;
1139
1137
  markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
1140
- studentWorksheetResponseId: string | null;
1138
+ points: number;
1139
+ studentId: string;
1141
1140
  questionId: string;
1141
+ studentWorksheetResponseId: string | null;
1142
1142
  }[];
1143
1143
  } & {
1144
1144
  id: string;
@@ -1146,9 +1146,9 @@ export declare function findWorksheetResponseWithResponsesForStudent(id: string,
1146
1146
  updatedAt: Date;
1147
1147
  submissionId: string | null;
1148
1148
  studentId: string;
1149
+ worksheetId: string;
1149
1150
  submittedAt: Date | null;
1150
1151
  submitted: boolean;
1151
- worksheetId: string;
1152
1152
  }) | null>;
1153
1153
  /** @returns Worksheet response with scoped responses if requester is a class teacher. */
1154
1154
  export declare function findWorksheetResponseWithResponsesForTeacher(id: string, userId: string, questionId?: string): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<import(".prisma/client").Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
@@ -1183,8 +1183,8 @@ export declare function findWorksheetResponseWithResponsesForTeacher(id: string,
1183
1183
  updatedAt: Date;
1184
1184
  name: string;
1185
1185
  classId: string;
1186
- sourceUrl: string | null;
1187
1186
  runJobId: string | null;
1187
+ sourceUrl: string | null;
1188
1188
  };
1189
1189
  responses: {
1190
1190
  status: import(".prisma/client").$Enums.JobStatus | null;
@@ -1192,14 +1192,14 @@ export declare function findWorksheetResponseWithResponsesForTeacher(id: string,
1192
1192
  createdAt: Date;
1193
1193
  updatedAt: Date | null;
1194
1194
  feedback: string | null;
1195
- studentId: string;
1196
1195
  runJobId: string | null;
1197
- points: number;
1198
1196
  response: string;
1199
1197
  isCorrect: boolean;
1200
1198
  markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
1201
- studentWorksheetResponseId: string | null;
1199
+ points: number;
1200
+ studentId: string;
1202
1201
  questionId: string;
1202
+ studentWorksheetResponseId: string | null;
1203
1203
  }[];
1204
1204
  } & {
1205
1205
  id: string;
@@ -1207,9 +1207,9 @@ export declare function findWorksheetResponseWithResponsesForTeacher(id: string,
1207
1207
  updatedAt: Date;
1208
1208
  submissionId: string | null;
1209
1209
  studentId: string;
1210
+ worksheetId: string;
1210
1211
  submittedAt: Date | null;
1211
1212
  submitted: boolean;
1212
- worksheetId: string;
1213
1213
  }) | null>;
1214
1214
  /** @returns Worksheet question by ID. */
1215
1215
  export declare function findWorksheetQuestionById(id: string): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<import(".prisma/client").Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
@@ -1243,11 +1243,11 @@ export declare function findWorksheetQuestionById(id: string): import("@prisma/c
1243
1243
  id: string;
1244
1244
  createdAt: Date;
1245
1245
  updatedAt: Date;
1246
- order: number | null;
1247
- worksheetId: string;
1246
+ points: number;
1248
1247
  question: string;
1248
+ worksheetId: string;
1249
+ order: number | null;
1249
1250
  answer: string;
1250
- points: number;
1251
1251
  } | null>;
1252
1252
  /** @returns Student question progress if requester is a class teacher. */
1253
1253
  export declare function findStudentQuestionProgressByIdForTeacher(id: string, userId: string): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<import(".prisma/client").Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
@@ -1281,9 +1281,9 @@ export declare function findStudentQuestionProgressByIdForTeacher(id: string, us
1281
1281
  updatedAt: Date;
1282
1282
  submissionId: string | null;
1283
1283
  studentId: string;
1284
+ worksheetId: string;
1284
1285
  submittedAt: Date | null;
1285
1286
  submitted: boolean;
1286
- worksheetId: string;
1287
1287
  } | null;
1288
1288
  question: {
1289
1289
  type: import(".prisma/client").$Enums.WorksheetQuestionType;
@@ -1292,11 +1292,11 @@ export declare function findStudentQuestionProgressByIdForTeacher(id: string, us
1292
1292
  id: string;
1293
1293
  createdAt: Date;
1294
1294
  updatedAt: Date;
1295
- order: number | null;
1296
- worksheetId: string;
1295
+ points: number;
1297
1296
  question: string;
1297
+ worksheetId: string;
1298
+ order: number | null;
1298
1299
  answer: string;
1299
- points: number;
1300
1300
  };
1301
1301
  } & {
1302
1302
  status: import(".prisma/client").$Enums.JobStatus | null;
@@ -1304,14 +1304,14 @@ export declare function findStudentQuestionProgressByIdForTeacher(id: string, us
1304
1304
  createdAt: Date;
1305
1305
  updatedAt: Date | null;
1306
1306
  feedback: string | null;
1307
- studentId: string;
1308
1307
  runJobId: string | null;
1309
- points: number;
1310
1308
  response: string;
1311
1309
  isCorrect: boolean;
1312
1310
  markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
1313
- studentWorksheetResponseId: string | null;
1311
+ points: number;
1312
+ studentId: string;
1314
1313
  questionId: string;
1314
+ studentWorksheetResponseId: string | null;
1315
1315
  }) | null>;
1316
1316
  /** @returns Student question progress by id and worksheet response if requester is a class teacher. */
1317
1317
  export declare function findStudentQuestionProgressByIdForTeacherAndResponse(id: string, studentWorksheetResponseId: string, userId: string): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<import(".prisma/client").Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
@@ -1345,9 +1345,9 @@ export declare function findStudentQuestionProgressByIdForTeacherAndResponse(id:
1345
1345
  updatedAt: Date;
1346
1346
  submissionId: string | null;
1347
1347
  studentId: string;
1348
+ worksheetId: string;
1348
1349
  submittedAt: Date | null;
1349
1350
  submitted: boolean;
1350
- worksheetId: string;
1351
1351
  } | null;
1352
1352
  question: {
1353
1353
  type: import(".prisma/client").$Enums.WorksheetQuestionType;
@@ -1356,11 +1356,11 @@ export declare function findStudentQuestionProgressByIdForTeacherAndResponse(id:
1356
1356
  id: string;
1357
1357
  createdAt: Date;
1358
1358
  updatedAt: Date;
1359
- order: number | null;
1360
- worksheetId: string;
1359
+ points: number;
1361
1360
  question: string;
1361
+ worksheetId: string;
1362
+ order: number | null;
1362
1363
  answer: string;
1363
- points: number;
1364
1364
  };
1365
1365
  } & {
1366
1366
  status: import(".prisma/client").$Enums.JobStatus | null;
@@ -1368,14 +1368,14 @@ export declare function findStudentQuestionProgressByIdForTeacherAndResponse(id:
1368
1368
  createdAt: Date;
1369
1369
  updatedAt: Date | null;
1370
1370
  feedback: string | null;
1371
- studentId: string;
1372
1371
  runJobId: string | null;
1373
- points: number;
1374
1372
  response: string;
1375
1373
  isCorrect: boolean;
1376
1374
  markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
1377
- studentWorksheetResponseId: string | null;
1375
+ points: number;
1376
+ studentId: string;
1378
1377
  questionId: string;
1378
+ studentWorksheetResponseId: string | null;
1379
1379
  }) | null>;
1380
1380
  /**
1381
1381
  * @returns Student question progress if requester is the answering student (class member) or a
@@ -1412,9 +1412,9 @@ export declare function findStudentQuestionProgressByIdForStudentOrTeacher(id: s
1412
1412
  updatedAt: Date;
1413
1413
  submissionId: string | null;
1414
1414
  studentId: string;
1415
+ worksheetId: string;
1415
1416
  submittedAt: Date | null;
1416
1417
  submitted: boolean;
1417
- worksheetId: string;
1418
1418
  } | null;
1419
1419
  question: {
1420
1420
  type: import(".prisma/client").$Enums.WorksheetQuestionType;
@@ -1423,11 +1423,11 @@ export declare function findStudentQuestionProgressByIdForStudentOrTeacher(id: s
1423
1423
  id: string;
1424
1424
  createdAt: Date;
1425
1425
  updatedAt: Date;
1426
- order: number | null;
1427
- worksheetId: string;
1426
+ points: number;
1428
1427
  question: string;
1428
+ worksheetId: string;
1429
+ order: number | null;
1429
1430
  answer: string;
1430
- points: number;
1431
1431
  };
1432
1432
  } & {
1433
1433
  status: import(".prisma/client").$Enums.JobStatus | null;
@@ -1435,14 +1435,14 @@ export declare function findStudentQuestionProgressByIdForStudentOrTeacher(id: s
1435
1435
  createdAt: Date;
1436
1436
  updatedAt: Date | null;
1437
1437
  feedback: string | null;
1438
- studentId: string;
1439
1438
  runJobId: string | null;
1440
- points: number;
1441
1439
  response: string;
1442
1440
  isCorrect: boolean;
1443
1441
  markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
1444
- studentWorksheetResponseId: string | null;
1442
+ points: number;
1443
+ studentId: string;
1445
1444
  questionId: string;
1445
+ studentWorksheetResponseId: string | null;
1446
1446
  }) | null>;
1447
1447
  /** Update student's question progress. */
1448
1448
  export declare function updateStudentQuestionProgress(id: string, data: {
@@ -1480,14 +1480,14 @@ export declare function updateStudentQuestionProgress(id: string, data: {
1480
1480
  createdAt: Date;
1481
1481
  updatedAt: Date | null;
1482
1482
  feedback: string | null;
1483
- studentId: string;
1484
1483
  runJobId: string | null;
1485
- points: number;
1486
1484
  response: string;
1487
1485
  isCorrect: boolean;
1488
1486
  markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
1489
- studentWorksheetResponseId: string | null;
1487
+ points: number;
1488
+ studentId: string;
1490
1489
  questionId: string;
1490
+ studentWorksheetResponseId: string | null;
1491
1491
  }>;
1492
1492
  /** Create student question progress. */
1493
1493
  export declare function createStudentQuestionProgress(data: {
@@ -1527,14 +1527,14 @@ export declare function createStudentQuestionProgress(data: {
1527
1527
  createdAt: Date;
1528
1528
  updatedAt: Date | null;
1529
1529
  feedback: string | null;
1530
- studentId: string;
1531
1530
  runJobId: string | null;
1532
- points: number;
1533
1531
  response: string;
1534
1532
  isCorrect: boolean;
1535
1533
  markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
1536
- studentWorksheetResponseId: string | null;
1534
+ points: number;
1535
+ studentId: string;
1537
1536
  questionId: string;
1537
+ studentWorksheetResponseId: string | null;
1538
1538
  }>;
1539
1539
  /** @returns Student's progress for a question. */
1540
1540
  export declare function findStudentQuestionProgress(studentId: string, questionId: string, studentWorksheetResponseId: string): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<import(".prisma/client").Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
@@ -1567,14 +1567,14 @@ export declare function findStudentQuestionProgress(studentId: string, questionI
1567
1567
  createdAt: Date;
1568
1568
  updatedAt: Date | null;
1569
1569
  feedback: string | null;
1570
- studentId: string;
1571
1570
  runJobId: string | null;
1572
- points: number;
1573
1571
  response: string;
1574
1572
  isCorrect: boolean;
1575
1573
  markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
1576
- studentWorksheetResponseId: string | null;
1574
+ points: number;
1575
+ studentId: string;
1577
1576
  questionId: string;
1577
+ studentWorksheetResponseId: string | null;
1578
1578
  } | null>;
1579
1579
  /** Update progress for grading (AI feedback, marks). */
1580
1580
  export declare function updateStudentQuestionProgressForGrading(id: string, data: {
@@ -1613,14 +1613,14 @@ export declare function updateStudentQuestionProgressForGrading(id: string, data
1613
1613
  createdAt: Date;
1614
1614
  updatedAt: Date | null;
1615
1615
  feedback: string | null;
1616
- studentId: string;
1617
1616
  runJobId: string | null;
1618
- points: number;
1619
1617
  response: string;
1620
1618
  isCorrect: boolean;
1621
1619
  markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
1622
- studentWorksheetResponseId: string | null;
1620
+ points: number;
1621
+ studentId: string;
1623
1622
  questionId: string;
1623
+ studentWorksheetResponseId: string | null;
1624
1624
  }>;
1625
1625
  /** Create progress record for grading pipeline. */
1626
1626
  export declare function createStudentQuestionProgressForGrading(data: {
@@ -1662,14 +1662,14 @@ export declare function createStudentQuestionProgressForGrading(data: {
1662
1662
  createdAt: Date;
1663
1663
  updatedAt: Date | null;
1664
1664
  feedback: string | null;
1665
- studentId: string;
1666
1665
  runJobId: string | null;
1667
- points: number;
1668
1666
  response: string;
1669
1667
  isCorrect: boolean;
1670
1668
  markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
1671
- studentWorksheetResponseId: string | null;
1669
+ points: number;
1670
+ studentId: string;
1672
1671
  questionId: string;
1672
+ studentWorksheetResponseId: string | null;
1673
1673
  }>;
1674
1674
  /** Create a comment on a worksheet response. */
1675
1675
  export declare function createComment(data: {
@@ -1706,8 +1706,8 @@ export declare function createComment(data: {
1706
1706
  content: string;
1707
1707
  assignmentId: string | null;
1708
1708
  submissionId: string | null;
1709
- modifiedAt: Date | null;
1710
1709
  announcementId: string | null;
1710
+ modifiedAt: Date | null;
1711
1711
  authorId: string;
1712
1712
  isPinned: boolean;
1713
1713
  parentCommentId: string | null;