@studious-lms/server 1.0.0
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/LICENSE.txt +8 -0
- package/README.md +143 -0
- package/dist/exportType.d.ts +9 -0
- package/dist/exportType.d.ts.map +1 -0
- package/dist/exportType.js +7 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +82 -0
- package/dist/lib/fileUpload.d.ts +38 -0
- package/dist/lib/fileUpload.d.ts.map +1 -0
- package/dist/lib/fileUpload.js +136 -0
- package/dist/lib/googleCloudStorage.d.ts +20 -0
- package/dist/lib/googleCloudStorage.d.ts.map +1 -0
- package/dist/lib/googleCloudStorage.js +88 -0
- package/dist/lib/prisma.d.ts +8 -0
- package/dist/lib/prisma.d.ts.map +1 -0
- package/dist/lib/prisma.js +11 -0
- package/dist/lib/thumbnailGenerator.d.ts +23 -0
- package/dist/lib/thumbnailGenerator.d.ts.map +1 -0
- package/dist/lib/thumbnailGenerator.js +180 -0
- package/dist/logger.d.ts +26 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +135 -0
- package/dist/middleware/auth.d.ts +7 -0
- package/dist/middleware/auth.d.ts.map +1 -0
- package/dist/middleware/auth.js +170 -0
- package/dist/middleware/logging.d.ts +2 -0
- package/dist/middleware/logging.d.ts.map +1 -0
- package/dist/middleware/logging.js +51 -0
- package/dist/routers/_app.d.ts +4369 -0
- package/dist/routers/_app.d.ts.map +1 -0
- package/dist/routers/_app.js +29 -0
- package/dist/routers/agenda.d.ts +66 -0
- package/dist/routers/agenda.d.ts.map +1 -0
- package/dist/routers/agenda.js +78 -0
- package/dist/routers/announcement.d.ts +79 -0
- package/dist/routers/announcement.d.ts.map +1 -0
- package/dist/routers/announcement.js +122 -0
- package/dist/routers/assignment.d.ts +1051 -0
- package/dist/routers/assignment.d.ts.map +1 -0
- package/dist/routers/assignment.js +1497 -0
- package/dist/routers/attendance.d.ts +99 -0
- package/dist/routers/attendance.d.ts.map +1 -0
- package/dist/routers/attendance.js +269 -0
- package/dist/routers/auth.d.ts +87 -0
- package/dist/routers/auth.d.ts.map +1 -0
- package/dist/routers/auth.js +255 -0
- package/dist/routers/class.d.ts +427 -0
- package/dist/routers/class.d.ts.map +1 -0
- package/dist/routers/class.js +693 -0
- package/dist/routers/event.d.ts +249 -0
- package/dist/routers/event.d.ts.map +1 -0
- package/dist/routers/event.js +467 -0
- package/dist/routers/file.d.ts +27 -0
- package/dist/routers/file.d.ts.map +1 -0
- package/dist/routers/file.js +88 -0
- package/dist/routers/section.d.ts +51 -0
- package/dist/routers/section.d.ts.map +1 -0
- package/dist/routers/section.js +123 -0
- package/dist/routers/user.d.ts +49 -0
- package/dist/routers/user.d.ts.map +1 -0
- package/dist/routers/user.js +74 -0
- package/dist/socket/handlers.d.ts +3 -0
- package/dist/socket/handlers.d.ts.map +1 -0
- package/dist/socket/handlers.js +130 -0
- package/dist/trpc.d.ts +147 -0
- package/dist/trpc.d.ts.map +1 -0
- package/dist/trpc.js +67 -0
- package/dist/types/trpc.d.ts +16 -0
- package/dist/types/trpc.d.ts.map +1 -0
- package/dist/types/trpc.js +2 -0
- package/dist/utils/email.d.ts +3 -0
- package/dist/utils/email.d.ts.map +1 -0
- package/dist/utils/email.js +16 -0
- package/dist/utils/generateInviteCode.d.ts +6 -0
- package/dist/utils/generateInviteCode.d.ts.map +1 -0
- package/dist/utils/generateInviteCode.js +11 -0
- package/dist/utils/logger.d.ts +27 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +124 -0
- package/generated/prisma/client.d.ts +1 -0
- package/generated/prisma/client.js +4 -0
- package/generated/prisma/default.d.ts +1 -0
- package/generated/prisma/default.js +4 -0
- package/generated/prisma/edge.d.ts +1 -0
- package/generated/prisma/edge.js +389 -0
- package/generated/prisma/index-browser.js +375 -0
- package/generated/prisma/index.d.ts +34865 -0
- package/generated/prisma/index.js +410 -0
- package/generated/prisma/libquery_engine-darwin-arm64.dylib.node +0 -0
- package/generated/prisma/package.json +140 -0
- package/generated/prisma/runtime/edge-esm.js +34 -0
- package/generated/prisma/runtime/edge.js +34 -0
- package/generated/prisma/runtime/index-browser.d.ts +370 -0
- package/generated/prisma/runtime/index-browser.js +16 -0
- package/generated/prisma/runtime/library.d.ts +3647 -0
- package/generated/prisma/runtime/library.js +146 -0
- package/generated/prisma/runtime/react-native.js +83 -0
- package/generated/prisma/runtime/wasm.js +35 -0
- package/generated/prisma/schema.prisma +304 -0
- package/generated/prisma/wasm.d.ts +1 -0
- package/generated/prisma/wasm.js +375 -0
- package/package.json +46 -0
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const eventRouter: import("@trpc/server/dist/unstable-core-do-not-import").BuiltRouter<{
|
|
3
|
+
ctx: import("../trpc").Context;
|
|
4
|
+
meta: object;
|
|
5
|
+
errorShape: {
|
|
6
|
+
data: {
|
|
7
|
+
zodError: z.typeToFlattenedError<any, string> | null;
|
|
8
|
+
code: import("@trpc/server/dist/unstable-core-do-not-import").TRPC_ERROR_CODE_KEY;
|
|
9
|
+
httpStatus: number;
|
|
10
|
+
path?: string;
|
|
11
|
+
stack?: string;
|
|
12
|
+
};
|
|
13
|
+
message: string;
|
|
14
|
+
code: import("@trpc/server/dist/unstable-core-do-not-import").TRPC_ERROR_CODE_NUMBER;
|
|
15
|
+
};
|
|
16
|
+
transformer: false;
|
|
17
|
+
}, import("@trpc/server/dist/unstable-core-do-not-import").DecorateCreateRouterOptions<{
|
|
18
|
+
get: import("@trpc/server").TRPCQueryProcedure<{
|
|
19
|
+
input: {
|
|
20
|
+
id: string;
|
|
21
|
+
};
|
|
22
|
+
output: {
|
|
23
|
+
event: {
|
|
24
|
+
user: {
|
|
25
|
+
id: string;
|
|
26
|
+
username: string;
|
|
27
|
+
email: string;
|
|
28
|
+
password: string;
|
|
29
|
+
verified: boolean;
|
|
30
|
+
profileId: string | null;
|
|
31
|
+
} | null;
|
|
32
|
+
class: {
|
|
33
|
+
id: string;
|
|
34
|
+
name: string;
|
|
35
|
+
subject: string;
|
|
36
|
+
color: string | null;
|
|
37
|
+
section: string;
|
|
38
|
+
} | null;
|
|
39
|
+
assignmentsAttached: {
|
|
40
|
+
type: import(".prisma/client").$Enums.AssignmentType;
|
|
41
|
+
id: string;
|
|
42
|
+
section: {
|
|
43
|
+
id: string;
|
|
44
|
+
name: string;
|
|
45
|
+
} | null;
|
|
46
|
+
teacher: {
|
|
47
|
+
id: string;
|
|
48
|
+
username: string;
|
|
49
|
+
};
|
|
50
|
+
title: string;
|
|
51
|
+
instructions: string;
|
|
52
|
+
dueDate: Date;
|
|
53
|
+
graded: boolean;
|
|
54
|
+
maxGrade: number | null;
|
|
55
|
+
weight: number;
|
|
56
|
+
attachments: {
|
|
57
|
+
type: string;
|
|
58
|
+
id: string;
|
|
59
|
+
name: string;
|
|
60
|
+
}[];
|
|
61
|
+
}[];
|
|
62
|
+
} & {
|
|
63
|
+
id: string;
|
|
64
|
+
name: string | null;
|
|
65
|
+
color: string | null;
|
|
66
|
+
classId: string | null;
|
|
67
|
+
userId: string | null;
|
|
68
|
+
remarks: string | null;
|
|
69
|
+
startTime: Date;
|
|
70
|
+
endTime: Date;
|
|
71
|
+
location: string | null;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
}>;
|
|
75
|
+
create: import("@trpc/server").TRPCMutationProcedure<{
|
|
76
|
+
input: {
|
|
77
|
+
startTime: string;
|
|
78
|
+
endTime: string;
|
|
79
|
+
name?: string | undefined;
|
|
80
|
+
color?: string | undefined;
|
|
81
|
+
classId?: string | undefined;
|
|
82
|
+
remarks?: string | undefined;
|
|
83
|
+
location?: string | undefined;
|
|
84
|
+
};
|
|
85
|
+
output: {
|
|
86
|
+
event: {
|
|
87
|
+
id: string;
|
|
88
|
+
name: string | null;
|
|
89
|
+
class: {
|
|
90
|
+
id: string;
|
|
91
|
+
name: string;
|
|
92
|
+
} | null;
|
|
93
|
+
color: string | null;
|
|
94
|
+
classId: string | null;
|
|
95
|
+
userId: string | null;
|
|
96
|
+
remarks: string | null;
|
|
97
|
+
startTime: Date;
|
|
98
|
+
endTime: Date;
|
|
99
|
+
location: string | null;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
}>;
|
|
103
|
+
update: import("@trpc/server").TRPCMutationProcedure<{
|
|
104
|
+
input: {
|
|
105
|
+
id: string;
|
|
106
|
+
data: {
|
|
107
|
+
startTime: string;
|
|
108
|
+
endTime: string;
|
|
109
|
+
name?: string | undefined;
|
|
110
|
+
color?: string | undefined;
|
|
111
|
+
classId?: string | undefined;
|
|
112
|
+
remarks?: string | undefined;
|
|
113
|
+
location?: string | undefined;
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
output: {
|
|
117
|
+
event: {
|
|
118
|
+
id: string;
|
|
119
|
+
name: string | null;
|
|
120
|
+
color: string | null;
|
|
121
|
+
classId: string | null;
|
|
122
|
+
userId: string | null;
|
|
123
|
+
remarks: string | null;
|
|
124
|
+
startTime: Date;
|
|
125
|
+
endTime: Date;
|
|
126
|
+
location: string | null;
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
}>;
|
|
130
|
+
delete: import("@trpc/server").TRPCMutationProcedure<{
|
|
131
|
+
input: {
|
|
132
|
+
id: string;
|
|
133
|
+
};
|
|
134
|
+
output: {
|
|
135
|
+
success: boolean;
|
|
136
|
+
};
|
|
137
|
+
}>;
|
|
138
|
+
attachAssignment: import("@trpc/server").TRPCMutationProcedure<{
|
|
139
|
+
input: {
|
|
140
|
+
assignmentId: string;
|
|
141
|
+
eventId: string;
|
|
142
|
+
};
|
|
143
|
+
output: {
|
|
144
|
+
assignment: {
|
|
145
|
+
section: {
|
|
146
|
+
id: string;
|
|
147
|
+
name: string;
|
|
148
|
+
} | null;
|
|
149
|
+
teacher: {
|
|
150
|
+
id: string;
|
|
151
|
+
username: string;
|
|
152
|
+
};
|
|
153
|
+
attachments: {
|
|
154
|
+
type: string;
|
|
155
|
+
id: string;
|
|
156
|
+
name: string;
|
|
157
|
+
}[];
|
|
158
|
+
} & {
|
|
159
|
+
type: import(".prisma/client").$Enums.AssignmentType;
|
|
160
|
+
id: string;
|
|
161
|
+
classId: string;
|
|
162
|
+
markSchemeId: string | null;
|
|
163
|
+
gradingBoundaryId: string | null;
|
|
164
|
+
title: string;
|
|
165
|
+
instructions: string;
|
|
166
|
+
dueDate: Date;
|
|
167
|
+
createdAt: Date | null;
|
|
168
|
+
modifiedAt: Date | null;
|
|
169
|
+
teacherId: string;
|
|
170
|
+
sectionId: string | null;
|
|
171
|
+
graded: boolean;
|
|
172
|
+
maxGrade: number | null;
|
|
173
|
+
weight: number;
|
|
174
|
+
eventId: string | null;
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
}>;
|
|
178
|
+
detachAssignment: import("@trpc/server").TRPCMutationProcedure<{
|
|
179
|
+
input: {
|
|
180
|
+
assignmentId: string;
|
|
181
|
+
eventId: string;
|
|
182
|
+
};
|
|
183
|
+
output: {
|
|
184
|
+
assignment: {
|
|
185
|
+
section: {
|
|
186
|
+
id: string;
|
|
187
|
+
name: string;
|
|
188
|
+
} | null;
|
|
189
|
+
teacher: {
|
|
190
|
+
id: string;
|
|
191
|
+
username: string;
|
|
192
|
+
};
|
|
193
|
+
attachments: {
|
|
194
|
+
type: string;
|
|
195
|
+
id: string;
|
|
196
|
+
name: string;
|
|
197
|
+
}[];
|
|
198
|
+
} & {
|
|
199
|
+
type: import(".prisma/client").$Enums.AssignmentType;
|
|
200
|
+
id: string;
|
|
201
|
+
classId: string;
|
|
202
|
+
markSchemeId: string | null;
|
|
203
|
+
gradingBoundaryId: string | null;
|
|
204
|
+
title: string;
|
|
205
|
+
instructions: string;
|
|
206
|
+
dueDate: Date;
|
|
207
|
+
createdAt: Date | null;
|
|
208
|
+
modifiedAt: Date | null;
|
|
209
|
+
teacherId: string;
|
|
210
|
+
sectionId: string | null;
|
|
211
|
+
graded: boolean;
|
|
212
|
+
maxGrade: number | null;
|
|
213
|
+
weight: number;
|
|
214
|
+
eventId: string | null;
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
}>;
|
|
218
|
+
getAvailableAssignments: import("@trpc/server").TRPCQueryProcedure<{
|
|
219
|
+
input: {
|
|
220
|
+
eventId: string;
|
|
221
|
+
};
|
|
222
|
+
output: {
|
|
223
|
+
assignments: {
|
|
224
|
+
type: import(".prisma/client").$Enums.AssignmentType;
|
|
225
|
+
id: string;
|
|
226
|
+
section: {
|
|
227
|
+
id: string;
|
|
228
|
+
name: string;
|
|
229
|
+
} | null;
|
|
230
|
+
teacher: {
|
|
231
|
+
id: string;
|
|
232
|
+
username: string;
|
|
233
|
+
};
|
|
234
|
+
title: string;
|
|
235
|
+
instructions: string;
|
|
236
|
+
dueDate: Date;
|
|
237
|
+
graded: boolean;
|
|
238
|
+
maxGrade: number | null;
|
|
239
|
+
weight: number;
|
|
240
|
+
attachments: {
|
|
241
|
+
type: string;
|
|
242
|
+
id: string;
|
|
243
|
+
name: string;
|
|
244
|
+
}[];
|
|
245
|
+
}[];
|
|
246
|
+
};
|
|
247
|
+
}>;
|
|
248
|
+
}>>;
|
|
249
|
+
//# sourceMappingURL=event.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../src/routers/event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAgBxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4etB,CAAC"}
|