@studious-lms/server 1.2.53 → 1.4.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 (479) hide show
  1. package/.coderabbit.yaml +9 -0
  2. package/.env.example +9 -1
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +102 -8
  5. package/dist/index.js.map +1 -1
  6. package/dist/lib/config/env.d.ts +21 -0
  7. package/dist/lib/config/env.d.ts.map +1 -1
  8. package/dist/lib/config/env.js +8 -2
  9. package/dist/lib/config/env.js.map +1 -1
  10. package/dist/lib/fileUpload.d.ts.map +1 -1
  11. package/dist/lib/fileUpload.js +2 -2
  12. package/dist/lib/fileUpload.js.map +1 -1
  13. package/dist/lib/googleCloudStorage.d.ts +6 -0
  14. package/dist/lib/googleCloudStorage.d.ts.map +1 -1
  15. package/dist/lib/googleCloudStorage.js +19 -2
  16. package/dist/lib/googleCloudStorage.js.map +1 -1
  17. package/dist/lib/pusher.d.ts +4 -1
  18. package/dist/lib/pusher.d.ts.map +1 -1
  19. package/dist/lib/pusher.js +6 -3
  20. package/dist/lib/pusher.js.map +1 -1
  21. package/dist/lib/redis.d.ts +5 -0
  22. package/dist/lib/redis.d.ts.map +1 -0
  23. package/dist/lib/redis.js +53 -0
  24. package/dist/lib/redis.js.map +1 -0
  25. package/dist/lib/thumbnailGenerator.d.ts +0 -21
  26. package/dist/lib/thumbnailGenerator.d.ts.map +1 -1
  27. package/dist/lib/thumbnailGenerator.js +157 -160
  28. package/dist/lib/thumbnailGenerator.js.map +1 -1
  29. package/dist/middleware/auth.d.ts.map +1 -1
  30. package/dist/middleware/auth.js +33 -95
  31. package/dist/middleware/auth.js.map +1 -1
  32. package/dist/models/agenda.d.ts +97 -0
  33. package/dist/models/agenda.d.ts.map +1 -0
  34. package/dist/models/agenda.js +40 -0
  35. package/dist/models/agenda.js.map +1 -0
  36. package/dist/models/announcement.d.ts +223 -0
  37. package/dist/models/announcement.d.ts.map +1 -0
  38. package/dist/models/announcement.js +120 -0
  39. package/dist/models/announcement.js.map +1 -0
  40. package/dist/models/assignment.d.ts +1292 -0
  41. package/dist/models/assignment.d.ts.map +1 -0
  42. package/dist/models/assignment.js +309 -0
  43. package/dist/models/assignment.js.map +1 -0
  44. package/dist/models/attendance.d.ts +180 -0
  45. package/dist/models/attendance.d.ts.map +1 -0
  46. package/dist/models/attendance.js +188 -0
  47. package/dist/models/attendance.js.map +1 -0
  48. package/dist/models/auth.d.ts +153 -0
  49. package/dist/models/auth.d.ts.map +1 -0
  50. package/dist/models/auth.js +217 -0
  51. package/dist/models/auth.js.map +1 -0
  52. package/dist/models/class.d.ts +461 -0
  53. package/dist/models/class.d.ts.map +1 -0
  54. package/dist/models/class.js +645 -0
  55. package/dist/models/class.js.map +1 -0
  56. package/dist/models/comment.d.ts +171 -0
  57. package/dist/models/comment.d.ts.map +1 -0
  58. package/dist/models/comment.js +138 -0
  59. package/dist/models/comment.js.map +1 -0
  60. package/dist/models/conversation.d.ts +164 -0
  61. package/dist/models/conversation.d.ts.map +1 -0
  62. package/dist/models/conversation.js +175 -0
  63. package/dist/models/conversation.js.map +1 -0
  64. package/dist/models/event.d.ts +295 -0
  65. package/dist/models/event.d.ts.map +1 -0
  66. package/dist/models/event.js +145 -0
  67. package/dist/models/event.js.map +1 -0
  68. package/dist/models/file.d.ts +536 -0
  69. package/dist/models/file.d.ts.map +1 -0
  70. package/dist/models/file.js +126 -0
  71. package/dist/models/file.js.map +1 -0
  72. package/dist/models/folder.d.ts +295 -0
  73. package/dist/models/folder.d.ts.map +1 -0
  74. package/dist/models/folder.js +202 -0
  75. package/dist/models/folder.js.map +1 -0
  76. package/dist/models/labChat.d.ts +243 -0
  77. package/dist/models/labChat.d.ts.map +1 -0
  78. package/dist/models/labChat.js +204 -0
  79. package/dist/models/labChat.js.map +1 -0
  80. package/dist/models/marketing.d.ts +72 -0
  81. package/dist/models/marketing.d.ts.map +1 -0
  82. package/dist/models/marketing.js +26 -0
  83. package/dist/models/marketing.js.map +1 -0
  84. package/dist/models/message.d.ts +100 -0
  85. package/dist/models/message.d.ts.map +1 -0
  86. package/dist/models/message.js +131 -0
  87. package/dist/models/message.js.map +1 -0
  88. package/dist/models/newtonChat.d.ts +72 -0
  89. package/dist/models/newtonChat.d.ts.map +1 -0
  90. package/dist/models/newtonChat.js +61 -0
  91. package/dist/models/newtonChat.js.map +1 -0
  92. package/dist/models/notification.d.ts +65 -0
  93. package/dist/models/notification.d.ts.map +1 -0
  94. package/dist/models/notification.js +46 -0
  95. package/dist/models/notification.js.map +1 -0
  96. package/dist/models/section.d.ts +102 -0
  97. package/dist/models/section.d.ts.map +1 -0
  98. package/dist/models/section.js +83 -0
  99. package/dist/models/section.js.map +1 -0
  100. package/dist/models/user.d.ts +39 -0
  101. package/dist/models/user.d.ts.map +1 -0
  102. package/dist/models/user.js +38 -0
  103. package/dist/models/user.js.map +1 -0
  104. package/dist/models/worksheet.d.ts +460 -0
  105. package/dist/models/worksheet.d.ts.map +1 -0
  106. package/dist/models/worksheet.js +200 -0
  107. package/dist/models/worksheet.js.map +1 -0
  108. package/dist/pipelines/aiLabChat.d.ts +76 -0
  109. package/dist/pipelines/aiLabChat.d.ts.map +1 -0
  110. package/dist/pipelines/aiLabChat.js +599 -0
  111. package/dist/pipelines/aiLabChat.js.map +1 -0
  112. package/dist/pipelines/aiNewtonChat.d.ts +30 -0
  113. package/dist/pipelines/aiNewtonChat.d.ts.map +1 -0
  114. package/dist/pipelines/aiNewtonChat.js +289 -0
  115. package/dist/pipelines/aiNewtonChat.js.map +1 -0
  116. package/dist/pipelines/gradeWorksheet.d.ts +30 -0
  117. package/dist/pipelines/gradeWorksheet.d.ts.map +1 -0
  118. package/dist/pipelines/gradeWorksheet.js +252 -0
  119. package/dist/pipelines/gradeWorksheet.js.map +1 -0
  120. package/dist/routers/_app.d.ts +1523 -1315
  121. package/dist/routers/_app.d.ts.map +1 -1
  122. package/dist/routers/agenda.d.ts +22 -22
  123. package/dist/routers/agenda.d.ts.map +1 -1
  124. package/dist/routers/agenda.js +4 -65
  125. package/dist/routers/agenda.js.map +1 -1
  126. package/dist/routers/announcement.d.ts +16 -16
  127. package/dist/routers/announcement.d.ts.map +1 -1
  128. package/dist/routers/announcement.js +37 -446
  129. package/dist/routers/announcement.js.map +1 -1
  130. package/dist/routers/assignment.d.ts +300 -378
  131. package/dist/routers/assignment.d.ts.map +1 -1
  132. package/dist/routers/assignment.js +78 -1868
  133. package/dist/routers/assignment.js.map +1 -1
  134. package/dist/routers/attendance.d.ts +19 -9
  135. package/dist/routers/attendance.d.ts.map +1 -1
  136. package/dist/routers/attendance.js +7 -264
  137. package/dist/routers/attendance.js.map +1 -1
  138. package/dist/routers/auth.d.ts +2 -2
  139. package/dist/routers/auth.d.ts.map +1 -1
  140. package/dist/routers/auth.js +29 -354
  141. package/dist/routers/auth.js.map +1 -1
  142. package/dist/routers/class.d.ts +160 -68
  143. package/dist/routers/class.d.ts.map +1 -1
  144. package/dist/routers/class.js +82 -1052
  145. package/dist/routers/class.js.map +1 -1
  146. package/dist/routers/comment.d.ts +6 -42
  147. package/dist/routers/comment.d.ts.map +1 -1
  148. package/dist/routers/comment.js +24 -244
  149. package/dist/routers/comment.js.map +1 -1
  150. package/dist/routers/conversation.d.ts +45 -7
  151. package/dist/routers/conversation.d.ts.map +1 -1
  152. package/dist/routers/conversation.js +19 -327
  153. package/dist/routers/conversation.js.map +1 -1
  154. package/dist/routers/event.d.ts +36 -36
  155. package/dist/routers/event.d.ts.map +1 -1
  156. package/dist/routers/event.js +13 -433
  157. package/dist/routers/event.js.map +1 -1
  158. package/dist/routers/file.d.ts +2 -2
  159. package/dist/routers/file.d.ts.map +1 -1
  160. package/dist/routers/file.js +9 -323
  161. package/dist/routers/file.js.map +1 -1
  162. package/dist/routers/folder.d.ts +21 -14
  163. package/dist/routers/folder.d.ts.map +1 -1
  164. package/dist/routers/folder.js +34 -745
  165. package/dist/routers/folder.js.map +1 -1
  166. package/dist/routers/labChat.d.ts +21 -11
  167. package/dist/routers/labChat.d.ts.map +1 -1
  168. package/dist/routers/labChat.js +22 -570
  169. package/dist/routers/labChat.js.map +1 -1
  170. package/dist/routers/marketing.d.ts +1 -1
  171. package/dist/routers/marketing.d.ts.map +1 -1
  172. package/dist/routers/marketing.js +7 -56
  173. package/dist/routers/marketing.js.map +1 -1
  174. package/dist/routers/message.d.ts +13 -2
  175. package/dist/routers/message.d.ts.map +1 -1
  176. package/dist/routers/message.js +32 -520
  177. package/dist/routers/message.js.map +1 -1
  178. package/dist/routers/newtonChat.d.ts +1 -1
  179. package/dist/routers/newtonChat.d.ts.map +1 -1
  180. package/dist/routers/newtonChat.js +7 -246
  181. package/dist/routers/newtonChat.js.map +1 -1
  182. package/dist/routers/notifications.d.ts +4 -4
  183. package/dist/routers/notifications.d.ts.map +1 -1
  184. package/dist/routers/notifications.js +18 -83
  185. package/dist/routers/notifications.js.map +1 -1
  186. package/dist/routers/section.d.ts +4 -4
  187. package/dist/routers/section.d.ts.map +1 -1
  188. package/dist/routers/section.js +14 -286
  189. package/dist/routers/section.js.map +1 -1
  190. package/dist/routers/user.d.ts +1 -1
  191. package/dist/routers/user.d.ts.map +1 -1
  192. package/dist/routers/user.js +32 -207
  193. package/dist/routers/user.js.map +1 -1
  194. package/dist/routers/worksheet.d.ts +68 -55
  195. package/dist/routers/worksheet.d.ts.map +1 -1
  196. package/dist/routers/worksheet.js +79 -394
  197. package/dist/routers/worksheet.js.map +1 -1
  198. package/dist/seedDatabase.d.ts +1 -1
  199. package/dist/server/pipelines/gradeWorksheet.d.ts +6 -6
  200. package/dist/server/pipelines/gradeWorksheet.d.ts.map +1 -1
  201. package/dist/server/pipelines/gradeWorksheet.js +12 -5
  202. package/dist/server/pipelines/gradeWorksheet.js.map +1 -1
  203. package/dist/services/agenda.d.ts +100 -0
  204. package/dist/services/agenda.d.ts.map +1 -0
  205. package/dist/services/agenda.js +21 -0
  206. package/dist/services/agenda.js.map +1 -0
  207. package/dist/services/announcement.d.ts +135 -0
  208. package/dist/services/announcement.d.ts.map +1 -0
  209. package/dist/services/announcement.js +223 -0
  210. package/dist/services/announcement.js.map +1 -0
  211. package/dist/services/assignment.d.ts +1462 -0
  212. package/dist/services/assignment.d.ts.map +1 -0
  213. package/dist/services/assignment.js +898 -0
  214. package/dist/services/assignment.js.map +1 -0
  215. package/dist/services/attendance.d.ts +93 -0
  216. package/dist/services/attendance.d.ts.map +1 -0
  217. package/dist/services/attendance.js +61 -0
  218. package/dist/services/attendance.js.map +1 -0
  219. package/dist/services/auth.d.ts +68 -0
  220. package/dist/services/auth.d.ts.map +1 -0
  221. package/dist/services/auth.js +218 -0
  222. package/dist/services/auth.js.map +1 -0
  223. package/dist/services/class.d.ts +643 -0
  224. package/dist/services/class.d.ts.map +1 -0
  225. package/dist/services/class.js +486 -0
  226. package/dist/services/class.js.map +1 -0
  227. package/dist/services/comment.d.ts +100 -0
  228. package/dist/services/comment.d.ts.map +1 -0
  229. package/dist/services/comment.js +83 -0
  230. package/dist/services/comment.js.map +1 -0
  231. package/dist/services/conversation.d.ts +159 -0
  232. package/dist/services/conversation.d.ts.map +1 -0
  233. package/dist/services/conversation.js +138 -0
  234. package/dist/services/conversation.js.map +1 -0
  235. package/dist/services/event.d.ts +216 -0
  236. package/dist/services/event.d.ts.map +1 -0
  237. package/dist/services/event.js +168 -0
  238. package/dist/services/event.js.map +1 -0
  239. package/dist/services/file.d.ts +74 -0
  240. package/dist/services/file.d.ts.map +1 -0
  241. package/dist/services/file.js +133 -0
  242. package/dist/services/file.js.map +1 -0
  243. package/dist/services/folder.d.ts +239 -0
  244. package/dist/services/folder.d.ts.map +1 -0
  245. package/dist/services/folder.js +248 -0
  246. package/dist/services/folder.js.map +1 -0
  247. package/dist/services/labChat.d.ts +169 -0
  248. package/dist/services/labChat.d.ts.map +1 -0
  249. package/dist/services/labChat.js +381 -0
  250. package/dist/services/labChat.js.map +1 -0
  251. package/dist/services/marketing.d.ts +50 -0
  252. package/dist/services/marketing.d.ts.map +1 -0
  253. package/dist/services/marketing.js +32 -0
  254. package/dist/services/marketing.js.map +1 -0
  255. package/dist/services/message.d.ts +103 -0
  256. package/dist/services/message.d.ts.map +1 -0
  257. package/dist/services/message.js +422 -0
  258. package/dist/services/message.js.map +1 -0
  259. package/dist/services/newtonChat.d.ts +22 -0
  260. package/dist/services/newtonChat.d.ts.map +1 -0
  261. package/dist/services/newtonChat.js +174 -0
  262. package/dist/services/newtonChat.js.map +1 -0
  263. package/dist/services/notification.d.ts +65 -0
  264. package/dist/services/notification.d.ts.map +1 -0
  265. package/dist/services/notification.js +33 -0
  266. package/dist/services/notification.js.map +1 -0
  267. package/dist/services/section.d.ts +53 -0
  268. package/dist/services/section.d.ts.map +1 -0
  269. package/dist/services/section.js +199 -0
  270. package/dist/services/section.js.map +1 -0
  271. package/dist/services/user.d.ts +48 -0
  272. package/dist/services/user.d.ts.map +1 -0
  273. package/dist/services/user.js +141 -0
  274. package/dist/services/user.js.map +1 -0
  275. package/dist/services/worksheet.d.ts +239 -0
  276. package/dist/services/worksheet.d.ts.map +1 -0
  277. package/dist/services/worksheet.js +235 -0
  278. package/dist/services/worksheet.js.map +1 -0
  279. package/dist/utils/aiUser.d.ts +1 -3
  280. package/dist/utils/aiUser.d.ts.map +1 -1
  281. package/dist/utils/aiUser.js +6 -5
  282. package/dist/utils/aiUser.js.map +1 -1
  283. package/dist/utils/email.d.ts +3 -0
  284. package/dist/utils/email.d.ts.map +1 -1
  285. package/dist/utils/email.js +7 -4
  286. package/dist/utils/email.js.map +1 -1
  287. package/dist/utils/generateInviteCode.d.ts +1 -2
  288. package/dist/utils/generateInviteCode.d.ts.map +1 -1
  289. package/dist/utils/generateInviteCode.js +3 -4
  290. package/dist/utils/generateInviteCode.js.map +1 -1
  291. package/dist/utils/inference.d.ts +3 -0
  292. package/dist/utils/inference.d.ts.map +1 -1
  293. package/dist/utils/inference.js +7 -4
  294. package/dist/utils/inference.js.map +1 -1
  295. package/dist/utils/logger.d.ts +3 -0
  296. package/dist/utils/logger.d.ts.map +1 -1
  297. package/dist/utils/logger.js +5 -2
  298. package/dist/utils/logger.js.map +1 -1
  299. package/dist/utils/prismaErrorHandler.d.ts.map +1 -1
  300. package/dist/utils/prismaErrorHandler.js +5 -2
  301. package/dist/utils/prismaErrorHandler.js.map +1 -1
  302. package/dist/utils/prismaWrapper.d.ts +1 -0
  303. package/dist/utils/prismaWrapper.d.ts.map +1 -1
  304. package/dist/utils/prismaWrapper.js +6 -2
  305. package/dist/utils/prismaWrapper.js.map +1 -1
  306. package/docker-compose.yml +5 -0
  307. package/package.json +4 -3
  308. package/prisma/schema.prisma +1 -1
  309. package/src/index.ts +119 -12
  310. package/src/lib/config/env.ts +6 -0
  311. package/src/lib/fileUpload.ts +0 -1
  312. package/src/lib/googleCloudStorage.ts +17 -0
  313. package/src/lib/pusher.ts +5 -1
  314. package/src/lib/redis.ts +56 -0
  315. package/src/lib/thumbnailGenerator.ts +170 -168
  316. package/src/middleware/auth.ts +80 -137
  317. package/src/models/agenda.ts +46 -0
  318. package/src/models/announcement.ts +134 -0
  319. package/src/models/assignment.ts +322 -0
  320. package/src/models/attendance.ts +208 -0
  321. package/src/models/auth.ts +247 -0
  322. package/src/models/class.ts +703 -0
  323. package/src/models/comment.ts +152 -0
  324. package/src/models/conversation.ts +200 -0
  325. package/src/models/event.ts +177 -0
  326. package/src/models/file.ts +129 -0
  327. package/src/models/folder.ts +225 -0
  328. package/src/models/labChat.ts +213 -0
  329. package/src/models/marketing.ts +45 -0
  330. package/src/models/message.ts +153 -0
  331. package/src/models/newtonChat.ts +70 -0
  332. package/src/models/notification.ts +54 -0
  333. package/src/models/section.ts +98 -0
  334. package/src/models/user.ts +47 -0
  335. package/src/models/worksheet.ts +294 -0
  336. package/src/pipelines/aiLabChat.ts +684 -0
  337. package/src/{server/pipelines → pipelines}/aiNewtonChat.ts +9 -5
  338. package/src/{server/pipelines → pipelines}/gradeWorksheet.ts +25 -14
  339. package/src/routers/agenda.ts +3 -66
  340. package/src/routers/announcement.ts +54 -495
  341. package/src/routers/assignment.ts +126 -2018
  342. package/src/routers/attendance.ts +15 -276
  343. package/src/routers/auth.ts +79 -442
  344. package/src/routers/class.ts +263 -1187
  345. package/src/routers/comment.ts +61 -288
  346. package/src/routers/conversation.ts +51 -360
  347. package/src/routers/event.ts +50 -481
  348. package/src/routers/file.ts +45 -368
  349. package/src/routers/folder.ts +107 -836
  350. package/src/routers/labChat.ts +35 -604
  351. package/src/routers/marketing.ts +35 -77
  352. package/src/routers/message.ts +54 -567
  353. package/src/routers/newtonChat.ts +17 -278
  354. package/src/routers/notifications.ts +32 -82
  355. package/src/routers/section.ts +46 -330
  356. package/src/routers/user.ts +49 -227
  357. package/src/routers/worksheet.ts +215 -503
  358. package/src/services/agenda.ts +21 -0
  359. package/src/services/announcement.ts +290 -0
  360. package/src/services/assignment.ts +1198 -0
  361. package/src/services/attendance.ts +85 -0
  362. package/src/services/auth.ts +277 -0
  363. package/src/services/class.ts +629 -0
  364. package/src/services/comment.ts +106 -0
  365. package/src/services/conversation.ts +213 -0
  366. package/src/services/event.ts +231 -0
  367. package/src/services/file.ts +167 -0
  368. package/src/services/folder.ts +316 -0
  369. package/src/services/labChat.ts +458 -0
  370. package/src/services/marketing.ts +57 -0
  371. package/src/services/message.ts +554 -0
  372. package/src/services/newtonChat.ts +222 -0
  373. package/src/services/notification.ts +50 -0
  374. package/src/services/section.ts +283 -0
  375. package/src/services/user.ts +172 -0
  376. package/src/services/worksheet.ts +358 -0
  377. package/src/utils/aiUser.ts +4 -3
  378. package/src/utils/email.ts +5 -3
  379. package/src/utils/generateInviteCode.ts +1 -3
  380. package/src/utils/inference.ts +5 -2
  381. package/src/utils/logger.ts +3 -1
  382. package/src/utils/prismaErrorHandler.ts +3 -0
  383. package/src/utils/prismaWrapper.ts +4 -0
  384. package/tests/globalSetup.ts +62 -0
  385. package/tests/helpers.ts +22 -0
  386. package/tests/middleware/security.test.ts +42 -0
  387. package/tests/routers/agenda.test.ts +138 -0
  388. package/tests/routers/announcement.test.ts +490 -0
  389. package/tests/routers/assignment.test.ts +837 -0
  390. package/tests/{attendance.test.ts → routers/attendance.test.ts} +6 -14
  391. package/tests/routers/auth.test.ts +171 -0
  392. package/tests/{class.test.ts → routers/class.test.ts} +131 -85
  393. package/tests/routers/comment.test.ts +126 -0
  394. package/tests/routers/conversation.test.ts +145 -0
  395. package/tests/{event.test.ts → routers/event.test.ts} +93 -32
  396. package/tests/routers/folder.test.ts +178 -0
  397. package/tests/routers/labChat.test.ts +115 -0
  398. package/tests/routers/marketing.test.ts +59 -0
  399. package/tests/routers/message.test.ts +123 -0
  400. package/tests/routers/notification.test.ts +69 -0
  401. package/tests/{section.test.ts → routers/section.test.ts} +5 -13
  402. package/tests/server/rateLimit.test.ts +73 -0
  403. package/tests/setup.ts +18 -92
  404. package/tests/user.test.ts +9 -31
  405. package/tests/utils/aiUser.test.ts +22 -0
  406. package/tests/utils/generateInviteCode.test.ts +24 -0
  407. package/tests/utils/logger.test.ts +74 -0
  408. package/tests/utils/prismaErrorHandler.test.ts +101 -0
  409. package/tests/utils/prismaWrapper.test.ts +82 -0
  410. package/tests/worksheet.test.ts +181 -0
  411. package/vitest.config.ts +6 -3
  412. package/vitest.unit.config.ts +21 -0
  413. package/TODO.md +0 -2
  414. package/coverage/base.css +0 -224
  415. package/coverage/block-navigation.js +0 -87
  416. package/coverage/clover.xml +0 -12110
  417. package/coverage/coverage-final.json +0 -44
  418. package/coverage/favicon.png +0 -0
  419. package/coverage/index.html +0 -221
  420. package/coverage/prettify.css +0 -1
  421. package/coverage/prettify.js +0 -2
  422. package/coverage/server/index.html +0 -116
  423. package/coverage/server/src/exportType.ts.html +0 -109
  424. package/coverage/server/src/index.html +0 -161
  425. package/coverage/server/src/index.ts.html +0 -1702
  426. package/coverage/server/src/instrument.ts.html +0 -130
  427. package/coverage/server/src/lib/config/env.ts.html +0 -448
  428. package/coverage/server/src/lib/config/index.html +0 -116
  429. package/coverage/server/src/lib/fileUpload.ts.html +0 -1138
  430. package/coverage/server/src/lib/googleCloudStorage.ts.html +0 -334
  431. package/coverage/server/src/lib/index.html +0 -206
  432. package/coverage/server/src/lib/jsonConversion.ts.html +0 -2323
  433. package/coverage/server/src/lib/jsonStyles.ts.html +0 -193
  434. package/coverage/server/src/lib/notificationHandler.ts.html +0 -193
  435. package/coverage/server/src/lib/pusher.ts.html +0 -121
  436. package/coverage/server/src/lib/thumbnailGenerator.ts.html +0 -592
  437. package/coverage/server/src/middleware/auth.ts.html +0 -646
  438. package/coverage/server/src/middleware/index.html +0 -146
  439. package/coverage/server/src/middleware/logging.ts.html +0 -244
  440. package/coverage/server/src/middleware/security.ts.html +0 -271
  441. package/coverage/server/src/routers/_app.ts.html +0 -232
  442. package/coverage/server/src/routers/agenda.ts.html +0 -319
  443. package/coverage/server/src/routers/announcement.ts.html +0 -3481
  444. package/coverage/server/src/routers/assignment.ts.html +0 -7633
  445. package/coverage/server/src/routers/attendance.ts.html +0 -1030
  446. package/coverage/server/src/routers/auth.ts.html +0 -1081
  447. package/coverage/server/src/routers/class.ts.html +0 -3535
  448. package/coverage/server/src/routers/comment.ts.html +0 -991
  449. package/coverage/server/src/routers/conversation.ts.html +0 -982
  450. package/coverage/server/src/routers/event.ts.html +0 -1609
  451. package/coverage/server/src/routers/file.ts.html +0 -1144
  452. package/coverage/server/src/routers/folder.ts.html +0 -2797
  453. package/coverage/server/src/routers/index.html +0 -386
  454. package/coverage/server/src/routers/labChat.ts.html +0 -3073
  455. package/coverage/server/src/routers/marketing.ts.html +0 -340
  456. package/coverage/server/src/routers/message.ts.html +0 -1912
  457. package/coverage/server/src/routers/notifications.ts.html +0 -364
  458. package/coverage/server/src/routers/section.ts.html +0 -1120
  459. package/coverage/server/src/routers/user.ts.html +0 -862
  460. package/coverage/server/src/routers/worksheet.ts.html +0 -1729
  461. package/coverage/server/src/trpc.ts.html +0 -397
  462. package/coverage/server/src/types/index.html +0 -116
  463. package/coverage/server/src/types/trpc.ts.html +0 -127
  464. package/coverage/server/src/utils/aiUser.ts.html +0 -280
  465. package/coverage/server/src/utils/email.ts.html +0 -121
  466. package/coverage/server/src/utils/generateInviteCode.ts.html +0 -106
  467. package/coverage/server/src/utils/index.html +0 -206
  468. package/coverage/server/src/utils/inference.ts.html +0 -709
  469. package/coverage/server/src/utils/logger.ts.html +0 -664
  470. package/coverage/server/src/utils/prismaErrorHandler.ts.html +0 -907
  471. package/coverage/server/src/utils/prismaWrapper.ts.html +0 -355
  472. package/coverage/server/vitest.config.ts.html +0 -196
  473. package/coverage/sort-arrow-sprite.png +0 -0
  474. package/coverage/sorter.js +0 -210
  475. package/src/lib/notificationHandler.ts +0 -36
  476. package/src/server/pipelines/aiLabChat.ts +0 -507
  477. package/tests/announcement.test.ts +0 -164
  478. package/tests/assignment.test.ts +0 -296
  479. package/tests/auth.test.ts +0 -48
@@ -0,0 +1,1292 @@
1
+ /** @returns Assignment by ID. */
2
+ export declare function findAssignmentById(id: string): import(".prisma/client").Prisma.Prisma__AssignmentClient<{
3
+ type: import(".prisma/client").$Enums.AssignmentType;
4
+ id: string;
5
+ createdAt: Date | null;
6
+ classId: string;
7
+ title: string;
8
+ dueDate: Date;
9
+ maxGrade: number | null;
10
+ eventId: string | null;
11
+ instructions: string;
12
+ modifiedAt: Date | null;
13
+ teacherId: string;
14
+ acceptFiles: boolean;
15
+ acceptExtendedResponse: boolean;
16
+ acceptWorksheet: boolean;
17
+ gradeWithAI: boolean;
18
+ aiPolicyLevel: number;
19
+ sectionId: string | null;
20
+ graded: boolean;
21
+ weight: number;
22
+ inProgress: boolean;
23
+ template: boolean;
24
+ markSchemeId: string | null;
25
+ order: number | null;
26
+ gradingBoundaryId: string | null;
27
+ } | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;
28
+ /** @returns Assignment with full details for get. */
29
+ export declare function findAssignmentWithDetails(id: string): import(".prisma/client").Prisma.Prisma__AssignmentClient<({
30
+ submissions: {
31
+ student: {
32
+ id: string;
33
+ username: string;
34
+ };
35
+ }[];
36
+ class: {
37
+ id: string;
38
+ name: string;
39
+ };
40
+ section: {
41
+ id: string;
42
+ name: string;
43
+ } | null;
44
+ worksheets: {
45
+ id: string;
46
+ name: string;
47
+ }[];
48
+ teacher: {
49
+ id: string;
50
+ username: string;
51
+ };
52
+ attachments: {
53
+ path: string;
54
+ type: string;
55
+ id: string;
56
+ name: string;
57
+ size: number | null;
58
+ uploadedAt: Date | null;
59
+ thumbnailId: string | null;
60
+ }[];
61
+ eventAttached: {
62
+ id: string;
63
+ location: string | null;
64
+ name: string | null;
65
+ color: string | null;
66
+ startTime: Date;
67
+ endTime: Date;
68
+ remarks: string | null;
69
+ } | null;
70
+ markScheme: {
71
+ id: string;
72
+ structured: string;
73
+ } | null;
74
+ gradingBoundary: {
75
+ id: string;
76
+ structured: string;
77
+ } | null;
78
+ } & {
79
+ type: import(".prisma/client").$Enums.AssignmentType;
80
+ id: string;
81
+ createdAt: Date | null;
82
+ classId: string;
83
+ title: string;
84
+ dueDate: Date;
85
+ maxGrade: number | null;
86
+ eventId: string | null;
87
+ instructions: string;
88
+ modifiedAt: Date | null;
89
+ teacherId: string;
90
+ acceptFiles: boolean;
91
+ acceptExtendedResponse: boolean;
92
+ acceptWorksheet: boolean;
93
+ gradeWithAI: boolean;
94
+ aiPolicyLevel: number;
95
+ sectionId: string | null;
96
+ graded: boolean;
97
+ weight: number;
98
+ inProgress: boolean;
99
+ template: boolean;
100
+ markSchemeId: string | null;
101
+ order: number | null;
102
+ gradingBoundaryId: string | null;
103
+ }) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;
104
+ /** @returns Assignment with attachments for delete. */
105
+ export declare function findAssignmentForDelete(id: string, teacherId: string): import(".prisma/client").Prisma.Prisma__AssignmentClient<({
106
+ submissions: ({
107
+ attachments: ({
108
+ thumbnail: {
109
+ path: string;
110
+ type: string;
111
+ id: string;
112
+ userId: string | null;
113
+ name: string;
114
+ size: number | null;
115
+ uploadedAt: Date | null;
116
+ assignmentId: string | null;
117
+ submissionId: string | null;
118
+ thumbnailId: string | null;
119
+ annotationId: string | null;
120
+ uploadStatus: import(".prisma/client").$Enums.UploadStatus;
121
+ uploadUrl: string | null;
122
+ uploadExpiresAt: Date | null;
123
+ uploadSessionId: string | null;
124
+ uploadProgress: number | null;
125
+ uploadError: string | null;
126
+ uploadRetryCount: number;
127
+ isOrphaned: boolean;
128
+ cleanupAt: Date | null;
129
+ classDraftId: string | null;
130
+ folderId: string | null;
131
+ conversationId: string | null;
132
+ messageId: string | null;
133
+ announcementId: string | null;
134
+ schoolDevelopementProgramId: string | null;
135
+ } | null;
136
+ } & {
137
+ path: string;
138
+ type: string;
139
+ id: string;
140
+ userId: string | null;
141
+ name: string;
142
+ size: number | null;
143
+ uploadedAt: Date | null;
144
+ assignmentId: string | null;
145
+ submissionId: string | null;
146
+ thumbnailId: string | null;
147
+ annotationId: string | null;
148
+ uploadStatus: import(".prisma/client").$Enums.UploadStatus;
149
+ uploadUrl: string | null;
150
+ uploadExpiresAt: Date | null;
151
+ uploadSessionId: string | null;
152
+ uploadProgress: number | null;
153
+ uploadError: string | null;
154
+ uploadRetryCount: number;
155
+ isOrphaned: boolean;
156
+ cleanupAt: Date | null;
157
+ classDraftId: string | null;
158
+ folderId: string | null;
159
+ conversationId: string | null;
160
+ messageId: string | null;
161
+ announcementId: string | null;
162
+ schoolDevelopementProgramId: string | null;
163
+ })[];
164
+ annotations: ({
165
+ thumbnail: {
166
+ path: string;
167
+ type: string;
168
+ id: string;
169
+ userId: string | null;
170
+ name: string;
171
+ size: number | null;
172
+ uploadedAt: Date | null;
173
+ assignmentId: string | null;
174
+ submissionId: string | null;
175
+ thumbnailId: string | null;
176
+ annotationId: string | null;
177
+ uploadStatus: import(".prisma/client").$Enums.UploadStatus;
178
+ uploadUrl: string | null;
179
+ uploadExpiresAt: Date | null;
180
+ uploadSessionId: string | null;
181
+ uploadProgress: number | null;
182
+ uploadError: string | null;
183
+ uploadRetryCount: number;
184
+ isOrphaned: boolean;
185
+ cleanupAt: Date | null;
186
+ classDraftId: string | null;
187
+ folderId: string | null;
188
+ conversationId: string | null;
189
+ messageId: string | null;
190
+ announcementId: string | null;
191
+ schoolDevelopementProgramId: string | null;
192
+ } | null;
193
+ } & {
194
+ path: string;
195
+ type: string;
196
+ id: string;
197
+ userId: string | null;
198
+ name: string;
199
+ size: number | null;
200
+ uploadedAt: Date | null;
201
+ assignmentId: string | null;
202
+ submissionId: string | null;
203
+ thumbnailId: string | null;
204
+ annotationId: string | null;
205
+ uploadStatus: import(".prisma/client").$Enums.UploadStatus;
206
+ uploadUrl: string | null;
207
+ uploadExpiresAt: Date | null;
208
+ uploadSessionId: string | null;
209
+ uploadProgress: number | null;
210
+ uploadError: string | null;
211
+ uploadRetryCount: number;
212
+ isOrphaned: boolean;
213
+ cleanupAt: Date | null;
214
+ classDraftId: string | null;
215
+ folderId: string | null;
216
+ conversationId: string | null;
217
+ messageId: string | null;
218
+ announcementId: string | null;
219
+ schoolDevelopementProgramId: string | null;
220
+ })[];
221
+ } & {
222
+ id: string;
223
+ createdAt: Date;
224
+ assignmentId: string;
225
+ modifiedAt: Date;
226
+ studentId: string;
227
+ extendedResponse: string | null;
228
+ gradeReceived: number | null;
229
+ rubricState: string | null;
230
+ teacherComments: string | null;
231
+ submittedAt: Date | null;
232
+ submitted: boolean | null;
233
+ returned: boolean | null;
234
+ })[];
235
+ attachments: ({
236
+ thumbnail: {
237
+ path: string;
238
+ type: string;
239
+ id: string;
240
+ userId: string | null;
241
+ name: string;
242
+ size: number | null;
243
+ uploadedAt: Date | null;
244
+ assignmentId: string | null;
245
+ submissionId: string | null;
246
+ thumbnailId: string | null;
247
+ annotationId: string | null;
248
+ uploadStatus: import(".prisma/client").$Enums.UploadStatus;
249
+ uploadUrl: string | null;
250
+ uploadExpiresAt: Date | null;
251
+ uploadSessionId: string | null;
252
+ uploadProgress: number | null;
253
+ uploadError: string | null;
254
+ uploadRetryCount: number;
255
+ isOrphaned: boolean;
256
+ cleanupAt: Date | null;
257
+ classDraftId: string | null;
258
+ folderId: string | null;
259
+ conversationId: string | null;
260
+ messageId: string | null;
261
+ announcementId: string | null;
262
+ schoolDevelopementProgramId: string | null;
263
+ } | null;
264
+ } & {
265
+ path: string;
266
+ type: string;
267
+ id: string;
268
+ userId: string | null;
269
+ name: string;
270
+ size: number | null;
271
+ uploadedAt: Date | null;
272
+ assignmentId: string | null;
273
+ submissionId: string | null;
274
+ thumbnailId: string | null;
275
+ annotationId: string | null;
276
+ uploadStatus: import(".prisma/client").$Enums.UploadStatus;
277
+ uploadUrl: string | null;
278
+ uploadExpiresAt: Date | null;
279
+ uploadSessionId: string | null;
280
+ uploadProgress: number | null;
281
+ uploadError: string | null;
282
+ uploadRetryCount: number;
283
+ isOrphaned: boolean;
284
+ cleanupAt: Date | null;
285
+ classDraftId: string | null;
286
+ folderId: string | null;
287
+ conversationId: string | null;
288
+ messageId: string | null;
289
+ announcementId: string | null;
290
+ schoolDevelopementProgramId: string | null;
291
+ })[];
292
+ } & {
293
+ type: import(".prisma/client").$Enums.AssignmentType;
294
+ id: string;
295
+ createdAt: Date | null;
296
+ classId: string;
297
+ title: string;
298
+ dueDate: Date;
299
+ maxGrade: number | null;
300
+ eventId: string | null;
301
+ instructions: string;
302
+ modifiedAt: Date | null;
303
+ teacherId: string;
304
+ acceptFiles: boolean;
305
+ acceptExtendedResponse: boolean;
306
+ acceptWorksheet: boolean;
307
+ gradeWithAI: boolean;
308
+ aiPolicyLevel: number;
309
+ sectionId: string | null;
310
+ graded: boolean;
311
+ weight: number;
312
+ inProgress: boolean;
313
+ template: boolean;
314
+ markSchemeId: string | null;
315
+ order: number | null;
316
+ gradingBoundaryId: string | null;
317
+ }) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;
318
+ /** @returns Assignments due today. */
319
+ export declare function findAssignmentsDueToday(): import(".prisma/client").Prisma.PrismaPromise<{
320
+ type: import(".prisma/client").$Enums.AssignmentType;
321
+ id: string;
322
+ class: {
323
+ id: string;
324
+ name: string;
325
+ };
326
+ title: string;
327
+ dueDate: Date;
328
+ maxGrade: number | null;
329
+ graded: boolean;
330
+ }[]>;
331
+ /** @returns Submission by assignment and student. */
332
+ export declare function findSubmissionByAssignmentAndStudent(assignmentId: string, studentId: string): import(".prisma/client").Prisma.Prisma__SubmissionClient<({
333
+ assignment: {
334
+ class: {
335
+ id: string;
336
+ schoolId: string | null;
337
+ name: string;
338
+ subject: string;
339
+ color: string | null;
340
+ section: string;
341
+ syllabus: string | null;
342
+ };
343
+ worksheets: {
344
+ id: string;
345
+ name: string;
346
+ }[];
347
+ markScheme: {
348
+ id: string;
349
+ structured: string;
350
+ } | null;
351
+ gradingBoundary: {
352
+ id: string;
353
+ structured: string;
354
+ } | null;
355
+ } & {
356
+ type: import(".prisma/client").$Enums.AssignmentType;
357
+ id: string;
358
+ createdAt: Date | null;
359
+ classId: string;
360
+ title: string;
361
+ dueDate: Date;
362
+ maxGrade: number | null;
363
+ eventId: string | null;
364
+ instructions: string;
365
+ modifiedAt: Date | null;
366
+ teacherId: string;
367
+ acceptFiles: boolean;
368
+ acceptExtendedResponse: boolean;
369
+ acceptWorksheet: boolean;
370
+ gradeWithAI: boolean;
371
+ aiPolicyLevel: number;
372
+ sectionId: string | null;
373
+ graded: boolean;
374
+ weight: number;
375
+ inProgress: boolean;
376
+ template: boolean;
377
+ markSchemeId: string | null;
378
+ order: number | null;
379
+ gradingBoundaryId: string | null;
380
+ };
381
+ attachments: {
382
+ path: string;
383
+ type: string;
384
+ id: string;
385
+ userId: string | null;
386
+ name: string;
387
+ size: number | null;
388
+ uploadedAt: Date | null;
389
+ assignmentId: string | null;
390
+ submissionId: string | null;
391
+ thumbnailId: string | null;
392
+ annotationId: string | null;
393
+ uploadStatus: import(".prisma/client").$Enums.UploadStatus;
394
+ uploadUrl: string | null;
395
+ uploadExpiresAt: Date | null;
396
+ uploadSessionId: string | null;
397
+ uploadProgress: number | null;
398
+ uploadError: string | null;
399
+ uploadRetryCount: number;
400
+ isOrphaned: boolean;
401
+ cleanupAt: Date | null;
402
+ classDraftId: string | null;
403
+ folderId: string | null;
404
+ conversationId: string | null;
405
+ messageId: string | null;
406
+ announcementId: string | null;
407
+ schoolDevelopementProgramId: string | null;
408
+ }[];
409
+ student: {
410
+ id: string;
411
+ username: string;
412
+ profile: {
413
+ id: string;
414
+ userId: string;
415
+ displayName: string | null;
416
+ bio: string | null;
417
+ location: string | null;
418
+ website: string | null;
419
+ profilePicture: string | null;
420
+ profilePictureThumbnail: string | null;
421
+ createdAt: Date;
422
+ updatedAt: Date;
423
+ } | null;
424
+ };
425
+ annotations: {
426
+ path: string;
427
+ type: string;
428
+ id: string;
429
+ userId: string | null;
430
+ name: string;
431
+ size: number | null;
432
+ uploadedAt: Date | null;
433
+ assignmentId: string | null;
434
+ submissionId: string | null;
435
+ thumbnailId: string | null;
436
+ annotationId: string | null;
437
+ uploadStatus: import(".prisma/client").$Enums.UploadStatus;
438
+ uploadUrl: string | null;
439
+ uploadExpiresAt: Date | null;
440
+ uploadSessionId: string | null;
441
+ uploadProgress: number | null;
442
+ uploadError: string | null;
443
+ uploadRetryCount: number;
444
+ isOrphaned: boolean;
445
+ cleanupAt: Date | null;
446
+ classDraftId: string | null;
447
+ folderId: string | null;
448
+ conversationId: string | null;
449
+ messageId: string | null;
450
+ announcementId: string | null;
451
+ schoolDevelopementProgramId: string | null;
452
+ }[];
453
+ } & {
454
+ id: string;
455
+ createdAt: Date;
456
+ assignmentId: string;
457
+ modifiedAt: Date;
458
+ studentId: string;
459
+ extendedResponse: string | null;
460
+ gradeReceived: number | null;
461
+ rubricState: string | null;
462
+ teacherComments: string | null;
463
+ submittedAt: Date | null;
464
+ submitted: boolean | null;
465
+ returned: boolean | null;
466
+ }) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;
467
+ /** @returns Submission by ID for class member. */
468
+ export declare function findSubmissionByIdForClassMember(submissionId: string, classId: string, userId: string): import(".prisma/client").Prisma.Prisma__SubmissionClient<({
469
+ assignment: {
470
+ class: {
471
+ id: string;
472
+ schoolId: string | null;
473
+ name: string;
474
+ subject: string;
475
+ color: string | null;
476
+ section: string;
477
+ syllabus: string | null;
478
+ };
479
+ worksheets: {
480
+ id: string;
481
+ name: string;
482
+ }[];
483
+ markScheme: {
484
+ id: string;
485
+ structured: string;
486
+ } | null;
487
+ gradingBoundary: {
488
+ id: string;
489
+ structured: string;
490
+ } | null;
491
+ } & {
492
+ type: import(".prisma/client").$Enums.AssignmentType;
493
+ id: string;
494
+ createdAt: Date | null;
495
+ classId: string;
496
+ title: string;
497
+ dueDate: Date;
498
+ maxGrade: number | null;
499
+ eventId: string | null;
500
+ instructions: string;
501
+ modifiedAt: Date | null;
502
+ teacherId: string;
503
+ acceptFiles: boolean;
504
+ acceptExtendedResponse: boolean;
505
+ acceptWorksheet: boolean;
506
+ gradeWithAI: boolean;
507
+ aiPolicyLevel: number;
508
+ sectionId: string | null;
509
+ graded: boolean;
510
+ weight: number;
511
+ inProgress: boolean;
512
+ template: boolean;
513
+ markSchemeId: string | null;
514
+ order: number | null;
515
+ gradingBoundaryId: string | null;
516
+ };
517
+ attachments: {
518
+ path: string;
519
+ type: string;
520
+ id: string;
521
+ userId: string | null;
522
+ name: string;
523
+ size: number | null;
524
+ uploadedAt: Date | null;
525
+ assignmentId: string | null;
526
+ submissionId: string | null;
527
+ thumbnailId: string | null;
528
+ annotationId: string | null;
529
+ uploadStatus: import(".prisma/client").$Enums.UploadStatus;
530
+ uploadUrl: string | null;
531
+ uploadExpiresAt: Date | null;
532
+ uploadSessionId: string | null;
533
+ uploadProgress: number | null;
534
+ uploadError: string | null;
535
+ uploadRetryCount: number;
536
+ isOrphaned: boolean;
537
+ cleanupAt: Date | null;
538
+ classDraftId: string | null;
539
+ folderId: string | null;
540
+ conversationId: string | null;
541
+ messageId: string | null;
542
+ announcementId: string | null;
543
+ schoolDevelopementProgramId: string | null;
544
+ }[];
545
+ student: {
546
+ id: string;
547
+ username: string;
548
+ profile: {
549
+ id: string;
550
+ userId: string;
551
+ displayName: string | null;
552
+ bio: string | null;
553
+ location: string | null;
554
+ website: string | null;
555
+ profilePicture: string | null;
556
+ profilePictureThumbnail: string | null;
557
+ createdAt: Date;
558
+ updatedAt: Date;
559
+ } | null;
560
+ };
561
+ annotations: {
562
+ path: string;
563
+ type: string;
564
+ id: string;
565
+ userId: string | null;
566
+ name: string;
567
+ size: number | null;
568
+ uploadedAt: Date | null;
569
+ assignmentId: string | null;
570
+ submissionId: string | null;
571
+ thumbnailId: string | null;
572
+ annotationId: string | null;
573
+ uploadStatus: import(".prisma/client").$Enums.UploadStatus;
574
+ uploadUrl: string | null;
575
+ uploadExpiresAt: Date | null;
576
+ uploadSessionId: string | null;
577
+ uploadProgress: number | null;
578
+ uploadError: string | null;
579
+ uploadRetryCount: number;
580
+ isOrphaned: boolean;
581
+ cleanupAt: Date | null;
582
+ classDraftId: string | null;
583
+ folderId: string | null;
584
+ conversationId: string | null;
585
+ messageId: string | null;
586
+ announcementId: string | null;
587
+ schoolDevelopementProgramId: string | null;
588
+ }[];
589
+ } & {
590
+ id: string;
591
+ createdAt: Date;
592
+ assignmentId: string;
593
+ modifiedAt: Date;
594
+ studentId: string;
595
+ extendedResponse: string | null;
596
+ gradeReceived: number | null;
597
+ rubricState: string | null;
598
+ teacherComments: string | null;
599
+ submittedAt: Date | null;
600
+ submitted: boolean | null;
601
+ returned: boolean | null;
602
+ }) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;
603
+ /** @returns Submission by ID for update (student or teacher). */
604
+ export declare function findSubmissionForUpdate(submissionId: string, userId: string): import(".prisma/client").Prisma.Prisma__SubmissionClient<({
605
+ assignment: {
606
+ class: {
607
+ id: string;
608
+ schoolId: string | null;
609
+ name: string;
610
+ subject: string;
611
+ color: string | null;
612
+ section: string;
613
+ syllabus: string | null;
614
+ };
615
+ markScheme: {
616
+ id: string;
617
+ structured: string;
618
+ } | null;
619
+ gradingBoundary: {
620
+ id: string;
621
+ structured: string;
622
+ } | null;
623
+ } & {
624
+ type: import(".prisma/client").$Enums.AssignmentType;
625
+ id: string;
626
+ createdAt: Date | null;
627
+ classId: string;
628
+ title: string;
629
+ dueDate: Date;
630
+ maxGrade: number | null;
631
+ eventId: string | null;
632
+ instructions: string;
633
+ modifiedAt: Date | null;
634
+ teacherId: string;
635
+ acceptFiles: boolean;
636
+ acceptExtendedResponse: boolean;
637
+ acceptWorksheet: boolean;
638
+ gradeWithAI: boolean;
639
+ aiPolicyLevel: number;
640
+ sectionId: string | null;
641
+ graded: boolean;
642
+ weight: number;
643
+ inProgress: boolean;
644
+ template: boolean;
645
+ markSchemeId: string | null;
646
+ order: number | null;
647
+ gradingBoundaryId: string | null;
648
+ };
649
+ attachments: ({
650
+ thumbnail: {
651
+ path: string;
652
+ type: string;
653
+ id: string;
654
+ userId: string | null;
655
+ name: string;
656
+ size: number | null;
657
+ uploadedAt: Date | null;
658
+ assignmentId: string | null;
659
+ submissionId: string | null;
660
+ thumbnailId: string | null;
661
+ annotationId: string | null;
662
+ uploadStatus: import(".prisma/client").$Enums.UploadStatus;
663
+ uploadUrl: string | null;
664
+ uploadExpiresAt: Date | null;
665
+ uploadSessionId: string | null;
666
+ uploadProgress: number | null;
667
+ uploadError: string | null;
668
+ uploadRetryCount: number;
669
+ isOrphaned: boolean;
670
+ cleanupAt: Date | null;
671
+ classDraftId: string | null;
672
+ folderId: string | null;
673
+ conversationId: string | null;
674
+ messageId: string | null;
675
+ announcementId: string | null;
676
+ schoolDevelopementProgramId: string | null;
677
+ } | null;
678
+ } & {
679
+ path: string;
680
+ type: string;
681
+ id: string;
682
+ userId: string | null;
683
+ name: string;
684
+ size: number | null;
685
+ uploadedAt: Date | null;
686
+ assignmentId: string | null;
687
+ submissionId: string | null;
688
+ thumbnailId: string | null;
689
+ annotationId: string | null;
690
+ uploadStatus: import(".prisma/client").$Enums.UploadStatus;
691
+ uploadUrl: string | null;
692
+ uploadExpiresAt: Date | null;
693
+ uploadSessionId: string | null;
694
+ uploadProgress: number | null;
695
+ uploadError: string | null;
696
+ uploadRetryCount: number;
697
+ isOrphaned: boolean;
698
+ cleanupAt: Date | null;
699
+ classDraftId: string | null;
700
+ folderId: string | null;
701
+ conversationId: string | null;
702
+ messageId: string | null;
703
+ announcementId: string | null;
704
+ schoolDevelopementProgramId: string | null;
705
+ })[];
706
+ } & {
707
+ id: string;
708
+ createdAt: Date;
709
+ assignmentId: string;
710
+ modifiedAt: Date;
711
+ studentId: string;
712
+ extendedResponse: string | null;
713
+ gradeReceived: number | null;
714
+ rubricState: string | null;
715
+ teacherComments: string | null;
716
+ submittedAt: Date | null;
717
+ submitted: boolean | null;
718
+ returned: boolean | null;
719
+ }) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;
720
+ /** Create a submission. */
721
+ export declare function createSubmission(assignmentId: string, studentId: string): import(".prisma/client").Prisma.Prisma__SubmissionClient<{
722
+ assignment: {
723
+ class: {
724
+ id: string;
725
+ schoolId: string | null;
726
+ name: string;
727
+ subject: string;
728
+ color: string | null;
729
+ section: string;
730
+ syllabus: string | null;
731
+ };
732
+ worksheets: {
733
+ id: string;
734
+ name: string;
735
+ }[];
736
+ markScheme: {
737
+ id: string;
738
+ structured: string;
739
+ } | null;
740
+ gradingBoundary: {
741
+ id: string;
742
+ structured: string;
743
+ } | null;
744
+ } & {
745
+ type: import(".prisma/client").$Enums.AssignmentType;
746
+ id: string;
747
+ createdAt: Date | null;
748
+ classId: string;
749
+ title: string;
750
+ dueDate: Date;
751
+ maxGrade: number | null;
752
+ eventId: string | null;
753
+ instructions: string;
754
+ modifiedAt: Date | null;
755
+ teacherId: string;
756
+ acceptFiles: boolean;
757
+ acceptExtendedResponse: boolean;
758
+ acceptWorksheet: boolean;
759
+ gradeWithAI: boolean;
760
+ aiPolicyLevel: number;
761
+ sectionId: string | null;
762
+ graded: boolean;
763
+ weight: number;
764
+ inProgress: boolean;
765
+ template: boolean;
766
+ markSchemeId: string | null;
767
+ order: number | null;
768
+ gradingBoundaryId: string | null;
769
+ };
770
+ attachments: {
771
+ path: string;
772
+ type: string;
773
+ id: string;
774
+ userId: string | null;
775
+ name: string;
776
+ size: number | null;
777
+ uploadedAt: Date | null;
778
+ assignmentId: string | null;
779
+ submissionId: string | null;
780
+ thumbnailId: string | null;
781
+ annotationId: string | null;
782
+ uploadStatus: import(".prisma/client").$Enums.UploadStatus;
783
+ uploadUrl: string | null;
784
+ uploadExpiresAt: Date | null;
785
+ uploadSessionId: string | null;
786
+ uploadProgress: number | null;
787
+ uploadError: string | null;
788
+ uploadRetryCount: number;
789
+ isOrphaned: boolean;
790
+ cleanupAt: Date | null;
791
+ classDraftId: string | null;
792
+ folderId: string | null;
793
+ conversationId: string | null;
794
+ messageId: string | null;
795
+ announcementId: string | null;
796
+ schoolDevelopementProgramId: string | null;
797
+ }[];
798
+ student: {
799
+ id: string;
800
+ username: string;
801
+ };
802
+ annotations: {
803
+ path: string;
804
+ type: string;
805
+ id: string;
806
+ userId: string | null;
807
+ name: string;
808
+ size: number | null;
809
+ uploadedAt: Date | null;
810
+ assignmentId: string | null;
811
+ submissionId: string | null;
812
+ thumbnailId: string | null;
813
+ annotationId: string | null;
814
+ uploadStatus: import(".prisma/client").$Enums.UploadStatus;
815
+ uploadUrl: string | null;
816
+ uploadExpiresAt: Date | null;
817
+ uploadSessionId: string | null;
818
+ uploadProgress: number | null;
819
+ uploadError: string | null;
820
+ uploadRetryCount: number;
821
+ isOrphaned: boolean;
822
+ cleanupAt: Date | null;
823
+ classDraftId: string | null;
824
+ folderId: string | null;
825
+ conversationId: string | null;
826
+ messageId: string | null;
827
+ announcementId: string | null;
828
+ schoolDevelopementProgramId: string | null;
829
+ }[];
830
+ } & {
831
+ id: string;
832
+ createdAt: Date;
833
+ assignmentId: string;
834
+ modifiedAt: Date;
835
+ studentId: string;
836
+ extendedResponse: string | null;
837
+ gradeReceived: number | null;
838
+ rubricState: string | null;
839
+ teacherComments: string | null;
840
+ submittedAt: Date | null;
841
+ submitted: boolean | null;
842
+ returned: boolean | null;
843
+ }, never, import("@prisma/client/runtime/library.js").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;
844
+ /** @returns Sections for a class. */
845
+ export declare function findSectionsByClassId(classId: string): import(".prisma/client").Prisma.PrismaPromise<{
846
+ id: string;
847
+ name: string;
848
+ }[]>;
849
+ /** @returns Assignment with class for teacher (auth check). */
850
+ export declare function findAssignmentWithClassForTeacher(assignmentId: string, teacherId: string): import(".prisma/client").Prisma.Prisma__AssignmentClient<({
851
+ class: {
852
+ id: string;
853
+ schoolId: string | null;
854
+ name: string;
855
+ subject: string;
856
+ color: string | null;
857
+ section: string;
858
+ syllabus: string | null;
859
+ };
860
+ } & {
861
+ type: import(".prisma/client").$Enums.AssignmentType;
862
+ id: string;
863
+ createdAt: Date | null;
864
+ classId: string;
865
+ title: string;
866
+ dueDate: Date;
867
+ maxGrade: number | null;
868
+ eventId: string | null;
869
+ instructions: string;
870
+ modifiedAt: Date | null;
871
+ teacherId: string;
872
+ acceptFiles: boolean;
873
+ acceptExtendedResponse: boolean;
874
+ acceptWorksheet: boolean;
875
+ gradeWithAI: boolean;
876
+ aiPolicyLevel: number;
877
+ sectionId: string | null;
878
+ graded: boolean;
879
+ weight: number;
880
+ inProgress: boolean;
881
+ template: boolean;
882
+ markSchemeId: string | null;
883
+ order: number | null;
884
+ gradingBoundaryId: string | null;
885
+ }) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;
886
+ /** @returns Submissions for assignment (teacher view). */
887
+ export declare function findSubmissionsByAssignmentForTeacher(assignmentId: string, teacherId: string): import(".prisma/client").Prisma.PrismaPromise<({
888
+ assignment: {
889
+ class: {
890
+ id: string;
891
+ schoolId: string | null;
892
+ name: string;
893
+ subject: string;
894
+ color: string | null;
895
+ section: string;
896
+ syllabus: string | null;
897
+ };
898
+ markScheme: {
899
+ id: string;
900
+ structured: string;
901
+ } | null;
902
+ gradingBoundary: {
903
+ id: string;
904
+ structured: string;
905
+ } | null;
906
+ } & {
907
+ type: import(".prisma/client").$Enums.AssignmentType;
908
+ id: string;
909
+ createdAt: Date | null;
910
+ classId: string;
911
+ title: string;
912
+ dueDate: Date;
913
+ maxGrade: number | null;
914
+ eventId: string | null;
915
+ instructions: string;
916
+ modifiedAt: Date | null;
917
+ teacherId: string;
918
+ acceptFiles: boolean;
919
+ acceptExtendedResponse: boolean;
920
+ acceptWorksheet: boolean;
921
+ gradeWithAI: boolean;
922
+ aiPolicyLevel: number;
923
+ sectionId: string | null;
924
+ graded: boolean;
925
+ weight: number;
926
+ inProgress: boolean;
927
+ template: boolean;
928
+ markSchemeId: string | null;
929
+ order: number | null;
930
+ gradingBoundaryId: string | null;
931
+ };
932
+ attachments: ({
933
+ thumbnail: {
934
+ path: string;
935
+ type: string;
936
+ id: string;
937
+ userId: string | null;
938
+ name: string;
939
+ size: number | null;
940
+ uploadedAt: Date | null;
941
+ assignmentId: string | null;
942
+ submissionId: string | null;
943
+ thumbnailId: string | null;
944
+ annotationId: string | null;
945
+ uploadStatus: import(".prisma/client").$Enums.UploadStatus;
946
+ uploadUrl: string | null;
947
+ uploadExpiresAt: Date | null;
948
+ uploadSessionId: string | null;
949
+ uploadProgress: number | null;
950
+ uploadError: string | null;
951
+ uploadRetryCount: number;
952
+ isOrphaned: boolean;
953
+ cleanupAt: Date | null;
954
+ classDraftId: string | null;
955
+ folderId: string | null;
956
+ conversationId: string | null;
957
+ messageId: string | null;
958
+ announcementId: string | null;
959
+ schoolDevelopementProgramId: string | null;
960
+ } | null;
961
+ } & {
962
+ path: string;
963
+ type: string;
964
+ id: string;
965
+ userId: string | null;
966
+ name: string;
967
+ size: number | null;
968
+ uploadedAt: Date | null;
969
+ assignmentId: string | null;
970
+ submissionId: string | null;
971
+ thumbnailId: string | null;
972
+ annotationId: string | null;
973
+ uploadStatus: import(".prisma/client").$Enums.UploadStatus;
974
+ uploadUrl: string | null;
975
+ uploadExpiresAt: Date | null;
976
+ uploadSessionId: string | null;
977
+ uploadProgress: number | null;
978
+ uploadError: string | null;
979
+ uploadRetryCount: number;
980
+ isOrphaned: boolean;
981
+ cleanupAt: Date | null;
982
+ classDraftId: string | null;
983
+ folderId: string | null;
984
+ conversationId: string | null;
985
+ messageId: string | null;
986
+ announcementId: string | null;
987
+ schoolDevelopementProgramId: string | null;
988
+ })[];
989
+ student: {
990
+ id: string;
991
+ username: string;
992
+ profile: {
993
+ displayName: string | null;
994
+ profilePicture: string | null;
995
+ profilePictureThumbnail: string | null;
996
+ } | null;
997
+ };
998
+ } & {
999
+ id: string;
1000
+ createdAt: Date;
1001
+ assignmentId: string;
1002
+ modifiedAt: Date;
1003
+ studentId: string;
1004
+ extendedResponse: string | null;
1005
+ gradeReceived: number | null;
1006
+ rubricState: string | null;
1007
+ teacherComments: string | null;
1008
+ submittedAt: Date | null;
1009
+ submitted: boolean | null;
1010
+ returned: boolean | null;
1011
+ })[]>;
1012
+ /** @returns Submission by ID for teacher update. */
1013
+ export declare function findSubmissionForTeacherUpdate(submissionId: string, teacherId: string): import(".prisma/client").Prisma.Prisma__SubmissionClient<({
1014
+ assignment: {
1015
+ class: {
1016
+ id: string;
1017
+ schoolId: string | null;
1018
+ name: string;
1019
+ subject: string;
1020
+ color: string | null;
1021
+ section: string;
1022
+ syllabus: string | null;
1023
+ };
1024
+ markScheme: {
1025
+ id: string;
1026
+ structured: string;
1027
+ } | null;
1028
+ gradingBoundary: {
1029
+ id: string;
1030
+ structured: string;
1031
+ } | null;
1032
+ } & {
1033
+ type: import(".prisma/client").$Enums.AssignmentType;
1034
+ id: string;
1035
+ createdAt: Date | null;
1036
+ classId: string;
1037
+ title: string;
1038
+ dueDate: Date;
1039
+ maxGrade: number | null;
1040
+ eventId: string | null;
1041
+ instructions: string;
1042
+ modifiedAt: Date | null;
1043
+ teacherId: string;
1044
+ acceptFiles: boolean;
1045
+ acceptExtendedResponse: boolean;
1046
+ acceptWorksheet: boolean;
1047
+ gradeWithAI: boolean;
1048
+ aiPolicyLevel: number;
1049
+ sectionId: string | null;
1050
+ graded: boolean;
1051
+ weight: number;
1052
+ inProgress: boolean;
1053
+ template: boolean;
1054
+ markSchemeId: string | null;
1055
+ order: number | null;
1056
+ gradingBoundaryId: string | null;
1057
+ };
1058
+ attachments: ({
1059
+ thumbnail: {
1060
+ path: string;
1061
+ type: string;
1062
+ id: string;
1063
+ userId: string | null;
1064
+ name: string;
1065
+ size: number | null;
1066
+ uploadedAt: Date | null;
1067
+ assignmentId: string | null;
1068
+ submissionId: string | null;
1069
+ thumbnailId: string | null;
1070
+ annotationId: string | null;
1071
+ uploadStatus: import(".prisma/client").$Enums.UploadStatus;
1072
+ uploadUrl: string | null;
1073
+ uploadExpiresAt: Date | null;
1074
+ uploadSessionId: string | null;
1075
+ uploadProgress: number | null;
1076
+ uploadError: string | null;
1077
+ uploadRetryCount: number;
1078
+ isOrphaned: boolean;
1079
+ cleanupAt: Date | null;
1080
+ classDraftId: string | null;
1081
+ folderId: string | null;
1082
+ conversationId: string | null;
1083
+ messageId: string | null;
1084
+ announcementId: string | null;
1085
+ schoolDevelopementProgramId: string | null;
1086
+ } | null;
1087
+ } & {
1088
+ path: string;
1089
+ type: string;
1090
+ id: string;
1091
+ userId: string | null;
1092
+ name: string;
1093
+ size: number | null;
1094
+ uploadedAt: Date | null;
1095
+ assignmentId: string | null;
1096
+ submissionId: string | null;
1097
+ thumbnailId: string | null;
1098
+ annotationId: string | null;
1099
+ uploadStatus: import(".prisma/client").$Enums.UploadStatus;
1100
+ uploadUrl: string | null;
1101
+ uploadExpiresAt: Date | null;
1102
+ uploadSessionId: string | null;
1103
+ uploadProgress: number | null;
1104
+ uploadError: string | null;
1105
+ uploadRetryCount: number;
1106
+ isOrphaned: boolean;
1107
+ cleanupAt: Date | null;
1108
+ classDraftId: string | null;
1109
+ folderId: string | null;
1110
+ conversationId: string | null;
1111
+ messageId: string | null;
1112
+ announcementId: string | null;
1113
+ schoolDevelopementProgramId: string | null;
1114
+ })[];
1115
+ annotations: ({
1116
+ thumbnail: {
1117
+ path: string;
1118
+ type: string;
1119
+ id: string;
1120
+ userId: string | null;
1121
+ name: string;
1122
+ size: number | null;
1123
+ uploadedAt: Date | null;
1124
+ assignmentId: string | null;
1125
+ submissionId: string | null;
1126
+ thumbnailId: string | null;
1127
+ annotationId: string | null;
1128
+ uploadStatus: import(".prisma/client").$Enums.UploadStatus;
1129
+ uploadUrl: string | null;
1130
+ uploadExpiresAt: Date | null;
1131
+ uploadSessionId: string | null;
1132
+ uploadProgress: number | null;
1133
+ uploadError: string | null;
1134
+ uploadRetryCount: number;
1135
+ isOrphaned: boolean;
1136
+ cleanupAt: Date | null;
1137
+ classDraftId: string | null;
1138
+ folderId: string | null;
1139
+ conversationId: string | null;
1140
+ messageId: string | null;
1141
+ announcementId: string | null;
1142
+ schoolDevelopementProgramId: string | null;
1143
+ } | null;
1144
+ } & {
1145
+ path: string;
1146
+ type: string;
1147
+ id: string;
1148
+ userId: string | null;
1149
+ name: string;
1150
+ size: number | null;
1151
+ uploadedAt: Date | null;
1152
+ assignmentId: string | null;
1153
+ submissionId: string | null;
1154
+ thumbnailId: string | null;
1155
+ annotationId: string | null;
1156
+ uploadStatus: import(".prisma/client").$Enums.UploadStatus;
1157
+ uploadUrl: string | null;
1158
+ uploadExpiresAt: Date | null;
1159
+ uploadSessionId: string | null;
1160
+ uploadProgress: number | null;
1161
+ uploadError: string | null;
1162
+ uploadRetryCount: number;
1163
+ isOrphaned: boolean;
1164
+ cleanupAt: Date | null;
1165
+ classDraftId: string | null;
1166
+ folderId: string | null;
1167
+ conversationId: string | null;
1168
+ messageId: string | null;
1169
+ announcementId: string | null;
1170
+ schoolDevelopementProgramId: string | null;
1171
+ })[];
1172
+ } & {
1173
+ id: string;
1174
+ createdAt: Date;
1175
+ assignmentId: string;
1176
+ modifiedAt: Date;
1177
+ studentId: string;
1178
+ extendedResponse: string | null;
1179
+ gradeReceived: number | null;
1180
+ rubricState: string | null;
1181
+ teacherComments: string | null;
1182
+ submittedAt: Date | null;
1183
+ submitted: boolean | null;
1184
+ returned: boolean | null;
1185
+ }) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;
1186
+ /** @returns Events in class that don't have this assignment attached. */
1187
+ export declare function findAvailableEventsForAssignment(classId: string, assignmentId: string): import(".prisma/client").Prisma.PrismaPromise<{
1188
+ id: string;
1189
+ location: string | null;
1190
+ name: string | null;
1191
+ color: string | null;
1192
+ startTime: Date;
1193
+ endTime: Date;
1194
+ remarks: string | null;
1195
+ }[]>;
1196
+ /** Attach assignment to event. */
1197
+ export declare function attachAssignmentToEvent(assignmentId: string, eventId: string): import(".prisma/client").Prisma.Prisma__AssignmentClient<{
1198
+ section: {
1199
+ id: string;
1200
+ name: string;
1201
+ } | null;
1202
+ teacher: {
1203
+ id: string;
1204
+ username: string;
1205
+ };
1206
+ attachments: {
1207
+ type: string;
1208
+ id: string;
1209
+ name: string;
1210
+ }[];
1211
+ eventAttached: {
1212
+ id: string;
1213
+ name: string | null;
1214
+ color: string | null;
1215
+ startTime: Date;
1216
+ endTime: Date;
1217
+ } | null;
1218
+ } & {
1219
+ type: import(".prisma/client").$Enums.AssignmentType;
1220
+ id: string;
1221
+ createdAt: Date | null;
1222
+ classId: string;
1223
+ title: string;
1224
+ dueDate: Date;
1225
+ maxGrade: number | null;
1226
+ eventId: string | null;
1227
+ instructions: string;
1228
+ modifiedAt: Date | null;
1229
+ teacherId: string;
1230
+ acceptFiles: boolean;
1231
+ acceptExtendedResponse: boolean;
1232
+ acceptWorksheet: boolean;
1233
+ gradeWithAI: boolean;
1234
+ aiPolicyLevel: number;
1235
+ sectionId: string | null;
1236
+ graded: boolean;
1237
+ weight: number;
1238
+ inProgress: boolean;
1239
+ template: boolean;
1240
+ markSchemeId: string | null;
1241
+ order: number | null;
1242
+ gradingBoundaryId: string | null;
1243
+ }, never, import("@prisma/client/runtime/library.js").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;
1244
+ /** Detach assignment from event. */
1245
+ export declare function detachAssignmentFromEvent(assignmentId: string): import(".prisma/client").Prisma.Prisma__AssignmentClient<{
1246
+ section: {
1247
+ id: string;
1248
+ name: string;
1249
+ } | null;
1250
+ teacher: {
1251
+ id: string;
1252
+ username: string;
1253
+ };
1254
+ attachments: {
1255
+ type: string;
1256
+ id: string;
1257
+ name: string;
1258
+ }[];
1259
+ eventAttached: {
1260
+ id: string;
1261
+ name: string | null;
1262
+ color: string | null;
1263
+ startTime: Date;
1264
+ endTime: Date;
1265
+ } | null;
1266
+ } & {
1267
+ type: import(".prisma/client").$Enums.AssignmentType;
1268
+ id: string;
1269
+ createdAt: Date | null;
1270
+ classId: string;
1271
+ title: string;
1272
+ dueDate: Date;
1273
+ maxGrade: number | null;
1274
+ eventId: string | null;
1275
+ instructions: string;
1276
+ modifiedAt: Date | null;
1277
+ teacherId: string;
1278
+ acceptFiles: boolean;
1279
+ acceptExtendedResponse: boolean;
1280
+ acceptWorksheet: boolean;
1281
+ gradeWithAI: boolean;
1282
+ aiPolicyLevel: number;
1283
+ sectionId: string | null;
1284
+ graded: boolean;
1285
+ weight: number;
1286
+ inProgress: boolean;
1287
+ template: boolean;
1288
+ markSchemeId: string | null;
1289
+ order: number | null;
1290
+ gradingBoundaryId: string | null;
1291
+ }, never, import("@prisma/client/runtime/library.js").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;
1292
+ //# sourceMappingURL=assignment.d.ts.map