@studious-lms/server 1.4.1 → 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 +22 -2
- package/dist/pipelines/aiLabChat.d.ts.map +1 -1
- package/dist/pipelines/aiLabChat.js +125 -95
- package/dist/pipelines/aiLabChat.js.map +1 -1
- package/dist/pipelines/aiLabChatContract.d.ts +22 -22
- 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 +27 -0
- package/dist/pipelines/labChatPrompt.d.ts.map +1 -1
- package/dist/pipelines/labChatPrompt.js +143 -69
- package/dist/pipelines/labChatPrompt.js.map +1 -1
- package/dist/routers/_app.d.ts +1439 -1223
- package/dist/routers/_app.d.ts.map +1 -1
- package/dist/routers/agenda.d.ts +16 -16
- package/dist/routers/announcement.d.ts +19 -19
- package/dist/routers/assignment.d.ts +307 -291
- package/dist/routers/assignment.d.ts.map +1 -1
- package/dist/routers/assignment.js +3 -2
- package/dist/routers/assignment.js.map +1 -1
- package/dist/routers/attendance.d.ts +7 -7
- package/dist/routers/auth.d.ts +1 -1
- package/dist/routers/class.d.ts +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 +86 -0
- package/dist/routers/studentProgress.d.ts.map +1 -1
- package/dist/routers/studentProgress.js +14 -4
- package/dist/routers/studentProgress.js.map +1 -1
- package/dist/routers/user.d.ts +1 -1
- package/dist/routers/worksheet.d.ts +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/marketing.d.ts +2 -2
- package/dist/services/notification.d.ts +4 -4
- package/dist/services/section.d.ts +6 -6
- package/dist/services/studentProgress.d.ts +75 -0
- package/dist/services/studentProgress.d.ts.map +1 -1
- package/dist/services/studentProgress.js +296 -106
- package/dist/services/studentProgress.js.map +1 -1
- 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 +1 -1
- package/prisma/migrations/20260410124000_add_submission_recommendation_state/migration.sql +14 -0
- package/prisma/schema.prisma +14 -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 +175 -104
- package/src/pipelines/gradeWorksheet.ts +2 -2
- package/src/pipelines/labChatPrompt.ts +196 -68
- package/src/routers/assignment.ts +1 -0
- package/src/routers/studentProgress.ts +25 -1
- package/src/services/assignment.ts +30 -2
- package/src/services/studentProgress.ts +421 -120
- package/src/utils/inference.ts +0 -61
- package/tests/lib/cors.test.ts +103 -0
- package/tests/pipelines/aiLabChat.test.ts +64 -84
- package/tests/routers/studentProgress.test.ts +2 -31
- package/tests/utils/aiLabChatPrompt.test.ts +114 -6
- package/tests/utils/studentProgress.test.ts +361 -0
- package/vitest.unit.config.ts +1 -0
package/dist/models/section.d.ts
CHANGED
|
@@ -1,21 +1,33 @@
|
|
|
1
1
|
/** @returns Section by ID. */
|
|
2
2
|
export declare function findSectionById(id: string): import(".prisma/client").Prisma.Prisma__SectionClient<{
|
|
3
|
-
id: string;
|
|
4
|
-
classId: string;
|
|
5
3
|
name: string;
|
|
4
|
+
id: string;
|
|
6
5
|
color: string | null;
|
|
6
|
+
classId: string;
|
|
7
7
|
order: number | null;
|
|
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 Class if user is a teacher. */
|
|
10
16
|
export declare function findClassWithTeacher(classId: string, teacherId: string): import(".prisma/client").Prisma.Prisma__ClassClient<{
|
|
17
|
+
name: string;
|
|
11
18
|
id: string;
|
|
12
19
|
schoolId: string | null;
|
|
13
|
-
name: string;
|
|
14
20
|
subject: string;
|
|
15
21
|
color: string | null;
|
|
16
22
|
section: string;
|
|
17
23
|
syllabus: string | null;
|
|
18
|
-
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
24
|
+
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
25
|
+
datasources: {
|
|
26
|
+
db: {
|
|
27
|
+
url: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
}>;
|
|
19
31
|
/** Create a section in a class. */
|
|
20
32
|
export declare function createSection(data: {
|
|
21
33
|
id?: string;
|
|
@@ -24,12 +36,18 @@ export declare function createSection(data: {
|
|
|
24
36
|
classId: string;
|
|
25
37
|
color?: string;
|
|
26
38
|
}): import(".prisma/client").Prisma.Prisma__SectionClient<{
|
|
27
|
-
id: string;
|
|
28
|
-
classId: string;
|
|
29
39
|
name: string;
|
|
40
|
+
id: string;
|
|
30
41
|
color: string | null;
|
|
42
|
+
classId: string;
|
|
31
43
|
order: number | null;
|
|
32
|
-
}, never, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
44
|
+
}, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
45
|
+
datasources: {
|
|
46
|
+
db: {
|
|
47
|
+
url: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
}>;
|
|
33
51
|
/** @returns Sections for a class (id, order only). */
|
|
34
52
|
export declare function findSectionsByClassId(classId: string): import(".prisma/client").Prisma.PrismaPromise<{
|
|
35
53
|
id: string;
|
|
@@ -42,24 +60,28 @@ export declare function findAssignmentsByClassId(classId: string): import(".pris
|
|
|
42
60
|
}[]>;
|
|
43
61
|
/** Update section order. */
|
|
44
62
|
export declare function updateSectionOrder(id: string, order: number): import(".prisma/client").Prisma.Prisma__SectionClient<{
|
|
45
|
-
id: string;
|
|
46
|
-
classId: string;
|
|
47
63
|
name: string;
|
|
64
|
+
id: string;
|
|
48
65
|
color: string | null;
|
|
66
|
+
classId: string;
|
|
49
67
|
order: number | null;
|
|
50
|
-
}, never, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
68
|
+
}, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
69
|
+
datasources: {
|
|
70
|
+
db: {
|
|
71
|
+
url: string;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
}>;
|
|
51
75
|
/** Update assignment order. */
|
|
52
76
|
export declare function updateAssignmentOrder(id: string, order: number): import(".prisma/client").Prisma.Prisma__AssignmentClient<{
|
|
53
77
|
type: import(".prisma/client").$Enums.AssignmentType;
|
|
54
78
|
id: string;
|
|
55
79
|
createdAt: Date | null;
|
|
80
|
+
modifiedAt: Date | null;
|
|
56
81
|
classId: string;
|
|
57
82
|
title: string;
|
|
58
|
-
dueDate: Date;
|
|
59
|
-
maxGrade: number | null;
|
|
60
|
-
eventId: string | null;
|
|
61
83
|
instructions: string;
|
|
62
|
-
|
|
84
|
+
dueDate: Date;
|
|
63
85
|
teacherId: string;
|
|
64
86
|
acceptFiles: boolean;
|
|
65
87
|
acceptExtendedResponse: boolean;
|
|
@@ -68,35 +90,61 @@ export declare function updateAssignmentOrder(id: string, order: number): import
|
|
|
68
90
|
aiPolicyLevel: number;
|
|
69
91
|
sectionId: string | null;
|
|
70
92
|
graded: boolean;
|
|
93
|
+
maxGrade: number | null;
|
|
71
94
|
weight: number;
|
|
72
95
|
inProgress: boolean;
|
|
73
96
|
template: boolean;
|
|
97
|
+
eventId: string | null;
|
|
74
98
|
markSchemeId: string | null;
|
|
75
99
|
order: number | null;
|
|
76
100
|
gradingBoundaryId: string | null;
|
|
77
|
-
}, never, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
101
|
+
}, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
102
|
+
datasources: {
|
|
103
|
+
db: {
|
|
104
|
+
url: string;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
}>;
|
|
78
108
|
/** Update section name and color. */
|
|
79
109
|
export declare function updateSection(id: string, data: {
|
|
80
110
|
name: string;
|
|
81
111
|
color?: string;
|
|
82
112
|
}): import(".prisma/client").Prisma.Prisma__SectionClient<{
|
|
83
|
-
id: string;
|
|
84
|
-
classId: string;
|
|
85
113
|
name: string;
|
|
114
|
+
id: string;
|
|
86
115
|
color: string | null;
|
|
116
|
+
classId: string;
|
|
87
117
|
order: number | null;
|
|
88
|
-
}, never, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
118
|
+
}, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
119
|
+
datasources: {
|
|
120
|
+
db: {
|
|
121
|
+
url: string;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
}>;
|
|
89
125
|
/** Delete a section. */
|
|
90
126
|
export declare function deleteSectionById(id: string): import(".prisma/client").Prisma.Prisma__SectionClient<{
|
|
91
|
-
id: string;
|
|
92
|
-
classId: string;
|
|
93
127
|
name: string;
|
|
128
|
+
id: string;
|
|
94
129
|
color: string | null;
|
|
130
|
+
classId: string;
|
|
95
131
|
order: number | null;
|
|
96
|
-
}, never, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
132
|
+
}, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
133
|
+
datasources: {
|
|
134
|
+
db: {
|
|
135
|
+
url: string;
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
}>;
|
|
97
139
|
/** @returns Section by ID and classId. */
|
|
98
140
|
export declare function findSectionByClassAndId(sectionId: string, classId: string): import(".prisma/client").Prisma.Prisma__SectionClient<{
|
|
99
141
|
id: string;
|
|
100
142
|
classId: string;
|
|
101
|
-
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
143
|
+
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
144
|
+
datasources: {
|
|
145
|
+
db: {
|
|
146
|
+
url: string;
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
}>;
|
|
102
150
|
//# sourceMappingURL=section.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"section.d.ts","sourceRoot":"/","sources":["models/section.ts"],"names":[],"mappings":"AAKA,8BAA8B;AAC9B,wBAAgB,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AAM;;;;;;;;;GAKzE"}
|
package/dist/models/user.d.ts
CHANGED
|
@@ -2,20 +2,32 @@
|
|
|
2
2
|
export declare function findUserById(id: string): import(".prisma/client").Prisma.Prisma__UserClient<{
|
|
3
3
|
id: string;
|
|
4
4
|
username: string;
|
|
5
|
-
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
5
|
+
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
6
|
+
datasources: {
|
|
7
|
+
db: {
|
|
8
|
+
url: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
}>;
|
|
6
12
|
/** @returns User profile by userId. */
|
|
7
13
|
export declare function findUserProfileByUserId(userId: string): import(".prisma/client").Prisma.Prisma__UserProfileClient<{
|
|
8
14
|
id: string;
|
|
9
15
|
userId: string;
|
|
16
|
+
createdAt: Date;
|
|
17
|
+
location: string | null;
|
|
18
|
+
updatedAt: Date;
|
|
10
19
|
displayName: string | null;
|
|
11
20
|
bio: string | null;
|
|
12
|
-
location: string | null;
|
|
13
21
|
website: string | null;
|
|
14
22
|
profilePicture: string | null;
|
|
15
23
|
profilePictureThumbnail: string | null;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
24
|
+
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
25
|
+
datasources: {
|
|
26
|
+
db: {
|
|
27
|
+
url: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
}>;
|
|
19
31
|
/** Create or update user profile. */
|
|
20
32
|
export declare function upsertUserProfile(userId: string, data: {
|
|
21
33
|
displayName?: string;
|
|
@@ -27,13 +39,19 @@ export declare function upsertUserProfile(userId: string, data: {
|
|
|
27
39
|
}): import(".prisma/client").Prisma.Prisma__UserProfileClient<{
|
|
28
40
|
id: string;
|
|
29
41
|
userId: string;
|
|
42
|
+
createdAt: Date;
|
|
43
|
+
location: string | null;
|
|
44
|
+
updatedAt: Date;
|
|
30
45
|
displayName: string | null;
|
|
31
46
|
bio: string | null;
|
|
32
|
-
location: string | null;
|
|
33
47
|
website: string | null;
|
|
34
48
|
profilePicture: string | null;
|
|
35
49
|
profilePictureThumbnail: string | null;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
50
|
+
}, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
51
|
+
datasources: {
|
|
52
|
+
db: {
|
|
53
|
+
url: string;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
}>;
|
|
39
57
|
//# sourceMappingURL=user.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.d.ts","sourceRoot":"/","sources":["models/user.ts"],"names":[],"mappings":"AAKA,+CAA+C;AAC/C,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"user.d.ts","sourceRoot":"/","sources":["models/user.ts"],"names":[],"mappings":"AAKA,+CAA+C;AAC/C,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM;;;;;;;;;GAQtC;AAED,uCAAuC;AACvC,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;GAIrD;AAED,qCAAqC;AACrC,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE;IACJ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC;;;;;;;;;;;;;;;;;GAaF"}
|