@studious-lms/server 1.4.2 → 1.4.4
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.
- package/.coderabbit.yaml +4 -1
- package/.vscode/settings.json +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +68 -29
- package/dist/index.js.map +1 -1
- package/dist/lib/fileUpload.d.ts +10 -2
- package/dist/lib/fileUpload.d.ts.map +1 -1
- package/dist/lib/fileUpload.js +38 -6
- package/dist/lib/fileUpload.js.map +1 -1
- package/dist/middleware/auth.d.ts.map +1 -1
- package/dist/middleware/auth.js +18 -5
- package/dist/middleware/auth.js.map +1 -1
- package/dist/models/auth.d.ts +19 -14
- package/dist/models/auth.d.ts.map +1 -1
- package/dist/models/auth.js +53 -30
- package/dist/models/auth.js.map +1 -1
- package/dist/models/class.d.ts +3 -1
- package/dist/models/class.d.ts.map +1 -1
- package/dist/models/class.js +16 -4
- package/dist/models/class.js.map +1 -1
- package/dist/models/notification.d.ts +11 -10
- package/dist/models/notification.d.ts.map +1 -1
- package/dist/models/notification.js +13 -9
- package/dist/models/notification.js.map +1 -1
- package/dist/models/worksheet.d.ts +379 -7
- package/dist/models/worksheet.d.ts.map +1 -1
- package/dist/models/worksheet.js +168 -2
- package/dist/models/worksheet.js.map +1 -1
- package/dist/pipelines/aiLabChat.d.ts.map +1 -1
- package/dist/pipelines/aiLabChat.js +11 -3
- package/dist/pipelines/aiLabChat.js.map +1 -1
- package/dist/pipelines/aiLabChatContract.d.ts +3 -3
- package/dist/pipelines/aiNewtonChat.d.ts.map +1 -1
- package/dist/pipelines/aiNewtonChat.js +25 -14
- package/dist/pipelines/aiNewtonChat.js.map +1 -1
- package/dist/pipelines/gradeWorksheet.d.ts.map +1 -1
- package/dist/pipelines/gradeWorksheet.js +10 -3
- package/dist/pipelines/gradeWorksheet.js.map +1 -1
- package/dist/pipelines/pdfToWorksheet.d.ts +12 -0
- package/dist/pipelines/pdfToWorksheet.d.ts.map +1 -0
- package/dist/pipelines/pdfToWorksheet.js +155 -0
- package/dist/pipelines/pdfToWorksheet.js.map +1 -0
- package/dist/routers/_app.d.ts +264 -16
- package/dist/routers/_app.d.ts.map +1 -1
- package/dist/routers/class.d.ts +2 -1
- package/dist/routers/class.d.ts.map +1 -1
- package/dist/routers/class.js +3 -3
- package/dist/routers/class.js.map +1 -1
- package/dist/routers/labChat.d.ts +6 -0
- package/dist/routers/labChat.d.ts.map +1 -1
- package/dist/routers/labChat.js +5 -3
- package/dist/routers/labChat.js.map +1 -1
- package/dist/routers/message.d.ts +31 -0
- package/dist/routers/message.d.ts.map +1 -1
- package/dist/routers/message.js +27 -4
- package/dist/routers/message.js.map +1 -1
- package/dist/routers/newtonChat.d.ts +6 -0
- package/dist/routers/newtonChat.d.ts.map +1 -1
- package/dist/routers/newtonChat.js +5 -4
- package/dist/routers/newtonChat.js.map +1 -1
- package/dist/routers/notifications.d.ts +9 -2
- package/dist/routers/notifications.d.ts.map +1 -1
- package/dist/routers/notifications.js +4 -4
- package/dist/routers/notifications.js.map +1 -1
- package/dist/routers/worksheet.d.ts +78 -5
- package/dist/routers/worksheet.d.ts.map +1 -1
- package/dist/routers/worksheet.js +126 -17
- package/dist/routers/worksheet.js.map +1 -1
- package/dist/services/auth.d.ts +1 -1
- package/dist/services/auth.d.ts.map +1 -1
- package/dist/services/auth.js +19 -12
- package/dist/services/auth.js.map +1 -1
- package/dist/services/class.d.ts +1 -1
- package/dist/services/class.d.ts.map +1 -1
- package/dist/services/class.js +6 -3
- package/dist/services/class.js.map +1 -1
- package/dist/services/file.d.ts.map +1 -1
- package/dist/services/file.js +7 -2
- package/dist/services/file.js.map +1 -1
- package/dist/services/labChat.d.ts +6 -0
- package/dist/services/labChat.d.ts.map +1 -1
- package/dist/services/labChat.js +30 -18
- package/dist/services/labChat.js.map +1 -1
- package/dist/services/message.d.ts +30 -0
- package/dist/services/message.d.ts.map +1 -1
- package/dist/services/message.js +97 -21
- package/dist/services/message.js.map +1 -1
- package/dist/services/newtonChat.d.ts +6 -1
- package/dist/services/newtonChat.d.ts.map +1 -1
- package/dist/services/newtonChat.js +36 -18
- package/dist/services/newtonChat.js.map +1 -1
- package/dist/services/notification.d.ts +12 -5
- package/dist/services/notification.d.ts.map +1 -1
- package/dist/services/notification.js +24 -9
- package/dist/services/notification.js.map +1 -1
- package/dist/services/studentProgress.d.ts.map +1 -1
- package/dist/services/studentProgress.js +6 -3
- package/dist/services/studentProgress.js.map +1 -1
- package/dist/services/worksheet.d.ts +36 -15
- package/dist/services/worksheet.d.ts.map +1 -1
- package/dist/services/worksheet.js +186 -54
- package/dist/services/worksheet.js.map +1 -1
- package/dist/trpc.d.ts.map +1 -1
- package/dist/trpc.js +11 -17
- package/dist/trpc.js.map +1 -1
- package/dist/utils/inference.d.ts +10 -1
- package/dist/utils/inference.d.ts.map +1 -1
- package/dist/utils/inference.js +186 -50
- package/dist/utils/inference.js.map +1 -1
- package/package.json +1 -1
- package/prisma/migrations/20260415103500_add_session_type/migration.sql +33 -0
- package/prisma/migrations/20260415133000_add_ai_usage_logs/migration.sql +19 -0
- package/prisma/schema.prisma +27 -1
- package/scripts/test-pre-push.ts +6 -2
- package/src/index.ts +83 -30
- package/src/lib/fileUpload.ts +55 -5
- package/src/middleware/auth.ts +19 -4
- package/src/models/auth.ts +59 -29
- package/src/models/class.ts +15 -4
- package/src/models/notification.ts +13 -7
- package/src/models/worksheet.ts +203 -0
- package/src/pipelines/aiLabChat.ts +9 -1
- package/src/pipelines/aiNewtonChat.ts +24 -14
- package/src/pipelines/gradeWorksheet.ts +8 -0
- package/src/pipelines/pdfToWorksheet.ts +177 -0
- package/src/routers/class.ts +2 -2
- package/src/routers/labChat.ts +3 -1
- package/src/routers/message.ts +38 -1
- package/src/routers/newtonChat.ts +4 -2
- package/src/routers/notifications.ts +2 -2
- package/src/routers/worksheet.ts +174 -19
- package/src/services/auth.ts +26 -12
- package/src/services/class.ts +4 -1
- package/src/services/file.ts +6 -0
- package/src/services/labChat.ts +42 -18
- package/src/services/message.ts +163 -18
- package/src/services/newtonChat.ts +49 -18
- package/src/services/notification.ts +27 -8
- package/src/services/studentProgress.ts +4 -1
- package/src/services/worksheet.ts +252 -51
- package/src/trpc.ts +12 -18
- package/src/utils/inference.ts +280 -56
- package/tests/globalSetup.ts +13 -4
- package/tests/pipelines/pdfToWorksheet.test.ts +176 -0
- package/tests/routers/auth.test.ts +120 -17
- package/tests/routers/class.test.ts +7 -1
- package/tests/routers/message.test.ts +236 -9
- package/tests/routers/newtonChat.test.ts +81 -0
- package/tests/routers/notification.test.ts +12 -0
- package/tests/routers/worksheet.test.ts +194 -0
- package/tests/setup.ts +22 -5
- package/tests/utils/inference.test.ts +255 -0
|
@@ -11,8 +11,8 @@ export declare function findWorksheetById(id: string): import(".prisma/client").
|
|
|
11
11
|
syllabus: string | null;
|
|
12
12
|
} | null;
|
|
13
13
|
questions: {
|
|
14
|
-
options: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
15
14
|
type: import(".prisma/client").$Enums.WorksheetQuestionType;
|
|
15
|
+
options: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
16
16
|
id: string;
|
|
17
17
|
createdAt: Date;
|
|
18
18
|
order: number | null;
|
|
@@ -50,6 +50,80 @@ export declare function findWorksheetByIdMinimal(id: string): import(".prisma/cl
|
|
|
50
50
|
};
|
|
51
51
|
};
|
|
52
52
|
}>;
|
|
53
|
+
/** @returns Worksheet by ID for an authorized class member. */
|
|
54
|
+
export declare function findWorksheetByIdForClassMember(id: string, userId: string): import(".prisma/client").Prisma.Prisma__WorksheetClient<({
|
|
55
|
+
class: {
|
|
56
|
+
name: string;
|
|
57
|
+
id: string;
|
|
58
|
+
schoolId: string | null;
|
|
59
|
+
subject: string;
|
|
60
|
+
color: string | null;
|
|
61
|
+
section: string;
|
|
62
|
+
syllabus: string | null;
|
|
63
|
+
} | null;
|
|
64
|
+
questions: {
|
|
65
|
+
type: import(".prisma/client").$Enums.WorksheetQuestionType;
|
|
66
|
+
options: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
67
|
+
id: string;
|
|
68
|
+
createdAt: Date;
|
|
69
|
+
order: number | null;
|
|
70
|
+
points: number;
|
|
71
|
+
updatedAt: Date;
|
|
72
|
+
worksheetId: string;
|
|
73
|
+
markScheme: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
74
|
+
question: string;
|
|
75
|
+
answer: string;
|
|
76
|
+
}[];
|
|
77
|
+
} & {
|
|
78
|
+
name: string;
|
|
79
|
+
id: string;
|
|
80
|
+
createdAt: Date;
|
|
81
|
+
classId: string;
|
|
82
|
+
updatedAt: Date;
|
|
83
|
+
}) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
84
|
+
datasources: {
|
|
85
|
+
db: {
|
|
86
|
+
url: string;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
}>;
|
|
90
|
+
/** @returns Worksheet by ID for an authorized teacher. */
|
|
91
|
+
export declare function findWorksheetByIdForTeacher(id: string, userId: string): import(".prisma/client").Prisma.Prisma__WorksheetClient<({
|
|
92
|
+
class: {
|
|
93
|
+
name: string;
|
|
94
|
+
id: string;
|
|
95
|
+
schoolId: string | null;
|
|
96
|
+
subject: string;
|
|
97
|
+
color: string | null;
|
|
98
|
+
section: string;
|
|
99
|
+
syllabus: string | null;
|
|
100
|
+
} | null;
|
|
101
|
+
questions: {
|
|
102
|
+
type: import(".prisma/client").$Enums.WorksheetQuestionType;
|
|
103
|
+
options: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
104
|
+
id: string;
|
|
105
|
+
createdAt: Date;
|
|
106
|
+
order: number | null;
|
|
107
|
+
points: number;
|
|
108
|
+
updatedAt: Date;
|
|
109
|
+
worksheetId: string;
|
|
110
|
+
markScheme: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
111
|
+
question: string;
|
|
112
|
+
answer: string;
|
|
113
|
+
}[];
|
|
114
|
+
} & {
|
|
115
|
+
name: string;
|
|
116
|
+
id: string;
|
|
117
|
+
createdAt: Date;
|
|
118
|
+
classId: string;
|
|
119
|
+
updatedAt: Date;
|
|
120
|
+
}) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
121
|
+
datasources: {
|
|
122
|
+
db: {
|
|
123
|
+
url: string;
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
}>;
|
|
53
127
|
/** @returns Worksheets for a class. */
|
|
54
128
|
export declare function findWorksheetsByClassId(classId: string): import(".prisma/client").Prisma.PrismaPromise<({
|
|
55
129
|
questions: {
|
|
@@ -62,6 +136,46 @@ export declare function findWorksheetsByClassId(classId: string): import(".prism
|
|
|
62
136
|
classId: string;
|
|
63
137
|
updatedAt: Date;
|
|
64
138
|
})[]>;
|
|
139
|
+
/** @returns Worksheet question by ID for an authorized teacher. */
|
|
140
|
+
export declare function findWorksheetQuestionByIdForTeacher(id: string, userId: string): import(".prisma/client").Prisma.Prisma__WorksheetQuestionClient<{
|
|
141
|
+
type: import(".prisma/client").$Enums.WorksheetQuestionType;
|
|
142
|
+
options: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
143
|
+
id: string;
|
|
144
|
+
createdAt: Date;
|
|
145
|
+
order: number | null;
|
|
146
|
+
points: number;
|
|
147
|
+
updatedAt: Date;
|
|
148
|
+
worksheetId: string;
|
|
149
|
+
markScheme: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
150
|
+
question: string;
|
|
151
|
+
answer: string;
|
|
152
|
+
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
153
|
+
datasources: {
|
|
154
|
+
db: {
|
|
155
|
+
url: string;
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
}>;
|
|
159
|
+
/** @returns Worksheet question scoped to a worksheet. */
|
|
160
|
+
export declare function findWorksheetQuestionByIdInWorksheet(id: string, worksheetId: string): import(".prisma/client").Prisma.Prisma__WorksheetQuestionClient<{
|
|
161
|
+
type: import(".prisma/client").$Enums.WorksheetQuestionType;
|
|
162
|
+
options: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
163
|
+
id: string;
|
|
164
|
+
createdAt: Date;
|
|
165
|
+
order: number | null;
|
|
166
|
+
points: number;
|
|
167
|
+
updatedAt: Date;
|
|
168
|
+
worksheetId: string;
|
|
169
|
+
markScheme: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
170
|
+
question: string;
|
|
171
|
+
answer: string;
|
|
172
|
+
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
173
|
+
datasources: {
|
|
174
|
+
db: {
|
|
175
|
+
url: string;
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
}>;
|
|
65
179
|
/** Create a worksheet. */
|
|
66
180
|
export declare function createWorksheet(data: {
|
|
67
181
|
classId: string;
|
|
@@ -111,8 +225,8 @@ export declare function deleteWorksheet(id: string): import(".prisma/client").Pr
|
|
|
111
225
|
}>;
|
|
112
226
|
/** @returns Questions for a worksheet. */
|
|
113
227
|
export declare function findQuestionsByWorksheetId(worksheetId: string): import(".prisma/client").Prisma.PrismaPromise<{
|
|
114
|
-
options: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
115
228
|
type: import(".prisma/client").$Enums.WorksheetQuestionType;
|
|
229
|
+
options: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
116
230
|
id: string;
|
|
117
231
|
createdAt: Date;
|
|
118
232
|
order: number | null;
|
|
@@ -132,9 +246,10 @@ export declare function createWorksheetQuestion(data: {
|
|
|
132
246
|
points?: number;
|
|
133
247
|
options?: object;
|
|
134
248
|
markScheme?: object;
|
|
249
|
+
order?: number;
|
|
135
250
|
}): import(".prisma/client").Prisma.Prisma__WorksheetQuestionClient<{
|
|
136
|
-
options: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
137
251
|
type: import(".prisma/client").$Enums.WorksheetQuestionType;
|
|
252
|
+
options: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
138
253
|
id: string;
|
|
139
254
|
createdAt: Date;
|
|
140
255
|
order: number | null;
|
|
@@ -153,8 +268,8 @@ export declare function createWorksheetQuestion(data: {
|
|
|
153
268
|
}>;
|
|
154
269
|
/** Update question order. */
|
|
155
270
|
export declare function updateWorksheetQuestionOrder(id: string, order: number): import(".prisma/client").Prisma.Prisma__WorksheetQuestionClient<{
|
|
156
|
-
options: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
157
271
|
type: import(".prisma/client").$Enums.WorksheetQuestionType;
|
|
272
|
+
options: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
158
273
|
id: string;
|
|
159
274
|
createdAt: Date;
|
|
160
275
|
order: number | null;
|
|
@@ -180,8 +295,8 @@ export declare function updateWorksheetQuestion(id: string, data: {
|
|
|
180
295
|
markScheme?: object;
|
|
181
296
|
type?: WorksheetQuestionType;
|
|
182
297
|
}): import(".prisma/client").Prisma.Prisma__WorksheetQuestionClient<{
|
|
183
|
-
options: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
184
298
|
type: import(".prisma/client").$Enums.WorksheetQuestionType;
|
|
299
|
+
options: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
185
300
|
id: string;
|
|
186
301
|
createdAt: Date;
|
|
187
302
|
order: number | null;
|
|
@@ -200,8 +315,8 @@ export declare function updateWorksheetQuestion(id: string, data: {
|
|
|
200
315
|
}>;
|
|
201
316
|
/** Delete a worksheet question. */
|
|
202
317
|
export declare function deleteWorksheetQuestion(id: string): import(".prisma/client").Prisma.Prisma__WorksheetQuestionClient<{
|
|
203
|
-
options: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
204
318
|
type: import(".prisma/client").$Enums.WorksheetQuestionType;
|
|
319
|
+
options: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
205
320
|
id: string;
|
|
206
321
|
createdAt: Date;
|
|
207
322
|
order: number | null;
|
|
@@ -242,6 +357,17 @@ export declare function findSubmissionById(id: string): import(".prisma/client")
|
|
|
242
357
|
};
|
|
243
358
|
};
|
|
244
359
|
}>;
|
|
360
|
+
/** @returns Submission if requester is the owning student or a class teacher for the worksheet. */
|
|
361
|
+
export declare function findSubmissionByIdForWorksheetAccess(id: string, worksheetId: string, worksheetClassId: string, userId: string): import(".prisma/client").Prisma.Prisma__SubmissionClient<{
|
|
362
|
+
id: string;
|
|
363
|
+
studentId: string;
|
|
364
|
+
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
365
|
+
datasources: {
|
|
366
|
+
db: {
|
|
367
|
+
url: string;
|
|
368
|
+
};
|
|
369
|
+
};
|
|
370
|
+
}>;
|
|
245
371
|
/** @returns Worksheet response for submission and worksheet. */
|
|
246
372
|
export declare function findWorksheetResponseBySubmissionAndWorksheet(submissionId: string, worksheetId: string): import(".prisma/client").Prisma.Prisma__StudentWorksheetResponseClient<({
|
|
247
373
|
responses: ({
|
|
@@ -380,6 +506,84 @@ export declare function findWorksheetResponseById(id: string): import(".prisma/c
|
|
|
380
506
|
};
|
|
381
507
|
};
|
|
382
508
|
}>;
|
|
509
|
+
/** @returns Worksheet response if requester is the owning student. */
|
|
510
|
+
export declare function findWorksheetResponseByIdForStudent(id: string, userId: string): import(".prisma/client").Prisma.Prisma__StudentWorksheetResponseClient<({
|
|
511
|
+
worksheet: {
|
|
512
|
+
name: string;
|
|
513
|
+
id: string;
|
|
514
|
+
createdAt: Date;
|
|
515
|
+
classId: string;
|
|
516
|
+
updatedAt: Date;
|
|
517
|
+
};
|
|
518
|
+
responses: {
|
|
519
|
+
status: import(".prisma/client").$Enums.GenerationStatus | null;
|
|
520
|
+
id: string;
|
|
521
|
+
createdAt: Date;
|
|
522
|
+
studentId: string;
|
|
523
|
+
questionId: string;
|
|
524
|
+
response: string;
|
|
525
|
+
isCorrect: boolean;
|
|
526
|
+
markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
527
|
+
points: number;
|
|
528
|
+
feedback: string | null;
|
|
529
|
+
updatedAt: Date | null;
|
|
530
|
+
studentWorksheetResponseId: string | null;
|
|
531
|
+
}[];
|
|
532
|
+
} & {
|
|
533
|
+
id: string;
|
|
534
|
+
submissionId: string | null;
|
|
535
|
+
createdAt: Date;
|
|
536
|
+
studentId: string;
|
|
537
|
+
submittedAt: Date | null;
|
|
538
|
+
submitted: boolean;
|
|
539
|
+
updatedAt: Date;
|
|
540
|
+
worksheetId: string;
|
|
541
|
+
}) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
542
|
+
datasources: {
|
|
543
|
+
db: {
|
|
544
|
+
url: string;
|
|
545
|
+
};
|
|
546
|
+
};
|
|
547
|
+
}>;
|
|
548
|
+
/** @returns Worksheet response if requester is a class teacher. */
|
|
549
|
+
export declare function findWorksheetResponseByIdForTeacher(id: string, userId: string): import(".prisma/client").Prisma.Prisma__StudentWorksheetResponseClient<({
|
|
550
|
+
worksheet: {
|
|
551
|
+
name: string;
|
|
552
|
+
id: string;
|
|
553
|
+
createdAt: Date;
|
|
554
|
+
classId: string;
|
|
555
|
+
updatedAt: Date;
|
|
556
|
+
};
|
|
557
|
+
responses: {
|
|
558
|
+
status: import(".prisma/client").$Enums.GenerationStatus | null;
|
|
559
|
+
id: string;
|
|
560
|
+
createdAt: Date;
|
|
561
|
+
studentId: string;
|
|
562
|
+
questionId: string;
|
|
563
|
+
response: string;
|
|
564
|
+
isCorrect: boolean;
|
|
565
|
+
markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
566
|
+
points: number;
|
|
567
|
+
feedback: string | null;
|
|
568
|
+
updatedAt: Date | null;
|
|
569
|
+
studentWorksheetResponseId: string | null;
|
|
570
|
+
}[];
|
|
571
|
+
} & {
|
|
572
|
+
id: string;
|
|
573
|
+
submissionId: string | null;
|
|
574
|
+
createdAt: Date;
|
|
575
|
+
studentId: string;
|
|
576
|
+
submittedAt: Date | null;
|
|
577
|
+
submitted: boolean;
|
|
578
|
+
updatedAt: Date;
|
|
579
|
+
worksheetId: string;
|
|
580
|
+
}) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
581
|
+
datasources: {
|
|
582
|
+
db: {
|
|
583
|
+
url: string;
|
|
584
|
+
};
|
|
585
|
+
};
|
|
586
|
+
}>;
|
|
383
587
|
/** @returns Worksheet response with question responses. */
|
|
384
588
|
export declare function findWorksheetResponseWithResponses(id: string, questionId?: string): import(".prisma/client").Prisma.Prisma__StudentWorksheetResponseClient<({
|
|
385
589
|
responses: {
|
|
@@ -412,10 +616,88 @@ export declare function findWorksheetResponseWithResponses(id: string, questionI
|
|
|
412
616
|
};
|
|
413
617
|
};
|
|
414
618
|
}>;
|
|
619
|
+
/** @returns Worksheet response with scoped responses if requester is the owning student. */
|
|
620
|
+
export declare function findWorksheetResponseWithResponsesForStudent(id: string, userId: string, questionId?: string): import(".prisma/client").Prisma.Prisma__StudentWorksheetResponseClient<({
|
|
621
|
+
worksheet: {
|
|
622
|
+
name: string;
|
|
623
|
+
id: string;
|
|
624
|
+
createdAt: Date;
|
|
625
|
+
classId: string;
|
|
626
|
+
updatedAt: Date;
|
|
627
|
+
};
|
|
628
|
+
responses: {
|
|
629
|
+
status: import(".prisma/client").$Enums.GenerationStatus | null;
|
|
630
|
+
id: string;
|
|
631
|
+
createdAt: Date;
|
|
632
|
+
studentId: string;
|
|
633
|
+
questionId: string;
|
|
634
|
+
response: string;
|
|
635
|
+
isCorrect: boolean;
|
|
636
|
+
markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
637
|
+
points: number;
|
|
638
|
+
feedback: string | null;
|
|
639
|
+
updatedAt: Date | null;
|
|
640
|
+
studentWorksheetResponseId: string | null;
|
|
641
|
+
}[];
|
|
642
|
+
} & {
|
|
643
|
+
id: string;
|
|
644
|
+
submissionId: string | null;
|
|
645
|
+
createdAt: Date;
|
|
646
|
+
studentId: string;
|
|
647
|
+
submittedAt: Date | null;
|
|
648
|
+
submitted: boolean;
|
|
649
|
+
updatedAt: Date;
|
|
650
|
+
worksheetId: string;
|
|
651
|
+
}) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
652
|
+
datasources: {
|
|
653
|
+
db: {
|
|
654
|
+
url: string;
|
|
655
|
+
};
|
|
656
|
+
};
|
|
657
|
+
}>;
|
|
658
|
+
/** @returns Worksheet response with scoped responses if requester is a class teacher. */
|
|
659
|
+
export declare function findWorksheetResponseWithResponsesForTeacher(id: string, userId: string, questionId?: string): import(".prisma/client").Prisma.Prisma__StudentWorksheetResponseClient<({
|
|
660
|
+
worksheet: {
|
|
661
|
+
name: string;
|
|
662
|
+
id: string;
|
|
663
|
+
createdAt: Date;
|
|
664
|
+
classId: string;
|
|
665
|
+
updatedAt: Date;
|
|
666
|
+
};
|
|
667
|
+
responses: {
|
|
668
|
+
status: import(".prisma/client").$Enums.GenerationStatus | null;
|
|
669
|
+
id: string;
|
|
670
|
+
createdAt: Date;
|
|
671
|
+
studentId: string;
|
|
672
|
+
questionId: string;
|
|
673
|
+
response: string;
|
|
674
|
+
isCorrect: boolean;
|
|
675
|
+
markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
676
|
+
points: number;
|
|
677
|
+
feedback: string | null;
|
|
678
|
+
updatedAt: Date | null;
|
|
679
|
+
studentWorksheetResponseId: string | null;
|
|
680
|
+
}[];
|
|
681
|
+
} & {
|
|
682
|
+
id: string;
|
|
683
|
+
submissionId: string | null;
|
|
684
|
+
createdAt: Date;
|
|
685
|
+
studentId: string;
|
|
686
|
+
submittedAt: Date | null;
|
|
687
|
+
submitted: boolean;
|
|
688
|
+
updatedAt: Date;
|
|
689
|
+
worksheetId: string;
|
|
690
|
+
}) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
691
|
+
datasources: {
|
|
692
|
+
db: {
|
|
693
|
+
url: string;
|
|
694
|
+
};
|
|
695
|
+
};
|
|
696
|
+
}>;
|
|
415
697
|
/** @returns Worksheet question by ID. */
|
|
416
698
|
export declare function findWorksheetQuestionById(id: string): import(".prisma/client").Prisma.Prisma__WorksheetQuestionClient<{
|
|
417
|
-
options: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
418
699
|
type: import(".prisma/client").$Enums.WorksheetQuestionType;
|
|
700
|
+
options: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
419
701
|
id: string;
|
|
420
702
|
createdAt: Date;
|
|
421
703
|
order: number | null;
|
|
@@ -432,6 +714,96 @@ export declare function findWorksheetQuestionById(id: string): import(".prisma/c
|
|
|
432
714
|
};
|
|
433
715
|
};
|
|
434
716
|
}>;
|
|
717
|
+
/** @returns Student question progress if requester is a class teacher. */
|
|
718
|
+
export declare function findStudentQuestionProgressByIdForTeacher(id: string, userId: string): import(".prisma/client").Prisma.Prisma__StudentQuestionProgressClient<({
|
|
719
|
+
studentWorksheetResponse: {
|
|
720
|
+
id: string;
|
|
721
|
+
submissionId: string | null;
|
|
722
|
+
createdAt: Date;
|
|
723
|
+
studentId: string;
|
|
724
|
+
submittedAt: Date | null;
|
|
725
|
+
submitted: boolean;
|
|
726
|
+
updatedAt: Date;
|
|
727
|
+
worksheetId: string;
|
|
728
|
+
} | null;
|
|
729
|
+
question: {
|
|
730
|
+
type: import(".prisma/client").$Enums.WorksheetQuestionType;
|
|
731
|
+
options: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
732
|
+
id: string;
|
|
733
|
+
createdAt: Date;
|
|
734
|
+
order: number | null;
|
|
735
|
+
points: number;
|
|
736
|
+
updatedAt: Date;
|
|
737
|
+
worksheetId: string;
|
|
738
|
+
markScheme: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
739
|
+
question: string;
|
|
740
|
+
answer: string;
|
|
741
|
+
};
|
|
742
|
+
} & {
|
|
743
|
+
status: import(".prisma/client").$Enums.GenerationStatus | null;
|
|
744
|
+
id: string;
|
|
745
|
+
createdAt: Date;
|
|
746
|
+
studentId: string;
|
|
747
|
+
questionId: string;
|
|
748
|
+
response: string;
|
|
749
|
+
isCorrect: boolean;
|
|
750
|
+
markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
751
|
+
points: number;
|
|
752
|
+
feedback: string | null;
|
|
753
|
+
updatedAt: Date | null;
|
|
754
|
+
studentWorksheetResponseId: string | null;
|
|
755
|
+
}) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
756
|
+
datasources: {
|
|
757
|
+
db: {
|
|
758
|
+
url: string;
|
|
759
|
+
};
|
|
760
|
+
};
|
|
761
|
+
}>;
|
|
762
|
+
/** @returns Student question progress by id and worksheet response if requester is a class teacher. */
|
|
763
|
+
export declare function findStudentQuestionProgressByIdForTeacherAndResponse(id: string, studentWorksheetResponseId: string, userId: string): import(".prisma/client").Prisma.Prisma__StudentQuestionProgressClient<({
|
|
764
|
+
studentWorksheetResponse: {
|
|
765
|
+
id: string;
|
|
766
|
+
submissionId: string | null;
|
|
767
|
+
createdAt: Date;
|
|
768
|
+
studentId: string;
|
|
769
|
+
submittedAt: Date | null;
|
|
770
|
+
submitted: boolean;
|
|
771
|
+
updatedAt: Date;
|
|
772
|
+
worksheetId: string;
|
|
773
|
+
} | null;
|
|
774
|
+
question: {
|
|
775
|
+
type: import(".prisma/client").$Enums.WorksheetQuestionType;
|
|
776
|
+
options: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
777
|
+
id: string;
|
|
778
|
+
createdAt: Date;
|
|
779
|
+
order: number | null;
|
|
780
|
+
points: number;
|
|
781
|
+
updatedAt: Date;
|
|
782
|
+
worksheetId: string;
|
|
783
|
+
markScheme: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
784
|
+
question: string;
|
|
785
|
+
answer: string;
|
|
786
|
+
};
|
|
787
|
+
} & {
|
|
788
|
+
status: import(".prisma/client").$Enums.GenerationStatus | null;
|
|
789
|
+
id: string;
|
|
790
|
+
createdAt: Date;
|
|
791
|
+
studentId: string;
|
|
792
|
+
questionId: string;
|
|
793
|
+
response: string;
|
|
794
|
+
isCorrect: boolean;
|
|
795
|
+
markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
796
|
+
points: number;
|
|
797
|
+
feedback: string | null;
|
|
798
|
+
updatedAt: Date | null;
|
|
799
|
+
studentWorksheetResponseId: string | null;
|
|
800
|
+
}) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
801
|
+
datasources: {
|
|
802
|
+
db: {
|
|
803
|
+
url: string;
|
|
804
|
+
};
|
|
805
|
+
};
|
|
806
|
+
}>;
|
|
435
807
|
/** Update student's question progress. */
|
|
436
808
|
export declare function updateStudentQuestionProgress(id: string, data: {
|
|
437
809
|
response?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worksheet.d.ts","sourceRoot":"/","sources":["models/worksheet.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"worksheet.d.ts","sourceRoot":"/","sources":["models/worksheet.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAiB9E,mDAAmD;AACnD,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAQ3C;AAED,0CAA0C;AAC1C,wBAAgB,wBAAwB,CAAC,EAAE,EAAE,MAAM;;;;;;;;;;;;GAIlD;AAED,+DAA+D;AAC/D,wBAAgB,+BAA+B,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAWzE;AAED,0DAA0D;AAC1D,wBAAgB,2BAA2B,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAWrE;AAED,uCAAuC;AACvC,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM;;;;;;;;;;MAQtD;AAED,mEAAmE;AACnE,wBAAgB,mCAAmC,CAAC,EAAE,EAAE,MAAM,E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