@studious-lms/server 1.4.1 → 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/.env.example +6 -0
- package/.env.test.example +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +101 -76
- package/dist/index.js.map +1 -1
- package/dist/lib/config/cors.d.ts +16 -0
- package/dist/lib/config/cors.d.ts.map +1 -0
- package/dist/lib/config/cors.js +75 -0
- package/dist/lib/config/cors.js.map +1 -0
- package/dist/lib/config/env.d.ts +14 -0
- package/dist/lib/config/env.d.ts.map +1 -1
- package/dist/lib/config/env.js +9 -2
- package/dist/lib/config/env.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/lib/prisma.d.ts +14 -2
- package/dist/lib/prisma.d.ts.map +1 -1
- package/dist/lib/prisma.js +27 -8
- package/dist/lib/prisma.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/middleware/security.d.ts.map +1 -1
- package/dist/middleware/security.js +3 -3
- package/dist/middleware/security.js.map +1 -1
- package/dist/models/agenda.d.ts +16 -16
- package/dist/models/announcement.d.ts +59 -23
- package/dist/models/announcement.d.ts.map +1 -1
- package/dist/models/assignment.d.ts +363 -276
- package/dist/models/assignment.d.ts.map +1 -1
- package/dist/models/attendance.d.ts +63 -21
- package/dist/models/attendance.d.ts.map +1 -1
- package/dist/models/auth.d.ts +115 -26
- 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 +115 -65
- 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/comment.d.ts +52 -16
- package/dist/models/comment.d.ts.map +1 -1
- package/dist/models/conversation.d.ts +46 -16
- package/dist/models/conversation.d.ts.map +1 -1
- package/dist/models/event.d.ts +107 -53
- package/dist/models/event.d.ts.map +1 -1
- package/dist/models/file.d.ts +213 -165
- package/dist/models/file.d.ts.map +1 -1
- package/dist/models/folder.d.ts +161 -77
- package/dist/models/folder.d.ts.map +1 -1
- package/dist/models/labChat.d.ts +73 -31
- package/dist/models/labChat.d.ts.map +1 -1
- package/dist/models/marketing.d.ts +25 -7
- package/dist/models/marketing.d.ts.map +1 -1
- package/dist/models/message.d.ts +31 -13
- package/dist/models/message.d.ts.map +1 -1
- package/dist/models/newtonChat.d.ts +34 -10
- package/dist/models/newtonChat.d.ts.map +1 -1
- package/dist/models/notification.d.ts +29 -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/section.d.ts +71 -23
- package/dist/models/section.d.ts.map +1 -1
- package/dist/models/user.d.ts +27 -9
- package/dist/models/user.d.ts.map +1 -1
- package/dist/models/worksheet.d.ts +606 -106
- 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 +22 -2
- package/dist/pipelines/aiLabChat.d.ts.map +1 -1
- package/dist/pipelines/aiLabChat.js +133 -95
- package/dist/pipelines/aiLabChat.js.map +1 -1
- package/dist/pipelines/aiLabChatContract.d.ts +25 -25
- 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 +8 -8
- package/dist/pipelines/gradeWorksheet.d.ts.map +1 -1
- package/dist/pipelines/gradeWorksheet.js +12 -5
- package/dist/pipelines/gradeWorksheet.js.map +1 -1
- package/dist/pipelines/labChatPrompt.d.ts +27 -0
- package/dist/pipelines/labChatPrompt.d.ts.map +1 -1
- package/dist/pipelines/labChatPrompt.js +143 -69
- package/dist/pipelines/labChatPrompt.js.map +1 -1
- package/dist/routers/_app.d.ts +1579 -1257
- package/dist/routers/_app.d.ts.map +1 -1
- package/dist/routers/agenda.d.ts +16 -16
- package/dist/routers/announcement.d.ts +19 -19
- package/dist/routers/assignment.d.ts +307 -291
- package/dist/routers/assignment.d.ts.map +1 -1
- package/dist/routers/assignment.js +3 -2
- package/dist/routers/assignment.js.map +1 -1
- package/dist/routers/attendance.d.ts +7 -7
- package/dist/routers/auth.d.ts +1 -1
- package/dist/routers/class.d.ts +79 -72
- 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/comment.d.ts +6 -6
- package/dist/routers/conversation.d.ts +11 -11
- package/dist/routers/event.d.ts +35 -35
- package/dist/routers/file.d.ts +12 -12
- package/dist/routers/folder.d.ts +54 -54
- package/dist/routers/labChat.d.ts +18 -12
- 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/marketing.d.ts +2 -2
- package/dist/routers/message.d.ts +33 -2
- 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 +7 -1
- 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 +13 -6
- 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/section.d.ts +7 -7
- package/dist/routers/studentProgress.d.ts +86 -0
- package/dist/routers/studentProgress.d.ts.map +1 -1
- package/dist/routers/studentProgress.js +14 -4
- package/dist/routers/studentProgress.js.map +1 -1
- package/dist/routers/user.d.ts +1 -1
- package/dist/routers/worksheet.d.ts +64 -62
- 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/seedDatabase.d.ts +1 -1
- package/dist/services/agenda.d.ts +16 -16
- package/dist/services/announcement.d.ts +8 -8
- package/dist/services/assignment.d.ts +299 -283
- package/dist/services/assignment.d.ts.map +1 -1
- package/dist/services/assignment.js +24 -5
- package/dist/services/assignment.js.map +1 -1
- package/dist/services/attendance.d.ts +7 -7
- package/dist/services/auth.d.ts +2 -2
- 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 +74 -68
- 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/comment.d.ts +6 -6
- package/dist/services/conversation.d.ts +11 -11
- package/dist/services/event.d.ts +31 -31
- package/dist/services/file.d.ts +12 -12
- 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/folder.d.ts +52 -52
- package/dist/services/labChat.d.ts +18 -12
- 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/marketing.d.ts +2 -2
- 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 +16 -9
- 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/section.d.ts +6 -6
- package/dist/services/studentProgress.d.ts +75 -0
- package/dist/services/studentProgress.d.ts.map +1 -1
- package/dist/services/studentProgress.js +300 -107
- package/dist/services/studentProgress.js.map +1 -1
- package/dist/services/worksheet.d.ts +64 -64
- 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 -12
- package/dist/utils/inference.d.ts.map +1 -1
- package/dist/utils/inference.js +135 -95
- package/dist/utils/inference.js.map +1 -1
- package/package.json +1 -1
- package/prisma/migrations/20260410124000_add_submission_recommendation_state/migration.sql +14 -0
- 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 +41 -1
- package/scripts/test-pre-push.ts +6 -2
- package/src/index.ts +119 -79
- package/src/lib/config/cors.ts +96 -0
- package/src/lib/config/env.ts +12 -1
- package/src/lib/fileUpload.ts +55 -5
- package/src/lib/prisma.ts +25 -6
- package/src/middleware/auth.ts +19 -4
- package/src/middleware/security.ts +1 -1
- 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 +183 -104
- package/src/pipelines/aiNewtonChat.ts +24 -14
- package/src/pipelines/gradeWorksheet.ts +10 -2
- package/src/pipelines/labChatPrompt.ts +196 -68
- package/src/routers/assignment.ts +1 -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/studentProgress.ts +25 -1
- package/src/routers/worksheet.ts +31 -19
- package/src/services/assignment.ts +30 -2
- 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 +425 -121
- package/src/services/worksheet.ts +191 -51
- package/src/trpc.ts +12 -18
- package/src/utils/inference.ts +205 -112
- package/tests/globalSetup.ts +13 -4
- package/tests/lib/cors.test.ts +103 -0
- package/tests/pipelines/aiLabChat.test.ts +64 -84
- 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/studentProgress.test.ts +2 -31
- package/tests/routers/worksheet.test.ts +194 -0
- package/tests/setup.ts +22 -5
- package/tests/utils/aiLabChatPrompt.test.ts +114 -6
- package/tests/utils/inference.test.ts +218 -0
- package/tests/utils/studentProgress.test.ts +361 -0
- package/vitest.unit.config.ts +1 -0
|
@@ -2,96 +2,240 @@ import type { WorksheetQuestionType, GenerationStatus } from "@prisma/client";
|
|
|
2
2
|
/** @returns Worksheet with questions and class. */
|
|
3
3
|
export declare function findWorksheetById(id: string): import(".prisma/client").Prisma.Prisma__WorksheetClient<({
|
|
4
4
|
class: {
|
|
5
|
+
name: string;
|
|
5
6
|
id: string;
|
|
6
7
|
schoolId: string | null;
|
|
7
|
-
name: string;
|
|
8
8
|
subject: string;
|
|
9
9
|
color: string | null;
|
|
10
10
|
section: string;
|
|
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
|
-
updatedAt: Date;
|
|
19
18
|
order: number | null;
|
|
20
|
-
|
|
19
|
+
points: number;
|
|
20
|
+
updatedAt: Date;
|
|
21
21
|
worksheetId: string;
|
|
22
|
+
markScheme: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
22
23
|
question: string;
|
|
23
24
|
answer: string;
|
|
24
|
-
points: number;
|
|
25
25
|
}[];
|
|
26
26
|
} & {
|
|
27
|
+
name: string;
|
|
27
28
|
id: string;
|
|
28
29
|
createdAt: Date;
|
|
29
|
-
updatedAt: Date;
|
|
30
30
|
classId: string;
|
|
31
|
-
|
|
32
|
-
}) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
31
|
+
updatedAt: Date;
|
|
32
|
+
}) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
33
|
+
datasources: {
|
|
34
|
+
db: {
|
|
35
|
+
url: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
}>;
|
|
33
39
|
/** @returns Worksheet by ID (minimal). */
|
|
34
40
|
export declare function findWorksheetByIdMinimal(id: string): import(".prisma/client").Prisma.Prisma__WorksheetClient<{
|
|
41
|
+
name: string;
|
|
35
42
|
id: string;
|
|
36
43
|
createdAt: Date;
|
|
44
|
+
classId: string;
|
|
37
45
|
updatedAt: Date;
|
|
46
|
+
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
47
|
+
datasources: {
|
|
48
|
+
db: {
|
|
49
|
+
url: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
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;
|
|
38
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
|
+
} & {
|
|
39
115
|
name: string;
|
|
40
|
-
|
|
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
|
+
}>;
|
|
41
127
|
/** @returns Worksheets for a class. */
|
|
42
128
|
export declare function findWorksheetsByClassId(classId: string): import(".prisma/client").Prisma.PrismaPromise<({
|
|
43
129
|
questions: {
|
|
44
130
|
id: string;
|
|
45
131
|
}[];
|
|
46
132
|
} & {
|
|
133
|
+
name: string;
|
|
47
134
|
id: string;
|
|
48
135
|
createdAt: Date;
|
|
49
|
-
updatedAt: Date;
|
|
50
136
|
classId: string;
|
|
51
|
-
|
|
137
|
+
updatedAt: Date;
|
|
52
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
|
+
}>;
|
|
53
179
|
/** Create a worksheet. */
|
|
54
180
|
export declare function createWorksheet(data: {
|
|
55
181
|
classId: string;
|
|
56
182
|
name: string;
|
|
57
183
|
}): import(".prisma/client").Prisma.Prisma__WorksheetClient<{
|
|
184
|
+
name: string;
|
|
58
185
|
id: string;
|
|
59
186
|
createdAt: Date;
|
|
60
|
-
updatedAt: Date;
|
|
61
187
|
classId: string;
|
|
62
|
-
|
|
63
|
-
}, never, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
188
|
+
updatedAt: Date;
|
|
189
|
+
}, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
190
|
+
datasources: {
|
|
191
|
+
db: {
|
|
192
|
+
url: string;
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
}>;
|
|
64
196
|
/** Update worksheet name. */
|
|
65
197
|
export declare function updateWorksheet(id: string, data: {
|
|
66
198
|
name?: string;
|
|
67
199
|
}): import(".prisma/client").Prisma.Prisma__WorksheetClient<{
|
|
200
|
+
name: string;
|
|
68
201
|
id: string;
|
|
69
202
|
createdAt: Date;
|
|
70
|
-
updatedAt: Date;
|
|
71
203
|
classId: string;
|
|
72
|
-
|
|
73
|
-
}, never, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
204
|
+
updatedAt: Date;
|
|
205
|
+
}, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
206
|
+
datasources: {
|
|
207
|
+
db: {
|
|
208
|
+
url: string;
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
}>;
|
|
74
212
|
/** Delete a worksheet. */
|
|
75
213
|
export declare function deleteWorksheet(id: string): import(".prisma/client").Prisma.Prisma__WorksheetClient<{
|
|
214
|
+
name: string;
|
|
76
215
|
id: string;
|
|
77
216
|
createdAt: Date;
|
|
78
|
-
updatedAt: Date;
|
|
79
217
|
classId: string;
|
|
80
|
-
|
|
81
|
-
}, never, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
218
|
+
updatedAt: Date;
|
|
219
|
+
}, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
220
|
+
datasources: {
|
|
221
|
+
db: {
|
|
222
|
+
url: string;
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
}>;
|
|
82
226
|
/** @returns Questions for a worksheet. */
|
|
83
227
|
export declare function findQuestionsByWorksheetId(worksheetId: string): import(".prisma/client").Prisma.PrismaPromise<{
|
|
84
|
-
options: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
85
228
|
type: import(".prisma/client").$Enums.WorksheetQuestionType;
|
|
229
|
+
options: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
86
230
|
id: string;
|
|
87
231
|
createdAt: Date;
|
|
88
|
-
updatedAt: Date;
|
|
89
232
|
order: number | null;
|
|
90
|
-
|
|
233
|
+
points: number;
|
|
234
|
+
updatedAt: Date;
|
|
91
235
|
worksheetId: string;
|
|
236
|
+
markScheme: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
92
237
|
question: string;
|
|
93
238
|
answer: string;
|
|
94
|
-
points: number;
|
|
95
239
|
}[]>;
|
|
96
240
|
/** Create a worksheet question. */
|
|
97
241
|
export declare function createWorksheetQuestion(data: {
|
|
@@ -103,32 +247,44 @@ export declare function createWorksheetQuestion(data: {
|
|
|
103
247
|
options?: object;
|
|
104
248
|
markScheme?: object;
|
|
105
249
|
}): import(".prisma/client").Prisma.Prisma__WorksheetQuestionClient<{
|
|
106
|
-
options: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
107
250
|
type: import(".prisma/client").$Enums.WorksheetQuestionType;
|
|
251
|
+
options: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
108
252
|
id: string;
|
|
109
253
|
createdAt: Date;
|
|
110
|
-
updatedAt: Date;
|
|
111
254
|
order: number | null;
|
|
112
|
-
|
|
255
|
+
points: number;
|
|
256
|
+
updatedAt: Date;
|
|
113
257
|
worksheetId: string;
|
|
258
|
+
markScheme: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
114
259
|
question: string;
|
|
115
260
|
answer: string;
|
|
116
|
-
|
|
117
|
-
|
|
261
|
+
}, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
262
|
+
datasources: {
|
|
263
|
+
db: {
|
|
264
|
+
url: string;
|
|
265
|
+
};
|
|
266
|
+
};
|
|
267
|
+
}>;
|
|
118
268
|
/** Update question order. */
|
|
119
269
|
export declare function updateWorksheetQuestionOrder(id: string, order: number): import(".prisma/client").Prisma.Prisma__WorksheetQuestionClient<{
|
|
120
|
-
options: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
121
270
|
type: import(".prisma/client").$Enums.WorksheetQuestionType;
|
|
271
|
+
options: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
122
272
|
id: string;
|
|
123
273
|
createdAt: Date;
|
|
124
|
-
updatedAt: Date;
|
|
125
274
|
order: number | null;
|
|
126
|
-
|
|
275
|
+
points: number;
|
|
276
|
+
updatedAt: Date;
|
|
127
277
|
worksheetId: string;
|
|
278
|
+
markScheme: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
128
279
|
question: string;
|
|
129
280
|
answer: string;
|
|
130
|
-
|
|
131
|
-
|
|
281
|
+
}, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
282
|
+
datasources: {
|
|
283
|
+
db: {
|
|
284
|
+
url: string;
|
|
285
|
+
};
|
|
286
|
+
};
|
|
287
|
+
}>;
|
|
132
288
|
/** Update a worksheet question. */
|
|
133
289
|
export declare function updateWorksheetQuestion(id: string, data: {
|
|
134
290
|
question?: string;
|
|
@@ -138,47 +294,79 @@ export declare function updateWorksheetQuestion(id: string, data: {
|
|
|
138
294
|
markScheme?: object;
|
|
139
295
|
type?: WorksheetQuestionType;
|
|
140
296
|
}): import(".prisma/client").Prisma.Prisma__WorksheetQuestionClient<{
|
|
141
|
-
options: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
142
297
|
type: import(".prisma/client").$Enums.WorksheetQuestionType;
|
|
298
|
+
options: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
143
299
|
id: string;
|
|
144
300
|
createdAt: Date;
|
|
145
|
-
updatedAt: Date;
|
|
146
301
|
order: number | null;
|
|
147
|
-
|
|
302
|
+
points: number;
|
|
303
|
+
updatedAt: Date;
|
|
148
304
|
worksheetId: string;
|
|
305
|
+
markScheme: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
149
306
|
question: string;
|
|
150
307
|
answer: string;
|
|
151
|
-
|
|
152
|
-
|
|
308
|
+
}, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
309
|
+
datasources: {
|
|
310
|
+
db: {
|
|
311
|
+
url: string;
|
|
312
|
+
};
|
|
313
|
+
};
|
|
314
|
+
}>;
|
|
153
315
|
/** Delete a worksheet question. */
|
|
154
316
|
export declare function deleteWorksheetQuestion(id: string): import(".prisma/client").Prisma.Prisma__WorksheetQuestionClient<{
|
|
155
|
-
options: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
156
317
|
type: import(".prisma/client").$Enums.WorksheetQuestionType;
|
|
318
|
+
options: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
157
319
|
id: string;
|
|
158
320
|
createdAt: Date;
|
|
159
|
-
updatedAt: Date;
|
|
160
321
|
order: number | null;
|
|
161
|
-
|
|
322
|
+
points: number;
|
|
323
|
+
updatedAt: Date;
|
|
162
324
|
worksheetId: string;
|
|
325
|
+
markScheme: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
163
326
|
question: string;
|
|
164
327
|
answer: string;
|
|
165
|
-
|
|
166
|
-
|
|
328
|
+
}, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
329
|
+
datasources: {
|
|
330
|
+
db: {
|
|
331
|
+
url: string;
|
|
332
|
+
};
|
|
333
|
+
};
|
|
334
|
+
}>;
|
|
167
335
|
/** @returns Submission by ID. */
|
|
168
336
|
export declare function findSubmissionById(id: string): import(".prisma/client").Prisma.Prisma__SubmissionClient<{
|
|
169
337
|
id: string;
|
|
170
|
-
createdAt: Date;
|
|
171
338
|
assignmentId: string;
|
|
339
|
+
createdAt: Date;
|
|
172
340
|
modifiedAt: Date;
|
|
173
341
|
studentId: string;
|
|
174
342
|
extendedResponse: string | null;
|
|
175
343
|
gradeReceived: number | null;
|
|
344
|
+
recommendationState: import(".prisma/client").$Enums.SubmissionRecommendationState;
|
|
345
|
+
recommendationUpdatedAt: Date | null;
|
|
346
|
+
targetedAssignmentId: string | null;
|
|
176
347
|
rubricState: string | null;
|
|
177
348
|
teacherComments: string | null;
|
|
178
349
|
submittedAt: Date | null;
|
|
179
350
|
submitted: boolean | null;
|
|
180
351
|
returned: boolean | null;
|
|
181
|
-
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
352
|
+
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
353
|
+
datasources: {
|
|
354
|
+
db: {
|
|
355
|
+
url: string;
|
|
356
|
+
};
|
|
357
|
+
};
|
|
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
|
+
}>;
|
|
182
370
|
/** @returns Worksheet response for submission and worksheet. */
|
|
183
371
|
export declare function findWorksheetResponseBySubmissionAndWorksheet(submissionId: string, worksheetId: string): import(".prisma/client").Prisma.Prisma__StudentWorksheetResponseClient<({
|
|
184
372
|
responses: ({
|
|
@@ -189,26 +377,32 @@ export declare function findWorksheetResponseBySubmissionAndWorksheet(submission
|
|
|
189
377
|
status: import(".prisma/client").$Enums.GenerationStatus | null;
|
|
190
378
|
id: string;
|
|
191
379
|
createdAt: Date;
|
|
192
|
-
updatedAt: Date | null;
|
|
193
|
-
feedback: string | null;
|
|
194
380
|
studentId: string;
|
|
195
|
-
|
|
381
|
+
questionId: string;
|
|
196
382
|
response: string;
|
|
197
383
|
isCorrect: boolean;
|
|
198
384
|
markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
385
|
+
points: number;
|
|
386
|
+
feedback: string | null;
|
|
387
|
+
updatedAt: Date | null;
|
|
199
388
|
studentWorksheetResponseId: string | null;
|
|
200
|
-
questionId: string;
|
|
201
389
|
})[];
|
|
202
390
|
} & {
|
|
203
391
|
id: string;
|
|
204
|
-
createdAt: Date;
|
|
205
|
-
updatedAt: Date;
|
|
206
392
|
submissionId: string | null;
|
|
393
|
+
createdAt: Date;
|
|
207
394
|
studentId: string;
|
|
208
395
|
submittedAt: Date | null;
|
|
209
396
|
submitted: boolean;
|
|
397
|
+
updatedAt: Date;
|
|
210
398
|
worksheetId: string;
|
|
211
|
-
}) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
399
|
+
}) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
400
|
+
datasources: {
|
|
401
|
+
db: {
|
|
402
|
+
url: string;
|
|
403
|
+
};
|
|
404
|
+
};
|
|
405
|
+
}>;
|
|
212
406
|
/** Get or create worksheet response for student. */
|
|
213
407
|
export declare function findOrCreateWorksheetResponse(submissionId: string, worksheetId: string, studentId: string): Promise<{
|
|
214
408
|
responses: ({
|
|
@@ -219,24 +413,24 @@ export declare function findOrCreateWorksheetResponse(submissionId: string, work
|
|
|
219
413
|
status: import(".prisma/client").$Enums.GenerationStatus | null;
|
|
220
414
|
id: string;
|
|
221
415
|
createdAt: Date;
|
|
222
|
-
updatedAt: Date | null;
|
|
223
|
-
feedback: string | null;
|
|
224
416
|
studentId: string;
|
|
225
|
-
|
|
417
|
+
questionId: string;
|
|
226
418
|
response: string;
|
|
227
419
|
isCorrect: boolean;
|
|
228
420
|
markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
421
|
+
points: number;
|
|
422
|
+
feedback: string | null;
|
|
423
|
+
updatedAt: Date | null;
|
|
229
424
|
studentWorksheetResponseId: string | null;
|
|
230
|
-
questionId: string;
|
|
231
425
|
})[];
|
|
232
426
|
} & {
|
|
233
427
|
id: string;
|
|
234
|
-
createdAt: Date;
|
|
235
|
-
updatedAt: Date;
|
|
236
428
|
submissionId: string | null;
|
|
429
|
+
createdAt: Date;
|
|
237
430
|
studentId: string;
|
|
238
431
|
submittedAt: Date | null;
|
|
239
432
|
submitted: boolean;
|
|
433
|
+
updatedAt: Date;
|
|
240
434
|
worksheetId: string;
|
|
241
435
|
}>;
|
|
242
436
|
/** Create a worksheet response. */
|
|
@@ -253,92 +447,362 @@ export declare function createWorksheetResponse(data: {
|
|
|
253
447
|
status: import(".prisma/client").$Enums.GenerationStatus | null;
|
|
254
448
|
id: string;
|
|
255
449
|
createdAt: Date;
|
|
256
|
-
updatedAt: Date | null;
|
|
257
|
-
feedback: string | null;
|
|
258
450
|
studentId: string;
|
|
259
|
-
|
|
451
|
+
questionId: string;
|
|
260
452
|
response: string;
|
|
261
453
|
isCorrect: boolean;
|
|
262
454
|
markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
455
|
+
points: number;
|
|
456
|
+
feedback: string | null;
|
|
457
|
+
updatedAt: Date | null;
|
|
263
458
|
studentWorksheetResponseId: string | null;
|
|
264
|
-
questionId: string;
|
|
265
459
|
})[];
|
|
266
460
|
} & {
|
|
267
461
|
id: string;
|
|
268
|
-
createdAt: Date;
|
|
269
|
-
updatedAt: Date;
|
|
270
462
|
submissionId: string | null;
|
|
463
|
+
createdAt: Date;
|
|
271
464
|
studentId: string;
|
|
272
465
|
submittedAt: Date | null;
|
|
273
466
|
submitted: boolean;
|
|
467
|
+
updatedAt: Date;
|
|
274
468
|
worksheetId: string;
|
|
275
|
-
}, never, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
469
|
+
}, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
470
|
+
datasources: {
|
|
471
|
+
db: {
|
|
472
|
+
url: string;
|
|
473
|
+
};
|
|
474
|
+
};
|
|
475
|
+
}>;
|
|
276
476
|
/** @returns Worksheet response by ID. */
|
|
277
477
|
export declare function findWorksheetResponseById(id: string): import(".prisma/client").Prisma.Prisma__StudentWorksheetResponseClient<({
|
|
278
478
|
responses: {
|
|
279
479
|
status: import(".prisma/client").$Enums.GenerationStatus | null;
|
|
280
480
|
id: string;
|
|
281
481
|
createdAt: Date;
|
|
282
|
-
updatedAt: Date | null;
|
|
283
|
-
feedback: string | null;
|
|
284
482
|
studentId: string;
|
|
285
|
-
|
|
483
|
+
questionId: string;
|
|
286
484
|
response: string;
|
|
287
485
|
isCorrect: boolean;
|
|
288
486
|
markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
487
|
+
points: number;
|
|
488
|
+
feedback: string | null;
|
|
489
|
+
updatedAt: Date | null;
|
|
289
490
|
studentWorksheetResponseId: string | null;
|
|
491
|
+
}[];
|
|
492
|
+
} & {
|
|
493
|
+
id: string;
|
|
494
|
+
submissionId: string | null;
|
|
495
|
+
createdAt: Date;
|
|
496
|
+
studentId: string;
|
|
497
|
+
submittedAt: Date | null;
|
|
498
|
+
submitted: boolean;
|
|
499
|
+
updatedAt: Date;
|
|
500
|
+
worksheetId: string;
|
|
501
|
+
}) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
502
|
+
datasources: {
|
|
503
|
+
db: {
|
|
504
|
+
url: string;
|
|
505
|
+
};
|
|
506
|
+
};
|
|
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;
|
|
290
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;
|
|
291
530
|
}[];
|
|
292
531
|
} & {
|
|
293
532
|
id: string;
|
|
533
|
+
submissionId: string | null;
|
|
294
534
|
createdAt: Date;
|
|
535
|
+
studentId: string;
|
|
536
|
+
submittedAt: Date | null;
|
|
537
|
+
submitted: boolean;
|
|
295
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;
|
|
296
572
|
submissionId: string | null;
|
|
573
|
+
createdAt: Date;
|
|
297
574
|
studentId: string;
|
|
298
575
|
submittedAt: Date | null;
|
|
299
576
|
submitted: boolean;
|
|
577
|
+
updatedAt: Date;
|
|
300
578
|
worksheetId: string;
|
|
301
|
-
}) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
579
|
+
}) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
580
|
+
datasources: {
|
|
581
|
+
db: {
|
|
582
|
+
url: string;
|
|
583
|
+
};
|
|
584
|
+
};
|
|
585
|
+
}>;
|
|
302
586
|
/** @returns Worksheet response with question responses. */
|
|
303
587
|
export declare function findWorksheetResponseWithResponses(id: string, questionId?: string): import(".prisma/client").Prisma.Prisma__StudentWorksheetResponseClient<({
|
|
304
588
|
responses: {
|
|
305
589
|
status: import(".prisma/client").$Enums.GenerationStatus | null;
|
|
306
590
|
id: string;
|
|
307
591
|
createdAt: Date;
|
|
308
|
-
updatedAt: Date | null;
|
|
309
|
-
feedback: string | null;
|
|
310
592
|
studentId: string;
|
|
311
|
-
|
|
593
|
+
questionId: string;
|
|
312
594
|
response: string;
|
|
313
595
|
isCorrect: boolean;
|
|
314
596
|
markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
597
|
+
points: number;
|
|
598
|
+
feedback: string | null;
|
|
599
|
+
updatedAt: Date | null;
|
|
315
600
|
studentWorksheetResponseId: string | null;
|
|
601
|
+
}[];
|
|
602
|
+
} & {
|
|
603
|
+
id: string;
|
|
604
|
+
submissionId: string | null;
|
|
605
|
+
createdAt: Date;
|
|
606
|
+
studentId: string;
|
|
607
|
+
submittedAt: Date | null;
|
|
608
|
+
submitted: boolean;
|
|
609
|
+
updatedAt: Date;
|
|
610
|
+
worksheetId: string;
|
|
611
|
+
}) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
612
|
+
datasources: {
|
|
613
|
+
db: {
|
|
614
|
+
url: string;
|
|
615
|
+
};
|
|
616
|
+
};
|
|
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;
|
|
316
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;
|
|
317
640
|
}[];
|
|
318
641
|
} & {
|
|
319
642
|
id: string;
|
|
643
|
+
submissionId: string | null;
|
|
320
644
|
createdAt: Date;
|
|
645
|
+
studentId: string;
|
|
646
|
+
submittedAt: Date | null;
|
|
647
|
+
submitted: boolean;
|
|
321
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;
|
|
322
682
|
submissionId: string | null;
|
|
683
|
+
createdAt: Date;
|
|
323
684
|
studentId: string;
|
|
324
685
|
submittedAt: Date | null;
|
|
325
686
|
submitted: boolean;
|
|
687
|
+
updatedAt: Date;
|
|
326
688
|
worksheetId: string;
|
|
327
|
-
}) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
689
|
+
}) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
690
|
+
datasources: {
|
|
691
|
+
db: {
|
|
692
|
+
url: string;
|
|
693
|
+
};
|
|
694
|
+
};
|
|
695
|
+
}>;
|
|
328
696
|
/** @returns Worksheet question by ID. */
|
|
329
697
|
export declare function findWorksheetQuestionById(id: string): import(".prisma/client").Prisma.Prisma__WorksheetQuestionClient<{
|
|
330
|
-
options: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
331
698
|
type: import(".prisma/client").$Enums.WorksheetQuestionType;
|
|
699
|
+
options: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
332
700
|
id: string;
|
|
333
701
|
createdAt: Date;
|
|
334
|
-
updatedAt: Date;
|
|
335
702
|
order: number | null;
|
|
336
|
-
|
|
703
|
+
points: number;
|
|
704
|
+
updatedAt: Date;
|
|
337
705
|
worksheetId: string;
|
|
706
|
+
markScheme: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
338
707
|
question: string;
|
|
339
708
|
answer: string;
|
|
709
|
+
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
710
|
+
datasources: {
|
|
711
|
+
db: {
|
|
712
|
+
url: string;
|
|
713
|
+
};
|
|
714
|
+
};
|
|
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;
|
|
340
795
|
points: number;
|
|
341
|
-
|
|
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
|
+
}>;
|
|
342
806
|
/** Update student's question progress. */
|
|
343
807
|
export declare function updateStudentQuestionProgress(id: string, data: {
|
|
344
808
|
response?: string;
|
|
@@ -349,16 +813,22 @@ export declare function updateStudentQuestionProgress(id: string, data: {
|
|
|
349
813
|
status: import(".prisma/client").$Enums.GenerationStatus | null;
|
|
350
814
|
id: string;
|
|
351
815
|
createdAt: Date;
|
|
352
|
-
updatedAt: Date | null;
|
|
353
|
-
feedback: string | null;
|
|
354
816
|
studentId: string;
|
|
355
|
-
|
|
817
|
+
questionId: string;
|
|
356
818
|
response: string;
|
|
357
819
|
isCorrect: boolean;
|
|
358
820
|
markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
821
|
+
points: number;
|
|
822
|
+
feedback: string | null;
|
|
823
|
+
updatedAt: Date | null;
|
|
359
824
|
studentWorksheetResponseId: string | null;
|
|
360
|
-
|
|
361
|
-
|
|
825
|
+
}, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
826
|
+
datasources: {
|
|
827
|
+
db: {
|
|
828
|
+
url: string;
|
|
829
|
+
};
|
|
830
|
+
};
|
|
831
|
+
}>;
|
|
362
832
|
/** Create student question progress. */
|
|
363
833
|
export declare function createStudentQuestionProgress(data: {
|
|
364
834
|
studentId: string;
|
|
@@ -371,31 +841,43 @@ export declare function createStudentQuestionProgress(data: {
|
|
|
371
841
|
status: import(".prisma/client").$Enums.GenerationStatus | null;
|
|
372
842
|
id: string;
|
|
373
843
|
createdAt: Date;
|
|
374
|
-
updatedAt: Date | null;
|
|
375
|
-
feedback: string | null;
|
|
376
844
|
studentId: string;
|
|
377
|
-
|
|
845
|
+
questionId: string;
|
|
378
846
|
response: string;
|
|
379
847
|
isCorrect: boolean;
|
|
380
848
|
markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
849
|
+
points: number;
|
|
850
|
+
feedback: string | null;
|
|
851
|
+
updatedAt: Date | null;
|
|
381
852
|
studentWorksheetResponseId: string | null;
|
|
382
|
-
|
|
383
|
-
|
|
853
|
+
}, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
854
|
+
datasources: {
|
|
855
|
+
db: {
|
|
856
|
+
url: string;
|
|
857
|
+
};
|
|
858
|
+
};
|
|
859
|
+
}>;
|
|
384
860
|
/** @returns Student's progress for a question. */
|
|
385
861
|
export declare function findStudentQuestionProgress(studentId: string, questionId: string, studentWorksheetResponseId: string): import(".prisma/client").Prisma.Prisma__StudentQuestionProgressClient<{
|
|
386
862
|
status: import(".prisma/client").$Enums.GenerationStatus | null;
|
|
387
863
|
id: string;
|
|
388
864
|
createdAt: Date;
|
|
389
|
-
updatedAt: Date | null;
|
|
390
|
-
feedback: string | null;
|
|
391
865
|
studentId: string;
|
|
392
|
-
|
|
866
|
+
questionId: string;
|
|
393
867
|
response: string;
|
|
394
868
|
isCorrect: boolean;
|
|
395
869
|
markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
870
|
+
points: number;
|
|
871
|
+
feedback: string | null;
|
|
872
|
+
updatedAt: Date | null;
|
|
396
873
|
studentWorksheetResponseId: string | null;
|
|
397
|
-
|
|
398
|
-
|
|
874
|
+
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
875
|
+
datasources: {
|
|
876
|
+
db: {
|
|
877
|
+
url: string;
|
|
878
|
+
};
|
|
879
|
+
};
|
|
880
|
+
}>;
|
|
399
881
|
/** Update progress for grading (AI feedback, marks). */
|
|
400
882
|
export declare function updateStudentQuestionProgressForGrading(id: string, data: {
|
|
401
883
|
isCorrect?: boolean;
|
|
@@ -407,16 +889,22 @@ export declare function updateStudentQuestionProgressForGrading(id: string, data
|
|
|
407
889
|
status: import(".prisma/client").$Enums.GenerationStatus | null;
|
|
408
890
|
id: string;
|
|
409
891
|
createdAt: Date;
|
|
410
|
-
updatedAt: Date | null;
|
|
411
|
-
feedback: string | null;
|
|
412
892
|
studentId: string;
|
|
413
|
-
|
|
893
|
+
questionId: string;
|
|
414
894
|
response: string;
|
|
415
895
|
isCorrect: boolean;
|
|
416
896
|
markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
897
|
+
points: number;
|
|
898
|
+
feedback: string | null;
|
|
899
|
+
updatedAt: Date | null;
|
|
417
900
|
studentWorksheetResponseId: string | null;
|
|
418
|
-
|
|
419
|
-
|
|
901
|
+
}, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
902
|
+
datasources: {
|
|
903
|
+
db: {
|
|
904
|
+
url: string;
|
|
905
|
+
};
|
|
906
|
+
};
|
|
907
|
+
}>;
|
|
420
908
|
/** Create progress record for grading pipeline. */
|
|
421
909
|
export declare function createStudentQuestionProgressForGrading(data: {
|
|
422
910
|
studentId: string;
|
|
@@ -431,16 +919,22 @@ export declare function createStudentQuestionProgressForGrading(data: {
|
|
|
431
919
|
status: import(".prisma/client").$Enums.GenerationStatus | null;
|
|
432
920
|
id: string;
|
|
433
921
|
createdAt: Date;
|
|
434
|
-
updatedAt: Date | null;
|
|
435
|
-
feedback: string | null;
|
|
436
922
|
studentId: string;
|
|
437
|
-
|
|
923
|
+
questionId: string;
|
|
438
924
|
response: string;
|
|
439
925
|
isCorrect: boolean;
|
|
440
926
|
markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
927
|
+
points: number;
|
|
928
|
+
feedback: string | null;
|
|
929
|
+
updatedAt: Date | null;
|
|
441
930
|
studentWorksheetResponseId: string | null;
|
|
442
|
-
|
|
443
|
-
|
|
931
|
+
}, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
932
|
+
datasources: {
|
|
933
|
+
db: {
|
|
934
|
+
url: string;
|
|
935
|
+
};
|
|
936
|
+
};
|
|
937
|
+
}>;
|
|
444
938
|
/** Create a comment on a worksheet response. */
|
|
445
939
|
export declare function createComment(data: {
|
|
446
940
|
studentQuestionProgressId: string;
|
|
@@ -449,12 +943,18 @@ export declare function createComment(data: {
|
|
|
449
943
|
}): import(".prisma/client").Prisma.Prisma__CommentClient<{
|
|
450
944
|
status: import(".prisma/client").$Enums.GenerationStatus | null;
|
|
451
945
|
id: string;
|
|
946
|
+
announcementId: string | null;
|
|
452
947
|
createdAt: Date;
|
|
453
|
-
content: string;
|
|
454
948
|
modifiedAt: Date | null;
|
|
455
|
-
|
|
949
|
+
content: string;
|
|
456
950
|
authorId: string;
|
|
457
951
|
parentCommentId: string | null;
|
|
458
952
|
studentQuestionProgressId: string | null;
|
|
459
|
-
}, never, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
953
|
+
}, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
954
|
+
datasources: {
|
|
955
|
+
db: {
|
|
956
|
+
url: string;
|
|
957
|
+
};
|
|
958
|
+
};
|
|
959
|
+
}>;
|
|
460
960
|
//# sourceMappingURL=worksheet.d.ts.map
|