@studious-lms/server 1.4.0 → 1.4.2
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 +6 -0
- package/.env.test.example +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +36 -50
- package/dist/index.js.map +1 -1
- package/dist/lib/config/cors.d.ts +16 -0
- package/dist/lib/config/cors.d.ts.map +1 -0
- package/dist/lib/config/cors.js +75 -0
- package/dist/lib/config/cors.js.map +1 -0
- package/dist/lib/config/env.d.ts +14 -0
- package/dist/lib/config/env.d.ts.map +1 -1
- package/dist/lib/config/env.js +9 -2
- package/dist/lib/config/env.js.map +1 -1
- package/dist/lib/prisma.d.ts +14 -2
- package/dist/lib/prisma.d.ts.map +1 -1
- package/dist/lib/prisma.js +27 -8
- package/dist/lib/prisma.js.map +1 -1
- package/dist/middleware/security.d.ts.map +1 -1
- package/dist/middleware/security.js +3 -3
- package/dist/middleware/security.js.map +1 -1
- package/dist/models/agenda.d.ts +16 -16
- package/dist/models/announcement.d.ts +59 -23
- package/dist/models/announcement.d.ts.map +1 -1
- package/dist/models/assignment.d.ts +363 -276
- package/dist/models/assignment.d.ts.map +1 -1
- package/dist/models/attendance.d.ts +63 -21
- package/dist/models/attendance.d.ts.map +1 -1
- package/dist/models/auth.d.ts +102 -18
- package/dist/models/auth.d.ts.map +1 -1
- package/dist/models/class.d.ts +112 -64
- package/dist/models/class.d.ts.map +1 -1
- package/dist/models/comment.d.ts +52 -16
- package/dist/models/comment.d.ts.map +1 -1
- package/dist/models/conversation.d.ts +46 -16
- package/dist/models/conversation.d.ts.map +1 -1
- package/dist/models/event.d.ts +107 -53
- package/dist/models/event.d.ts.map +1 -1
- package/dist/models/file.d.ts +213 -165
- package/dist/models/file.d.ts.map +1 -1
- package/dist/models/folder.d.ts +161 -77
- package/dist/models/folder.d.ts.map +1 -1
- package/dist/models/labChat.d.ts +73 -31
- package/dist/models/labChat.d.ts.map +1 -1
- package/dist/models/marketing.d.ts +25 -7
- package/dist/models/marketing.d.ts.map +1 -1
- package/dist/models/message.d.ts +31 -13
- package/dist/models/message.d.ts.map +1 -1
- package/dist/models/newtonChat.d.ts +34 -10
- package/dist/models/newtonChat.d.ts.map +1 -1
- package/dist/models/notification.d.ts +25 -7
- package/dist/models/notification.d.ts.map +1 -1
- package/dist/models/section.d.ts +71 -23
- package/dist/models/section.d.ts.map +1 -1
- package/dist/models/user.d.ts +27 -9
- package/dist/models/user.d.ts.map +1 -1
- package/dist/models/worksheet.d.ts +237 -108
- package/dist/models/worksheet.d.ts.map +1 -1
- package/dist/pipelines/aiLabChat.d.ts +30 -6
- package/dist/pipelines/aiLabChat.d.ts.map +1 -1
- package/dist/pipelines/aiLabChat.js +157 -234
- package/dist/pipelines/aiLabChat.js.map +1 -1
- package/dist/pipelines/aiLabChatContract.d.ts +413 -0
- package/dist/pipelines/aiLabChatContract.d.ts.map +1 -0
- package/dist/pipelines/aiLabChatContract.js +74 -0
- package/dist/pipelines/aiLabChatContract.js.map +1 -0
- package/dist/pipelines/gradeWorksheet.d.ts +8 -8
- package/dist/pipelines/gradeWorksheet.js +4 -4
- package/dist/pipelines/gradeWorksheet.js.map +1 -1
- package/dist/pipelines/labChatPrompt.d.ts +29 -0
- package/dist/pipelines/labChatPrompt.d.ts.map +1 -0
- package/dist/pipelines/labChatPrompt.js +146 -0
- package/dist/pipelines/labChatPrompt.js.map +1 -0
- package/dist/routers/_app.d.ts +1622 -1260
- package/dist/routers/_app.d.ts.map +1 -1
- package/dist/routers/_app.js +4 -2
- package/dist/routers/_app.js.map +1 -1
- package/dist/routers/agenda.d.ts +16 -16
- package/dist/routers/announcement.d.ts +19 -19
- package/dist/routers/assignment.d.ts +307 -291
- package/dist/routers/assignment.d.ts.map +1 -1
- package/dist/routers/assignment.js +3 -2
- package/dist/routers/assignment.js.map +1 -1
- package/dist/routers/attendance.d.ts +7 -7
- package/dist/routers/auth.d.ts +1 -1
- package/dist/routers/class.d.ts +77 -71
- package/dist/routers/class.d.ts.map +1 -1
- package/dist/routers/comment.d.ts +6 -6
- package/dist/routers/conversation.d.ts +11 -11
- package/dist/routers/event.d.ts +35 -35
- package/dist/routers/file.d.ts +12 -12
- package/dist/routers/folder.d.ts +54 -54
- package/dist/routers/labChat.d.ts +12 -12
- package/dist/routers/marketing.d.ts +2 -2
- package/dist/routers/message.d.ts +2 -2
- package/dist/routers/newtonChat.d.ts +1 -1
- package/dist/routers/notifications.d.ts +4 -4
- package/dist/routers/section.d.ts +7 -7
- package/dist/routers/studentProgress.d.ts +161 -0
- package/dist/routers/studentProgress.d.ts.map +1 -0
- package/dist/routers/studentProgress.js +43 -0
- package/dist/routers/studentProgress.js.map +1 -0
- package/dist/routers/user.d.ts +1 -1
- package/dist/routers/worksheet.d.ts +58 -58
- package/dist/seedDatabase.d.ts +1 -1
- package/dist/services/agenda.d.ts +16 -16
- package/dist/services/announcement.d.ts +8 -8
- package/dist/services/assignment.d.ts +299 -283
- package/dist/services/assignment.d.ts.map +1 -1
- package/dist/services/assignment.js +24 -5
- package/dist/services/assignment.js.map +1 -1
- package/dist/services/attendance.d.ts +7 -7
- package/dist/services/auth.d.ts +1 -1
- package/dist/services/class.d.ts +73 -67
- package/dist/services/class.d.ts.map +1 -1
- package/dist/services/comment.d.ts +6 -6
- package/dist/services/conversation.d.ts +11 -11
- package/dist/services/event.d.ts +31 -31
- package/dist/services/file.d.ts +12 -12
- package/dist/services/folder.d.ts +52 -52
- package/dist/services/labChat.d.ts +12 -12
- package/dist/services/labChat.d.ts.map +1 -1
- package/dist/services/labChat.js +31 -15
- package/dist/services/labChat.js.map +1 -1
- package/dist/services/marketing.d.ts +2 -2
- package/dist/services/message.d.ts.map +1 -1
- package/dist/services/message.js +90 -48
- package/dist/services/message.js.map +1 -1
- package/dist/services/notification.d.ts +4 -4
- package/dist/services/section.d.ts +6 -6
- package/dist/services/studentProgress.d.ts +120 -0
- package/dist/services/studentProgress.d.ts.map +1 -0
- package/dist/services/studentProgress.js +481 -0
- package/dist/services/studentProgress.js.map +1 -0
- package/dist/services/worksheet.d.ts +49 -49
- package/dist/utils/inference.d.ts +0 -11
- package/dist/utils/inference.d.ts.map +1 -1
- package/dist/utils/inference.js +2 -50
- package/dist/utils/inference.js.map +1 -1
- package/package.json +2 -2
- package/prisma/migrations/20260410124000_add_submission_recommendation_state/migration.sql +14 -0
- package/prisma/schema.prisma +14 -0
- package/sentry.properties +3 -0
- package/src/index.ts +39 -51
- package/src/lib/config/cors.ts +96 -0
- package/src/lib/config/env.ts +12 -1
- package/src/lib/prisma.ts +25 -6
- package/src/middleware/security.ts +1 -1
- package/src/pipelines/aiLabChat.ts +206 -246
- package/src/pipelines/aiLabChatContract.ts +75 -0
- package/src/pipelines/gradeWorksheet.ts +2 -2
- package/src/pipelines/labChatPrompt.ts +196 -0
- package/src/routers/_app.ts +4 -2
- package/src/routers/assignment.ts +1 -0
- package/src/routers/studentProgress.ts +71 -0
- package/src/services/assignment.ts +30 -2
- package/src/services/labChat.ts +31 -22
- package/src/services/message.ts +97 -48
- package/src/services/studentProgress.ts +691 -0
- package/src/utils/inference.ts +0 -61
- package/tests/lib/aiLabChatContract.test.ts +32 -0
- package/tests/lib/cors.test.ts +103 -0
- package/tests/pipelines/aiLabChat.test.ts +75 -0
- package/tests/routers/studentProgress.test.ts +254 -0
- package/tests/utils/aiLabChatPrompt.test.ts +126 -0
- package/tests/utils/studentProgress.test.ts +361 -0
- package/vitest.unit.config.ts +8 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assignment.d.ts","sourceRoot":"/","sources":["models/assignment.ts"],"names":[],"mappings":"AAyCA,iCAAiC;AACjC,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"assignment.d.ts","sourceRoot":"/","sources":["models/assignment.ts"],"names":[],"mappings":"AAyCA,iCAAiC;AACjC,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,MAAM;;;;;;;;;;;;;;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M,EAAE,YAAY,EAAE,MAAM;;;;;;;;KAiBrF;AAiBD,kCAAkC;AAClC,wBAAgB,uBAAuB,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAM5E;AAED,oCAAoC;AACpC,wBAAgB,yBAAyB,CAAC,YAAY,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAM7D"}
|
|
@@ -5,35 +5,47 @@ export declare function findClassWithStudents(classId: string): import(".prisma/
|
|
|
5
5
|
id: string;
|
|
6
6
|
username: string;
|
|
7
7
|
profile: {
|
|
8
|
+
location: string | null;
|
|
8
9
|
displayName: string | null;
|
|
9
10
|
bio: string | null;
|
|
10
|
-
location: string | null;
|
|
11
11
|
website: string | null;
|
|
12
12
|
profilePicture: string | null;
|
|
13
13
|
profilePictureThumbnail: string | null;
|
|
14
14
|
} | null;
|
|
15
15
|
}[];
|
|
16
|
-
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
16
|
+
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
17
|
+
datasources: {
|
|
18
|
+
db: {
|
|
19
|
+
url: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
}>;
|
|
17
23
|
/** @returns Class if user is a teacher. */
|
|
18
24
|
export declare function findClassWithTeacher(classId: string, teacherId: string): import(".prisma/client").Prisma.Prisma__ClassClient<{
|
|
25
|
+
name: string;
|
|
19
26
|
id: string;
|
|
20
27
|
schoolId: string | null;
|
|
21
|
-
name: string;
|
|
22
28
|
subject: string;
|
|
23
29
|
color: string | null;
|
|
24
30
|
section: string;
|
|
25
31
|
syllabus: string | null;
|
|
26
|
-
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
32
|
+
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
33
|
+
datasources: {
|
|
34
|
+
db: {
|
|
35
|
+
url: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
}>;
|
|
27
39
|
/** @returns Events for a class. */
|
|
28
40
|
export declare function findEventsByClassId(classId: string): import(".prisma/client").Prisma.PrismaPromise<{
|
|
41
|
+
name: string | null;
|
|
29
42
|
id: string;
|
|
30
43
|
userId: string | null;
|
|
31
|
-
location: string | null;
|
|
32
|
-
classId: string | null;
|
|
33
|
-
name: string | null;
|
|
34
44
|
color: string | null;
|
|
45
|
+
classId: string | null;
|
|
35
46
|
startTime: Date;
|
|
36
47
|
endTime: Date;
|
|
48
|
+
location: string | null;
|
|
37
49
|
remarks: string | null;
|
|
38
50
|
}[]>;
|
|
39
51
|
/** @returns Attendance record for an event. */
|
|
@@ -42,31 +54,43 @@ export declare function findAttendanceByEventId(eventId: string): import(".prism
|
|
|
42
54
|
classId: string;
|
|
43
55
|
eventId: string | null;
|
|
44
56
|
date: Date;
|
|
45
|
-
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
57
|
+
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
58
|
+
datasources: {
|
|
59
|
+
db: {
|
|
60
|
+
url: string;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
}>;
|
|
46
64
|
/** @returns Attendance for class and event (eventId null = class-level). */
|
|
47
65
|
export declare function findAttendanceByClassAndEvent(classId: string, eventId: string | null): import(".prisma/client").Prisma.Prisma__AttendanceClient<{
|
|
48
66
|
id: string;
|
|
49
67
|
classId: string;
|
|
50
68
|
eventId: string | null;
|
|
51
69
|
date: Date;
|
|
52
|
-
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
70
|
+
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
71
|
+
datasources: {
|
|
72
|
+
db: {
|
|
73
|
+
url: string;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
}>;
|
|
53
77
|
/** @returns Attendance records for class, optionally filtered by event. */
|
|
54
78
|
export declare function findManyAttendance(classId: string, eventId?: string): import(".prisma/client").Prisma.PrismaPromise<({
|
|
55
79
|
event: {
|
|
56
|
-
id: string;
|
|
57
|
-
location: string | null;
|
|
58
80
|
name: string | null;
|
|
81
|
+
id: string;
|
|
59
82
|
color: string | null;
|
|
60
83
|
startTime: Date;
|
|
61
84
|
endTime: Date;
|
|
85
|
+
location: string | null;
|
|
62
86
|
} | null;
|
|
63
87
|
present: {
|
|
64
88
|
id: string;
|
|
65
89
|
username: string;
|
|
66
90
|
profile: {
|
|
91
|
+
location: string | null;
|
|
67
92
|
displayName: string | null;
|
|
68
93
|
bio: string | null;
|
|
69
|
-
location: string | null;
|
|
70
94
|
website: string | null;
|
|
71
95
|
profilePicture: string | null;
|
|
72
96
|
profilePictureThumbnail: string | null;
|
|
@@ -76,9 +100,9 @@ export declare function findManyAttendance(classId: string, eventId?: string): i
|
|
|
76
100
|
id: string;
|
|
77
101
|
username: string;
|
|
78
102
|
profile: {
|
|
103
|
+
location: string | null;
|
|
79
104
|
displayName: string | null;
|
|
80
105
|
bio: string | null;
|
|
81
|
-
location: string | null;
|
|
82
106
|
website: string | null;
|
|
83
107
|
profilePicture: string | null;
|
|
84
108
|
profilePictureThumbnail: string | null;
|
|
@@ -88,9 +112,9 @@ export declare function findManyAttendance(classId: string, eventId?: string): i
|
|
|
88
112
|
id: string;
|
|
89
113
|
username: string;
|
|
90
114
|
profile: {
|
|
115
|
+
location: string | null;
|
|
91
116
|
displayName: string | null;
|
|
92
117
|
bio: string | null;
|
|
93
|
-
location: string | null;
|
|
94
118
|
website: string | null;
|
|
95
119
|
profilePicture: string | null;
|
|
96
120
|
profilePictureThumbnail: string | null;
|
|
@@ -111,11 +135,11 @@ export declare function createAttendance(data: {
|
|
|
111
135
|
absentIds?: string[];
|
|
112
136
|
}): import(".prisma/client").Prisma.Prisma__AttendanceClient<{
|
|
113
137
|
event: {
|
|
114
|
-
id: string;
|
|
115
|
-
location: string | null;
|
|
116
138
|
name: string | null;
|
|
139
|
+
id: string;
|
|
117
140
|
startTime: Date;
|
|
118
141
|
endTime: Date;
|
|
142
|
+
location: string | null;
|
|
119
143
|
} | null;
|
|
120
144
|
present: {
|
|
121
145
|
id: string;
|
|
@@ -134,7 +158,13 @@ export declare function createAttendance(data: {
|
|
|
134
158
|
classId: string;
|
|
135
159
|
eventId: string | null;
|
|
136
160
|
date: Date;
|
|
137
|
-
}, never, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
161
|
+
}, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
162
|
+
datasources: {
|
|
163
|
+
db: {
|
|
164
|
+
url: string;
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
}>;
|
|
138
168
|
/** Create attendance for a specific event. */
|
|
139
169
|
export declare function createAttendanceForEvent(data: {
|
|
140
170
|
classId: string;
|
|
@@ -145,7 +175,13 @@ export declare function createAttendanceForEvent(data: {
|
|
|
145
175
|
classId: string;
|
|
146
176
|
eventId: string | null;
|
|
147
177
|
date: Date;
|
|
148
|
-
}, never, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
178
|
+
}, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
179
|
+
datasources: {
|
|
180
|
+
db: {
|
|
181
|
+
url: string;
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
}>;
|
|
149
185
|
/** Update attendance present/late/absent lists. */
|
|
150
186
|
export declare function updateAttendance(id: string, data: {
|
|
151
187
|
presentIds: string[];
|
|
@@ -153,11 +189,11 @@ export declare function updateAttendance(id: string, data: {
|
|
|
153
189
|
absentIds: string[];
|
|
154
190
|
}): import(".prisma/client").Prisma.Prisma__AttendanceClient<{
|
|
155
191
|
event: {
|
|
156
|
-
id: string;
|
|
157
|
-
location: string | null;
|
|
158
192
|
name: string | null;
|
|
193
|
+
id: string;
|
|
159
194
|
startTime: Date;
|
|
160
195
|
endTime: Date;
|
|
196
|
+
location: string | null;
|
|
161
197
|
} | null;
|
|
162
198
|
present: {
|
|
163
199
|
id: string;
|
|
@@ -176,5 +212,11 @@ export declare function updateAttendance(id: string, data: {
|
|
|
176
212
|
classId: string;
|
|
177
213
|
eventId: string | null;
|
|
178
214
|
date: Date;
|
|
179
|
-
}, never, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
215
|
+
}, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
216
|
+
datasources: {
|
|
217
|
+
db: {
|
|
218
|
+
url: string;
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
}>;
|
|
180
222
|
//# sourceMappingURL=attendance.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attendance.d.ts","sourceRoot":"/","sources":["models/attendance.ts"],"names":[],"mappings":"AAiFA,mDAAmD;AACnD,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"attendance.d.ts","sourceRoot":"/","sources":["models/attendance.ts"],"names":[],"mappings":"AAiFA,mDAAmD;AACnD,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;GAuBpD;AAED,2CAA2C;AAC3C,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;;;;;;;;;;;;;;GAOtE;AAED,mCAAmC;AACnC,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM;;;;;;;;;;KAIlD;AAED,+CAA+C;AAC/C,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM;;;;;;;;;;;GAItD;AAED,4EAA4E;AAC5E,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;;;;;;;;;;;GAOpF;AAED,2EAA2E;AAC3E,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MASnE;AAED,mCAAmC;AACnC,wBAAgB,gBAAgB,CAAC,IAAI,EAAE;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgBA;AAED,8CAA8C;AAC9C,wBAAgB,wBAAwB,CAAC,IAAI,EAAE;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;;;;;;;;;;;GAQA;AAED,mDAAmD;AACnD,wBAAgB,gBAAgB,CAC9B,EAAE,EAAE,MAAM,EACV,IAAI,EAAE;IAAE,UAAU,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,SAAS,EAAE,MAAM,EAAE,CAAA;CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAWvE"}
|
package/dist/models/auth.d.ts
CHANGED
|
@@ -5,40 +5,64 @@ export declare function findUserByUsername(username: string): import(".prisma/cl
|
|
|
5
5
|
email: string;
|
|
6
6
|
password: string;
|
|
7
7
|
verified: boolean;
|
|
8
|
-
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
8
|
+
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
9
|
+
datasources: {
|
|
10
|
+
db: {
|
|
11
|
+
url: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
}>;
|
|
9
15
|
/** @returns User by username or email. */
|
|
10
16
|
export declare function findUserByUsernameOrEmail(username: string, email: string): import(".prisma/client").Prisma.Prisma__UserClient<{
|
|
11
17
|
id: string;
|
|
12
18
|
username: string;
|
|
13
19
|
email: string;
|
|
14
20
|
verified: boolean;
|
|
15
|
-
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
21
|
+
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
22
|
+
datasources: {
|
|
23
|
+
db: {
|
|
24
|
+
url: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
}>;
|
|
16
28
|
/** @returns User by email with profile. */
|
|
17
29
|
export declare function findUserByEmail(email: string): import(".prisma/client").Prisma.Prisma__UserClient<{
|
|
18
30
|
id: string;
|
|
19
31
|
email: string;
|
|
20
32
|
role: import(".prisma/client").$Enums.UserRole;
|
|
21
33
|
profile: {
|
|
34
|
+
location: string | null;
|
|
22
35
|
displayName: string | null;
|
|
23
36
|
bio: string | null;
|
|
24
|
-
location: string | null;
|
|
25
37
|
website: string | null;
|
|
26
38
|
profilePicture: string | null;
|
|
27
39
|
} | null;
|
|
28
|
-
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
40
|
+
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
41
|
+
datasources: {
|
|
42
|
+
db: {
|
|
43
|
+
url: string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
}>;
|
|
29
47
|
/** @returns User by ID with profile. */
|
|
30
48
|
export declare function findUserById(id: string): import(".prisma/client").Prisma.Prisma__UserClient<{
|
|
31
49
|
id: string;
|
|
32
50
|
username: string;
|
|
33
51
|
profile: {
|
|
52
|
+
location: string | null;
|
|
34
53
|
displayName: string | null;
|
|
35
54
|
bio: string | null;
|
|
36
|
-
location: string | null;
|
|
37
55
|
website: string | null;
|
|
38
56
|
profilePicture: string | null;
|
|
39
57
|
profilePictureThumbnail: string | null;
|
|
40
58
|
} | null;
|
|
41
|
-
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
59
|
+
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
60
|
+
datasources: {
|
|
61
|
+
db: {
|
|
62
|
+
url: string;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
}>;
|
|
42
66
|
/** Create a user with empty profile. */
|
|
43
67
|
export declare function createUser(data: {
|
|
44
68
|
username: string;
|
|
@@ -49,7 +73,13 @@ export declare function createUser(data: {
|
|
|
49
73
|
id: string;
|
|
50
74
|
username: string;
|
|
51
75
|
email: string;
|
|
52
|
-
}, never, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
76
|
+
}, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
77
|
+
datasources: {
|
|
78
|
+
db: {
|
|
79
|
+
url: string;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
}>;
|
|
53
83
|
/** Create a session. */
|
|
54
84
|
export declare function createSession(data: {
|
|
55
85
|
id: string;
|
|
@@ -61,7 +91,13 @@ export declare function createSession(data: {
|
|
|
61
91
|
createdAt: Date | null;
|
|
62
92
|
expiresAt: Date | null;
|
|
63
93
|
classId: string | null;
|
|
64
|
-
}, never, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
94
|
+
}, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
95
|
+
datasources: {
|
|
96
|
+
db: {
|
|
97
|
+
url: string;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
}>;
|
|
65
101
|
/** Delete all sessions for user. Invalidates Redis cache. */
|
|
66
102
|
export declare function deleteSessionsByUserId(userId: string): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
|
67
103
|
/** Delete short-lived sessions (no classId) expiring before date. */
|
|
@@ -75,7 +111,13 @@ export declare function deleteUserById(id: string): import(".prisma/client").Pri
|
|
|
75
111
|
verified: boolean;
|
|
76
112
|
role: import(".prisma/client").$Enums.UserRole;
|
|
77
113
|
schoolId: string | null;
|
|
78
|
-
}, never, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
114
|
+
}, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
115
|
+
datasources: {
|
|
116
|
+
db: {
|
|
117
|
+
url: string;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
}>;
|
|
79
121
|
/** @returns Session by ID. */
|
|
80
122
|
export declare function findSessionById(id: string): import(".prisma/client").Prisma.Prisma__SessionClient<{
|
|
81
123
|
id: string;
|
|
@@ -83,7 +125,13 @@ export declare function findSessionById(id: string): import(".prisma/client").Pr
|
|
|
83
125
|
createdAt: Date | null;
|
|
84
126
|
expiresAt: Date | null;
|
|
85
127
|
classId: string | null;
|
|
86
|
-
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
128
|
+
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
129
|
+
datasources: {
|
|
130
|
+
db: {
|
|
131
|
+
url: string;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
}>;
|
|
87
135
|
/** @returns Session with user. */
|
|
88
136
|
export declare function findSessionByIdWithUser(id: string): import(".prisma/client").Prisma.Prisma__SessionClient<({
|
|
89
137
|
user: {
|
|
@@ -95,7 +143,13 @@ export declare function findSessionByIdWithUser(id: string): import(".prisma/cli
|
|
|
95
143
|
createdAt: Date | null;
|
|
96
144
|
expiresAt: Date | null;
|
|
97
145
|
classId: string | null;
|
|
98
|
-
}) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
146
|
+
}) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
147
|
+
datasources: {
|
|
148
|
+
db: {
|
|
149
|
+
url: string;
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
}>;
|
|
99
153
|
/** Set user verified status. */
|
|
100
154
|
export declare function updateUserVerified(userId: string, verified: boolean): import(".prisma/client").Prisma.Prisma__UserClient<{
|
|
101
155
|
id: string;
|
|
@@ -105,7 +159,13 @@ export declare function updateUserVerified(userId: string, verified: boolean): i
|
|
|
105
159
|
verified: boolean;
|
|
106
160
|
role: import(".prisma/client").$Enums.UserRole;
|
|
107
161
|
schoolId: string | null;
|
|
108
|
-
}, never, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
162
|
+
}, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
163
|
+
datasources: {
|
|
164
|
+
db: {
|
|
165
|
+
url: string;
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
}>;
|
|
109
169
|
/** Update user password. */
|
|
110
170
|
export declare function updateUserPassword(userId: string, password: string): import(".prisma/client").Prisma.Prisma__UserClient<{
|
|
111
171
|
id: string;
|
|
@@ -115,7 +175,13 @@ export declare function updateUserPassword(userId: string, password: string): im
|
|
|
115
175
|
verified: boolean;
|
|
116
176
|
role: import(".prisma/client").$Enums.UserRole;
|
|
117
177
|
schoolId: string | null;
|
|
118
|
-
}, never, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
178
|
+
}, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
179
|
+
datasources: {
|
|
180
|
+
db: {
|
|
181
|
+
url: string;
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
}>;
|
|
119
185
|
/** Delete a session. */
|
|
120
186
|
export declare function deleteSessionById(id: string): import(".prisma/client").Prisma.Prisma__SessionClient<{
|
|
121
187
|
id: string;
|
|
@@ -123,7 +189,13 @@ export declare function deleteSessionById(id: string): import(".prisma/client").
|
|
|
123
189
|
createdAt: Date | null;
|
|
124
190
|
expiresAt: Date | null;
|
|
125
191
|
classId: string | null;
|
|
126
|
-
}, never, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
192
|
+
}, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
193
|
+
datasources: {
|
|
194
|
+
db: {
|
|
195
|
+
url: string;
|
|
196
|
+
};
|
|
197
|
+
};
|
|
198
|
+
}>;
|
|
127
199
|
/** @returns User from session token. Checks Redis first, then DB. Caches in Redis. */
|
|
128
200
|
export declare function findUserBySessionToken(token: string): Promise<any>;
|
|
129
201
|
/** @returns Class IDs where user is a teacher. */
|
|
@@ -132,22 +204,34 @@ export declare function findTeacherClassesByUserId(userId: string): import(".pri
|
|
|
132
204
|
}[]>;
|
|
133
205
|
/** @returns Class if user is student or teacher. */
|
|
134
206
|
export declare function findClassWithMember(classId: string, userId: string): import(".prisma/client").Prisma.Prisma__ClassClient<{
|
|
207
|
+
name: string;
|
|
135
208
|
id: string;
|
|
136
209
|
schoolId: string | null;
|
|
137
|
-
name: string;
|
|
138
210
|
subject: string;
|
|
139
211
|
color: string | null;
|
|
140
212
|
section: string;
|
|
141
213
|
syllabus: string | null;
|
|
142
|
-
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
214
|
+
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
215
|
+
datasources: {
|
|
216
|
+
db: {
|
|
217
|
+
url: string;
|
|
218
|
+
};
|
|
219
|
+
};
|
|
220
|
+
}>;
|
|
143
221
|
/** @returns Class if user is a teacher. */
|
|
144
222
|
export declare function findClassWithTeacher(classId: string, teacherId: string): import(".prisma/client").Prisma.Prisma__ClassClient<{
|
|
223
|
+
name: string;
|
|
145
224
|
id: string;
|
|
146
225
|
schoolId: string | null;
|
|
147
|
-
name: string;
|
|
148
226
|
subject: string;
|
|
149
227
|
color: string | null;
|
|
150
228
|
section: string;
|
|
151
229
|
syllabus: string | null;
|
|
152
|
-
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
230
|
+
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
231
|
+
datasources: {
|
|
232
|
+
db: {
|
|
233
|
+
url: string;
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
}>;
|
|
153
237
|
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"/","sources":["models/auth.ts"],"names":[],"mappings":"AAOA,+DAA+D;AAC/D,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"/","sources":["models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