@studious-lms/server 1.4.1 → 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 (149) 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 +22 -2
  59. package/dist/pipelines/aiLabChat.d.ts.map +1 -1
  60. package/dist/pipelines/aiLabChat.js +125 -95
  61. package/dist/pipelines/aiLabChat.js.map +1 -1
  62. package/dist/pipelines/aiLabChatContract.d.ts +22 -22
  63. package/dist/pipelines/gradeWorksheet.d.ts +8 -8
  64. package/dist/pipelines/gradeWorksheet.js +4 -4
  65. package/dist/pipelines/gradeWorksheet.js.map +1 -1
  66. package/dist/pipelines/labChatPrompt.d.ts +27 -0
  67. package/dist/pipelines/labChatPrompt.d.ts.map +1 -1
  68. package/dist/pipelines/labChatPrompt.js +143 -69
  69. package/dist/pipelines/labChatPrompt.js.map +1 -1
  70. package/dist/routers/_app.d.ts +1439 -1223
  71. package/dist/routers/_app.d.ts.map +1 -1
  72. package/dist/routers/agenda.d.ts +16 -16
  73. package/dist/routers/announcement.d.ts +19 -19
  74. package/dist/routers/assignment.d.ts +307 -291
  75. package/dist/routers/assignment.d.ts.map +1 -1
  76. package/dist/routers/assignment.js +3 -2
  77. package/dist/routers/assignment.js.map +1 -1
  78. package/dist/routers/attendance.d.ts +7 -7
  79. package/dist/routers/auth.d.ts +1 -1
  80. package/dist/routers/class.d.ts +77 -71
  81. package/dist/routers/class.d.ts.map +1 -1
  82. package/dist/routers/comment.d.ts +6 -6
  83. package/dist/routers/conversation.d.ts +11 -11
  84. package/dist/routers/event.d.ts +35 -35
  85. package/dist/routers/file.d.ts +12 -12
  86. package/dist/routers/folder.d.ts +54 -54
  87. package/dist/routers/labChat.d.ts +12 -12
  88. package/dist/routers/marketing.d.ts +2 -2
  89. package/dist/routers/message.d.ts +2 -2
  90. package/dist/routers/newtonChat.d.ts +1 -1
  91. package/dist/routers/notifications.d.ts +4 -4
  92. package/dist/routers/section.d.ts +7 -7
  93. package/dist/routers/studentProgress.d.ts +86 -0
  94. package/dist/routers/studentProgress.d.ts.map +1 -1
  95. package/dist/routers/studentProgress.js +14 -4
  96. package/dist/routers/studentProgress.js.map +1 -1
  97. package/dist/routers/user.d.ts +1 -1
  98. package/dist/routers/worksheet.d.ts +58 -58
  99. package/dist/seedDatabase.d.ts +1 -1
  100. package/dist/services/agenda.d.ts +16 -16
  101. package/dist/services/announcement.d.ts +8 -8
  102. package/dist/services/assignment.d.ts +299 -283
  103. package/dist/services/assignment.d.ts.map +1 -1
  104. package/dist/services/assignment.js +24 -5
  105. package/dist/services/assignment.js.map +1 -1
  106. package/dist/services/attendance.d.ts +7 -7
  107. package/dist/services/auth.d.ts +1 -1
  108. package/dist/services/class.d.ts +73 -67
  109. package/dist/services/class.d.ts.map +1 -1
  110. package/dist/services/comment.d.ts +6 -6
  111. package/dist/services/conversation.d.ts +11 -11
  112. package/dist/services/event.d.ts +31 -31
  113. package/dist/services/file.d.ts +12 -12
  114. package/dist/services/folder.d.ts +52 -52
  115. package/dist/services/labChat.d.ts +12 -12
  116. package/dist/services/marketing.d.ts +2 -2
  117. package/dist/services/notification.d.ts +4 -4
  118. package/dist/services/section.d.ts +6 -6
  119. package/dist/services/studentProgress.d.ts +75 -0
  120. package/dist/services/studentProgress.d.ts.map +1 -1
  121. package/dist/services/studentProgress.js +296 -106
  122. package/dist/services/studentProgress.js.map +1 -1
  123. package/dist/services/worksheet.d.ts +49 -49
  124. package/dist/utils/inference.d.ts +0 -11
  125. package/dist/utils/inference.d.ts.map +1 -1
  126. package/dist/utils/inference.js +2 -50
  127. package/dist/utils/inference.js.map +1 -1
  128. package/package.json +1 -1
  129. package/prisma/migrations/20260410124000_add_submission_recommendation_state/migration.sql +14 -0
  130. package/prisma/schema.prisma +14 -0
  131. package/src/index.ts +39 -51
  132. package/src/lib/config/cors.ts +96 -0
  133. package/src/lib/config/env.ts +12 -1
  134. package/src/lib/prisma.ts +25 -6
  135. package/src/middleware/security.ts +1 -1
  136. package/src/pipelines/aiLabChat.ts +175 -104
  137. package/src/pipelines/gradeWorksheet.ts +2 -2
  138. package/src/pipelines/labChatPrompt.ts +196 -68
  139. package/src/routers/assignment.ts +1 -0
  140. package/src/routers/studentProgress.ts +25 -1
  141. package/src/services/assignment.ts +30 -2
  142. package/src/services/studentProgress.ts +421 -120
  143. package/src/utils/inference.ts +0 -61
  144. package/tests/lib/cors.test.ts +103 -0
  145. package/tests/pipelines/aiLabChat.test.ts +64 -84
  146. package/tests/routers/studentProgress.test.ts +2 -31
  147. package/tests/utils/aiLabChatPrompt.test.ts +114 -6
  148. package/tests/utils/studentProgress.test.ts +361 -0
  149. package/vitest.unit.config.ts +1 -0
@@ -1,60 +1,5 @@
1
1
  /** @returns File with assignment, submission, annotations, folder, announcement for permission checks. */
2
2
  export declare function findFileById(fileId: string): import(".prisma/client").Prisma.Prisma__FileClient<({
3
- assignment: ({
4
- class: {
5
- students: {
6
- id: string;
7
- username: string;
8
- email: string;
9
- password: string;
10
- verified: boolean;
11
- role: import(".prisma/client").$Enums.UserRole;
12
- schoolId: string | null;
13
- }[];
14
- teachers: {
15
- id: string;
16
- username: string;
17
- email: string;
18
- password: string;
19
- verified: boolean;
20
- role: import(".prisma/client").$Enums.UserRole;
21
- schoolId: string | null;
22
- }[];
23
- } & {
24
- id: string;
25
- schoolId: string | null;
26
- name: string;
27
- subject: string;
28
- color: string | null;
29
- section: string;
30
- syllabus: string | null;
31
- };
32
- } & {
33
- type: import(".prisma/client").$Enums.AssignmentType;
34
- id: string;
35
- createdAt: Date | null;
36
- classId: string;
37
- title: string;
38
- dueDate: Date;
39
- maxGrade: number | null;
40
- eventId: string | null;
41
- instructions: string;
42
- modifiedAt: Date | null;
43
- teacherId: string;
44
- acceptFiles: boolean;
45
- acceptExtendedResponse: boolean;
46
- acceptWorksheet: boolean;
47
- gradeWithAI: boolean;
48
- aiPolicyLevel: number;
49
- sectionId: string | null;
50
- graded: boolean;
51
- weight: number;
52
- inProgress: boolean;
53
- template: boolean;
54
- markSchemeId: string | null;
55
- order: number | null;
56
- gradingBoundaryId: string | null;
57
- }) | null;
58
3
  submission: ({
59
4
  assignment: {
60
5
  class: {
@@ -68,9 +13,9 @@ export declare function findFileById(fileId: string): import(".prisma/client").P
68
13
  schoolId: string | null;
69
14
  }[];
70
15
  } & {
16
+ name: string;
71
17
  id: string;
72
18
  schoolId: string | null;
73
- name: string;
74
19
  subject: string;
75
20
  color: string | null;
76
21
  section: string;
@@ -80,13 +25,11 @@ export declare function findFileById(fileId: string): import(".prisma/client").P
80
25
  type: import(".prisma/client").$Enums.AssignmentType;
81
26
  id: string;
82
27
  createdAt: Date | null;
28
+ modifiedAt: Date | null;
83
29
  classId: string;
84
30
  title: string;
85
- dueDate: Date;
86
- maxGrade: number | null;
87
- eventId: string | null;
88
31
  instructions: string;
89
- modifiedAt: Date | null;
32
+ dueDate: Date;
90
33
  teacherId: string;
91
34
  acceptFiles: boolean;
92
35
  acceptExtendedResponse: boolean;
@@ -95,9 +38,11 @@ export declare function findFileById(fileId: string): import(".prisma/client").P
95
38
  aiPolicyLevel: number;
96
39
  sectionId: string | null;
97
40
  graded: boolean;
41
+ maxGrade: number | null;
98
42
  weight: number;
99
43
  inProgress: boolean;
100
44
  template: boolean;
45
+ eventId: string | null;
101
46
  markSchemeId: string | null;
102
47
  order: number | null;
103
48
  gradingBoundaryId: string | null;
@@ -113,18 +58,113 @@ export declare function findFileById(fileId: string): import(".prisma/client").P
113
58
  };
114
59
  } & {
115
60
  id: string;
116
- createdAt: Date;
117
61
  assignmentId: string;
62
+ createdAt: Date;
118
63
  modifiedAt: Date;
119
64
  studentId: string;
120
65
  extendedResponse: string | null;
121
66
  gradeReceived: number | null;
67
+ recommendationState: import(".prisma/client").$Enums.SubmissionRecommendationState;
68
+ recommendationUpdatedAt: Date | null;
69
+ targetedAssignmentId: string | null;
122
70
  rubricState: string | null;
123
71
  teacherComments: string | null;
124
72
  submittedAt: Date | null;
125
73
  submitted: boolean | null;
126
74
  returned: boolean | null;
127
75
  }) | null;
76
+ assignment: ({
77
+ class: {
78
+ students: {
79
+ id: string;
80
+ username: string;
81
+ email: string;
82
+ password: string;
83
+ verified: boolean;
84
+ role: import(".prisma/client").$Enums.UserRole;
85
+ schoolId: string | null;
86
+ }[];
87
+ teachers: {
88
+ id: string;
89
+ username: string;
90
+ email: string;
91
+ password: string;
92
+ verified: boolean;
93
+ role: import(".prisma/client").$Enums.UserRole;
94
+ schoolId: string | null;
95
+ }[];
96
+ } & {
97
+ name: string;
98
+ id: string;
99
+ schoolId: string | null;
100
+ subject: string;
101
+ color: string | null;
102
+ section: string;
103
+ syllabus: string | null;
104
+ };
105
+ } & {
106
+ type: import(".prisma/client").$Enums.AssignmentType;
107
+ id: string;
108
+ createdAt: Date | null;
109
+ modifiedAt: Date | null;
110
+ classId: string;
111
+ title: string;
112
+ instructions: string;
113
+ dueDate: Date;
114
+ teacherId: string;
115
+ acceptFiles: boolean;
116
+ acceptExtendedResponse: boolean;
117
+ acceptWorksheet: boolean;
118
+ gradeWithAI: boolean;
119
+ aiPolicyLevel: number;
120
+ sectionId: string | null;
121
+ graded: boolean;
122
+ maxGrade: number | null;
123
+ weight: number;
124
+ inProgress: boolean;
125
+ template: boolean;
126
+ eventId: string | null;
127
+ markSchemeId: string | null;
128
+ order: number | null;
129
+ gradingBoundaryId: string | null;
130
+ }) | null;
131
+ announcement: ({
132
+ class: {
133
+ students: {
134
+ id: string;
135
+ username: string;
136
+ email: string;
137
+ password: string;
138
+ verified: boolean;
139
+ role: import(".prisma/client").$Enums.UserRole;
140
+ schoolId: string | null;
141
+ }[];
142
+ teachers: {
143
+ id: string;
144
+ username: string;
145
+ email: string;
146
+ password: string;
147
+ verified: boolean;
148
+ role: import(".prisma/client").$Enums.UserRole;
149
+ schoolId: string | null;
150
+ }[];
151
+ } & {
152
+ name: string;
153
+ id: string;
154
+ schoolId: string | null;
155
+ subject: string;
156
+ color: string | null;
157
+ section: string;
158
+ syllabus: string | null;
159
+ };
160
+ } & {
161
+ id: string;
162
+ createdAt: Date;
163
+ modifiedAt: Date | null;
164
+ classId: string;
165
+ teacherId: string;
166
+ remarks: string;
167
+ }) | null;
128
168
  annotations: ({
129
169
  assignment: {
130
170
  class: {
@@ -138,9 +178,9 @@ export declare function findFileById(fileId: string): import(".prisma/client").P
138
178
  schoolId: string | null;
139
179
  }[];
140
180
  } & {
181
+ name: string;
141
182
  id: string;
142
183
  schoolId: string | null;
143
- name: string;
144
184
  subject: string;
145
185
  color: string | null;
146
186
  section: string;
@@ -150,13 +190,11 @@ export declare function findFileById(fileId: string): import(".prisma/client").P
150
190
  type: import(".prisma/client").$Enums.AssignmentType;
151
191
  id: string;
152
192
  createdAt: Date | null;
193
+ modifiedAt: Date | null;
153
194
  classId: string;
154
195
  title: string;
155
- dueDate: Date;
156
- maxGrade: number | null;
157
- eventId: string | null;
158
196
  instructions: string;
159
- modifiedAt: Date | null;
197
+ dueDate: Date;
160
198
  teacherId: string;
161
199
  acceptFiles: boolean;
162
200
  acceptExtendedResponse: boolean;
@@ -165,9 +203,11 @@ export declare function findFileById(fileId: string): import(".prisma/client").P
165
203
  aiPolicyLevel: number;
166
204
  sectionId: string | null;
167
205
  graded: boolean;
206
+ maxGrade: number | null;
168
207
  weight: number;
169
208
  inProgress: boolean;
170
209
  template: boolean;
210
+ eventId: string | null;
171
211
  markSchemeId: string | null;
172
212
  order: number | null;
173
213
  gradingBoundaryId: string | null;
@@ -183,55 +223,21 @@ export declare function findFileById(fileId: string): import(".prisma/client").P
183
223
  };
184
224
  } & {
185
225
  id: string;
186
- createdAt: Date;
187
226
  assignmentId: string;
227
+ createdAt: Date;
188
228
  modifiedAt: Date;
189
229
  studentId: string;
190
230
  extendedResponse: string | null;
191
231
  gradeReceived: number | null;
232
+ recommendationState: import(".prisma/client").$Enums.SubmissionRecommendationState;
233
+ recommendationUpdatedAt: Date | null;
234
+ targetedAssignmentId: string | null;
192
235
  rubricState: string | null;
193
236
  teacherComments: string | null;
194
237
  submittedAt: Date | null;
195
238
  submitted: boolean | null;
196
239
  returned: boolean | null;
197
240
  }) | null;
198
- announcement: ({
199
- class: {
200
- students: {
201
- id: string;
202
- username: string;
203
- email: string;
204
- password: string;
205
- verified: boolean;
206
- role: import(".prisma/client").$Enums.UserRole;
207
- schoolId: string | null;
208
- }[];
209
- teachers: {
210
- id: string;
211
- username: string;
212
- email: string;
213
- password: string;
214
- verified: boolean;
215
- role: import(".prisma/client").$Enums.UserRole;
216
- schoolId: string | null;
217
- }[];
218
- } & {
219
- id: string;
220
- schoolId: string | null;
221
- name: string;
222
- subject: string;
223
- color: string | null;
224
- section: string;
225
- syllabus: string | null;
226
- };
227
- } & {
228
- id: string;
229
- createdAt: Date;
230
- classId: string;
231
- remarks: string;
232
- modifiedAt: Date | null;
233
- teacherId: string;
234
- }) | null;
235
241
  folder: ({
236
242
  class: ({
237
243
  students: {
@@ -253,33 +259,29 @@ export declare function findFileById(fileId: string): import(".prisma/client").P
253
259
  schoolId: string | null;
254
260
  }[];
255
261
  } & {
262
+ name: string;
256
263
  id: string;
257
264
  schoolId: string | null;
258
- name: string;
259
265
  subject: string;
260
266
  color: string | null;
261
267
  section: string;
262
268
  syllabus: string | null;
263
269
  }) | null;
264
270
  } & {
265
- id: string;
266
- classId: string | null;
267
271
  name: string;
272
+ id: string;
268
273
  color: string | null;
274
+ classId: string | null;
269
275
  parentFolderId: string | null;
270
276
  }) | null;
271
277
  } & {
272
278
  path: string;
273
279
  type: string;
274
- id: string;
275
- userId: string | null;
276
280
  name: string;
281
+ id: string;
277
282
  size: number | null;
283
+ userId: string | null;
278
284
  uploadedAt: Date | null;
279
- assignmentId: string | null;
280
- submissionId: string | null;
281
- thumbnailId: string | null;
282
- annotationId: string | null;
283
285
  uploadStatus: import(".prisma/client").$Enums.UploadStatus;
284
286
  uploadUrl: string | null;
285
287
  uploadExpiresAt: Date | null;
@@ -289,44 +291,50 @@ export declare function findFileById(fileId: string): import(".prisma/client").P
289
291
  uploadRetryCount: number;
290
292
  isOrphaned: boolean;
291
293
  cleanupAt: Date | null;
294
+ thumbnailId: string | null;
295
+ assignmentId: string | null;
296
+ submissionId: string | null;
297
+ annotationId: string | null;
292
298
  classDraftId: string | null;
293
299
  folderId: string | null;
294
300
  conversationId: string | null;
295
301
  messageId: string | null;
296
302
  announcementId: string | null;
297
303
  schoolDevelopementProgramId: string | null;
298
- }) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;
304
+ }) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
305
+ datasources: {
306
+ db: {
307
+ url: string;
308
+ };
309
+ };
310
+ }>;
299
311
  /** @returns File with folder and class. */
300
312
  export declare function findFileWithFolder(fileId: string): import(".prisma/client").Prisma.Prisma__FileClient<({
301
313
  folder: ({
302
314
  class: {
315
+ name: string;
303
316
  id: string;
304
317
  schoolId: string | null;
305
- name: string;
306
318
  subject: string;
307
319
  color: string | null;
308
320
  section: string;
309
321
  syllabus: string | null;
310
322
  } | null;
311
323
  } & {
312
- id: string;
313
- classId: string | null;
314
324
  name: string;
325
+ id: string;
315
326
  color: string | null;
327
+ classId: string | null;
316
328
  parentFolderId: string | null;
317
329
  }) | null;
318
330
  } & {
319
331
  path: string;
320
332
  type: string;
321
- id: string;
322
- userId: string | null;
323
333
  name: string;
334
+ id: string;
324
335
  size: number | null;
336
+ userId: string | null;
325
337
  uploadedAt: Date | null;
326
- assignmentId: string | null;
327
- submissionId: string | null;
328
- thumbnailId: string | null;
329
- annotationId: string | null;
330
338
  uploadStatus: import(".prisma/client").$Enums.UploadStatus;
331
339
  uploadUrl: string | null;
332
340
  uploadExpiresAt: Date | null;
@@ -336,27 +344,33 @@ export declare function findFileWithFolder(fileId: string): import(".prisma/clie
336
344
  uploadRetryCount: number;
337
345
  isOrphaned: boolean;
338
346
  cleanupAt: Date | null;
347
+ thumbnailId: string | null;
348
+ assignmentId: string | null;
349
+ submissionId: string | null;
350
+ annotationId: string | null;
339
351
  classDraftId: string | null;
340
352
  folderId: string | null;
341
353
  conversationId: string | null;
342
354
  messageId: string | null;
343
355
  announcementId: string | null;
344
356
  schoolDevelopementProgramId: string | null;
345
- }) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;
357
+ }) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
358
+ datasources: {
359
+ db: {
360
+ url: string;
361
+ };
362
+ };
363
+ }>;
346
364
  /** @returns File with folder and thumbnail. */
347
365
  export declare function findFileWithFolderAndThumbnail(fileId: string): import(".prisma/client").Prisma.Prisma__FileClient<({
348
366
  thumbnail: {
349
367
  path: string;
350
368
  type: string;
351
- id: string;
352
- userId: string | null;
353
369
  name: string;
370
+ id: string;
354
371
  size: number | null;
372
+ userId: string | null;
355
373
  uploadedAt: Date | null;
356
- assignmentId: string | null;
357
- submissionId: string | null;
358
- thumbnailId: string | null;
359
- annotationId: string | null;
360
374
  uploadStatus: import(".prisma/client").$Enums.UploadStatus;
361
375
  uploadUrl: string | null;
362
376
  uploadExpiresAt: Date | null;
@@ -366,6 +380,10 @@ export declare function findFileWithFolderAndThumbnail(fileId: string): import("
366
380
  uploadRetryCount: number;
367
381
  isOrphaned: boolean;
368
382
  cleanupAt: Date | null;
383
+ thumbnailId: string | null;
384
+ assignmentId: string | null;
385
+ submissionId: string | null;
386
+ annotationId: string | null;
369
387
  classDraftId: string | null;
370
388
  folderId: string | null;
371
389
  conversationId: string | null;
@@ -375,33 +393,29 @@ export declare function findFileWithFolderAndThumbnail(fileId: string): import("
375
393
  } | null;
376
394
  folder: ({
377
395
  class: {
396
+ name: string;
378
397
  id: string;
379
398
  schoolId: string | null;
380
- name: string;
381
399
  subject: string;
382
400
  color: string | null;
383
401
  section: string;
384
402
  syllabus: string | null;
385
403
  } | null;
386
404
  } & {
387
- id: string;
388
- classId: string | null;
389
405
  name: string;
406
+ id: string;
390
407
  color: string | null;
408
+ classId: string | null;
391
409
  parentFolderId: string | null;
392
410
  }) | null;
393
411
  } & {
394
412
  path: string;
395
413
  type: string;
396
- id: string;
397
- userId: string | null;
398
414
  name: string;
415
+ id: string;
399
416
  size: number | null;
417
+ userId: string | null;
400
418
  uploadedAt: Date | null;
401
- assignmentId: string | null;
402
- submissionId: string | null;
403
- thumbnailId: string | null;
404
- annotationId: string | null;
405
419
  uploadStatus: import(".prisma/client").$Enums.UploadStatus;
406
420
  uploadUrl: string | null;
407
421
  uploadExpiresAt: Date | null;
@@ -411,31 +425,47 @@ export declare function findFileWithFolderAndThumbnail(fileId: string): import("
411
425
  uploadRetryCount: number;
412
426
  isOrphaned: boolean;
413
427
  cleanupAt: Date | null;
428
+ thumbnailId: string | null;
429
+ assignmentId: string | null;
430
+ submissionId: string | null;
431
+ annotationId: string | null;
414
432
  classDraftId: string | null;
415
433
  folderId: string | null;
416
434
  conversationId: string | null;
417
435
  messageId: string | null;
418
436
  announcementId: string | null;
419
437
  schoolDevelopementProgramId: string | null;
420
- }) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;
438
+ }) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
439
+ datasources: {
440
+ db: {
441
+ url: string;
442
+ };
443
+ };
444
+ }>;
421
445
  /** @returns Folder by ID with class. */
422
446
  export declare function findFolderById(folderId: string): import(".prisma/client").Prisma.Prisma__FolderClient<({
423
447
  class: {
448
+ name: string;
424
449
  id: string;
425
450
  schoolId: string | null;
426
- name: string;
427
451
  subject: string;
428
452
  color: string | null;
429
453
  section: string;
430
454
  syllabus: string | null;
431
455
  } | null;
432
456
  } & {
433
- id: string;
434
- classId: string | null;
435
457
  name: string;
458
+ id: string;
436
459
  color: string | null;
460
+ classId: string | null;
437
461
  parentFolderId: string | null;
438
- }) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;
462
+ }) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
463
+ datasources: {
464
+ db: {
465
+ url: string;
466
+ };
467
+ };
468
+ }>;
439
469
  /** Move file to a folder. */
440
470
  export declare function updateFileFolder(fileId: string, folderId: string): import(".prisma/client").Prisma.Prisma__FileClient<{
441
471
  user: {
@@ -445,15 +475,11 @@ export declare function updateFileFolder(fileId: string, folderId: string): impo
445
475
  } & {
446
476
  path: string;
447
477
  type: string;
448
- id: string;
449
- userId: string | null;
450
478
  name: string;
479
+ id: string;
451
480
  size: number | null;
481
+ userId: string | null;
452
482
  uploadedAt: Date | null;
453
- assignmentId: string | null;
454
- submissionId: string | null;
455
- thumbnailId: string | null;
456
- annotationId: string | null;
457
483
  uploadStatus: import(".prisma/client").$Enums.UploadStatus;
458
484
  uploadUrl: string | null;
459
485
  uploadExpiresAt: Date | null;
@@ -463,13 +489,23 @@ export declare function updateFileFolder(fileId: string, folderId: string): impo
463
489
  uploadRetryCount: number;
464
490
  isOrphaned: boolean;
465
491
  cleanupAt: Date | null;
492
+ thumbnailId: string | null;
493
+ assignmentId: string | null;
494
+ submissionId: string | null;
495
+ annotationId: string | null;
466
496
  classDraftId: string | null;
467
497
  folderId: string | null;
468
498
  conversationId: string | null;
469
499
  messageId: string | null;
470
500
  announcementId: string | null;
471
501
  schoolDevelopementProgramId: string | null;
472
- }, never, import("@prisma/client/runtime/library.js").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;
502
+ }, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
503
+ datasources: {
504
+ db: {
505
+ url: string;
506
+ };
507
+ };
508
+ }>;
473
509
  /** Rename a file. */
474
510
  export declare function updateFileName(fileId: string, name: string): import(".prisma/client").Prisma.Prisma__FileClient<{
475
511
  user: {
@@ -479,15 +515,11 @@ export declare function updateFileName(fileId: string, name: string): import(".p
479
515
  } & {
480
516
  path: string;
481
517
  type: string;
482
- id: string;
483
- userId: string | null;
484
518
  name: string;
519
+ id: string;
485
520
  size: number | null;
521
+ userId: string | null;
486
522
  uploadedAt: Date | null;
487
- assignmentId: string | null;
488
- submissionId: string | null;
489
- thumbnailId: string | null;
490
- annotationId: string | null;
491
523
  uploadStatus: import(".prisma/client").$Enums.UploadStatus;
492
524
  uploadUrl: string | null;
493
525
  uploadExpiresAt: Date | null;
@@ -497,26 +529,32 @@ export declare function updateFileName(fileId: string, name: string): import(".p
497
529
  uploadRetryCount: number;
498
530
  isOrphaned: boolean;
499
531
  cleanupAt: Date | null;
532
+ thumbnailId: string | null;
533
+ assignmentId: string | null;
534
+ submissionId: string | null;
535
+ annotationId: string | null;
500
536
  classDraftId: string | null;
501
537
  folderId: string | null;
502
538
  conversationId: string | null;
503
539
  messageId: string | null;
504
540
  announcementId: string | null;
505
541
  schoolDevelopementProgramId: string | null;
506
- }, never, import("@prisma/client/runtime/library.js").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;
542
+ }, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
543
+ datasources: {
544
+ db: {
545
+ url: string;
546
+ };
547
+ };
548
+ }>;
507
549
  /** Delete a file record. */
508
550
  export declare function deleteFileById(fileId: string): import(".prisma/client").Prisma.Prisma__FileClient<{
509
551
  path: string;
510
552
  type: string;
511
- id: string;
512
- userId: string | null;
513
553
  name: string;
554
+ id: string;
514
555
  size: number | null;
556
+ userId: string | null;
515
557
  uploadedAt: Date | null;
516
- assignmentId: string | null;
517
- submissionId: string | null;
518
- thumbnailId: string | null;
519
- annotationId: string | null;
520
558
  uploadStatus: import(".prisma/client").$Enums.UploadStatus;
521
559
  uploadUrl: string | null;
522
560
  uploadExpiresAt: Date | null;
@@ -526,11 +564,21 @@ export declare function deleteFileById(fileId: string): import(".prisma/client")
526
564
  uploadRetryCount: number;
527
565
  isOrphaned: boolean;
528
566
  cleanupAt: Date | null;
567
+ thumbnailId: string | null;
568
+ assignmentId: string | null;
569
+ submissionId: string | null;
570
+ annotationId: string | null;
529
571
  classDraftId: string | null;
530
572
  folderId: string | null;
531
573
  conversationId: string | null;
532
574
  messageId: string | null;
533
575
  announcementId: string | null;
534
576
  schoolDevelopementProgramId: string | null;
535
- }, never, import("@prisma/client/runtime/library.js").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;
577
+ }, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
578
+ datasources: {
579
+ db: {
580
+ url: string;
581
+ };
582
+ };
583
+ }>;
536
584
  //# sourceMappingURL=file.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"file.d.ts","sourceRoot":"/","sources":["models/file.ts"],"names":[],"mappings":"AAKA,0GAA0G;AAC1G,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+HAgE1C;AAED,2CAA2C;AAC3C,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+HAOhD;AAED,+CAA+C;AAC/C,wBAAgB,8BAA8B,CAAC,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+HAQ5D;AAED,wCAAwC;AACxC,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM;;;;;;;;;;;;;;;;+HAK9C;AAED,6BAA6B;AAC7B,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wHAQhE;AAED,qBAAqB;AACrB,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wHAQ1D;AAED,4BAA4B;AAC5B,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;wHAI5C"}
1
+ {"version":3,"file":"file.d.ts","sourceRoot":"/","sources":["models/file.ts"],"names":[],"mappings":"AAKA,0GAA0G;AAC1G,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgE1C;AAED,2CAA2C;AAC3C,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAOhD;AAED,+CAA+C;AAC/C,wBAAgB,8BAA8B,CAAC,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAQ5D;AAED,wCAAwC;AACxC,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;GAK9C;AAED,6BAA6B;AAC7B,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAQhE;AAED,qBAAqB;AACrB,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAQ1D;AAED,4BAA4B;AAC5B,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAI5C"}