@studious-lms/server 1.23.0 → 1.25.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/.env.example +0 -1
- package/data/curriculum/nepal-cdc-g4-g5/README.md +90 -0
- package/data/curriculum/nepal-cdc-g4-g5/manifest.json +97 -0
- package/data/curriculum/nepal-cdc-g4-g5/proficiency-scale.json +76 -0
- package/data/curriculum/nepal-cdc-g4-g5/subjects/english.json +6936 -0
- package/data/curriculum/nepal-cdc-g4-g5/subjects/health-physical-creative-arts.json +3401 -0
- package/data/curriculum/nepal-cdc-g4-g5/subjects/mathematics.json +1511 -0
- package/data/curriculum/nepal-cdc-g4-g5/subjects/nepali.json +7928 -0
- package/data/curriculum/nepal-cdc-g4-g5/subjects/science-technology.json +2420 -0
- package/data/curriculum/nepal-cdc-g4-g5/subjects/social-studies.json +2177 -0
- package/dist/lib/assignmentTypeDefaults.d.ts +41 -0
- package/dist/lib/assignmentTypeDefaults.d.ts.map +1 -0
- package/dist/lib/assignmentTypeDefaults.js +167 -0
- package/dist/lib/assignmentTypeDefaults.js.map +1 -0
- package/dist/lib/config/env.d.ts +0 -8
- package/dist/lib/config/env.d.ts.map +1 -1
- package/dist/lib/config/env.js +2 -5
- package/dist/lib/config/env.js.map +1 -1
- package/dist/lib/feePdf.d.ts +19 -0
- package/dist/lib/feePdf.d.ts.map +1 -0
- package/dist/lib/feePdf.js +167 -0
- package/dist/lib/feePdf.js.map +1 -0
- package/dist/lib/feePdfFormat.d.ts +4 -0
- package/dist/lib/feePdfFormat.d.ts.map +1 -0
- package/dist/lib/feePdfFormat.js +16 -0
- package/dist/lib/feePdfFormat.js.map +1 -0
- package/dist/lib/idCardPdf.d.ts +26 -0
- package/dist/lib/idCardPdf.d.ts.map +1 -0
- package/dist/lib/idCardPdf.js +272 -0
- package/dist/lib/idCardPdf.js.map +1 -0
- package/dist/lib/pdfLetterhead.d.ts +41 -0
- package/dist/lib/pdfLetterhead.d.ts.map +1 -0
- package/dist/lib/pdfLetterhead.js +86 -0
- package/dist/lib/pdfLetterhead.js.map +1 -0
- package/dist/lib/transcriptPdf.d.ts +55 -0
- package/dist/lib/transcriptPdf.d.ts.map +1 -0
- package/dist/lib/transcriptPdf.js +303 -0
- package/dist/lib/transcriptPdf.js.map +1 -0
- package/dist/models/academicCalendar.d.ts +198 -0
- package/dist/models/academicCalendar.d.ts.map +1 -0
- package/dist/models/academicCalendar.js +106 -0
- package/dist/models/academicCalendar.js.map +1 -0
- package/dist/models/agenda.d.ts +8 -0
- package/dist/models/agenda.d.ts.map +1 -1
- package/dist/models/announcement.d.ts +2 -0
- package/dist/models/announcement.d.ts.map +1 -1
- package/dist/models/assignment.d.ts +66 -0
- package/dist/models/assignment.d.ts.map +1 -1
- package/dist/models/attendance.d.ts +659 -21
- package/dist/models/attendance.d.ts.map +1 -1
- package/dist/models/attendance.js +547 -75
- package/dist/models/attendance.js.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 +12 -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 +16 -0
- package/dist/models/event.d.ts.map +1 -1
- package/dist/models/fees.d.ts +554 -0
- package/dist/models/fees.d.ts.map +1 -0
- package/dist/models/fees.js +278 -0
- package/dist/models/fees.js.map +1 -0
- package/dist/models/file.d.ts +29 -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/marketplace.d.ts +180 -0
- package/dist/models/marketplace.d.ts.map +1 -0
- package/dist/models/marketplace.js +116 -0
- package/dist/models/marketplace.js.map +1 -0
- package/dist/models/moduleItem.d.ts +308 -0
- package/dist/models/moduleItem.d.ts.map +1 -0
- package/dist/models/moduleItem.js +93 -0
- package/dist/models/moduleItem.js.map +1 -0
- package/dist/models/newtonChat.d.ts +1 -0
- package/dist/models/newtonChat.d.ts.map +1 -1
- package/dist/models/school.d.ts +18 -0
- package/dist/models/school.d.ts.map +1 -1
- package/dist/models/school.js +7 -2
- package/dist/models/school.js.map +1 -1
- package/dist/models/section.d.ts +4 -0
- package/dist/models/section.d.ts.map +1 -1
- package/dist/models/worksheet.d.ts +19 -0
- package/dist/models/worksheet.d.ts.map +1 -1
- package/dist/models/worksheet.js +2 -2
- package/dist/models/worksheet.js.map +1 -1
- package/dist/routers/_app.d.ts +12024 -7778
- package/dist/routers/_app.d.ts.map +1 -1
- package/dist/routers/_app.js +12 -2
- package/dist/routers/_app.js.map +1 -1
- package/dist/routers/academicCalendar.d.ts +229 -0
- package/dist/routers/academicCalendar.d.ts.map +1 -0
- package/dist/routers/academicCalendar.js +75 -0
- package/dist/routers/academicCalendar.js.map +1 -0
- package/dist/routers/admin.d.ts +2 -0
- package/dist/routers/admin.d.ts.map +1 -1
- package/dist/routers/agenda.d.ts +8 -0
- package/dist/routers/agenda.d.ts.map +1 -1
- package/dist/routers/assignment.d.ts +75 -0
- package/dist/routers/assignment.d.ts.map +1 -1
- package/dist/routers/assignment.js +10 -2
- package/dist/routers/assignment.js.map +1 -1
- package/dist/routers/attendance.d.ts +103 -0
- package/dist/routers/attendance.d.ts.map +1 -1
- package/dist/routers/attendance.js +8 -5
- package/dist/routers/attendance.js.map +1 -1
- package/dist/routers/class.d.ts +27 -0
- package/dist/routers/class.d.ts.map +1 -1
- package/dist/routers/class.js +6 -2
- package/dist/routers/class.js.map +1 -1
- package/dist/routers/event.d.ts +8 -0
- package/dist/routers/event.d.ts.map +1 -1
- package/dist/routers/fees.d.ts +513 -0
- package/dist/routers/fees.d.ts.map +1 -0
- package/dist/routers/fees.js +88 -0
- package/dist/routers/fees.js.map +1 -0
- package/dist/routers/file.d.ts +2 -0
- package/dist/routers/file.d.ts.map +1 -1
- package/dist/routers/gradebook.d.ts +4 -1
- package/dist/routers/gradebook.d.ts.map +1 -1
- package/dist/routers/marketplace.d.ts +371 -0
- package/dist/routers/marketplace.d.ts.map +1 -0
- package/dist/routers/marketplace.js +87 -0
- package/dist/routers/marketplace.js.map +1 -0
- package/dist/routers/moduleItem.d.ts +263 -0
- package/dist/routers/moduleItem.d.ts.map +1 -0
- package/dist/routers/moduleItem.js +61 -0
- package/dist/routers/moduleItem.js.map +1 -0
- package/dist/routers/parent.d.ts +170 -0
- package/dist/routers/parent.d.ts.map +1 -0
- package/dist/routers/parent.js +49 -0
- package/dist/routers/parent.js.map +1 -0
- package/dist/routers/school.d.ts +363 -7
- package/dist/routers/school.d.ts.map +1 -1
- package/dist/routers/school.js +110 -3
- package/dist/routers/school.js.map +1 -1
- package/dist/routers/worksheet.d.ts +27 -0
- package/dist/routers/worksheet.d.ts.map +1 -1
- package/dist/routers/worksheet.js +10 -3
- package/dist/routers/worksheet.js.map +1 -1
- package/dist/services/academicCalendar.d.ts +173 -0
- package/dist/services/academicCalendar.d.ts.map +1 -0
- package/dist/services/academicCalendar.js +242 -0
- package/dist/services/academicCalendar.js.map +1 -0
- package/dist/services/adminInstitution.d.ts +2 -0
- package/dist/services/adminInstitution.d.ts.map +1 -1
- package/dist/services/agenda.d.ts +8 -0
- package/dist/services/agenda.d.ts.map +1 -1
- package/dist/services/assignment.d.ts +75 -0
- package/dist/services/assignment.d.ts.map +1 -1
- package/dist/services/assignment.js +91 -12
- package/dist/services/assignment.js.map +1 -1
- package/dist/services/attendance.d.ts +327 -10
- package/dist/services/attendance.d.ts.map +1 -1
- package/dist/services/attendance.js +389 -25
- package/dist/services/attendance.js.map +1 -1
- package/dist/services/attendanceMerge.d.ts +53 -0
- package/dist/services/attendanceMerge.d.ts.map +1 -0
- package/dist/services/attendanceMerge.js +87 -0
- package/dist/services/attendanceMerge.js.map +1 -0
- package/dist/services/attendanceRate.d.ts +24 -0
- package/dist/services/attendanceRate.d.ts.map +1 -0
- package/dist/services/attendanceRate.js +31 -0
- package/dist/services/attendanceRate.js.map +1 -0
- package/dist/services/attendanceStats.d.ts +22 -0
- package/dist/services/attendanceStats.d.ts.map +1 -0
- package/dist/services/attendanceStats.js +45 -0
- package/dist/services/attendanceStats.js.map +1 -0
- package/dist/services/class.d.ts +34 -2
- package/dist/services/class.d.ts.map +1 -1
- package/dist/services/class.js +27 -4
- package/dist/services/class.js.map +1 -1
- package/dist/services/event.d.ts +8 -0
- package/dist/services/event.d.ts.map +1 -1
- package/dist/services/fees.d.ts +422 -0
- package/dist/services/fees.d.ts.map +1 -0
- package/dist/services/fees.js +330 -0
- package/dist/services/fees.js.map +1 -0
- package/dist/services/feesAuthz.d.ts +46 -0
- package/dist/services/feesAuthz.d.ts.map +1 -0
- package/dist/services/feesAuthz.js +49 -0
- package/dist/services/feesAuthz.js.map +1 -0
- package/dist/services/file.d.ts +4 -0
- package/dist/services/file.d.ts.map +1 -1
- package/dist/services/gradebook.d.ts +18 -1
- package/dist/services/gradebook.d.ts.map +1 -1
- package/dist/services/gradebook.js +57 -2
- package/dist/services/gradebook.js.map +1 -1
- package/dist/services/idCard.d.ts +11 -0
- package/dist/services/idCard.d.ts.map +1 -0
- package/dist/services/idCard.js +122 -0
- package/dist/services/idCard.js.map +1 -0
- package/dist/services/marketplace.d.ts +301 -0
- package/dist/services/marketplace.d.ts.map +1 -0
- package/dist/services/marketplace.js +631 -0
- package/dist/services/marketplace.js.map +1 -0
- package/dist/services/moduleItem.d.ts +196 -0
- package/dist/services/moduleItem.d.ts.map +1 -0
- package/dist/services/moduleItem.js +204 -0
- package/dist/services/moduleItem.js.map +1 -0
- package/dist/services/notification.d.ts +58 -0
- package/dist/services/notification.d.ts.map +1 -1
- package/dist/services/notification.js +30 -2
- package/dist/services/notification.js.map +1 -1
- package/dist/services/parentPortal.d.ts +131 -0
- package/dist/services/parentPortal.d.ts.map +1 -0
- package/dist/services/parentPortal.js +314 -0
- package/dist/services/parentPortal.js.map +1 -0
- package/dist/services/school.d.ts +28 -3
- package/dist/services/school.d.ts.map +1 -1
- package/dist/services/school.js +98 -54
- package/dist/services/school.js.map +1 -1
- package/dist/services/studentImport.d.ts +34 -0
- package/dist/services/studentImport.d.ts.map +1 -0
- package/dist/services/studentImport.js +249 -0
- package/dist/services/studentImport.js.map +1 -0
- package/dist/services/transcript.d.ts +60 -0
- package/dist/services/transcript.d.ts.map +1 -0
- package/dist/services/transcript.js +231 -0
- package/dist/services/transcript.js.map +1 -0
- package/dist/services/worksheet.d.ts +22 -0
- package/dist/services/worksheet.d.ts.map +1 -1
- package/dist/services/worksheet.js +94 -2
- package/dist/services/worksheet.js.map +1 -1
- package/dist/trpc.d.ts +1 -1
- package/dist/trpc.d.ts.map +1 -1
- package/dist/trpc.js +5 -5
- package/dist/trpc.js.map +1 -1
- package/dist/utils/adminPanelAccess.d.ts +4 -5
- package/dist/utils/adminPanelAccess.d.ts.map +1 -1
- package/dist/utils/adminPanelAccess.js +12 -34
- package/dist/utils/adminPanelAccess.js.map +1 -1
- package/package.json +2 -1
- package/prisma/migrations/20260804120000_add_attendance_records_and_excusals/migration.sql +114 -0
- package/prisma/migrations/20260804120100_add_fee_plans_invoices_payments/migration.sql +101 -0
- package/prisma/migrations/20260804120200_add_marketplace_listings/migration.sql +54 -0
- package/prisma/migrations/20260804120300_content_platform_b3_b9/migration.sql +63 -0
- package/prisma/migrations/20260804120400_c_academic_ops/migration.sql +77 -0
- package/prisma/schema.prisma +371 -11
- package/scripts/import-nepal-cdc-curriculum.ts +402 -0
- package/src/lib/assignmentTypeDefaults.ts +222 -0
- package/src/lib/config/env.ts +0 -3
- package/src/lib/feePdf.ts +199 -0
- package/src/lib/feePdfFormat.ts +14 -0
- package/src/lib/idCardPdf.ts +336 -0
- package/src/lib/pdfLetterhead.ts +124 -0
- package/src/lib/transcriptPdf.ts +502 -0
- package/src/models/academicCalendar.ts +139 -0
- package/src/models/attendance.ts +702 -73
- package/src/models/class.ts +1 -0
- package/src/models/fees.ts +349 -0
- package/src/models/marketplace.ts +161 -0
- package/src/models/moduleItem.ts +125 -0
- package/src/models/school.ts +6 -0
- package/src/models/worksheet.ts +2 -0
- package/src/routers/_app.ts +10 -0
- package/src/routers/academicCalendar.ts +103 -0
- package/src/routers/assignment.ts +8 -0
- package/src/routers/attendance.ts +7 -3
- package/src/routers/class.ts +4 -0
- package/src/routers/fees.ts +126 -0
- package/src/routers/marketplace.ts +134 -0
- package/src/routers/moduleItem.ts +91 -0
- package/src/routers/parent.ts +68 -0
- package/src/routers/school.ts +149 -1
- package/src/routers/worksheet.ts +11 -0
- package/src/services/academicCalendar.ts +327 -0
- package/src/services/assignment.ts +122 -12
- package/src/services/attendance.ts +552 -26
- package/src/services/attendanceMerge.ts +139 -0
- package/src/services/attendanceRate.ts +41 -0
- package/src/services/attendanceStats.ts +63 -0
- package/src/services/class.ts +26 -2
- package/src/services/fees.ts +447 -0
- package/src/services/feesAuthz.ts +73 -0
- package/src/services/gradebook.ts +70 -0
- package/src/services/idCard.ts +147 -0
- package/src/services/marketplace.ts +790 -0
- package/src/services/moduleItem.ts +298 -0
- package/src/services/notification.ts +43 -0
- package/src/services/parentPortal.ts +367 -0
- package/src/services/school.ts +100 -54
- package/src/services/studentImport.ts +285 -0
- package/src/services/transcript.ts +301 -0
- package/src/services/worksheet.ts +111 -0
- package/src/trpc.ts +3 -3
- package/src/utils/adminPanelAccess.ts +12 -35
- package/tests/unit/assignmentTypeDefaults.test.ts +52 -0
- package/tests/unit/lib/feePdf.test.ts +15 -0
- package/tests/unit/lib/idCardPdf.test.ts +40 -0
- package/tests/unit/lib/transcriptPdf.test.ts +111 -0
- package/tests/unit/services/attendanceMerge.test.ts +90 -0
- package/tests/unit/services/attendanceRate.test.ts +38 -0
- package/tests/unit/services/attendanceStats.test.ts +54 -0
|
@@ -1,5 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Attendance model – session-level lists + per-student AttendanceRecord,
|
|
3
|
+
* and school-scoped StudentExcusal persistence.
|
|
4
|
+
*/
|
|
5
|
+
import { AttendanceStatus, Prisma } from "@prisma/client";
|
|
6
|
+
declare const attendanceInclude: {
|
|
7
|
+
readonly event: {
|
|
8
|
+
readonly select: {
|
|
9
|
+
readonly id: true;
|
|
10
|
+
readonly name: true;
|
|
11
|
+
readonly startTime: true;
|
|
12
|
+
readonly endTime: true;
|
|
13
|
+
readonly location: true;
|
|
14
|
+
readonly color: true;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
readonly present: {
|
|
18
|
+
readonly select: {
|
|
19
|
+
readonly id: true;
|
|
20
|
+
readonly username: true;
|
|
21
|
+
readonly profile: {
|
|
22
|
+
readonly select: {
|
|
23
|
+
readonly displayName: true;
|
|
24
|
+
readonly profilePicture: true;
|
|
25
|
+
readonly profilePictureThumbnail: true;
|
|
26
|
+
readonly bio: true;
|
|
27
|
+
readonly location: true;
|
|
28
|
+
readonly website: true;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
readonly late: {
|
|
34
|
+
readonly select: {
|
|
35
|
+
readonly id: true;
|
|
36
|
+
readonly username: true;
|
|
37
|
+
readonly profile: {
|
|
38
|
+
readonly select: {
|
|
39
|
+
readonly displayName: true;
|
|
40
|
+
readonly profilePicture: true;
|
|
41
|
+
readonly profilePictureThumbnail: true;
|
|
42
|
+
readonly bio: true;
|
|
43
|
+
readonly location: true;
|
|
44
|
+
readonly website: true;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
readonly absent: {
|
|
50
|
+
readonly select: {
|
|
51
|
+
readonly id: true;
|
|
52
|
+
readonly username: true;
|
|
53
|
+
readonly profile: {
|
|
54
|
+
readonly select: {
|
|
55
|
+
readonly displayName: true;
|
|
56
|
+
readonly profilePicture: true;
|
|
57
|
+
readonly profilePictureThumbnail: true;
|
|
58
|
+
readonly bio: true;
|
|
59
|
+
readonly location: true;
|
|
60
|
+
readonly website: true;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
readonly records: {
|
|
66
|
+
readonly select: {
|
|
67
|
+
readonly id: true;
|
|
68
|
+
readonly studentId: true;
|
|
69
|
+
readonly status: true;
|
|
70
|
+
readonly note: true;
|
|
71
|
+
readonly excusedByExcusalId: true;
|
|
72
|
+
readonly updatedById: true;
|
|
73
|
+
readonly updatedAt: true;
|
|
74
|
+
readonly student: {
|
|
75
|
+
readonly select: {
|
|
76
|
+
readonly id: true;
|
|
77
|
+
readonly username: true;
|
|
78
|
+
readonly profile: {
|
|
79
|
+
readonly select: {
|
|
80
|
+
readonly displayName: true;
|
|
81
|
+
readonly profilePicture: true;
|
|
82
|
+
readonly profilePictureThumbnail: true;
|
|
83
|
+
readonly bio: true;
|
|
84
|
+
readonly location: true;
|
|
85
|
+
readonly website: true;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
readonly excusedByExcusal: {
|
|
91
|
+
readonly select: {
|
|
92
|
+
readonly id: true;
|
|
93
|
+
readonly reason: true;
|
|
94
|
+
readonly note: true;
|
|
95
|
+
readonly startDate: true;
|
|
96
|
+
readonly endDate: true;
|
|
97
|
+
readonly revokedAt: true;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
};
|
|
1
103
|
/** @returns Class with students for attendance. */
|
|
2
|
-
export declare function findClassWithStudents(classId: string): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<
|
|
104
|
+
export declare function findClassWithStudents(classId: string): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
|
|
3
105
|
result: {
|
|
4
106
|
userProfile: {
|
|
5
107
|
profilePicture: () => {
|
|
@@ -37,9 +139,10 @@ export declare function findClassWithStudents(classId: string): import("@prisma/
|
|
|
37
139
|
profilePictureThumbnail: string | null;
|
|
38
140
|
} | null;
|
|
39
141
|
}[];
|
|
142
|
+
schoolId: string | null;
|
|
40
143
|
} | null>;
|
|
41
144
|
/** @returns Class if user is a teacher or school admin. */
|
|
42
|
-
export declare function findClassWithTeacher(classId: string, teacherId: string): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<
|
|
145
|
+
export declare function findClassWithTeacher(classId: string, teacherId: string): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
|
|
43
146
|
result: {
|
|
44
147
|
userProfile: {
|
|
45
148
|
profilePicture: () => {
|
|
@@ -69,6 +172,7 @@ export declare function findClassWithTeacher(classId: string, teacherId: string)
|
|
|
69
172
|
students: {
|
|
70
173
|
id: string;
|
|
71
174
|
}[];
|
|
175
|
+
schoolId: string | null;
|
|
72
176
|
} | null>;
|
|
73
177
|
/** @returns Events for a class. */
|
|
74
178
|
export declare function findEventsByClassId(classId: string): import("@prisma/client/runtime/library.js").PrismaPromise<{
|
|
@@ -83,7 +187,7 @@ export declare function findEventsByClassId(classId: string): import("@prisma/cl
|
|
|
83
187
|
remarks: string | null;
|
|
84
188
|
}[]>;
|
|
85
189
|
/** @returns Attendance record for an event. */
|
|
86
|
-
export declare function findAttendanceByEventId(eventId: string): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<
|
|
190
|
+
export declare function findAttendanceByEventId(eventId: string): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
|
|
87
191
|
result: {
|
|
88
192
|
userProfile: {
|
|
89
193
|
profilePicture: () => {
|
|
@@ -107,14 +211,20 @@ export declare function findAttendanceByEventId(eventId: string): import("@prism
|
|
|
107
211
|
model: {};
|
|
108
212
|
query: {};
|
|
109
213
|
client: {};
|
|
110
|
-
}, {}>, "Attendance", "findFirst", null> & import("@prisma/client/runtime/library.js").PrismaPromise<{
|
|
214
|
+
}, {}>, "Attendance", "findFirst", null> & import("@prisma/client/runtime/library.js").PrismaPromise<({
|
|
215
|
+
records: {
|
|
216
|
+
status: import(".prisma/client").$Enums.AttendanceStatus;
|
|
217
|
+
studentId: string;
|
|
218
|
+
excusedByExcusalId: string | null;
|
|
219
|
+
}[];
|
|
220
|
+
} & {
|
|
111
221
|
id: string;
|
|
112
222
|
classId: string;
|
|
113
223
|
eventId: string | null;
|
|
114
224
|
date: Date;
|
|
115
|
-
} | null>;
|
|
225
|
+
}) | null>;
|
|
116
226
|
/** @returns Attendance for class and event (eventId null = class-level). */
|
|
117
|
-
export declare function findAttendanceByClassAndEvent(classId: string, eventId: string | null): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<
|
|
227
|
+
export declare function findAttendanceByClassAndEvent(classId: string, eventId: string | null): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
|
|
118
228
|
result: {
|
|
119
229
|
userProfile: {
|
|
120
230
|
profilePicture: () => {
|
|
@@ -142,6 +252,7 @@ export declare function findAttendanceByClassAndEvent(classId: string, eventId:
|
|
|
142
252
|
event: {
|
|
143
253
|
id: string;
|
|
144
254
|
name: string | null;
|
|
255
|
+
startTime: Date;
|
|
145
256
|
} | null;
|
|
146
257
|
late: {
|
|
147
258
|
id: string;
|
|
@@ -149,6 +260,12 @@ export declare function findAttendanceByClassAndEvent(classId: string, eventId:
|
|
|
149
260
|
absent: {
|
|
150
261
|
id: string;
|
|
151
262
|
}[];
|
|
263
|
+
records: {
|
|
264
|
+
status: import(".prisma/client").$Enums.AttendanceStatus;
|
|
265
|
+
studentId: string;
|
|
266
|
+
note: string | null;
|
|
267
|
+
excusedByExcusalId: string | null;
|
|
268
|
+
}[];
|
|
152
269
|
} & {
|
|
153
270
|
id: string;
|
|
154
271
|
classId: string;
|
|
@@ -201,20 +318,59 @@ export declare function findManyAttendance(classId: string, eventId?: string): i
|
|
|
201
318
|
profilePictureThumbnail: string | null;
|
|
202
319
|
} | null;
|
|
203
320
|
}[];
|
|
321
|
+
records: {
|
|
322
|
+
status: import(".prisma/client").$Enums.AttendanceStatus;
|
|
323
|
+
id: string;
|
|
324
|
+
updatedAt: Date;
|
|
325
|
+
student: {
|
|
326
|
+
id: string;
|
|
327
|
+
username: string;
|
|
328
|
+
profile: {
|
|
329
|
+
profilePicture: string | null;
|
|
330
|
+
displayName: string | null;
|
|
331
|
+
bio: string | null;
|
|
332
|
+
location: string | null;
|
|
333
|
+
website: string | null;
|
|
334
|
+
profilePictureThumbnail: string | null;
|
|
335
|
+
} | null;
|
|
336
|
+
};
|
|
337
|
+
studentId: string;
|
|
338
|
+
note: string | null;
|
|
339
|
+
excusedByExcusalId: string | null;
|
|
340
|
+
updatedById: string | null;
|
|
341
|
+
excusedByExcusal: {
|
|
342
|
+
id: string;
|
|
343
|
+
reason: string;
|
|
344
|
+
startDate: Date;
|
|
345
|
+
endDate: Date;
|
|
346
|
+
revokedAt: Date | null;
|
|
347
|
+
note: string | null;
|
|
348
|
+
} | null;
|
|
349
|
+
}[];
|
|
204
350
|
} & {
|
|
205
351
|
id: string;
|
|
206
352
|
classId: string;
|
|
207
353
|
eventId: string | null;
|
|
208
354
|
date: Date;
|
|
209
355
|
})[]>;
|
|
210
|
-
/** Create an attendance
|
|
356
|
+
/** Create an attendance session with legacy lists + per-student records. */
|
|
211
357
|
export declare function createAttendance(data: {
|
|
212
358
|
classId: string;
|
|
213
359
|
eventId?: string | null;
|
|
360
|
+
date?: Date;
|
|
214
361
|
presentIds: string[];
|
|
215
362
|
lateIds?: string[];
|
|
216
363
|
absentIds?: string[];
|
|
217
|
-
|
|
364
|
+
excusedIds?: string[];
|
|
365
|
+
records?: Array<{
|
|
366
|
+
studentId: string;
|
|
367
|
+
status: AttendanceStatus;
|
|
368
|
+
note?: string | null;
|
|
369
|
+
excusedByExcusalId?: string | null;
|
|
370
|
+
updatedById?: string | null;
|
|
371
|
+
}>;
|
|
372
|
+
updatedById?: string | null;
|
|
373
|
+
}): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
|
|
218
374
|
result: {
|
|
219
375
|
userProfile: {
|
|
220
376
|
profilePicture: () => {
|
|
@@ -258,6 +414,24 @@ export declare function createAttendance(data: {
|
|
|
258
414
|
id: string;
|
|
259
415
|
username: string;
|
|
260
416
|
}[];
|
|
417
|
+
records: {
|
|
418
|
+
status: import(".prisma/client").$Enums.AttendanceStatus;
|
|
419
|
+
id: string;
|
|
420
|
+
updatedAt: Date;
|
|
421
|
+
student: {
|
|
422
|
+
id: string;
|
|
423
|
+
username: string;
|
|
424
|
+
};
|
|
425
|
+
studentId: string;
|
|
426
|
+
note: string | null;
|
|
427
|
+
excusedByExcusalId: string | null;
|
|
428
|
+
updatedById: string | null;
|
|
429
|
+
excusedByExcusal: {
|
|
430
|
+
id: string;
|
|
431
|
+
reason: string;
|
|
432
|
+
note: string | null;
|
|
433
|
+
} | null;
|
|
434
|
+
}[];
|
|
261
435
|
} & {
|
|
262
436
|
id: string;
|
|
263
437
|
classId: string;
|
|
@@ -268,8 +442,19 @@ export declare function createAttendance(data: {
|
|
|
268
442
|
export declare function createAttendanceForEvent(data: {
|
|
269
443
|
classId: string;
|
|
270
444
|
eventId: string;
|
|
445
|
+
date?: Date;
|
|
271
446
|
presentIds: string[];
|
|
272
|
-
|
|
447
|
+
lateIds?: string[];
|
|
448
|
+
absentIds?: string[];
|
|
449
|
+
excusedIds?: string[];
|
|
450
|
+
records?: Array<{
|
|
451
|
+
studentId: string;
|
|
452
|
+
status: AttendanceStatus;
|
|
453
|
+
note?: string | null;
|
|
454
|
+
excusedByExcusalId?: string | null;
|
|
455
|
+
updatedById?: string | null;
|
|
456
|
+
}>;
|
|
457
|
+
}): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
|
|
273
458
|
result: {
|
|
274
459
|
userProfile: {
|
|
275
460
|
profilePicture: () => {
|
|
@@ -294,17 +479,195 @@ export declare function createAttendanceForEvent(data: {
|
|
|
294
479
|
query: {};
|
|
295
480
|
client: {};
|
|
296
481
|
}, {}>, "Attendance", "create", never> & import("@prisma/client/runtime/library.js").PrismaPromise<{
|
|
482
|
+
event: {
|
|
483
|
+
id: string;
|
|
484
|
+
location: string | null;
|
|
485
|
+
name: string | null;
|
|
486
|
+
startTime: Date;
|
|
487
|
+
endTime: Date;
|
|
488
|
+
} | null;
|
|
489
|
+
present: {
|
|
490
|
+
id: string;
|
|
491
|
+
username: string;
|
|
492
|
+
}[];
|
|
493
|
+
late: {
|
|
494
|
+
id: string;
|
|
495
|
+
username: string;
|
|
496
|
+
}[];
|
|
497
|
+
absent: {
|
|
498
|
+
id: string;
|
|
499
|
+
username: string;
|
|
500
|
+
}[];
|
|
501
|
+
records: {
|
|
502
|
+
status: import(".prisma/client").$Enums.AttendanceStatus;
|
|
503
|
+
id: string;
|
|
504
|
+
updatedAt: Date;
|
|
505
|
+
student: {
|
|
506
|
+
id: string;
|
|
507
|
+
username: string;
|
|
508
|
+
};
|
|
509
|
+
studentId: string;
|
|
510
|
+
note: string | null;
|
|
511
|
+
excusedByExcusalId: string | null;
|
|
512
|
+
updatedById: string | null;
|
|
513
|
+
excusedByExcusal: {
|
|
514
|
+
id: string;
|
|
515
|
+
reason: string;
|
|
516
|
+
note: string | null;
|
|
517
|
+
} | null;
|
|
518
|
+
}[];
|
|
519
|
+
} & {
|
|
297
520
|
id: string;
|
|
298
521
|
classId: string;
|
|
299
522
|
eventId: string | null;
|
|
300
523
|
date: Date;
|
|
301
524
|
}>;
|
|
302
|
-
/** Update attendance present/late/absent lists. */
|
|
525
|
+
/** Update attendance present/late/absent lists and sync per-student records. */
|
|
303
526
|
export declare function updateAttendance(id: string, data: {
|
|
304
527
|
presentIds: string[];
|
|
305
528
|
lateIds: string[];
|
|
306
529
|
absentIds: string[];
|
|
307
|
-
|
|
530
|
+
records: Array<{
|
|
531
|
+
studentId: string;
|
|
532
|
+
status: AttendanceStatus;
|
|
533
|
+
note?: string | null;
|
|
534
|
+
excusedByExcusalId?: string | null;
|
|
535
|
+
updatedById?: string | null;
|
|
536
|
+
}>;
|
|
537
|
+
}): Promise<{
|
|
538
|
+
event: {
|
|
539
|
+
id: string;
|
|
540
|
+
location: string | null;
|
|
541
|
+
name: string | null;
|
|
542
|
+
startTime: Date;
|
|
543
|
+
endTime: Date;
|
|
544
|
+
} | null;
|
|
545
|
+
present: {
|
|
546
|
+
id: string;
|
|
547
|
+
username: string;
|
|
548
|
+
}[];
|
|
549
|
+
late: {
|
|
550
|
+
id: string;
|
|
551
|
+
username: string;
|
|
552
|
+
}[];
|
|
553
|
+
absent: {
|
|
554
|
+
id: string;
|
|
555
|
+
username: string;
|
|
556
|
+
}[];
|
|
557
|
+
records: {
|
|
558
|
+
status: import(".prisma/client").$Enums.AttendanceStatus;
|
|
559
|
+
id: string;
|
|
560
|
+
updatedAt: Date;
|
|
561
|
+
student: {
|
|
562
|
+
id: string;
|
|
563
|
+
username: string;
|
|
564
|
+
};
|
|
565
|
+
studentId: string;
|
|
566
|
+
note: string | null;
|
|
567
|
+
excusedByExcusalId: string | null;
|
|
568
|
+
updatedById: string | null;
|
|
569
|
+
excusedByExcusal: {
|
|
570
|
+
id: string;
|
|
571
|
+
reason: string;
|
|
572
|
+
note: string | null;
|
|
573
|
+
} | null;
|
|
574
|
+
}[];
|
|
575
|
+
} & {
|
|
576
|
+
id: string;
|
|
577
|
+
classId: string;
|
|
578
|
+
eventId: string | null;
|
|
579
|
+
date: Date;
|
|
580
|
+
}>;
|
|
581
|
+
/** Active (non-revoked) excusals covering a calendar date for given students. */
|
|
582
|
+
export declare function findActiveExcusalsForStudents(input: {
|
|
583
|
+
schoolId: string;
|
|
584
|
+
studentIds: string[];
|
|
585
|
+
date: Date;
|
|
586
|
+
}): Promise<never[]> | import("@prisma/client/runtime/library.js").PrismaPromise<({
|
|
587
|
+
students: {
|
|
588
|
+
studentId: string;
|
|
589
|
+
}[];
|
|
590
|
+
} & {
|
|
591
|
+
id: string;
|
|
592
|
+
createdAt: Date;
|
|
593
|
+
updatedAt: Date;
|
|
594
|
+
schoolId: string;
|
|
595
|
+
reason: string;
|
|
596
|
+
startDate: Date;
|
|
597
|
+
endDate: Date;
|
|
598
|
+
createdById: string;
|
|
599
|
+
revokedAt: Date | null;
|
|
600
|
+
note: string | null;
|
|
601
|
+
revokedById: string | null;
|
|
602
|
+
})[]>;
|
|
603
|
+
/** Active excusals overlapping a date range for school students. */
|
|
604
|
+
export declare function findActiveExcusalsInRange(input: {
|
|
605
|
+
schoolId: string;
|
|
606
|
+
studentIds?: string[];
|
|
607
|
+
startDate: Date;
|
|
608
|
+
endDate: Date;
|
|
609
|
+
}): import("@prisma/client/runtime/library.js").PrismaPromise<({
|
|
610
|
+
students: {
|
|
611
|
+
studentId: string;
|
|
612
|
+
}[];
|
|
613
|
+
} & {
|
|
614
|
+
id: string;
|
|
615
|
+
createdAt: Date;
|
|
616
|
+
updatedAt: Date;
|
|
617
|
+
schoolId: string;
|
|
618
|
+
reason: string;
|
|
619
|
+
startDate: Date;
|
|
620
|
+
endDate: Date;
|
|
621
|
+
createdById: string;
|
|
622
|
+
revokedAt: Date | null;
|
|
623
|
+
note: string | null;
|
|
624
|
+
revokedById: string | null;
|
|
625
|
+
})[]>;
|
|
626
|
+
export declare function listExcusalsForSchool(input: {
|
|
627
|
+
schoolId: string;
|
|
628
|
+
includeRevoked?: boolean;
|
|
629
|
+
studentId?: string;
|
|
630
|
+
}): import("@prisma/client/runtime/library.js").PrismaPromise<({
|
|
631
|
+
students: {
|
|
632
|
+
student: {
|
|
633
|
+
id: string;
|
|
634
|
+
username: string;
|
|
635
|
+
profile: {
|
|
636
|
+
profilePicture: string | null;
|
|
637
|
+
displayName: string | null;
|
|
638
|
+
profilePictureThumbnail: string | null;
|
|
639
|
+
} | null;
|
|
640
|
+
};
|
|
641
|
+
studentId: string;
|
|
642
|
+
}[];
|
|
643
|
+
createdBy: {
|
|
644
|
+
id: string;
|
|
645
|
+
username: string;
|
|
646
|
+
profile: {
|
|
647
|
+
displayName: string | null;
|
|
648
|
+
} | null;
|
|
649
|
+
};
|
|
650
|
+
revokedBy: {
|
|
651
|
+
id: string;
|
|
652
|
+
username: string;
|
|
653
|
+
profile: {
|
|
654
|
+
displayName: string | null;
|
|
655
|
+
} | null;
|
|
656
|
+
} | null;
|
|
657
|
+
} & {
|
|
658
|
+
id: string;
|
|
659
|
+
createdAt: Date;
|
|
660
|
+
updatedAt: Date;
|
|
661
|
+
schoolId: string;
|
|
662
|
+
reason: string;
|
|
663
|
+
startDate: Date;
|
|
664
|
+
endDate: Date;
|
|
665
|
+
createdById: string;
|
|
666
|
+
revokedAt: Date | null;
|
|
667
|
+
note: string | null;
|
|
668
|
+
revokedById: string | null;
|
|
669
|
+
})[]>;
|
|
670
|
+
export declare function findExcusalById(excusalId: string): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
|
|
308
671
|
result: {
|
|
309
672
|
userProfile: {
|
|
310
673
|
profilePicture: () => {
|
|
@@ -328,30 +691,305 @@ export declare function updateAttendance(id: string, data: {
|
|
|
328
691
|
model: {};
|
|
329
692
|
query: {};
|
|
330
693
|
client: {};
|
|
331
|
-
}, {}>, "
|
|
332
|
-
|
|
694
|
+
}, {}>, "StudentExcusal", "findUnique", null> & import("@prisma/client/runtime/library.js").PrismaPromise<({
|
|
695
|
+
students: {
|
|
696
|
+
studentId: string;
|
|
697
|
+
}[];
|
|
698
|
+
createdBy: {
|
|
333
699
|
id: string;
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
}
|
|
339
|
-
|
|
700
|
+
username: string;
|
|
701
|
+
profile: {
|
|
702
|
+
displayName: string | null;
|
|
703
|
+
} | null;
|
|
704
|
+
};
|
|
705
|
+
revokedBy: {
|
|
340
706
|
id: string;
|
|
341
707
|
username: string;
|
|
708
|
+
profile: {
|
|
709
|
+
displayName: string | null;
|
|
710
|
+
} | null;
|
|
711
|
+
} | null;
|
|
712
|
+
} & {
|
|
713
|
+
id: string;
|
|
714
|
+
createdAt: Date;
|
|
715
|
+
updatedAt: Date;
|
|
716
|
+
schoolId: string;
|
|
717
|
+
reason: string;
|
|
718
|
+
startDate: Date;
|
|
719
|
+
endDate: Date;
|
|
720
|
+
createdById: string;
|
|
721
|
+
revokedAt: Date | null;
|
|
722
|
+
note: string | null;
|
|
723
|
+
revokedById: string | null;
|
|
724
|
+
}) | null>;
|
|
725
|
+
export declare function createStudentExcusal(data: {
|
|
726
|
+
schoolId: string;
|
|
727
|
+
studentIds: string[];
|
|
728
|
+
startDate: Date;
|
|
729
|
+
endDate: Date;
|
|
730
|
+
reason: string;
|
|
731
|
+
note?: string | null;
|
|
732
|
+
createdById: string;
|
|
733
|
+
}): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
|
|
734
|
+
result: {
|
|
735
|
+
userProfile: {
|
|
736
|
+
profilePicture: () => {
|
|
737
|
+
needs: {
|
|
738
|
+
profilePicture: true;
|
|
739
|
+
};
|
|
740
|
+
compute(profile: {
|
|
741
|
+
profilePicture: string | null;
|
|
742
|
+
}): string | null;
|
|
743
|
+
};
|
|
744
|
+
profilePictureThumbnail: () => {
|
|
745
|
+
needs: {
|
|
746
|
+
profilePictureThumbnail: true;
|
|
747
|
+
};
|
|
748
|
+
compute(profile: {
|
|
749
|
+
profilePictureThumbnail: string | null;
|
|
750
|
+
}): string | null;
|
|
751
|
+
};
|
|
752
|
+
};
|
|
753
|
+
};
|
|
754
|
+
model: {};
|
|
755
|
+
query: {};
|
|
756
|
+
client: {};
|
|
757
|
+
}, {}>, "StudentExcusal", "create", never> & import("@prisma/client/runtime/library.js").PrismaPromise<{
|
|
758
|
+
students: {
|
|
759
|
+
student: {
|
|
760
|
+
id: string;
|
|
761
|
+
username: string;
|
|
762
|
+
profile: {
|
|
763
|
+
profilePicture: string | null;
|
|
764
|
+
displayName: string | null;
|
|
765
|
+
profilePictureThumbnail: string | null;
|
|
766
|
+
} | null;
|
|
767
|
+
};
|
|
768
|
+
studentId: string;
|
|
342
769
|
}[];
|
|
343
|
-
|
|
770
|
+
createdBy: {
|
|
771
|
+
id: string;
|
|
772
|
+
username: string;
|
|
773
|
+
profile: {
|
|
774
|
+
displayName: string | null;
|
|
775
|
+
} | null;
|
|
776
|
+
};
|
|
777
|
+
revokedBy: {
|
|
344
778
|
id: string;
|
|
345
779
|
username: string;
|
|
780
|
+
profile: {
|
|
781
|
+
displayName: string | null;
|
|
782
|
+
} | null;
|
|
783
|
+
} | null;
|
|
784
|
+
} & {
|
|
785
|
+
id: string;
|
|
786
|
+
createdAt: Date;
|
|
787
|
+
updatedAt: Date;
|
|
788
|
+
schoolId: string;
|
|
789
|
+
reason: string;
|
|
790
|
+
startDate: Date;
|
|
791
|
+
endDate: Date;
|
|
792
|
+
createdById: string;
|
|
793
|
+
revokedAt: Date | null;
|
|
794
|
+
note: string | null;
|
|
795
|
+
revokedById: string | null;
|
|
796
|
+
}>;
|
|
797
|
+
export declare function updateStudentExcusal(excusalId: string, data: {
|
|
798
|
+
studentIds?: string[];
|
|
799
|
+
startDate?: Date;
|
|
800
|
+
endDate?: Date;
|
|
801
|
+
reason?: string;
|
|
802
|
+
note?: string | null;
|
|
803
|
+
}): Promise<{
|
|
804
|
+
students: {
|
|
805
|
+
student: {
|
|
806
|
+
id: string;
|
|
807
|
+
username: string;
|
|
808
|
+
profile: {
|
|
809
|
+
profilePicture: string | null;
|
|
810
|
+
displayName: string | null;
|
|
811
|
+
profilePictureThumbnail: string | null;
|
|
812
|
+
} | null;
|
|
813
|
+
};
|
|
814
|
+
studentId: string;
|
|
346
815
|
}[];
|
|
347
|
-
|
|
816
|
+
createdBy: {
|
|
817
|
+
id: string;
|
|
818
|
+
username: string;
|
|
819
|
+
profile: {
|
|
820
|
+
displayName: string | null;
|
|
821
|
+
} | null;
|
|
822
|
+
};
|
|
823
|
+
revokedBy: {
|
|
348
824
|
id: string;
|
|
349
825
|
username: string;
|
|
826
|
+
profile: {
|
|
827
|
+
displayName: string | null;
|
|
828
|
+
} | null;
|
|
829
|
+
} | null;
|
|
830
|
+
} & {
|
|
831
|
+
id: string;
|
|
832
|
+
createdAt: Date;
|
|
833
|
+
updatedAt: Date;
|
|
834
|
+
schoolId: string;
|
|
835
|
+
reason: string;
|
|
836
|
+
startDate: Date;
|
|
837
|
+
endDate: Date;
|
|
838
|
+
createdById: string;
|
|
839
|
+
revokedAt: Date | null;
|
|
840
|
+
note: string | null;
|
|
841
|
+
revokedById: string | null;
|
|
842
|
+
}>;
|
|
843
|
+
export declare function revokeStudentExcusal(excusalId: string, revokedById: string): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
|
|
844
|
+
result: {
|
|
845
|
+
userProfile: {
|
|
846
|
+
profilePicture: () => {
|
|
847
|
+
needs: {
|
|
848
|
+
profilePicture: true;
|
|
849
|
+
};
|
|
850
|
+
compute(profile: {
|
|
851
|
+
profilePicture: string | null;
|
|
852
|
+
}): string | null;
|
|
853
|
+
};
|
|
854
|
+
profilePictureThumbnail: () => {
|
|
855
|
+
needs: {
|
|
856
|
+
profilePictureThumbnail: true;
|
|
857
|
+
};
|
|
858
|
+
compute(profile: {
|
|
859
|
+
profilePictureThumbnail: string | null;
|
|
860
|
+
}): string | null;
|
|
861
|
+
};
|
|
862
|
+
};
|
|
863
|
+
};
|
|
864
|
+
model: {};
|
|
865
|
+
query: {};
|
|
866
|
+
client: {};
|
|
867
|
+
}, {}>, "StudentExcusal", "update", never> & import("@prisma/client/runtime/library.js").PrismaPromise<{
|
|
868
|
+
students: {
|
|
869
|
+
student: {
|
|
870
|
+
id: string;
|
|
871
|
+
username: string;
|
|
872
|
+
profile: {
|
|
873
|
+
profilePicture: string | null;
|
|
874
|
+
displayName: string | null;
|
|
875
|
+
profilePictureThumbnail: string | null;
|
|
876
|
+
} | null;
|
|
877
|
+
};
|
|
878
|
+
studentId: string;
|
|
350
879
|
}[];
|
|
880
|
+
createdBy: {
|
|
881
|
+
id: string;
|
|
882
|
+
username: string;
|
|
883
|
+
profile: {
|
|
884
|
+
displayName: string | null;
|
|
885
|
+
} | null;
|
|
886
|
+
};
|
|
887
|
+
revokedBy: {
|
|
888
|
+
id: string;
|
|
889
|
+
username: string;
|
|
890
|
+
profile: {
|
|
891
|
+
displayName: string | null;
|
|
892
|
+
} | null;
|
|
893
|
+
} | null;
|
|
351
894
|
} & {
|
|
895
|
+
id: string;
|
|
896
|
+
createdAt: Date;
|
|
897
|
+
updatedAt: Date;
|
|
898
|
+
schoolId: string;
|
|
899
|
+
reason: string;
|
|
900
|
+
startDate: Date;
|
|
901
|
+
endDate: Date;
|
|
902
|
+
createdById: string;
|
|
903
|
+
revokedAt: Date | null;
|
|
904
|
+
note: string | null;
|
|
905
|
+
revokedById: string | null;
|
|
906
|
+
}>;
|
|
907
|
+
/** Apply EXCUSED status for an excusal across matching class attendance sessions. */
|
|
908
|
+
export declare function applyExcusalToAttendance(input: {
|
|
909
|
+
schoolId: string;
|
|
910
|
+
excusalId: string;
|
|
911
|
+
studentIds: string[];
|
|
912
|
+
startDate: Date;
|
|
913
|
+
endDate: Date;
|
|
914
|
+
updatedById?: string | null;
|
|
915
|
+
}): Promise<{
|
|
916
|
+
sessionsTouched: number;
|
|
917
|
+
recordsUpserted: number;
|
|
918
|
+
}>;
|
|
919
|
+
/** Clear EXCUSED locks tied to a revoked/updated excusal (leave status EXCUSED unless cleared). */
|
|
920
|
+
export declare function clearExcusalLocks(excusalId: string): Promise<import("@prisma/client/runtime/library.js").GetBatchResult>;
|
|
921
|
+
export declare function listSchoolStudentMemberships(schoolId: string): import("@prisma/client/runtime/library.js").PrismaPromise<{
|
|
922
|
+
user: {
|
|
923
|
+
id: string;
|
|
924
|
+
username: string;
|
|
925
|
+
profile: {
|
|
926
|
+
profilePicture: string | null;
|
|
927
|
+
displayName: string | null;
|
|
928
|
+
profilePictureThumbnail: string | null;
|
|
929
|
+
} | null;
|
|
930
|
+
studentIn: {
|
|
931
|
+
section: string;
|
|
932
|
+
id: string;
|
|
933
|
+
name: string;
|
|
934
|
+
subject: string;
|
|
935
|
+
}[];
|
|
936
|
+
};
|
|
937
|
+
userId: string;
|
|
938
|
+
}[]>;
|
|
939
|
+
export declare function listAttendanceRecordsForSchoolStudents(input: {
|
|
940
|
+
schoolId: string;
|
|
941
|
+
studentIds: string[];
|
|
942
|
+
from?: Date;
|
|
943
|
+
to?: Date;
|
|
944
|
+
}): Promise<never[]> | import("@prisma/client/runtime/library.js").PrismaPromise<{
|
|
945
|
+
status: import(".prisma/client").$Enums.AttendanceStatus;
|
|
946
|
+
attendance: {
|
|
947
|
+
class: {
|
|
948
|
+
id: string;
|
|
949
|
+
name: string;
|
|
950
|
+
};
|
|
951
|
+
event: {
|
|
952
|
+
id: string;
|
|
953
|
+
name: string | null;
|
|
954
|
+
startTime: Date;
|
|
955
|
+
} | null;
|
|
956
|
+
id: string;
|
|
957
|
+
classId: string;
|
|
958
|
+
eventId: string | null;
|
|
959
|
+
date: Date;
|
|
960
|
+
};
|
|
961
|
+
studentId: string;
|
|
962
|
+
}[]>;
|
|
963
|
+
export declare function listTodaySchoolAttendanceSessions(schoolId: string, day: Date): import("@prisma/client/runtime/library.js").PrismaPromise<{
|
|
964
|
+
class: {
|
|
965
|
+
section: string;
|
|
966
|
+
id: string;
|
|
967
|
+
name: string;
|
|
968
|
+
_count: {
|
|
969
|
+
students: number;
|
|
970
|
+
};
|
|
971
|
+
subject: string;
|
|
972
|
+
};
|
|
973
|
+
event: {
|
|
974
|
+
id: string;
|
|
975
|
+
name: string | null;
|
|
976
|
+
startTime: Date;
|
|
977
|
+
endTime: Date;
|
|
978
|
+
} | null;
|
|
352
979
|
id: string;
|
|
353
980
|
classId: string;
|
|
354
981
|
eventId: string | null;
|
|
355
982
|
date: Date;
|
|
983
|
+
records: {
|
|
984
|
+
status: import(".prisma/client").$Enums.AttendanceStatus;
|
|
985
|
+
studentId: string;
|
|
986
|
+
}[];
|
|
987
|
+
}[]>;
|
|
988
|
+
export declare function toDateOnly(date: Date): Date;
|
|
989
|
+
export declare function startOfUtcDay(date: Date): Date;
|
|
990
|
+
export declare function endOfUtcDay(date: Date): Date;
|
|
991
|
+
export type { AttendanceStatus };
|
|
992
|
+
export type AttendanceIncludeResult = Prisma.AttendanceGetPayload<{
|
|
993
|
+
include: typeof attendanceInclude;
|
|
356
994
|
}>;
|
|
357
995
|
//# sourceMappingURL=attendance.d.ts.map
|