@studious-lms/server 1.4.0 → 1.4.2

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 (166) hide show
  1. package/.env.example +6 -0
  2. package/.env.test.example +2 -0
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +36 -50
  5. package/dist/index.js.map +1 -1
  6. package/dist/lib/config/cors.d.ts +16 -0
  7. package/dist/lib/config/cors.d.ts.map +1 -0
  8. package/dist/lib/config/cors.js +75 -0
  9. package/dist/lib/config/cors.js.map +1 -0
  10. package/dist/lib/config/env.d.ts +14 -0
  11. package/dist/lib/config/env.d.ts.map +1 -1
  12. package/dist/lib/config/env.js +9 -2
  13. package/dist/lib/config/env.js.map +1 -1
  14. package/dist/lib/prisma.d.ts +14 -2
  15. package/dist/lib/prisma.d.ts.map +1 -1
  16. package/dist/lib/prisma.js +27 -8
  17. package/dist/lib/prisma.js.map +1 -1
  18. package/dist/middleware/security.d.ts.map +1 -1
  19. package/dist/middleware/security.js +3 -3
  20. package/dist/middleware/security.js.map +1 -1
  21. package/dist/models/agenda.d.ts +16 -16
  22. package/dist/models/announcement.d.ts +59 -23
  23. package/dist/models/announcement.d.ts.map +1 -1
  24. package/dist/models/assignment.d.ts +363 -276
  25. package/dist/models/assignment.d.ts.map +1 -1
  26. package/dist/models/attendance.d.ts +63 -21
  27. package/dist/models/attendance.d.ts.map +1 -1
  28. package/dist/models/auth.d.ts +102 -18
  29. package/dist/models/auth.d.ts.map +1 -1
  30. package/dist/models/class.d.ts +112 -64
  31. package/dist/models/class.d.ts.map +1 -1
  32. package/dist/models/comment.d.ts +52 -16
  33. package/dist/models/comment.d.ts.map +1 -1
  34. package/dist/models/conversation.d.ts +46 -16
  35. package/dist/models/conversation.d.ts.map +1 -1
  36. package/dist/models/event.d.ts +107 -53
  37. package/dist/models/event.d.ts.map +1 -1
  38. package/dist/models/file.d.ts +213 -165
  39. package/dist/models/file.d.ts.map +1 -1
  40. package/dist/models/folder.d.ts +161 -77
  41. package/dist/models/folder.d.ts.map +1 -1
  42. package/dist/models/labChat.d.ts +73 -31
  43. package/dist/models/labChat.d.ts.map +1 -1
  44. package/dist/models/marketing.d.ts +25 -7
  45. package/dist/models/marketing.d.ts.map +1 -1
  46. package/dist/models/message.d.ts +31 -13
  47. package/dist/models/message.d.ts.map +1 -1
  48. package/dist/models/newtonChat.d.ts +34 -10
  49. package/dist/models/newtonChat.d.ts.map +1 -1
  50. package/dist/models/notification.d.ts +25 -7
  51. package/dist/models/notification.d.ts.map +1 -1
  52. package/dist/models/section.d.ts +71 -23
  53. package/dist/models/section.d.ts.map +1 -1
  54. package/dist/models/user.d.ts +27 -9
  55. package/dist/models/user.d.ts.map +1 -1
  56. package/dist/models/worksheet.d.ts +237 -108
  57. package/dist/models/worksheet.d.ts.map +1 -1
  58. package/dist/pipelines/aiLabChat.d.ts +30 -6
  59. package/dist/pipelines/aiLabChat.d.ts.map +1 -1
  60. package/dist/pipelines/aiLabChat.js +157 -234
  61. package/dist/pipelines/aiLabChat.js.map +1 -1
  62. package/dist/pipelines/aiLabChatContract.d.ts +413 -0
  63. package/dist/pipelines/aiLabChatContract.d.ts.map +1 -0
  64. package/dist/pipelines/aiLabChatContract.js +74 -0
  65. package/dist/pipelines/aiLabChatContract.js.map +1 -0
  66. package/dist/pipelines/gradeWorksheet.d.ts +8 -8
  67. package/dist/pipelines/gradeWorksheet.js +4 -4
  68. package/dist/pipelines/gradeWorksheet.js.map +1 -1
  69. package/dist/pipelines/labChatPrompt.d.ts +29 -0
  70. package/dist/pipelines/labChatPrompt.d.ts.map +1 -0
  71. package/dist/pipelines/labChatPrompt.js +146 -0
  72. package/dist/pipelines/labChatPrompt.js.map +1 -0
  73. package/dist/routers/_app.d.ts +1622 -1260
  74. package/dist/routers/_app.d.ts.map +1 -1
  75. package/dist/routers/_app.js +4 -2
  76. package/dist/routers/_app.js.map +1 -1
  77. package/dist/routers/agenda.d.ts +16 -16
  78. package/dist/routers/announcement.d.ts +19 -19
  79. package/dist/routers/assignment.d.ts +307 -291
  80. package/dist/routers/assignment.d.ts.map +1 -1
  81. package/dist/routers/assignment.js +3 -2
  82. package/dist/routers/assignment.js.map +1 -1
  83. package/dist/routers/attendance.d.ts +7 -7
  84. package/dist/routers/auth.d.ts +1 -1
  85. package/dist/routers/class.d.ts +77 -71
  86. package/dist/routers/class.d.ts.map +1 -1
  87. package/dist/routers/comment.d.ts +6 -6
  88. package/dist/routers/conversation.d.ts +11 -11
  89. package/dist/routers/event.d.ts +35 -35
  90. package/dist/routers/file.d.ts +12 -12
  91. package/dist/routers/folder.d.ts +54 -54
  92. package/dist/routers/labChat.d.ts +12 -12
  93. package/dist/routers/marketing.d.ts +2 -2
  94. package/dist/routers/message.d.ts +2 -2
  95. package/dist/routers/newtonChat.d.ts +1 -1
  96. package/dist/routers/notifications.d.ts +4 -4
  97. package/dist/routers/section.d.ts +7 -7
  98. package/dist/routers/studentProgress.d.ts +161 -0
  99. package/dist/routers/studentProgress.d.ts.map +1 -0
  100. package/dist/routers/studentProgress.js +43 -0
  101. package/dist/routers/studentProgress.js.map +1 -0
  102. package/dist/routers/user.d.ts +1 -1
  103. package/dist/routers/worksheet.d.ts +58 -58
  104. package/dist/seedDatabase.d.ts +1 -1
  105. package/dist/services/agenda.d.ts +16 -16
  106. package/dist/services/announcement.d.ts +8 -8
  107. package/dist/services/assignment.d.ts +299 -283
  108. package/dist/services/assignment.d.ts.map +1 -1
  109. package/dist/services/assignment.js +24 -5
  110. package/dist/services/assignment.js.map +1 -1
  111. package/dist/services/attendance.d.ts +7 -7
  112. package/dist/services/auth.d.ts +1 -1
  113. package/dist/services/class.d.ts +73 -67
  114. package/dist/services/class.d.ts.map +1 -1
  115. package/dist/services/comment.d.ts +6 -6
  116. package/dist/services/conversation.d.ts +11 -11
  117. package/dist/services/event.d.ts +31 -31
  118. package/dist/services/file.d.ts +12 -12
  119. package/dist/services/folder.d.ts +52 -52
  120. package/dist/services/labChat.d.ts +12 -12
  121. package/dist/services/labChat.d.ts.map +1 -1
  122. package/dist/services/labChat.js +31 -15
  123. package/dist/services/labChat.js.map +1 -1
  124. package/dist/services/marketing.d.ts +2 -2
  125. package/dist/services/message.d.ts.map +1 -1
  126. package/dist/services/message.js +90 -48
  127. package/dist/services/message.js.map +1 -1
  128. package/dist/services/notification.d.ts +4 -4
  129. package/dist/services/section.d.ts +6 -6
  130. package/dist/services/studentProgress.d.ts +120 -0
  131. package/dist/services/studentProgress.d.ts.map +1 -0
  132. package/dist/services/studentProgress.js +481 -0
  133. package/dist/services/studentProgress.js.map +1 -0
  134. package/dist/services/worksheet.d.ts +49 -49
  135. package/dist/utils/inference.d.ts +0 -11
  136. package/dist/utils/inference.d.ts.map +1 -1
  137. package/dist/utils/inference.js +2 -50
  138. package/dist/utils/inference.js.map +1 -1
  139. package/package.json +2 -2
  140. package/prisma/migrations/20260410124000_add_submission_recommendation_state/migration.sql +14 -0
  141. package/prisma/schema.prisma +14 -0
  142. package/sentry.properties +3 -0
  143. package/src/index.ts +39 -51
  144. package/src/lib/config/cors.ts +96 -0
  145. package/src/lib/config/env.ts +12 -1
  146. package/src/lib/prisma.ts +25 -6
  147. package/src/middleware/security.ts +1 -1
  148. package/src/pipelines/aiLabChat.ts +206 -246
  149. package/src/pipelines/aiLabChatContract.ts +75 -0
  150. package/src/pipelines/gradeWorksheet.ts +2 -2
  151. package/src/pipelines/labChatPrompt.ts +196 -0
  152. package/src/routers/_app.ts +4 -2
  153. package/src/routers/assignment.ts +1 -0
  154. package/src/routers/studentProgress.ts +71 -0
  155. package/src/services/assignment.ts +30 -2
  156. package/src/services/labChat.ts +31 -22
  157. package/src/services/message.ts +97 -48
  158. package/src/services/studentProgress.ts +691 -0
  159. package/src/utils/inference.ts +0 -61
  160. package/tests/lib/aiLabChatContract.test.ts +32 -0
  161. package/tests/lib/cors.test.ts +103 -0
  162. package/tests/pipelines/aiLabChat.test.ts +75 -0
  163. package/tests/routers/studentProgress.test.ts +254 -0
  164. package/tests/utils/aiLabChatPrompt.test.ts +126 -0
  165. package/tests/utils/studentProgress.test.ts +361 -0
  166. package/vitest.unit.config.ts +8 -1
@@ -30,9 +30,9 @@ export declare function findTeacherClasses(userId: string): import(".prisma/clie
30
30
  } | null;
31
31
  }[];
32
32
  } & {
33
+ name: string;
33
34
  id: string;
34
35
  schoolId: string | null;
35
- name: string;
36
36
  subject: string;
37
37
  color: string | null;
38
38
  section: string;
@@ -65,9 +65,9 @@ export declare function findStudentClasses(userId: string): import(".prisma/clie
65
65
  } | null;
66
66
  }[];
67
67
  } & {
68
+ name: string;
68
69
  id: string;
69
70
  schoolId: string | null;
70
- name: string;
71
71
  subject: string;
72
72
  color: string | null;
73
73
  section: string;
@@ -75,14 +75,20 @@ export declare function findStudentClasses(userId: string): import(".prisma/clie
75
75
  })[]>;
76
76
  /** @returns Class if user is a teacher. */
77
77
  export declare function isTeacherInClass(classId: string, userId: string): import(".prisma/client").Prisma.Prisma__ClassClient<{
78
+ name: string;
78
79
  id: string;
79
80
  schoolId: string | null;
80
- name: string;
81
81
  subject: string;
82
82
  color: string | null;
83
83
  section: string;
84
84
  syllabus: string | null;
85
- } | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;
85
+ } | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
86
+ datasources: {
87
+ db: {
88
+ url: string;
89
+ };
90
+ };
91
+ }>;
86
92
  /** @returns Class with assignments. Students see only assigned; teachers see all. */
87
93
  export declare function findClassWithAssignments(classId: string, options: {
88
94
  isTeacher: boolean;
@@ -101,16 +107,16 @@ export declare function findClassWithAssignments(classId: string, options: {
101
107
  submitted: boolean | null;
102
108
  returned: boolean | null;
103
109
  }[];
104
- createdAt: Date | null;
105
110
  section: {
106
- id: string;
107
111
  name: string;
112
+ id: string;
108
113
  } | null;
114
+ createdAt: Date | null;
109
115
  title: string;
110
- dueDate: Date;
111
- maxGrade: number | null;
112
116
  instructions: string;
117
+ dueDate: Date;
113
118
  graded: boolean;
119
+ maxGrade: number | null;
114
120
  weight: number;
115
121
  inProgress: boolean;
116
122
  order: number | null;
@@ -126,8 +132,8 @@ export declare function findClassWithAssignments(classId: string, options: {
126
132
  announcements: {
127
133
  id: string;
128
134
  createdAt: Date;
129
- remarks: string;
130
135
  modifiedAt: Date | null;
136
+ remarks: string;
131
137
  teacher: {
132
138
  id: string;
133
139
  username: string;
@@ -157,37 +163,55 @@ export declare function findClassWithAssignments(classId: string, options: {
157
163
  } | null;
158
164
  }[];
159
165
  } & {
166
+ name: string;
160
167
  id: string;
161
168
  schoolId: string | null;
162
- name: string;
163
169
  subject: string;
164
170
  color: string | null;
165
171
  section: string;
166
172
  syllabus: string | null;
167
- }) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;
173
+ }) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
174
+ datasources: {
175
+ db: {
176
+ url: string;
177
+ };
178
+ };
179
+ }>;
168
180
  /** @returns Class by ID (minimal). */
169
181
  export declare function findClassByIdBasic(classId: string): import(".prisma/client").Prisma.Prisma__ClassClient<{
182
+ name: string;
170
183
  id: string;
171
184
  schoolId: string | null;
172
- name: string;
173
185
  subject: string;
174
186
  color: string | null;
175
187
  section: string;
176
188
  syllabus: string | null;
177
- } | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;
189
+ } | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
190
+ datasources: {
191
+ db: {
192
+ url: string;
193
+ };
194
+ };
195
+ }>;
178
196
  /** @returns Sections for a class. */
179
197
  export declare function findSectionsByClassId(classId: string): import(".prisma/client").Prisma.PrismaPromise<{
180
- id: string;
181
- classId: string;
182
198
  name: string;
199
+ id: string;
183
200
  color: string | null;
201
+ classId: string;
184
202
  order: number | null;
185
203
  }[]>;
186
204
  /** @returns User by ID (id, username only). */
187
205
  export declare function findUserById(userId: string): import(".prisma/client").Prisma.Prisma__UserClient<{
188
206
  id: string;
189
207
  username: string;
190
- } | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;
208
+ } | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
209
+ datasources: {
210
+ db: {
211
+ url: string;
212
+ };
213
+ };
214
+ }>;
191
215
  /** @returns Session by class invite code. */
192
216
  export declare function findSessionByClassCode(classCode: string): import(".prisma/client").Prisma.Prisma__SessionClient<{
193
217
  id: string;
@@ -195,7 +219,13 @@ export declare function findSessionByClassCode(classCode: string): import(".pris
195
219
  createdAt: Date | null;
196
220
  expiresAt: Date | null;
197
221
  classId: string | null;
198
- } | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;
222
+ } | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
223
+ datasources: {
224
+ db: {
225
+ url: string;
226
+ };
227
+ };
228
+ }>;
199
229
  /** @returns Session for a class. */
200
230
  export declare function findSessionByClassId(classId: string): import(".prisma/client").Prisma.Prisma__SessionClient<{
201
231
  id: string;
@@ -203,7 +233,13 @@ export declare function findSessionByClassId(classId: string): import(".prisma/c
203
233
  createdAt: Date | null;
204
234
  expiresAt: Date | null;
205
235
  classId: string | null;
206
- } | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;
236
+ } | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
237
+ datasources: {
238
+ db: {
239
+ url: string;
240
+ };
241
+ };
242
+ }>;
207
243
  /** @returns User's graded submissions for grade calculation. */
208
244
  export declare function findSubmissionsForGrades(userId: string, classId: string): import(".prisma/client").Prisma.PrismaPromise<({
209
245
  assignment: {
@@ -223,12 +259,15 @@ export declare function findSubmissionsForGrades(userId: string, classId: string
223
259
  };
224
260
  } & {
225
261
  id: string;
226
- createdAt: Date;
227
262
  assignmentId: string;
263
+ createdAt: Date;
228
264
  modifiedAt: Date;
229
265
  studentId: string;
230
266
  extendedResponse: string | null;
231
267
  gradeReceived: number | null;
268
+ recommendationState: import(".prisma/client").$Enums.SubmissionRecommendationState;
269
+ recommendationUpdatedAt: Date | null;
270
+ targetedAssignmentId: string | null;
232
271
  rubricState: string | null;
233
272
  teacherComments: string | null;
234
273
  submittedAt: Date | null;
@@ -256,19 +295,23 @@ export declare function findGradingBoundariesByClassId(classId: string): import(
256
295
  /** @returns Class syllabus. */
257
296
  export declare function findClassSyllabus(classId: string): import(".prisma/client").Prisma.Prisma__ClassClient<{
258
297
  syllabus: string | null;
259
- } | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;
298
+ } | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
299
+ datasources: {
300
+ db: {
301
+ url: string;
302
+ };
303
+ };
304
+ }>;
260
305
  /** @returns In-progress lab drafts for a teacher. */
261
306
  export declare function findLabDraftsByClass(classId: string, teacherId: string): import(".prisma/client").Prisma.PrismaPromise<{
262
307
  type: import(".prisma/client").$Enums.AssignmentType;
263
308
  id: string;
264
309
  createdAt: Date | null;
310
+ modifiedAt: Date | null;
265
311
  classId: string;
266
312
  title: string;
267
- dueDate: Date;
268
- maxGrade: number | null;
269
- eventId: string | null;
270
313
  instructions: string;
271
- modifiedAt: Date | null;
314
+ dueDate: Date;
272
315
  teacherId: string;
273
316
  acceptFiles: boolean;
274
317
  acceptExtendedResponse: boolean;
@@ -277,9 +320,11 @@ export declare function findLabDraftsByClass(classId: string, teacherId: string)
277
320
  aiPolicyLevel: number;
278
321
  sectionId: string | null;
279
322
  graded: boolean;
323
+ maxGrade: number | null;
280
324
  weight: number;
281
325
  inProgress: boolean;
282
326
  template: boolean;
327
+ eventId: string | null;
283
328
  markSchemeId: string | null;
284
329
  order: number | null;
285
330
  gradingBoundaryId: string | null;
@@ -287,44 +332,47 @@ export declare function findLabDraftsByClass(classId: string, teacherId: string)
287
332
  /** @returns Assignments with attachments and submissions. */
288
333
  export declare function findAssignmentsWithFiles(classId: string): import(".prisma/client").Prisma.PrismaPromise<({
289
334
  submissions: ({
290
- attachments: {
335
+ annotations: {
291
336
  path: string;
292
337
  type: string;
293
- user: {
294
- id: string;
295
- username: string;
296
- } | null;
297
- id: string;
298
338
  name: string;
339
+ id: string;
299
340
  size: number | null;
300
341
  uploadedAt: Date | null;
301
342
  thumbnailId: string | null;
302
- }[];
303
- student: {
304
- id: string;
305
- username: string;
306
- };
307
- annotations: {
308
- path: string;
309
- type: string;
310
343
  user: {
311
344
  id: string;
312
345
  username: string;
313
346
  } | null;
314
- id: string;
347
+ }[];
348
+ attachments: {
349
+ path: string;
350
+ type: string;
315
351
  name: string;
352
+ id: string;
316
353
  size: number | null;
317
354
  uploadedAt: Date | null;
318
355
  thumbnailId: string | null;
356
+ user: {
357
+ id: string;
358
+ username: string;
359
+ } | null;
319
360
  }[];
361
+ student: {
362
+ id: string;
363
+ username: string;
364
+ };
320
365
  } & {
321
366
  id: string;
322
- createdAt: Date;
323
367
  assignmentId: string;
368
+ createdAt: Date;
324
369
  modifiedAt: Date;
325
370
  studentId: string;
326
371
  extendedResponse: string | null;
327
372
  gradeReceived: number | null;
373
+ recommendationState: import(".prisma/client").$Enums.SubmissionRecommendationState;
374
+ recommendationUpdatedAt: Date | null;
375
+ targetedAssignmentId: string | null;
328
376
  rubricState: string | null;
329
377
  teacherComments: string | null;
330
378
  submittedAt: Date | null;
@@ -338,27 +386,25 @@ export declare function findAssignmentsWithFiles(classId: string): import(".pris
338
386
  attachments: {
339
387
  path: string;
340
388
  type: string;
341
- user: {
342
- id: string;
343
- username: string;
344
- } | null;
345
- id: string;
346
389
  name: string;
390
+ id: string;
347
391
  size: number | null;
348
392
  uploadedAt: Date | null;
349
393
  thumbnailId: string | null;
394
+ user: {
395
+ id: string;
396
+ username: string;
397
+ } | null;
350
398
  }[];
351
399
  } & {
352
400
  type: import(".prisma/client").$Enums.AssignmentType;
353
401
  id: string;
354
402
  createdAt: Date | null;
403
+ modifiedAt: Date | null;
355
404
  classId: string;
356
405
  title: string;
357
- dueDate: Date;
358
- maxGrade: number | null;
359
- eventId: string | null;
360
406
  instructions: string;
361
- modifiedAt: Date | null;
407
+ dueDate: Date;
362
408
  teacherId: string;
363
409
  acceptFiles: boolean;
364
410
  acceptExtendedResponse: boolean;
@@ -367,9 +413,11 @@ export declare function findAssignmentsWithFiles(classId: string): import(".pris
367
413
  aiPolicyLevel: number;
368
414
  sectionId: string | null;
369
415
  graded: boolean;
416
+ maxGrade: number | null;
370
417
  weight: number;
371
418
  inProgress: boolean;
372
419
  template: boolean;
420
+ eventId: string | null;
373
421
  markSchemeId: string | null;
374
422
  order: number | null;
375
423
  gradingBoundaryId: string | null;
@@ -379,20 +427,15 @@ export declare function findFullExportableClass(classId: string): Promise<{
379
427
  assignments: {
380
428
  type: import(".prisma/client").$Enums.AssignmentType;
381
429
  id: string;
382
- createdAt: Date | null;
383
- classId: string;
384
430
  section: {
385
- id: string;
386
431
  name: string;
387
- } | null;
388
- worksheets: {
389
432
  id: string;
390
- }[];
433
+ } | null;
434
+ createdAt: Date | null;
435
+ classId: string;
391
436
  title: string;
392
- dueDate: Date;
393
- maxGrade: number | null;
394
- eventId: string | null;
395
437
  instructions: string;
438
+ dueDate: Date;
396
439
  teacherId: string;
397
440
  acceptFiles: boolean;
398
441
  acceptExtendedResponse: boolean;
@@ -401,8 +444,10 @@ export declare function findFullExportableClass(classId: string): Promise<{
401
444
  aiPolicyLevel: number;
402
445
  sectionId: string | null;
403
446
  graded: boolean;
447
+ maxGrade: number | null;
404
448
  weight: number;
405
449
  inProgress: boolean;
450
+ eventId: string | null;
406
451
  markSchemeId: string | null;
407
452
  order: number | null;
408
453
  gradingBoundaryId: string | null;
@@ -414,27 +459,30 @@ export declare function findFullExportableClass(classId: string): Promise<{
414
459
  id: string;
415
460
  structured: string;
416
461
  } | null;
462
+ worksheets: {
463
+ id: string;
464
+ }[];
417
465
  }[];
418
466
  sections: {
419
- id: string;
420
- classId: string;
421
467
  name: string;
468
+ id: string;
422
469
  color: string | null;
470
+ classId: string;
423
471
  order: number | null;
424
472
  }[];
425
473
  worksheets: {
474
+ name: string;
426
475
  id: string;
427
476
  classId: string;
428
- name: string;
429
477
  questions: {
430
478
  options: import("@prisma/client/runtime/library.js").JsonValue;
431
479
  type: import(".prisma/client").$Enums.WorksheetQuestionType;
432
480
  order: number | null;
433
- markScheme: import("@prisma/client/runtime/library.js").JsonValue;
481
+ points: number;
434
482
  worksheetId: string;
483
+ markScheme: import("@prisma/client/runtime/library.js").JsonValue;
435
484
  question: string;
436
485
  answer: string;
437
- points: number;
438
486
  }[];
439
487
  }[];
440
488
  markSchemes: {
@@ -447,9 +495,9 @@ export declare function findFullExportableClass(classId: string): Promise<{
447
495
  classId: string;
448
496
  structured: string;
449
497
  }[];
498
+ name: string;
450
499
  id: string;
451
500
  schoolId: string | null;
452
- name: string;
453
501
  subject: string;
454
502
  color: string | null;
455
503
  section: string;
@@ -1 +1 @@
1
- {"version":3,"file":"class.d.ts","sourceRoot":"/","sources":["models/class.ts"],"names":[],"mappings":"AACA;;;GAGG;AAEH,OAAO,EAAc,KAAK,EAAE,MAAM,EAAmD,MAAM,gBAAgB,CAAC;AAgD5G,gDAAgD;AAChD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAKhD;AAED,gDAAgD;AAChD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAKhD;AAED,2CAA2C;AAC3C,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;;;;;;;;8HAO/D;AAsHD,qFAAqF;AACrF,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE;IAAE,SAAS,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE;;;;;;;;;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CAAE,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CA6HjK"}
@@ -51,8 +51,8 @@ export declare function findCommentById(id: string): import(".prisma/client").Pr
51
51
  };
52
52
  }[];
53
53
  createdAt: Date;
54
- content: string;
55
54
  modifiedAt: Date | null;
55
+ content: string;
56
56
  author: {
57
57
  id: string;
58
58
  username: string;
@@ -62,7 +62,13 @@ export declare function findCommentById(id: string): import(".prisma/client").Pr
62
62
  profilePictureThumbnail: string | null;
63
63
  } | null;
64
64
  };
65
- } | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;
65
+ } | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
66
+ datasources: {
67
+ db: {
68
+ url: string;
69
+ };
70
+ };
71
+ }>;
66
72
  /** @returns Replies to a comment. */
67
73
  export declare function findRepliesByCommentId(commentId: string): import(".prisma/client").Prisma.PrismaPromise<({
68
74
  author: {
@@ -77,10 +83,10 @@ export declare function findRepliesByCommentId(commentId: string): import(".pris
77
83
  } & {
78
84
  status: import(".prisma/client").$Enums.GenerationStatus | null;
79
85
  id: string;
86
+ announcementId: string | null;
80
87
  createdAt: Date;
81
- content: string;
82
88
  modifiedAt: Date | null;
83
- announcementId: string | null;
89
+ content: string;
84
90
  authorId: string;
85
91
  parentCommentId: string | null;
86
92
  studentQuestionProgressId: string | null;
@@ -93,23 +99,35 @@ export declare function createComment(data: {
93
99
  }): import(".prisma/client").Prisma.Prisma__CommentClient<{
94
100
  status: import(".prisma/client").$Enums.GenerationStatus | null;
95
101
  id: string;
102
+ announcementId: string | null;
96
103
  createdAt: Date;
97
- content: string;
98
104
  modifiedAt: Date | null;
99
- announcementId: string | null;
105
+ content: string;
100
106
  authorId: string;
101
107
  parentCommentId: string | null;
102
108
  studentQuestionProgressId: string | null;
103
- }, never, import("@prisma/client/runtime/library.js").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;
109
+ }, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
110
+ datasources: {
111
+ db: {
112
+ url: string;
113
+ };
114
+ };
115
+ }>;
104
116
  /** @returns User's reaction on a comment. */
105
117
  export declare function findReactionByUserAndComment(userId: string, commentId: string): import(".prisma/client").Prisma.Prisma__ReactionClient<{
106
118
  type: import(".prisma/client").$Enums.ReactionType;
107
119
  id: string;
108
120
  userId: string;
109
- createdAt: Date;
110
121
  announcementId: string | null;
122
+ createdAt: Date;
111
123
  commentId: string | null;
112
- } | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;
124
+ } | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
125
+ datasources: {
126
+ db: {
127
+ url: string;
128
+ };
129
+ };
130
+ }>;
113
131
  /** Add or update reaction on a comment. */
114
132
  export declare function upsertReaction(data: {
115
133
  userId: string;
@@ -129,19 +147,31 @@ export declare function upsertReaction(data: {
129
147
  type: import(".prisma/client").$Enums.ReactionType;
130
148
  id: string;
131
149
  userId: string;
132
- createdAt: Date;
133
150
  announcementId: string | null;
151
+ createdAt: Date;
134
152
  commentId: string | null;
135
- }, never, import("@prisma/client/runtime/library.js").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;
153
+ }, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
154
+ datasources: {
155
+ db: {
156
+ url: string;
157
+ };
158
+ };
159
+ }>;
136
160
  /** Delete a reaction. */
137
161
  export declare function deleteReactionById(id: string): import(".prisma/client").Prisma.Prisma__ReactionClient<{
138
162
  type: import(".prisma/client").$Enums.ReactionType;
139
163
  id: string;
140
164
  userId: string;
141
- createdAt: Date;
142
165
  announcementId: string | null;
166
+ createdAt: Date;
143
167
  commentId: string | null;
144
- }, never, import("@prisma/client/runtime/library.js").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;
168
+ }, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
169
+ datasources: {
170
+ db: {
171
+ url: string;
172
+ };
173
+ };
174
+ }>;
145
175
  /** @returns Comment with announcement classId. */
146
176
  export declare function findCommentWithAnnouncement(commentId: string): import(".prisma/client").Prisma.Prisma__CommentClient<({
147
177
  announcement: {
@@ -150,14 +180,20 @@ export declare function findCommentWithAnnouncement(commentId: string): import("
150
180
  } & {
151
181
  status: import(".prisma/client").$Enums.GenerationStatus | null;
152
182
  id: string;
183
+ announcementId: string | null;
153
184
  createdAt: Date;
154
- content: string;
155
185
  modifiedAt: Date | null;
156
- announcementId: string | null;
186
+ content: string;
157
187
  authorId: string;
158
188
  parentCommentId: string | null;
159
189
  studentQuestionProgressId: string | null;
160
- }) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;
190
+ }) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
191
+ datasources: {
192
+ db: {
193
+ url: string;
194
+ };
195
+ };
196
+ }>;
161
197
  /** @returns Reaction counts by type for a comment. */
162
198
  export declare function getReactionCountsByCommentId(commentId: string): import(".prisma/client").Prisma.GetReactionGroupByPayload<{
163
199
  by: "type"[];
@@ -1 +1 @@
1
- {"version":3,"file":"comment.d.ts","sourceRoot":"/","sources":["models/comment.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoChB,CAAC;AAEX,wDAAwD;AACxD,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;8HAKzC;AAED,qCAAqC;AACrC,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;MAmBvD;AAED,gCAAgC;AAChC,wBAAgB,aAAa,CAAC,IAAI,EAAE;IAClC,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB;;;;;;;;;;wHAIA;AAED,6CAA6C;AAC7C,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,MAAM,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