@studious-lms/server 1.4.2 → 1.4.3
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/dist/index.d.ts.map +1 -1
- package/dist/index.js +67 -28
- 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 +378 -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/routers/_app.d.ts +124 -18
- 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 +8 -6
- package/dist/routers/worksheet.d.ts.map +1 -1
- package/dist/routers/worksheet.js +18 -16
- 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 +15 -15
- package/dist/services/worksheet.d.ts.map +1 -1
- package/dist/services/worksheet.js +138 -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 +9 -1
- package/dist/utils/inference.d.ts.map +1 -1
- package/dist/utils/inference.js +138 -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 +80 -28
- 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 +202 -0
- package/src/pipelines/aiLabChat.ts +9 -1
- package/src/pipelines/aiNewtonChat.ts +24 -14
- package/src/pipelines/gradeWorksheet.ts +8 -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 +31 -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 +191 -51
- package/src/trpc.ts +12 -18
- package/src/utils/inference.ts +209 -55
- package/tests/globalSetup.ts +13 -4
- 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 +218 -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;
|
|
@@ -133,8 +247,8 @@ export declare function createWorksheetQuestion(data: {
|
|
|
133
247
|
options?: object;
|
|
134
248
|
markScheme?: object;
|
|
135
249
|
}): import(".prisma/client").Prisma.Prisma__WorksheetQuestionClient<{
|
|
136
|
-
options: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
137
250
|
type: import(".prisma/client").$Enums.WorksheetQuestionType;
|
|
251
|
+
options: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
138
252
|
id: string;
|
|
139
253
|
createdAt: Date;
|
|
140
254
|
order: number | null;
|
|
@@ -153,8 +267,8 @@ export declare function createWorksheetQuestion(data: {
|
|
|
153
267
|
}>;
|
|
154
268
|
/** Update question order. */
|
|
155
269
|
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
270
|
type: import(".prisma/client").$Enums.WorksheetQuestionType;
|
|
271
|
+
options: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
158
272
|
id: string;
|
|
159
273
|
createdAt: Date;
|
|
160
274
|
order: number | null;
|
|
@@ -180,8 +294,8 @@ export declare function updateWorksheetQuestion(id: string, data: {
|
|
|
180
294
|
markScheme?: object;
|
|
181
295
|
type?: WorksheetQuestionType;
|
|
182
296
|
}): import(".prisma/client").Prisma.Prisma__WorksheetQuestionClient<{
|
|
183
|
-
options: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
184
297
|
type: import(".prisma/client").$Enums.WorksheetQuestionType;
|
|
298
|
+
options: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
185
299
|
id: string;
|
|
186
300
|
createdAt: Date;
|
|
187
301
|
order: number | null;
|
|
@@ -200,8 +314,8 @@ export declare function updateWorksheetQuestion(id: string, data: {
|
|
|
200
314
|
}>;
|
|
201
315
|
/** Delete a worksheet question. */
|
|
202
316
|
export declare function deleteWorksheetQuestion(id: string): import(".prisma/client").Prisma.Prisma__WorksheetQuestionClient<{
|
|
203
|
-
options: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
204
317
|
type: import(".prisma/client").$Enums.WorksheetQuestionType;
|
|
318
|
+
options: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
205
319
|
id: string;
|
|
206
320
|
createdAt: Date;
|
|
207
321
|
order: number | null;
|
|
@@ -242,6 +356,17 @@ export declare function findSubmissionById(id: string): import(".prisma/client")
|
|
|
242
356
|
};
|
|
243
357
|
};
|
|
244
358
|
}>;
|
|
359
|
+
/** @returns Submission if requester is the owning student or a class teacher for the worksheet. */
|
|
360
|
+
export declare function findSubmissionByIdForWorksheetAccess(id: string, worksheetId: string, worksheetClassId: string, userId: string): import(".prisma/client").Prisma.Prisma__SubmissionClient<{
|
|
361
|
+
id: string;
|
|
362
|
+
studentId: string;
|
|
363
|
+
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
364
|
+
datasources: {
|
|
365
|
+
db: {
|
|
366
|
+
url: string;
|
|
367
|
+
};
|
|
368
|
+
};
|
|
369
|
+
}>;
|
|
245
370
|
/** @returns Worksheet response for submission and worksheet. */
|
|
246
371
|
export declare function findWorksheetResponseBySubmissionAndWorksheet(submissionId: string, worksheetId: string): import(".prisma/client").Prisma.Prisma__StudentWorksheetResponseClient<({
|
|
247
372
|
responses: ({
|
|
@@ -380,6 +505,84 @@ export declare function findWorksheetResponseById(id: string): import(".prisma/c
|
|
|
380
505
|
};
|
|
381
506
|
};
|
|
382
507
|
}>;
|
|
508
|
+
/** @returns Worksheet response if requester is the owning student. */
|
|
509
|
+
export declare function findWorksheetResponseByIdForStudent(id: string, userId: string): import(".prisma/client").Prisma.Prisma__StudentWorksheetResponseClient<({
|
|
510
|
+
worksheet: {
|
|
511
|
+
name: string;
|
|
512
|
+
id: string;
|
|
513
|
+
createdAt: Date;
|
|
514
|
+
classId: string;
|
|
515
|
+
updatedAt: Date;
|
|
516
|
+
};
|
|
517
|
+
responses: {
|
|
518
|
+
status: import(".prisma/client").$Enums.GenerationStatus | null;
|
|
519
|
+
id: string;
|
|
520
|
+
createdAt: Date;
|
|
521
|
+
studentId: string;
|
|
522
|
+
questionId: string;
|
|
523
|
+
response: string;
|
|
524
|
+
isCorrect: boolean;
|
|
525
|
+
markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
526
|
+
points: number;
|
|
527
|
+
feedback: string | null;
|
|
528
|
+
updatedAt: Date | null;
|
|
529
|
+
studentWorksheetResponseId: string | null;
|
|
530
|
+
}[];
|
|
531
|
+
} & {
|
|
532
|
+
id: string;
|
|
533
|
+
submissionId: string | null;
|
|
534
|
+
createdAt: Date;
|
|
535
|
+
studentId: string;
|
|
536
|
+
submittedAt: Date | null;
|
|
537
|
+
submitted: boolean;
|
|
538
|
+
updatedAt: Date;
|
|
539
|
+
worksheetId: string;
|
|
540
|
+
}) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
541
|
+
datasources: {
|
|
542
|
+
db: {
|
|
543
|
+
url: string;
|
|
544
|
+
};
|
|
545
|
+
};
|
|
546
|
+
}>;
|
|
547
|
+
/** @returns Worksheet response if requester is a class teacher. */
|
|
548
|
+
export declare function findWorksheetResponseByIdForTeacher(id: string, userId: string): import(".prisma/client").Prisma.Prisma__StudentWorksheetResponseClient<({
|
|
549
|
+
worksheet: {
|
|
550
|
+
name: string;
|
|
551
|
+
id: string;
|
|
552
|
+
createdAt: Date;
|
|
553
|
+
classId: string;
|
|
554
|
+
updatedAt: Date;
|
|
555
|
+
};
|
|
556
|
+
responses: {
|
|
557
|
+
status: import(".prisma/client").$Enums.GenerationStatus | null;
|
|
558
|
+
id: string;
|
|
559
|
+
createdAt: Date;
|
|
560
|
+
studentId: string;
|
|
561
|
+
questionId: string;
|
|
562
|
+
response: string;
|
|
563
|
+
isCorrect: boolean;
|
|
564
|
+
markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
565
|
+
points: number;
|
|
566
|
+
feedback: string | null;
|
|
567
|
+
updatedAt: Date | null;
|
|
568
|
+
studentWorksheetResponseId: string | null;
|
|
569
|
+
}[];
|
|
570
|
+
} & {
|
|
571
|
+
id: string;
|
|
572
|
+
submissionId: string | null;
|
|
573
|
+
createdAt: Date;
|
|
574
|
+
studentId: string;
|
|
575
|
+
submittedAt: Date | null;
|
|
576
|
+
submitted: boolean;
|
|
577
|
+
updatedAt: Date;
|
|
578
|
+
worksheetId: string;
|
|
579
|
+
}) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
580
|
+
datasources: {
|
|
581
|
+
db: {
|
|
582
|
+
url: string;
|
|
583
|
+
};
|
|
584
|
+
};
|
|
585
|
+
}>;
|
|
383
586
|
/** @returns Worksheet response with question responses. */
|
|
384
587
|
export declare function findWorksheetResponseWithResponses(id: string, questionId?: string): import(".prisma/client").Prisma.Prisma__StudentWorksheetResponseClient<({
|
|
385
588
|
responses: {
|
|
@@ -412,10 +615,88 @@ export declare function findWorksheetResponseWithResponses(id: string, questionI
|
|
|
412
615
|
};
|
|
413
616
|
};
|
|
414
617
|
}>;
|
|
618
|
+
/** @returns Worksheet response with scoped responses if requester is the owning student. */
|
|
619
|
+
export declare function findWorksheetResponseWithResponsesForStudent(id: string, userId: string, questionId?: string): import(".prisma/client").Prisma.Prisma__StudentWorksheetResponseClient<({
|
|
620
|
+
worksheet: {
|
|
621
|
+
name: string;
|
|
622
|
+
id: string;
|
|
623
|
+
createdAt: Date;
|
|
624
|
+
classId: string;
|
|
625
|
+
updatedAt: Date;
|
|
626
|
+
};
|
|
627
|
+
responses: {
|
|
628
|
+
status: import(".prisma/client").$Enums.GenerationStatus | null;
|
|
629
|
+
id: string;
|
|
630
|
+
createdAt: Date;
|
|
631
|
+
studentId: string;
|
|
632
|
+
questionId: string;
|
|
633
|
+
response: string;
|
|
634
|
+
isCorrect: boolean;
|
|
635
|
+
markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
636
|
+
points: number;
|
|
637
|
+
feedback: string | null;
|
|
638
|
+
updatedAt: Date | null;
|
|
639
|
+
studentWorksheetResponseId: string | null;
|
|
640
|
+
}[];
|
|
641
|
+
} & {
|
|
642
|
+
id: string;
|
|
643
|
+
submissionId: string | null;
|
|
644
|
+
createdAt: Date;
|
|
645
|
+
studentId: string;
|
|
646
|
+
submittedAt: Date | null;
|
|
647
|
+
submitted: boolean;
|
|
648
|
+
updatedAt: Date;
|
|
649
|
+
worksheetId: string;
|
|
650
|
+
}) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
651
|
+
datasources: {
|
|
652
|
+
db: {
|
|
653
|
+
url: string;
|
|
654
|
+
};
|
|
655
|
+
};
|
|
656
|
+
}>;
|
|
657
|
+
/** @returns Worksheet response with scoped responses if requester is a class teacher. */
|
|
658
|
+
export declare function findWorksheetResponseWithResponsesForTeacher(id: string, userId: string, questionId?: string): import(".prisma/client").Prisma.Prisma__StudentWorksheetResponseClient<({
|
|
659
|
+
worksheet: {
|
|
660
|
+
name: string;
|
|
661
|
+
id: string;
|
|
662
|
+
createdAt: Date;
|
|
663
|
+
classId: string;
|
|
664
|
+
updatedAt: Date;
|
|
665
|
+
};
|
|
666
|
+
responses: {
|
|
667
|
+
status: import(".prisma/client").$Enums.GenerationStatus | null;
|
|
668
|
+
id: string;
|
|
669
|
+
createdAt: Date;
|
|
670
|
+
studentId: string;
|
|
671
|
+
questionId: string;
|
|
672
|
+
response: string;
|
|
673
|
+
isCorrect: boolean;
|
|
674
|
+
markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
675
|
+
points: number;
|
|
676
|
+
feedback: string | null;
|
|
677
|
+
updatedAt: Date | null;
|
|
678
|
+
studentWorksheetResponseId: string | null;
|
|
679
|
+
}[];
|
|
680
|
+
} & {
|
|
681
|
+
id: string;
|
|
682
|
+
submissionId: string | null;
|
|
683
|
+
createdAt: Date;
|
|
684
|
+
studentId: string;
|
|
685
|
+
submittedAt: Date | null;
|
|
686
|
+
submitted: boolean;
|
|
687
|
+
updatedAt: Date;
|
|
688
|
+
worksheetId: string;
|
|
689
|
+
}) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
690
|
+
datasources: {
|
|
691
|
+
db: {
|
|
692
|
+
url: string;
|
|
693
|
+
};
|
|
694
|
+
};
|
|
695
|
+
}>;
|
|
415
696
|
/** @returns Worksheet question by ID. */
|
|
416
697
|
export declare function findWorksheetQuestionById(id: string): import(".prisma/client").Prisma.Prisma__WorksheetQuestionClient<{
|
|
417
|
-
options: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
418
698
|
type: import(".prisma/client").$Enums.WorksheetQuestionType;
|
|
699
|
+
options: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
419
700
|
id: string;
|
|
420
701
|
createdAt: Date;
|
|
421
702
|
order: number | null;
|
|
@@ -432,6 +713,96 @@ export declare function findWorksheetQuestionById(id: string): import(".prisma/c
|
|
|
432
713
|
};
|
|
433
714
|
};
|
|
434
715
|
}>;
|
|
716
|
+
/** @returns Student question progress if requester is a class teacher. */
|
|
717
|
+
export declare function findStudentQuestionProgressByIdForTeacher(id: string, userId: string): import(".prisma/client").Prisma.Prisma__StudentQuestionProgressClient<({
|
|
718
|
+
studentWorksheetResponse: {
|
|
719
|
+
id: string;
|
|
720
|
+
submissionId: string | null;
|
|
721
|
+
createdAt: Date;
|
|
722
|
+
studentId: string;
|
|
723
|
+
submittedAt: Date | null;
|
|
724
|
+
submitted: boolean;
|
|
725
|
+
updatedAt: Date;
|
|
726
|
+
worksheetId: string;
|
|
727
|
+
} | null;
|
|
728
|
+
question: {
|
|
729
|
+
type: import(".prisma/client").$Enums.WorksheetQuestionType;
|
|
730
|
+
options: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
731
|
+
id: string;
|
|
732
|
+
createdAt: Date;
|
|
733
|
+
order: number | null;
|
|
734
|
+
points: number;
|
|
735
|
+
updatedAt: Date;
|
|
736
|
+
worksheetId: string;
|
|
737
|
+
markScheme: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
738
|
+
question: string;
|
|
739
|
+
answer: string;
|
|
740
|
+
};
|
|
741
|
+
} & {
|
|
742
|
+
status: import(".prisma/client").$Enums.GenerationStatus | null;
|
|
743
|
+
id: string;
|
|
744
|
+
createdAt: Date;
|
|
745
|
+
studentId: string;
|
|
746
|
+
questionId: string;
|
|
747
|
+
response: string;
|
|
748
|
+
isCorrect: boolean;
|
|
749
|
+
markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
750
|
+
points: number;
|
|
751
|
+
feedback: string | null;
|
|
752
|
+
updatedAt: Date | null;
|
|
753
|
+
studentWorksheetResponseId: string | null;
|
|
754
|
+
}) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
755
|
+
datasources: {
|
|
756
|
+
db: {
|
|
757
|
+
url: string;
|
|
758
|
+
};
|
|
759
|
+
};
|
|
760
|
+
}>;
|
|
761
|
+
/** @returns Student question progress by id and worksheet response if requester is a class teacher. */
|
|
762
|
+
export declare function findStudentQuestionProgressByIdForTeacherAndResponse(id: string, studentWorksheetResponseId: string, userId: string): import(".prisma/client").Prisma.Prisma__StudentQuestionProgressClient<({
|
|
763
|
+
studentWorksheetResponse: {
|
|
764
|
+
id: string;
|
|
765
|
+
submissionId: string | null;
|
|
766
|
+
createdAt: Date;
|
|
767
|
+
studentId: string;
|
|
768
|
+
submittedAt: Date | null;
|
|
769
|
+
submitted: boolean;
|
|
770
|
+
updatedAt: Date;
|
|
771
|
+
worksheetId: string;
|
|
772
|
+
} | null;
|
|
773
|
+
question: {
|
|
774
|
+
type: import(".prisma/client").$Enums.WorksheetQuestionType;
|
|
775
|
+
options: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
776
|
+
id: string;
|
|
777
|
+
createdAt: Date;
|
|
778
|
+
order: number | null;
|
|
779
|
+
points: number;
|
|
780
|
+
updatedAt: Date;
|
|
781
|
+
worksheetId: string;
|
|
782
|
+
markScheme: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
783
|
+
question: string;
|
|
784
|
+
answer: string;
|
|
785
|
+
};
|
|
786
|
+
} & {
|
|
787
|
+
status: import(".prisma/client").$Enums.GenerationStatus | null;
|
|
788
|
+
id: string;
|
|
789
|
+
createdAt: Date;
|
|
790
|
+
studentId: string;
|
|
791
|
+
questionId: string;
|
|
792
|
+
response: string;
|
|
793
|
+
isCorrect: boolean;
|
|
794
|
+
markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
795
|
+
points: number;
|
|
796
|
+
feedback: string | null;
|
|
797
|
+
updatedAt: Date | null;
|
|
798
|
+
studentWorksheetResponseId: string | null;
|
|
799
|
+
}) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
800
|
+
datasources: {
|
|
801
|
+
db: {
|
|
802
|
+
url: string;
|
|
803
|
+
};
|
|
804
|
+
};
|
|
805
|
+
}>;
|
|
435
806
|
/** Update student's question progress. */
|
|
436
807
|
export declare function updateStudentQuestionProgress(id: string, data: {
|
|
437
808
|
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,EAAE,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;GAO7E;AAED,yDAAyD;AACzD,wBAAgB,oCAAoC,CAClD,EAAE,EAAE,MAAM,EACV,WAAW,EAAE,MAAM;;;;;;;;;;;;;;;;;;GAKpB;AAED,0BAA0B;AAC1B,wBAAgB,eAAe,CAAC,IAAI,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAA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