@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.
Files changed (103) hide show
  1. package/LICENSE.txt +8 -0
  2. package/README.md +143 -0
  3. package/dist/exportType.d.ts +9 -0
  4. package/dist/exportType.d.ts.map +1 -0
  5. package/dist/exportType.js +7 -0
  6. package/dist/index.d.ts +2 -0
  7. package/dist/index.d.ts.map +1 -0
  8. package/dist/index.js +82 -0
  9. package/dist/lib/fileUpload.d.ts +38 -0
  10. package/dist/lib/fileUpload.d.ts.map +1 -0
  11. package/dist/lib/fileUpload.js +136 -0
  12. package/dist/lib/googleCloudStorage.d.ts +20 -0
  13. package/dist/lib/googleCloudStorage.d.ts.map +1 -0
  14. package/dist/lib/googleCloudStorage.js +88 -0
  15. package/dist/lib/prisma.d.ts +8 -0
  16. package/dist/lib/prisma.d.ts.map +1 -0
  17. package/dist/lib/prisma.js +11 -0
  18. package/dist/lib/thumbnailGenerator.d.ts +23 -0
  19. package/dist/lib/thumbnailGenerator.d.ts.map +1 -0
  20. package/dist/lib/thumbnailGenerator.js +180 -0
  21. package/dist/logger.d.ts +26 -0
  22. package/dist/logger.d.ts.map +1 -0
  23. package/dist/logger.js +135 -0
  24. package/dist/middleware/auth.d.ts +7 -0
  25. package/dist/middleware/auth.d.ts.map +1 -0
  26. package/dist/middleware/auth.js +170 -0
  27. package/dist/middleware/logging.d.ts +2 -0
  28. package/dist/middleware/logging.d.ts.map +1 -0
  29. package/dist/middleware/logging.js +51 -0
  30. package/dist/routers/_app.d.ts +4369 -0
  31. package/dist/routers/_app.d.ts.map +1 -0
  32. package/dist/routers/_app.js +29 -0
  33. package/dist/routers/agenda.d.ts +66 -0
  34. package/dist/routers/agenda.d.ts.map +1 -0
  35. package/dist/routers/agenda.js +78 -0
  36. package/dist/routers/announcement.d.ts +79 -0
  37. package/dist/routers/announcement.d.ts.map +1 -0
  38. package/dist/routers/announcement.js +122 -0
  39. package/dist/routers/assignment.d.ts +1051 -0
  40. package/dist/routers/assignment.d.ts.map +1 -0
  41. package/dist/routers/assignment.js +1497 -0
  42. package/dist/routers/attendance.d.ts +99 -0
  43. package/dist/routers/attendance.d.ts.map +1 -0
  44. package/dist/routers/attendance.js +269 -0
  45. package/dist/routers/auth.d.ts +87 -0
  46. package/dist/routers/auth.d.ts.map +1 -0
  47. package/dist/routers/auth.js +255 -0
  48. package/dist/routers/class.d.ts +427 -0
  49. package/dist/routers/class.d.ts.map +1 -0
  50. package/dist/routers/class.js +693 -0
  51. package/dist/routers/event.d.ts +249 -0
  52. package/dist/routers/event.d.ts.map +1 -0
  53. package/dist/routers/event.js +467 -0
  54. package/dist/routers/file.d.ts +27 -0
  55. package/dist/routers/file.d.ts.map +1 -0
  56. package/dist/routers/file.js +88 -0
  57. package/dist/routers/section.d.ts +51 -0
  58. package/dist/routers/section.d.ts.map +1 -0
  59. package/dist/routers/section.js +123 -0
  60. package/dist/routers/user.d.ts +49 -0
  61. package/dist/routers/user.d.ts.map +1 -0
  62. package/dist/routers/user.js +74 -0
  63. package/dist/socket/handlers.d.ts +3 -0
  64. package/dist/socket/handlers.d.ts.map +1 -0
  65. package/dist/socket/handlers.js +130 -0
  66. package/dist/trpc.d.ts +147 -0
  67. package/dist/trpc.d.ts.map +1 -0
  68. package/dist/trpc.js +67 -0
  69. package/dist/types/trpc.d.ts +16 -0
  70. package/dist/types/trpc.d.ts.map +1 -0
  71. package/dist/types/trpc.js +2 -0
  72. package/dist/utils/email.d.ts +3 -0
  73. package/dist/utils/email.d.ts.map +1 -0
  74. package/dist/utils/email.js +16 -0
  75. package/dist/utils/generateInviteCode.d.ts +6 -0
  76. package/dist/utils/generateInviteCode.d.ts.map +1 -0
  77. package/dist/utils/generateInviteCode.js +11 -0
  78. package/dist/utils/logger.d.ts +27 -0
  79. package/dist/utils/logger.d.ts.map +1 -0
  80. package/dist/utils/logger.js +124 -0
  81. package/generated/prisma/client.d.ts +1 -0
  82. package/generated/prisma/client.js +4 -0
  83. package/generated/prisma/default.d.ts +1 -0
  84. package/generated/prisma/default.js +4 -0
  85. package/generated/prisma/edge.d.ts +1 -0
  86. package/generated/prisma/edge.js +389 -0
  87. package/generated/prisma/index-browser.js +375 -0
  88. package/generated/prisma/index.d.ts +34865 -0
  89. package/generated/prisma/index.js +410 -0
  90. package/generated/prisma/libquery_engine-darwin-arm64.dylib.node +0 -0
  91. package/generated/prisma/package.json +140 -0
  92. package/generated/prisma/runtime/edge-esm.js +34 -0
  93. package/generated/prisma/runtime/edge.js +34 -0
  94. package/generated/prisma/runtime/index-browser.d.ts +370 -0
  95. package/generated/prisma/runtime/index-browser.js +16 -0
  96. package/generated/prisma/runtime/library.d.ts +3647 -0
  97. package/generated/prisma/runtime/library.js +146 -0
  98. package/generated/prisma/runtime/react-native.js +83 -0
  99. package/generated/prisma/runtime/wasm.js +35 -0
  100. package/generated/prisma/schema.prisma +304 -0
  101. package/generated/prisma/wasm.d.ts +1 -0
  102. package/generated/prisma/wasm.js +375 -0
  103. 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"}