@studious-lms/server 1.1.10 → 1.1.12
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/LAB_CHAT_API_SPEC.md +518 -0
- package/dist/routers/_app.d.ts +480 -0
- package/dist/routers/_app.d.ts.map +1 -1
- package/dist/routers/_app.js +2 -0
- package/dist/routers/assignment.d.ts +10 -0
- package/dist/routers/assignment.d.ts.map +1 -1
- package/dist/routers/assignment.js +21 -0
- package/dist/routers/attendance.d.ts +15 -0
- package/dist/routers/attendance.d.ts.map +1 -1
- package/dist/routers/attendance.js +32 -0
- package/dist/routers/class.d.ts +10 -0
- package/dist/routers/class.d.ts.map +1 -1
- package/dist/routers/class.js +14 -0
- package/dist/routers/labChat.d.ts +207 -0
- package/dist/routers/labChat.d.ts.map +1 -0
- package/dist/routers/labChat.js +500 -0
- package/package.json +1 -1
- package/prisma/migrations/20250925072732_add_lab_chat_system/migration.sql +25 -0
- package/prisma/schema.prisma +18 -0
- package/src/routers/_app.ts +2 -0
- package/src/routers/assignment.ts +21 -0
- package/src/routers/attendance.ts +32 -0
- package/src/routers/class.ts +14 -0
- package/src/routers/labChat.ts +541 -0
|
@@ -1003,6 +1003,13 @@ export const assignmentRouter = createTRPCRouter({
|
|
|
1003
1003
|
select: {
|
|
1004
1004
|
id: true,
|
|
1005
1005
|
username: true,
|
|
1006
|
+
profile: {
|
|
1007
|
+
select: {
|
|
1008
|
+
displayName: true,
|
|
1009
|
+
profilePicture: true,
|
|
1010
|
+
profilePictureThumbnail: true,
|
|
1011
|
+
},
|
|
1012
|
+
},
|
|
1006
1013
|
},
|
|
1007
1014
|
},
|
|
1008
1015
|
assignment: {
|
|
@@ -1099,6 +1106,13 @@ export const assignmentRouter = createTRPCRouter({
|
|
|
1099
1106
|
select: {
|
|
1100
1107
|
id: true,
|
|
1101
1108
|
username: true,
|
|
1109
|
+
profile: {
|
|
1110
|
+
select: {
|
|
1111
|
+
displayName: true,
|
|
1112
|
+
profilePicture: true,
|
|
1113
|
+
profilePictureThumbnail: true,
|
|
1114
|
+
},
|
|
1115
|
+
},
|
|
1102
1116
|
},
|
|
1103
1117
|
},
|
|
1104
1118
|
assignment: {
|
|
@@ -1207,6 +1221,13 @@ export const assignmentRouter = createTRPCRouter({
|
|
|
1207
1221
|
select: {
|
|
1208
1222
|
id: true,
|
|
1209
1223
|
username: true,
|
|
1224
|
+
profile: {
|
|
1225
|
+
select: {
|
|
1226
|
+
displayName: true,
|
|
1227
|
+
profilePicture: true,
|
|
1228
|
+
profilePictureThumbnail: true,
|
|
1229
|
+
},
|
|
1230
|
+
},
|
|
1210
1231
|
},
|
|
1211
1232
|
},
|
|
1212
1233
|
assignment: {
|
|
@@ -33,14 +33,29 @@ export declare const attendanceRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
33
33
|
late: {
|
|
34
34
|
id: string;
|
|
35
35
|
username: string;
|
|
36
|
+
profile: {
|
|
37
|
+
displayName: string | null;
|
|
38
|
+
profilePicture: string | null;
|
|
39
|
+
profilePictureThumbnail: string | null;
|
|
40
|
+
} | null;
|
|
36
41
|
}[];
|
|
37
42
|
present: {
|
|
38
43
|
id: string;
|
|
39
44
|
username: string;
|
|
45
|
+
profile: {
|
|
46
|
+
displayName: string | null;
|
|
47
|
+
profilePicture: string | null;
|
|
48
|
+
profilePictureThumbnail: string | null;
|
|
49
|
+
} | null;
|
|
40
50
|
}[];
|
|
41
51
|
absent: {
|
|
42
52
|
id: string;
|
|
43
53
|
username: string;
|
|
54
|
+
profile: {
|
|
55
|
+
displayName: string | null;
|
|
56
|
+
profilePicture: string | null;
|
|
57
|
+
profilePictureThumbnail: string | null;
|
|
58
|
+
} | null;
|
|
44
59
|
}[];
|
|
45
60
|
} & {
|
|
46
61
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attendance.d.ts","sourceRoot":"","sources":["../../src/routers/attendance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"attendance.d.ts","sourceRoot":"","sources":["../../src/routers/attendance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+S3B,CAAC"}
|
|
@@ -46,6 +46,17 @@ export const attendanceRouter = createTRPCRouter({
|
|
|
46
46
|
students: {
|
|
47
47
|
select: {
|
|
48
48
|
id: true,
|
|
49
|
+
username: true,
|
|
50
|
+
profile: {
|
|
51
|
+
select: {
|
|
52
|
+
displayName: true,
|
|
53
|
+
profilePicture: true,
|
|
54
|
+
profilePictureThumbnail: true,
|
|
55
|
+
bio: true,
|
|
56
|
+
location: true,
|
|
57
|
+
website: true,
|
|
58
|
+
},
|
|
59
|
+
},
|
|
49
60
|
},
|
|
50
61
|
},
|
|
51
62
|
},
|
|
@@ -108,18 +119,39 @@ export const attendanceRouter = createTRPCRouter({
|
|
|
108
119
|
select: {
|
|
109
120
|
id: true,
|
|
110
121
|
username: true,
|
|
122
|
+
profile: {
|
|
123
|
+
select: {
|
|
124
|
+
displayName: true,
|
|
125
|
+
profilePicture: true,
|
|
126
|
+
profilePictureThumbnail: true,
|
|
127
|
+
},
|
|
128
|
+
},
|
|
111
129
|
},
|
|
112
130
|
},
|
|
113
131
|
late: {
|
|
114
132
|
select: {
|
|
115
133
|
id: true,
|
|
116
134
|
username: true,
|
|
135
|
+
profile: {
|
|
136
|
+
select: {
|
|
137
|
+
displayName: true,
|
|
138
|
+
profilePicture: true,
|
|
139
|
+
profilePictureThumbnail: true,
|
|
140
|
+
},
|
|
141
|
+
},
|
|
117
142
|
},
|
|
118
143
|
},
|
|
119
144
|
absent: {
|
|
120
145
|
select: {
|
|
121
146
|
id: true,
|
|
122
147
|
username: true,
|
|
148
|
+
profile: {
|
|
149
|
+
select: {
|
|
150
|
+
displayName: true,
|
|
151
|
+
profilePicture: true,
|
|
152
|
+
profilePictureThumbnail: true,
|
|
153
|
+
},
|
|
154
|
+
},
|
|
123
155
|
},
|
|
124
156
|
},
|
|
125
157
|
},
|
package/dist/routers/class.d.ts
CHANGED
|
@@ -114,12 +114,22 @@ export declare const classRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
114
114
|
teacher: {
|
|
115
115
|
id: string;
|
|
116
116
|
username: string;
|
|
117
|
+
profile: {
|
|
118
|
+
displayName: string | null;
|
|
119
|
+
profilePicture: string | null;
|
|
120
|
+
profilePictureThumbnail: string | null;
|
|
121
|
+
} | null;
|
|
117
122
|
};
|
|
118
123
|
createdAt: Date;
|
|
119
124
|
}[];
|
|
120
125
|
students: {
|
|
121
126
|
id: string;
|
|
122
127
|
username: string;
|
|
128
|
+
profile: {
|
|
129
|
+
displayName: string | null;
|
|
130
|
+
profilePicture: string | null;
|
|
131
|
+
profilePictureThumbnail: string | null;
|
|
132
|
+
} | null;
|
|
123
133
|
}[];
|
|
124
134
|
teachers: {
|
|
125
135
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"class.d.ts","sourceRoot":"","sources":["../../src/routers/class.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"class.d.ts","sourceRoot":"","sources":["../../src/routers/class.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwjCtB,CAAC"}
|
package/dist/routers/class.js
CHANGED
|
@@ -100,6 +100,13 @@ export const classRouter = createTRPCRouter({
|
|
|
100
100
|
select: {
|
|
101
101
|
id: true,
|
|
102
102
|
username: true,
|
|
103
|
+
profile: {
|
|
104
|
+
select: {
|
|
105
|
+
displayName: true,
|
|
106
|
+
profilePicture: true,
|
|
107
|
+
profilePictureThumbnail: true,
|
|
108
|
+
},
|
|
109
|
+
},
|
|
103
110
|
},
|
|
104
111
|
},
|
|
105
112
|
announcements: {
|
|
@@ -114,6 +121,13 @@ export const classRouter = createTRPCRouter({
|
|
|
114
121
|
select: {
|
|
115
122
|
id: true,
|
|
116
123
|
username: true,
|
|
124
|
+
profile: {
|
|
125
|
+
select: {
|
|
126
|
+
displayName: true,
|
|
127
|
+
profilePicture: true,
|
|
128
|
+
profilePictureThumbnail: true,
|
|
129
|
+
},
|
|
130
|
+
},
|
|
117
131
|
},
|
|
118
132
|
},
|
|
119
133
|
},
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const labChatRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
3
|
+
ctx: import("../trpc.js").Context;
|
|
4
|
+
meta: object;
|
|
5
|
+
errorShape: {
|
|
6
|
+
data: {
|
|
7
|
+
zodError: z.typeToFlattenedError<any, string> | null;
|
|
8
|
+
prismaError: import("../utils/prismaErrorHandler.js").PrismaErrorInfo | null;
|
|
9
|
+
code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
|
|
10
|
+
httpStatus: number;
|
|
11
|
+
path?: string;
|
|
12
|
+
stack?: string;
|
|
13
|
+
};
|
|
14
|
+
message: string;
|
|
15
|
+
code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
|
|
16
|
+
};
|
|
17
|
+
transformer: false;
|
|
18
|
+
}, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
|
|
19
|
+
create: import("@trpc/server").TRPCMutationProcedure<{
|
|
20
|
+
input: {
|
|
21
|
+
context: string;
|
|
22
|
+
title: string;
|
|
23
|
+
classId: string;
|
|
24
|
+
};
|
|
25
|
+
output: {
|
|
26
|
+
class: {
|
|
27
|
+
id: string;
|
|
28
|
+
name: string;
|
|
29
|
+
subject: string;
|
|
30
|
+
section: string;
|
|
31
|
+
};
|
|
32
|
+
conversation: {
|
|
33
|
+
members: ({
|
|
34
|
+
user: {
|
|
35
|
+
id: string;
|
|
36
|
+
username: string;
|
|
37
|
+
profile: {
|
|
38
|
+
displayName: string | null;
|
|
39
|
+
profilePicture: string | null;
|
|
40
|
+
} | null;
|
|
41
|
+
};
|
|
42
|
+
} & {
|
|
43
|
+
id: string;
|
|
44
|
+
role: import(".prisma/client").$Enums.ConversationRole;
|
|
45
|
+
userId: string;
|
|
46
|
+
conversationId: string;
|
|
47
|
+
joinedAt: Date;
|
|
48
|
+
lastViewedAt: Date | null;
|
|
49
|
+
lastViewedMentionAt: Date | null;
|
|
50
|
+
})[];
|
|
51
|
+
} & {
|
|
52
|
+
type: import(".prisma/client").$Enums.ConversationType;
|
|
53
|
+
id: string;
|
|
54
|
+
name: string | null;
|
|
55
|
+
createdAt: Date;
|
|
56
|
+
updatedAt: Date;
|
|
57
|
+
displayInChat: boolean;
|
|
58
|
+
};
|
|
59
|
+
createdBy: {
|
|
60
|
+
id: string;
|
|
61
|
+
username: string;
|
|
62
|
+
profile: {
|
|
63
|
+
displayName: string | null;
|
|
64
|
+
} | null;
|
|
65
|
+
};
|
|
66
|
+
} & {
|
|
67
|
+
context: string;
|
|
68
|
+
id: string;
|
|
69
|
+
title: string;
|
|
70
|
+
classId: string;
|
|
71
|
+
createdAt: Date;
|
|
72
|
+
updatedAt: Date;
|
|
73
|
+
conversationId: string;
|
|
74
|
+
createdById: string;
|
|
75
|
+
};
|
|
76
|
+
meta: object;
|
|
77
|
+
}>;
|
|
78
|
+
get: import("@trpc/server").TRPCQueryProcedure<{
|
|
79
|
+
input: {
|
|
80
|
+
labChatId: string;
|
|
81
|
+
};
|
|
82
|
+
output: {
|
|
83
|
+
class: {
|
|
84
|
+
id: string;
|
|
85
|
+
name: string;
|
|
86
|
+
subject: string;
|
|
87
|
+
section: string;
|
|
88
|
+
};
|
|
89
|
+
conversation: {
|
|
90
|
+
members: ({
|
|
91
|
+
user: {
|
|
92
|
+
id: string;
|
|
93
|
+
username: string;
|
|
94
|
+
profile: {
|
|
95
|
+
displayName: string | null;
|
|
96
|
+
profilePicture: string | null;
|
|
97
|
+
} | null;
|
|
98
|
+
};
|
|
99
|
+
} & {
|
|
100
|
+
id: string;
|
|
101
|
+
role: import(".prisma/client").$Enums.ConversationRole;
|
|
102
|
+
userId: string;
|
|
103
|
+
conversationId: string;
|
|
104
|
+
joinedAt: Date;
|
|
105
|
+
lastViewedAt: Date | null;
|
|
106
|
+
lastViewedMentionAt: Date | null;
|
|
107
|
+
})[];
|
|
108
|
+
} & {
|
|
109
|
+
type: import(".prisma/client").$Enums.ConversationType;
|
|
110
|
+
id: string;
|
|
111
|
+
name: string | null;
|
|
112
|
+
createdAt: Date;
|
|
113
|
+
updatedAt: Date;
|
|
114
|
+
displayInChat: boolean;
|
|
115
|
+
};
|
|
116
|
+
createdBy: {
|
|
117
|
+
id: string;
|
|
118
|
+
username: string;
|
|
119
|
+
profile: {
|
|
120
|
+
displayName: string | null;
|
|
121
|
+
} | null;
|
|
122
|
+
};
|
|
123
|
+
} & {
|
|
124
|
+
context: string;
|
|
125
|
+
id: string;
|
|
126
|
+
title: string;
|
|
127
|
+
classId: string;
|
|
128
|
+
createdAt: Date;
|
|
129
|
+
updatedAt: Date;
|
|
130
|
+
conversationId: string;
|
|
131
|
+
createdById: string;
|
|
132
|
+
};
|
|
133
|
+
meta: object;
|
|
134
|
+
}>;
|
|
135
|
+
list: import("@trpc/server").TRPCQueryProcedure<{
|
|
136
|
+
input: {
|
|
137
|
+
classId: string;
|
|
138
|
+
};
|
|
139
|
+
output: {
|
|
140
|
+
id: string;
|
|
141
|
+
title: string;
|
|
142
|
+
classId: string;
|
|
143
|
+
conversationId: string;
|
|
144
|
+
createdBy: {
|
|
145
|
+
id: string;
|
|
146
|
+
username: string;
|
|
147
|
+
profile: {
|
|
148
|
+
displayName: string | null;
|
|
149
|
+
} | null;
|
|
150
|
+
};
|
|
151
|
+
createdAt: Date;
|
|
152
|
+
updatedAt: Date;
|
|
153
|
+
lastMessage: {
|
|
154
|
+
sender: {
|
|
155
|
+
id: string;
|
|
156
|
+
username: string;
|
|
157
|
+
profile: {
|
|
158
|
+
displayName: string | null;
|
|
159
|
+
} | null;
|
|
160
|
+
};
|
|
161
|
+
} & {
|
|
162
|
+
id: string;
|
|
163
|
+
content: string;
|
|
164
|
+
createdAt: Date;
|
|
165
|
+
senderId: string;
|
|
166
|
+
conversationId: string;
|
|
167
|
+
};
|
|
168
|
+
messageCount: number;
|
|
169
|
+
}[];
|
|
170
|
+
meta: object;
|
|
171
|
+
}>;
|
|
172
|
+
postToLabChat: import("@trpc/server").TRPCMutationProcedure<{
|
|
173
|
+
input: {
|
|
174
|
+
content: string;
|
|
175
|
+
labChatId: string;
|
|
176
|
+
mentionedUserIds?: string[] | undefined;
|
|
177
|
+
};
|
|
178
|
+
output: {
|
|
179
|
+
id: string;
|
|
180
|
+
content: string;
|
|
181
|
+
senderId: string;
|
|
182
|
+
conversationId: string;
|
|
183
|
+
createdAt: Date;
|
|
184
|
+
sender: {
|
|
185
|
+
id: string;
|
|
186
|
+
username: string;
|
|
187
|
+
profile: {
|
|
188
|
+
displayName: string | null;
|
|
189
|
+
profilePicture: string | null;
|
|
190
|
+
} | null;
|
|
191
|
+
};
|
|
192
|
+
mentionedUserIds: string[];
|
|
193
|
+
labChatId: string;
|
|
194
|
+
};
|
|
195
|
+
meta: object;
|
|
196
|
+
}>;
|
|
197
|
+
delete: import("@trpc/server").TRPCMutationProcedure<{
|
|
198
|
+
input: {
|
|
199
|
+
labChatId: string;
|
|
200
|
+
};
|
|
201
|
+
output: {
|
|
202
|
+
success: boolean;
|
|
203
|
+
};
|
|
204
|
+
meta: object;
|
|
205
|
+
}>;
|
|
206
|
+
}>>;
|
|
207
|
+
//# sourceMappingURL=labChat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"labChat.d.ts","sourceRoot":"","sources":["../../src/routers/labChat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAshBxB,CAAC"}
|