@studious-lms/server 1.17.1 → 1.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/models/agenda.d.ts +2 -0
- package/dist/models/agenda.d.ts.map +1 -1
- package/dist/models/announcement.d.ts +1 -0
- package/dist/models/announcement.d.ts.map +1 -1
- package/dist/models/assignment.d.ts +7 -0
- package/dist/models/assignment.d.ts.map +1 -1
- package/dist/models/auth.d.ts +2 -0
- package/dist/models/auth.d.ts.map +1 -1
- package/dist/models/class.d.ts +6 -0
- package/dist/models/class.d.ts.map +1 -1
- package/dist/models/class.js +3 -2
- package/dist/models/class.js.map +1 -1
- package/dist/models/event.d.ts +4 -0
- package/dist/models/event.d.ts.map +1 -1
- package/dist/models/file.d.ts +8 -0
- package/dist/models/file.d.ts.map +1 -1
- package/dist/models/folder.d.ts +2 -0
- package/dist/models/folder.d.ts.map +1 -1
- package/dist/models/labChat.d.ts +2 -0
- package/dist/models/labChat.d.ts.map +1 -1
- package/dist/models/newtonChat.d.ts +1 -0
- package/dist/models/newtonChat.d.ts.map +1 -1
- package/dist/models/school.d.ts +1 -0
- package/dist/models/school.d.ts.map +1 -1
- package/dist/models/section.d.ts +1 -0
- package/dist/models/section.d.ts.map +1 -1
- package/dist/models/worksheet.d.ts +4 -0
- package/dist/models/worksheet.d.ts.map +1 -1
- package/dist/models/worksheet.js +3 -3
- package/dist/models/worksheet.js.map +1 -1
- package/dist/routers/_app.d.ts +50 -0
- package/dist/routers/_app.d.ts.map +1 -1
- package/dist/routers/agenda.d.ts +2 -0
- package/dist/routers/agenda.d.ts.map +1 -1
- package/dist/routers/assignment.d.ts +6 -0
- package/dist/routers/assignment.d.ts.map +1 -1
- package/dist/routers/class.d.ts +11 -0
- package/dist/routers/class.d.ts.map +1 -1
- package/dist/routers/class.js +4 -2
- package/dist/routers/class.js.map +1 -1
- package/dist/routers/event.d.ts +1 -0
- package/dist/routers/event.d.ts.map +1 -1
- package/dist/routers/school.d.ts +3 -0
- package/dist/routers/school.d.ts.map +1 -1
- package/dist/routers/school.js +3 -2
- package/dist/routers/school.js.map +1 -1
- package/dist/routers/worksheet.d.ts +2 -0
- package/dist/routers/worksheet.d.ts.map +1 -1
- package/dist/services/agenda.d.ts +2 -0
- package/dist/services/agenda.d.ts.map +1 -1
- package/dist/services/assignment.d.ts +6 -0
- package/dist/services/assignment.d.ts.map +1 -1
- package/dist/services/class.d.ts +11 -0
- package/dist/services/class.d.ts.map +1 -1
- package/dist/services/class.js +7 -3
- package/dist/services/class.js.map +1 -1
- package/dist/services/event.d.ts +1 -0
- package/dist/services/event.d.ts.map +1 -1
- package/dist/services/school.d.ts +3 -0
- package/dist/services/school.d.ts.map +1 -1
- package/dist/services/school.js +3 -2
- package/dist/services/school.js.map +1 -1
- package/dist/services/worksheet.d.ts +2 -0
- package/dist/services/worksheet.d.ts.map +1 -1
- package/package.json +1 -1
- package/prisma/migrations/20260616071500_add_class_symbol/migration.sql +2 -0
- package/prisma/schema.prisma +1 -0
- package/src/models/class.ts +1 -0
- package/src/models/worksheet.ts +1 -1
- package/src/routers/class.ts +2 -0
- package/src/routers/school.ts +1 -0
- package/src/services/class.ts +7 -0
- package/src/services/school.ts +2 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"school.d.ts","sourceRoot":"/","sources":["models/school.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAyBtD,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAIpE;AAED,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAI1E;AAED,wBAAgB,+BAA+B,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;;;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,CAAC,IAAI,EAAE;IAC3C,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,oBAAoB,CAAC;CAC5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmBA;AAED,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAM3B;AAED,wBAAgB,uCAAuC,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;;;;;;;;GAsBvF;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,oBAAoB,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,IAAI,CAAC;CACjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAOA;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM;;;;;;;;;;;;;;;;KAsBjD;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAQpE;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAKrD;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;;;;;;;;GAuClE"}
|
package/dist/models/section.d.ts
CHANGED
|
@@ -56,6 +56,7 @@ export declare function findClassWithTeacher(classId: string, teacherId: string)
|
|
|
56
56
|
query: {};
|
|
57
57
|
client: {};
|
|
58
58
|
}, {}>, "Class", "findFirst", null> & import("@prisma/client/runtime/library.js").PrismaPromise<{
|
|
59
|
+
symbol: string | null;
|
|
59
60
|
section: string;
|
|
60
61
|
id: string;
|
|
61
62
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"section.d.ts","sourceRoot":"/","sources":["models/section.ts"],"names":[],"mappings":"AAMA,8BAA8B;AAC9B,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAIzC;AAED,2DAA2D;AAC3D,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"section.d.ts","sourceRoot":"/","sources":["models/section.ts"],"names":[],"mappings":"AAMA,8BAA8B;AAC9B,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAIzC;AAED,2DAA2D;AAC3D,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAOtE;AAED,mCAAmC;AACnC,wBAAgB,aAAa,CAAC,IAAI,EAAE;IAClC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAUA;AAED,sDAAsD;AACtD,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM;;;KAKpD;AAED,yDAAyD;AACzD,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM;;;KAKvD;AAED,4BAA4B;AAC5B,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAK3D;AAED,+BAA+B;AAC/B,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAK9D;AAED,qCAAqC;AACrC,wBAAgB,aAAa,CAC3B,EAAE,EAAE,MAAM,EACV,IAAI,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAMvC;AAED,wBAAwB;AACxB,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAI3C;AAED,0CAA0C;AAC1C,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;UAKzE"}
|
|
@@ -27,6 +27,7 @@ export declare function findWorksheetById(id: string): import("@prisma/client/ru
|
|
|
27
27
|
client: {};
|
|
28
28
|
}, {}>, "Worksheet", "findUnique", null> & import("@prisma/client/runtime/library.js").PrismaPromise<({
|
|
29
29
|
class: {
|
|
30
|
+
symbol: string | null;
|
|
30
31
|
section: string;
|
|
31
32
|
id: string;
|
|
32
33
|
name: string;
|
|
@@ -124,6 +125,7 @@ export declare function findWorksheetByIdForClassMember(id: string, userId: stri
|
|
|
124
125
|
client: {};
|
|
125
126
|
}, {}>, "Worksheet", "findFirst", null> & import("@prisma/client/runtime/library.js").PrismaPromise<({
|
|
126
127
|
class: {
|
|
128
|
+
symbol: string | null;
|
|
127
129
|
section: string;
|
|
128
130
|
id: string;
|
|
129
131
|
name: string;
|
|
@@ -192,6 +194,7 @@ export declare function findWorksheetByIdForTeacher(id: string, userId: string):
|
|
|
192
194
|
client: {};
|
|
193
195
|
}, {}>, "Worksheet", "findFirst", null> & import("@prisma/client/runtime/library.js").PrismaPromise<({
|
|
194
196
|
class: {
|
|
197
|
+
symbol: string | null;
|
|
195
198
|
section: string;
|
|
196
199
|
id: string;
|
|
197
200
|
name: string;
|
|
@@ -243,6 +246,7 @@ export declare function findWorksheetsByClassId(classId: string): import("@prism
|
|
|
243
246
|
}[];
|
|
244
247
|
questions: {
|
|
245
248
|
id: string;
|
|
249
|
+
question: string;
|
|
246
250
|
}[];
|
|
247
251
|
} & {
|
|
248
252
|
status: import(".prisma/client").$Enums.JobStatus | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worksheet.d.ts","sourceRoot":"/","sources":["models/worksheet.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAcvE,mDAAmD;AACnD,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"worksheet.d.ts","sourceRoot":"/","sources":["models/worksheet.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAcvE,mDAAmD;AACnD,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAQ3C;AAED,0CAA0C;AAC1C,wBAAgB,wBAAwB,CAAC,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAIlD;AAED,+DAA+D;AAC/D,wBAAgB,+BAA+B,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAYzE;AAED,0DAA0D;AAC1D,wBAAgB,2BAA2B,CAAC,EAAE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B,EAAE,MAAM,CAAC;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAIA"}
|
package/dist/models/worksheet.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Worksheet model – worksheets, questions, submissions, student progress, grading.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
5
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f73619ba-8abd-5ea6-a244-9b97fff9d077")}catch(e){}}();
|
|
6
6
|
import { prisma } from "../lib/prisma.js";
|
|
7
7
|
import { classMemberOrSchoolAdminWhere, classTeacherOrSchoolAdminWhere, } from "./access.js";
|
|
8
8
|
const worksheetClassMemberWhere = (userId) => ({
|
|
@@ -60,7 +60,7 @@ export function findWorksheetsByClassId(classId) {
|
|
|
60
60
|
return prisma.worksheet.findMany({
|
|
61
61
|
where: { classId },
|
|
62
62
|
include: {
|
|
63
|
-
questions: { select: { id: true } },
|
|
63
|
+
questions: { select: { id: true, question: true }, orderBy: { order: "asc" } },
|
|
64
64
|
tags: true,
|
|
65
65
|
},
|
|
66
66
|
orderBy: { createdAt: "desc" },
|
|
@@ -424,4 +424,4 @@ export function createComment(data) {
|
|
|
424
424
|
});
|
|
425
425
|
}
|
|
426
426
|
//# sourceMappingURL=worksheet.js.map
|
|
427
|
-
//# debugId=
|
|
427
|
+
//# debugId=f73619ba-8abd-5ea6-a244-9b97fff9d077
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worksheet.js","sources":["models/worksheet.ts"],"sourceRoot":"/","sourcesContent":["/**\n * Worksheet model – worksheets, questions, submissions, student progress, grading.\n */\nimport { prisma } from \"../lib/prisma.js\";\nimport type { AppTransactionClient } from \"../lib/prisma.js\";\nimport type { WorksheetQuestionType, JobStatus } from \"@prisma/client\";\nimport {\n classMemberOrSchoolAdminWhere,\n classTeacherOrSchoolAdminWhere,\n} from \"./access.js\";\n\nconst worksheetClassMemberWhere = (userId: string) => ({\n class: classMemberOrSchoolAdminWhere(userId),\n});\n\nconst worksheetTeacherWhere = (userId: string) => ({\n class: classTeacherOrSchoolAdminWhere(userId),\n});\n\n/** @returns Worksheet with questions and class. */\nexport function findWorksheetById(id: string) {\n return prisma.worksheet.findUnique({\n where: { id },\n include: {\n questions: { orderBy: { order: \"asc\" as const } },\n class: true,\n },\n });\n}\n\n/** @returns Worksheet by ID (minimal). */\nexport function findWorksheetByIdMinimal(id: string) {\n return prisma.worksheet.findUnique({\n where: { id },\n });\n}\n\n/** @returns Worksheet by ID for an authorized class member. */\nexport function findWorksheetByIdForClassMember(id: string, userId: string) {\n return prisma.worksheet.findFirst({\n where: {\n id,\n ...worksheetClassMemberWhere(userId),\n },\n include: {\n questions: { orderBy: { order: \"asc\" as const } },\n class: true,\n tags: true,\n },\n });\n}\n\n/** @returns Worksheet by ID for an authorized teacher. */\nexport function findWorksheetByIdForTeacher(id: string, userId: string) {\n return prisma.worksheet.findFirst({\n where: {\n id,\n ...worksheetTeacherWhere(userId),\n },\n include: {\n questions: { orderBy: { order: \"asc\" as const } },\n class: true,\n tags: true,\n },\n });\n}\n\n/** @returns Worksheets for a class. */\nexport function findWorksheetsByClassId(classId: string) {\n return prisma.worksheet.findMany({\n where: { classId },\n include: {\n questions: { select: { id: true } },\n tags: true,\n },\n orderBy: { createdAt: \"desc\" },\n });\n}\n\n/** @returns Worksheet question by ID for an authorized teacher. */\nexport function findWorksheetQuestionByIdForTeacher(id: string, userId: string) {\n return prisma.worksheetQuestion.findFirst({\n where: {\n id,\n worksheet: worksheetTeacherWhere(userId),\n },\n });\n}\n\n/** @returns Worksheet question scoped to a worksheet. */\nexport function findWorksheetQuestionByIdInWorksheet(\n id: string,\n worksheetId: string\n) {\n return prisma.worksheetQuestion.findFirst({\n where: { id, worksheetId },\n });\n}\n\n/** Create a worksheet. */\nexport function createWorksheet(data: { classId: string; name: string }) {\n return prisma.worksheet.create({\n data,\n });\n}\n\n/** Update worksheet name. */\nexport function updateWorksheet(id: string, data: { name?: string }) {\n return prisma.worksheet.update({\n where: { id },\n data,\n });\n}\n\n/** Delete a worksheet. */\nexport function deleteWorksheet(id: string) {\n return prisma.worksheet.delete({\n where: { id },\n });\n}\n\n/**\n * Clone a worksheet and its questions into another class with a new name.\n * Does not copy student responses or assignment links.\n */\nexport async function duplicateWorksheetWithClient(\n tx: AppTransactionClient,\n sourceWorksheetId: string,\n targetClassId: string,\n name: string\n) {\n const source = await tx.worksheet.findUnique({\n where: { id: sourceWorksheetId },\n include: {\n questions: { orderBy: { order: \"asc\" } },\n },\n });\n\n if (!source) {\n return null;\n }\n\n const created = await tx.worksheet.create({\n data: { classId: targetClassId, name },\n });\n\n if (source.questions.length > 0) {\n await tx.worksheetQuestion.createMany({\n data: source.questions.map((q) => ({\n worksheetId: created.id,\n type: q.type,\n question: q.question,\n answer: q.answer,\n points: q.points,\n options: q.options ?? undefined,\n markScheme: q.markScheme ?? undefined,\n order: q.order,\n })),\n });\n }\n\n return created;\n}\n\nexport async function duplicateWorksheet(\n sourceWorksheetId: string,\n targetClassId: string,\n name: string\n) {\n return prisma.$transaction((tx) =>\n duplicateWorksheetWithClient(tx, sourceWorksheetId, targetClassId, name)\n );\n}\n\n/** @returns Questions for a worksheet. */\nexport function findQuestionsByWorksheetId(worksheetId: string) {\n return prisma.worksheetQuestion.findMany({\n where: { worksheetId },\n orderBy: { order: \"asc\" },\n });\n}\n\n/** Create a worksheet question. */\nexport function createWorksheetQuestion(data: {\n worksheetId: string;\n type: WorksheetQuestionType;\n question: string;\n answer: string;\n points?: number;\n options?: object;\n markScheme?: object;\n order?: number;\n}) {\n return prisma.worksheetQuestion.create({\n data,\n });\n}\n\n/** Update question order. */\nexport function updateWorksheetQuestionOrder(id: string, order: number) {\n return prisma.worksheetQuestion.update({\n where: { id },\n data: { order },\n });\n}\n\n/** Update a worksheet question. */\nexport function updateWorksheetQuestion(\n id: string,\n data: {\n question?: string;\n answer?: string;\n points?: number;\n options?: object;\n markScheme?: object;\n type?: WorksheetQuestionType;\n }\n) {\n return prisma.worksheetQuestion.update({\n where: { id },\n data,\n });\n}\n\n/** Delete a worksheet question. */\nexport function deleteWorksheetQuestion(id: string) {\n return prisma.worksheetQuestion.delete({\n where: { id },\n });\n}\n\n/** @returns Submission by ID. */\nexport function findSubmissionById(id: string) {\n return prisma.submission.findUnique({\n where: { id },\n });\n}\n\n/** @returns Submission if requester is the owning student or a class teacher for the worksheet. */\nexport function findSubmissionByIdForWorksheetAccess(\n id: string,\n worksheetId: string,\n worksheetClassId: string,\n userId: string\n) {\n return prisma.submission.findFirst({\n where: {\n id,\n assignment: {\n classId: worksheetClassId,\n worksheets: { some: { id: worksheetId } },\n },\n OR: [\n {\n studentId: userId,\n assignment: {\n class: {\n students: { some: { id: userId } },\n },\n },\n },\n {\n assignment: {\n class: classTeacherOrSchoolAdminWhere(userId),\n },\n },\n ],\n },\n select: {\n id: true,\n studentId: true,\n },\n });\n}\n\nconst worksheetResponseInclude = {\n responses: {\n include: {\n comments: {\n select: { id: true, isPinned: true },\n orderBy: [{ isPinned: \"desc\" as const }, { createdAt: \"asc\" as const }],\n },\n },\n },\n};\n\n/** @returns Worksheet response for submission and worksheet. */\nexport function findWorksheetResponseBySubmissionAndWorksheet(\n submissionId: string,\n worksheetId: string\n) {\n return prisma.studentWorksheetResponse.findFirst({\n where: { submissionId, worksheetId },\n include: worksheetResponseInclude,\n });\n}\n\n/** Get or create worksheet response for student. */\nexport async function findOrCreateWorksheetResponse(\n submissionId: string,\n worksheetId: string,\n studentId: string\n) {\n return prisma.$transaction(async (tx) => {\n const existing = await tx.studentWorksheetResponse.findFirst({\n where: { submissionId, worksheetId },\n include: worksheetResponseInclude,\n });\n if (existing) return existing;\n return tx.studentWorksheetResponse.create({\n data: { worksheetId, submissionId, studentId },\n include: worksheetResponseInclude,\n });\n });\n}\n\n/** Create a worksheet response. */\nexport function createWorksheetResponse(data: {\n worksheetId: string;\n submissionId: string;\n studentId: string;\n}) {\n return prisma.studentWorksheetResponse.create({\n data,\n include: {\n responses: {\n include: {\n comments: {\n select: { id: true, isPinned: true },\n orderBy: [{ isPinned: \"desc\" as const }, { createdAt: \"asc\" as const }],\n },\n },\n },\n },\n });\n}\n\n/** @returns Worksheet response by ID. */\nexport function findWorksheetResponseById(id: string) {\n return prisma.studentWorksheetResponse.findUnique({\n where: { id },\n include: { responses: true },\n });\n}\n\n/** @returns Worksheet response if requester is the owning student. */\nexport function findWorksheetResponseByIdForStudent(id: string, userId: string) {\n return prisma.studentWorksheetResponse.findFirst({\n where: {\n id,\n studentId: userId,\n worksheet: worksheetClassMemberWhere(userId),\n },\n include: { responses: true, worksheet: true },\n });\n}\n\n/** @returns Worksheet response if requester is a class teacher. */\nexport function findWorksheetResponseByIdForTeacher(id: string, userId: string) {\n return prisma.studentWorksheetResponse.findFirst({\n where: {\n id,\n worksheet: worksheetTeacherWhere(userId),\n },\n include: { responses: true, worksheet: true },\n });\n}\n\n/** @returns Worksheet response with question responses. */\nexport function findWorksheetResponseWithResponses(\n id: string,\n questionId?: string\n) {\n return prisma.studentWorksheetResponse.findUnique({\n where: { id },\n include: {\n responses: questionId\n ? { where: { questionId } }\n : true,\n },\n });\n}\n\n/** @returns Worksheet response with scoped responses if requester is the owning student. */\nexport function findWorksheetResponseWithResponsesForStudent(\n id: string,\n userId: string,\n questionId?: string\n) {\n return prisma.studentWorksheetResponse.findFirst({\n where: {\n id,\n studentId: userId,\n worksheet: worksheetClassMemberWhere(userId),\n },\n include: {\n worksheet: true,\n responses: questionId ? { where: { questionId } } : true,\n },\n });\n}\n\n/** @returns Worksheet response with scoped responses if requester is a class teacher. */\nexport function findWorksheetResponseWithResponsesForTeacher(\n id: string,\n userId: string,\n questionId?: string\n) {\n return prisma.studentWorksheetResponse.findFirst({\n where: {\n id,\n worksheet: worksheetTeacherWhere(userId),\n },\n include: {\n worksheet: true,\n responses: questionId ? { where: { questionId } } : true,\n },\n });\n}\n\n/** @returns Worksheet question by ID. */\nexport function findWorksheetQuestionById(id: string) {\n return prisma.worksheetQuestion.findUnique({\n where: { id },\n });\n}\n\n/** @returns Student question progress if requester is a class teacher. */\nexport function findStudentQuestionProgressByIdForTeacher(\n id: string,\n userId: string\n) {\n return prisma.studentQuestionProgress.findFirst({\n where: {\n id,\n question: {\n worksheet: worksheetTeacherWhere(userId),\n },\n },\n include: {\n question: true,\n studentWorksheetResponse: true,\n },\n });\n}\n\n/** @returns Student question progress by id and worksheet response if requester is a class teacher. */\nexport function findStudentQuestionProgressByIdForTeacherAndResponse(\n id: string,\n studentWorksheetResponseId: string,\n userId: string\n) {\n return prisma.studentQuestionProgress.findFirst({\n where: {\n id,\n studentWorksheetResponseId,\n question: {\n worksheet: worksheetTeacherWhere(userId),\n },\n },\n include: {\n question: true,\n studentWorksheetResponse: true,\n },\n });\n}\n\n/**\n * @returns Student question progress if requester is the answering student (class member) or a\n * class teacher / school admin for that worksheet.\n */\nexport function findStudentQuestionProgressByIdForStudentOrTeacher(\n id: string,\n userId: string\n) {\n return prisma.studentQuestionProgress.findFirst({\n where: {\n id,\n OR: [\n {\n studentId: userId,\n question: { worksheet: worksheetClassMemberWhere(userId) },\n },\n {\n question: { worksheet: worksheetTeacherWhere(userId) },\n },\n ],\n },\n include: {\n question: true,\n studentWorksheetResponse: true,\n },\n });\n}\n\n/** Update student's question progress. */\nexport function updateStudentQuestionProgress(\n id: string,\n data: {\n response?: string;\n isCorrect?: boolean;\n points?: number;\n status?: JobStatus;\n }\n) {\n return prisma.studentQuestionProgress.update({\n where: { id },\n data,\n });\n}\n\n/** Create student question progress. */\nexport function createStudentQuestionProgress(data: {\n studentId: string;\n questionId: string;\n studentWorksheetResponseId: string;\n response: string;\n isCorrect?: boolean;\n points?: number;\n}) {\n return prisma.studentQuestionProgress.create({\n data,\n });\n}\n\n/** @returns Student's progress for a question. */\nexport function findStudentQuestionProgress(\n studentId: string,\n questionId: string,\n studentWorksheetResponseId: string\n) {\n return prisma.studentQuestionProgress.findFirst({\n where: {\n studentId,\n questionId,\n studentWorksheetResponseId,\n },\n });\n}\n\n/** Update progress for grading (AI feedback, marks). */\nexport function updateStudentQuestionProgressForGrading(\n id: string,\n data: {\n isCorrect?: boolean;\n feedback?: string;\n markschemeState?: object;\n points?: number;\n response?: string;\n }\n) {\n return prisma.studentQuestionProgress.update({\n where: { id },\n data,\n });\n}\n\n/** Create progress record for grading pipeline. */\nexport function createStudentQuestionProgressForGrading(data: {\n studentId: string;\n questionId: string;\n studentWorksheetResponseId: string;\n response: string;\n isCorrect: boolean;\n feedback?: string;\n markschemeState?: object;\n points?: number;\n}) {\n return prisma.studentQuestionProgress.create({\n data,\n });\n}\n\n/** Create a comment on a worksheet response. */\nexport function createComment(data: {\n studentQuestionProgressId: string;\n content: string;\n authorId: string;\n}) {\n return prisma.comment.create({\n data,\n });\n}\n"],"names":[],"mappings":"AAAA;;GAEG;;;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAG1C,OAAO,EACL,6BAA6B,EAC7B,8BAA8B,GAC/B,MAAM,aAAa,CAAC;AAErB,MAAM,yBAAyB,GAAG,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IACrD,KAAK,EAAE,6BAA6B,CAAC,MAAM,CAAC;CAC7C,CAAC,CAAC;AAEH,MAAM,qBAAqB,GAAG,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;IACjD,KAAK,EAAE,8BAA8B,CAAC,MAAM,CAAC;CAC9C,CAAC,CAAC;AAEH,mDAAm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C,IAAI;KACL,CAAC,CAAC;AACL,CAAC;AAED,gDAAgD;AAChD,MAAM,UAAU,aAAa,CAAC,IAI7B;IACC,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;QAC3B,IAAI;KACL,CAAC,CAAC;AACL,CAAC","debug_id":"392edd40-7fcc-5f70-9f75-772cac189e55"}
|
|
1
|
+
{"version":3,"file":"worksheet.js","sources":["models/worksheet.ts"],"sourceRoot":"/","sourcesContent":["/**\n * Worksheet model – worksheets, questions, submissions, student progress, grading.\n */\nimport { prisma } from \"../lib/prisma.js\";\nimport type { AppTransactionClient } from \"../lib/prisma.js\";\nimport type { WorksheetQuestionType, JobStatus } from \"@prisma/client\";\nimport {\n classMemberOrSchoolAdminWhere,\n classTeacherOrSchoolAdminWhere,\n} from \"./access.js\";\n\nconst worksheetClassMemberWhere = (userId: string) => ({\n class: classMemberOrSchoolAdminWhere(userId),\n});\n\nconst worksheetTeacherWhere = (userId: string) => ({\n class: classTeacherOrSchoolAdminWhere(userId),\n});\n\n/** @returns Worksheet with questions and class. */\nexport function findWorksheetById(id: string) {\n return prisma.worksheet.findUnique({\n where: { id },\n include: {\n questions: { orderBy: { order: \"asc\" as const } },\n class: true,\n },\n });\n}\n\n/** @returns Worksheet by ID (minimal). */\nexport function findWorksheetByIdMinimal(id: string) {\n return prisma.worksheet.findUnique({\n where: { id },\n });\n}\n\n/** @returns Worksheet by ID for an authorized class member. */\nexport function findWorksheetByIdForClassMember(id: string, userId: string) {\n return prisma.worksheet.findFirst({\n where: {\n id,\n ...worksheetClassMemberWhere(userId),\n },\n include: {\n questions: { orderBy: { order: \"asc\" as const } },\n class: true,\n tags: true,\n },\n });\n}\n\n/** @returns Worksheet by ID for an authorized teacher. */\nexport function findWorksheetByIdForTeacher(id: string, userId: string) {\n return prisma.worksheet.findFirst({\n where: {\n id,\n ...worksheetTeacherWhere(userId),\n },\n include: {\n questions: { orderBy: { order: \"asc\" as const } },\n class: true,\n tags: true,\n },\n });\n}\n\n/** @returns Worksheets for a class. */\nexport function findWorksheetsByClassId(classId: string) {\n return prisma.worksheet.findMany({\n where: { classId },\n include: {\n questions: { select: { id: true, question: true }, orderBy: { order: \"asc\" } },\n tags: true,\n },\n orderBy: { createdAt: \"desc\" },\n });\n}\n\n/** @returns Worksheet question by ID for an authorized teacher. */\nexport function findWorksheetQuestionByIdForTeacher(id: string, userId: string) {\n return prisma.worksheetQuestion.findFirst({\n where: {\n id,\n worksheet: worksheetTeacherWhere(userId),\n },\n });\n}\n\n/** @returns Worksheet question scoped to a worksheet. */\nexport function findWorksheetQuestionByIdInWorksheet(\n id: string,\n worksheetId: string\n) {\n return prisma.worksheetQuestion.findFirst({\n where: { id, worksheetId },\n });\n}\n\n/** Create a worksheet. */\nexport function createWorksheet(data: { classId: string; name: string }) {\n return prisma.worksheet.create({\n data,\n });\n}\n\n/** Update worksheet name. */\nexport function updateWorksheet(id: string, data: { name?: string }) {\n return prisma.worksheet.update({\n where: { id },\n data,\n });\n}\n\n/** Delete a worksheet. */\nexport function deleteWorksheet(id: string) {\n return prisma.worksheet.delete({\n where: { id },\n });\n}\n\n/**\n * Clone a worksheet and its questions into another class with a new name.\n * Does not copy student responses or assignment links.\n */\nexport async function duplicateWorksheetWithClient(\n tx: AppTransactionClient,\n sourceWorksheetId: string,\n targetClassId: string,\n name: string\n) {\n const source = await tx.worksheet.findUnique({\n where: { id: sourceWorksheetId },\n include: {\n questions: { orderBy: { order: \"asc\" } },\n },\n });\n\n if (!source) {\n return null;\n }\n\n const created = await tx.worksheet.create({\n data: { classId: targetClassId, name },\n });\n\n if (source.questions.length > 0) {\n await tx.worksheetQuestion.createMany({\n data: source.questions.map((q) => ({\n worksheetId: created.id,\n type: q.type,\n question: q.question,\n answer: q.answer,\n points: q.points,\n options: q.options ?? undefined,\n markScheme: q.markScheme ?? undefined,\n order: q.order,\n })),\n });\n }\n\n return created;\n}\n\nexport async function duplicateWorksheet(\n sourceWorksheetId: string,\n targetClassId: string,\n name: string\n) {\n return prisma.$transaction((tx) =>\n duplicateWorksheetWithClient(tx, sourceWorksheetId, targetClassId, name)\n );\n}\n\n/** @returns Questions for a worksheet. */\nexport function findQuestionsByWorksheetId(worksheetId: string) {\n return prisma.worksheetQuestion.findMany({\n where: { worksheetId },\n orderBy: { order: \"asc\" },\n });\n}\n\n/** Create a worksheet question. */\nexport function createWorksheetQuestion(data: {\n worksheetId: string;\n type: WorksheetQuestionType;\n question: string;\n answer: string;\n points?: number;\n options?: object;\n markScheme?: object;\n order?: number;\n}) {\n return prisma.worksheetQuestion.create({\n data,\n });\n}\n\n/** Update question order. */\nexport function updateWorksheetQuestionOrder(id: string, order: number) {\n return prisma.worksheetQuestion.update({\n where: { id },\n data: { order },\n });\n}\n\n/** Update a worksheet question. */\nexport function updateWorksheetQuestion(\n id: string,\n data: {\n question?: string;\n answer?: string;\n points?: number;\n options?: object;\n markScheme?: object;\n type?: WorksheetQuestionType;\n }\n) {\n return prisma.worksheetQuestion.update({\n where: { id },\n data,\n });\n}\n\n/** Delete a worksheet question. */\nexport function deleteWorksheetQuestion(id: string) {\n return prisma.worksheetQuestion.delete({\n where: { id },\n });\n}\n\n/** @returns Submission by ID. */\nexport function findSubmissionById(id: string) {\n return prisma.submission.findUnique({\n where: { id },\n });\n}\n\n/** @returns Submission if requester is the owning student or a class teacher for the worksheet. */\nexport function findSubmissionByIdForWorksheetAccess(\n id: string,\n worksheetId: string,\n worksheetClassId: string,\n userId: string\n) {\n return prisma.submission.findFirst({\n where: {\n id,\n assignment: {\n classId: worksheetClassId,\n worksheets: { some: { id: worksheetId } },\n },\n OR: [\n {\n studentId: userId,\n assignment: {\n class: {\n students: { some: { id: userId } },\n },\n },\n },\n {\n assignment: {\n class: classTeacherOrSchoolAdminWhere(userId),\n },\n },\n ],\n },\n select: {\n id: true,\n studentId: true,\n },\n });\n}\n\nconst worksheetResponseInclude = {\n responses: {\n include: {\n comments: {\n select: { id: true, isPinned: true },\n orderBy: [{ isPinned: \"desc\" as const }, { createdAt: \"asc\" as const }],\n },\n },\n },\n};\n\n/** @returns Worksheet response for submission and worksheet. */\nexport function findWorksheetResponseBySubmissionAndWorksheet(\n submissionId: string,\n worksheetId: string\n) {\n return prisma.studentWorksheetResponse.findFirst({\n where: { submissionId, worksheetId },\n include: worksheetResponseInclude,\n });\n}\n\n/** Get or create worksheet response for student. */\nexport async function findOrCreateWorksheetResponse(\n submissionId: string,\n worksheetId: string,\n studentId: string\n) {\n return prisma.$transaction(async (tx) => {\n const existing = await tx.studentWorksheetResponse.findFirst({\n where: { submissionId, worksheetId },\n include: worksheetResponseInclude,\n });\n if (existing) return existing;\n return tx.studentWorksheetResponse.create({\n data: { worksheetId, submissionId, studentId },\n include: worksheetResponseInclude,\n });\n });\n}\n\n/** Create a worksheet response. */\nexport function createWorksheetResponse(data: {\n worksheetId: string;\n submissionId: string;\n studentId: string;\n}) {\n return prisma.studentWorksheetResponse.create({\n data,\n include: {\n responses: {\n include: {\n comments: {\n select: { id: true, isPinned: true },\n orderBy: [{ isPinned: \"desc\" as const }, { createdAt: \"asc\" as const }],\n },\n },\n },\n },\n });\n}\n\n/** @returns Worksheet response by ID. */\nexport function findWorksheetResponseById(id: string) {\n return prisma.studentWorksheetResponse.findUnique({\n where: { id },\n include: { responses: true },\n });\n}\n\n/** @returns Worksheet response if requester is the owning student. */\nexport function findWorksheetResponseByIdForStudent(id: string, userId: string) {\n return prisma.studentWorksheetResponse.findFirst({\n where: {\n id,\n studentId: userId,\n worksheet: worksheetClassMemberWhere(userId),\n },\n include: { responses: true, worksheet: true },\n });\n}\n\n/** @returns Worksheet response if requester is a class teacher. */\nexport function findWorksheetResponseByIdForTeacher(id: string, userId: string) {\n return prisma.studentWorksheetResponse.findFirst({\n where: {\n id,\n worksheet: worksheetTeacherWhere(userId),\n },\n include: { responses: true, worksheet: true },\n });\n}\n\n/** @returns Worksheet response with question responses. */\nexport function findWorksheetResponseWithResponses(\n id: string,\n questionId?: string\n) {\n return prisma.studentWorksheetResponse.findUnique({\n where: { id },\n include: {\n responses: questionId\n ? { where: { questionId } }\n : true,\n },\n });\n}\n\n/** @returns Worksheet response with scoped responses if requester is the owning student. */\nexport function findWorksheetResponseWithResponsesForStudent(\n id: string,\n userId: string,\n questionId?: string\n) {\n return prisma.studentWorksheetResponse.findFirst({\n where: {\n id,\n studentId: userId,\n worksheet: worksheetClassMemberWhere(userId),\n },\n include: {\n worksheet: true,\n responses: questionId ? { where: { questionId } } : true,\n },\n });\n}\n\n/** @returns Worksheet response with scoped responses if requester is a class teacher. */\nexport function findWorksheetResponseWithResponsesForTeacher(\n id: string,\n userId: string,\n questionId?: string\n) {\n return prisma.studentWorksheetResponse.findFirst({\n where: {\n id,\n worksheet: worksheetTeacherWhere(userId),\n },\n include: {\n worksheet: true,\n responses: questionId ? { where: { questionId } } : true,\n },\n });\n}\n\n/** @returns Worksheet question by ID. */\nexport function findWorksheetQuestionById(id: string) {\n return prisma.worksheetQuestion.findUnique({\n where: { id },\n });\n}\n\n/** @returns Student question progress if requester is a class teacher. */\nexport function findStudentQuestionProgressByIdForTeacher(\n id: string,\n userId: string\n) {\n return prisma.studentQuestionProgress.findFirst({\n where: {\n id,\n question: {\n worksheet: worksheetTeacherWhere(userId),\n },\n },\n include: {\n question: true,\n studentWorksheetResponse: true,\n },\n });\n}\n\n/** @returns Student question progress by id and worksheet response if requester is a class teacher. */\nexport function findStudentQuestionProgressByIdForTeacherAndResponse(\n id: string,\n studentWorksheetResponseId: string,\n userId: string\n) {\n return prisma.studentQuestionProgress.findFirst({\n where: {\n id,\n studentWorksheetResponseId,\n question: {\n worksheet: worksheetTeacherWhere(userId),\n },\n },\n include: {\n question: true,\n studentWorksheetResponse: true,\n },\n });\n}\n\n/**\n * @returns Student question progress if requester is the answering student (class member) or a\n * class teacher / school admin for that worksheet.\n */\nexport function findStudentQuestionProgressByIdForStudentOrTeacher(\n id: string,\n userId: string\n) {\n return prisma.studentQuestionProgress.findFirst({\n where: {\n id,\n OR: [\n {\n studentId: userId,\n question: { worksheet: worksheetClassMemberWhere(userId) },\n },\n {\n question: { worksheet: worksheetTeacherWhere(userId) },\n },\n ],\n },\n include: {\n question: true,\n studentWorksheetResponse: true,\n },\n });\n}\n\n/** Update student's question progress. */\nexport function updateStudentQuestionProgress(\n id: string,\n data: {\n response?: string;\n isCorrect?: boolean;\n points?: number;\n status?: JobStatus;\n }\n) {\n return prisma.studentQuestionProgress.update({\n where: { id },\n data,\n });\n}\n\n/** Create student question progress. */\nexport function createStudentQuestionProgress(data: {\n studentId: string;\n questionId: string;\n studentWorksheetResponseId: string;\n response: string;\n isCorrect?: boolean;\n points?: number;\n}) {\n return prisma.studentQuestionProgress.create({\n data,\n });\n}\n\n/** @returns Student's progress for a question. */\nexport function findStudentQuestionProgress(\n studentId: string,\n questionId: string,\n studentWorksheetResponseId: string\n) {\n return prisma.studentQuestionProgress.findFirst({\n where: {\n studentId,\n questionId,\n studentWorksheetResponseId,\n },\n });\n}\n\n/** Update progress for grading (AI feedback, marks). */\nexport function updateStudentQuestionProgressForGrading(\n id: string,\n data: {\n isCorrect?: boolean;\n feedback?: string;\n markschemeState?: object;\n points?: number;\n response?: string;\n }\n) {\n return prisma.studentQuestionProgress.update({\n where: { id },\n data,\n });\n}\n\n/** Create progress record for grading pipeline. */\nexport function createStudentQuestionProgressForGrading(data: {\n studentId: string;\n questionId: string;\n studentWorksheetResponseId: string;\n response: string;\n isCorrect: boolean;\n feedback?: string;\n markschemeState?: object;\n points?: number;\n}) {\n return prisma.studentQuestionProgress.create({\n data,\n });\n}\n\n/** Create a comment on a worksheet response. */\nexport function createComment(data: {\n studentQuestionProgressId: string;\n content: string;\n authorId: string;\n}) {\n return prisma.comment.create({\n data,\n });\n}\n"],"names":[],"mappings":"AAAA;;GAEG;;;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAG1C,OAAO,EACL,6BAA6B,EAC7B,8BAA8B,GAC/B,MAAM,aAAa,CAAC;AAErB,MAAM,yBAAyB,GAAG,C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,CAAC;AACL,CAAC;AAED,wDAAwD;AACxD,MAAM,UAAU,uCAAuC,CACrD,EAAU,EACV,IAMC;IAED,OAAO,MAAM,CAAC,uBAAuB,CAAC,MAAM,CAAC;QAC3C,KAAK,EAAE,EAAE,EAAE,EAAE;QACb,IAAI;KACL,CAAC,CAAC;AACL,CAAC;AAED,mDAAmD;AACnD,MAAM,UAAU,uCAAuC,CAAC,IASvD;IACC,OAAO,MAAM,CAAC,uBAAuB,CAAC,MAAM,CAAC;QAC3C,IAAI;KACL,CAAC,CAAC;AACL,CAAC;AAED,gDAAgD;AAChD,MAAM,UAAU,aAAa,CAAC,IAI7B;IACC,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;QAC3B,IAAI;KACL,CAAC,CAAC;AACL,CAAC","debug_id":"f73619ba-8abd-5ea6-a244-9b97fff9d077"}
|
package/dist/routers/_app.d.ts
CHANGED
|
@@ -73,6 +73,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
73
73
|
} | null;
|
|
74
74
|
}[];
|
|
75
75
|
color: string | null;
|
|
76
|
+
symbol: string | null;
|
|
76
77
|
schoolId: string | null;
|
|
77
78
|
school: {
|
|
78
79
|
id: string;
|
|
@@ -127,6 +128,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
127
128
|
} | null;
|
|
128
129
|
}[];
|
|
129
130
|
color: string | null;
|
|
131
|
+
symbol: string | null;
|
|
130
132
|
schoolId: string | null;
|
|
131
133
|
school: {
|
|
132
134
|
id: string;
|
|
@@ -253,6 +255,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
253
255
|
} | null;
|
|
254
256
|
};
|
|
255
257
|
}[];
|
|
258
|
+
symbol: string | null;
|
|
256
259
|
section: string;
|
|
257
260
|
id: string;
|
|
258
261
|
name: string;
|
|
@@ -272,6 +275,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
272
275
|
input: {
|
|
273
276
|
[x: string]: unknown;
|
|
274
277
|
classId: string;
|
|
278
|
+
symbol?: string | null | undefined;
|
|
275
279
|
section?: string | undefined;
|
|
276
280
|
name?: string | undefined;
|
|
277
281
|
color?: string | undefined;
|
|
@@ -283,6 +287,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
283
287
|
};
|
|
284
288
|
output: {
|
|
285
289
|
updatedClass: {
|
|
290
|
+
symbol: string | null;
|
|
286
291
|
section: string;
|
|
287
292
|
id: string;
|
|
288
293
|
name: string;
|
|
@@ -301,6 +306,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
301
306
|
section: string;
|
|
302
307
|
name: string;
|
|
303
308
|
subject: string;
|
|
309
|
+
symbol?: string | null | undefined;
|
|
304
310
|
teachers?: string[] | undefined;
|
|
305
311
|
students?: string[] | undefined;
|
|
306
312
|
schoolId?: string | undefined;
|
|
@@ -329,6 +335,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
329
335
|
schoolId: string | null;
|
|
330
336
|
}[];
|
|
331
337
|
} & {
|
|
338
|
+
symbol: string | null;
|
|
332
339
|
section: string;
|
|
333
340
|
id: string;
|
|
334
341
|
name: string;
|
|
@@ -385,6 +392,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
385
392
|
};
|
|
386
393
|
output: {
|
|
387
394
|
updatedClass: {
|
|
395
|
+
symbol: string | null;
|
|
388
396
|
section: string;
|
|
389
397
|
id: string;
|
|
390
398
|
name: string;
|
|
@@ -413,6 +421,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
413
421
|
};
|
|
414
422
|
output: {
|
|
415
423
|
updatedClass: {
|
|
424
|
+
symbol: string | null;
|
|
416
425
|
section: string;
|
|
417
426
|
id: string;
|
|
418
427
|
name: string;
|
|
@@ -714,6 +723,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
714
723
|
contents: string;
|
|
715
724
|
};
|
|
716
725
|
output: {
|
|
726
|
+
symbol: string | null;
|
|
717
727
|
section: string;
|
|
718
728
|
id: string;
|
|
719
729
|
name: string;
|
|
@@ -1055,6 +1065,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1055
1065
|
classId: string | null;
|
|
1056
1066
|
structured: string;
|
|
1057
1067
|
}[];
|
|
1068
|
+
symbol: string | null;
|
|
1058
1069
|
section: string;
|
|
1059
1070
|
id: string;
|
|
1060
1071
|
name: string;
|
|
@@ -1713,6 +1724,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1713
1724
|
output: {
|
|
1714
1725
|
type: import(".prisma/client").$Enums.AssignmentType;
|
|
1715
1726
|
class: {
|
|
1727
|
+
symbol: string | null;
|
|
1716
1728
|
section: string;
|
|
1717
1729
|
id: string;
|
|
1718
1730
|
name: string;
|
|
@@ -1905,6 +1917,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1905
1917
|
late: boolean;
|
|
1906
1918
|
assignment: {
|
|
1907
1919
|
class: {
|
|
1920
|
+
symbol: string | null;
|
|
1908
1921
|
section: string;
|
|
1909
1922
|
id: string;
|
|
1910
1923
|
name: string;
|
|
@@ -2047,6 +2060,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
2047
2060
|
late: boolean;
|
|
2048
2061
|
assignment: {
|
|
2049
2062
|
class: {
|
|
2063
|
+
symbol: string | null;
|
|
2050
2064
|
section: string;
|
|
2051
2065
|
id: string;
|
|
2052
2066
|
name: string;
|
|
@@ -2210,6 +2224,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
2210
2224
|
output: {
|
|
2211
2225
|
assignment: {
|
|
2212
2226
|
class: {
|
|
2227
|
+
symbol: string | null;
|
|
2213
2228
|
section: string;
|
|
2214
2229
|
id: string;
|
|
2215
2230
|
name: string;
|
|
@@ -2319,6 +2334,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
2319
2334
|
late: boolean;
|
|
2320
2335
|
assignment: {
|
|
2321
2336
|
class: {
|
|
2337
|
+
symbol: string | null;
|
|
2322
2338
|
section: string;
|
|
2323
2339
|
id: string;
|
|
2324
2340
|
name: string;
|
|
@@ -2709,6 +2725,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
2709
2725
|
output: {
|
|
2710
2726
|
assignment: {
|
|
2711
2727
|
class: {
|
|
2728
|
+
symbol: string | null;
|
|
2712
2729
|
section: string;
|
|
2713
2730
|
id: string;
|
|
2714
2731
|
name: string;
|
|
@@ -4010,6 +4027,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
4010
4027
|
id: string;
|
|
4011
4028
|
}[];
|
|
4012
4029
|
} & {
|
|
4030
|
+
symbol: string | null;
|
|
4013
4031
|
section: string;
|
|
4014
4032
|
id: string;
|
|
4015
4033
|
name: string;
|
|
@@ -4403,6 +4421,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
4403
4421
|
events: {
|
|
4404
4422
|
personal: ({
|
|
4405
4423
|
class: {
|
|
4424
|
+
symbol: string | null;
|
|
4406
4425
|
section: string;
|
|
4407
4426
|
id: string;
|
|
4408
4427
|
name: string;
|
|
@@ -4454,6 +4473,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
4454
4473
|
})[];
|
|
4455
4474
|
class: ({
|
|
4456
4475
|
class: {
|
|
4476
|
+
symbol: string | null;
|
|
4457
4477
|
section: string;
|
|
4458
4478
|
id: string;
|
|
4459
4479
|
name: string;
|
|
@@ -5896,6 +5916,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
5896
5916
|
};
|
|
5897
5917
|
output: {
|
|
5898
5918
|
class: {
|
|
5919
|
+
symbol: string | null;
|
|
5899
5920
|
section: string;
|
|
5900
5921
|
id: string;
|
|
5901
5922
|
name: string;
|
|
@@ -5963,6 +5984,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
5963
5984
|
}[];
|
|
5964
5985
|
questions: {
|
|
5965
5986
|
id: string;
|
|
5987
|
+
question: string;
|
|
5966
5988
|
}[];
|
|
5967
5989
|
status: import(".prisma/client").$Enums.JobStatus | null;
|
|
5968
5990
|
id: string;
|
|
@@ -7266,6 +7288,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
7266
7288
|
assignments: number;
|
|
7267
7289
|
};
|
|
7268
7290
|
} & {
|
|
7291
|
+
symbol: string | null;
|
|
7269
7292
|
section: string;
|
|
7270
7293
|
id: string;
|
|
7271
7294
|
name: string;
|
|
@@ -7287,6 +7310,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
7287
7310
|
name: string;
|
|
7288
7311
|
schoolId: string;
|
|
7289
7312
|
subject: string;
|
|
7313
|
+
symbol?: string | null | undefined;
|
|
7290
7314
|
teachers?: string[] | undefined;
|
|
7291
7315
|
students?: string[] | undefined;
|
|
7292
7316
|
color?: string | undefined;
|
|
@@ -7315,6 +7339,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
7315
7339
|
schoolId: string | null;
|
|
7316
7340
|
}[];
|
|
7317
7341
|
} & {
|
|
7342
|
+
symbol: string | null;
|
|
7318
7343
|
section: string;
|
|
7319
7344
|
id: string;
|
|
7320
7345
|
name: string;
|
|
@@ -9189,6 +9214,7 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
|
|
|
9189
9214
|
} | null;
|
|
9190
9215
|
}[];
|
|
9191
9216
|
color: string | null;
|
|
9217
|
+
symbol: string | null;
|
|
9192
9218
|
schoolId: string | null;
|
|
9193
9219
|
school: {
|
|
9194
9220
|
id: string;
|
|
@@ -9243,6 +9269,7 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
|
|
|
9243
9269
|
} | null;
|
|
9244
9270
|
}[];
|
|
9245
9271
|
color: string | null;
|
|
9272
|
+
symbol: string | null;
|
|
9246
9273
|
schoolId: string | null;
|
|
9247
9274
|
school: {
|
|
9248
9275
|
id: string;
|
|
@@ -9369,6 +9396,7 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
|
|
|
9369
9396
|
} | null;
|
|
9370
9397
|
};
|
|
9371
9398
|
}[];
|
|
9399
|
+
symbol: string | null;
|
|
9372
9400
|
section: string;
|
|
9373
9401
|
id: string;
|
|
9374
9402
|
name: string;
|
|
@@ -9388,6 +9416,7 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
|
|
|
9388
9416
|
input: {
|
|
9389
9417
|
[x: string]: unknown;
|
|
9390
9418
|
classId: string;
|
|
9419
|
+
symbol?: string | null | undefined;
|
|
9391
9420
|
section?: string | undefined;
|
|
9392
9421
|
name?: string | undefined;
|
|
9393
9422
|
color?: string | undefined;
|
|
@@ -9399,6 +9428,7 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
|
|
|
9399
9428
|
};
|
|
9400
9429
|
output: {
|
|
9401
9430
|
updatedClass: {
|
|
9431
|
+
symbol: string | null;
|
|
9402
9432
|
section: string;
|
|
9403
9433
|
id: string;
|
|
9404
9434
|
name: string;
|
|
@@ -9417,6 +9447,7 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
|
|
|
9417
9447
|
section: string;
|
|
9418
9448
|
name: string;
|
|
9419
9449
|
subject: string;
|
|
9450
|
+
symbol?: string | null | undefined;
|
|
9420
9451
|
teachers?: string[] | undefined;
|
|
9421
9452
|
students?: string[] | undefined;
|
|
9422
9453
|
schoolId?: string | undefined;
|
|
@@ -9445,6 +9476,7 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
|
|
|
9445
9476
|
schoolId: string | null;
|
|
9446
9477
|
}[];
|
|
9447
9478
|
} & {
|
|
9479
|
+
symbol: string | null;
|
|
9448
9480
|
section: string;
|
|
9449
9481
|
id: string;
|
|
9450
9482
|
name: string;
|
|
@@ -9501,6 +9533,7 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
|
|
|
9501
9533
|
};
|
|
9502
9534
|
output: {
|
|
9503
9535
|
updatedClass: {
|
|
9536
|
+
symbol: string | null;
|
|
9504
9537
|
section: string;
|
|
9505
9538
|
id: string;
|
|
9506
9539
|
name: string;
|
|
@@ -9529,6 +9562,7 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
|
|
|
9529
9562
|
};
|
|
9530
9563
|
output: {
|
|
9531
9564
|
updatedClass: {
|
|
9565
|
+
symbol: string | null;
|
|
9532
9566
|
section: string;
|
|
9533
9567
|
id: string;
|
|
9534
9568
|
name: string;
|
|
@@ -9830,6 +9864,7 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
|
|
|
9830
9864
|
contents: string;
|
|
9831
9865
|
};
|
|
9832
9866
|
output: {
|
|
9867
|
+
symbol: string | null;
|
|
9833
9868
|
section: string;
|
|
9834
9869
|
id: string;
|
|
9835
9870
|
name: string;
|
|
@@ -10171,6 +10206,7 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
|
|
|
10171
10206
|
classId: string | null;
|
|
10172
10207
|
structured: string;
|
|
10173
10208
|
}[];
|
|
10209
|
+
symbol: string | null;
|
|
10174
10210
|
section: string;
|
|
10175
10211
|
id: string;
|
|
10176
10212
|
name: string;
|
|
@@ -10829,6 +10865,7 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
|
|
|
10829
10865
|
output: {
|
|
10830
10866
|
type: import(".prisma/client").$Enums.AssignmentType;
|
|
10831
10867
|
class: {
|
|
10868
|
+
symbol: string | null;
|
|
10832
10869
|
section: string;
|
|
10833
10870
|
id: string;
|
|
10834
10871
|
name: string;
|
|
@@ -11021,6 +11058,7 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
|
|
|
11021
11058
|
late: boolean;
|
|
11022
11059
|
assignment: {
|
|
11023
11060
|
class: {
|
|
11061
|
+
symbol: string | null;
|
|
11024
11062
|
section: string;
|
|
11025
11063
|
id: string;
|
|
11026
11064
|
name: string;
|
|
@@ -11163,6 +11201,7 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
|
|
|
11163
11201
|
late: boolean;
|
|
11164
11202
|
assignment: {
|
|
11165
11203
|
class: {
|
|
11204
|
+
symbol: string | null;
|
|
11166
11205
|
section: string;
|
|
11167
11206
|
id: string;
|
|
11168
11207
|
name: string;
|
|
@@ -11326,6 +11365,7 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
|
|
|
11326
11365
|
output: {
|
|
11327
11366
|
assignment: {
|
|
11328
11367
|
class: {
|
|
11368
|
+
symbol: string | null;
|
|
11329
11369
|
section: string;
|
|
11330
11370
|
id: string;
|
|
11331
11371
|
name: string;
|
|
@@ -11435,6 +11475,7 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
|
|
|
11435
11475
|
late: boolean;
|
|
11436
11476
|
assignment: {
|
|
11437
11477
|
class: {
|
|
11478
|
+
symbol: string | null;
|
|
11438
11479
|
section: string;
|
|
11439
11480
|
id: string;
|
|
11440
11481
|
name: string;
|
|
@@ -11825,6 +11866,7 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
|
|
|
11825
11866
|
output: {
|
|
11826
11867
|
assignment: {
|
|
11827
11868
|
class: {
|
|
11869
|
+
symbol: string | null;
|
|
11828
11870
|
section: string;
|
|
11829
11871
|
id: string;
|
|
11830
11872
|
name: string;
|
|
@@ -13126,6 +13168,7 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
|
|
|
13126
13168
|
id: string;
|
|
13127
13169
|
}[];
|
|
13128
13170
|
} & {
|
|
13171
|
+
symbol: string | null;
|
|
13129
13172
|
section: string;
|
|
13130
13173
|
id: string;
|
|
13131
13174
|
name: string;
|
|
@@ -13519,6 +13562,7 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
|
|
|
13519
13562
|
events: {
|
|
13520
13563
|
personal: ({
|
|
13521
13564
|
class: {
|
|
13565
|
+
symbol: string | null;
|
|
13522
13566
|
section: string;
|
|
13523
13567
|
id: string;
|
|
13524
13568
|
name: string;
|
|
@@ -13570,6 +13614,7 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
|
|
|
13570
13614
|
})[];
|
|
13571
13615
|
class: ({
|
|
13572
13616
|
class: {
|
|
13617
|
+
symbol: string | null;
|
|
13573
13618
|
section: string;
|
|
13574
13619
|
id: string;
|
|
13575
13620
|
name: string;
|
|
@@ -15012,6 +15057,7 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
|
|
|
15012
15057
|
};
|
|
15013
15058
|
output: {
|
|
15014
15059
|
class: {
|
|
15060
|
+
symbol: string | null;
|
|
15015
15061
|
section: string;
|
|
15016
15062
|
id: string;
|
|
15017
15063
|
name: string;
|
|
@@ -15079,6 +15125,7 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
|
|
|
15079
15125
|
}[];
|
|
15080
15126
|
questions: {
|
|
15081
15127
|
id: string;
|
|
15128
|
+
question: string;
|
|
15082
15129
|
}[];
|
|
15083
15130
|
status: import(".prisma/client").$Enums.JobStatus | null;
|
|
15084
15131
|
id: string;
|
|
@@ -16382,6 +16429,7 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
|
|
|
16382
16429
|
assignments: number;
|
|
16383
16430
|
};
|
|
16384
16431
|
} & {
|
|
16432
|
+
symbol: string | null;
|
|
16385
16433
|
section: string;
|
|
16386
16434
|
id: string;
|
|
16387
16435
|
name: string;
|
|
@@ -16403,6 +16451,7 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
|
|
|
16403
16451
|
name: string;
|
|
16404
16452
|
schoolId: string;
|
|
16405
16453
|
subject: string;
|
|
16454
|
+
symbol?: string | null | undefined;
|
|
16406
16455
|
teachers?: string[] | undefined;
|
|
16407
16456
|
students?: string[] | undefined;
|
|
16408
16457
|
color?: string | undefined;
|
|
@@ -16431,6 +16480,7 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
|
|
|
16431
16480
|
schoolId: string | null;
|
|
16432
16481
|
}[];
|
|
16433
16482
|
} & {
|
|
16483
|
+
symbol: string | null;
|
|
16434
16484
|
section: string;
|
|
16435
16485
|
id: string;
|
|
16436
16486
|
name: string;
|