@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
|
@@ -15,9 +15,9 @@ export declare function findConversationsByUserId(userId: string): import(".pris
|
|
|
15
15
|
};
|
|
16
16
|
} & {
|
|
17
17
|
id: string;
|
|
18
|
-
role: import(".prisma/client").$Enums.ConversationRole;
|
|
19
18
|
userId: string;
|
|
20
19
|
conversationId: string;
|
|
20
|
+
role: import(".prisma/client").$Enums.ConversationRole;
|
|
21
21
|
joinedAt: Date;
|
|
22
22
|
lastViewedAt: Date | null;
|
|
23
23
|
lastViewedMentionAt: Date | null;
|
|
@@ -32,19 +32,19 @@ export declare function findConversationsByUserId(userId: string): import(".pris
|
|
|
32
32
|
};
|
|
33
33
|
} & {
|
|
34
34
|
status: import(".prisma/client").$Enums.GenerationStatus | null;
|
|
35
|
+
meta: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
35
36
|
id: string;
|
|
37
|
+
conversationId: string;
|
|
36
38
|
createdAt: Date;
|
|
37
|
-
meta: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
38
39
|
content: string;
|
|
39
|
-
conversationId: string;
|
|
40
40
|
senderId: string;
|
|
41
41
|
})[];
|
|
42
42
|
} & {
|
|
43
43
|
type: import(".prisma/client").$Enums.ConversationType;
|
|
44
|
+
name: string | null;
|
|
44
45
|
id: string;
|
|
45
46
|
createdAt: Date;
|
|
46
47
|
updatedAt: Date;
|
|
47
|
-
name: string | null;
|
|
48
48
|
displayInChat: boolean;
|
|
49
49
|
})[]>;
|
|
50
50
|
/** Count unread messages in conversation for user. */
|
|
@@ -55,7 +55,13 @@ export declare function countUnreadMentions(conversationId: string, userId: stri
|
|
|
55
55
|
export declare function findUserByUsername(username: string): import(".prisma/client").Prisma.Prisma__UserClient<{
|
|
56
56
|
id: string;
|
|
57
57
|
username: string;
|
|
58
|
-
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
58
|
+
} | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
59
|
+
datasources: {
|
|
60
|
+
db: {
|
|
61
|
+
url: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
}>;
|
|
59
65
|
/** @returns User's DM conversations. */
|
|
60
66
|
export declare function findDmConversationsByUserId(userId: string): import(".prisma/client").Prisma.PrismaPromise<({
|
|
61
67
|
members: {
|
|
@@ -63,10 +69,10 @@ export declare function findDmConversationsByUserId(userId: string): import(".pr
|
|
|
63
69
|
}[];
|
|
64
70
|
} & {
|
|
65
71
|
type: import(".prisma/client").$Enums.ConversationType;
|
|
72
|
+
name: string | null;
|
|
66
73
|
id: string;
|
|
67
74
|
createdAt: Date;
|
|
68
75
|
updatedAt: Date;
|
|
69
|
-
name: string | null;
|
|
70
76
|
displayInChat: boolean;
|
|
71
77
|
})[]>;
|
|
72
78
|
/** @returns Users by IDs or usernames. */
|
|
@@ -94,21 +100,27 @@ export declare function createConversation(data: {
|
|
|
94
100
|
};
|
|
95
101
|
} & {
|
|
96
102
|
id: string;
|
|
97
|
-
role: import(".prisma/client").$Enums.ConversationRole;
|
|
98
103
|
userId: string;
|
|
99
104
|
conversationId: string;
|
|
105
|
+
role: import(".prisma/client").$Enums.ConversationRole;
|
|
100
106
|
joinedAt: Date;
|
|
101
107
|
lastViewedAt: Date | null;
|
|
102
108
|
lastViewedMentionAt: Date | null;
|
|
103
109
|
})[];
|
|
104
110
|
} & {
|
|
105
111
|
type: import(".prisma/client").$Enums.ConversationType;
|
|
112
|
+
name: string | null;
|
|
106
113
|
id: string;
|
|
107
114
|
createdAt: Date;
|
|
108
115
|
updatedAt: Date;
|
|
109
|
-
name: string | null;
|
|
110
116
|
displayInChat: boolean;
|
|
111
|
-
}, never, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
117
|
+
}, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
118
|
+
datasources: {
|
|
119
|
+
db: {
|
|
120
|
+
url: string;
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
}>;
|
|
112
124
|
/** @returns Conversation if user is a member. */
|
|
113
125
|
export declare function findConversationByIdAndMember(conversationId: string, userId: string): import(".prisma/client").Prisma.Prisma__ConversationClient<({
|
|
114
126
|
members: ({
|
|
@@ -122,21 +134,27 @@ export declare function findConversationByIdAndMember(conversationId: string, us
|
|
|
122
134
|
};
|
|
123
135
|
} & {
|
|
124
136
|
id: string;
|
|
125
|
-
role: import(".prisma/client").$Enums.ConversationRole;
|
|
126
137
|
userId: string;
|
|
127
138
|
conversationId: string;
|
|
139
|
+
role: import(".prisma/client").$Enums.ConversationRole;
|
|
128
140
|
joinedAt: Date;
|
|
129
141
|
lastViewedAt: Date | null;
|
|
130
142
|
lastViewedMentionAt: Date | null;
|
|
131
143
|
})[];
|
|
132
144
|
} & {
|
|
133
145
|
type: import(".prisma/client").$Enums.ConversationType;
|
|
146
|
+
name: string | null;
|
|
134
147
|
id: string;
|
|
135
148
|
createdAt: Date;
|
|
136
149
|
updatedAt: Date;
|
|
137
|
-
name: string | null;
|
|
138
150
|
displayInChat: boolean;
|
|
139
|
-
}) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
151
|
+
}) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
152
|
+
datasources: {
|
|
153
|
+
db: {
|
|
154
|
+
url: string;
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
}>;
|
|
140
158
|
/** Add a member to a conversation. */
|
|
141
159
|
export declare function createConversationMember(data: {
|
|
142
160
|
userId: string;
|
|
@@ -144,21 +162,33 @@ export declare function createConversationMember(data: {
|
|
|
144
162
|
role: string;
|
|
145
163
|
}): import(".prisma/client").Prisma.Prisma__ConversationMemberClient<{
|
|
146
164
|
id: string;
|
|
147
|
-
role: import(".prisma/client").$Enums.ConversationRole;
|
|
148
165
|
userId: string;
|
|
149
166
|
conversationId: string;
|
|
167
|
+
role: import(".prisma/client").$Enums.ConversationRole;
|
|
150
168
|
joinedAt: Date;
|
|
151
169
|
lastViewedAt: Date | null;
|
|
152
170
|
lastViewedMentionAt: Date | null;
|
|
153
|
-
}, never, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
171
|
+
}, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
172
|
+
datasources: {
|
|
173
|
+
db: {
|
|
174
|
+
url: string;
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
}>;
|
|
154
178
|
/** Remove a member from a conversation. */
|
|
155
179
|
export declare function deleteConversationMember(userId: string, conversationId: string): import(".prisma/client").Prisma.Prisma__ConversationMemberClient<{
|
|
156
180
|
id: string;
|
|
157
|
-
role: import(".prisma/client").$Enums.ConversationRole;
|
|
158
181
|
userId: string;
|
|
159
182
|
conversationId: string;
|
|
183
|
+
role: import(".prisma/client").$Enums.ConversationRole;
|
|
160
184
|
joinedAt: Date;
|
|
161
185
|
lastViewedAt: Date | null;
|
|
162
186
|
lastViewedMentionAt: Date | null;
|
|
163
|
-
}, never, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
187
|
+
}, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
188
|
+
datasources: {
|
|
189
|
+
db: {
|
|
190
|
+
url: string;
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
}>;
|
|
164
194
|
//# sourceMappingURL=conversation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation.d.ts","sourceRoot":"/","sources":["models/conversation.ts"],"names":[],"mappings":"AAmCA,mEAAmE;AACnE,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAQvD;AAED,sDAAsD;AACtD,wBAAgB,mBAAmB,CACjC,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,MAAM,EACd,KAAK,CAAC,EAAE,IAAI,yDASb;AAED,sDAAsD;AACtD,wBAAgB,mBAAmB,CACjC,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,MAAM,EACd,KAAK,CAAC,EAAE,IAAI,yDAYb;AAED,qDAAqD;AACrD,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"conversation.d.ts","sourceRoot":"/","sources":["models/conversation.ts"],"names":[],"mappings":"AAmCA,mEAAmE;AACnE,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAQvD;AAED,sDAAsD;AACtD,wBAAgB,mBAAmB,CACjC,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,MAAM,EACd,KAAK,CAAC,EAAE,IAAI,yDASb;AAED,sDAAsD;AACtD,wBAAgB,mBAAmB,CACjC,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,MAAM,EACd,KAAK,CAAC,EAAE,IAAI,yDAYb;AAED,qDAAqD;AACrD,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM;;;;;;;;;GAKlD;AAED,wCAAwC;AACxC,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,MAAM;;;;;;;;;;;MAUzD;AAED,0CAA0C;AAC1C,wBAAgB,yBAAyB,CAAC,WAAW,EAAE,MAAM,EAAE;;;KAW9D;AAED,sDAAsD;AACtD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IACvC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BA;AAED,iDAAiD;AACjD,wBAAgB,6BAA6B,CAC3C,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuBf;AAED,sCAAsC;AACtC,wBAAgB,wBAAwB,CAAC,IAAI,EAAE;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;CACd;;;;;;;;;;;;;;GAQA;AAED,2CAA2C;AAC3C,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM;;;;;;;;;;;;;;GAM9E"}
|
package/dist/models/event.d.ts
CHANGED
|
@@ -10,9 +10,9 @@ export declare function findEventById(id: string): import(".prisma/client").Pris
|
|
|
10
10
|
schoolId: string | null;
|
|
11
11
|
} | null;
|
|
12
12
|
class: {
|
|
13
|
+
name: string;
|
|
13
14
|
id: string;
|
|
14
15
|
schoolId: string | null;
|
|
15
|
-
name: string;
|
|
16
16
|
subject: string;
|
|
17
17
|
color: string | null;
|
|
18
18
|
section: string;
|
|
@@ -22,14 +22,14 @@ export declare function findEventById(id: string): import(".prisma/client").Pris
|
|
|
22
22
|
type: import(".prisma/client").$Enums.AssignmentType;
|
|
23
23
|
id: string;
|
|
24
24
|
section: {
|
|
25
|
-
id: string;
|
|
26
25
|
name: string;
|
|
26
|
+
id: string;
|
|
27
27
|
} | null;
|
|
28
28
|
title: string;
|
|
29
|
-
dueDate: Date;
|
|
30
|
-
maxGrade: number | null;
|
|
31
29
|
instructions: string;
|
|
30
|
+
dueDate: Date;
|
|
32
31
|
graded: boolean;
|
|
32
|
+
maxGrade: number | null;
|
|
33
33
|
weight: number;
|
|
34
34
|
teacher: {
|
|
35
35
|
id: string;
|
|
@@ -37,31 +37,43 @@ export declare function findEventById(id: string): import(".prisma/client").Pris
|
|
|
37
37
|
};
|
|
38
38
|
attachments: {
|
|
39
39
|
type: string;
|
|
40
|
-
id: string;
|
|
41
40
|
name: string;
|
|
41
|
+
id: string;
|
|
42
42
|
}[];
|
|
43
43
|
}[];
|
|
44
44
|
} & {
|
|
45
|
+
name: string | null;
|
|
45
46
|
id: string;
|
|
46
47
|
userId: string | null;
|
|
47
|
-
location: string | null;
|
|
48
|
-
classId: string | null;
|
|
49
|
-
name: string | null;
|
|
50
48
|
color: string | null;
|
|
49
|
+
classId: string | null;
|
|
51
50
|
startTime: Date;
|
|
52
51
|
endTime: Date;
|
|
52
|
+
location: string | null;
|
|
53
53
|
remarks: string | null;
|
|
54
|
-
}) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
54
|
+
}) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
55
|
+
datasources: {
|
|
56
|
+
db: {
|
|
57
|
+
url: string;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
}>;
|
|
55
61
|
/** @returns Class if user is a teacher. */
|
|
56
62
|
export declare function findClassWithTeachers(classId: string, teacherId: string): import(".prisma/client").Prisma.Prisma__ClassClient<{
|
|
63
|
+
name: string;
|
|
57
64
|
id: string;
|
|
58
65
|
schoolId: string | null;
|
|
59
|
-
name: string;
|
|
60
66
|
subject: string;
|
|
61
67
|
color: string | null;
|
|
62
68
|
section: string;
|
|
63
69
|
syllabus: string | null;
|
|
64
|
-
} | 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
|
+
}>;
|
|
65
77
|
/** Create a calendar event. */
|
|
66
78
|
export declare function createEvent(data: {
|
|
67
79
|
name?: string;
|
|
@@ -73,20 +85,26 @@ export declare function createEvent(data: {
|
|
|
73
85
|
color?: string;
|
|
74
86
|
classId?: string;
|
|
75
87
|
}): import(".prisma/client").Prisma.Prisma__EventClient<{
|
|
88
|
+
name: string | null;
|
|
76
89
|
id: string;
|
|
77
90
|
userId: string | null;
|
|
78
|
-
location: string | null;
|
|
79
|
-
classId: string | null;
|
|
80
91
|
class: {
|
|
81
|
-
id: string;
|
|
82
92
|
name: string;
|
|
93
|
+
id: string;
|
|
83
94
|
} | null;
|
|
84
|
-
name: string | null;
|
|
85
95
|
color: string | null;
|
|
96
|
+
classId: string | null;
|
|
86
97
|
startTime: Date;
|
|
87
98
|
endTime: Date;
|
|
99
|
+
location: string | null;
|
|
88
100
|
remarks: string | null;
|
|
89
|
-
}, 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
|
+
}>;
|
|
90
108
|
/** Update an event. */
|
|
91
109
|
export declare function updateEvent(id: string, data: {
|
|
92
110
|
name?: string;
|
|
@@ -97,28 +115,40 @@ export declare function updateEvent(id: string, data: {
|
|
|
97
115
|
color?: string;
|
|
98
116
|
classId?: string;
|
|
99
117
|
}): import(".prisma/client").Prisma.Prisma__EventClient<{
|
|
118
|
+
name: string | null;
|
|
100
119
|
id: string;
|
|
101
120
|
userId: string | null;
|
|
102
|
-
location: string | null;
|
|
103
|
-
classId: string | null;
|
|
104
|
-
name: string | null;
|
|
105
121
|
color: string | null;
|
|
122
|
+
classId: string | null;
|
|
106
123
|
startTime: Date;
|
|
107
124
|
endTime: Date;
|
|
125
|
+
location: string | null;
|
|
108
126
|
remarks: string | null;
|
|
109
|
-
}, never, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
127
|
+
}, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
128
|
+
datasources: {
|
|
129
|
+
db: {
|
|
130
|
+
url: string;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
}>;
|
|
110
134
|
/** Delete an event. */
|
|
111
135
|
export declare function deleteEventById(id: string): import(".prisma/client").Prisma.Prisma__EventClient<{
|
|
136
|
+
name: string | null;
|
|
112
137
|
id: string;
|
|
113
138
|
userId: string | null;
|
|
114
|
-
location: string | null;
|
|
115
|
-
classId: string | null;
|
|
116
|
-
name: string | null;
|
|
117
139
|
color: string | null;
|
|
140
|
+
classId: string | null;
|
|
118
141
|
startTime: Date;
|
|
119
142
|
endTime: Date;
|
|
143
|
+
location: string | null;
|
|
120
144
|
remarks: string | null;
|
|
121
|
-
}, never, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
145
|
+
}, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
146
|
+
datasources: {
|
|
147
|
+
db: {
|
|
148
|
+
url: string;
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
}>;
|
|
122
152
|
/** @returns Event with class and teachers. */
|
|
123
153
|
export declare function findEventWithClass(eventId: string): import(".prisma/client").Prisma.Prisma__EventClient<({
|
|
124
154
|
class: ({
|
|
@@ -126,25 +156,31 @@ export declare function findEventWithClass(eventId: string): import(".prisma/cli
|
|
|
126
156
|
id: string;
|
|
127
157
|
}[];
|
|
128
158
|
} & {
|
|
159
|
+
name: string;
|
|
129
160
|
id: string;
|
|
130
161
|
schoolId: string | null;
|
|
131
|
-
name: string;
|
|
132
162
|
subject: string;
|
|
133
163
|
color: string | null;
|
|
134
164
|
section: string;
|
|
135
165
|
syllabus: string | null;
|
|
136
166
|
}) | null;
|
|
137
167
|
} & {
|
|
168
|
+
name: string | null;
|
|
138
169
|
id: string;
|
|
139
170
|
userId: string | null;
|
|
140
|
-
location: string | null;
|
|
141
|
-
classId: string | null;
|
|
142
|
-
name: string | null;
|
|
143
171
|
color: string | null;
|
|
172
|
+
classId: string | null;
|
|
144
173
|
startTime: Date;
|
|
145
174
|
endTime: Date;
|
|
175
|
+
location: string | null;
|
|
146
176
|
remarks: string | null;
|
|
147
|
-
}) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
177
|
+
}) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
178
|
+
datasources: {
|
|
179
|
+
db: {
|
|
180
|
+
url: string;
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
}>;
|
|
148
184
|
/** @returns Assignment with class and teachers. */
|
|
149
185
|
export declare function findAssignmentWithClass(assignmentId: string): import(".prisma/client").Prisma.Prisma__AssignmentClient<({
|
|
150
186
|
class: {
|
|
@@ -152,9 +188,9 @@ export declare function findAssignmentWithClass(assignmentId: string): import(".
|
|
|
152
188
|
id: string;
|
|
153
189
|
}[];
|
|
154
190
|
} & {
|
|
191
|
+
name: string;
|
|
155
192
|
id: string;
|
|
156
193
|
schoolId: string | null;
|
|
157
|
-
name: string;
|
|
158
194
|
subject: string;
|
|
159
195
|
color: string | null;
|
|
160
196
|
section: string;
|
|
@@ -164,13 +200,11 @@ export declare function findAssignmentWithClass(assignmentId: string): import(".
|
|
|
164
200
|
type: import(".prisma/client").$Enums.AssignmentType;
|
|
165
201
|
id: string;
|
|
166
202
|
createdAt: Date | null;
|
|
203
|
+
modifiedAt: Date | null;
|
|
167
204
|
classId: string;
|
|
168
205
|
title: string;
|
|
169
|
-
dueDate: Date;
|
|
170
|
-
maxGrade: number | null;
|
|
171
|
-
eventId: string | null;
|
|
172
206
|
instructions: string;
|
|
173
|
-
|
|
207
|
+
dueDate: Date;
|
|
174
208
|
teacherId: string;
|
|
175
209
|
acceptFiles: boolean;
|
|
176
210
|
acceptExtendedResponse: boolean;
|
|
@@ -179,18 +213,26 @@ export declare function findAssignmentWithClass(assignmentId: string): import(".
|
|
|
179
213
|
aiPolicyLevel: number;
|
|
180
214
|
sectionId: string | null;
|
|
181
215
|
graded: boolean;
|
|
216
|
+
maxGrade: number | null;
|
|
182
217
|
weight: number;
|
|
183
218
|
inProgress: boolean;
|
|
184
219
|
template: boolean;
|
|
220
|
+
eventId: string | null;
|
|
185
221
|
markSchemeId: string | null;
|
|
186
222
|
order: number | null;
|
|
187
223
|
gradingBoundaryId: string | null;
|
|
188
|
-
}) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
224
|
+
}) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
225
|
+
datasources: {
|
|
226
|
+
db: {
|
|
227
|
+
url: string;
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
}>;
|
|
189
231
|
/** Attach assignment to an event. */
|
|
190
232
|
export declare function attachAssignmentToEvent(assignmentId: string, eventId: string): import(".prisma/client").Prisma.Prisma__AssignmentClient<{
|
|
191
233
|
section: {
|
|
192
|
-
id: string;
|
|
193
234
|
name: string;
|
|
235
|
+
id: string;
|
|
194
236
|
} | null;
|
|
195
237
|
teacher: {
|
|
196
238
|
id: string;
|
|
@@ -198,20 +240,18 @@ export declare function attachAssignmentToEvent(assignmentId: string, eventId: s
|
|
|
198
240
|
};
|
|
199
241
|
attachments: {
|
|
200
242
|
type: string;
|
|
201
|
-
id: string;
|
|
202
243
|
name: string;
|
|
244
|
+
id: string;
|
|
203
245
|
}[];
|
|
204
246
|
} & {
|
|
205
247
|
type: import(".prisma/client").$Enums.AssignmentType;
|
|
206
248
|
id: string;
|
|
207
249
|
createdAt: Date | null;
|
|
250
|
+
modifiedAt: Date | null;
|
|
208
251
|
classId: string;
|
|
209
252
|
title: string;
|
|
210
|
-
dueDate: Date;
|
|
211
|
-
maxGrade: number | null;
|
|
212
|
-
eventId: string | null;
|
|
213
253
|
instructions: string;
|
|
214
|
-
|
|
254
|
+
dueDate: Date;
|
|
215
255
|
teacherId: string;
|
|
216
256
|
acceptFiles: boolean;
|
|
217
257
|
acceptExtendedResponse: boolean;
|
|
@@ -220,18 +260,26 @@ export declare function attachAssignmentToEvent(assignmentId: string, eventId: s
|
|
|
220
260
|
aiPolicyLevel: number;
|
|
221
261
|
sectionId: string | null;
|
|
222
262
|
graded: boolean;
|
|
263
|
+
maxGrade: number | null;
|
|
223
264
|
weight: number;
|
|
224
265
|
inProgress: boolean;
|
|
225
266
|
template: boolean;
|
|
267
|
+
eventId: string | null;
|
|
226
268
|
markSchemeId: string | null;
|
|
227
269
|
order: number | null;
|
|
228
270
|
gradingBoundaryId: string | null;
|
|
229
|
-
}, never, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
271
|
+
}, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
272
|
+
datasources: {
|
|
273
|
+
db: {
|
|
274
|
+
url: string;
|
|
275
|
+
};
|
|
276
|
+
};
|
|
277
|
+
}>;
|
|
230
278
|
/** Detach assignment from its event. */
|
|
231
279
|
export declare function detachAssignmentFromEvent(assignmentId: string): import(".prisma/client").Prisma.Prisma__AssignmentClient<{
|
|
232
280
|
section: {
|
|
233
|
-
id: string;
|
|
234
281
|
name: string;
|
|
282
|
+
id: string;
|
|
235
283
|
} | null;
|
|
236
284
|
teacher: {
|
|
237
285
|
id: string;
|
|
@@ -239,20 +287,18 @@ export declare function detachAssignmentFromEvent(assignmentId: string): import(
|
|
|
239
287
|
};
|
|
240
288
|
attachments: {
|
|
241
289
|
type: string;
|
|
242
|
-
id: string;
|
|
243
290
|
name: string;
|
|
291
|
+
id: string;
|
|
244
292
|
}[];
|
|
245
293
|
} & {
|
|
246
294
|
type: import(".prisma/client").$Enums.AssignmentType;
|
|
247
295
|
id: string;
|
|
248
296
|
createdAt: Date | null;
|
|
297
|
+
modifiedAt: Date | null;
|
|
249
298
|
classId: string;
|
|
250
299
|
title: string;
|
|
251
|
-
dueDate: Date;
|
|
252
|
-
maxGrade: number | null;
|
|
253
|
-
eventId: string | null;
|
|
254
300
|
instructions: string;
|
|
255
|
-
|
|
301
|
+
dueDate: Date;
|
|
256
302
|
teacherId: string;
|
|
257
303
|
acceptFiles: boolean;
|
|
258
304
|
acceptExtendedResponse: boolean;
|
|
@@ -261,26 +307,34 @@ export declare function detachAssignmentFromEvent(assignmentId: string): import(
|
|
|
261
307
|
aiPolicyLevel: number;
|
|
262
308
|
sectionId: string | null;
|
|
263
309
|
graded: boolean;
|
|
310
|
+
maxGrade: number | null;
|
|
264
311
|
weight: number;
|
|
265
312
|
inProgress: boolean;
|
|
266
313
|
template: boolean;
|
|
314
|
+
eventId: string | null;
|
|
267
315
|
markSchemeId: string | null;
|
|
268
316
|
order: number | null;
|
|
269
317
|
gradingBoundaryId: string | null;
|
|
270
|
-
}, never, import("@prisma/client/runtime/library.js").DefaultArgs,
|
|
318
|
+
}, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
319
|
+
datasources: {
|
|
320
|
+
db: {
|
|
321
|
+
url: string;
|
|
322
|
+
};
|
|
323
|
+
};
|
|
324
|
+
}>;
|
|
271
325
|
/** @returns Assignments not attached to any event. */
|
|
272
326
|
export declare function findAvailableAssignmentsForClass(classId: string): import(".prisma/client").Prisma.PrismaPromise<{
|
|
273
327
|
type: import(".prisma/client").$Enums.AssignmentType;
|
|
274
328
|
id: string;
|
|
275
329
|
section: {
|
|
276
|
-
id: string;
|
|
277
330
|
name: string;
|
|
331
|
+
id: string;
|
|
278
332
|
} | null;
|
|
279
333
|
title: string;
|
|
280
|
-
dueDate: Date;
|
|
281
|
-
maxGrade: number | null;
|
|
282
334
|
instructions: string;
|
|
335
|
+
dueDate: Date;
|
|
283
336
|
graded: boolean;
|
|
337
|
+
maxGrade: number | null;
|
|
284
338
|
weight: number;
|
|
285
339
|
teacher: {
|
|
286
340
|
id: string;
|
|
@@ -288,8 +342,8 @@ export declare function findAvailableAssignmentsForClass(classId: string): impor
|
|
|
288
342
|
};
|
|
289
343
|
attachments: {
|
|
290
344
|
type: string;
|
|
291
|
-
id: string;
|
|
292
345
|
name: string;
|
|
346
|
+
id: string;
|
|
293
347
|
}[];
|
|
294
348
|
}[]>;
|
|
295
349
|
//# sourceMappingURL=event.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event.d.ts","sourceRoot":"/","sources":["models/event.ts"],"names":[],"mappings":"AA4CA,mEAAmE;AACnE,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"event.d.ts","sourceRoot":"/","sources":["models/event.ts"],"names":[],"mappings":"AA4CA,mEAAmE;AACnE,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAKvC;AAED,2CAA2C;AAC3C,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;;;;;;;;;;;;;;GAOvE;AAED,+BAA+B;AAC/B,wBAAgB,WAAW,CAAC,IAAI,EAAE;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,IAAI,CAAC;IAChB,OAAO,EAAE,IAAI,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;;;;;;;;;;;;;;;;;;;;GAKA;AAED,uBAAuB;AACvB,wBAAgB,WAAW,CACzB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE;IACJ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;;;;;;;;;;;;;;;;GAMF;AAED,uBAAuB;AACvB,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;GAIzC;AAED,8CAA8C;AAC9C,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAWjD;AAED,mDAAmD;AACnD,wBAAgB,uBAAuB,CAAC,YAAY,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAW3D;AAED,qCAAqC;AACrC,wBAAgB,uBAAuB,CACrC,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAOhB;AAED,wCAAwC;AACxC,wBAAgB,yBAAyB,CAAC,YAAY,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAM7D;AAED,sDAAsD;AACtD,wBAAgB,gCAAgC,CAAC,OAAO,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;KAqB/D"}
|