@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/services/event.d.ts
CHANGED
|
@@ -11,9 +11,9 @@ export declare function getEvent(userId: string, id: string): Promise<{
|
|
|
11
11
|
schoolId: string | null;
|
|
12
12
|
} | null;
|
|
13
13
|
class: {
|
|
14
|
+
name: string;
|
|
14
15
|
id: string;
|
|
15
16
|
schoolId: string | null;
|
|
16
|
-
name: string;
|
|
17
17
|
subject: string;
|
|
18
18
|
color: string | null;
|
|
19
19
|
section: string;
|
|
@@ -23,14 +23,14 @@ export declare function getEvent(userId: string, id: string): Promise<{
|
|
|
23
23
|
type: import(".prisma/client").$Enums.AssignmentType;
|
|
24
24
|
id: string;
|
|
25
25
|
section: {
|
|
26
|
-
id: string;
|
|
27
26
|
name: string;
|
|
27
|
+
id: string;
|
|
28
28
|
} | null;
|
|
29
29
|
title: string;
|
|
30
|
-
dueDate: Date;
|
|
31
|
-
maxGrade: number | null;
|
|
32
30
|
instructions: string;
|
|
31
|
+
dueDate: Date;
|
|
33
32
|
graded: boolean;
|
|
33
|
+
maxGrade: number | null;
|
|
34
34
|
weight: number;
|
|
35
35
|
teacher: {
|
|
36
36
|
id: string;
|
|
@@ -38,19 +38,19 @@ export declare function getEvent(userId: string, id: string): Promise<{
|
|
|
38
38
|
};
|
|
39
39
|
attachments: {
|
|
40
40
|
type: string;
|
|
41
|
-
id: string;
|
|
42
41
|
name: string;
|
|
42
|
+
id: string;
|
|
43
43
|
}[];
|
|
44
44
|
}[];
|
|
45
45
|
} & {
|
|
46
|
+
name: string | null;
|
|
46
47
|
id: string;
|
|
47
48
|
userId: string | null;
|
|
48
|
-
location: string | null;
|
|
49
|
-
classId: string | null;
|
|
50
|
-
name: string | null;
|
|
51
49
|
color: string | null;
|
|
50
|
+
classId: string | null;
|
|
52
51
|
startTime: Date;
|
|
53
52
|
endTime: Date;
|
|
53
|
+
location: string | null;
|
|
54
54
|
remarks: string | null;
|
|
55
55
|
};
|
|
56
56
|
}>;
|
|
@@ -65,18 +65,18 @@ export declare function createEventRecord(userId: string, input: {
|
|
|
65
65
|
color?: string;
|
|
66
66
|
}): Promise<{
|
|
67
67
|
event: {
|
|
68
|
+
name: string | null;
|
|
68
69
|
id: string;
|
|
69
70
|
userId: string | null;
|
|
70
|
-
location: string | null;
|
|
71
|
-
classId: string | null;
|
|
72
71
|
class: {
|
|
73
|
-
id: string;
|
|
74
72
|
name: string;
|
|
73
|
+
id: string;
|
|
75
74
|
} | null;
|
|
76
|
-
name: string | null;
|
|
77
75
|
color: string | null;
|
|
76
|
+
classId: string | null;
|
|
78
77
|
startTime: Date;
|
|
79
78
|
endTime: Date;
|
|
79
|
+
location: string | null;
|
|
80
80
|
remarks: string | null;
|
|
81
81
|
};
|
|
82
82
|
}>;
|
|
@@ -90,14 +90,14 @@ export declare function updateEventRecord(userId: string, id: string, data: {
|
|
|
90
90
|
classId?: string;
|
|
91
91
|
}): Promise<{
|
|
92
92
|
event: {
|
|
93
|
+
name: string | null;
|
|
93
94
|
id: string;
|
|
94
95
|
userId: string | null;
|
|
95
|
-
location: string | null;
|
|
96
|
-
classId: string | null;
|
|
97
|
-
name: string | null;
|
|
98
96
|
color: string | null;
|
|
97
|
+
classId: string | null;
|
|
99
98
|
startTime: Date;
|
|
100
99
|
endTime: Date;
|
|
100
|
+
location: string | null;
|
|
101
101
|
remarks: string | null;
|
|
102
102
|
};
|
|
103
103
|
}>;
|
|
@@ -107,8 +107,8 @@ export declare function deleteEventRecord(userId: string, id: string): Promise<{
|
|
|
107
107
|
export declare function attachAssignment(userId: string, eventId: string, assignmentId: string): Promise<{
|
|
108
108
|
assignment: {
|
|
109
109
|
section: {
|
|
110
|
-
id: string;
|
|
111
110
|
name: string;
|
|
111
|
+
id: string;
|
|
112
112
|
} | null;
|
|
113
113
|
teacher: {
|
|
114
114
|
id: string;
|
|
@@ -116,20 +116,18 @@ export declare function attachAssignment(userId: string, eventId: string, assign
|
|
|
116
116
|
};
|
|
117
117
|
attachments: {
|
|
118
118
|
type: string;
|
|
119
|
-
id: string;
|
|
120
119
|
name: string;
|
|
120
|
+
id: string;
|
|
121
121
|
}[];
|
|
122
122
|
} & {
|
|
123
123
|
type: import(".prisma/client").$Enums.AssignmentType;
|
|
124
124
|
id: string;
|
|
125
125
|
createdAt: Date | null;
|
|
126
|
+
modifiedAt: Date | null;
|
|
126
127
|
classId: string;
|
|
127
128
|
title: string;
|
|
128
|
-
dueDate: Date;
|
|
129
|
-
maxGrade: number | null;
|
|
130
|
-
eventId: string | null;
|
|
131
129
|
instructions: string;
|
|
132
|
-
|
|
130
|
+
dueDate: Date;
|
|
133
131
|
teacherId: string;
|
|
134
132
|
acceptFiles: boolean;
|
|
135
133
|
acceptExtendedResponse: boolean;
|
|
@@ -138,9 +136,11 @@ export declare function attachAssignment(userId: string, eventId: string, assign
|
|
|
138
136
|
aiPolicyLevel: number;
|
|
139
137
|
sectionId: string | null;
|
|
140
138
|
graded: boolean;
|
|
139
|
+
maxGrade: number | null;
|
|
141
140
|
weight: number;
|
|
142
141
|
inProgress: boolean;
|
|
143
142
|
template: boolean;
|
|
143
|
+
eventId: string | null;
|
|
144
144
|
markSchemeId: string | null;
|
|
145
145
|
order: number | null;
|
|
146
146
|
gradingBoundaryId: string | null;
|
|
@@ -149,8 +149,8 @@ export declare function attachAssignment(userId: string, eventId: string, assign
|
|
|
149
149
|
export declare function detachAssignment(userId: string, eventId: string, assignmentId: string): Promise<{
|
|
150
150
|
assignment: {
|
|
151
151
|
section: {
|
|
152
|
-
id: string;
|
|
153
152
|
name: string;
|
|
153
|
+
id: string;
|
|
154
154
|
} | null;
|
|
155
155
|
teacher: {
|
|
156
156
|
id: string;
|
|
@@ -158,20 +158,18 @@ export declare function detachAssignment(userId: string, eventId: string, assign
|
|
|
158
158
|
};
|
|
159
159
|
attachments: {
|
|
160
160
|
type: string;
|
|
161
|
-
id: string;
|
|
162
161
|
name: string;
|
|
162
|
+
id: string;
|
|
163
163
|
}[];
|
|
164
164
|
} & {
|
|
165
165
|
type: import(".prisma/client").$Enums.AssignmentType;
|
|
166
166
|
id: string;
|
|
167
167
|
createdAt: Date | null;
|
|
168
|
+
modifiedAt: Date | null;
|
|
168
169
|
classId: string;
|
|
169
170
|
title: string;
|
|
170
|
-
dueDate: Date;
|
|
171
|
-
maxGrade: number | null;
|
|
172
|
-
eventId: string | null;
|
|
173
171
|
instructions: string;
|
|
174
|
-
|
|
172
|
+
dueDate: Date;
|
|
175
173
|
teacherId: string;
|
|
176
174
|
acceptFiles: boolean;
|
|
177
175
|
acceptExtendedResponse: boolean;
|
|
@@ -180,9 +178,11 @@ export declare function detachAssignment(userId: string, eventId: string, assign
|
|
|
180
178
|
aiPolicyLevel: number;
|
|
181
179
|
sectionId: string | null;
|
|
182
180
|
graded: boolean;
|
|
181
|
+
maxGrade: number | null;
|
|
183
182
|
weight: number;
|
|
184
183
|
inProgress: boolean;
|
|
185
184
|
template: boolean;
|
|
185
|
+
eventId: string | null;
|
|
186
186
|
markSchemeId: string | null;
|
|
187
187
|
order: number | null;
|
|
188
188
|
gradingBoundaryId: string | null;
|
|
@@ -193,14 +193,14 @@ export declare function getAvailableAssignments(userId: string, eventId: string)
|
|
|
193
193
|
type: import(".prisma/client").$Enums.AssignmentType;
|
|
194
194
|
id: string;
|
|
195
195
|
section: {
|
|
196
|
-
id: string;
|
|
197
196
|
name: string;
|
|
197
|
+
id: string;
|
|
198
198
|
} | null;
|
|
199
199
|
title: string;
|
|
200
|
-
dueDate: Date;
|
|
201
|
-
maxGrade: number | null;
|
|
202
200
|
instructions: string;
|
|
201
|
+
dueDate: Date;
|
|
203
202
|
graded: boolean;
|
|
203
|
+
maxGrade: number | null;
|
|
204
204
|
weight: number;
|
|
205
205
|
teacher: {
|
|
206
206
|
id: string;
|
|
@@ -208,8 +208,8 @@ export declare function getAvailableAssignments(userId: string, eventId: string)
|
|
|
208
208
|
};
|
|
209
209
|
attachments: {
|
|
210
210
|
type: string;
|
|
211
|
-
id: string;
|
|
212
211
|
name: string;
|
|
212
|
+
id: string;
|
|
213
213
|
}[];
|
|
214
214
|
}[];
|
|
215
215
|
}>;
|
package/dist/services/file.d.ts
CHANGED
|
@@ -10,15 +10,11 @@ export declare function moveFile(fileId: string, targetFolderId: string): Promis
|
|
|
10
10
|
} & {
|
|
11
11
|
path: string;
|
|
12
12
|
type: string;
|
|
13
|
-
id: string;
|
|
14
|
-
userId: string | null;
|
|
15
13
|
name: string;
|
|
14
|
+
id: string;
|
|
16
15
|
size: number | null;
|
|
16
|
+
userId: string | null;
|
|
17
17
|
uploadedAt: Date | null;
|
|
18
|
-
assignmentId: string | null;
|
|
19
|
-
submissionId: string | null;
|
|
20
|
-
thumbnailId: string | null;
|
|
21
|
-
annotationId: string | null;
|
|
22
18
|
uploadStatus: import(".prisma/client").$Enums.UploadStatus;
|
|
23
19
|
uploadUrl: string | null;
|
|
24
20
|
uploadExpiresAt: Date | null;
|
|
@@ -28,6 +24,10 @@ export declare function moveFile(fileId: string, targetFolderId: string): Promis
|
|
|
28
24
|
uploadRetryCount: number;
|
|
29
25
|
isOrphaned: boolean;
|
|
30
26
|
cleanupAt: Date | null;
|
|
27
|
+
thumbnailId: string | null;
|
|
28
|
+
assignmentId: string | null;
|
|
29
|
+
submissionId: string | null;
|
|
30
|
+
annotationId: string | null;
|
|
31
31
|
classDraftId: string | null;
|
|
32
32
|
folderId: string | null;
|
|
33
33
|
conversationId: string | null;
|
|
@@ -43,15 +43,11 @@ export declare function renameFile(fileId: string, newName: string): Promise<{
|
|
|
43
43
|
} & {
|
|
44
44
|
path: string;
|
|
45
45
|
type: string;
|
|
46
|
-
id: string;
|
|
47
|
-
userId: string | null;
|
|
48
46
|
name: string;
|
|
47
|
+
id: string;
|
|
49
48
|
size: number | null;
|
|
49
|
+
userId: string | null;
|
|
50
50
|
uploadedAt: Date | null;
|
|
51
|
-
assignmentId: string | null;
|
|
52
|
-
submissionId: string | null;
|
|
53
|
-
thumbnailId: string | null;
|
|
54
|
-
annotationId: string | null;
|
|
55
51
|
uploadStatus: import(".prisma/client").$Enums.UploadStatus;
|
|
56
52
|
uploadUrl: string | null;
|
|
57
53
|
uploadExpiresAt: Date | null;
|
|
@@ -61,6 +57,10 @@ export declare function renameFile(fileId: string, newName: string): Promise<{
|
|
|
61
57
|
uploadRetryCount: number;
|
|
62
58
|
isOrphaned: boolean;
|
|
63
59
|
cleanupAt: Date | null;
|
|
60
|
+
thumbnailId: string | null;
|
|
61
|
+
assignmentId: string | null;
|
|
62
|
+
submissionId: string | null;
|
|
63
|
+
annotationId: string | null;
|
|
64
64
|
classDraftId: string | null;
|
|
65
65
|
folderId: string | null;
|
|
66
66
|
conversationId: string | null;
|
|
@@ -7,133 +7,134 @@ export declare function createFolderRecord(userId: string, input: {
|
|
|
7
7
|
}): Promise<{
|
|
8
8
|
files: {
|
|
9
9
|
type: string;
|
|
10
|
+
name: string;
|
|
11
|
+
id: string;
|
|
12
|
+
size: number | null;
|
|
13
|
+
uploadedAt: Date | null;
|
|
10
14
|
user: {
|
|
11
15
|
id: string;
|
|
12
16
|
username: string;
|
|
13
17
|
} | null;
|
|
14
|
-
id: string;
|
|
15
|
-
name: string;
|
|
16
|
-
size: number | null;
|
|
17
|
-
uploadedAt: Date | null;
|
|
18
18
|
}[];
|
|
19
19
|
childFolders: {
|
|
20
|
+
name: string;
|
|
20
21
|
id: string;
|
|
21
22
|
_count: {
|
|
22
23
|
files: number;
|
|
23
24
|
childFolders: number;
|
|
24
25
|
};
|
|
25
|
-
name: string;
|
|
26
26
|
color: string | null;
|
|
27
27
|
}[];
|
|
28
28
|
} & {
|
|
29
|
-
id: string;
|
|
30
|
-
classId: string | null;
|
|
31
29
|
name: string;
|
|
30
|
+
id: string;
|
|
32
31
|
color: string | null;
|
|
32
|
+
classId: string | null;
|
|
33
33
|
parentFolderId: string | null;
|
|
34
34
|
}>;
|
|
35
35
|
/** Get folder with its contents (subfolders and files). */
|
|
36
36
|
export declare function getFolder(folderId: string): Promise<{
|
|
37
37
|
files: {
|
|
38
38
|
type: string;
|
|
39
|
+
name: string;
|
|
40
|
+
id: string;
|
|
41
|
+
size: number | null;
|
|
42
|
+
uploadedAt: Date | null;
|
|
39
43
|
user: {
|
|
40
44
|
id: string;
|
|
41
45
|
username: string;
|
|
42
46
|
} | null;
|
|
43
|
-
id: string;
|
|
44
|
-
name: string;
|
|
45
|
-
size: number | null;
|
|
46
|
-
uploadedAt: Date | null;
|
|
47
47
|
}[];
|
|
48
48
|
childFolders: {
|
|
49
|
+
name: string;
|
|
49
50
|
id: string;
|
|
50
51
|
_count: {
|
|
51
52
|
files: number;
|
|
52
53
|
childFolders: number;
|
|
53
54
|
};
|
|
54
|
-
name: string;
|
|
55
55
|
color: string | null;
|
|
56
56
|
}[];
|
|
57
57
|
parentFolder: {
|
|
58
|
-
id: string;
|
|
59
58
|
name: string;
|
|
59
|
+
id: string;
|
|
60
60
|
} | null;
|
|
61
61
|
} & {
|
|
62
|
-
id: string;
|
|
63
|
-
classId: string | null;
|
|
64
62
|
name: string;
|
|
63
|
+
id: string;
|
|
65
64
|
color: string | null;
|
|
65
|
+
classId: string | null;
|
|
66
66
|
parentFolderId: string | null;
|
|
67
67
|
}>;
|
|
68
68
|
export declare function getChildFolders(classId: string): Promise<({
|
|
69
69
|
files: {
|
|
70
70
|
type: string;
|
|
71
|
+
name: string;
|
|
72
|
+
id: string;
|
|
73
|
+
size: number | null;
|
|
74
|
+
uploadedAt: Date | null;
|
|
71
75
|
user: {
|
|
72
76
|
id: string;
|
|
73
77
|
username: string;
|
|
74
78
|
} | null;
|
|
75
|
-
id: string;
|
|
76
|
-
name: string;
|
|
77
|
-
size: number | null;
|
|
78
|
-
uploadedAt: Date | null;
|
|
79
79
|
}[];
|
|
80
80
|
childFolders: {
|
|
81
|
+
name: string;
|
|
81
82
|
id: string;
|
|
82
83
|
_count: {
|
|
83
84
|
files: number;
|
|
84
85
|
childFolders: number;
|
|
85
86
|
};
|
|
86
|
-
name: string;
|
|
87
87
|
color: string | null;
|
|
88
88
|
}[];
|
|
89
89
|
} & {
|
|
90
|
-
id: string;
|
|
91
|
-
classId: string | null;
|
|
92
90
|
name: string;
|
|
91
|
+
id: string;
|
|
93
92
|
color: string | null;
|
|
93
|
+
classId: string | null;
|
|
94
94
|
parentFolderId: string | null;
|
|
95
95
|
})[]>;
|
|
96
96
|
export declare function getFolderChildren(folderId: string, classId: string): Promise<({
|
|
97
97
|
files: {
|
|
98
98
|
type: string;
|
|
99
|
+
name: string;
|
|
100
|
+
id: string;
|
|
101
|
+
size: number | null;
|
|
102
|
+
uploadedAt: Date | null;
|
|
99
103
|
user: {
|
|
100
104
|
id: string;
|
|
101
105
|
username: string;
|
|
102
106
|
} | null;
|
|
103
|
-
id: string;
|
|
104
|
-
name: string;
|
|
105
|
-
size: number | null;
|
|
106
|
-
uploadedAt: Date | null;
|
|
107
107
|
}[];
|
|
108
108
|
childFolders: {
|
|
109
|
+
name: string;
|
|
109
110
|
id: string;
|
|
110
111
|
_count: {
|
|
111
112
|
files: number;
|
|
112
113
|
childFolders: number;
|
|
113
114
|
};
|
|
114
|
-
name: string;
|
|
115
115
|
color: string | null;
|
|
116
116
|
}[];
|
|
117
117
|
} & {
|
|
118
|
-
id: string;
|
|
119
|
-
classId: string | null;
|
|
120
118
|
name: string;
|
|
119
|
+
id: string;
|
|
121
120
|
color: string | null;
|
|
121
|
+
classId: string | null;
|
|
122
122
|
parentFolderId: string | null;
|
|
123
123
|
})[]>;
|
|
124
124
|
export declare function getRootFolder(classId: string): Promise<{
|
|
125
125
|
files: {
|
|
126
126
|
type: string;
|
|
127
|
+
name: string;
|
|
128
|
+
id: string;
|
|
129
|
+
size: number | null;
|
|
130
|
+
uploadedAt: Date | null;
|
|
127
131
|
user: {
|
|
128
132
|
id: string;
|
|
129
133
|
username: string;
|
|
130
134
|
} | null;
|
|
131
|
-
id: string;
|
|
132
|
-
name: string;
|
|
133
|
-
size: number | null;
|
|
134
|
-
uploadedAt: Date | null;
|
|
135
135
|
}[];
|
|
136
136
|
childFolders: {
|
|
137
|
+
name: string;
|
|
137
138
|
id: string;
|
|
138
139
|
files: {
|
|
139
140
|
id: string;
|
|
@@ -142,17 +143,16 @@ export declare function getRootFolder(classId: string): Promise<{
|
|
|
142
143
|
files: number;
|
|
143
144
|
childFolders: number;
|
|
144
145
|
};
|
|
145
|
-
name: string;
|
|
146
146
|
color: string | null;
|
|
147
147
|
childFolders: {
|
|
148
148
|
id: string;
|
|
149
149
|
}[];
|
|
150
150
|
}[];
|
|
151
151
|
} & {
|
|
152
|
-
id: string;
|
|
153
|
-
classId: string | null;
|
|
154
152
|
name: string;
|
|
153
|
+
id: string;
|
|
155
154
|
color: string | null;
|
|
155
|
+
classId: string | null;
|
|
156
156
|
parentFolderId: string | null;
|
|
157
157
|
}>;
|
|
158
158
|
export declare function uploadFilesToFolder(userId: string, classId: string, folderId: string, files: {
|
|
@@ -171,64 +171,64 @@ export declare function deleteFolderRecord(userId: string, classId: string, fold
|
|
|
171
171
|
export declare function moveFolder(userId: string, folderId: string, targetParentFolderId: string, classId: string): Promise<{
|
|
172
172
|
files: {
|
|
173
173
|
type: string;
|
|
174
|
+
name: string;
|
|
175
|
+
id: string;
|
|
176
|
+
size: number | null;
|
|
177
|
+
uploadedAt: Date | null;
|
|
174
178
|
user: {
|
|
175
179
|
id: string;
|
|
176
180
|
username: string;
|
|
177
181
|
} | null;
|
|
178
|
-
id: string;
|
|
179
|
-
name: string;
|
|
180
|
-
size: number | null;
|
|
181
|
-
uploadedAt: Date | null;
|
|
182
182
|
}[];
|
|
183
183
|
childFolders: {
|
|
184
|
+
name: string;
|
|
184
185
|
id: string;
|
|
185
186
|
_count: {
|
|
186
187
|
files: number;
|
|
187
188
|
childFolders: number;
|
|
188
189
|
};
|
|
189
|
-
name: string;
|
|
190
190
|
color: string | null;
|
|
191
191
|
}[];
|
|
192
192
|
} & {
|
|
193
|
-
id: string;
|
|
194
|
-
classId: string | null;
|
|
195
193
|
name: string;
|
|
194
|
+
id: string;
|
|
196
195
|
color: string | null;
|
|
196
|
+
classId: string | null;
|
|
197
197
|
parentFolderId: string | null;
|
|
198
198
|
}>;
|
|
199
199
|
export declare function updateFolderRecord(folderId: string, name: string, color: string | undefined, classId: string): Promise<{
|
|
200
200
|
files: {
|
|
201
201
|
type: string;
|
|
202
|
+
name: string;
|
|
203
|
+
id: string;
|
|
204
|
+
size: number | null;
|
|
205
|
+
uploadedAt: Date | null;
|
|
202
206
|
user: {
|
|
203
207
|
id: string;
|
|
204
208
|
username: string;
|
|
205
209
|
} | null;
|
|
206
|
-
id: string;
|
|
207
|
-
name: string;
|
|
208
|
-
size: number | null;
|
|
209
|
-
uploadedAt: Date | null;
|
|
210
210
|
}[];
|
|
211
211
|
childFolders: {
|
|
212
|
+
name: string;
|
|
212
213
|
id: string;
|
|
213
214
|
_count: {
|
|
214
215
|
files: number;
|
|
215
216
|
childFolders: number;
|
|
216
217
|
};
|
|
217
|
-
name: string;
|
|
218
218
|
color: string | null;
|
|
219
219
|
}[];
|
|
220
220
|
} & {
|
|
221
|
-
id: string;
|
|
222
|
-
classId: string | null;
|
|
223
221
|
name: string;
|
|
222
|
+
id: string;
|
|
224
223
|
color: string | null;
|
|
224
|
+
classId: string | null;
|
|
225
225
|
parentFolderId: string | null;
|
|
226
226
|
}>;
|
|
227
227
|
export declare function getFolderParents(folderId: string): Promise<({
|
|
228
|
-
id: string;
|
|
229
|
-
classId: string | null;
|
|
230
228
|
name: string;
|
|
229
|
+
id: string;
|
|
231
230
|
color: string | null;
|
|
231
|
+
classId: string | null;
|
|
232
232
|
parentFolderId: string | null;
|
|
233
233
|
} | null)[]>;
|
|
234
234
|
export declare function getFolderUploadUrls(userId: string, classId: string, folderId: string, files: {
|
|
@@ -5,8 +5,8 @@ export declare function createLabChat(userId: string, input: {
|
|
|
5
5
|
context: string;
|
|
6
6
|
}): Promise<{
|
|
7
7
|
class: {
|
|
8
|
-
id: string;
|
|
9
8
|
name: string;
|
|
9
|
+
id: string;
|
|
10
10
|
subject: string;
|
|
11
11
|
section: string;
|
|
12
12
|
};
|
|
@@ -22,19 +22,19 @@ export declare function createLabChat(userId: string, input: {
|
|
|
22
22
|
};
|
|
23
23
|
} & {
|
|
24
24
|
id: string;
|
|
25
|
-
role: import(".prisma/client").$Enums.ConversationRole;
|
|
26
25
|
userId: string;
|
|
27
26
|
conversationId: string;
|
|
27
|
+
role: import(".prisma/client").$Enums.ConversationRole;
|
|
28
28
|
joinedAt: Date;
|
|
29
29
|
lastViewedAt: Date | null;
|
|
30
30
|
lastViewedMentionAt: Date | null;
|
|
31
31
|
})[];
|
|
32
32
|
} & {
|
|
33
33
|
type: import(".prisma/client").$Enums.ConversationType;
|
|
34
|
+
name: string | null;
|
|
34
35
|
id: string;
|
|
35
36
|
createdAt: Date;
|
|
36
37
|
updatedAt: Date;
|
|
37
|
-
name: string | null;
|
|
38
38
|
displayInChat: boolean;
|
|
39
39
|
};
|
|
40
40
|
createdBy: {
|
|
@@ -47,18 +47,18 @@ export declare function createLabChat(userId: string, input: {
|
|
|
47
47
|
} & {
|
|
48
48
|
context: string;
|
|
49
49
|
id: string;
|
|
50
|
+
conversationId: string;
|
|
50
51
|
createdAt: Date;
|
|
51
|
-
updatedAt: Date;
|
|
52
52
|
classId: string;
|
|
53
53
|
title: string;
|
|
54
|
-
|
|
54
|
+
updatedAt: Date;
|
|
55
55
|
createdById: string;
|
|
56
56
|
}>;
|
|
57
57
|
export declare function getLabChat(userId: string, labChatId: string): Promise<{
|
|
58
58
|
pendingGenerationMessageId: string | null;
|
|
59
59
|
class: {
|
|
60
|
-
id: string;
|
|
61
60
|
name: string;
|
|
61
|
+
id: string;
|
|
62
62
|
subject: string;
|
|
63
63
|
section: string;
|
|
64
64
|
};
|
|
@@ -74,19 +74,19 @@ export declare function getLabChat(userId: string, labChatId: string): Promise<{
|
|
|
74
74
|
};
|
|
75
75
|
} & {
|
|
76
76
|
id: string;
|
|
77
|
-
role: import(".prisma/client").$Enums.ConversationRole;
|
|
78
77
|
userId: string;
|
|
79
78
|
conversationId: string;
|
|
79
|
+
role: import(".prisma/client").$Enums.ConversationRole;
|
|
80
80
|
joinedAt: Date;
|
|
81
81
|
lastViewedAt: Date | null;
|
|
82
82
|
lastViewedMentionAt: Date | null;
|
|
83
83
|
})[];
|
|
84
84
|
} & {
|
|
85
85
|
type: import(".prisma/client").$Enums.ConversationType;
|
|
86
|
+
name: string | null;
|
|
86
87
|
id: string;
|
|
87
88
|
createdAt: Date;
|
|
88
89
|
updatedAt: Date;
|
|
89
|
-
name: string | null;
|
|
90
90
|
displayInChat: boolean;
|
|
91
91
|
};
|
|
92
92
|
createdBy: {
|
|
@@ -99,11 +99,11 @@ export declare function getLabChat(userId: string, labChatId: string): Promise<{
|
|
|
99
99
|
};
|
|
100
100
|
context: string;
|
|
101
101
|
id: string;
|
|
102
|
+
conversationId: string;
|
|
102
103
|
createdAt: Date;
|
|
103
|
-
updatedAt: Date;
|
|
104
104
|
classId: string;
|
|
105
105
|
title: string;
|
|
106
|
-
|
|
106
|
+
updatedAt: Date;
|
|
107
107
|
createdById: string;
|
|
108
108
|
}>;
|
|
109
109
|
export declare function listLabChats(userId: string, classId: string): Promise<{
|
|
@@ -130,11 +130,11 @@ export declare function listLabChats(userId: string, classId: string): Promise<{
|
|
|
130
130
|
};
|
|
131
131
|
} & {
|
|
132
132
|
status: import(".prisma/client").$Enums.GenerationStatus | null;
|
|
133
|
+
meta: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
133
134
|
id: string;
|
|
135
|
+
conversationId: string;
|
|
134
136
|
createdAt: Date;
|
|
135
|
-
meta: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
136
137
|
content: string;
|
|
137
|
-
conversationId: string;
|
|
138
138
|
senderId: string;
|
|
139
139
|
};
|
|
140
140
|
messageCount: number;
|
|
@@ -22,10 +22,10 @@ export declare function createSchoolDevelopmentProgramRecord(input: {
|
|
|
22
22
|
export declare function searchSchoolDevelopmentPrograms(id: string): Promise<{
|
|
23
23
|
type: string;
|
|
24
24
|
status: string;
|
|
25
|
-
id: string;
|
|
26
|
-
website: string | null;
|
|
27
25
|
name: string;
|
|
26
|
+
id: string;
|
|
28
27
|
submittedAt: Date | null;
|
|
28
|
+
website: string | null;
|
|
29
29
|
address: string;
|
|
30
30
|
city: string;
|
|
31
31
|
country: string;
|
|
@@ -11,9 +11,9 @@ export declare function listNotifications(userId: string): Promise<({
|
|
|
11
11
|
createdAt: Date;
|
|
12
12
|
title: string;
|
|
13
13
|
content: string;
|
|
14
|
-
read: boolean;
|
|
15
14
|
senderId: string | null;
|
|
16
15
|
receiverId: string;
|
|
16
|
+
read: boolean;
|
|
17
17
|
})[]>;
|
|
18
18
|
/** Get a single notification by ID. */
|
|
19
19
|
export declare function getNotification(id: string): Promise<({
|
|
@@ -28,9 +28,9 @@ export declare function getNotification(id: string): Promise<({
|
|
|
28
28
|
createdAt: Date;
|
|
29
29
|
title: string;
|
|
30
30
|
content: string;
|
|
31
|
-
read: boolean;
|
|
32
31
|
senderId: string | null;
|
|
33
32
|
receiverId: string;
|
|
33
|
+
read: boolean;
|
|
34
34
|
}) | null>;
|
|
35
35
|
/** Send a notification to one user. */
|
|
36
36
|
export declare function sendNotification(input: {
|
|
@@ -42,9 +42,9 @@ export declare function sendNotification(input: {
|
|
|
42
42
|
createdAt: Date;
|
|
43
43
|
title: string;
|
|
44
44
|
content: string;
|
|
45
|
-
read: boolean;
|
|
46
45
|
senderId: string | null;
|
|
47
46
|
receiverId: string;
|
|
47
|
+
read: boolean;
|
|
48
48
|
}>;
|
|
49
49
|
/** Send the same notification to multiple users. */
|
|
50
50
|
export declare function sendToMultiple(input: {
|
|
@@ -58,8 +58,8 @@ export declare function markAsRead(id: string): Promise<{
|
|
|
58
58
|
createdAt: Date;
|
|
59
59
|
title: string;
|
|
60
60
|
content: string;
|
|
61
|
-
read: boolean;
|
|
62
61
|
senderId: string | null;
|
|
63
62
|
receiverId: string;
|
|
63
|
+
read: boolean;
|
|
64
64
|
}>;
|
|
65
65
|
//# sourceMappingURL=notification.d.ts.map
|